text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# from cityscapes import CityScapes, collate_fn2 # from tqdm import tqdm # from torch.utils.data import DataLoader # from configs.configurations import Config # # def get_overlaps(cur_cors, ori_cors): # # overlaps = [] # # up = max(ori_cors[0][0], ori_cors[1][0]) # # left = max(ori_cors[0][1], ori_cors[...
{"hexsha": "08ba2816e3d9838027c8aed2cc8b90677d872991", "size": 6997, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "zhizhangxian/DeepLab-v3-plus-cityscapes", "max_stars_repo_head_hexsha": "c61f5a80ee35b92abf37e73176ecc20068933fe2", "max_stars_repo_licenses": ["MIT"], "max_stars...
from os.path import join as pjoin import json import argparse from prepro import tokenizer,tokenizer_gen,tokenized_gen_pred,tokenizer_copy import torch def format_to_bert(args): datasets=args.dataset bert_tokenizer=tokenizer.BertData(args) for dataset in datasets: readfile=pjoin(args.raw_path,datase...
{"hexsha": "a73e375fea8e6ec4680892360fb15cefec85fe26", "size": 7550, "ext": "py", "lang": "Python", "max_stars_repo_path": "SEQA/preprocess.py", "max_stars_repo_name": "nju-websoft/SR3", "max_stars_repo_head_hexsha": "bb602926f8a260887326a812e19e23f50e7eb273", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
[STATEMENT] lemma complex_i_not_zero [simp]: "\<i> \<noteq> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<i> \<noteq> 0 [PROOF STEP] by (simp add: complex_eq_iff)
{"llama_tokens": 79, "file": null, "length": 1}
// Copyright (c) 2014, Lee // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, this // list of conditions and the...
{"hexsha": "184690859b91597adf2cba1094ee216c16da9d9f", "size": 2622, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "BoltD2D1Renderer/CD2D1Text.cpp", "max_stars_repo_name": "JoyLeeSoft/BoltEngine", "max_stars_repo_head_hexsha": "7ae488a2565df90088bf7db5523bbeed17924efa", "max_stars_repo_licenses": ["BSD-2-Clause"]...
import torch import torch.autograd as autograd import torch.nn as nn import torch.optim as optim import sys import os import subprocess from sklearn.metrics import accuracy_score import numpy as np import pdb torch.manual_seed(1) def to_scalar(var): # returns a python float return var.view(-1).data.tolist()[0] def ...
{"hexsha": "c636a43355f2be77d2846e904d5dd2f19be8a74c", "size": 12404, "ext": "py", "lang": "Python", "max_stars_repo_path": "CRFv2.py", "max_stars_repo_name": "codedecde/BiLSTM-CCM", "max_stars_repo_head_hexsha": "a89719e97dfe1221f018d60106b75393cddf5f7c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_...
# Copyright 2018/2019 The RLgraph authors. 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "e82c08cb6a536f1692f453c0718fbe551adf82f3", "size": 13692, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlgraph/execution/worker.py", "max_stars_repo_name": "RLGraph/RLGraph", "max_stars_repo_head_hexsha": "428fc136a9a075f29a397495b4226a491a287be2", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
function make_gui_widget(cur_binding::Expr) if cur_binding.head == :escape && length(cur_binding.args) == 1 cur_binding = cur_binding.args[1] end strip_escape!(cur_binding) @assert cur_binding.head == :(=) cur_symbol, cur_range = cur_binding.args Expr( :(=), esc(cur_symbol), Expr( :call...
{"hexsha": "a57f649cb5d1266fdf1c373f61e28d2dcb39bc38", "size": 414, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/interact/gui/make_gui_widget.jl", "max_stars_repo_name": "djsegal/SimplePlots.jl", "max_stars_repo_head_hexsha": "08c7ee1bdfc0814b25ef5be07f5cee11f833666c", "max_stars_repo_licenses": ["MIT"], "...
# from computations/differentiation.jl export differentiation, antidifferentiation, derivative_dict, antiderivative_dict """ The differentation function returns an operator that can be used to differentiate a function in the dictionary, with the result as an expansion in a second dictionary. The differen...
{"hexsha": "ab84af9d7b167d0ab37f102fd5cf8dd061ae37e6", "size": 6968, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/computations/differentiation.jl", "max_stars_repo_name": "JuliaApproximation/BasisFunctions.jl", "max_stars_repo_head_hexsha": "9f2ab9cae1394cbaede565db1036fbf0fbd1da9c", "max_stars_repo_licens...
""" AbstractIndices{I} <: AbstractDictionary{I, I} Abstract type for the unique keys of an `AbstractDictionary`. It is itself an `AbstractDictionary` for which `getindex` is idempotent, such that `indices[i] = i`. (This is a generalization of `Base.Slice`). At minimum, an `AbstractIndices{I}` must implement: * ...
{"hexsha": "742d22b98600cbc73562458b42c97c15e45c547f", "size": 9066, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AbstractIndices.jl", "max_stars_repo_name": "nickrobinson251/Dictionaries.jl", "max_stars_repo_head_hexsha": "e4d8e0297f3942dc06f5f57d3313dea23c0f6ff4", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import gym from gym.envs.registration import register #from gym import wrappers import sys, os, time sys.path.append(os.pardir) # parent directory import numpy as np import torch #import torch.nn as nn #import torch.optim as optim #im...
{"hexsha": "f82ba5af84673605ef8dc6acd56ae08260fc2ad2", "size": 4252, "ext": "py", "lang": "Python", "max_stars_repo_path": "CartPole_DQN01_pytorch041/test.py", "max_stars_repo_name": "sjk0709/Cartpole-DQN-pytorch041", "max_stars_repo_head_hexsha": "439e5be4bd7b44dd923c46f24e62b46b7dadfba4", "max_stars_repo_licenses": [...
import os import re import cv2 import h5py from bfly.logic import settings import numpy as np from bfly.logic import core class DataSource(object): def __init__(self, core, datapath): ''' ''' self._core = core self._datapath = datapath self._size_x = -1 self._size_y...
{"hexsha": "a728cf8665a60686c48409ccbce9ebe6e27b8764", "size": 4834, "ext": "py", "lang": "Python", "max_stars_repo_path": "bfly/input/datasource.py", "max_stars_repo_name": "barkhajava/butterfly", "max_stars_repo_head_hexsha": "2aa38ba3618975c5e2579cde7de36fb884f0859f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" Module containing different distance functions. """ import numpy as np from scipy import stats def linear_distance(data, synth_data): """ compute linear distance between autocorrelations. Parameters ----------- data : 1d array autocorrelation of real data. synth_data : 1d array ...
{"hexsha": "896b11c2b407471293f262e28c59f88385695cda", "size": 989, "ext": "py", "lang": "Python", "max_stars_repo_path": "abcTau/distance_functions.py", "max_stars_repo_name": "roxana-zeraati/abcTau", "max_stars_repo_head_hexsha": "ce4352062ee7821c80ac1c660641f41fef023e14", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import collections import functools import json import os import flowws from flowws import Argument as Arg import garnett import numpy as np GARNETT_READERS = dict( cif=garnett.reader.CifFileReader, dcd=garnett.reader.DCDFileReader, gsd=garnett.reader.GSDHoomdFileReader, pos=garnett.reader.PosFileRead...
{"hexsha": "38c639570690c0a2f1347278993f3922fdd8804b", "size": 3979, "ext": "py", "lang": "Python", "max_stars_repo_path": "flowws_analysis/Garnett.py", "max_stars_repo_name": "klarh/flowws-analysis", "max_stars_repo_head_hexsha": "becebc0ba58784479d53a47db37f611f0c096bfd", "max_stars_repo_licenses": ["MIT"], "max_star...
from __future__ import print_function user_input = raw_input import os import time import pydrake import numpy as np import random from pydrake.geometry import (ConnectDrakeVisualizer, SceneGraph, DispatchLoadMessage) from pydrake.lcm import DrakeLcm # Required else "ConnectDrakeVisualizer(): incompatible function a...
{"hexsha": "ff495d583db0791c9d51e487d981538c995bc8e3", "size": 21879, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/drake/run.py", "max_stars_repo_name": "suddhu/pddlstream", "max_stars_repo_head_hexsha": "0a027154a24ce06a1ca074f6f2053fde7fb0a190", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np def ellipticFunction(X,Y,Z): R = (X/1.0)**2 + (Y/0.5)**2 + (Z/0.25)**2 values = np.zeros(R.shape) values[R<1.0] = np.sqrt(1.0 - values[R<1.0]) return values def main(): x = np.linspace( -1.0, 1.0, 101 ) y = np.linspace( -1.0, 1.0, 150 ) z = np.linspace( -1.0, 1.0, 200 )...
{"hexsha": "60cb3c4e7645a021fd5de1196c60547576a4eba9", "size": 748, "ext": "py", "lang": "Python", "max_stars_repo_path": "generateTestFile.py", "max_stars_repo_name": "davidkleiven/Transform3DImage", "max_stars_repo_head_hexsha": "e40c57a3c8dbc95561c9f99aa817e8b0e8303bb1", "max_stars_repo_licenses": ["MIT"], "max_star...
import matplotlib.cm as cm import numpy import pylab import h5py, operator, copy, os #os.chdir('C:/Users/Gregoire/Documents/PythonCode/ternaryplot') from myternaryutility import TernaryPlot from myquaternaryutility import QuaternaryPlot def make4ternaxes(ellabels=['A', 'B', 'C', 'D'], fig=None): if fig is None: ...
{"hexsha": "caded76edaa0e753252f77c44e5bb65c7693cd84", "size": 4038, "ext": "py", "lang": "Python", "max_stars_repo_path": "quaternary_FOM_bintern.py", "max_stars_repo_name": "johnmgregoire/PythonCompositionPlots", "max_stars_repo_head_hexsha": "e105c575463b7d4512d9aac18c7330d1a0dc2c14", "max_stars_repo_licenses": ["BS...
#include <string> #include <CGAL/boost/graph/properties.h> #include <Eigen/SparseCore> #include <Euclid/Geometry/TriMeshGeometry.h> #include <Euclid/Util/Assert.h> #include <Spectra/MatOp/SparseSymMatProd.h> #include <Spectra/MatOp/SparseSymShiftSolve.h> #include <Spectra/MatOp/SymShiftInvert.h> #include <Spectra/SymE...
{"hexsha": "c390a8c0c48dac873a2b5c569365c8c8228dae9b", "size": 4766, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "include/Euclid/Geometry/src/Spectral.cpp", "max_stars_repo_name": "unclejimbo/euclid", "max_stars_repo_head_hexsha": "e118abdcdf51b6bc05cf5aa056bf228e052cf501", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- """AiiDA-Gaussian output parser""" from __future__ import absolute_import import os import io import tempfile import numpy as np from aiida.parsers import Parser from aiida.common import OutputParsingError, NotExistent from aiida.engine import ExitCode from aiida.orm import Dict, StructureData...
{"hexsha": "93df381dbc3e2aa9f54be9d7d36b1c8e5c3f938b", "size": 7907, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_gaussian/parsers/gaussian.py", "max_stars_repo_name": "eimrek/aiida-gaussian", "max_stars_repo_head_hexsha": "9fd5b934ee00eaf029f102acfe6b28a21c0c9f2f", "max_stars_repo_licenses": ["MIT"], "...
import matplotlib.pyplot as plt import numpy as np import pandas as pd def plot_absolute_abundances_1D( adata_sp, roi_subset=False, saving=False, celltype_subset=False, scaling=0.15, power=1, pws=[0, 0, 100, 500, 1000, 3000, 6000], dimName="VCDepth", xlab="Cortical Depth", colo...
{"hexsha": "18eda1e68014ef562ce5f5acf510f4800ed6de9d", "size": 8894, "ext": "py", "lang": "Python", "max_stars_repo_path": "cell2location/plt/plot_in_1D.py", "max_stars_repo_name": "jjhong922/cell2location", "max_stars_repo_head_hexsha": "2c2eb49aa3c0263fe8c6d45baf4ca0345baf21d9", "max_stars_repo_licenses": ["Apache-2....
"""Ephemcc software """ from astropy.io.votable import parse_single_table import os import wget class Ephemcc : """Ephemcc class, Miriade Ephemeris Generator http://vo.imcce.fr/webservices/miriade/?ephemcc """ filename = 'imcce_query.xml' key_space = '%20' url_base...
{"hexsha": "afa8cc6a6217611871833be3613da29f6efebaf3", "size": 3519, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/.ipynb_checkpoints/ephemccpy-checkpoint.py", "max_stars_repo_name": "dtouzan/ciboulette", "max_stars_repo_head_hexsha": "aaf31aed30af37f2e1e51addb0eb270ad252bb53", "max_stars_repo_licenses":...
using ASTInterpreter2 using ASTInterpreter2: enter_call_expr using Test function CallTest() UnitRange{Int64}(2,2) end step_through(enter_call_expr(:($(CallTest)()))) # Properly handle :meta annotations function MetaTest() @Base._pure_meta 0 end step_through(enter_call_expr(:($(MetaTest)()))) # Test Var...
{"hexsha": "99bde2d8b5f0afdc47e40106d1af296a299b3986", "size": 2130, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/interpret.jl", "max_stars_repo_name": "UnofficialJuliaMirror/ASTInterpreter2.jl-e6d88f4b-b52a-544c-a8d3-7a4f12cb39c3", "max_stars_repo_head_hexsha": "2e4bf7a7dd5663b8dffc0c6bc11762e0540d6942",...
from libs.effects.effect import Effect # pylint: disable=E0611, E0401 import numpy as np class EffectSpectrumAnalyzer(Effect): def run(self): effect_config = self._device.device_config["effects"]["effect_spectrum_analyzer"] led_count = self._device.device_config["LED_Count"] audio_data ...
{"hexsha": "cc2425b9c0b037bb8c2b5cdd4564dd6f5bfd62e9", "size": 1749, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/libs/effects/effect_spectrum_analyzer.py", "max_stars_repo_name": "weiserhei/music_led_strip_control", "max_stars_repo_head_hexsha": "33d6e9ca3c5cc699f1f700e6bf00727fa2f65f3c", "max_stars_r...
#!/usr/bin/env python from __future__ import print_function import skimage as skimage from skimage import transform, color, exposure, io from skimage.viewer import ImageViewer import random from random import choice import numpy as np from collections import deque import time import math import os import pandas as pd ...
{"hexsha": "03d386b894628d81afa2ec3f8a33baaf801ca108", "size": 21893, "ext": "py", "lang": "Python", "max_stars_repo_path": "c51_ddqn.py", "max_stars_repo_name": "hyyh619/ViZDoom-Imitation-Defend-Center", "max_stars_repo_head_hexsha": "952ab8f923ef8e13b9a7dd9a935effeb1af42267", "max_stars_repo_licenses": ["MIT"], "max_...
from __future__ import annotations import numpy as np import itertools from .metaarray import MetaArray from ...utils.axesop import * from ...utils.slicer import * from ...collections import DataList class HistoryArray(MetaArray): def __new__(cls, obj, name=None, axes=None, dirpath=None, history=N...
{"hexsha": "9cdff06545ef3d1c216a721a317ab845233d2f3c", "size": 6519, "ext": "py", "lang": "Python", "max_stars_repo_path": "impy/arrays/bases/historyarray.py", "max_stars_repo_name": "hanjinliu/impy", "max_stars_repo_head_hexsha": "d35b21be7739c3073ae87486673af68b1cdb2853", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import numpy as np import os os.environ['MKL_NUM_THREADS'] = '1' np.__config__.show()
{"hexsha": "fb55d3d3aebcd6a2c27c66d2b8a35e3342b2089a", "size": 89, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/test.py", "max_stars_repo_name": "EtiMag/projet3A", "max_stars_repo_head_hexsha": "8ec19d3518acd3a5ce3c099174da5e92872c808e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
from dataclasses import dataclass import numpy as np import h5py ''' to define the potential columns in the tables WAV, XYG, etc... ''' @dataclass(frozen=True) class H5Column(object): description: str dtype: type def flush(self): self=[] def reset(self,*args): if l...
{"hexsha": "fa008849d87c38f12a44f2ca22281a95d2ceca8b", "size": 2991, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylinear/h5table/columns.py", "max_stars_repo_name": "npirzkal/pyLINEAR", "max_stars_repo_head_hexsha": "00419dcbd91ea7b64386e6fe4f3164cd141333f2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
using Random using Distributions using MultiAgentPathFinding using MultiAgentAllocationTransit using BenchmarkTools using Statistics using JSON using Logging using JLD2 using NearestNeighbors using StaticArrays global_logger(SimpleLogger(stderr, Logging.Error)) rng = MersenneTwister(2345) # Script arguments relating ...
{"hexsha": "259341b4e6ba11232aae052d940e911211be3ad5", "size": 6891, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/benchmark_replanning.jl", "max_stars_repo_name": "sisl/MultiAgentAllocationTransit.jl", "max_stars_repo_head_hexsha": "bc98b79e52b5c7a7cbc4c176df259420a4966fed", "max_stars_repo_licenses": ...
using JuMP, EAGO m = Model() EAGO.register_eago_operators!(m) @variable(m, -1 <= x[i=1:5] <= 1) @variable(m, -3.1544947018849654 <= q <= 4.066926790342683) add_NL_constraint(m, :(swish(-0.7544717811096784 + -0....
{"hexsha": "335f6b87d9565b1c6a0a4bee0df27dc2a212d3cc", "size": 2253, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "solver_benchmarking/MINLPLib.jl/instances/ANN_Env/38_silu_5_3_2.jl", "max_stars_repo_name": "PSORLab/RSActivationFunctions", "max_stars_repo_head_hexsha": "0bf8b4500b21144c076ea958ce93dbdd19a53314"...
import numpy as np import tensorflow as tf import tensorflow.keras as keras from tensorflow.keras import layers from tensorflow.keras.optimizers import Adam import random class ReplayBuffer: def __init__(self, max_size, input_shape, n_actions): self.mem_size = max_size # The maximum size of the...
{"hexsha": "41f37ede81a75cc4615c95d2c142bf45c59d0f91", "size": 15069, "ext": "py", "lang": "Python", "max_stars_repo_path": "TD3_tf2.py", "max_stars_repo_name": "ansonwhc/RL-FX-trading", "max_stars_repo_head_hexsha": "1e27718bdb7d8b2fbbd449c066a844b5acf7d5be", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
module Rankings """ @ranking_str -> Dict Parse human description of the ranking into dictionary of alternatives' names as keys and their priorities in the ranking as values. # Examples ```jldoctest julia> print(ranking"a₃,a₂,a₁∼a₄") Dict("a₃"=>0,"a₁"=>-2,"a₄"=>-2,"a₂"=>-1) julia> print(ranking"B ...
{"hexsha": "115eb445051e16862ee9262c5d8d2159ef29fa4e", "size": 1148, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Rankings.jl", "max_stars_repo_name": "vaa-msu/Rankings.jl", "max_stars_repo_head_hexsha": "6043284d04b4e8e6e02ffaa071ba96766c70a9de", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma HMA_M_1[transfer_rule]: "HMA_M (1\<^sub>m (CARD('n))) (mat 1 :: 'a::{zero,one}^'n:: mod_type^'n:: mod_type)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Mod_Type_Connect.HMA_M (1\<^sub>m CARD('n)) (mat (1::'a)) [PROOF STEP] unfolding HMA_M_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. ...
{"llama_tokens": 228, "file": "Smith_Normal_Form_Mod_Type_Connect", "length": 2}
[STATEMENT] lemma subgroup_singular_relboundary: "subgroup (singular_relboundary_set p X S) (chain_group p X)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subgroup (singular_relboundary_set p X S) (chain_group p X) [PROOF STEP] unfolding chain_group_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. subgr...
{"llama_tokens": 2162, "file": null, "length": 12}
import numpy as np def steepest_descent_2d(func, gradx, grady, x0, MaxIter=10, learning_rate=0.25, verbose=True): paths = [x0] fval_paths = [func(x0[0], x0[1])] for i in range(MaxIter): grad = np.array([gradx(*x0), grady(*x0)]) x1 = x0 - learning_rate * grad fval = func(*x0) ...
{"hexsha": "970eb79058300b3df79c0ecdad47bc4cb68dd77c", "size": 1213, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/numerical_optimizers.py", "max_stars_repo_name": "DNRY/dlopt", "max_stars_repo_head_hexsha": "66a6e0b7e346bb6dedce6bb170f0005a477638d6", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Script reads LENS data for selected variables Notes ----- Author : Zachary Labe Date : 28 November 2016 Usage ----- lats,lons,var = readLENS(directory,varq) """ def readLENSEnsemble(directory,varq): """ Function reads LENS ensembles netCDF4 data array Parameters ----------...
{"hexsha": "0b603047ceafaa18b44853a76b48a83c0492efb8", "size": 3796, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/read_var_LENS.py", "max_stars_repo_name": "zmlabe/ThicknessSensitivity", "max_stars_repo_head_hexsha": "6defdd897a61d7d1a02f34a9f4ec92b2b17b3075", "max_stars_repo_licenses": ["MIT"], "max_...
function featS = PyradWrapper(scan3M, mask3M, voxelSizeV, paramFilePath) % This is a wrapper function to create a .nrrd file from CERR and call % pyradiomics. % Requires specifying path to Pyradiomics % % RKP, 03/22/2018 % AI, 06/10/2020 %Get path to pyradiomics wrapper CERRPath = getCERRPath; CERRPathSlashes = strfi...
{"author": "cerr", "repo": "CERR", "sha": "d320754abad9dcb78508ab69f33ae9f644202114", "save_path": "github-repos/MATLAB/cerr-CERR", "path": "github-repos/MATLAB/cerr-CERR/CERR-d320754abad9dcb78508ab69f33ae9f644202114/Unit_Testing/tests_for_cerr/PyradWrapper.m"}
using Test using SparseArrays using ForwardDiff @testset "GloVe" begin include("../src/GloVe.jl") test_corpus_path = "test_corpus.txt" test_cooc_path = "test_cooc.bin" embedding_path = "../embeddings/vectors-C0-V20-W8-D25-R0.05-E15-S1.bin" full_cooc_path = "../embeddings/cooc-C0-V20-W8.bin" @...
{"hexsha": "d485e9925aade404355ea8d1f1585d9f99698724", "size": 4490, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tests/GloVe.test.jl", "max_stars_repo_name": "mamta-borle/Respository_Mamta", "max_stars_repo_head_hexsha": "44372091d6a2ca0a88ba262eecbe8bcaccbc52d6", "max_stars_repo_licenses": ["MIT"], "max_star...
function [ons_secs, sqpar, verbose] = tapas_physio_crop_scanphysevents_to_acq_window(ons_secs, sqpar, verbose) % cropping of ons_secs into acquired scan/presentation session, augmenting % sqpar by scan-timing parameters from SCANPHYSLOG-file % % USAGE % function [ons_secs, sqpar] = ... % tapas_physio_crop_scanp...
{"author": "translationalneuromodeling", "repo": "tapas", "sha": "604c56843c15411f5bd80190f81d845ac57d8592", "save_path": "github-repos/MATLAB/translationalneuromodeling-tapas", "path": "github-repos/MATLAB/translationalneuromodeling-tapas/tapas-604c56843c15411f5bd80190f81d845ac57d8592/PhysIO/code/sync/tapas_physio_cro...
""" Copyright 2016 Deepgram 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 agreed to in writing, software distri...
{"hexsha": "070af47f92ab96159b38a7069d5c27d7212589f2", "size": 1753, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/language-model/view_outputs.py", "max_stars_repo_name": "greedyuser/kur", "max_stars_repo_head_hexsha": "ba6588ebfa5dec66d1e462c180618cc115fd38ef", "max_stars_repo_licenses": ["Apache-2.0...
module ReadWrite ( -- * Read readMolV2000 -- * Write , writeXYZ ) where import Prelude hiding (readFile) import Control.Lens import Control.Monad.State import Numeric.LinearAlgebra.Data import System.Directory import System.IO import System.IO.Unsafe import Text.Printf (hPrintf) import Types -- * R...
{"hexsha": "40fd3fe8a7eeda63892e6e792e2d38467fc13a21", "size": 2263, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "src/ReadWrite.hs", "max_stars_repo_name": "wurthel/distance-geometry", "max_stars_repo_head_hexsha": "b0b6146a1769781d750f99217168b6f4b06d2cb4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
""" Definition of an instrument to calculate differential conductance and reristance for 2 and 4 probe measurements using inputs of two lock-in amplifiers""" from qcodes.instrument.parameter import Parameter from qcodes.instrument.base import Instrument import numpy as np import warnings G_0 = 7.7480917310e-5 #conduc...
{"hexsha": "c59ebc2dbb57fdffa587f55722d79da5dc5023fc", "size": 3966, "ext": "py", "lang": "Python", "max_stars_repo_path": "mqml/instrument/conductresist.py", "max_stars_repo_name": "QCoDeS/MQML-scripts", "max_stars_repo_head_hexsha": "2905878042fb41489ddb7d3d7c024be0cf956124", "max_stars_repo_licenses": ["MIT"], "max_...
import pickle import json from math import log import numpy as np from sklearn.metrics.pairwise import cosine_similarity from numpy.linalg import norm from datasets import DATASET from json import JSONEncoder class TFIDFVectorizer(): def __init__(self, k=1.5, b=0.75): self.k = k self.b = b de...
{"hexsha": "963f785b88bf214212c3bc16008e59bd5eb88a57", "size": 8686, "ext": "py", "lang": "Python", "max_stars_repo_path": "buglocalizer/text_structure.py", "max_stars_repo_name": "datnvhust/extract_features", "max_stars_repo_head_hexsha": "7b4f6efaa4fdd23eda7c0bc13270fd735b89ac2c", "max_stars_repo_licenses": ["MIT"], ...
% vi:ft=tex \section{Final product} \paragraph{} The final working prototype was able to submit a job, execute jobs, list running jobs and show the result of the jobs successfully on a \glssymbol{pbs} cluster. This prototype can be built with the latest Spark (currently version \texttt{2.4.0}) and the latest Scala (c...
{"hexsha": "b03e205a6c6f3b5f3451783fee2feb435179bd05", "size": 2307, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/conclusions.tex", "max_stars_repo_name": "coditva/PracticeSchool2Report", "max_stars_repo_head_hexsha": "8243e4de906de6b194db45e233e41d5bdadf7977", "max_stars_repo_licenses": ["MIT"], "max_...
""" minimum_weight_perfect_matching(g, w::Dict{Edge,Real}) minimum_weight_perfect_matching(g, w::Dict{Edge,Real}, cutoff) Given a graph `g` and an edgemap `w` containing weights associated to edges, returns a matching with the mimimum total weight among the ones containing exactly `nv(g)/2` edges. Edges in `g...
{"hexsha": "da1e2d418e4cb38d7f48b9db089e3bb55f7e124e", "size": 2279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/blossomv.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/LightGraphsMatching.jl-160ba089-64bf-5ba7-9e14-98ab1d9bcb0a", "max_stars_repo_head_hexsha": "80f15d9bc165c65b0db138fff7eaafe...
# Takes csv input with columns and returns bimodal histogram analysis # Author - Greg Breuer - gregory.breuer@yale.edu # v0.11 - Fixed to auto-scale to mean value of 50 to make sure curve_fitting parameters are optimized appropriately import numpy as np from numpy import mean, size, zeros, where, transpose, lins...
{"hexsha": "cf769daaa0b608e438ae675e08064fc459f38f74", "size": 5995, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/histogram_analysis.py", "max_stars_repo_name": "gbreuer/pycycler", "max_stars_repo_head_hexsha": "d8ee2aa99ff0d2031e201b2b9e79e66dbf8773c2", "max_stars_repo_licenses": ["MIT"], "max_sta...
# SignalExtensions.jl module SignalExtensions using OffsetArrays import Base: eltype, getindex, setindex!, eachindex, collect, nzrange import Base: transpose, ctranspose, conj, reverse import Base: * # A collection of useful functions include("util.jl") # Definition of abstract Sequence type include("sequences.j...
{"hexsha": "bdec3d8b6f563059b0bcf6fc3b1f9a599ecac915", "size": 2080, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SignalExtensions.jl", "max_stars_repo_name": "daanhb/SignalExtensions.jl", "max_stars_repo_head_hexsha": "00103ececb3619e52dcb9ee659ae88494f3bb3e2", "max_stars_repo_licenses": ["MIT"], "max_sta...
module BridgeFinder include("BridgeFinder_.jl") export debridgePE export debridgeSE export splice_mates export revcompFQ export readlength_summary export readlength_SE_summary end
{"hexsha": "753be67a171ecf51f6d801244c342a2bceccb6b6", "size": 180, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Jchartools/BridgeFinder.jl", "max_stars_repo_name": "straightlab/chartools-dev", "max_stars_repo_head_hexsha": "f8e3dad5f8a1ad2708076f445351918a98cdf26d", "max_stars_repo_licenses": ["MIT"], "max_st...
import pytest import numpy as np import test_ops_rank1_array_module as m def test_extent(): print("\n") print("testing extent") a = np.ones(5) assert(m.extent(a)) def test_clone(): print("\n") print("testing clone") a = np.array([1,2,3,4,5,6]) b = m.clone(a) assert(b[0]==1.) assert(b[1]==2.) as...
{"hexsha": "70e10fb011bd34db6e22d43a6f1855dea103da52", "size": 2534, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests_compiled/test_ops_rank1_array.py", "max_stars_repo_name": "Pressio/pressio4py", "max_stars_repo_head_hexsha": "36676dbd112a7c7960ccbf302ff14d4376c819ec", "max_stars_repo_licenses": ["Unlicen...
# -*- coding: utf-8 -*- !pip install performer-pytorch from torch.cuda.amp import autocast from functools import partial from contextlib import contextmanager from local_attention import LocalAttention from axial_positional_embedding import AxialPositionalEmbedding from performer_pytorch.reversible import ReversibleS...
{"hexsha": "a30875309886be377b9fe6296e2f5782c05005e0", "size": 15372, "ext": "py", "lang": "Python", "max_stars_repo_path": "CPV.py", "max_stars_repo_name": "pranavphoenix/CXV", "max_stars_repo_head_hexsha": "31c3f0d2089a218734255d29043e6b87cf8007c4", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 9, "max_s...
// // Licensed to Green Energy Corp (www.greenenergycorp.com) under one or // more contributor license agreements. See the NOTICE file distributed // with this work for additional information regarding copyright ownership. // Green Energy Corp licenses this file to you under the Apache License, // Version 2.0 (the "Li...
{"hexsha": "124d8805ca560aa451fc9b18b2ab6ff50d4f42e2", "size": 1969, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/tests/TestPhysicalLayerAsyncSerial.cpp", "max_stars_repo_name": "cverges/adnp3", "max_stars_repo_head_hexsha": "2a07f364bec8f1ad46e33cc8b6b8ef37b9005f3a", "max_stars_repo_licenses": ["MS-PL", "N...
# -*- coding: utf-8 -*- try: import pandas as pd except ImportError: pd = None try: import numpy as np except ImportError: np = None from .framework import ConversionContext, Options, Pipeline, Converter, accessors, Accessor from .standard import (DictConverter, Accessor, RangeAccessor, RawValueAccess...
{"hexsha": "5d59da4a4fc45a91190ce2540761663d8bbc673d", "size": 1805, "ext": "py", "lang": "Python", "max_stars_repo_path": "xlwings/conversion/__init__.py", "max_stars_repo_name": "rogererens/xlwings", "max_stars_repo_head_hexsha": "a9547f339eed3d1f69b067f48512cc338fa0637d", "max_stars_repo_licenses": ["BSD-3-Clause"],...
%MDL_S4ABB2p8 Create kinematic model of ABB S4 2.8robot % % MDL_S4ABB2p8 is a script that creates the workspace variable s4 which % describes the kinematic characteristics of an ABB S4 2.8 robot using % standard DH conventions. % % Also defines the workspace vector: % q0 mastering position. % % Author:: % Wynand...
{"author": "petercorke", "repo": "robotics-toolbox-matlab", "sha": "bd7a9d75176c660f43fc799b24d838f70b02250c", "save_path": "github-repos/MATLAB/petercorke-robotics-toolbox-matlab", "path": "github-repos/MATLAB/petercorke-robotics-toolbox-matlab/robotics-toolbox-matlab-bd7a9d75176c660f43fc799b24d838f70b02250c/models/md...
#redirect ANR Lab
{"hexsha": "d7e8995a0555339bf6ce3954b1c9a21ceedd5789", "size": 18, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/DANR_Lab.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
[STATEMENT] lemma spr_jview_prefix_closed[dest]: "spr_jview a (t \<leadsto> s) = spr_jview a (t' \<leadsto> s') \<Longrightarrow> spr_jview a t = spr_jview a t'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. spr_jview a (t \<leadsto> s) = spr_jview a (t' \<leadsto> s') \<Longrightarrow> spr_jview a t = spr_jview ...
{"llama_tokens": 159, "file": "KBPs_SPRView", "length": 1}
using Base.Test using MathProgBase using MathProgBase.SolverInterface using Xpress function quadprogtest(solver=MathProgBase.defaultQPsolver) println("Testing quadprog with solver ", string(typeof(solver))) sol = quadprog([0., 0., 0.],[2. 1. 0.; 1. 2. 1.; 0. 1. 2.],[1. 2. 3.; 1. 1. 0.],'>',[4., 1.],-Inf,Inf,s...
{"hexsha": "97788073b4cd78ca759f69437bc2f3033bf8efc8", "size": 1601, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/xprs_test03.jl", "max_stars_repo_name": "JuliaPackageMirrors/Xpress.jl", "max_stars_repo_head_hexsha": "165739426e00b6c5e22f006fc9c7fc1d30458cb3", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys FAST_FLAG = 0 # Functions for initializing neural nets parameters def init_weight_variable(shape): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) r...
{"hexsha": "5de0bc3dd3fa3de065b5c1b18b384d5b12bcc448", "size": 6033, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp4/exp4h.py", "max_stars_repo_name": "Haunter17/MIR_SU17", "max_stars_repo_head_hexsha": "0eaefb8cab78ca896c1ed0074892c296110eb161", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
## File for normal stacks. Use for test and experiments. type NormalStack{T,D} # IO input::IOStream # Pointer on a file to avoid memory consumption output::Nullable{IOStream} # Pointer to an optional (Nullable) output file # Functions defining the behavior of the stack in case of push/pop push_condition::Fun...
{"hexsha": "3820e5a6abc8b81ae0e781bec67d4654d8463953", "size": 1424, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/normal.jl", "max_stars_repo_name": "Azzaare/CompressedStacks.jl", "max_stars_repo_head_hexsha": "678c54980aad46197b53d35e1089807a7726769b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- import os import cv2 from scipy import misc from PIL import Image from src.face_landmark import FaceMarks as Landmark import src.Constant as Constant sample_path = 'datasets/lfw' dest_path = sample_path + "/../lfw_16" middle_path = sample_path + "/../lfw_64" middleSize = 64 imgSize...
{"hexsha": "b53e3d4bd49bba32c0e413647992a8ae47d1c5d3", "size": 1236, "ext": "py", "lang": "Python", "max_stars_repo_path": "lfw_16.py", "max_stars_repo_name": "corganhejijun/frontal-trans", "max_stars_repo_head_hexsha": "1509babf2447a53a772703b09cb6a2daec6968a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6...
function coeffS = computeMcoeffs(coeffS,symmetric) % function coeffS = computeMcoeffs(coeffS,symmetric) % % APA, 6/11/2018 if ~exist('symmetric','var') symmetric = true; end %% ComputeRemainingCoefficients(bool symmetric) if symmetric coeffS.M1 = coeffS.N1 - coeffS.D1 * coeffS.N0; coeffS.M2 = coeffS...
{"author": "cerr", "repo": "CERR", "sha": "d320754abad9dcb78508ab69f33ae9f644202114", "save_path": "github-repos/MATLAB/cerr-CERR", "path": "github-repos/MATLAB/cerr-CERR/CERR-d320754abad9dcb78508ab69f33ae9f644202114/CERR_core/PlanMetrics/recursiveFilters/computeMcoeffs.m"}
# Used "Conjugate Bayesian analysis of the Gaussian distribution" by Murphy as # a reference. Note that there were some typos in that document so the code # here may not correspond exactly. struct NormalInverseWishart{T<:Real,V<:AbstractVector{T},M<:AbstractMatrix{T}} <: ContinuousUnivariateDistribution dim::Int...
{"hexsha": "02e7c83959529e0f6663e0efffc53a3690c10a00", "size": 3640, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/normalinversewishart.jl", "max_stars_repo_name": "AlexRobson/ConjugatePriors.jl", "max_stars_repo_head_hexsha": "423608902a9a13ccdcd6cfd877b7516092e21443", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is...
{"hexsha": "c86594e664b898c059133404b5d7dcf9fba3df1d", "size": 3420, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/utils/geometry.py", "max_stars_repo_name": "manu-18l/mueleak", "max_stars_repo_head_hexsha": "78c7cc9cfc2e11e61c552e4f38a525eb56d2c59c", "max_stars_repo_licenses": ["zlib-acknowledgement", "CN...
import numpy as np from matplotlib.pylab import plt import seaborn as sns from matplotlib.collections import PatchCollection from matplotlib.patches import Rectangle import ot import ot.plot def find_nearest_index(array,value): idx = (np.abs(array-value)).argmin() return idx sns.set(style='darkgrid', font_s...
{"hexsha": "bf067c2143e818b562e79f7ba0e6a6a2df816252", "size": 3750, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/figure1/figure1.py", "max_stars_repo_name": "pdnooteboom/PO_res_error", "max_stars_repo_head_hexsha": "2c0e1f12203585e2ca3f9a5e686b4e8004052884", "max_stars_repo_licenses": ["MIT"], "max_s...
% pop_erpparams() - Set plotting and statistics parameters for cluster ERP % plotting % Usage: % >> STUDY = pop_erpparams(STUDY, 'key', 'val'); % % Inputs: % STUDY - EEGLAB STUDY set % % Input: % 'topotime' - [real] Plot ERP scalp maps at one specific latency (ms). % ...
{"author": "buzsakilab", "repo": "buzcode", "sha": "2d700a38b3c2a860ad1333be90f14d7a37a72815", "save_path": "github-repos/MATLAB/buzsakilab-buzcode", "path": "github-repos/MATLAB/buzsakilab-buzcode/buzcode-2d700a38b3c2a860ad1333be90f14d7a37a72815/externalPackages/eeglab14_0_0b/functions/studyfunc/pop_erpparams.m"}
/****************************************************************** * * Round for C++ * * Copyright (C) Satoshi Konno 2015 * * This is licensed under BSD-style license, see file COPYING. * ******************************************************************/ #include <boost/lexical_cast.hpp> #include <stdlib.h> #include...
{"hexsha": "080f9f37449f4fbc86cdc7ad6a3e5456f408244f", "size": 4135, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/round/common/Dictionary.cpp", "max_stars_repo_name": "cybergarage/round-cc", "max_stars_repo_head_hexsha": "13fb5c39e9bc14a4ad19f9a63d8d97ddda475ca1", "max_stars_repo_licenses": ["BSD-3-Clause"]...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 19 09:15:01 2019 @author: zahid """ # Load libraries import pandas as pd import numpy as np from sklearn import preprocessing # Import the preprocessing module from sklearn.model_selection import train_test_split # Import train_test_split function ...
{"hexsha": "54a9674938f2f3da52205ec86a5662c74185b2de", "size": 2496, "ext": "py", "lang": "Python", "max_stars_repo_path": "other/p/PyDABI/main.py", "max_stars_repo_name": "thezaza101/Random-Python-ToLearn", "max_stars_repo_head_hexsha": "a7e2d5ce5e0f08803af6314bd1da6df5acb1ccb8", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 20 02:23:34 2018 @author: mimbres """ import numpy as np def evaluate(submission,groundtruth): ap_sum = 0.0 first_pred_acc_sum = 0.0 counter = 0 for sub, tru in zip(submission, groundtruth): ap_sum += ave_pre(sub,tru,counter...
{"hexsha": "f106839936a762fa956c502010dce83b46fcad31", "size": 724, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/eval.py", "max_stars_repo_name": "mimbres/SeqSkip", "max_stars_repo_head_hexsha": "031add5ba22cad1665d76b2cb21e8f6c1e1357e5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 7, ...
[STATEMENT] lemma seq_extract_range: "A \<upharpoonleft>\<^sub>l xs = (A \<inter> dom\<^sub>l(xs)) \<upharpoonleft>\<^sub>l xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. A \<upharpoonleft>\<^sub>l xs = (A \<inter> dom\<^sub>l xs) \<upharpoonleft>\<^sub>l xs [PROOF STEP] apply (auto simp add: seq_extract_def nth...
{"llama_tokens": 309, "file": "UTP_toolkit_List_Extra", "length": 3}
import argparse import logging import pickle from concurrent.futures import Future from concurrent.futures import ProcessPoolExecutor from concurrent.futures import wait from pathlib import Path import filepattern import matplotlib.pylab import numpy import scipy.stats import seaborn from bfio import BioReader from bf...
{"hexsha": "f9faa0e9be8cc6613bd7d3187662c7cde256178f", "size": 10166, "ext": "py", "lang": "Python", "max_stars_repo_path": "regression/polus-bleed-through-estimation-plugin/src/bench.py", "max_stars_repo_name": "LabShare/polus-plugin-utils", "max_stars_repo_head_hexsha": "9332ca6c229401d57b063a81973d48ce718c654c", "ma...
# # Types supporting structural definition of models and their components # # Objects with a `name` attribute @class NamedObj <: MimiClass begin name::Symbol end """ nameof(obj::NamedDef) = obj.name Return the name of `def`. `NamedDef`s include `DatumDef`, `ComponentDef`, `CompositeComponentDef`, and `Varia...
{"hexsha": "f546dd6e82f92ac3f3438b3bfad885487841003b", "size": 8457, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/types/defs.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Mimi.jl-e4e893b0-ee5e-52ea-8111-44b3bdec128c", "max_stars_repo_head_hexsha": "c9336f1076996dca728c30befd561280dfc1831...
#include <boost/spirit/home/x3/support/traits/move_to.hpp>
{"hexsha": "6671f1a7ed0eef840bafb97c9a6453319a5a6ff2", "size": 59, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_spirit_home_x3_support_traits_move_to.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_lice...
#ifndef TYPES_HPP #define TYPES_HPP #include <boost/date_time.hpp> #include <boost/filesystem.hpp> #include <map> #include <string> #include <vector> using DirEntries = std::vector< boost::filesystem::directory_entry >; using Date = boost::gregorian::date; using Path = boost::filesystem::path; using DestFolders = std...
{"hexsha": "134ec631fa20e3a102f6e5b407f0dc1a70f2ee8a", "size": 363, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/types.hpp", "max_stars_repo_name": "masterl/dowload_organizer", "max_stars_repo_head_hexsha": "1421ffcf5645a429cf7b7e6e6e58bc6dce69a8c9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
require(datasets) require(stats) require(RCUrl) require(ggplot2) require(ggthemes) require(scales) require(tidyverse) require(gridExtra) require(rstudioapi) rm(list = ls()) setwd(dirname(getActiveDocumentContext()$path )) #print( getwd() ) source("./covid19_functions.r") #select countries to plot, support only two co...
{"hexsha": "d298f64a2cd12c30ae7206fbd876e92be08cff3e", "size": 1559, "ext": "r", "lang": "R", "max_stars_repo_path": "Corona/CoronaVirusAnalysis.r", "max_stars_repo_name": "adarshkhare1/DataVisualization", "max_stars_repo_head_hexsha": "5bfb183d2073ac20a2e489f4a3f861338c6e88e8", "max_stars_repo_licenses": ["MIT"], "max...
from collections import Counter from typing import Any, Callable, Dict, Iterator, List, Optional, Type, TypeVar from networkx import DiGraph from networkx.algorithms.dag import descendants from networkx.relabel import relabel_nodes from document.models import DocNode PrimitiveDict = Dict[str, Any] T = TypeVar('T', ...
{"hexsha": "c462a273d6cd6d3c532ca2f4372124c2878350d9", "size": 12873, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/document/tree.py", "max_stars_repo_name": "18F/omb-eregs", "max_stars_repo_head_hexsha": "7c85fe9112c385f74bc37e22cb180c598c2d49fe", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count":...
import numpy as np def check_met_rxn_order(data_dict: dict) -> bool: """ Given the excel file as argument, checks if the order of reactions and metabolites in all sheets is consistent with the order in the stoichiometry matrix. If everything is fine flag is 0, otherwise it is set to 1. Args: ...
{"hexsha": "56da6d1e0c059abeb824db4ff1c7d211b7adc217", "size": 9623, "ext": "py", "lang": "Python", "max_stars_repo_path": "set_up_grasp_models/check_models/format_checks.py", "max_stars_repo_name": "martamatos/set_up_grasp_models", "max_stars_repo_head_hexsha": "0028f063c41104e3c0404956aa225e76aa6ac983", "max_stars_re...
# -*- coding: utf-8 -*- """ Created on Fri Aug 14 11:48:22 2020 @author: Mark """ from analysis import Analysis import matplotlib.pyplot as plt import numpy as np import math import copy from model import Model #%% loss_fns = r'C:\Users\Mark\ownCloud\Muelheim Group\Projects\Gas phase background\python code\gasscatt...
{"hexsha": "7ee43a3e1fac01dcc25c5586fe1eb064738011d7", "size": 1972, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/deconvolution_test.py", "max_stars_repo_name": "surfaceanalytics/inelasticscattering", "max_stars_repo_head_hexsha": "da549dde788a55084c565bbc5f89ebf9cbae4263", "max_stars_repo_licenses": ["...
# Copyright 2021 Yan Yan # # 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 agreed to in writing, soft...
{"hexsha": "8d00e88656322d75867f8a1a2b76eb2de05dc8fc", "size": 70454, "ext": "py", "lang": "Python", "max_stars_repo_path": "cumm/gemm/mask_iters.py", "max_stars_repo_name": "FindDefinition/cumm", "max_stars_repo_head_hexsha": "3d58e85b660afa05c20514afe65b8aa3a4995953", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
"""Utils to check the samplers and compatibility with scikit-learn """ # Adapted from imbalanced-learn # Adapated from scikit-learn # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # License: MIT import sys import traceback import warnings from collections import Counter from functools import partial import p...
{"hexsha": "ed8c76a5410c702c33dfc751cc2f5177e355cace", "size": 15602, "ext": "py", "lang": "Python", "max_stars_repo_path": "imbalanced_ensemble/utils/estimator_checks.py", "max_stars_repo_name": "ZhiningLiu1998/imbalanced-ensemble", "max_stars_repo_head_hexsha": "26670c8a6b7bab26ae1e18cba3174a9d9038a680", "max_stars_r...
[STATEMENT] lemma Join_absorb2: "G \<le> F ==> F\<squnion>G = F" [PROOF STATE] proof (prove) goal (1 subgoal): 1. G \<le> F \<Longrightarrow> F \<squnion> G = F [PROOF STEP] by (auto simp add: Join_ac component_def)
{"llama_tokens": 94, "file": null, "length": 1}
""" Note ---- The order of point groups follows Table 12.1.4.2 in ITA2006. https://en.wikipedia.org/wiki/List_of_character_tables_for_chemically_important_3D_point_groups At the moment of 25.06.2018, the character table of C_6 in the wikipedia page has a typo. """ # TODO(ikeda): Modify ir_labels of "m" import numpy a...
{"hexsha": "b8377d691f6a0288f22b571538fdcdbb80aa88e8", "size": 50527, "ext": "py", "lang": "Python", "max_stars_repo_path": "upho/irreps/character_tables.py", "max_stars_repo_name": "yuzie007/upho", "max_stars_repo_head_hexsha": "9e130fc1d5314fdbc77a6336e84c02e67d459bfb", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np from msmbuilder.reduce import tICA as tICA1 from projector.models.tica import tICA as tICA2 np.random.seed(42) X = np.random.randn(10, 3) tica1 = tICA1(lag=1) tica1.train(prep_trajectory=np.copy(X)) y1 = tica1.project(prep_trajectory=np.copy(X), which=[0, 1]) tica2 = tICA2(n_components=2, offset...
{"hexsha": "9d4ace2cd9c9c30bbab363cb9a19b9ecb0fa3d94", "size": 954, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tica.py", "max_stars_repo_name": "peastman/projector", "max_stars_repo_head_hexsha": "4e7153a095ee7c644e82b0119eb5dd6133171780", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import json import logging import os from sagemaker.predictor import RealTimePredictor from sagemaker.predictor import json_deserializer from screw_predictor import ScrewPredictor import base64 # endpoint = 'object-detection-2018-08-14-01-19-44-959' endpoint = os.getenv('OBJECT_DETECTION_ENDPOINT','object-detection-201...
{"hexsha": "e37a37aa98f617ed559c1edb2eaafa756bc24e8b", "size": 941, "ext": "py", "lang": "Python", "max_stars_repo_path": "screw-api/screw_handler.py", "max_stars_repo_name": "CM-Kajiwara/screw-demo-app", "max_stars_repo_head_hexsha": "4c4ef0c67e91d5e29d4aafd3a164ae540e085698", "max_stars_repo_licenses": ["MIT"], "max_...
#include <boost/test/unit_test.hpp> #include <k52/common/helpers.h> #include <k52/common/constants.h> #include "../boost_test_tools_extensions.h" using ::k52::common::Helpers; using ::k52::common::Constants; using ::std::complex; using ::std::vector; BOOST_AUTO_TEST_SUITE(helpers_tests); BOOST_AUTO_TEST_SUITE(conju...
{"hexsha": "88b38b0f0983c6cc570f2b21487a81e28928c595", "size": 1148, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/unit_tests/common/helpers.test.cpp", "max_stars_repo_name": "wfoperihnofiksnfvopjdf/k52", "max_stars_repo_head_hexsha": "2bbbfe018db6d73ec9773f29e571269f898a9bc0", "max_stars_repo_licenses": ["M...
import argparse import pandas as pd import numpy as np import torch import torch.nn as nn import os import sys import time, datetime import gc import warnings warnings.filterwarnings('ignore') from torch.utils.data import Dataset from sklearn.metrics import recall_score import logging import logging.handlers import...
{"hexsha": "82f18f9f24118f83c255db05311ff185ac236a23", "size": 15417, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train_smdataparallel.py", "max_stars_repo_name": "daekeun-ml/end-to-end-pytorch-on-sagemaker", "max_stars_repo_head_hexsha": "ecc69a4026b213fed91e636ea28ea73dbde6b66f", "max_stars_repo_licens...
using JuliaGrid using HDF5 using SparseArrays using Test include("flow/flow.jl") include("generator/generator.jl") include("estimation/estimation.jl")
{"hexsha": "4ace79001f918866139c3493bb9d3869924d0ee1", "size": 152, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "mcosovic/JuliaGrid", "max_stars_repo_head_hexsha": "64c42fe10a7654ce645188fbe9d2ef7126ec75f2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "...
""" Base module for readers. Contains the abstract base class upon which all readers are built. """ from abc import ABC, abstractmethod import re from collections.abc import Callable from numpy import array from serpentTools.messages import info from serpentTools.settings import rc from serpentTools.objects.base imp...
{"hexsha": "3b906396507e8ee8736d5227e2839d830bd9319e", "size": 8216, "ext": "py", "lang": "Python", "max_stars_repo_path": "serpentTools/parsers/base.py", "max_stars_repo_name": "travleev/serpent-tools", "max_stars_repo_head_hexsha": "b699e5112aacb355be3056e3751d50ec2f926e0a", "max_stars_repo_licenses": ["MIT"], "max_s...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import KFold, StratifiedKFold, cross_val_score, GridSearchCV from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error from math import sqrt from sklearn.metrics import accuracy_score, precision_scor...
{"hexsha": "afb2c6b11a9ac04d749aa99836aa3a9a57f24449", "size": 10019, "ext": "py", "lang": "Python", "max_stars_repo_path": "Notebooks/utils/applyML_util.py", "max_stars_repo_name": "ferdouszislam/Weather-WaterLevel-Prediction-ML", "max_stars_repo_head_hexsha": "9ab40b0a6661d3885dc77497048fcb9e7d4b00f6", "max_stars_rep...
import gc import random import numpy as np import multiprocessing from utils import task_divide, merge_dic def generate_pos_batch_queue(triple_list1, triple_list2, batch_size, steps, out_queue): for step in steps: out_queue.put(generate_pos_batch(triple_list1, triple_list2, batch_size, step)) exit(0)...
{"hexsha": "4a19fc245c45fec1259814cbd900e85faeb2ea10", "size": 9978, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/base/batch.py", "max_stars_repo_name": "KirillDogadin-std/Lab-Semantic", "max_stars_repo_head_hexsha": "d04e592cd540dd5dcd537cd7df7ee6619af3d67f", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma remove_all_complete_blocks_pbd: assumes "count \<B> \<V> < \<Lambda>" shows "pairwise_balance \<V> (removeAll_mset \<V> \<B>) (\<Lambda> - (count \<B> \<V>))" (is "pairwise_balance \<V> ?B ?\<Lambda>") [PROOF STATE] proof (prove) goal (1 subgoal): 1. pairwise_balance \<V> (removeAll_mset \<V> \<B...
{"llama_tokens": 1872, "file": "Fishers_Inequality_Design_Extras", "length": 20}
""" @Author: Hanh Cao """ import pandas as pd import numpy as np import os import re from constants import BASE_PATH, FLAVOR_WORDS, SKIP_WORDS, FULL_WORDS, FOODS_DRINK from collections import defaultdict, Counter class Items(object): def __init__(self, item_info): self.item_info = item_info def tra...
{"hexsha": "efbd6ac7ea861b6af287c3a2cf0481fe1b3703c1", "size": 12681, "ext": "py", "lang": "Python", "max_stars_repo_path": "clean_data.py", "max_stars_repo_name": "hcao2015/IRI", "max_stars_repo_head_hexsha": "0a258d752f6532a8c6d9fddd90c9d70b79154673", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
function [X]=tt_meshgrid_vert(varargin) % Analogue of the meshgrid function for the TT-format, % !!!!!!!!!!!! concatenating tensor trains with ones with tkron !!!!!!!!!!! % !!!!!!!!!!!! contrarily to tt_meshgrid (which uses kron2) !!!!!!!!!!! % X = TT_MESHGRID_VERT(A,B,C,...) Computes the meshgrid based on "1d" %...
{"author": "oseledets", "repo": "TT-Toolbox", "sha": "1b87616b1e84de89699697fe196eba814aabe954", "save_path": "github-repos/MATLAB/oseledets-TT-Toolbox", "path": "github-repos/MATLAB/oseledets-TT-Toolbox/TT-Toolbox-1b87616b1e84de89699697fe196eba814aabe954/core/tt_meshgrid_vert.m"}
# -*- coding: utf-8 -*- """Test filter functions.""" # Imports --------------------------------------------------------------------- import datetime import io import numpy as np import pandas as pd import unittest import pdpy.errors as errors import pdpy.filter as filter import pdpy.utils as utils # Test data ----...
{"hexsha": "35c55ba1a7d2a51079dab4aa28b2312bf159c573", "size": 12301, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_filter.py", "max_stars_repo_name": "olihawkins/pdpy", "max_stars_repo_head_hexsha": "9f0058e4de432f09b69d556fa04d0889afac3fab", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#!/user/bin/env python3 # -*- coding: utf-8 -*- import os import torch import numpy as np import pickle as pkl from tqdm import tqdm import time from datetime import timedelta class Config(object): """配置参数""" def __init__(self, dataset, embedding): self.model_name = 'TextCNN' self.train_path =...
{"hexsha": "c34e42a85a1aba746685518006378d0044854559", "size": 6388, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Ancrilin/Chinese-Text-Classification-Pytorch", "max_stars_repo_head_hexsha": "b4281aa39ae19c9fd4f29f6888e14a8eac30b8c9", "max_stars_repo_licenses": ["MIT"], "max_...
import pytest import json import pathlib import numpy as np from trifinger_simulation.tasks import rearrange_dice as task @pytest.fixture def test_data_dir(): """Return path to the data directory of this test file.""" p = pathlib.Path(__file__) p = p.parent / p.stem # same path but without file extensi...
{"hexsha": "50ef1d2c6bb58a36386e9a81c01b192a92b3e0b8", "size": 6291, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tasks_rearrange_dice.py", "max_stars_repo_name": "xuanhien070594/trifinger_simulation", "max_stars_repo_head_hexsha": "31d43764955ad3aa7af8ec20512605dcac8dbb9a", "max_stars_repo_license...
import datetime import logging import os import pickle import sys import time import numpy as np import pandas as pd import progressbar import qutip import qutip.control.pulseoptim as cpo import qutip.logging_utils as logging import scipy if '../../' not in sys.path: sys.path.append('../../') import src.rabi_mode...
{"hexsha": "0a907cd4e1d36ac0ea91a03cfd4ff6e9e398558f", "size": 1686, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/rabi_and_lmg_optimizations_20190217/script_rabi_bangramp_powell.py", "max_stars_repo_name": "lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381", "max_stars_repo_head_hex...
classdef uicontext < handle %uicontext - Context menu with push buttons. %------------------------------- Copyright -------------------------------- % Copyright (c) 2023 BIMK Group. You are free to use the PlatEMO for % research purposes. All publications which use this platform or any code % in the platform should ac...
{"author": "BIMK", "repo": "PlatEMO", "sha": "c5b5b7c37a9bb42689a5ac2a0d638d9c4f5693d5", "save_path": "github-repos/MATLAB/BIMK-PlatEMO", "path": "github-repos/MATLAB/BIMK-PlatEMO/PlatEMO-c5b5b7c37a9bb42689a5ac2a0d638d9c4f5693d5/PlatEMO/GUI/uicontext.m"}
Ownership labels decorate an expression with the names of the currently-responsible components. In the original program, each component owns all of its subexpressions. An expression reduces to a value; if a value crosses a boundary, it gains a label. A value loses a label only when it fully matches a boundary type. T...
{"hexsha": "16890bafcdd3d568ef40396b5293b894db48b86f", "size": 17586, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ownership.tex", "max_stars_repo_name": "nuprl/gfd-oopsla-2019", "max_stars_repo_head_hexsha": "9b77f6e1b1660bdbd78aa1d76ce9c019261054df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
from __future__ import division from __future__ import print_function import os import glob import time import random import argparse import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from utils import load_data, accuracy, macro_f1, micro_...
{"hexsha": "aefe815a4a665efe8ba3987ace75a47b40e21a2e", "size": 7024, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "anonymous2review/HGAT", "max_stars_repo_head_hexsha": "f78af7d616f60a76e80b2421e3a02958f6b7a4a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 32, "max...
# -*- coding: utf-8 -*- """ Created on Tue Feb 23 11:50:49 2021 @author: peter """ import numpy as np import pandas as pd from base import BaseModel, GarchBase from stats import loglikelihood_normal, loglikelihood_student_t from weights import Beta from helper_functions import create_matrix from datetime import dateti...
{"hexsha": "7b00f76fbde6ca86eacb1fc27cbfce2496ff76bc", "size": 51759, "ext": "py", "lang": "Python", "max_stars_repo_path": "midas/volatility.py", "max_stars_repo_name": "NemesiP/volatiltiy-forecasting", "max_stars_repo_head_hexsha": "a65899d70e64b3a884c96214b0f337e88c918169", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ HTW-PV3 - Weatherdata functions SPDX-License-Identifier: AGPL-3.0-or-later """ __copyright__ = "© Ludwig Hülk" __license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" __url__ = "https://www.gnu.org/licenses/agpl-3.0.en.html" __author__ = "Ludee;" __v...
{"hexsha": "7515afd68f0a50bce736f8474557e2c187ef810f", "size": 4968, "ext": "py", "lang": "Python", "max_stars_repo_path": "pv3_weatherdata.py", "max_stars_repo_name": "htw-pv3/pvlib-python-pv3", "max_stars_repo_head_hexsha": "8b8b40571c719213b1b303a3563009ed4cbc8aa8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import os import pickle import re import time import tensorflow as tf import numpy as np from neuroner import utils from neuroner import utils_tf from neuroner import utils_nlp from lmdb_embeddings.reader import LruCachedLmdbEmbeddingsReader from lmdb_embeddings.exceptions import MissingWordError def bidirectional_...
{"hexsha": "421eebe8d77212e371c53a8466c1c345acdc41d7", "size": 26011, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuroner/entity_lstm.py", "max_stars_repo_name": "brightgems/APLentyBrat", "max_stars_repo_head_hexsha": "c2d081bc685e7b432ba01ad3378bcdb821db3cde", "max_stars_repo_licenses": ["CC-BY-3.0", "MIT"...
""" Unit Tests for Py-ART's io/mdv.py module. """ import tempfile import os import bz2 from StringIO import StringIO from numpy.testing.decorators import skipif from numpy.testing import assert_raises import pyart def test_autoread_mdv(): radar = pyart.io.read(pyart.testing.MDV_PPI_FILE) source = radar.met...
{"hexsha": "283bf04ca0f7fadfdd330b8920ae51c332a9c948", "size": 3119, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyart/io/tests/test_auto_read.py", "max_stars_repo_name": "kmuehlbauer/pyart", "max_stars_repo_head_hexsha": "4accda3fc02490d135373ad5b054899c6781e762", "max_stars_repo_licenses": ["OLDAP-2.6", "P...