text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
FUNCTION IGM_ABSORB(lam,spec,zz,factor)
!routine to include IGM absorption via Madau (1995)
!this routine includes a fudge factor (accessed by pset%igm_factor)
!that allows the user to scale the IGM optical depth
USE sps_vars; USE sps_utils, ONLY : locate
IMPLICIT NONE
REAL(SP), DIMENSION(nspec), INTENT(... | {"hexsha": "911f2bc8c1cf924733de93ade2d0972d543b7570", "size": 2252, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/igm_absorb.f90", "max_stars_repo_name": "christopherlovell/fsps", "max_stars_repo_head_hexsha": "1c09a47d7b0fb15a7f245ee3e9b2a7c54122ffdf", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
using TargetedLearning.TMLEs
import TargetedLearning.TMLEs.TMLE
facts("Test TMLEs") do
n,p = 100, 10
w = [ones(n) rand(n, p)]
a = round(rand(n))
y = round(rand(n))
qfit = lreg([w a], y)
logitQnA1 = linpred(qfit, [w ones(n)])
logitQnA0 = linpred(qfit, [w zeros(n)])
gn1 = predict(lreg(w,... | {"hexsha": "cfb8d8f130a93cbca6ceb0c50e77ff20d99b7638", "size": 1054, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/TMLEs.jl", "max_stars_repo_name": "hantonita/TargetedLearning.jl", "max_stars_repo_head_hexsha": "b3d012bd6a224443c48efae9c92b85292b6805e3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import matplotlib.ticker as plticker
import matplotlib.dates as mpdates
import matplotlib.patches as mpatches
import matplotlib as mpl
import copy
import fnmatch
import csv
from datetime import datetime, timedelta
import sys
import os
import numpy as np
import se... | {"hexsha": "453bd8b2d54d5c2614b35d617ed10cac938241bb", "size": 16423, "ext": "py", "lang": "Python", "max_stars_repo_path": "forecaster/plot-prediction-median-error.py", "max_stars_repo_name": "zhengwang125/QueryBot5000", "max_stars_repo_head_hexsha": "2f5f2709622c353036bc6da18a51afa371cf2f53", "max_stars_repo_licenses... |
import pandas as pd
from sklearn.model_selection import train_test_split
import numpy as np
import xgboost as xgb # use xgboost=1.0.2
import pickle
def read_excel(filePath):
df = pd.read_excel(filePath, sheet_name='Sheet1_user_dt')
df_1 = df.dropna()
drop_colume = ['email',
'sn',
... | {"hexsha": "2b666324633cc8e3da3bd8a235f026f463355eb2", "size": 6810, "ext": "py", "lang": "Python", "max_stars_repo_path": "main_task.py", "max_stars_repo_name": "edwardchang0112/Airflow_Datapipeline_Example_TunningModelWeights", "max_stars_repo_head_hexsha": "34ad5c3e48278c67b31b8efa1d16bea5a0852bf7", "max_stars_repo_... |
##### update physiological attributes of each individual
function plankton_growth!(plank, nuts, rnd, p, ΔT, t, arch::Architecture)
calc_inorganic_uptake!(plank, nuts, p, arch)
update_quotas_1!(plank, ΔT, arch)
calc_organic_uptake!(plank, nuts, p, arch)
calc_ρChl!(plank, nuts.par, p, arch)
calc_r... | {"hexsha": "fbfe344caa4c476fe2be7d31105b38b69d230f3a", "size": 1020, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Plankton/QuotaMode/plankton_growth.jl", "max_stars_repo_name": "JuliaOcean/PlanktonIndividuals.jl", "max_stars_repo_head_hexsha": "5ac96b3ef90a21f377c119557665997fabe0944d", "max_stars_repo_lic... |
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... | {"hexsha": "b4b8ca016555f19855d1821a09885444d2cee9ba", "size": 4577, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/ripple/rpc/impl/Role.cpp", "max_stars_repo_name": "fidaswap/FidaEx", "max_stars_repo_head_hexsha": "f1338671439c35fede3ebba40e30a3f22b7604bf", "max_stars_repo_licenses": ["ISC"], "max_stars_coun... |
From stdpp Require Import prelude.
From VLSM.Lib Require Import Preamble.
From VLSM.Core Require Import VLSM Equivocation.
From VLSM.Core Require Import Composition VLSMProjections Validator ProjectionTraces.
(** * VLSM projections and messages properties
In this section we show that messages properties (oracles li... | {"author": "runtimeverification", "repo": "vlsm", "sha": "9115beb539257427467872ce65a224a0268cdae7", "save_path": "github-repos/coq/runtimeverification-vlsm", "path": "github-repos/coq/runtimeverification-vlsm/vlsm-9115beb539257427467872ce65a224a0268cdae7/theories/VLSM/Core/EquivocationProjections.v"} |
#include <iostream>
#include <functional>
#include <unordered_map>
#include <thread>
#include <mutex>
#include <boost/unordered_map.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <succinct/mapper.hpp>
#include "index_types.hpp"
#include "wand_data_comp... | {"hexsha": "b4e7fe190d31f64a4ee62e50075225232db028ed", "size": 6612, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "dump_rm.cpp", "max_stars_repo_name": "rmit-ir/RMQV", "max_stars_repo_head_hexsha": "44837cc9950969921677cf5a552cef2713f72650", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2.0, "max... |
import os
import fool
import nltk
import math
import pandas as pd
import numpy as np
import random
import tensorflow as tf
random.seed(1)
np.random.seed(1)
def get_corpus_indices(data,chars_to_idx,language="Chinese"):
"""
转化成词库索引
"""
label_chars=[]
corpus_indices=[]
label_indices=[]
i... | {"hexsha": "aa3c183f36d16c2dc9a86551cc36e193f6ee254a", "size": 7377, "ext": "py", "lang": "Python", "max_stars_repo_path": "LOADDATA.py", "max_stars_repo_name": "naojibrainmachine/machine-translation-Transformer", "max_stars_repo_head_hexsha": "905d3a909b5756fb2995453e03e216ab8b781666", "max_stars_repo_licenses": ["MIT... |
theory Termination
imports Multisubst
begin
abbreviation terminatesd :: "dexpr \<Rightarrow> bool" where
"terminatesd e \<equiv> (\<exists>e'. vald e' \<and> iter (\<leadsto>\<^sub>d) e e')"
primrec stable :: "ty \<Rightarrow> dexpr \<Rightarrow> bool" where
"stable (TyVar x) e = False"
| "stable Base e = (ter... | {"author": "xtreme-james-cooper", "repo": "Lambda-RAM-Compiler", "sha": "24125435949fa71dfc5faafdb236d28a098beefc", "save_path": "github-repos/isabelle/xtreme-james-cooper-Lambda-RAM-Compiler", "path": "github-repos/isabelle/xtreme-james-cooper-Lambda-RAM-Compiler/Lambda-RAM-Compiler-24125435949fa71dfc5faafdb236d28a098... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LaTeX book template %%
%% Author: Amber Jain (http://amberj.devio.us/) %%
%% License: ISC license %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}... | {"hexsha": "2296f2931e45734eacda07002bd37a7da70bcfb0", "size": 16176, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Easy-Book/purged.tex", "max_stars_repo_name": "stungkit/Algorithms-and-Coding-Interviews", "max_stars_repo_head_hexsha": "131199fea0b082d92c0f272a495c7a56a3242b71", "max_stars_repo_licenses": ["Apa... |
/*
* ****** Graph Algorithms using Boost Graph Library ********
*
* Variable elimination ordering heuristics developed by Cyril Terrioux <cyril.terrioux@lsis.org>
*/
#include "core/tb2wcsp.hpp"
#include "core/tb2binconstr.hpp"
#include "core/tb2knapsack.hpp"
#include "core/tb2naryconstr.hpp"
#ifdef BOOST
#include... | {"hexsha": "361a4908309fa236900337fac944113089359e82", "size": 29164, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/utils/tb2boostgraph.cpp", "max_stars_repo_name": "Pierre-Mont/toulbar2", "max_stars_repo_head_hexsha": "623b92d593eab2dc1e21df9f853c28cc84626ed6", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
--- Ångström ---
Visualization tools for arranging molecule positions and more.
"""
import numpy as np
def arrange_molecules(molecules, arrange=True, nx=5, distance=(-10, -10)):
"""
Arrange molecules in a 2D grid for better visual representation.
Parameters
----------
molecules : tuple
... | {"hexsha": "39ae310106b765a5c446ce615d81c4036bd0110b", "size": 2269, "ext": "py", "lang": "Python", "max_stars_repo_path": "angstrom/visualize/tools.py", "max_stars_repo_name": "kbsezginel/angstrom", "max_stars_repo_head_hexsha": "793fd05b9bf27cab50d5c292fe63f685ea767d6d", "max_stars_repo_licenses": ["BSD-3-Clause"], "... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Timothy Dozat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | {"hexsha": "7a08f3fd41e9868289be375d7a49923fa19294ab", "size": 2589, "ext": "py", "lang": "Python", "max_stars_repo_path": "Parser-hybrid/nparser/vocabs/index_vocab.py", "max_stars_repo_name": "sb-b/BOUN-PARSE", "max_stars_repo_head_hexsha": "2b529924897d8e2613c4d2193a67796a895da40b", "max_stars_repo_licenses": ["Apach... |
[STATEMENT]
lemma type_eq_subst_eq3:
fixes v::v and c1::c
assumes "\<lbrace> z1 : b1 | c1 \<rbrace> = (\<lbrace> z2 : b2 | c2 \<rbrace>)" and "atom z1 \<sharp> c2"
shows "c1 = c2[z2::=V_var z1]\<^sub>c\<^sub>v" and "b1=b2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. c1 = c2[z2::=[ z1 ]\<^sup>v]\<^sub>c... | {"llama_tokens": 671, "file": "MiniSail_IVSubst", "length": 2} |
# Produced by Balram Kandoria for Project Airfoil Optimization
import numpy as np
def MSES(x,y):
n = len(x)
#Yupp = np.ones(n)*300
#Xupp = np.ones(n)*300
#Ylow = np.ones(n)*300
#Xlow = np.ones(n)*300
dx = np.zeros(len(x))
for i in range(len(x)):
if i != 0:
... | {"hexsha": "f5db3c9d986657b2111b36a4f917ae2f72473f67", "size": 1198, "ext": "py", "lang": "Python", "max_stars_repo_path": "MSES.py", "max_stars_repo_name": "balram-kandoria/Project-Airfoil-Optmization", "max_stars_repo_head_hexsha": "fe2f6e5d3909c46964ddb7d75fadc2d0f54753d8", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Adapted for numpy/ma/cdms2 by convertcdms.py
# Wheeler Koladis Reproduction Package
from . import graphics
import vcs
import MV2
import numpy
class WKPlot(object):
def __init__(self, x=None, datawc_x1=-15, datawc_x2=15, datawc_y1=0, datawc_y2=.8, min=-1.4,
max=2., delta_isofill=.2, delta_isoli... | {"hexsha": "9d579d8dab90bb322e4b8cca9bde088bdbd07caf", "size": 19437, "ext": "py", "lang": "Python", "max_stars_repo_path": "WK/plot.py", "max_stars_repo_name": "UV-CDAT/wk", "max_stars_repo_head_hexsha": "4e9161a68615f24d3d36fe42642c5a62ab52ea54", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 2, "max... |
import os
import numpy as np
import math
import scipy
import pickle
TRAIN_DATA_PATH = "/Users/evanradcliffe/Senior Design/webserver/app/asl-alphabet/asl_alphabet_train"
split_arr = lambda arr: arr[int(len(arr)/7):]
def load_data():
images, labels, class_names = read_data()
(train_images, train_labels), (test... | {"hexsha": "71ffbec5cd20308b2d2dc18b8082641b84ae620e", "size": 2970, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/data.py", "max_stars_repo_name": "ASLive/webserver", "max_stars_repo_head_hexsha": "af36d194a4e4a5880df9c046518e75a07abfea22", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
@testset "Bus Constructors" begin
tBus = Bus(nothing)
tLoadZone = LoadZone(nothing)
bus = Bus(
1,
"test",
BusTypes.SLACK,
0.0,
0.0,
(min = 0.0, max = 0.0),
nothing,
nothing,
nothing,
)
@test PowerSystems.get_bustype(bus) == Bus... | {"hexsha": "de9b479e2922bd9c9285653b7718919136ab9181", "size": 4831, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_constructors.jl", "max_stars_repo_name": "jd-lara/PowerSystems.jl", "max_stars_repo_head_hexsha": "b61dc4d079168c55d96ec46e085d64b8f2e97d13", "max_stars_repo_licenses": ["BSD-3-Clause"], ... |
from __future__ import print_function
import matplotlib.pyplot as plt
import pyshull, sys, time, pickle, random
import numpy as np
import scipy.spatial as spatial
def CompareTriangleLists(triangles1, triangles2):
listOfTuples1 = [tuple(tri) for tri in triangles1]
listOfTuples2 = [tuple(tri) for tri in triangles2]
c... | {"hexsha": "15f3e02dd283584e364954f3787830dd2662b880", "size": 3601, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyshull/tests-compare-scipy.py", "max_stars_repo_name": "mit-mit-randomprojectlab/RandomOverworldGenerator", "max_stars_repo_head_hexsha": "9c41e8bbe2d01f40c0a4c3ffbfdbf1d3bcecc154", "max_stars_re... |
import collections
import glob
import pickle
import matplotlib
matplotlib.use('Agg') # no Xwindows needed
import librosa
import matplotlib.pyplot as plt
import numpy as np
import os
import yaml
from matplotlib.pyplot import specgram
from sklearn.preprocessing import normalize, MinMaxScaler
TrainingParams = collecti... | {"hexsha": "1ea495f7ceaa2346dfde23f4fd59cfd517850061", "size": 10802, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "jake-g/urban-sound-classification", "max_stars_repo_head_hexsha": "9d505732e7ba66d3a9e67ed97d956a7c67814503", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
subroutine pod_derivatives
!***********************************************************************
! Copyright, 2004, The Regents of the University of California.
! This program was prepared by the Regents of the University of
! California at Los Alamos National Laboratory (the University) under
! con... | {"hexsha": "e8638664cde2bcf4d94db25fefd29eb7bcf193b4", "size": 4801, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/pod_derivatives.f", "max_stars_repo_name": "satkarra/FEHM", "max_stars_repo_head_hexsha": "5d8d8811bf283fcca0a8a2a1479f442d95371968", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co... |
function Kprec( pw_grid::PWGrid, psi::Array{ComplexF64,2} )
Nstates = size(psi)[2]
G2 = pw_grid.G2
Npoints = pw_grid.Npoints
Kpsi = zeros( ComplexF64, size(psi) )
for ist = 1:Nstates
for ip = 1:Npoints
Kpsi[ip,ist] = psi[ip,ist] / ( 1.0 + G2[ip] )
end
end
return K... | {"hexsha": "add75b224170b1602ccf3daf628a493b211dcad4", "size": 387, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "PW/dft_01/Kprec.jl", "max_stars_repo_name": "f-fathurrahman/ffr-ElectronicStructure.jl", "max_stars_repo_head_hexsha": "35dca9831bfc6a3e49bb0f3a5872558ffce4b211", "max_stars_repo_licenses": ["MIT"],... |
#!/usr/bin/env python
# -*- coding: utf8 -*-
import sys
import cv2
import numpy as np
### functions
# def print_usage(): {{{
def print_usage():
print('[使い方]')
print(' $ python concat_shogi_pieces.py <駒の種類>')
print(' 例. $ python concat_shogi_pieces.py 1')
print()
print('<駒の種類>:')
print(' ... | {"hexsha": "7fec3507a8004ff27fd54d1e40fb7f1cf199a9a3", "size": 6392, "ext": "py", "lang": "Python", "max_stars_repo_path": "concat_shogi_pieces.py", "max_stars_repo_name": "tsugibayashi/create_shogi_pieces", "max_stars_repo_head_hexsha": "db016e71cfd97e2e968d11f4957d9a4c460a5726", "max_stars_repo_licenses": ["Apache-2.... |
using ArrayInterface, Test
import ArrayInterface: has_sparsestruct, findstructralnz
@test ArrayInterface.ismutable(rand(3))
using StaticArrays
@test ArrayInterface.ismutable(@SVector [1,2,3]) == false
@test ArrayInterface.ismutable(@MVector [1,2,3]) == true
using LinearAlgebra, SparseArrays
D=Diagonal([1,2,3,4])
@te... | {"hexsha": "2b9dc78a2861bae71d9d81443f70c223b16a61ea", "size": 1399, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "iamed2/ArrayInterface.jl", "max_stars_repo_head_hexsha": "c4cee12eb409085484c993ec8caea1fb7ce26e64", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import pickle
from collections import namedtuple
from pyvib.signal import Signal
from pyvib.rfs import RFS
path = 'data/'
filename = 'pyds_sweepvrms0.03'
Nm = namedtuple('Nm', 'y yd ydd u t finst fs')
sweep1 = pickle.lo... | {"hexsha": "8d802bc4e26cd2615d1edbe3b77cd9fab81841ea", "size": 887, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/contact/rfs.py", "max_stars_repo_name": "pawsen/vib", "max_stars_repo_head_hexsha": "366b61f3066de6486438b9b803e510107633e40a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_coun... |
import numpy as np
import gym
import matplotlib.pyplot as plt
from tensorbox.common.pid_controller import PIDController
class SawtoothWaveEnv(gym.Env):
def __init__(self):
super(SawtoothWaveEnv, self).__init__()
self.iteration = 0
self.horizon = 1024
self.endless_mode = True
... | {"hexsha": "8a3fbab64cd1b48fe2386d880d969de6a48eea26", "size": 3448, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorbox/envs/sawtooth_env.py", "max_stars_repo_name": "SvenGronauer/tensorbox", "max_stars_repo_head_hexsha": "8ca0da9a8fe345572bccdbda55bcd75f1bc1b28c", "max_stars_repo_licenses": ["MIT"], "max... |
import numpy as np
from keras.models import Model
from keras.layers import Input, LSTM, Dense, Multiply, Activation, Bidirectional, Concatenate, LeakyReLU
class Seq2SeqAE():
autoencoder = None
def create(self,
input_charset,
output_charset,
lstm_size=292,
... | {"hexsha": "d1a1dc8f6879f76302b3e776c557cfc64a1e5a00", "size": 9136, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuralnets/seq2seq.py", "max_stars_repo_name": "javorkk/string2shape", "max_stars_repo_head_hexsha": "57955a3e5cfe35d59780a09d4b1f5c0a067ccb71", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
Neural Network (NNet) and Deep Belief Network (DBN) search spaces used in [1]
and [2].
The functions in this file return pyll graphs that can be used as the `space`
argument to e.g. `hyperopt.fmin`. The pyll graphs include hyperparameter
constructs (e.g. `hyperopt.hp.uniform`) so `hyperopt.fmin` can perform
hyperp... | {"hexsha": "09525aa4110253bcb16f4139cb4717585dc05565", "size": 4116, "ext": "py", "lang": "Python", "max_stars_repo_path": "hpnnet/nips2011.py", "max_stars_repo_name": "hyperopt/hyperopt-nnet", "max_stars_repo_head_hexsha": "766811d1128cda02d41c95ae118fd938e023c605", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
#-*- coding:utf-8 -*-
import os
from scipy.io import loadmat
from scipy.sparse import load_npz
from variables import POS_TAGS
from variables import CORPUS_PATH, RAW_IMG_PATH, DUPLICATES_CLUSTER_PATH
from variables import HIST_TXT_PATH, HIST_IMG_PATH
from variables import HIST_IMG_DICT_SIZE, HIST_IMG_LAYER_NUM
# ------... | {"hexsha": "eb1136d8ff6196586fea19c4307b0afca5ac4eaf", "size": 2950, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/util_hist.py", "max_stars_repo_name": "WuYff/CTRAS", "max_stars_repo_head_hexsha": "22941f20f5ddc00849c7ea08cd8395defcaf3344", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
#!/usr/bin/env python3
# encoding: utf-8
import numpy as np
class Sum_Tree:
def __init__(self, capacity):
"""
capacity = 5,设置经验池大小
tree = [0,1,2,3,4,5,6,7,8,9,10,11,12] 8-12存放叶子结点p值,1-7存放父节点、根节点p值的和,0存放树节点的数量
data = [0,1,2,3,4] 0-4存放数据
Tree structure and array storage:
... | {"hexsha": "0b713e67cf251c4bbea36dbd4c8298b04131d433", "size": 4036, "ext": "py", "lang": "Python", "max_stars_repo_path": "rls/memories/sum_tree.py", "max_stars_repo_name": "StepNeverStop/RLs", "max_stars_repo_head_hexsha": "25cc97c96cbb19fe859c9387b7547cbada2c89f2", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
from baremetal import *
def decimate(clk, i, q, stb, ratio):
_, last = counter(clk, 0, ratio-1, 1, en=stb)
i = i.subtype.register(clk, d=i, init=0, en=stb&last)
q = q.subtype.register(clk, d=q, init=0, en=stb&last)
stb = stb.subtype.register(clk, d=stb&last, init=0)
return i, q, stb
import sys
im... | {"hexsha": "e14f054b2e3e92c794c125e72251cf68ca1df7eb", "size": 1570, "ext": "py", "lang": "Python", "max_stars_repo_path": "firmware/decimate.py", "max_stars_repo_name": "mfkiwl/OpenXcvr", "max_stars_repo_head_hexsha": "9bea6efd03cd246f16982f0fadafed684ac5ce1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14... |
import numpy as np
# ---------------------------------------
# General helper methods such as easily generate a vector or identity matrix
# Get dimension of vector or matrix (assuming matrix is square)
def np_dim(np_obj):
return np_obj.shape[0]
# Easy syntax for generating 2D or 3D vectors
def vect(x=0, y=0, z... | {"hexsha": "7e6414686c6b6a05ba41cd65cf2ca2933615e44a", "size": 6766, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyautonifty/numpy_helper_fns.py", "max_stars_repo_name": "Markichu/PythonAutoNifty", "max_stars_repo_head_hexsha": "ab646601058297b6bfe14332f17b836ee3dfbe69", "max_stars_repo_licenses": ["MIT"], "... |
This branch of the UC Davis Bookstore has lots of medical books, and also carries medical supplies including stethoscopes, diagnostic sets, medical bags, anatomical models, and medical posters. They also carry scrubs in many different styles, so Im seeing lots of lastminute costumes Halloween potential. Theres also... | {"hexsha": "9f9dc60c9480eb581e06f7656ecdffffcd2a69c9", "size": 464, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/UC_Davis_Medical_Center_Bookstore.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT... |
#include <boost/process/system.hpp>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
// std::cout << "输出示例" << std::endl;
// std::cin >> v1;
std::cout << std::system("gcc --version") << std::endl;
return 0;
}
| {"hexsha": "63507654a09ee4b2a96ee297a453c4ba9b38b4a5", "size": 266, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/gcc_version.cpp", "max_stars_repo_name": "hhaoao/QuickOpenProject", "max_stars_repo_head_hexsha": "e0f2512903dc1c2fe2f743db1f9d3ef078063068", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
This code can be used to generate simulations similar to Figs. 2, 3 and 4 in the following paper:
Vincenzo Matta, Virginia Bordignon, Augusto Santos, Ali H. Sayed, "Interplay Between Topology and Social Learning Over Weak Graphs", IEEE Open Journal of Signal Processing, 2020.
Please note that the code is not gener... | {"hexsha": "894b3b083c7a96d127139f52770e999d9d789f09", "size": 7437, "ext": "py", "lang": "Python", "max_stars_repo_path": "codefig234.py", "max_stars_repo_name": "asl-epfl/interplay_topology_OJSP", "max_stars_repo_head_hexsha": "a1668752766a1c699123c440c4bc8c7b74b5ea7e", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_... |
from flask import current_app
import numpy as np
import json
import re
import pandas as pd
from pliers.utils import resample
from .utils import hash_data
from ..utils.core import listify
class Serializer(object):
def __init__(self, schema, add_all):
""" Serialize and annotate results using a schema.
... | {"hexsha": "fa32ff00aada97cc502bfe00802058848b797af1", "size": 9818, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuroscout/populate/annotate.py", "max_stars_repo_name": "neuroscout/neuroscout", "max_stars_repo_head_hexsha": "b9154fcf681a763f66c451d81819805988b8de9c", "max_stars_repo_licenses": ["BSD-3-Claus... |
# ---
# title: 387. First Unique Character in a String
# id: problem387
# author: Tian Jun
# date: 2020-10-31
# difficulty: Easy
# categories: Hash Table, String
# link: <https://leetcode.com/problems/first-unique-character-in-a-string/description/>
# hidden: true
# ---
#
# Given a string, find the first non-repeating... | {"hexsha": "6a6611de320b78ab1cbb4ecb1c73f4d104709d53", "size": 688, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/387.first-unique-character-in-a-string.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_lice... |
import functools
import heapq
import logging
import time
import tqdm
import numpy as np
import scipy
import scipy.sparse
import alsi.cuda
from . import _als
from .recommender_base import MatrixFactorizationBase
from .utils import check_blas_config, nonzeros
log = logging.getLogger("alsi")
class AlternatingLeastSqu... | {"hexsha": "fb1150ac3ea9272a5d0cac8d6755720be097a68c", "size": 9557, "ext": "py", "lang": "Python", "max_stars_repo_path": "alsi/als.py", "max_stars_repo_name": "mragungsetiaji/alsi", "max_stars_repo_head_hexsha": "c33f0e1ca1ee148ff3c95474dd4c36166ece583a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max... |
import numpy as np
h = 60
w = 60
p = .3
land = np.random.choice(a=[False, True], size=(h, w), p=[1-p, p])
prev = None
def update(land):
res = land.copy()
for i in range(h):
for j in range(w):
cell = land[i,j]
n = np.sum(land[max(i-1,0):min(i+2,h),max(j-1,0):min(j+2,w)])
... | {"hexsha": "ba23604795f8acde70a121e9f64775847c2840a2", "size": 582, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "spencerteiknsmith/invisible-conway", "max_stars_repo_head_hexsha": "9b6b9cbfff2225b3262ef8ef4c27e7f63731ebcf", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utility to test running with different values for ``SAGE_BOOTSTRAP``
"""
# ****************************************************************************
# Copyright (C) 2015 Volker Braun <vbraun.name@gmail.com>
#
# This program is free software: you can redistribu... | {"hexsha": "13c9c028994991b26e84c142ebb35938e5cf4539", "size": 2500, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/test/runnable.py", "max_stars_repo_name": "Blues1998/sage", "max_stars_repo_head_hexsha": "b5c9cf037cbce672101725f269470135b9b2c5c4", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count... |
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | {"hexsha": "3e740ca7638cc0fd59d6eed48783ef26d95b57d6", "size": 16109, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gluonts/nursery/redsds/datasets.py", "max_stars_repo_name": "abdulfatir/gluon-ts", "max_stars_repo_head_hexsha": "b902d6033a6f7c2a40a30f79961a5d1d0e010e56", "max_stars_repo_licenses": ["Apach... |
"""
===============================
Extrema
===============================
We detect local maxima in a galaxy image. The image is corrupted by noise,
generating many local maxima. To keep only those maxima with sufficient
local contrast, we use h-maxima.
"""
import numpy as np
import matplotlib.pyplot as plt
from s... | {"hexsha": "ac757dba18190731b64074353d559b757e5bd5e4", "size": 2593, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/examples/segmentation/plot_extrema.py", "max_stars_repo_name": "portugueslab/scikit-image", "max_stars_repo_head_hexsha": "0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b", "max_stars_repo_licenses":... |
import os
import smtplib
import time
from datetime import datetime
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import RPi.GPIO as gpio
import cv2
import numpy as np
import serial
smtpUser = 'enter your email'
smtpPass = 'enter your passwor... | {"hexsha": "caa25f3aa7ef59559ed209410ea9db8772fdb256", "size": 9957, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/obj_retr.py", "max_stars_repo_name": "rpande1996/Object_Retrieval", "max_stars_repo_head_hexsha": "d3cafd0d970b59dc335256f7c8ba47651bee38f7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
This file shows example of CTLE model
"""
import serdespy as sdp
import numpy as np
import matplotlib.pyplot as plt
import skrf as rf
import scipy as sp
f = np.load("./data/f.npy")
h = np.load("./data/h_thru.npy")
H = np.load("./data/TF_thru.npy")
samples_per_symbol = 64
#set poles and zeroes for peaking at nyqu... | {"hexsha": "1a00a9503b2368ea3347b40e5b2f9cdcbc0dd134", "size": 1823, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ctle.py", "max_stars_repo_name": "richard259/serdespy", "max_stars_repo_head_hexsha": "b009868cf46b024afbd9b85dd16e1d590798f883", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,... |
\documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
\usepackage{graphicx} % Use pdf, png,... | {"hexsha": "daebd028e488ab44acb50d9ab5c61946f5f663cd", "size": 5048, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "demos/array-shell-sort/TeX/shellsortprotocol.tex", "max_stars_repo_name": "lucyq/jiff", "max_stars_repo_head_hexsha": "25cd31829efe2f321f266cd186563f312f2e678a", "max_stars_repo_licenses": ["MIT"], ... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from scipy.special import fresnel
import gdspy
import picwriter.toolkit as tk
class EBend(tk.Component):
"""Euler shaped Bend Cell class. Creates a generic Euler waveguide bend that can ... | {"hexsha": "aa845e8a2161f28207ea3a069d61ca41225959a9", "size": 21746, "ext": "py", "lang": "Python", "max_stars_repo_path": "picwriter/components/ebend.py", "max_stars_repo_name": "DerekK88/picwriter", "max_stars_repo_head_hexsha": "d30548ea111593452f055074f8e62a0e6181146b", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# Copyright (c) ByteDance, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""
Mostly copy-paste from robustness library:
https://github.com/hendrycks/robustness/blob/master/ImageNet-C/test.py
"""
... | {"hexsha": "c59c5bceb4e20435058976b6d78cbffb51ec18a5", "size": 5494, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/corruptions_surf_variations/eval.py", "max_stars_repo_name": "taokong/ibot", "max_stars_repo_head_hexsha": "a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0", "max_stars_repo_licenses": ["Apache-... |
#include <boost/bind.hpp>
#include "socket.h"
#include "socket_timeval_option.h"
rs::httpserver::socket_ptr rs::httpserver::Socket::Create(server_ptr server, asio_socket_ptr asio_socket) {
auto socket = new Socket(server, asio_socket);
#if defined (__linux__)
socket->setDefaultReceiveTimeout();
#endif
... | {"hexsha": "1945cb2aa9db41245decf3143a9f58196555ddc1", "size": 3433, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/libhttpserver/socket.cpp", "max_stars_repo_name": "RipcordSoftware/libhttpserver", "max_stars_repo_head_hexsha": "87e8f67298763dacb1a4c13e3887532f688e5feb", "max_stars_repo_licenses": ["MIT"], "... |
# -*- coding: utf-8 -*-
"""
Created on Thu May 9 13:38:57 2019
@author: Guest Group
"""
from ._block import Block
from .. import Unit, Stream
import numpy as np
import pandas as pd
from chaospy import J
__all__ = ('State',)
# %% functions
def param_unit(param):
element = param.element
if isinstance(element... | {"hexsha": "38494bf253c887da9a84415dd48e74adbe1b6e12", "size": 8045, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/biosteam/evaluation/_state.py", "max_stars_repo_name": "rjhanes/biosteam", "max_stars_repo_head_hexsha": "ee345ac0b14ce4de9b38ac5a467588d2f854da71", "max_stars_repo_licenses": ["MIT"], "... |
real*8 function atof(token,slen)
use macfile, only:MAXLLEN
implicit none
character*(*) token
integer*4 slen,m
real*8 eval1
integer*4 LLEN
parameter(LLEN=MAXLLEN)
c
atof=0.d0
if (slen .gt. LLEN) then
call errmsg('atof',
& 'Data is too l... | {"hexsha": "8f7a816683ae7784e38b1842b573d3f1164d2d7a", "size": 670, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/atof.f", "max_stars_repo_name": "noboruatkek/SAD", "max_stars_repo_head_hexsha": "3881a190af8903537774c57b56963ffc94cfc039", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 11, ... |
import datetime
import os
import h5py
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pytorch
#data = pd.HDFStore('model2019_fullHead.h5','r')
#data.describe()
#print(data.__class__)
data= h5py.File('model2019_fullHead.h5','r')
def print_name(name):
print(name)
data.visit(print_name)
'... | {"hexsha": "52bf5ca62ed2e6c44dbb80cff4b53c9a8aa5c3d2", "size": 1522, "ext": "py", "lang": "Python", "max_stars_repo_path": "3dmodel/dataimport.py", "max_stars_repo_name": "Bolozano/PSC-face3d", "max_stars_repo_head_hexsha": "bb5c0d260c1ce1082e4262f223fb6b930ffeaa4e", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
"""
Description:
This script is run after `vep_cli.py`. It computes the sequence-class
level variant effect scores based on Sei chromatin profile predictions,
sorts the variants based on the maximum absolute scores across sequence classes
and outputs the results as TSV files.
Usage:
sequence_class.... | {"hexsha": "af65891d54e24b00cf9bb99d4b092965849356e6", "size": 6438, "ext": "py", "lang": "Python", "max_stars_repo_path": "sequence_class.py", "max_stars_repo_name": "FunctionLab/sei-framework", "max_stars_repo_head_hexsha": "6bb85803cb52985a86cb6437328813fd4d5ec0fe", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"],... |
\chapter*{Acknowledgement}
\label{ch:Acknowledgements}
\addcontentsline{toc}{chapter}{\nameref{ch:Acknowledgments}}
\vspace{10mm}
I would first like to thank my supervisors, \textbf{Professor Malhar Kulkarni} and \textbf{Professor Swapneel Mahajan}, whose expertise was invaluable in formulating the research questions ... | {"hexsha": "1b1528771610fe09e749596a0c3cba9329f54f3e", "size": 1169, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Acknowledgement.tex", "max_stars_repo_name": "manmohansingh192/Thesis_anupriya", "max_stars_repo_head_hexsha": "6ba84393c540b1d6c12f8ddbf3b62ec5ca10f325", "max_stars_repo_licenses": ["MIT"], "max_st... |
\setcounter{tocdepth}{3}
\tableofcontents
\chapter{First}
\label{s:1}
\hyperref[s:2]{2}
\chapter{Second}
\label{s:2}
\hyperref[s:1]{1}
| {"hexsha": "f8af4cc0acee73bf3cfd1a0f6e6365b0f93dc803", "size": 137, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "testdata/data/custom-ids.tex", "max_stars_repo_name": "anaseto/gofrundis", "max_stars_repo_head_hexsha": "9cfb1c0af6c242c3cd4b802debd0f0b4c80eb4f7", "max_stars_repo_licenses": ["0BSD"], "max_stars_co... |
#########################################################
###################### Data Loader ######################
#########################################################
# Class Downloader depends on NumpyToPyTorch_DataLoader!
# Downloader has two main methods: train_loader and test
# loader. So far only MNIST... | {"hexsha": "2ee17492dabe2262448b284f8966115d0b6bd8a9", "size": 6462, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loader.py", "max_stars_repo_name": "Shmoo137/Hessian-Based-Toolbox", "max_stars_repo_head_hexsha": "e8444f6f942d78d7934bf4ffc3dfba3bcd89d7f2", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# Copyright (c) 2021.
# This code has been produced by Zoran D. Grujic and by the knowledge found on The Internet.
# Please feel free to ask me for permission to use my code in your own projects. It is for your own well fare!
# pyinstaller --onefile -w app.pyw
# ---------------------------------------------
# to f... | {"hexsha": "250a65caf16521c2a4df2855c4a71e3a1446bf3c", "size": 22362, "ext": "pyw", "lang": "Python", "max_stars_repo_path": "app.pyw", "max_stars_repo_name": "zoran-grujic/FAP-TiePie", "max_stars_repo_head_hexsha": "1c0d285b9fe68995c57dece3d9cb59faafd77fc4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
import numpy as np
import math, csv
import matplotlib.pyplot as plt
DISTANCE = 10
ANGLE = np.pi / 4
AXIS_ROT_ANGLE = -np.pi / 2
AXIS_TRANS = np.array([10, 0])
MEAN_SENSOR = np.array([DISTANCE, ANGLE])
COVARIANCE_SENSOR = np.array([[0.75 * 0.75, 0], [0, (np.pi / 90) * (np.pi / 90)]])
if __name__ == "__main__":
s... | {"hexsha": "7d5682a745e3bd72e2809dccb0514d3a63aa9ca1", "size": 4654, "ext": "py", "lang": "Python", "max_stars_repo_path": "problem_6_ros_node_challenge/data_generator.py", "max_stars_repo_name": "alexandru-dinu/ai-mas-challenges", "max_stars_repo_head_hexsha": "49b2316178f3cab7b3fc36c2a12cc1abecdacf79", "max_stars_rep... |
import os
import sys
import cv2
import numpy as np
import math
import time
import pyMTF2
from utilities import drawRegion
from matplotlib import pyplot as plt
if __name__ == '__main__':
# script parameters
show_tracking_output = 1
# MTF parameters
config_dir = '../../Config'
db_root_path = '../../... | {"hexsha": "216a3695c2363d09630bb2e494d086a5a4686734", "size": 4397, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/python/runMTF2.py", "max_stars_repo_name": "abhineet123/MTF", "max_stars_repo_head_hexsha": "6cb45c88d924fb2659696c3375bd25c683802621", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Performance benchmark on molecular graphs generated from small organic
molecules."""
import sys
import re
import numpy as np
import pycuda
from ase.build import molecule
from graphdot.graph import Graph
from graphdot.kernel.molecular import Tang2019MolecularKernel as Ker... | {"hexsha": "c25d3d3226a210ed88000a9e4a288b67cbbd59a0", "size": 1820, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/perfbench/molecule-cookie-cutter.py", "max_stars_repo_name": "yhtang/GraphDot", "max_stars_repo_head_hexsha": "3d5ed4fbb2f6912052baa42780b436da76979691", "max_stars_repo_licenses": ["BSD-3... |
\section{Storage}
This Add-on contains various primitives which offer access to the BeOS file-system. The BeOS file-system features file attribute handling, mime type and directory browsing.
\subsection*{attr.del} \index{\verb+attr.del+}
{\tt attr.del} {\it file\_path attribute\_name}
\newline\newline
Delete the at... | {"hexsha": "4c4a81ac7d7392aca7db54dc2ba743fdeec2de39", "size": 12691, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documentation/Documents/Manuals/Guide/storage.tex", "max_stars_repo_name": "clasqm/Squirrel99", "max_stars_repo_head_hexsha": "09fb4cf9c26433b5bc1915dee1b31178222d9e81", "max_stars_repo_licenses": ... |
import numpy as np
import scipy.interpolate
# inputs: np array specifying joint state, final value function, column vector with each entry being the linspace specifying the given dimension
# list specifying max and min controls
# output: optimal controls
def getAction(state, value, grid_space, controls):
spat_der... | {"hexsha": "1b5770a528e413295c61f1ee7e8420217e69cdb7", "size": 2180, "ext": "py", "lang": "Python", "max_stars_repo_path": "SC1_valueProcessing.py", "max_stars_repo_name": "SafeRoboticsLab/optimized_dp", "max_stars_repo_head_hexsha": "8a3311d9b4d8be27767701046388bb3897242761", "max_stars_repo_licenses": ["MIT"], "max_s... |
[STATEMENT]
lemma times_in_float_intervalI: "a * b \<in>\<^sub>r A * B" if "a \<in>\<^sub>r A" "b \<in>\<^sub>r B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a * b \<in>\<^sub>r A * B
[PROOF STEP]
using times_in_intervalI[OF that]
[PROOF STATE]
proof (prove)
using this:
a * b \<in>\<^sub>i real_interval A * real... | {"llama_tokens": 186, "file": null, "length": 2} |
from torchvision.transforms.functional import pad
from torchvision import transforms
import numpy as np
import numbers
def get_padding(image):
w, h = image.size
max_wh = np.max([w, h])
h_padding = (max_wh - w) / 2
v_padding = (max_wh - h) / 2
l_pad = h_padding if h_padding % 1 == 0 else h_paddi... | {"hexsha": "4c85c75fa5cf0b5eedcde924feb8b0974d3bc1e7", "size": 1322, "ext": "py", "lang": "Python", "max_stars_repo_path": "clip/newpad.py", "max_stars_repo_name": "graceduansu/CLIP", "max_stars_repo_head_hexsha": "14605e2118f43312cc00bf549aec388f5ddf802b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | {"hexsha": "a2d8c88e306c9c1c57e6daac6cd878f3da4819c8", "size": 11274, "ext": "py", "lang": "Python", "max_stars_repo_path": "mars/dataframe/indexing/where.py", "max_stars_repo_name": "haijohn/mars", "max_stars_repo_head_hexsha": "672b3a33a70565f01b1a3f508908445491d85acf", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
"""
Author: Vincent Brubaker-Gianakos
"""
import numpy as np
import kdtree
def get_normalized_pixel_data(image, channel_bit_depth):
return np.array(image.getdata()) / ((2 ** channel_bit_depth) - 1)
def progressive_peak_find(h, distinctness=1.0):
array = sorted(np.ndenumerate(h), key=lambda a: a[1], reverse... | {"hexsha": "08e23a71a3937bcfeaf10e17233707e1eb371121", "size": 1531, "ext": "py", "lang": "Python", "max_stars_repo_path": "ekstrakto/helpers.py", "max_stars_repo_name": "alfa-bravo/ekstrakto", "max_stars_repo_head_hexsha": "de2dc38815f9e8657b401fc71b9c54fa16b849c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\section{Finite-state machines}
| {"hexsha": "634e1d12910927fc04d13a41e7334b8e479a6c2d", "size": 34, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/computer/arithmetic/01-00-Finite-state_machines.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_st... |
import numpy as np
from pokerl import Game, eval_hand
from pokerl.envs import PokerGameEnv
from pokerl.agents import RandomAgent
from pokerl.enums import PokerMoves, HandRanking
# Set numpy print options
np.set_printoptions(precision=3, suppress=True, linewidth=np.inf)
# Define the softmax function
def softmax(x: np.... | {"hexsha": "3da3f53d2ebe1ef6835c66cab68c7484735c5cc4", "size": 2813, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/q_learning.py", "max_stars_repo_name": "sneppy/pokerl", "max_stars_repo_head_hexsha": "2ea8cd6c3dad7531ac5cad79aa0dc8879f771e2c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6,... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from models.embedding import BertLSTMCNNForTripletNet
from transformers import BertTokenizer
import torch, json
import numpy as np
print('Loading model...')
res = np.loadtxt('output/embedding.txt')
print(1)
BERT_MODEL_PATH = "output/ckpts"
BERT_VOCAB_PATH = "output/ckpt... | {"hexsha": "b1c72efcfc8d4eb6f4dfaa30322fb515ca5246d4", "size": 2026, "ext": "py", "lang": "Python", "max_stars_repo_path": "get_top.py", "max_stars_repo_name": "zitaozz/CASCMR", "max_stars_repo_head_hexsha": "25d6b248136ac32b6969e76f1fbdf3695e8ec207", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st... |
import os.path
import numpy as np
import torch
import torch.nn as nn
from torch.optim import Optimizer
from torch.autograd import Variable
import torch.autograd as autograd
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
"""
This module implements Wasserstein Generative Adversarial Net... | {"hexsha": "5e1bfb2a23c31a3d0a1675c1c5618e4317b6c0c8", "size": 12869, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_research/augmentation/GAN/WGAN.py", "max_stars_repo_name": "ESA-PhiLab/hypernet", "max_stars_repo_head_hexsha": "b33f7893d3dfcbbc2c10076fb61b2b1f1316402a", "max_stars_repo_licenses": ["MIT... |
from unittest import TestCase
from simplex.simplex import simplex
import numpy as np
class TestSimplex(TestCase):
def test_simplex_1(self):
(z, x) = simplex('min', np.array([[3, 1], [4, 3], [1, 2]]), np.array([[3], [6], [4]]), np.array([[4], [1]]),
np.array([[0], [-1], [1]]), 100... | {"hexsha": "c4ae5ce4fe9049baf233f36245662ace8352454a", "size": 1698, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_simplex.py", "max_stars_repo_name": "david-toro/SimplexMethod", "max_stars_repo_head_hexsha": "3b16284a2afe28e3e13e106fc0c9e176487eb781", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma... |
The University Honors Program includes the Davis Honors Challenge (DHC) and the Integrated Studies Honors Program (ISHP): two paths to challenge, motivate, and nurture highachieving students within all majors.
The mission of UHP:
To provide excellent teaching for selected freshmen in small, personalized learning c... | {"hexsha": "705e11a65a8b98c498fae17a6fec5ca44100264e", "size": 1715, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/University_Honors_Program.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "ma... |
#include <iostream>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/positional_options.hpp>
#include <cli.h>
#include <constants.h>
namespace C = constants;
namespace po = boost::p... | {"hexsha": "b49286429d85a67a8f508f4f3c5f7292c53f4459", "size": 1631, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/cli.cc", "max_stars_repo_name": "bbugyi200/alarm", "max_stars_repo_head_hexsha": "bb86aad382159d13a27406ac0c56ef1f7be2a4d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star... |
"""
Module containing the main gtfs_tripify method, logify, which takes an update stream as input
and returns a logbook as output. Processing is done in two steps. First, the update stream is
broken up by a unique_trip_id, which is inferred from the trip_id field and contextual information
about trips with the same ro... | {"hexsha": "22adf16b0700db1de20555ba40347d82302bdfef", "size": 26782, "ext": "py", "lang": "Python", "max_stars_repo_path": "gtfs_tripify/tripify.py", "max_stars_repo_name": "ResidentMario/gtfs-tripify", "max_stars_repo_head_hexsha": "6f0d5965aab9442a0095133ab6d3cfebdb9dd398", "max_stars_repo_licenses": ["MIT"], "max_s... |
//
// Created by Ed Asriyan on 30/09/2017.
//
#include "Server.hpp"
#include <boost/asio/yield.hpp>
server::Server::Server(
boost::asio::io_service& io_service,
unsigned short port,
boost::function<void(const Request&, Response&)> request_handler
) : request_handler(request_handler) {
acceptor.reset(new tcp::acce... | {"hexsha": "748b95d5b630850a9430fe6e293348892ad22e52", "size": 2365, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "server/Server.cpp", "max_stars_repo_name": "ed-asriyan/static-server", "max_stars_repo_head_hexsha": "49e2ca39e18cfb952825914853a88ca21605f29a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import models
import collections
from distutils.util import strtobool;
import numpy as np
from .sa_net_arch_utilities_pytorch import CNNArchUtilsPyTorch;
class UnetVggMultihead(nn.Module):
def __init__(self, load_weights=False,... | {"hexsha": "8c48acfe3b240e54187ef56c0756ffa89aa851b8", "size": 15700, "ext": "py", "lang": "Python", "max_stars_repo_path": "src_prediction/prediction/mcspatnet_src/model_arch.py", "max_stars_repo_name": "kaczmarj/quip_mcspatnet_prediction", "max_stars_repo_head_hexsha": "2b961bd6eab90474d7541be08af99a9bee6655d7", "max... |
#include "inference.h"
#include "debug.h"
#include <algorithm>
#include <tuple>
#include <boost/graph/lookup_edge.hpp>
////////////////////////////////////////////////////////////////////////////////
// VertexInfo
////////////////////////////////////////////////////////////////////////////////
VertexInfo::VertexInfo(... | {"hexsha": "053992d59d891eb6730797c53a561c536b841c8f", "size": 23932, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/cpp/inference.cpp", "max_stars_repo_name": "parsimony-ide/parsimony-frontend", "max_stars_repo_head_hexsha": "dff5db60429b984ed93c7338a179b0b98a7c12a3", "max_stars_repo_licenses": ["BSD-3-Claus... |
import attune
import numpy as np
import pytest
@pytest.mark.xfail
def test_set_new():
d = attune.Dependent(np.linspace(0, 10, 21), "d1")
s = attune.Setpoints(np.linspace(120, 240, 21), "s1")
c = attune.Curve(s, d, "c")
d = attune.Dependent(np.linspace(10, 100, 21), "d2")
c["d3"] = d
assert "... | {"hexsha": "8a93e8f80d3c12b4ae6222b1af90721a421ab47a", "size": 1286, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/Curve/setitem.py", "max_stars_repo_name": "wright-group/WrightTune", "max_stars_repo_head_hexsha": "e9a4937b6fda24dfd10baf2fc674c15542861aba", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import os
import sys
import matplotlib.pyplot as plt
import h5py
import matplotlib as mpl
import numpy as np
from datetime import datetime
plt.close('all')
mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams['font.size'] = 12
mpl.rcParams['axes.linewidth'] = 1
mpl.rcParams['xtick.major.width'] = 1
mpl.rcParams['xtick.minor... | {"hexsha": "0e0b63225ac310d9e679ad8fa76add6a1be11806", "size": 2516, "ext": "py", "lang": "Python", "max_stars_repo_path": "freqent/tests/brussfield/plots/make_exampleTraj.py", "max_stars_repo_name": "lab-of-living-matter/freqent", "max_stars_repo_head_hexsha": "210d8f25a59894d903c42d52e5475900303f9631", "max_stars_rep... |
module GwtGwtConnectionModule
use KindModule, only: I4B, DP, LGP
use ConstantsModule, only: LINELENGTH, LENCOMPONENTNAME, DZERO, LENBUDTXT
use CsrUtilsModule, only: getCSRIndex
use SimModule, only: ustop
use MemoryManagerModule, only: mem_allocate, mem_deallocate
use SpatialModelConnectionModule
use Nu... | {"hexsha": "fb9cef323141a026e0ef59200224ab5e452a2f17", "size": 22447, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Model/Connection/GwtGwtConnection.f90", "max_stars_repo_name": "kzeiler/modflow6", "max_stars_repo_head_hexsha": "a185d95b91985e965f8a04ae353305dff19b9637", "max_stars_repo_licenses": ["CC0... |
[STATEMENT]
lemma support_flow_Sup: "support_flow (Sup Y) = (\<Union>f\<in>Y. support_flow f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. support_flow (\<Squnion> Y) = \<Union> (support_flow ` Y)
[PROOF STEP]
by(auto simp add: support_flow_conv less_SUP_iff) | {"llama_tokens": 110, "file": "MFMC_Countable_MFMC_Network", "length": 1} |
"""
© University of Southampton, IT Innovation Centre, 2020
Copyright in this software belongs to University of Southampt
University Road, Southampton, SO17 1BJ, UK.
This software may not be used, sold, licensed, transferred, copied
or reproduced in whole or in part in any manner or form or in or
on any media by any ... | {"hexsha": "cc67f85424d1c437598eb890d2306610dbfa5ed5", "size": 3905, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots.py", "max_stars_repo_name": "FChmiel/fertility-predict", "max_stars_repo_head_hexsha": "b20210f43937b749c830561839d280c81bef6039", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
from ray.rllib.agents.ppo import PPOTrainer
import numpy as np
trainer = PPOTrainer(env="CartPole-v0", config={"framework": "tf2", "num_workers": 0})
policy = trainer.get_policy()
w = policy.get_weights()
logits, _ = policy.model.from_batch({"obs": np.array([[0.1, 0.2, 0.3, 0.4]])})
# print(w)
s = policy.model.base_... | {"hexsha": "8c40eb5ba924d62fca885b3aaf9b71ff180c113e", "size": 345, "ext": "py", "lang": "Python", "max_stars_repo_path": "rllib/examples/quarkzou/query_action_dist.py", "max_stars_repo_name": "quarkzou/ray", "max_stars_repo_head_hexsha": "49de29969df0c55a5969b8ffbfc7d62459e5024b", "max_stars_repo_licenses": ["Apache-2... |
import shutil
import numpy as np
import sys
import tensorflow as tf
from tensorflow.contrib.learn.python.learn.datasets.base import load_csv_without_header
from encsel.dataset import DataSplit, drop, fetch
hidden_dim = 1000;
hidden_dim2 = 500;
hidden_dim3 = 100;
groups = [[0], [1, 2, 3, 4], [5, 6, 7, 8], [9], [10, ... | {"hexsha": "b797ece9b414667d0ed7ee11aab84547551e59c0", "size": 5621, "ext": "py", "lang": "Python", "max_stars_repo_path": "encoding_selection/src/main/python/encsel/train_deep.py", "max_stars_repo_name": "githubsigmod2021/CodecDB", "max_stars_repo_head_hexsha": "b3f139c20067fbaec1aa9fcd90edbe6afccf0214", "max_stars_re... |
/-
Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module topology.hom.open
! leanprover-community/mathlib commit 98e83c3d541c77cdb7da20d79611a780ff8e7d90
! Please do not edit these... | {"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/Topology/Hom/Open.lean"} |
from PIL import Image
import os
import cv2 as cv
import matplotlib.pyplot as plt
from pylab import plot
import numpy as np
import json
import math
import glob
from functions import euclidean_dist, generate_cycle_mask, average_del_min
cycle = False
Root = '/media/D/GJY/ht/ProcessedData/JHU'
dst_Root = '/media/D/GJY/h... | {"hexsha": "4c3bbe58710ef645d95c9b6de5a4958b86327f2a", "size": 13636, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/dataset_prepare/prepare_JHU.py", "max_stars_repo_name": "Linfeng-Lee/IIM", "max_stars_repo_head_hexsha": "c63bf8b023ccc6750e178112662972f721dcabe1", "max_stars_repo_licenses": ["MIT"], "... |
function Base.:+(x::T, y::S) where {T<:InfExtendedTime, S<:Period}
isinf(x) ? x : T(x.finitevalue + y)
end
Base.:+(x::S, y::T) where {T<:InfExtendedTime, S<:Period} = y + x
Base.:-(x::T, y::S) where {T<:InfExtendedTime, S<:Period} = x + -y
Base.:-(x::S, y::T) where {T<:InfExtendedTime, S<:Period} = isposinf(y) ? ne... | {"hexsha": "13387567030b15faf279707ff7ba64a6adb68585", "size": 1272, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/infextendedtime/arithmetic.jl", "max_stars_repo_name": "cjdoris/Infinity.jl", "max_stars_repo_head_hexsha": "c73a7142ded9bd4bdff35b86fd3891216a47714e", "max_stars_repo_licenses": ["MIT"], "max_... |
! { dg-do run }
!
! PR fortran/51514
!
! Check that passing a CLASS to a TYPE works
!
! Based on a test case of Reinhold Bader.
!
module mod_subpr
implicit none
type :: foo
integer :: i = 2
end type
type, extends(foo) :: foo_1
real :: r(2)
end type
contains
subroutine subpr (x)
type(foo) ::... | {"hexsha": "61f371001beea1c8fb37be790ced9b33b216f9ed", "size": 1575, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/class_to_type_2.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo... |
import music21 as m21
m21.humdrum.spineParser.flavors['JRP'] = True
import pandas as pd
import numpy as np
import json
import argparse
from fractions import Fraction
import sys
# These paths must exist:
# ${mtcroot}/MTC-FS-INST-2.0/metadata
# ${mtcroot}/MTC-LC-1.0/metadata
# ${mtcroot}/MTC-ANN-2.0.1/metadata
# ${mtck... | {"hexsha": "383a379b40be2b4561ea187155c8b7ead671febd", "size": 21320, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mtc_to_seqs.py", "max_stars_repo_name": "fbkarsdorp/melodic-similarity", "max_stars_repo_head_hexsha": "c6cc199f0fb34b58cb419b4dac6ab730280b29eb", "max_stars_repo_licenses": ["CC-BY-4.0"], "m... |
import logging
import os
from itertools import chain
import numpy
import torch
import torch.nn as nn
import tqdm
from torch import optim
from tqdm import trange
from metrics import Metrics
from data_loader_wiki import EDLDataset_collate_func
from misc import running_mean, get_topk_ids_aggregated_from_seq_prediction, ... | {"hexsha": "40bd2362fcf07b044a9b9e4a93dbbf271180253c", "size": 15259, "ext": "py", "lang": "Python", "max_stars_repo_path": "bert_entity/model.py", "max_stars_repo_name": "TonyLorenz/entity_knowledge_in_bert", "max_stars_repo_head_hexsha": "921e689c2a117dabb9279dc39c4302804880cc5a", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Make a bar plot with rectangles
"""
import numpy as np
import matplotlib.pyplot as plt
WIDTH = 0.4 # the width of the bars
# Build datas ###############
x = np.arange(-5, 6)
y1 = np.power(x, 2)
y2 = np.power(x, 3)
# Plot data #################
fig = plt.fi... | {"hexsha": "9408153f3eba5f2f966a1c70ab4328d226275708", "size": 492, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/matplotlib/bar.py", "max_stars_repo_name": "jeremiedecock/snippets", "max_stars_repo_head_hexsha": "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import os
path = os.getcwd()
df = pd.read_csv(f"{path}\\data\\data_netflix.csv",sep=',')
# Instantiate Count Vectorizer
cv = CountVectorizer()
# Convert text of th... | {"hexsha": "3df5840fd361789d35cbfb6b21a885a32aa31056", "size": 654, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/save_data.py", "max_stars_repo_name": "GuilhermeToso/movie_recommender_system", "max_stars_repo_head_hexsha": "ca9f57b89354e6ad35ed5e24d8eb63fe6f6d7251", "max_stars_repo_licenses": ["MIT"], "m... |
import math
import os
import pickle
import cupy
import cupy as cp
import cupyx.scipy.ndimage
import numpy as np
import pandas as pd
import scipy
import scipy.ndimage as ndi
from _image_bench import ImageBench
class LabelBench(ImageBench):
def __init__(
self,
function_name,
shape,
... | {"hexsha": "9f6e531af7f891502bbb27dbf72f7968aa1b641f", "size": 5596, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/skimage/cupyx_scipy_ndimage_measurements_bench.py", "max_stars_repo_name": "aasthajh/cucim", "max_stars_repo_head_hexsha": "a95cc5c4ab25beffeac42d642dea8cb1bbf21408", "max_stars_repo_li... |
#!/usr/bin/python
import rospy
import actionlib
import numpy as np
import argparse
import rosservice
from std_msgs.msg import Float64MultiArray, MultiArrayDimension
from sensor_msgs.msg import JointState
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from control_msgs.msg import FollowJointTraj... | {"hexsha": "8271cbea5597ce6e305556868ab2634e6fb0296e", "size": 21024, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/custom_codes/scripts/command_vel_gazebo.py", "max_stars_repo_name": "lar-deeufba/potential_fields", "max_stars_repo_head_hexsha": "19f7a0f73e503a00999fa9e175d8cc1d432bee99", "max_stars_repo_l... |
import unittest
import math
import importlib
import scipy
from scipy.optimize import minimize
def f1(x):
return 4*pow((x[0]-5),2) + pow((x[1]-6),2)
def f2(x):
return pow(x[0]*x[0]+x[1]-11, 2) + pow(x[0]+x[1]*x[1]-7,2)
def f3(x):
return (100*(x[1]-x[0]**2)**2 +
(1-x[0])**2 +
90*(x[3]-x[2]**2)... | {"hexsha": "9b57de0fa36b382cc3790b31153e041bd831053e", "size": 3613, "ext": "py", "lang": "Python", "max_stars_repo_path": "multidimensional_optimization/test.py", "max_stars_repo_name": "avdosev/optimization_methods", "max_stars_repo_head_hexsha": "fc65a983b6a925a6b2a3285ed87a277f03db2bba", "max_stars_repo_licenses": ... |
## Sliceplorer definition stuff
using Sobol
function func1d(f, pt, d)
function(x)
xx = copy(pt)
xx[d] = x
f(xx)
end
end
function func_samples(f, rng, pt, d) :: SliceplorerDimSample
f1d = func1d(f, pt, d)
samples = range(rng[1], stop=rng[2], length=51) # 50 samples for now
SliceplorerDimSample([... | {"hexsha": "4121c59b39b2e445060492c47c738b211e41400c", "size": 1894, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sliceplorer.jl", "max_stars_repo_name": "gabysbrain/MdSlicing.jl", "max_stars_repo_head_hexsha": "220b5c1595f28b4c991b210e1d5a93d19946013c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
import torch
import numpy as np
torch.set_printoptions(precision=6)
times = 6
def mean_relative_error(y_true, y_pred):
eps = 1e-5
relative_error = np.average(np.abs(y_true - y_pred) / (y_true + eps), axis=0)
return relative_error
| {"hexsha": "8dc09b499f852de0d809f8d09d953d2461dbf1aa", "size": 246, "ext": "py", "lang": "Python", "max_stars_repo_path": "ding/hpc_rl/tests/testbase.py", "max_stars_repo_name": "sailxjx/DI-engine", "max_stars_repo_head_hexsha": "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
MODULE ctrl_mod
IMPLICIT NONE
!problem parameters
INTEGER(kind=4) :: npoin, & !number of points in the mesh
& nelem, & !number of elements in the mesh
& ndime, & !number of dimensions
& nmdof, & !number of mechanical degrees of freedom
& nga... | {"hexsha": "75bc403f688ec23fb789b27646ff6c2404b3f7b7", "size": 681, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/ctrl_mod.f90", "max_stars_repo_name": "jdlaubrie/shell-elem", "max_stars_repo_head_hexsha": "f87cb9ca9179533d3a645a494e7ef4d39666ddc6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*-
"""synthetic_data_experiments.py -- Run validation experiments on synthetic data
In this version all experiments are run sequentially.
"""
DEBUG_MODE = False
TIME_EXP = False
DATA_GEN = True # have to gene dat or not ?
SEQ_MODE = True
NUM_VALUES=3 #range param
tmp_dir= "/tmp"
#tmp_dir = "/s... | {"hexsha": "3309736758344c26cffbf0802410e7b67e46a0ff", "size": 40399, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/synthetic_data_experiments.py", "max_stars_repo_name": "chagaz/sfan", "max_stars_repo_head_hexsha": "14f1b336caa80bc176ec9459019f309ccd92252d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# 读取文件(hdf5)
# 去除噪声
# 寻找峰值和零点,得到PETime
# 将最小的峰值处设为权重1,分别得到不同点的权重
import sys
import pandas as pd
import numpy as np
import h5py
import scipy
from scipy import signal
import matplotlib as mpl
mpl.use('Agg')
from matplotlib import pyplot as plt
# 读取文件和建立dataframe
with h5py.File(sys.argv[1],'r') as ipt:
wf = ipt['Wav... | {"hexsha": "31ac6f7c1799d584a3a24fb90b965ec0f48d250f", "size": 1639, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/wxh/pmt_former.py", "max_stars_repo_name": "xuyu92327/waveform-analysis", "max_stars_repo_head_hexsha": "8216cc8d7a75fc38d3fbc236d8b6b6cba963f78c", "max_stars_repo_licenses": ["MIT"], "max_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.