text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
""" This module provides a function to check the SNR of the white and gray matter """ # ----------------------------------------------------------------------------- def checkSNR(subjects_dir, subject, nb_erode=3, ref_image="norm.mgz", aparc_image="aparc+aseg.mgz"): """ A function to check the SNR of the whi...
{"hexsha": "1660796b9050554de1d724342236a62593473237", "size": 4444, "ext": "py", "lang": "Python", "max_stars_repo_path": "qatoolspython/checkSNR.py", "max_stars_repo_name": "AhmedFaisal95/qatools-python", "max_stars_repo_head_hexsha": "580530b24f7f29cc1c7ab3f9211998493f49be7c", "max_stars_repo_licenses": ["MIT"], "ma...
from sage.all import EllipticCurve def is_embedding_degree(E: EllipticCurve, k): return (E.base_field().order() ** k - 1) % E.order() == 0
{"hexsha": "27055f3a60cf0a74448b782252282910cca89bc3", "size": 144, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "adamivora/pairing_friendly_curves_generation", "max_stars_repo_head_hexsha": "7cad587e26f420fad5f9becb99bf1ec85d6b884d", "max_stars_repo_licenses": ["MIT"], "max_...
''' BSD 3-Clause License Copyright (c) 2017, Jack Miles Hunt 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 cond...
{"hexsha": "6bd7918268f1d9ec40debaf0379bfc6a00974822", "size": 6300, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "JackHunt/GP-LVM", "max_stars_repo_head_hexsha": "2f2aade7207db2f54d5ab13fd304c93eaeb8fc2a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 11, "m...
export testcase1a, testcase1a_point, testcase1b, testcase1c export testcase1abis, testcase1ater export testcase2 export testcase4a, testcase4b, testcase4c # Test case 1.a function testcase1a_point() x = PointE([Matrix{Float64}(I, 3, 3)], Float64[]) end function testcase1a(; symmetric=false) if symmetric ...
{"hexsha": "0ae57c8580ed6d6f6fccb539cb806fc969affb71", "size": 7273, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/test_cases.jl", "max_stars_repo_name": "GillesBareilles/SDCO.jl", "max_stars_repo_head_hexsha": "f1514689b77d4410224d472c82776e9c26fa1cc4", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
////////////////////////////////////////////////////////////////////////////// // Boost.Assign v2 // // // // Copyright (C) 2003-2004 Thorsten Ottosen // // ...
{"hexsha": "7966ec087a2e3201bc6413d9f773d41d4c3d80d0", "size": 2570, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/assign/v2/support/check/equal_container/deduce.hpp", "max_stars_repo_name": "rogard/assign_v2", "max_stars_repo_head_hexsha": "8735f57177dbee57514b4e80c498dd4b89f845e5", "max_stars_repo_licens...
import sys import numpy as np from . import nn_translator from . import predict from . import visualizer inputfile = sys.argv[1] nn_input, input_mat, empirical \ = nn_translator.nn_translator(inputfile, train=True) nn_input = np.array(nn_input).reshape((1, predict._N_DIMS_IN)) p = predict.Predictor(net='hyak_l...
{"hexsha": "9a824aec1dfd9bef6251e83c304f19eff26ad54d", "size": 597, "ext": "py", "lang": "Python", "max_stars_repo_path": "sspinn/__main__.py", "max_stars_repo_name": "awild82/SSPINN", "max_stars_repo_head_hexsha": "8b2680b6556f73ee75847b1d5e842f66e2af2f59", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "ma...
import sys sys.path.insert(0,'./../../..') from limix.core.mean.mean_base import MeanBase as lin_mean from limix.core.covar import SQExpCov from limix.core.covar import FixedCov from limix.core.covar import SumCov from limix.core.gp import GP import pdb import scipy as sp import scipy.linalg as LA import time as TIME...
{"hexsha": "94f92fb7c4431f5e10e038ab4e4cadbbb6c5006d", "size": 1817, "ext": "py", "lang": "Python", "max_stars_repo_path": "svca_limix/demos/demo_gp_regression.py", "max_stars_repo_name": "DenisSch/svca", "max_stars_repo_head_hexsha": "bd029c120ca8310f43311253e4d7ce19bc08350c", "max_stars_repo_licenses": ["Apache-2.0"]...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
{"hexsha": "ca9ba1402006db1e572f499a074509bfa2969ba9", "size": 1954, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/core/trigonometric/include/nt2/trigonometric/constants/radindeg.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars...
#include <json/json.h> #include <thread> #include <mutex> #include <list> #include "settings.h" #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_io.hpp> #include <boost/lexical_cast.hpp> OverlaySettingsWithDirtyFlag globalSettings; //OverlaySettingsServer settingServer; //OverlaySettingsManager settingManager...
{"hexsha": "d5bd9d7e139f49d8c08f29042d28ef0265b0f5b9", "size": 8566, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/settings/settings.cpp", "max_stars_repo_name": "ZCube/OverlayProc", "max_stars_repo_head_hexsha": "b57bab06644be6c7fe3468c726591f5a3a0f1a6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os import numpy as np # Ask user which folder we want to merge with print("Merge 'processed_data' with: ") print(" 1. 'train_data'") print(" 2. 'test_data'") while True: val = input("Enter '1' or '2': ") if val == "1": path = "train_data\\" break elif val == "2": path = "te...
{"hexsha": "26fe0c62b51cc703bcc90ddffe3caed391bf416e", "size": 1271, "ext": "py", "lang": "Python", "max_stars_repo_path": "windows_code/merge_data.py", "max_stars_repo_name": "daniel-luper/self-driving-picar", "max_stars_repo_head_hexsha": "d8d7bb3ee450db8995b85273d3015555a9ed3b1b", "max_stars_repo_licenses": ["MIT"],...
cd(@__DIR__) # changes the directory to the current directory, the default I guess is the HOME using Pkg; Pkg.activate("."); Pkg.instantiate() #= Pkg is Julia's built-in package manager, and handles operations such as installing, updating and removing packages. Just like cargo it creates a toml-file that describes the ...
{"hexsha": "b4385f99c88147dbd9a51825e2f4b4614a150479", "size": 9455, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "seir/seir.jl", "max_stars_repo_name": "carlos-hernani/julia101", "max_stars_repo_head_hexsha": "3c5c877cf585ddab5674aa839880029db31387b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np from tqdm import tqdm from joblib import Parallel, delayed class ParticleFilter(): def __init__(self, dimension, n_particles, exploration_factor, keep_best, RandomSampler, Likelihood, Diffuser, n_jobs=-1, joblib_backend="loky"): # Particles will simply be stored as numpy arrays (of size "dimensio...
{"hexsha": "5b3ef2368038b4af512fa64fa7fab588bdd4e80d", "size": 4419, "ext": "py", "lang": "Python", "max_stars_repo_path": "particle_filter.py", "max_stars_repo_name": "cohnt/Deformable-Object-Manifold-Learning", "max_stars_repo_head_hexsha": "81b6d757df78fbd4427db7ab87051ed1514180ee", "max_stars_repo_licenses": ["MIT"...
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
{"hexsha": "f22162f5212c320959db19cb6ae001a4e8cb5fd5", "size": 6277, "ext": "py", "lang": "Python", "max_stars_repo_path": "tuframework/evaluation/model_selection/summarize_results_with_plans.py", "max_stars_repo_name": "Magnety/tuFramework", "max_stars_repo_head_hexsha": "b31cb34d476ef306b52da955021f93c91c14ddf4", "ma...
!NORMAL, REAL GREEN'S FUNCTION subroutine vca_get_gimp_real_full(Greal) complex(8),dimension(Nlat,Nlat,Nspin,Nspin,Norb,Norb,Lreal),intent(inout) :: Greal Greal = impGreal end subroutine vca_get_gimp_real_full subroutine vca_get_gimp_real_ij(Greal,ilat,jlat) integer ...
{"hexsha": "c1dc6dcc13cdac5815e19c37a1abc7fcbc11ee07", "size": 514, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "VCA_IO/get_gimp_realaxis.f90", "max_stars_repo_name": "QcmPlab/VCA", "max_stars_repo_head_hexsha": "01f5001db0ab0016043fb990a56b381858f7f9e0", "max_stars_repo_licenses": ["FSFAP"], "max_stars_cou...
#to add support for Python 3.x from __future__ import division from __future__ import print_function import os, sys import matplotlib import gtk # gtk.set_interactive(False) matplotlib.use('TkAgg') # use WXAgg for smoother graphs; GTKAgg is faster import matplotlib.pyplot as plt import numpy as np import xml.etr...
{"hexsha": "cfc7e960f63be95144e9e96d3f83842ef5bac16c", "size": 9800, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/results/BckUpPlotStats.py", "max_stars_repo_name": "RobertHue/LatexBeamerRosenheim", "max_stars_repo_head_hexsha": "dbe568806053c8b4ca3a5470a011822f6220d511", "max_stars_repo_licenses": ["...
!======================================================================== ! ! T o m o f a s t - x ! ----------------------- ! ! Authors: Vitaliy Ogarko, Jeremie Giraud, Roland Martin. ! ! (c) 2021 The University of Western Australia. ! ! The full ...
{"hexsha": "5097f695f5c9d3da32cbaf7e267a581ebf186a9e", "size": 5539, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/utils/vector.f90", "max_stars_repo_name": "RichardScottOZ/Tomofast-x", "max_stars_repo_head_hexsha": "af2d0b8ad59cdc18d9c348bec274ca4371ae94c0", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env /usr/bin/python from pyrosetta import * import re,sys import os, shutil import random import numpy as np import pickle import math os.environ["OPENBLAS_NUM_THREADS"] = "1" phi=[] psi=[] phi_prob=[] psi_prob=[] #exit() pcut = float(sys.argv[1]) k=int(sys.argv[2]) if(os.path.isfile("phipsi.npz")): ...
{"hexsha": "e60f034cb2003ac578e6e662cd96eda478657657", "size": 21845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/TrRosetta/TR/fold_from_tor_split.py", "max_stars_repo_name": "ruiyangsong/mCNN", "max_stars_repo_head_hexsha": "889f182245f919fb9c7a8d97965b11576b01a96c", "max_stars_repo_licenses": ["MIT"], ...
from sklearn.model_selection import StratifiedKFold, KFold from reval.relative_validation import RelativeValidation from collections import namedtuple from scipy import stats import numpy as np import math class FindBestClustCV(RelativeValidation): """Child class of :class:`reval.relative_validation.RelativeValid...
{"hexsha": "785ad29203b2cc3fe2438a1d361280ac03e24fed", "size": 5206, "ext": "py", "lang": "Python", "max_stars_repo_path": "reval/best_nclust_cv.py", "max_stars_repo_name": "landiisotta/relative_validation_clustering", "max_stars_repo_head_hexsha": "8842abd1674d899eee9997ea4f0cbe2429df0732", "max_stars_repo_licenses": ...
from .context import skip_if_no_cuda_device import numpy as np import os from km3net.util import * #this test verifies that we are testing #the current repository package rather than the installed package def test_get_kernel_path(): path = "/".join(os.path.dirname(os.path.realpath(__file__)).split('/')[:-1]) ...
{"hexsha": "4d28f2b23bdfe5fee000a3943c69f16a434459f0", "size": 3218, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_util.py", "max_stars_repo_name": "remenska/KM3Net", "max_stars_repo_head_hexsha": "4c175662465b9a880fc1864f62219ce9702311f1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
// Copyright (C) 2021 Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria. // // All rights reserved. // // This software is licensed under the terms of the BSD-2-Clause-License with // no commercial use allowed, the full terms of which are made available // in the LICENSE file. No licens...
{"hexsha": "2ebe568f7ebaff89bba3c6c338c4f66ce7b31546", "size": 1212, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "source/tests/mars-test/mars_type_erasure.cpp", "max_stars_repo_name": "eallak/mars_lib", "max_stars_repo_head_hexsha": "9657fb669c48be39471e7504c3648319126c020b", "max_stars_repo_licenses": ["BSD-2-...
import os import sys from glob import glob import numpy as np import h5py import freqent.freqentn as fen import multiprocessing import argparse def calc_epr_spectral(file): ''' function to pass to multiprocessing pool to calculate epr in parallel ''' print('Reading {f}'.format(f=file.split(os.path.sep)...
{"hexsha": "92f11bd80af8b148edd61a56297d37faef18124c", "size": 2463, "ext": "py", "lang": "Python", "max_stars_repo_path": "freqent/tests/brussfield/calculations/calculate_epr.py", "max_stars_repo_name": "lab-of-living-matter/freqent", "max_stars_repo_head_hexsha": "210d8f25a59894d903c42d52e5475900303f9631", "max_stars...
import face_recognition from scipy import misc import numpy as np from skimage import transform import os.path for i in range(1200): image_numpy = misc.imread('/media/rob/Ma Book1/mugshots/aligned/alignedFace'+str(i)+'.jpg') image_numpy = np.flip(image_numpy, axis=1) image_numpy = misc.imsave('/media/rob/M...
{"hexsha": "01d6b3ac13622fe1f8a78bc4a04ae265422f6916", "size": 462, "ext": "py", "lang": "Python", "max_stars_repo_path": "datavis/faceFlipper.py", "max_stars_repo_name": "carykh/celebrityFaces", "max_stars_repo_head_hexsha": "7513ae9562a51e89e0ae5ec33db309e2cb16192b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
{"hexsha": "a7d3910d21a71c536578588f608ef48af95ac53c", "size": 2989, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/prop/gtensor/dhf.py", "max_stars_repo_name": "y-yao/pyscf_arrow", "max_stars_repo_head_hexsha": "079088a5d92af1570167004f411207deb104a1bb", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
#!/usr/bin/env python import numpy as np import os import torch from torch import nn import warnings import models from scipy.signal import resample import math import pandas as pd import shutil from get_12ECG_features import get_12ECG_features #os.environ['CUDA_VISIBLE_DEVICES'] = '0' if torch.cuda.is_available(): ...
{"hexsha": "c13ebc85125eb130063052fdaa1265dc4a5647ab", "size": 7427, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_12ECG_classifier.py", "max_stars_repo_name": "ZhaoZhibin/Physionet2020model", "max_stars_repo_head_hexsha": "ea7379bd1e4c145c84fd254faa0d5d1330cd2f6e", "max_stars_repo_licenses": ["BSD-2-Claus...
// // The MIT License(MIT) // // Copyright(c) 2014 Demonsaw LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, c...
{"hexsha": "ec245c7b234d40842ca6ed275b92666e1745b42d", "size": 19455, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ds2/qt_demonsaw/pane/client/client_communication_pane.cpp", "max_stars_repo_name": "demonsaw/Code", "max_stars_repo_head_hexsha": "b036d455e9e034d7fd178e63d5e992242d62989a", "max_stars_repo_license...
import theano import theano.tensor as T import theano.tensor.nlinalg as nlinalg import theano.gof as gof import numpy as np import numerical.numpyext.linalg as ntl class CholeskyInvJitterOp(theano.Op): __props__ = ('lower', 'destructive') def __init__(self, lower=True, maxiter=10): self.lower = lower...
{"hexsha": "498b3a070ca9b24d836c22aec91d2aab63ba84de", "size": 2169, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/numerical/theanoext/operations/cholesky.py", "max_stars_repo_name": "dmytrov/gaussianprocess", "max_stars_repo_head_hexsha": "7044bd2d66f44e10656fee17e94fdee0c24c70bb", "max_stars_repo_licens...
import shapely.geometry import numpy as np import fiona.crs import pyproj from shapely.geometry.point import Point UTM_ZONE30 = pyproj.Proj( proj='utm', zone=30, datum='WGS84', units='m', errcheck=True) schema = {'geometry': 'LineString', 'properties': {'PhysID': 'int'}} crs = fiona.crs.from_string...
{"hexsha": "1a41d2112e579b449fc47301d00b17852994dafa", "size": 1535, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/discrete_turbines/qmesh/shapefile_generation.py", "max_stars_repo_name": "jrper/thetis", "max_stars_repo_head_hexsha": "3c08a2e6947552119232fefd7380fa61b2a9b84b", "max_stars_repo_licenses...
module Endpoints using ..Pages export Endpoint, endpoints, method, servefile, servefolder export GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH struct Method{M} end struct Endpoint handlers::Dict{Symbol,HTTP.RequestHandlerFunction} route::String function Endpoint(handle,route,method::Meth...
{"hexsha": "9d43397a9564deb15745e93c383958b0f6350b42", "size": 1774, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Endpoints.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Pages.jl-7c165e09-dada-5b64-9fdc-39b801c58527", "max_stars_repo_head_hexsha": "b626454e82da21659e9ca822e94dbdf220652917", "...
# -*- coding: utf-8 -*- __all__ = ["USE_AESARA", "aesara", "sparse", "change_flags", "ifelse"] USE_AESARA = False try: import aesara except ImportError: aesara = None else: try: import pymc3.theanof # noqa except ImportError: USE_AESARA = True if aesara is None or not USE_AESARA: ...
{"hexsha": "665f49940ae0710f5643411d2b8753087e00a6bb", "size": 1050, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/aesara_theano_fallback/compat.py", "max_stars_repo_name": "dfm/aesara-theano-fallback", "max_stars_repo_head_hexsha": "9b7ba725ed9c25fa0ec457b183d4dfa3ad6874ab", "max_stars_repo_licenses": ["M...
import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from ccgnet import experiment as exp from ccgnet import layers import tensorflow as tf import numpy as np import time from sklearn.metrics import balanced_accuracy_score from ccgnet.Dataset import Dataset, DataLoader d...
{"hexsha": "f75ddd83bbbdb79643ecaca64767c649ff74c687", "size": 9283, "ext": "py", "lang": "Python", "max_stars_repo_path": "BayesOpt/BayesOpt-GraphCNN.py", "max_stars_repo_name": "Saoge123/ccgnet", "max_stars_repo_head_hexsha": "9359c642bd1faa4c15cae829615385761ebd8d92", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
C Copyright(C) 1999-2020 National Technology & Engineering Solutions C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with C NTESS, the U.S. Government retains certain rights in this software. C C See packages/seacas/LICENSE for details SUBROUTINE VERSION(QAINFO) include 'params.blk' ...
{"hexsha": "727c9050c20d1afbf392b603379f7e057a9f0c29", "size": 591, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/blot/bl_version.f", "max_stars_repo_name": "jschueller/seacas", "max_stars_repo_head_hexsha": "14c34ae08b757cba43a3a03ec0f129c8a168a9d3", "max_stars_repo_licenses": ["P...
from skimage import measure import numpy as np np.random.seed(123) try: from MulticoreTSNE import MulticoreTSNE as TSNE except: from sklearn.manifold import TSNE from tqdm import tqdm from phathom.preprocess.filtering import gaussian_blur try: from mayavi import mlab except: mlab = None import matplotli...
{"hexsha": "e887491dd8cb3e8fec2bfd8cef8828cb6e7a2fc2", "size": 8891, "ext": "py", "lang": "Python", "max_stars_repo_path": "phathom/phenotype/mesh.py", "max_stars_repo_name": "chunglabmit/phathom", "max_stars_repo_head_hexsha": "304db7a95e898e9b03d6b2640172752d21a7e3ed", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
program problem_4b !! In your batch file, how many passports are valid? use aoc_utilities use iso_fortran_env implicit none integer,parameter :: chunk_size = 256 integer :: iunit, istat, n_lines, record_num, i, j, n_valid, ival, n, c character(len=:),allocatable :: line, key, val logical :: status_ok type(string),...
{"hexsha": "b169d14676a6a1500854ec5a93ef5a6e8166d2fb", "size": 4684, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/day4/problem_4b.f90", "max_stars_repo_name": "jacobwilliams/AoC-2020", "max_stars_repo_head_hexsha": "2adf673a0ac62710fc5461576feb95bf5fae4cf2", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
import numpy.random as rnd from scipy import stats import numpy as np def AWGN_IS(x, snr, seed=None): rng = rnd.default_rng(0) noise_sigma = 10 ** (-snr / 20) n, n_trials = x.shape mu, sigma = 0, noise_sigma mu_biased, sigma_biased = 0.5, noise_sigma noise = np.zeros(x.shape, dtype=float) ...
{"hexsha": "513cf8aa3149a3cff19230c5a9a932a61fb36f02", "size": 949, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyldpc/channel.py", "max_stars_repo_name": "LingruiZhu/pyldpc-master", "max_stars_repo_head_hexsha": "b85dc1121a821e48c5e18168dd68ca5a21cf5a22", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
""" Class for serving and recording post-processed live data The functions which are the tasks to be performed must be defined outside the class. I don't recall why. This should be looked into. The generalplan here is this:: -------------------------------- reader hands packets to 16 unpackers ...
{"hexsha": "507537a5ef25b8aaa30e86b68045915254ab0155", "size": 21380, "ext": "py", "lang": "Python", "max_stars_repo_path": "BackEnds/data_server-daemon.py", "max_stars_repo_name": "SDRAST/MonitorControl", "max_stars_repo_head_hexsha": "3aaa0b93be3e6d5c2ad8f8e3423cf51fed6dcd8e", "max_stars_repo_licenses": ["Apache-2.0"...
import gpflow import tensorflow as tf tf.config.run_functions_eagerly(True) import pandas as pd import numpy as np import matplotlib.pyplot as plt import warnings import os import operator plt.style.use("ggplot") warnings.filterwarnings('ignore') np.random.seed(0) def pred_x(model, patient_idx, X, Y, cl...
{"hexsha": "7fc2a6315c9140012ed3de402683890c0075e393", "size": 4002, "ext": "py", "lang": "Python", "max_stars_repo_path": "hgpmoe/plot.py", "max_stars_repo_name": "bee-hive/HGP-MOE", "max_stars_repo_head_hexsha": "b1f753b3e82f8cedcbb3d29381ae0eb6a4755bc1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
from numpy.testing import * import numpy as np rlevel = 1 class TestRegression(TestCase): def test_polyfit_build(self,level=rlevel): """Ticket #628""" ref = [-1.06123820e-06, 5.70886914e-04, -1.13822012e-01, 9.95368241e+00, -3.14526520e+02] x = [90, 91, 92, 93, 94, 95, 96, ...
{"hexsha": "189b2e48131a8b33c2d231c9030808384c3eff24", "size": 1408, "ext": "py", "lang": "Python", "max_stars_repo_path": "GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/lib/tests/test_regression.py", "max_stars_repo_name": "miguelsousa/robothon", "max_stars_repo_head_hexsha": "f2ac88884e04a...
#include <boost/spirit/home/support/utree/utree_traits_fwd.hpp>
{"hexsha": "826eb38d64fe9441912ebaf540d8b87697a1fd27", "size": 64, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_spirit_home_support_utree_utree_traits_fwd.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo...
import torch import torch.nn as nn import torch.nn.utils.prune as prune import numpy as np import custom_modules.custom_modules as modules def compute_group_lasso_mask(inputTensor: torch.Tensor, clusterSize: int, threshold: float) -> torch.Tensor: mask = torch.zeros_like(inputTensor, dtype=torch.float) input...
{"hexsha": "1a2516513a2f299090c0e07fa4a3c53696b23d6c", "size": 14243, "ext": "py", "lang": "Python", "max_stars_repo_path": "develop/pruning/pruning.py", "max_stars_repo_name": "mustard-seed/SparseNN_training", "max_stars_repo_head_hexsha": "267a1fb5bed650e66ad5cf3d98069891bb307aec", "max_stars_repo_licenses": ["Apache...
#!/usr/bin/env python # coding: utf-8 # # MLFlow Pre-packaged Model Server AB Test Deployment # In this example we will build two models with MLFlow and we will deploy them as an A/B test deployment. The reason this is powerful is because it allows you to deploy a new model next to the old one, distributing a percent...
{"hexsha": "4b38bf16f1a86b506d9a09c6ade7c394440d1a47", "size": 12019, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/jupyter_execute/examples/models/mlflow_server_ab_test_ambassador/mlflow_server_ab_test_ambassador.py", "max_stars_repo_name": "edshee/seldon-core", "max_stars_repo_head_hexsha": "78c10fbca16a...
// Warning! This file is autogenerated. #include <boost/text/collation_table.hpp> #include <boost/text/collate.hpp> #include <boost/text/data/all.hpp> #ifndef LIMIT_TESTING_FOR_CI #include <boost/text/save_load_table.hpp> #include <boost/filesystem.hpp> #endif #include <gtest/gtest.h> using namespace boost::text; ...
{"hexsha": "e16b40e6b9fe0ae2292d2021dee8f5cc72b0cc33", "size": 161782, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/tailoring_rule_test_my_standard_001.cpp", "max_stars_repo_name": "eightysquirrels/text", "max_stars_repo_head_hexsha": "d935545648777786dc196a75346cde8906da846a", "max_stars_repo_licenses": [...
import copy import vnmrjpy as vj import numpy as np import matplotlib.pyplot as plt class Lmafit(): """Low-rank matrix fitting algorithm Fills missing matrix elements by low rank approximation ref.: paper """ def __init__(self,init_data,\ known_data='NOT GIVEN',\ t...
{"hexsha": "8fb63a9fda5d3cd0d08613403f4f13a427ec181d", "size": 6409, "ext": "py", "lang": "Python", "max_stars_repo_path": "vnmrjpy/aloha/lmafit.py", "max_stars_repo_name": "hlatkydavid/vnmrjpy", "max_stars_repo_head_hexsha": "48707a1000dc87e646e37c8bd686e695bd31a61e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Low Level Functions import types import random import math import time euler = 2.718281828 ############################################## # 1. Matrix Initializations --- ############################################## def size(matrix): return len(matrix),len(matrix[0]) def zeros(m,n): # Create zero mat...
{"hexsha": "7219c48835a870c36554a78c0ec53856e9ab47fd", "size": 38005, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/matrix.py", "max_stars_repo_name": "MKLab-ITI/DanceAnno", "max_stars_repo_head_hexsha": "fad9985bf0843c3b95895df946c3caeee4e42210", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
from __future__ import division, print_function, absolute_import import pytest import numpy as np from scipy.spatial.transform import Rotation from scipy.optimize import linear_sum_assignment from scipy.spatial.distance import cdist from scipy.constants import golden as phi from scipy.spatial import cKDTree TOL = 1...
{"hexsha": "5407bcc643f76cac64d7489d046c3a3ecaace146", "size": 5060, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/spatial/transform/tests/test_rotation_groups.py", "max_stars_repo_name": "TNonet/scipy", "max_stars_repo_head_hexsha": "84d0b611f08187a2259a86a4ad5ed7295632c570", "max_stars_repo_licenses": ...
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import category_theory.category import pseudoelements import tactic.combinators import tactic.chase_tactic open category_theory open category_theory.abelian open cate...
{"author": "TwoFX", "repo": "lean-homological-algebra", "sha": "e3a8e4ecaf49bec6c7b38b34c0b8f9749e941aa8", "save_path": "github-repos/lean/TwoFX-lean-homological-algebra", "path": "github-repos/lean/TwoFX-lean-homological-algebra/lean-homological-algebra-e3a8e4ecaf49bec6c7b38b34c0b8f9749e941aa8/src/tactic/commutativity...
# Copyright (c) 2020 Matthew Earl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distr...
{"hexsha": "35cc72f9540d05918002837cba0c2a1fd2bd4d53", "size": 9447, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyquake/blendmdl.py", "max_stars_repo_name": "proteanblank/pyquake", "max_stars_repo_head_hexsha": "26818b92bf648d897975993a3c40a78d7a5c1a9e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# coding: utf8 # coding: utf8 import sys import os from sys import argv sys.path.insert(0, os.getcwd()) # adds current directory to python path import numpy as np import matplotlib.pylab as plt #################### # Recovery of Data #################### folder_name = "" pathIn = "crocoddyl_eval/test_4/log_eval/"...
{"hexsha": "4a3cf0ebbf9dcb5b6fa817c7123663bfad625166", "size": 1948, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/quadruped_reactive_walking/crocoddyl_eval/test_4/analyse_simu.py", "max_stars_repo_name": "nim65s/quadruped-reactive-walking", "max_stars_repo_head_hexsha": "1e0f4069fd11af85abf10bfc8f9d662...
# targets for phase in / phase out of policies pinft = 0.4*pinf_o # infection prob at meeting #socialmaxyyt = 2 # max no. people met outside firm young_young #socialmaxoyt = 1 # max no. people met outside firm old_young #socialmaxoot = 0.5 # max no. people met outside firm old_old #phomeofficet = 1 #pshopt = [[0.85...
{"hexsha": "a4ff8ec76637bfc0292f33425fc69db1686ec9e5", "size": 719, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "policy_only_xi.jl", "max_stars_repo_name": "jasperhepp/ace_covid19", "max_stars_repo_head_hexsha": "d2ba0c066ccfdb2523c03f3fc334e0ef4c102adc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
module fftpack_precision ! Explicit typing only implicit none ! Everything is private unless stated otherwise private public :: wp, ip public :: pimach, epmach !----------------------------------------------- ! Dictionary: precision constants !-------------------------------------...
{"hexsha": "00b8720ad320c94ba8e10946260ece6162f14fca", "size": 1647, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/fftpack_precision.f90", "max_stars_repo_name": "jbdv-no/modern_fftpack", "max_stars_repo_head_hexsha": "6909d44988925dcae1ee478c06be31e5605d3974", "max_stars_repo_licenses": ["MIT"], "max_st...
import datetime import glob import imageio import json import numpy as np import os import psutil import subprocess import sys import time import models import tensorflow as tf import keras.backend as K from keras.utils import generic_utils from keras.optimizers import Adam, SGD # Utils sys.path.append("../utils") ...
{"hexsha": "77b18e35a369fa155e8e4ce837ccff7c0eafbf5d", "size": 16066, "ext": "py", "lang": "Python", "max_stars_repo_path": "pix2pix/src/model/train_only_generator.py", "max_stars_repo_name": "voletiv/DeepLearningImplementations", "max_stars_repo_head_hexsha": "22ec85cdc7daa308ff2bec81962ca77e5959a70b", "max_stars_repo...
#!/usr/bin/env python import rospy, roslib, sys, cv2, time import numpy as np from std_msgs.msg import Int32 from std_msgs.msg import Float64 from sensor_msgs.msg import JointState from sensor_msgs.msg import Image from visual_servoing.srv import * from std_srvs.srv import Empty as EmptySrv from gazebo_ros_link_attach...
{"hexsha": "1671c579e698b00f2a7edc5ae5c76f149f5d3a3a", "size": 6632, "ext": "py", "lang": "Python", "max_stars_repo_path": "visual_servoing/scripts/3_PickPlace_VS.py", "max_stars_repo_name": "nsabhari/Visual_Servoing", "max_stars_repo_head_hexsha": "36905434a0ad425fd44f0b5997f09e5f5a76af45", "max_stars_repo_licenses": ...
from Good_Boids_module.Update_Boids import Boids import numpy as np from nose.tools import assert_almost_equal, assert_greater from nose.tools import assert_less, assert_equal from numpy.testing import assert_array_equal import os import yaml from Good_Boids_module.tests.record_fixtures import configuration_file fixt...
{"hexsha": "790d7f2469b623df18560268f0e89fc2f0e10bab", "size": 2558, "ext": "py", "lang": "Python", "max_stars_repo_path": "Good_Boids_module/tests/test_the_Good_Boids.py", "max_stars_repo_name": "anest1s/Refactoring_the_Bad_Boids", "max_stars_repo_head_hexsha": "d569de4372d96917ef6aa7f1ca8acdaa09c26e0f", "max_stars_re...
Require Import Coq.Strings.String. Require Import Coq.PArith.BinPos. Require Import ExtLib.Core.RelDec. Require Import ExtLib.Data.String. Require Import ExtLib.Data.Nat. Require Import ExtLib.Data.HList. Require Import MirrorCore.Lemma. Require Import MirrorCore.TypesI. Require Import MirrorCore.Lambda.Expr. Require ...
{"author": "jesper-bengtson", "repo": "MirrorCharge", "sha": "cb0fe1da80be70ba4b744d4178a4e6e3afa38e62", "save_path": "github-repos/coq/jesper-bengtson-MirrorCharge", "path": "github-repos/coq/jesper-bengtson-MirrorCharge/MirrorCharge-cb0fe1da80be70ba4b744d4178a4e6e3afa38e62/MirrorCharge!/src/MirrorCharge/Java/SymEx.v"...
import numpy as np import pandas as pd from scipy.integrate import odeint from scipy import interpolate #import pressure_estimation def func(x, *params): y = np.zeros_like(x) for i in range(0, len(params), 3): ctr = params[i] amp = params[i+1] wid = params[i+2] y = y + amp * np...
{"hexsha": "0fe1a2e54ca2a4c239aac9f64012135ccf7d94d5", "size": 2132, "ext": "py", "lang": "Python", "max_stars_repo_path": "5_simulation/ode_solver_pat2.py", "max_stars_repo_name": "xi2pi/elastance-function", "max_stars_repo_head_hexsha": "ac3422b55a1958fe0ce579a2b49a977545159ccd", "max_stars_repo_licenses": ["Apache-2...
import numpy as np import pandas as pd from torch.utils.data import Dataset from torch import tensor, float32 import json from collections import defaultdict # представление очищенного датасета в pytorch class DatasetModel(Dataset): def __init__(self, df, vectorizer): self.df = df self._vectorize...
{"hexsha": "a61a876fde60c3480062cf3265e8bdb93edfb1cd", "size": 9722, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocessor.py", "max_stars_repo_name": "doksketch/happy-dating", "max_stars_repo_head_hexsha": "680c63f38fe039b6567f5fce94c3d0fa3b968019", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import os import os.path as osp import sys import argparse import json import numpy as np import pandas as pd import time import subprocess RESULTS_DIR = './results' if not osp.exists(RESULTS_DIR): os.makedirs(RESULTS_DIR) def get_args(): parser = argparse.ArgumentParser(description='gkm Protein Experiments')...
{"hexsha": "077b34ab97657959ce3db209465d11f86b14d896", "size": 1527, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/other_scripts/gkm_prot_tests.py", "max_stars_repo_name": "dblakely/FastSK", "max_stars_repo_head_hexsha": "bd0d4cef89c3d7d661f4c6abc094423ab6d1c7e1", "max_stars_repo_licenses": ["Apache-2....
#!/usr/bin/env python import sys import math import numpy as np ph2Kcal = 1.364 Kcal2kT = 1.688 class Microstate: def __init__(self, state, E, count): self.state = state self.E = E self.count = count class Conformer: def __init__(self): self.iconf = 0 self.ires = 0 ...
{"hexsha": "87c9679bf26844c79f2c522c4555931069adb57e", "size": 12887, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/ms_analysis.py", "max_stars_repo_name": "umeshkhaniya/Stable-MCCE", "max_stars_repo_head_hexsha": "b037a417e722f46030fdd5e24e5bb44513440559", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# ====================================================================== # Copyright CERFACS (October 2018) # Contributor: Adrien Suau (adrien.suau@cerfacs.fr) # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, # modify an...
{"hexsha": "16e924ae2eeebb12e8f96413b7d33463b3315d62", "size": 3031, "ext": "py", "lang": "Python", "max_stars_repo_path": "qtoolkit/maths/matrix/sud/group_commutator.py", "max_stars_repo_name": "nelimee/qtoolkit", "max_stars_repo_head_hexsha": "1e99bd7d3a143a327c3bb92595ea88ec12dbdb89", "max_stars_repo_licenses": ["CE...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
{"hexsha": "82ad69f93697bb2e3ebb91de69b7a31670866059", "size": 6277, "ext": "py", "lang": "Python", "max_stars_repo_path": "moldesign/_tests/test_pdbfixer_xface.py", "max_stars_repo_name": "Autodesk/molecular-design-toolkit", "max_stars_repo_head_hexsha": "5f45a47fea21d3603899a6366cb163024f0e2ec4", "max_stars_repo_lice...
import numpy as np from numpy.linalg import slogdet, solve from numpy import log, pi import pandas as pd from scipy.special import expit from .constants import mass_pion from .kinematics import momentum_transfer_cm, cos0_cm_from_lab, omega_cm_from_lab from .constants import omega_lab_cusp, dsg_label, DesignLabels from ...
{"hexsha": "5dce49741ed41519529ab27946095fd786abe07f", "size": 33825, "ext": "py", "lang": "Python", "max_stars_repo_path": "compton/convergence.py", "max_stars_repo_name": "buqeye/compton-scattering", "max_stars_repo_head_hexsha": "867703fc21e75155af50d543b61f794dc5bfe5a7", "max_stars_repo_licenses": ["MIT"], "max_sta...
from __future__ import absolute_import import os.path import numpy as np from PIL import Image import Levenshtein from ocrd_utils import ( getLogger, concat_padded, coordinates_for_segment, polygon_from_bbox, points_from_polygon, MIMETYPE_PAGE ) from ocrd_modelfactory import page_from_file from o...
{"hexsha": "f046f51a967b847f065ceacb1c731c56fd5ebeb3", "size": 11740, "ext": "py", "lang": "Python", "max_stars_repo_path": "ocrd_cis/ocropy/recognize.py", "max_stars_repo_name": "stweil/ocrd_cis", "max_stars_repo_head_hexsha": "e8c20e67ca78682059e20445c9a10849b9bdd7ba", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
Require Import Crypto.Arithmetic.PrimeFieldTheorems. Require Import Crypto.Specific.montgomery32_2e127m1_4limbs.Synthesis. (* TODO : change this to field once field isomorphism happens *) Definition opp : { opp : feBW_small -> feBW_small | forall a, phiM_small (opp a) = F.opp (phiM_small a) }. Proof. Set Ltac Pr...
{"author": "anonymous-code-submission-01", "repo": "sp2019-54-code", "sha": "8867f5bed0821415ec99f593b1d61f715ed4f789", "save_path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code", "path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code/sp2019-54-code-8867f5bed0821415ec99f593b1d61f715ed4f7...
#!/usr/bin/env python import os from time import time from typing import Generator, Tuple import numpy as np import click import json from .lib import * from cloudvolume import CloudVolume from cloudvolume.lib import Vec, yellow from chunkflow.lib.aws.sqs_queue import SQSQueue from chunkflow.lib.bounding_boxes impo...
{"hexsha": "cf32bd34a11df55a41df8b1367563d74cc081f97", "size": 67881, "ext": "py", "lang": "Python", "max_stars_repo_path": "chunkflow/flow/flow.py", "max_stars_repo_name": "julesberman/chunkflow", "max_stars_repo_head_hexsha": "c6af0d036bc2f308c64c591d49c94c414c569241", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# coding: utf-8 import numpy as np import talib as ta from settings import evaluete MAKER_COST = evaluete["maker_cost"] TAKER_COST = evaluete["taker_cost"] IMPACT = evaluete["impact"] SLIDE = evaluete["slide"] LEVER = evaluete["lever"] MAX_POSITION = evaluete["max_position"] STOP_EARN = evaluete["stop_earn"] STOP_LOSS...
{"hexsha": "b2099af20730ae29f4350ce5f34a843518b3270e", "size": 17023, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluete.py", "max_stars_repo_name": "gLhookniano/AlgTradeTest", "max_stars_repo_head_hexsha": "ab9bb92afe3c4ce3516fcaec0e401c2dad405080", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
from aip import AipNlp import pandas as pd import numpy as np import time # 此处输入baiduAIid APP_ID = '' API_KEY = '' SECRET_KEY = '' client = AipNlp(APP_ID, API_KEY, SECRET_KEY) def isPostive(text): try: if client.sentimentClassify(text)['items'][0]['positive_prob']>0.5: return...
{"hexsha": "6dc93cde2750b81f4abb9adf099b8b5448179552", "size": 1110, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis.py", "max_stars_repo_name": "huihui7987/weibo-topic-spider", "max_stars_repo_head_hexsha": "a7e93f1a8fac4146be36b8a594b7977fbac019f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma has_one_imp_equal: assumes "\<one> \<in> I" shows "I = R" [PROOF STATE] proof (prove) goal (1 subgoal): 1. I = R [PROOF STEP] by (metis assms lideal subset multiplicative.right_unit subsetI subset_antisym)
{"llama_tokens": 94, "file": "Grothendieck_Schemes_Comm_Ring", "length": 1}
! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package ! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! ! (C) Copyright 2021 ! ! Salvatore Filippone ! Pasqua D'Ambra ! Fabio Durastante ! ! Redistribution and us...
{"hexsha": "2c07fc4ac0fc943361561dfceb9c387f06296bcd", "size": 19255, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "amgprec/amg_s_base_aggregator_mod.f90", "max_stars_repo_name": "sfilippone/amg4psblas", "max_stars_repo_head_hexsha": "45fabb5214b27d6c67cdf8f6a82277374a059e34", "max_stars_repo_licenses": ["BS...
import numpy as np from keras.models import Sequential from keras.layers import Dense, Activation, Flatten from keras.optimizers import Adam from rl.agents.dqn import DQNAgent from rl.policy import BoltzmannQPolicy from rl.memory import SequentialMemory from solarescape_env import SolarescapeEnv import pygame from p...
{"hexsha": "f7fb00f9c1bd6ed9ba70af36b34cda97083dc27d", "size": 1889, "ext": "py", "lang": "Python", "max_stars_repo_path": "learningAgentKeras.py", "max_stars_repo_name": "kaiobarb/solarescape", "max_stars_repo_head_hexsha": "18f2c432a48e4b2fe9dc116ec7b9190ee5637401", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/env python """Tests and validates classes from :py:mod:`plastid.genomics.genome_array`, these being |GenomeArray|, |SparseGenomeArray| and |BAMGenomeArray|, using test data found in plastid.test.data. This module additionally contains utilites to generate other test datasets. To do, please see the document...
{"hexsha": "04be15ba5578baa6bcaa9a43b79d648a5dd3c6dd", "size": 76671, "ext": "py", "lang": "Python", "max_stars_repo_path": "plastid/test/unit/genomics/test_genome_array.py", "max_stars_repo_name": "joshuagryphon/plastid", "max_stars_repo_head_hexsha": "e63a818e33766b01d84b3ac9bc9f55e6a1ece42f", "max_stars_repo_license...
import os import sys import numpy as np from datetime import datetime from functools import wraps from time import time def stop_watch(func): @wraps(func) def wrapper(*args, **kargs): start = time() log = "[START] {}: {}() | PID: {} ({})".format(sys.argv[0], func.__qualname__, os.getpid(), da...
{"hexsha": "f3a5c70c632d9aa7c024166164e712b6f72881dd", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/common.py", "max_stars_repo_name": "j20232/kaggle_earthquake", "max_stars_repo_head_hexsha": "47fac5f2e8d2ad4fab82426a0b6af18b71e4b57b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
!----------------------------------------------------------------------------- best with 100 columns !> finite element discretizations module modBasicFEM public contains !> find Laplacian operator !> NOTE: A must be pre-initialized to contain the temporary CSR matrix with duplications subroutine findLapl...
{"hexsha": "539016d7a005dd5ffb883c0807e79105aa75e8e0", "size": 4428, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/libfosolvers/FEM/basicFEM.f90", "max_stars_repo_name": "mianzhi/fosolvers", "max_stars_repo_head_hexsha": "be4877a9cccd7bf6b97d4e01c58e10634684415d", "max_stars_repo_licenses": ["BSD-2-Claus...
import numpy as np import torch import torch.nn from .nnutils import Network, one_hot, extract class QNet(Network): def __init__(self, n_features, n_actions, n_hidden_layers=1, n_units_per_layer=32): super().__init__() self.n_actions = n_actions self.layers = [] if n_hidden_layers...
{"hexsha": "7e883e083b9bdf2eaf1bc78f3c870a14abb0d75b", "size": 867, "ext": "py", "lang": "Python", "max_stars_repo_path": "markov_abstr/gridworld/models/qnet.py", "max_stars_repo_name": "camall3n/regenernet", "max_stars_repo_head_hexsha": "c1b23624bf8ded7c1dadb858de90f58838586413", "max_stars_repo_licenses": ["MIT"], "...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 4 10:08:24 2020 @author: hannes """ #General imports import matplotlib.image as mpimg import matplotlib.pyplot as plt import os import numpy as np import skimage as skimage """ NOTE: In order to generate the image sequence we can run following ...
{"hexsha": "35e328eb78014fabbd3a0e9796442715aa1ba084", "size": 2206, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Utilities/BariumCloudPreprocessing.py", "max_stars_repo_name": "hsiehScalAR/AdaptiveSamplingIntermittentComms", "max_stars_repo_head_hexsha": "5aec4677fbe3f3bf19213ae6abe4d5ea8b4d052c", "max_s...
[STATEMENT] lemma lemma_2_8_i1: "a \<in> supremum A \<Longrightarrow> a r\<rightarrow> b \<in> infimum ((\<lambda> x . x r\<rightarrow> b)`A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a \<in> supremum A \<Longrightarrow> a r\<rightarrow> b \<in> infimum ((\<lambda>x. x r\<rightarrow> b) ` A) [PROOF STEP] by ...
{"llama_tokens": 147, "file": "PseudoHoops_PseudoHoops", "length": 1}
from .provider_test import ProviderTest from gunpowder import ( RandomLocation, BatchProvider, Roi, Coordinate, ArrayKeys, ArrayKey, ArraySpec, Array, Roi, Coordinate, Batch, BatchRequest, BatchProvider, RandomLocation, MergeProvider, build, ) import numpy...
{"hexsha": "46c4b2a97ceb2077366e92ba1bb426b9bbad0887", "size": 4599, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/cases/random_location.py", "max_stars_repo_name": "trivoldus28/gunpowder", "max_stars_repo_head_hexsha": "97e9e64709fb616e2c47567b22d5f11a9234fe48", "max_stars_repo_licenses": ["MIT"], "max_...
"""Provides a data proxy for deferring access to data from a mongoDB query.""" from bson.objectid import ObjectId import numpy as np import pymongo # Inspired by https://github.com/SciTools/iris/blob/master/lib/iris/fileformats/netcdf.py#L418. class MongoDBDataProxy: """A proxy to the data of a single TileDB ar...
{"hexsha": "fede0828c39328da7781c617b8e1ca9510c99dec", "size": 2112, "ext": "py", "lang": "Python", "max_stars_repo_path": "metadatabase/data_proxy.py", "max_stars_repo_name": "informatics-lab/metadatabase", "max_stars_repo_head_hexsha": "380cfd683cc28d57bfc20b1965ed884541e63a6c", "max_stars_repo_licenses": ["BSD-3-Cla...
import argparse import copy import json import os import random import torch import sys import numpy as np import multiprocessing as mp from audio_conditioned_unet.dataset import iterate_dataset, load_dataset, NonSequentialDatasetWrapper from audio_conditioned_unet.network import ConditionalUNet from audio_conditio...
{"hexsha": "a755e8f0d0d91c58b422a434e05b50846b312721", "size": 9864, "ext": "py", "lang": "Python", "max_stars_repo_path": "audio_conditioned_unet/train_model.py", "max_stars_repo_name": "CPJKU/audio_conditioned_unet", "max_stars_repo_head_hexsha": "68f20f5280079e99be260f9fe9933c0064eb2d7f", "max_stars_repo_licenses": ...
import os import os.path as osp import pandas as pd import numpy as np from PIL import Image import multiprocessing import argparse ################################################################################ # Evaluate the performance by computing mIoU. # It assumes that every CAM or CRF dict file is already infe...
{"hexsha": "381e8ed2e6ad8d070064cbd4f888eb6cea607b8f", "size": 6870, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation.py", "max_stars_repo_name": "KAIST-vilab/OC-CSE", "max_stars_repo_head_hexsha": "35703390e13621a865aef4d9b75202c8c9e5822b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 16, "m...
import aiofiles import asyncio import simpleaudio as sa import numpy as np import struct from datetime import datetime import av from av.audio.fifo import AudioFifo ''' 卡顿原因 读取 io操作会导致进程卡住,所以必须异步化 测试AudioFifo ''' async def read_header_wav_async(f): #RIFF await f.read(12) #FORMAT id_chunk = a...
{"hexsha": "88083bb429a32d9ba2132278a7cd23be4bfc6f73", "size": 7497, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_play_parse_wav_fifo_async.py", "max_stars_repo_name": "xuqinghan/flv-extract-audio-and-video", "max_stars_repo_head_hexsha": "e4c0c42119e6ea4478817c04e21ffe341bfc4189", "max_stars_repo_licens...
# TODO: Need to finish # Need to test function fit_fs_imcmc_pt!(cfs::ConstantsFS, dfs::DataFS; nmcmc::Int, nburn::Int, # Args for PT: tempers::Vector{Float64}, inits=nothing, ...
{"hexsha": "404e7715dd8e3171af5b918681e8f4a0e17f439b", "size": 9297, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Model/FeatureSelect/fit_feature_select_imcmc_pt.jl", "max_stars_repo_name": "luiarthur/CytofRepFAM.jl", "max_stars_repo_head_hexsha": "1f997d1620d74861c5bde5559ebdd1e6c449b9e7", "max_stars_repo...
[STATEMENT] lemma ideal_generated_subset2: assumes ac: "ideal_generated {a} \<subseteq> ideal_generated {c}" and bc: "ideal_generated {b} \<subseteq> ideal_generated {c}" shows "ideal_generated {a,b} \<subseteq> ideal_generated {c}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ideal_generated {a, b} \<subset...
{"llama_tokens": 3276, "file": "Echelon_Form_Rings2", "length": 43}
function class_info=gen_class_info_nyud() class_info=[]; class_info.class_names={ 'wall' 'floor' 'cabinet' 'bed' 'chair' 'sofa' 'table' 'door' 'window' 'bookshelf' 'picture' 'counter' 'blinds' 'desk' 'shelves' 'curtain' 'dresser' 'pillow' 'm...
{"author": "guosheng", "repo": "refinenet", "sha": "0d62007bd60ba983d48acaee6ee29988c7171a91", "save_path": "github-repos/MATLAB/guosheng-refinenet", "path": "github-repos/MATLAB/guosheng-refinenet/refinenet-0d62007bd60ba983d48acaee6ee29988c7171a91/main/gen_class_info_nyud.m"}
#!/usr/bin/env python3 import numpy as np import pickle #this file is a bit messy as both value models and deep cfr models #both use these methods stateSize = 3883 #3883 is the state size #186 is the action size inputShape = (stateSize + 2 * 186,) #number of possible actions, which is used for our enumeration numA...
{"hexsha": "1a9edc0feb6d63a6f79340ea487fd9500ef14fd0", "size": 11177, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/modelInput.py", "max_stars_repo_name": "samhippie/shallow-red", "max_stars_repo_head_hexsha": "5690cdf380c6e138e25d88e85093738951438298", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from __future__ import absolute_import, division, print_function import argparse parser = argparse.ArgumentParser() parser.add_argument('--gpu_id', type=int, default=0) args = parser.parse_args() gpu_id = args.gpu_id # set GPU id to use import os; os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_id) import numpy as np ...
{"hexsha": "e0d0fdcc89fe1b9335d19a415e0b625b6a6d9c5d", "size": 9107, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp_shapes/train_shapes_gt_layout.py", "max_stars_repo_name": "YuJiang01/n2nnmn", "max_stars_repo_head_hexsha": "f0d751313ca756fe40ece1a7bbb0205ab899adf8", "max_stars_repo_licenses": ["BSD-2-Claus...
from edgetpu.detection.engine import DetectionEngine import numpy as np from PIL import Image class face_detection(): MODEL = 'models/ssd_mobilenet_v2_face_quant_postprocess_edgetpu.tflite' def __init__(self, threshold=0.5, num_results=10): self.engine = DetectionEngine(face_detection.MODEL) self.objs = None s...
{"hexsha": "38be4936bb1d9fb1db75548ed9b1d63e90623475", "size": 1028, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/ctrlengine/ai/face_detection.py", "max_stars_repo_name": "0xJeremy/ctrl.engine", "max_stars_repo_head_hexsha": "19abba70df149a05edc5722cc95ceacc538448e6", "max_stars_repo_licenses": ["MI...
import pytest import xarray as xr import numpy as np import dask.array as da from xrspatial.utils import has_cuda from xrspatial.utils import doesnt_have_cuda from xrspatial.multispectral import arvi from xrspatial.multispectral import ebbi from xrspatial.multispectral import evi from xrspatial.multispectral import ...
{"hexsha": "52e4c6e8e4b998273214d9bfb55a78d2848db1cc", "size": 23503, "ext": "py", "lang": "Python", "max_stars_repo_path": "xrspatial/tests/test_multispectral.py", "max_stars_repo_name": "brendancol/xarray-spatial", "max_stars_repo_head_hexsha": "36d53b75086b760cab5100a12fcbda946dd85a25", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- """ Created on Fri Jan 25 18:04:22 2019 @author: wt4452 """ from time import time import numpy as np import numpy.linalg as la import meshio as mo reload(mo) in_abq = False try: from abaqus import * from abaqusConstants import ( NODAL, INTEGRATION_POINT, CEN...
{"hexsha": "9f99c9e56b53f8eef0d398ba2819588adf30c7c2", "size": 30308, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/abaqus/abq_meshio/abq_meshio_converter.py", "max_stars_repo_name": "siegfriedgalkinkit/meshio", "max_stars_repo_head_hexsha": "8c2ccf62d1841258df92fe6badd424fe845f9ff9", "max_stars_repo_l...
import pytest from ffai.core.model import D3, D6, D8, BBDie from ffai.core.table import BBDieResult import numpy as np @pytest.mark.parametrize("die", [D3, D6, D8, BBDie]) def test_d_die(die): results = [] n = 6 if die == D3: n = 3 elif die == D8: n = 8 elif die == BBDieResult: ...
{"hexsha": "51af5d3ad267bfd4a865544c37f350b0c8f39c19", "size": 3333, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/game/test_dice.py", "max_stars_repo_name": "gsverhoeven/ffai", "max_stars_repo_head_hexsha": "673ff00e1aac905381cdfb1228ccfcfccda97d1f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
/* Copyright (c) 2013, Illumina Inc. 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 following ...
{"hexsha": "5fcf895b181fbb0c6531bd19ed3efb645e85246c", "size": 23427, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "es3/connection.cpp", "max_stars_repo_name": "Cyberax/extremes3", "max_stars_repo_head_hexsha": "dc95b65a84778defc8fcc6d55554de2670cef6fc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
# *-* coding: utf-8 *-* """Read MPT DAS-1 data files. TODO: """ import re import pandas as pd import numpy as np from reda.tdip.decay_curve import DecayCurveObj # from reda.importers.utils.decorators import enable_result_transforms def get_frequencies(filename, header_row): """Read the used frequencies in he...
{"hexsha": "ebe42df0f92d8a76e12e9bba56f1aca6d03c392c", "size": 17057, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/reda/importers/mpt_das1.py", "max_stars_repo_name": "j-hase/reda", "max_stars_repo_head_hexsha": "b6419c39842cfbdd9380a27a5c6e9a04ccaeb294", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python ###################### ## written by Wojciech Dudek ###################### __author__ = "Wojciech Dudek" from nav_msgs.msg import Odometry from tf import transformations import tf import rospy import sys import signal from sensor_msgs.msg import Imu from rapp_ros_naoqi_wrappings.srv import GetRob...
{"hexsha": "9bd355fe52abfc1da48af0219701738858737282", "size": 21111, "ext": "py", "lang": "Python", "max_stars_repo_path": "rapp_ros_naoqi_wrappings/nodes/rapp_navigation/acore_estimator_server.py", "max_stars_repo_name": "rapp-project/rapp-robot-nao", "max_stars_repo_head_hexsha": "588061c630b1a8f69791eb603ff52db1e3e...
import math def RP(x,y,z): s = 1; while(x>0): if(x%2==1): s=(s*y)%z; x=x//2; y=(y*y)%z; return int(s); def egcd(a, b): u1=1; v1=0; u2=0; v2=1; while(b>0): r=a%b q=a//b ...
{"hexsha": "b31e5c03ee58998b825a666af1837105a2efffd4", "size": 2851, "ext": "py", "lang": "Python", "max_stars_repo_path": "Modules/15IT152_15IT119_M2/15IT152_15It119_M2_attacks/silver-pohlig-hellman.py", "max_stars_repo_name": "HimadriP/RSA_attacks", "max_stars_repo_head_hexsha": "db58478a33f0dffe492b9a626bf0a4a055682...
import numpy as np from sklearn.preprocessing import StandardScaler from sklearn import linear_model from sklearn.metrics import mean_squared_error from sklearn.svm import LinearSVC from neuraxle.base import ExecutionContext from neuraxle.data_container import DataContainer from neuraxle.hyperparams.distributions impo...
{"hexsha": "a29d1e69dd9e073eec78e4d6662e3a53246348df", "size": 11526, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/metaopt/test_automl.py", "max_stars_repo_name": "vincent-antaki/Neuraxle", "max_stars_repo_head_hexsha": "cef1284a261010c655f8ef02b4fca5b8bb45850c", "max_stars_repo_licenses": ["Apache-2....
"""Data utility functions.""" import os import numpy as np import scipy.io import torch import torch.utils.data as data import h5py class ImdbData(data.Dataset): def __init__(self, X, y, w): self.X = X self.y = y self.w = w def __getitem__(self, index): img = self.X[index] ...
{"hexsha": "f6416ecd1ab0a3fe4e43792d677eec16a0e74dbd", "size": 3350, "ext": "py", "lang": "Python", "max_stars_repo_path": "networks/data_utils.py", "max_stars_repo_name": "Nikolay1998/relaynet_pytorch", "max_stars_repo_head_hexsha": "b4eecc28020b2a7f7a8cf9618558f968788b14c2", "max_stars_repo_licenses": ["MIT"], "max_s...
r"""Diffusion of an acoustic wave in 1-d (5 minutes) Propagation of acoustic wave particles have properties according to the following distribuion .. math:: \rho = \rho_0 + \Delta\rho sin(kx) p = p_0 + c_0^2\Delta\rho sin(kx) u = c_0\rho_0^{-1}\Delta\rho sin(kx) with :math:`\Delta\rho = 1e-6` ...
{"hexsha": "517b4b735ff29ae4d1227aadc7c588ccd834345e", "size": 5467, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysph/examples/gas_dynamics/acoustic_wave.py", "max_stars_repo_name": "nauaneed/pysph", "max_stars_repo_head_hexsha": "9cb9a859934939307c65a25cbf73e4ecc83fea4a", "max_stars_repo_licenses": ["BSD-3...
#!/usr/bin/python """ Test to compare PPF loop calculations against Maryam's MATLAB code """ import numpy as np from riglib.bmi import ppfdecoder, state_space_models as ssm from scipy.io import loadmat, savemat from riglib.bmi.sim_neurons import PointProcessEnsemble import matplotlib.pyplot as plt from riglib.bmi impo...
{"hexsha": "1e6813b230f1f2efcc13864bd6d235d1dcdb54b2", "size": 3321, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ppf/test_point_proc_decoding.py", "max_stars_repo_name": "DerekYJC/bmi_python", "max_stars_repo_head_hexsha": "7b9cf3f294a33688db24b0863c1035e9cc6999ea", "max_stars_repo_licenses": ["Apache-...
# # -*- coding:utf-8 -*- # &Author AnFany # 将mnist数据集或者Fashion-MNIST数据集转换为图片 # 因为两个数据集的格式是完全一致的,因此程序可以共用 import struct from PIL import Image import numpy as np import os Path = r'C:\Users\GWT9\Desktop' # 存储下面4个文件的路径 os.chdir(Path) # 设置为当前的工作路径 # 训练图片文件 train_images = 'train-images-idx3-ubyte' ...
{"hexsha": "352c378b9caa509d78cf7ea46be5d16a7799ca40", "size": 3341, "ext": "py", "lang": "Python", "max_stars_repo_path": "CNN/mnist_to_fig.py", "max_stars_repo_name": "Jojoxiao/Machine-Learning-for-Beginner-by-Python3", "max_stars_repo_head_hexsha": "71b91c9cba5803bd78d4d31be6dabb1d3989e968", "max_stars_repo_licenses...
from rdkit import Chem from rdkit.Chem import rdchem, Descriptors import numpy periodicTable = rdchem.GetPeriodicTable() def getChinp(mol,NumPath=2): """ ################################################################# Calculation of molecular connectivity chi index for path order n ################...
{"hexsha": "c391b043939fe06f6e69d9ac5a2d53eacdac6ccb", "size": 12681, "ext": "py", "lang": "Python", "max_stars_repo_path": "Desc1D2D/connectivity.py", "max_stars_repo_name": "ABorrel/molecular-descriptors", "max_stars_repo_head_hexsha": "cdc08c7242e929ecf4dcb362331c7226127c3589", "max_stars_repo_licenses": ["MIT"], "m...
cd(@__DIR__); include("setups/grid23x22.jl") gr(dpi = 200) ## frame = sgwt_frame(W; nf = 6) x = 242 for j = 1:6 plt = heatmap(reshape(frame[:, x, j], (Nx, Ny))', c = :viridis, ratio = 1, frame = :none, xlim = [1, Nx], size = (500, 400)) savefig(plt, "../figs/Grid$(Nx)x$(Ny)_SGWT_frame_j$(j-1)_x$(x)...
{"hexsha": "8a573bd89bd84febd3404fd89c3f58734dc4052c", "size": 331, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/dissertations/htli/scripts/Figure10.5.jl", "max_stars_repo_name": "BoundaryValueProblems/MTSG.jl", "max_stars_repo_head_hexsha": "8cf8e2b3035876b5ceda45109b0847a60b581a7c", "max_stars_repo_lice...
# -*- coding: utf-8 -*- """ Created on Tue Jul 20 14:38:00 2021 @author: 14488 """ import pyrealsense2 as rs import numpy as np import cv2 class IntelRealSense(): def __init__(self, RGB_resolution = (320,240), Depth_resolution = (640,480)): self.pi...
{"hexsha": "1d5b7e7c8496fc4ae5eeb5c27176d091c70325f8", "size": 2091, "ext": "py", "lang": "Python", "max_stars_repo_path": "Real UR5e/IntelRealSense.py", "max_stars_repo_name": "wq13552463699/UCD_UR5E", "max_stars_repo_head_hexsha": "513acb7e235ab940fd03c3038208678e285690f3", "max_stars_repo_licenses": ["MIT"], "max_st...