text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import os import shutil from pathlib import Path import numpy as np from .extraction_tools import load_extractor_from_pickle, load_extractor_from_dict, \ load_extractor_from_json def check_recordings_equal(RX1, RX2, return_scaled=True, force_dtype=None, check_times=True): N = RX1.get_num_frames() # get_...
{"hexsha": "a3b5a6dde33050bb8678bddfae7d60d2645066cd", "size": 8296, "ext": "py", "lang": "Python", "max_stars_repo_path": "spikeextractors/testing.py", "max_stars_repo_name": "sronchi/spikeextractors", "max_stars_repo_head_hexsha": "2d425239a9c78b6fda469b1054df3adf0d4ce8e7", "max_stars_repo_licenses": ["MIT"], "max_st...
using DiffEqBayes, OrdinaryDiffEq, ParameterizedFunctions, RecursiveArrayTools, Distributions, Test println("One parameter case") f1 = @ode_def begin dx = a*x - x*y dy = -3y + x*y end a u0 = [1.0,1.0] tspan = (0.0,10.0) p = [1.5] prob1 = ODEProblem(f1,u0,tspan,p) sol = solve(prob1,Tsit5()) t = collect(range(...
{"hexsha": "5cdf2ffc8a98366f5472cf05bee8b313bf0d6d0e", "size": 3176, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/stan.jl", "max_stars_repo_name": "JuliaDiffEq/BayesDiffEq.jl", "max_stars_repo_head_hexsha": "3f1da73c0e999e3198bb7e59f31ef2e1771bddf4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import random import numpy as np class Compose: def __init__(self, transforms, prob=1.): self.transforms = [t for t in transforms if t is not None] self.prob = prob def __call__(self, **data): if random.random() < self.prob: for t in self.transforms: ...
{"hexsha": "15be97b75ad5f3a6d14f41614cab2a74382b3b34", "size": 1213, "ext": "py", "lang": "Python", "max_stars_repo_path": "polus-cell-nuclei-segmentation/src/dsb2018_topcoders/victor/augmentations/composition.py", "max_stars_repo_name": "nishaq503/polus-plugins-dl", "max_stars_repo_head_hexsha": "511689e82eb29a8476153...
import torch import numpy as np class DeepFool(): # max_iter=50, clip_max=0.5, clip_min=-0.5 def __init__(self, max_iter, clip_max, clip_min): self.max_iter = max_iter self.clip_max = clip_max self.clip_min = clip_min def __call__(self, model, x, y): nx = torch.unsqueeze(x,...
{"hexsha": "54ff33959a75dcb3d75d6916bbb1b9cbbd012c43", "size": 1553, "ext": "py", "lang": "Python", "max_stars_repo_path": "plexiglass/adversarial/deepfool.py", "max_stars_repo_name": "jkartzman/plexiglass", "max_stars_repo_head_hexsha": "257e3305e31f032c26300b0a9c78260ccd251cd6", "max_stars_repo_licenses": ["MIT"], "m...
using PositiveFactorizations using LinearAlgebra, Test @testset "PositiveFactorizations" begin for pivot in (Val{false}, Val{true}) A = [1 0; 0 1] F = cholesky(Positive, A, pivot) @test Matrix(F) ≈ A F, d = ldlt(Positive, A, pivot) @test Matrix(F) ≈ A @test d == [1,1] A = [1 0; 0 -1] F...
{"hexsha": "801b13922a8988e0356dff60183e15a9e89be478", "size": 1900, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/PositiveFactorizations.jl-85a6dd25-e78a-55b7-8502-1745935b8125", "max_stars_repo_head_hexsha": "12fb36039fa463d4e4b2a297154...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [raw] raw_mimetype="text/restructuredtext" # .. ...
{"hexsha": "bfcdc2e0c93fb09bcaa2ed94d3130ab10d310da9", "size": 13745, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/basics.py", "max_stars_repo_name": "zmoon92/proplot", "max_stars_repo_head_hexsha": "2c6f7af8a044567bb9409d3f67d844bac05c7d14", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import os import pytest from unittest.mock import patch from intake import open_catalog import dask.dataframe as dd @pytest.fixture def local_prefix_cat(): path = os.path.dirname(__file__) return open_catalog(os.path.join(path, 'data', 'local.cata...
{"hexsha": "c467ca5bb140386c9f03a7f6e80576ceb415b2d4", "size": 1434, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_catalog.py", "max_stars_repo_name": "hamed2005/intake-azure-blob-storage", "max_stars_repo_head_hexsha": "314f67c9c46d8fab69c2deb5d643417989519f54", "max_stars_repo_licenses": ["BSD-2-C...
import numpy as np import matplotlib.pyplot as plt from ipywidgets import interactive, interactive_output, fixed, HBox, VBox import ipywidgets as widgets def get_interactive_logistic_regression(X, y): fig = plt.figure(figsize=(10,8)) ax = fig.add_subplot(1, 1, 1) xmin = X.min(axis=0) xmax = X.max(axi...
{"hexsha": "27a1e1fb1476823036287c8e8336a27558029c7b", "size": 18511, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_1_connectionist_neuron/utils_logistic.py", "max_stars_repo_name": "layerwise/training", "max_stars_repo_head_hexsha": "21ad2a5684a3712192fb13f8214bc3bb4c975f3e", "max_stars_repo_licenses": ["MI...
import numpy as np import pandas as pd from scipy.stats import binom_test # calculate p_value_2sided here: p_value_2sided = binom_test(41, n=500, p=0.1) print(p_value_2sided) # calculate p_value_1sided here: p_value_1sided = binom_test(41, n=500, p=0.1, alternative = 'less') print(p_value_1sided)
{"hexsha": "4f8f77467abbfdd2746c13e9e633a0a89eb3651a", "size": 299, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data Scientist Career Path/8. Hypothesis Testing/1. Testing a Sample Statistics/2. Binomial Test/11. scipy.py", "max_stars_repo_name": "myarist/Codecademy", "max_stars_repo_head_hexsha": "2ba0f104b...
#!/usr/bin/env python3 import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D def eggholder(x, y): return -(y + 47) * np.sin(np.sqrt(np.abs(y + x/2 + 47))) + \ -x * np.sin(np.sqrt(np.abs(x - (y + 47)))) if __name__ == '__main__': x, y = np.meshgrid( n...
{"hexsha": "0ef0fc2aa36aa1d4706ef10e99f426ff49056194", "size": 631, "ext": "py", "lang": "Python", "max_stars_repo_path": "slides/figures/eggholder_fun.py", "max_stars_repo_name": "gcampanella/pydata-london-2018", "max_stars_repo_head_hexsha": "6be3232f3766c56d4db8053b10d1e0268809b8f5", "max_stars_repo_licenses": ["CC-...
// // Copyright 2005-2007 Adobe Systems Incorporated // Copyright 2018 Mateusz Loskot <mateusz@loskot.net> // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_GIL_T...
{"hexsha": "4ff10d52d72e81e7ee133f6e9871349e5dff374f", "size": 13415, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ReactNativeFrontend/ios/Pods/boost/boost/gil/typedefs.hpp", "max_stars_repo_name": "Harshitha91/Tmdb-react-native-node", "max_stars_repo_head_hexsha": "e06e3f25a7ee6946ef07a1f524fdf62e48424293", "m...
import pickle import cv2 import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from common import * from color_space import color_select, draw_sub_plots, stack_binary_images # MODIFY THIS FUNCTION TO GENERATE OUTPUT # THAT LOOKS LIKE THE IMAGE ABOVE def corners_unwarp(img, nx, ny, mtx, ...
{"hexsha": "db2699e49e0fa5a4b1336ff2d01ddb31576fca6d", "size": 7694, "ext": "py", "lang": "Python", "max_stars_repo_path": "perspective_transformation.py", "max_stars_repo_name": "mhhm2005eg/CarND-Advanced-Lane-Lines", "max_stars_repo_head_hexsha": "1f571e4714df0dcca21fbf2b09b5af73caddb8f4", "max_stars_repo_licenses": ...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Boot Sys: Top Context Functions" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 ...
{"hexsha": "88be36150f98d532903f2d3746ad9f59e044093d", "size": 7432, "ext": "r", "lang": "R", "max_stars_repo_path": "src/mezz/sys-base.r", "max_stars_repo_name": "BlackATTR/ren-c", "max_stars_repo_head_hexsha": "533a998a30e6a74a528718df58d5ece997a43138", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
import os import pickle import matplotlib import matplotlib.pyplot as plt import itertools import numpy as np from astrodash.multilayer_convnet import convnet_variables try: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() except ModuleNotFoundError: import tensorflow as tf def plot_confusion_...
{"hexsha": "86243b7a0bd098076cf14843a0cbe1dd637278f5", "size": 8517, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrodash/model_metrics.py", "max_stars_repo_name": "TorshaMajumder/astrodash", "max_stars_repo_head_hexsha": "6064d8e8dc9f64691bea100a033c63d132d04af5", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma i_shrink_eq_NoMsg_iAll_conv: " 0 < k \<Longrightarrow> ((s \<div>\<^sub>i k) t = \<NoMsg>) = (\<box> t1 [t * k\<dots>,k - Suc 0]. s t1 = \<NoMsg>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 < k \<Longrightarrow> ((s \<div> k) t = NoMsg) = (\<box> t1 [t * k\<dots>,k - Suc 0]. s t1 = NoMsg) ...
{"llama_tokens": 1256, "file": "AutoFocus-Stream_IL_AF_Stream", "length": 9}
#! /usr/bin/env python import roslib; roslib.load_manifest('jaco2_driver') import rospy import sys import numpy as np import actionlib import kinova_msgs.msg import std_msgs.msg import geometry_msgs.msg from util.util import * import math import argparse from abc import abstractmethod def QuaternionNorm(Q_raw): ...
{"hexsha": "0c5dd0ac16e526d13545890dd2aff1574eccd7cf", "size": 4843, "ext": "py", "lang": "Python", "max_stars_repo_path": "drivers/jaco2_driver/nodes/jaco2_driver/pose_action_client.py", "max_stars_repo_name": "s4480417/thesisrobotics", "max_stars_repo_head_hexsha": "dad7723ff14af92380c21a5aaccb5ae94a7d8bd2", "max_sta...
import numpy as np import math import matplotlib.pyplot as plt import random X=np.array([[2,-1],[2,1],[0,-1],[0,1],[1,0.5],[1,-0.5],[1,1],[1,-1]]) plt.scatter(X[:,0],X[:,1]) cent1=np.array([[0.5,0]]) cent2=np.array([[1.5,0]]) plt.scatter(cent1[0][0],cent1[0][1], label="Centroid - class1", marker='x') plt.scatter(cent2...
{"hexsha": "52ba7b03e39e4bb0d758ea20d4abf737358daf44", "size": 1012, "ext": "py", "lang": "Python", "max_stars_repo_path": "Supervised Learning/SMAI HWS/23/1.py", "max_stars_repo_name": "shailymishra/Machine-Learning-Advanced", "max_stars_repo_head_hexsha": "048e7c816f8c673c7b73ffb7555ebdfee6f0dc5b", "max_stars_repo_li...
import numpy as np import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense, LSTM, Dropout from sklearn.model_selection import train_test_split from src.predictor.dataset_extractor import DatasetExtractor def get_dataset_split(main_folder: str, target_data_folder: str, day_i...
{"hexsha": "4af13eea631942d50f4ef910829fdfe43a4cdcfb", "size": 7747, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/predictor/rnn_predictor.py", "max_stars_repo_name": "yakuza8/coronavirus-timeseries-predictor", "max_stars_repo_head_hexsha": "d6ec329ec36335d2f3dc20c2158dbfa9ddad3526", "max_stars_repo_licens...
r""" Module for handling Exact Gradient corrected Screened (EGS) Potential. Potential ********* The exact-gradient screened (EGS) potential introduces new parameters that can be easily calculated from initial inputs. Density gradient corrections to the free energy functional lead to the first parameter, :math:`\nu`, ...
{"hexsha": "739349473f95f62aef493a9d2af00bfae33ca620", "size": 11192, "ext": "py", "lang": "Python", "max_stars_repo_path": "sarkas/potentials/egs.py", "max_stars_repo_name": "lucianogsilvestri/sarkas", "max_stars_repo_head_hexsha": "f4ab00014d09976561fbd4349b9d0610e47a61e1", "max_stars_repo_licenses": ["MIT"], "max_st...
(* * Copyright (c) 2017-present, * Programming Research Laboratory (ROPAS), Seoul National University, Korea * This software is distributed under the term of the BSD-3 clause license. *) Definition veq T (x : MId.m T) (y : Acc.MAcc.m T) : Prop := x = Acc.get_v y. Lemma bind_veq : forall T (x1 : MId.m T) (x2 : Ac...
{"author": "ropas", "repo": "zooberry", "sha": "17b1cb1a44c2a796d6b7d85c2026b142685d291b", "save_path": "github-repos/coq/ropas-zooberry", "path": "github-repos/coq/ropas-zooberry/zooberry-17b1cb1a44c2a796d6b7d85c2026b142685d291b/spec/Proof/VeqCommon.v"}
/* * Stanford Whole-Body Control Framework http://stanford-wbc.sourceforge.net/ * * Copyright (C) 2010 The Board of Trustees of The Leland Stanford Junior University. All rights reserved. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public...
{"hexsha": "3d0b12fe25ebfb01dc57d68c87a8522695aec4dd", "size": 3703, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "utils/include/utils/wrap_eigen.hpp", "max_stars_repo_name": "junhyeokahn/DracoNodelet", "max_stars_repo_head_hexsha": "0f87331ceaf4fe42f9bab164954c5e9cb9c010f4", "max_stars_repo_licenses": ["MIT"], ...
# coding = utf-8 from copy import deepcopy import numpy as np from mykit.core.bandstructure import BandStructure from mykit.core.dos import Dos from mykit.core.kmesh import KSYMBOL_LATEX, KmeshError, kpath_decoder from mykit.core.log import Verbose def init(*objs, **kwargs): '''Convenient function to initializ...
{"hexsha": "f49b086ad79c2392d91b50c4ac839a2072fa7f8f", "size": 12574, "ext": "py", "lang": "Python", "max_stars_repo_path": "mykit/visualizer.py", "max_stars_repo_name": "minyez/mykit", "max_stars_repo_head_hexsha": "911413120c081be2cfcaef06d62dc40b2abd2747", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
import numpy as np import random import json from matplotlib import pyplot as plt #from base import activation_function, loss_function from .base import activation_function, loss_function class FNN(): """ Feedforward Neural network Class. Attributes ---------- sizes: list List of n...
{"hexsha": "186a7f27844782d5266fd80751c6ddbddda5a1ed", "size": 24475, "ext": "py", "lang": "Python", "max_stars_repo_path": "customdl/fnn.py", "max_stars_repo_name": "Taarak9/Custom-Neural-Networks", "max_stars_repo_head_hexsha": "cda83294ed825159d5bd168264f143ea51f056c1", "max_stars_repo_licenses": ["MIT"], "max_stars...
import math import numpy as np import torch class MinMaxStats(object): """A class that holds the min-max values of the tree.""" def __init__(self, min_value_bound=None, max_value_bound=None): self.maximum = min_value_bound if min_value_bound else -float('inf') self.minimum = max_value_bound ...
{"hexsha": "bc466654857ffbc2aee782f19edc27e8fa331a9c", "size": 4325, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/mcts.py", "max_stars_repo_name": "bAmpT/muzero-pytorch", "max_stars_repo_head_hexsha": "481c02af04245d49eb545b7313a3f19c20f1cb51", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import pySALESetup as pss import numpy as np mesh1 = pss.Mesh(X=100,Y=500,cellsize=.5e-5) # Two test areas A and B in each test area one type of grain is tested in 4 different orientations # in principle each grain is independent of all the others. How will each respond? x = .25e-3 yA = 1.875e-3 yB = 0.625e-3 r = ...
{"hexsha": "d309c0a7f71e8832b784cbb23b82b261b4e624d9", "size": 1118, "ext": "py", "lang": "Python", "max_stars_repo_path": "regolith_tests/triangle_tester.py", "max_stars_repo_name": "jgd10/RegolithSetupRoutines", "max_stars_repo_head_hexsha": "4b814ec45292aa7226e1b094aaf6c1472b0ada3a", "max_stars_repo_licenses": ["MIT...
from unittest.case import TestCase import numpy as np from tensorflow.keras import initializers import tensorflow as tf from mdrnn import MDRNN class TwoStepRNNTests(TestCase): def test_feeding_layer_created_with_default_initializer(self): mdrnn = MDRNN(units=2, input_shape=(None, 1)) x = np.zero...
{"hexsha": "f9ba381438e6c4db5053559d46f582081ae59280", "size": 3048, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/one_dimensional_RNN/test_two_step_predictions.py", "max_stars_repo_name": "X-rayLaser/multi-directional-mdrnn", "max_stars_repo_head_hexsha": "70b0e1c2e07b5f476c264c6700e8d34d41a2ce10",...
function _read(valfn) try; return parse(Int, read(valfn, String)) catch ingored end return 0 end let @info("Running race tests") # must match the values on race_script.jl lkfn = joinpath(@__DIR__, "lock") valfn = joinpath(@__DIR__, "sum.txt") logfn = joinpath(@__DIR__, "log.txt") tr...
{"hexsha": "a46bd32bb54f77beb7d2ece7e08a564e8cedd83a", "size": 2283, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/race_test.jl", "max_stars_repo_name": "josePereiro/SimpleLockFiles.jl", "max_stars_repo_head_hexsha": "4276512bf160a563380556a929965671d4b93e95", "max_stars_repo_licenses": ["MIT"], "max_stars...
################################################################## # Deprecations ################################################################## @deprecate bicgstab! bicgstab
{"hexsha": "d7acf14d000b367f2f47f43ab3c21a40220f6ecf", "size": 181, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/deprecated.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/NumericalMethodsforEngineers.jl-00e1d38a-71a9-5665-8612-32ae585a75a3", "max_stars_repo_head_hexsha": "e230c3045d98da0cf789e...
using QuantumAlgebra using QuantumAlgebra: δ, prodtuples, prodtuple, sumtuple, distribute_indices! using Test @testset "QuantumAlgebra.jl" begin for with_σpm in (false,true) QuantumAlgebra.use_σpm(with_σpm) @test QuantumAlgebra.using_σpm == with_σpm @test QuantumAlgebra.SpatialIndex(Quant...
{"hexsha": "44794a76327244c8e5d8e9d1b34e39952e3c32f0", "size": 12741, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirror/QuantumAlgebra.jl-1b9008d5-2a9d-4901-8cfb-44bb87795b64", "max_stars_repo_head_hexsha": "92804d2cda60a1117cb449f745fb489ce9e0950b", ...
import logging import numpy as np from scipy.optimize import linear_sum_assignment from ...utils.time import timeit from .centroid import TargetCentroid logger = logging.getLogger(__name__) class AdaptiveKmeans: """Adaptive Kmeans clustering algorithm to cluster tracked targets""" NEXT_TID = 0 def __...
{"hexsha": "3f3bf596a202b39d3b072ddf53be2084feeadafd", "size": 10462, "ext": "py", "lang": "Python", "max_stars_repo_path": "worker/mtmcworker/cluster/__init__.py", "max_stars_repo_name": "johnnylord/mtmc-testbed", "max_stars_repo_head_hexsha": "e3d331505181baa076162e1f5835e566e8f70167", "max_stars_repo_licenses": ["MI...
from __future__ import division import torch import random import numpy as np from sklearn.cluster import DBSCAN, KMeans import cv2 def set_seed(seed=0): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.backends....
{"hexsha": "71b946d74f532f693fc2ce6d4b8b6445e2211bf4", "size": 1708, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/misc.py", "max_stars_repo_name": "SIAAAAAA/C3-SemiSeg", "max_stars_repo_head_hexsha": "b2e2489b828661660d9842785e831293bab5cd47", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "m...
import tensorflow as tf # noqa import copy import os # import cPickle as pickle import dill as pickle import numpy as np import hashlib from ..data import helpers as helpers from ..utils import misc as misc from ..data import batch_fetcher as bfetchers from ..experiments import experiment from ..experiments import con...
{"hexsha": "508654db4cba9a3c8a938c391a0b49867a93025a", "size": 14424, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/runner.py", "max_stars_repo_name": "lupalab/flowscan", "max_stars_repo_head_hexsha": "a0fc8fd25cb62c9eeb6583c3d7505d54b969f88c", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import tensorflow as tf import pickle import pandas as pd import numpy as np from pathlib import Path from absl import app from konlpy.tag import Mecab from model.data import Corpus from tqdm import tqdm from model.net import SenCNN from configs import FLAGS def main(argv): test_data = Path.cwd() / 'data_in' / ...
{"hexsha": "d93bf1040192f529d64e8ba73ec96189e5578299", "size": 2149, "ext": "py", "lang": "Python", "max_stars_repo_path": "jmkim/CNN_SC/prediction.py", "max_stars_repo_name": "modudeepnlp/NLP_Tensorflow2.0", "max_stars_repo_head_hexsha": "b0fcc5a1521e865b0a7b06042324c0b0d6844d06", "max_stars_repo_licenses": ["Apache-2...
# %% # Setup ## Packages import pandas as pd import numpy as np import torch from transformers import RobertaForSequenceClassification, TrainingArguments, Trainer, RobertaTokenizer, RobertaConfig from datasets import load_metric, load_dataset from sklearn.metrics import precision_recall_fscore_support, accuracy_score,...
{"hexsha": "01e07ad8588df02b2b29517992a57bb9371ff315", "size": 10984, "ext": "py", "lang": "Python", "max_stars_repo_path": "training.py", "max_stars_repo_name": "NiksMer/ManiBERT", "max_stars_repo_head_hexsha": "00e726ccd3d1b465c614c72b0b79c5286d0e68b4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
#!/usr/bin/env julia # This attempts to implement call/cc feature in julia type Continuation_box{name} value end macro call_cc(name::Symbol, content) quote u = Symbol(randstring()) $name = v -> throw(Continuation_thrown{u}(v)) try $content catch e if ...
{"hexsha": "35a0f1be0039930194120fa79d53b2e13da0216c", "size": 410, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia-continuation/call_cc.jl", "max_stars_repo_name": "sclereid/collection", "max_stars_repo_head_hexsha": "61782f45314db560657b3081e2fa8e1032fd8dbf", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding:utf-8 -*- import unittest from ddt import ddt, data import math import ctypes import datetime from ctypes import * import numpy as np from numba import cuda import numpy as np import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" @ddt class TestQuantImpl(unittest.TestCase): max_thres = 512 data0 = np...
{"hexsha": "72bb5ff5a47ccb7536fe27e3ee40d73528073ee9", "size": 4786, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_quant_impl.py", "max_stars_repo_name": "Yerniyaz/nnieqat-pytorch", "max_stars_repo_head_hexsha": "470f5d94a68ce7c55cc384d76054e9546d6ec299", "max_stars_repo_licenses": ["MIT"], "max_sta...
import csv import pandas as pd import numpy as np from datetime import datetime, date, time, timedelta import glob from lmatools.io.LMA_h5_file import LMAh5File from lmatools.coordinateSystems import RadarCoordinateSystem, GeographicSystem, TangentPlaneCartesianSystem, MapProjection def search_files(dir, time_start, t...
{"hexsha": "bd0fe121a5d8f7112f3660057e7b6dc4d37fa0f7", "size": 5084, "ext": "py", "lang": "Python", "max_stars_repo_path": "select_lma.py", "max_stars_repo_name": "jcssouza/LMAinterceptRHI", "max_stars_repo_head_hexsha": "f6877f53f383fbaecac8c42baa08680831dbe42c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/* Copyright 2018 Ignacio Torroba (ignaciotb@kth.se) * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
{"hexsha": "f488da2580460d2be776c62c6984175e3988beef", "size": 5225, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "auv_ekf_slam/include/ekf_slam/ekf_slam.hpp", "max_stars_repo_name": "nilsbore/smarc_navigation", "max_stars_repo_head_hexsha": "97d0a30498e72506e7472c98c5fa0d86d19f0f04", "max_stars_repo_licenses": ...
#!/usr/bin/python3 #‑∗‑ coding: utf‑8 ‑∗‑ import sys import gym import json import importlib import numpy as np import utils import monitor def main(): results_list = [] for i in range(1, len(sys.argv)): with open(sys.argv[i]) as f: results_list.append(json.load(f)) # Plot results: ...
{"hexsha": "f52a9cc9d86811fe5a4e7c6d36726a435d6a68bf", "size": 432, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_results.py", "max_stars_repo_name": "Lucien-MG/rl-blackjack", "max_stars_repo_head_hexsha": "f0903db4b4be14ba5994b0808d7c9c1e7ed00825", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
using Plots, LinearAlgebra, Printf # helper functions @views av(A) = 0.25*(A[1:end-1,1:end-1].+A[2:end,1:end-1].+A[1:end-1,2:end].+A[2:end,2:end]) @views av_xa(A) = 0.5*(A[1:end-1,:].+A[2:end,:]) @views av_ya(A) = 0.5*(A[:,1:end-1].+A[:,2:end]) @views maxloc(A) = max.(A[1:end-2,1:end-2],A[1:end-2,2:end-1],A[1:e...
{"hexsha": "ec0f0ae1f12099b61bdd8603e8162cfe00471199", "size": 9190, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "newdamp/Stokes2D_vep_reg_IU_LR_TD.jl", "max_stars_repo_name": "PTsolvers/Stokes2D_simpleVEP", "max_stars_repo_head_hexsha": "074c3e3649c50a317e33455d18dc9526614b4b66", "max_stars_repo_licenses": ["...
/** * \file * \brief Laser Scanner communication (TCP Helper Class) * Copyright (C) 2013, Osnabrück University * Copyright (C) 2017, Ing.-Buero Dr. Michael Lehning, Hildesheim * Copyright (C) 2017, SICK AG, Waldkirch * All rights reserved. * * Redistribution and use in source and binary forms, with or without ...
{"hexsha": "f5f63e5825a9439a748b5fbda2e9bb017936f275", "size": 29353, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "driver/src/sick_scan_common_tcp.cpp", "max_stars_repo_name": "datadancer/sick_scan_base", "max_stars_repo_head_hexsha": "2bfb4c8c6761240de6785abd6aeb5e520e415259", "max_stars_repo_licenses": ["Apac...
import numpy as np from numpy import ma # useful for thresholding # import matplotlib.pyplot as plt from astropy.io import fits # from skimage import exposure # from skimage.filters import rank # from skimage.morphology import rectangle from scipy.ndimage.filters import convolve from scipy import stats from skimage.tr...
{"hexsha": "1b8ae60a142fa77bb3d7082a1cbb257e4485271f", "size": 8947, "ext": "py", "lang": "Python", "max_stars_repo_path": "tidalclassifier/utils/thresholder.py", "max_stars_repo_name": "RustyPanda/tidal-features-classifier", "max_stars_repo_head_hexsha": "32e1aa0c074528ed04419d596c2014f78448e11b", "max_stars_repo_lice...
[STATEMENT] lemma l2_inv4_init [iff]: "init l2 \<subseteq> l2_inv4" [PROOF STATE] proof (prove) goal (1 subgoal): 1. init l2 \<subseteq> l2_inv4 [PROOF STEP] by (auto simp add: l2_def l2_init_def l2_inv4_def)
{"llama_tokens": 99, "file": "Key_Agreement_Strong_Adversaries_dhlvl2", "length": 1}
""" Generate code for HTML table to visualise human-object pairs Fred Zhang <frederic.zhang@anu.edu.au> The Australian National University Australian Centre for Robotic Vision """ import argparse import numpy as np import pocket def name_parser(name): """ {INDEX}.png """ seg = name.split(".") r...
{"hexsha": "ce2e786175bfa96dc6cf05d0030ca9ec8b9453e1", "size": 729, "ext": "py", "lang": "Python", "max_stars_repo_path": "hicodet/utilities/generate_html_page.py", "max_stars_repo_name": "henlein/upt", "max_stars_repo_head_hexsha": "0baa1fe7ebc16347f19bf18f10da4a6dc8fd3837", "max_stars_repo_licenses": ["BSD-3-Clause"]...
[STATEMENT] lemma pre_post_left_isotone: "-p \<le> -q \<Longrightarrow> -p\<stileturn>-r \<le> -q\<stileturn>-r" [PROOF STATE] proof (prove) goal (1 subgoal): 1. - p \<le> - q \<Longrightarrow> - p \<stileturn> - r \<le> - q \<stileturn> - r [PROOF STEP] using order_lesseq_imp pre_post_galois [PROOF STATE] proof (pr...
{"llama_tokens": 265, "file": "Correctness_Algebras_Pre_Post", "length": 2}
#!/usr/bin/env python # # remove filters from photometry catalogs, physicsgrid, and observationgrid # used to modify simulated data to make plots for proposals import argparse import numpy as np from astropy.table import Table import tables from beast.physicsmodel.grid import (FileSEDGrid, SpectralGrid) import bea...
{"hexsha": "b51afa91fac7749c90eac81b1facd53af079417a", "size": 3302, "ext": "py", "lang": "Python", "max_stars_repo_path": "beast/tools/remove_filters.py", "max_stars_repo_name": "marthaboyer/beast", "max_stars_repo_head_hexsha": "1ca71fb64ab60827e4e4e1937b64f319a98166c3", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
from distutils.core import setup from distutils.extension import Extension import numpy as np meshModule = Extension("polymesh.mesh", sources=["polymesh/mesh.c"], include_dirs = [np.get_include()], extra_compile_args=["-Wno-unreachable-code"]) hydrostaticModule = Extension("pol...
{"hexsha": "51b2fef7ed2aedbebc491580679661387630468b", "size": 832, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "aixuexisun/polymesh", "max_stars_repo_head_hexsha": "07ea7a87028f2f662fa6db92a27cc05a156de545", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_sta...
import numpy as np import mbuild as mb class AmorphousSilicaBulk(mb.Compound): """ An amorphous silica box, 2.2g/cm^3""" def __init__(self): super(AmorphousSilicaBulk, self).__init__() mb.load('amorphous_silica_bulk.pdb', compound=self, relative_to_module=self.__module__) ...
{"hexsha": "10b4e4faf5b32499418f80fa49e7cc13bb61c617", "size": 451, "ext": "py", "lang": "Python", "max_stars_repo_path": "mbuild/lib/bulk_materials/amorphous_silica_bulk.py", "max_stars_repo_name": "dcardenasv/mbuild", "max_stars_repo_head_hexsha": "20c13f6bb66c6b023b07d7a2b2e4ad0a5073d727", "max_stars_repo_licenses":...
import argparse import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import pdb import os from tensorflow.keras.callbacks import EarlyStopping from tensorflow.keras.layers import Input, Dense, Conv2D, BatchNormalization, LeakyReLU, Flatten from tensorflow.keras.layers import concatenate from tens...
{"hexsha": "613c139154a79aa2a1364d5eb28e81ad16907397", "size": 8229, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_combined.py", "max_stars_repo_name": "clementfung/biodiversity-analyzer", "max_stars_repo_head_hexsha": "a798bec2d4b5450e2a554dc7b9400cbe4198c102", "max_stars_repo_licenses": ["MIT"], "max_s...
% -*- root: Main.tex -*- \section{SVD} $\mathbf{A} = \mathbf{U} \mathbf{D} \mathbf{V}^\top = \sum_{k=1}^{\operatorname{rank}(\mathbf{A})} d_{k,k} u_k (v_k)^\top$\\ $\mathbf{A} \in \mathbb{R}^{N \times P}, \mathbf{U} \in \mathbb{R}^{N \times N}, \mathbf{D} \in \mathbb{R}^{N \times P}, \mathbf{V} \in \mathbb{R}^{P \times...
{"hexsha": "e33615337f33de1120e100191e243dc0a6153920", "size": 1847, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SVD.tex", "max_stars_repo_name": "kalsan/eth-cil-exam-summary", "max_stars_repo_head_hexsha": "ae93c61b8e7e88be725641d9580b37367c332458", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 2...
#!/usr/bin/env python # Copyright (c) 2021, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking # platform" software is licensed under the Apache License,...
{"hexsha": "3351cb7072163f287e02b824275e4eb7ad3a801b", "size": 2194, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrobee/simulation/acoustics_cam/src/generate_pure_tones.py", "max_stars_repo_name": "rsoussan/isaac", "max_stars_repo_head_hexsha": "c6cc7b5c0707a9b23b5fc4376f0a062052992bc6", "max_stars_repo_li...
from distutils.core import setup, Extension try: import numpy # @UnusedImport # NOQA except ImportError: msg = ("No module named numpy. " "Please install numpy first, it is needed before installing PH5.") raise ImportError(msg) def get_extension_options(): options = ("ibm2ieee_py", ...
{"hexsha": "8bef8e58d325b68071ab046561d87bac588cc1b4", "size": 739, "ext": "py", "lang": "Python", "max_stars_repo_path": "ph5/core/c_dependencies/suibm2ieee_py.py", "max_stars_repo_name": "mbriggs134/PH5", "max_stars_repo_head_hexsha": "691790269c4f80c892bacb84fdcaba905b9e0d6b", "max_stars_repo_licenses": ["MIT"], "ma...
# Filename: geom.py # License: LICENSES/LICENSE_UVIC_EPFL import numpy as np def parse_geom(geom, geom_type): parsed_geom = {} if geom_type == "Homography": parsed_geom["h"] = geom.reshape((-1, 3, 3)) elif geom_type == "Calibration": parsed_geom["K"] = geom[:, :9].reshape((-1, 3, 3)) ...
{"hexsha": "8a453254242195575d402c1be0f480d686a1126c", "size": 3503, "ext": "py", "lang": "Python", "max_stars_repo_path": "geom.py", "max_stars_repo_name": "zengru001usst/acne", "max_stars_repo_head_hexsha": "ae652e814649e88034b3b506ccbe34432b1eb85a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 49, "...
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 C==============================================================...
{"hexsha": "f92e3698ec23db584bedf36d8631734b8585d9ab", "size": 4503, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/libraries/plt/pltstc.f", "max_stars_repo_name": "jschueller/seacas", "max_stars_repo_head_hexsha": "14c34ae08b757cba43a3a03ec0f129c8a168a9d3", "max_stars_repo_licenses": ["Python-2...
# -*- coding: utf-8 -*- """ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PLOTTER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Plot the results in 3D format, they can be either plot individually or in goups of two or four. Save the plot in a svg file whose name is the Label of the variable %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
{"hexsha": "1ffeb4e1d2bf4e217326f86b864becda839b9630", "size": 5175, "ext": "py", "lang": "Python", "max_stars_repo_path": "ADsolver/PM_plotter.py", "max_stars_repo_name": "salomon-castano/PM---Codigo", "max_stars_repo_head_hexsha": "86785e8fab7e5da49962f824d6c5e662efb21737", "max_stars_repo_licenses": ["MIT"], "max_st...
(** This file is part of the Flocq formalization of floating-point arithmetic in Coq: http://flocq.gforge.inria.fr/ Copyright (C) 2009-2018 Sylvie Boldo #<br /># Copyright (C) 2009-2018 Guillaume Melquiond This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Genera...
{"author": "JasonGross", "repo": "flocq", "sha": "0abac1eaa11c02f01ccffdc69846382e3a7040c5", "save_path": "github-repos/coq/JasonGross-flocq", "path": "github-repos/coq/JasonGross-flocq/flocq-0abac1eaa11c02f01ccffdc69846382e3a7040c5/src/Calc/Operations.v"}
# -*- coding: utf-8 -*- # Copyright (C) 2020-2021 by SCICO Developers # All rights reserved. BSD 3-clause License. # This file is part of the SCICO package. Details of the copyright and # user license can be found in the 'LICENSE' file distributed with the # package. """Utility functions.""" # The timer classes in th...
{"hexsha": "d36b5f60a4042bca3c244d8ae4e28b03afcc1ac9", "size": 17307, "ext": "py", "lang": "Python", "max_stars_repo_path": "scico/util.py", "max_stars_repo_name": "lukepfister/scico", "max_stars_repo_head_hexsha": "c849c4fa6089b99d9a4dec520c9a04cca426d2d7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
#!/usr/bin/python3 '''Copyright (c) 2018 Mozilla 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 follow...
{"hexsha": "94ab9a8ab007c5bbdd7447729275bf4c09e4b901", "size": 6198, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train_lpcnet.py", "max_stars_repo_name": "dave-g8kbb/LPCNet", "max_stars_repo_head_hexsha": "7a74323056480ae54805ee873c0183730ffdc6e7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 4 10:26:10 2018 @author: ai """ import numpy as np import torch from torch import nn from torch.nn import functional as F from torch.autograd import Variable def soft_jaccard(outputs, targets): eps = 1e-15 jaccard_target = (targets == 1)...
{"hexsha": "45e57cd85738e2270b023127874e4b34f48b7e77", "size": 16439, "ext": "py", "lang": "Python", "max_stars_repo_path": "loss_function.py", "max_stars_repo_name": "hphuongdhsp/Kaggle-TGS-Salt-Identification-Challenge", "max_stars_repo_head_hexsha": "4c1f9749f772f318473921f6d213af89cd4c0df2", "max_stars_repo_license...
[STATEMENT] lemma lc_mult_scalar_monomial_right: "lc (p \<odot> monomial c v) = punit.lc p * (c::'b::semiring_no_zero_divisors)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lc (p \<odot> monomial c v) = punit.lc p * c [PROOF STEP] proof (cases "c = 0") [PROOF STATE] proof (state) goal (2 subgoals): 1. c = (0::...
{"llama_tokens": 1534, "file": "Polynomials_MPoly_Type_Class_Ordered", "length": 18}
subroutine killop !! ~ ~ ~ PURPOSE ~ ~ ~ !! this subroutine performs the kill operation !! ~ ~ ~ INCOMING VARIABLES ~ ~ ~ !! name |units |definition !! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ !! bio_ms(:) |kg/ha |land cover/crop biomass ...
{"hexsha": "bcaf4f1145d96a65313c5bd89ed74e912feb680c", "size": 13450, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "modified_source_code/killop.f", "max_stars_repo_name": "gpignotti/swat_soil_moisture_sensitivity", "max_stars_repo_head_hexsha": "d2c3f6185acabf31440d613651192cdaabfe6b6c", "max_stars_repo_licens...
import copy import numpy as np import open3d as o3d import trimesh if not trimesh.ray.has_embree: raise "PyEmbree engine not installed, this experiment will never end" def outlier_rejection( source_points, source_normals, target_points, target_normals, max_dist=2.0 ): # Prune long rays, max_distance thr...
{"hexsha": "1ea3575ca0f7b0d333d510656467dc3f83cb33de", "size": 2428, "ext": "py", "lang": "Python", "max_stars_repo_path": "puma/projections/scan2mesh.py", "max_stars_repo_name": "okryush/puma", "max_stars_repo_head_hexsha": "fd3f21c5566ae64110420a26ef6c9d8da0e67dce", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import cv2 cap = cv2.VideoCapture(0) while (True): ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) binary = cv2.adaptiveThreshold(gray, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 25, 5) cv2.imshow('frame', binary)...
{"hexsha": "fa496ce229820170a4bda7fe870d3dae1b238d35", "size": 417, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/01-Adaptive Thresholding.py", "max_stars_repo_name": "gh-BumsooKim/Vision-Art", "max_stars_repo_head_hexsha": "27986705377471cac57b73f9db386a11042e8bec", "max_stars_repo_licenses": ["Apache...
This code has been copied by mistake. Please do NOT use it unless by invitation. If you have not been specifically requested to perform tests with it, please destroy this file SUBROUTINE FOCK1(F, PTOT, PA, PB) IMPLICIT DOUBLE PRECISION (A-H,O-Z) INCLUDE 'SIZES/NOLIST' ...
{"hexsha": "4415121cee6a68b627d778d0f703a2db0cb571b4", "size": 53938, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "1983_MOPAC1/am1.for", "max_stars_repo_name": "openmopac/MOPAC-archive", "max_stars_repo_head_hexsha": "01510e44246de34a991529297a10bcf831336038", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
[STATEMENT] lemma (in semiring_0) pnormal_degree: "last p \<noteq> 0 \<Longrightarrow> degree p = length p - 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. last p \<noteq> (0::'a) \<Longrightarrow> degree p = length p - 1 [PROOF STEP] using pnormalize_eq[of p] [PROOF STATE] proof (prove) using this: last p \<note...
{"llama_tokens": 288, "file": null, "length": 3}
import symplectic import decompose import chp_py import slow_sim import utils import imp import numpy as np imp.reload(symplectic) imp.reload(decompose) imp.reload(chp_py) imp.reload(slow_sim) imp.reload(utils) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # This file contains test cases...
{"hexsha": "29bd95956bc47252ea43a643730ddd7f24ad672f", "size": 15848, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "matthewkhoury96/random_quantum_circuits", "max_stars_repo_head_hexsha": "20d15da79ab4bcf0c0b82c314514a6c06cc19e8c", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import h5py from hdgwas.tools import Timer,Mapper, merge_genotype import os from hdgwas.data import Reader import argparse import gc import tables import numpy as np parser = argparse.ArgumentParser(description='Script to merge genotype') parser.add_argument("-g", "--genotype",nargs='+', type=str, help=...
{"hexsha": "0342ad8bdd1ae93333e5d59da052b88b0d3fce0a", "size": 3154, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/merge_genotype.py", "max_stars_repo_name": "roshchupkin/hase", "max_stars_repo_head_hexsha": "c7aa36459c53ccb5bd1f884bbc38df0cfebdf208", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import numpy as np import cv2 import matplotlib.pyplot as plt from hashTable import hashTable Qangle = 24 Qstrenth = 3 Qcoherence = 3 mat = cv2.imread("../train/a.jpg") h = np.load("Filters.npy") mat = cv2.cvtColor(mat, cv2.COLOR_BGR2YCrCb)[:,:,2] # LR = cv2.resize(LuminanceMat,(0,0),fx=0.5,fy=0.5) # LR = cv2.Gaus...
{"hexsha": "2c73b5fe39b62a2948aa4fa7bb558739795e4af0", "size": 1280, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/test.py", "max_stars_repo_name": "gonewithwind5883/mikuraisr", "max_stars_repo_head_hexsha": "8e4565a753aba8fb73645a644dee8173a1563ce1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/gradients.estimate.ipynb (unless otherwise specified). __all__ = ['get_grads_pullback'] # Cell import numpy as np from sklearn.linear_model import LinearRegression def get_grads_pullback(data, embedding, geom, tangent_bases...
{"hexsha": "e662920f1caa44b9c1cd7af3815e37880441bbc1", "size": 1329, "ext": "py", "lang": "Python", "max_stars_repo_path": "montlake/gradients/estimate.py", "max_stars_repo_name": "sjkoelle/montlake", "max_stars_repo_head_hexsha": "b908a43e0c00763bd1cf86120eaa6bdf7d8d1196", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# Author: Karl Stratos (me@karlstratos.com) import argparse import dynet as dy import matplotlib.pyplot as plt import numpy as np import random from core.information_theory import InformationTheory def main(args): random.seed(args.seed) np.random.seed(args.seed) info = InformationTheory() num_points_e...
{"hexsha": "76eb9b778d2af23c9a92ab3d4924fc04cc0df62f", "size": 4392, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_mi.py", "max_stars_repo_name": "karlstratos/iaan", "max_stars_repo_head_hexsha": "e76a3cd3a17807a21478ae1dc83be4da76c01d70", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_sta...
import numpy as np import torch import torch.nn as nn from torch import optim from tqdm.auto import tqdm from model import SiAudNet def train( model: SiAudNet, train_on_gpu: bool, n_epochs: int, train_loader: torch.utils.data.DataLoader, valid_loader: torch.utils.data.DataLoad...
{"hexsha": "2884b598aa65793a3a4eef7630e0f1a81ae8a04f", "size": 4411, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_test.py", "max_stars_repo_name": "dim5/ossr", "max_stars_repo_head_hexsha": "bc9f98ec8559c5301a167088e92d06adb876e267", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, "max_...
# coding:utf-8 import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import numpy as np import os import time import datetime import json import sys import sklearn.metrics from tqdm import tqdm def to_var(x): return Variable(torch.from_numpy(x).cuda()) ...
{"hexsha": "fb9ac03cbd14088b5ebaf6df32520cea12efcc29", "size": 23085, "ext": "py", "lang": "Python", "max_stars_repo_path": "config/Config.py", "max_stars_repo_name": "ningpang/com-CNN", "max_stars_repo_head_hexsha": "a494589a9445c9b3ad63175ec6b2084d4d3e3e81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
""" This module provides the Destination class that holds all the basic API methods for interfacing with a destination. Destintations are databases, filesystems, file formats (HDF5, CSV), etc. """ import struct import numpy as np import multiprocessing import Queue import time import logging from origin.server impor...
{"hexsha": "7f8aa8a1077fa39b627938072daf114b9f35ae15", "size": 24243, "ext": "py", "lang": "Python", "max_stars_repo_path": "ServerStuff/lib/origin/server/origin_destination.py", "max_stars_repo_name": "QuantumQuadrate/powstab2", "max_stars_repo_head_hexsha": "4311302417a859f8c17197648ee958b126d3a454", "max_stars_repo_...
[STATEMENT] theorem suffix_append: "suffix xs (ys @ zs) \<longleftrightarrow> suffix xs zs \<or> (\<exists>xs'. xs = xs' @ zs \<and> suffix xs' ys)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. suffix xs (ys @ zs) = (suffix xs zs \<or> (\<exists>xs'. xs = xs' @ zs \<and> suffix xs' ys)) [PROOF STEP] by (auto si...
{"llama_tokens": 147, "file": null, "length": 1}
// // detail/atomic_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef B...
{"hexsha": "62a1f440d71da19cbc2b05e11605a86a278dfe00", "size": 1432, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "thirdparty/boost/boost/asio/detail/atomic_fenced_block.hpp", "max_stars_repo_name": "bureau14/qdb-benchmark", "max_stars_repo_head_hexsha": "1839d7ac04417de56b7a7fb2b7deff50756b3048", "max_stars_rep...
import argparse import os import torch.backends.cudnn as cudnn import models import torchvision.transforms as transforms import flow_transforms from scipy.ndimage import imread from scipy.misc import imsave from loss import * import time import random from glob import glob import pdb import matplotlib.pyplot as plt #...
{"hexsha": "f220ce2c7238cd73da34cb05db1270436134bd98", "size": 4803, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_demo.py", "max_stars_repo_name": "YanFangCS/AINET", "max_stars_repo_head_hexsha": "a860d9dc59a53242746057e1b97c2e5088d9a6d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_sta...
! Module forward_support Use Phys_constants Use Atomic_data Use Line_data_structure Use Eq_state Contains ! This routine checks an optical depth scale to make sure there are no ! two consecutive points with the same value. If such an occurrence is found ! then the tau scale from that point to the bottom is shi...
{"hexsha": "6946e0d928508f8351919e05e2d547b1c142fed9", "size": 16482, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "inversor/database/NICOLE/forward/forward_supp.f90", "max_stars_repo_name": "aasensio/DeepLearning", "max_stars_repo_head_hexsha": "71838115ce93e0ca96c8314cff3f07de1d64c235", "max_stars_repo_lic...
import numpy as np def generate_spirals( n_samples, n_class=2, noise=0.3, random_state=None, ): """ Generate 2-dimensional Gaussian XOR distribution. (Classic XOR problem but each point is the center of a Gaussian blob distribution) Parameters ---------- ...
{"hexsha": "cf5c4a1851c68e76817cbf96a2a36e0974da10f8", "size": 2599, "ext": "py", "lang": "Python", "max_stars_repo_path": "proglearn/sims/spiral_sim.py", "max_stars_repo_name": "kfenggg/ProgLearn", "max_stars_repo_head_hexsha": "43842543315ef49d60f4ebcabcdd9b8fda1b3277", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np from collections import namedtuple import dataclasses import pandas as pd from typing import List, Tuple, Dict, Union, Any, Optional, Callable def as_flattened(vals: Dict[str, Any], base: Optional[Tuple[str, ...]] = None) -> Dict[Tuple[str, ...], Any]: if base is None: base = tuple() ...
{"hexsha": "3b233743c68b60746f11e5337a81109a85f98352", "size": 10530, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunode/dtypesubset.py", "max_stars_repo_name": "aseyboldt/pysundials-cffi", "max_stars_repo_head_hexsha": "ccdcd0fd0252285a5440c397619c57378a32d33a", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma [enres_breakdown]: "EWHILET c (\<lambda>s. enres_lift (f s)) s = enres_lift (WHILET c f s)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. EWHILET c (\<lambda>s. enres_lift (f s)) s = enres_lift (WHILE\<^sub>T c f s) [PROOF STEP] unfolding EWHILET_def WHILET_def enres_breakdown [PROOF STATE] proof ...
{"llama_tokens": 236, "file": "VerifyThis2019_lib_Exc_Nres_Monad", "length": 2}
""" PrecipFormation Storage for tendencies due to precipitation formation $(DocStringExtensions.FIELDS) """ Base.@kwdef struct PrecipFormation{FT} θ_liq_ice_tendency::FT qt_tendency::FT qr_tendency::FT qs_tendency::FT end """ EntrDetr $(DocStringExtensions.FIELDS) """ Base.@kwdef struct Entr...
{"hexsha": "bdac5d86e69ba66d76511d2601806ad2bdf405d3", "size": 16589, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types.jl", "max_stars_repo_name": "haakon-e/TurbulenceConvection.jl", "max_stars_repo_head_hexsha": "84969de4867b06e464c3a36263e98be677792a2d", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
% ========================================= % COMMAND: _SH % ========================================= \newpage \section{\_SH} \label{cmd:_SH} \paragraph{Syntax:} \subparagraph{} \texttt{\_SH shell script line or END} \paragraph{Purpose:} \subparagraph{} Embeds a shell script within a tmp file, and executes it when ...
{"hexsha": "df58bc6c981bb88936aadd3bcd56a6dd4c105641", "size": 391, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/users-guide/local-commands/cmd_sh.tex", "max_stars_repo_name": "ia97lies/httest", "max_stars_repo_head_hexsha": "5bbe912ffde2e74b382405f580ef5963bf792288", "max_stars_repo_licenses": ["Apache-2.0...
import math import matplotlib.pyplot as plt from matplotlib.colors import Normalize from matplotlib.animation import FuncAnimation import numpy as np import pandas def read_data(paths): ''' Read all data from the files specified by the given list of paths. Returns a list of dataframes, one per file. ...
{"hexsha": "69c26398cf5ef3c18e12fe167f315aec9187fc05", "size": 3076, "ext": "py", "lang": "Python", "max_stars_repo_path": "heatmaps.py", "max_stars_repo_name": "bsheese/AtlesDescriptives", "max_stars_repo_head_hexsha": "febfde7d5bbe8abf686570db862f42738a4ad1fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3...
import copy import numpy as np from scipy.interpolate import CubicSpline import spherical_functions class ModesTimeSeries(spherical_functions.Modes): """Object to store SWSH modes as functions of time This class subclasses the spinsfast.Modes class, but also tracks corresponding time values, allowing thi...
{"hexsha": "7f6677f8ae379dd8c92f7e1d10375257dac21e5a", "size": 5138, "ext": "py", "lang": "Python", "max_stars_repo_path": "scri/modes_time_series.py", "max_stars_repo_name": "akhairna/scri", "max_stars_repo_head_hexsha": "3b7f307d19ef303914cef2fa088ee750ef8533c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
% --------------------------------------------------------- % Project: PhD KAPPA % File: introduction.tex % Author: Andrea Discacciati % % Purpose: Introduction % --------------------------------------------------------- \chapter{Introduction} \begin{quote} \textit{``Epidemiological studies provide the only definitiv...
{"hexsha": "300a124bad36c43cd83708acca1ca011c42dd0ac", "size": 5346, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "introduction.tex", "max_stars_repo_name": "anddis/phd-thesis", "max_stars_repo_head_hexsha": "860faf0686c16f7c97865d99d801050a10d2df7c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import os import unittest import tempfile import numpy as np from pyV3D import WV_Wrapper, ConnectivitiesError from pyV3D.cube import CubeGeometry, CubeSender from pyV3D.stl import STLSender from pyV3D import get_bounding_box, get_focus, adjust_points class WV_Test_Wrapper(WV_Wrapper): pass class WV_test_Wra...
{"hexsha": "4b24c8b529775cd1c4ac051740e4b78042bb7504", "size": 7678, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyV3D/test/test_pyV3D.py", "max_stars_repo_name": "OpenMDAO/pyV3D", "max_stars_repo_head_hexsha": "2baf32c489e2c91531b89e51a879ba8074ae2803", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
using MolarWeight using Test @testset "MolarWeight.jl" begin # Write your tests here. end
{"hexsha": "c6277d5aad0ca1b5b7214e80ace7a9d3727692c8", "size": 95, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "SeleneSofi/MolarWeight.jl", "max_stars_repo_head_hexsha": "21d1b3b3a77601d442f14e84613d48f42ef1496b", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
__author__ = "Saswati Ray" __email__ = "sray@cs.cmu.edu" import pandas as pd import numpy as np import math, sys from sklearn import metrics from sklearn import preprocessing import problem_pb2 import util import logging import d3m.index from timeit import default_timer as timer import operator f...
{"hexsha": "995b240bf4dec3df5eb46bf5d641e386a61b6cd9", "size": 24135, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/primitivedescription.py", "max_stars_repo_name": "tonyjo/cmu-ta2", "max_stars_repo_head_hexsha": "26a45fab27b4ca433029b05272130efcaeb2beaa", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
@inline soft_th(x, ϵ) = max(x-ϵ,zero(x)) + min(x+ϵ,zero(x)) @inline soft_th(x, ϵ, l) = max(x-ϵ,l) + min(x+ϵ,l) - l @inline function soft_th(x::Complex, ϵ) m,a = abs(x), angle(x) m = max(m-ϵ,zero(m)) + min(m+ϵ,zero(m)) m*cis(a) end function soft_hankel!(A, ϵ) K,L = size(A) N = K+L-1 for k = 1:N ...
{"hexsha": "36af1530250255eaeea5841585d2294daedbc174", "size": 11360, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/robustPCA.jl", "max_stars_repo_name": "baggepinnen/TotalLeastSquares.jl", "max_stars_repo_head_hexsha": "297b9a8277c01358f54889944f3dcc711c0fe535", "max_stars_repo_licenses": ["MIT"], "max_sta...
from sklearn.metrics import precision_recall_curve from sklearn.metrics import average_precision_score from sklearn.metrics import f1_score from munch import Munch import matplotlib matplotlib.use('PS') import matplotlib.pyplot as plt import numpy as np import torch import os # setup plot details linestyle_tuple = { ...
{"hexsha": "9a50f9958055ef31b0dfd4bdfd37881681fdd3ed", "size": 4239, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics/f1_score.py", "max_stars_repo_name": "affromero/SMILE", "max_stars_repo_head_hexsha": "931510d69b2e33f2fe633563833c50a7408f89ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 20,...
import pandas as pd import numpy as np import os from google.cloud import language_v1 from google.cloud import translate_v2 as translate from apiclient import discovery from google.oauth2 import service_account import preprocessor as tp from time import sleep from requests.exceptions import ReadTimeout, ConnectionError...
{"hexsha": "0f115df22e371315a78ce0988f22d5fe91926388", "size": 5562, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze_field_reports.py", "max_stars_repo_name": "rodekruis/ifrc-ns-solidarity", "max_stars_repo_head_hexsha": "ef80170440e667c376e57c7d2687bdaa4cef347e", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from regression.api.cost import computeCost def gradient_descent(X, y, theta, alpha, iterations): m = len(X) cost = np.zeros((iterations, 2)) for i in range(0, iterations): h = np.matmul(X, theta) - y sm = np.sum(np.multiply(h, X), axis=0) z = np.multip...
{"hexsha": "196b1f08650e9ca88c6dd5bb32eb3565641de8f1", "size": 469, "ext": "py", "lang": "Python", "max_stars_repo_path": "regression/api/gradient.py", "max_stars_repo_name": "vickykatoch/py-ml-scratchpad", "max_stars_repo_head_hexsha": "e4de515b657971f7889d73e09a1308f91856c09f", "max_stars_repo_licenses": ["MIT"], "ma...
import os import numpy as np import pandas as pd import xarray as xr import pickle as pkl from datetime import datetime from scipy import ndimage as ndi import SimpleITK as sitk import skimage as skim from skimage import feature, morphology import glob class RegHearts: '''Class that generates liver masks for MRE ...
{"hexsha": "f105b721afb9f845c4e320b2b60eb5e5d9422cbd", "size": 6838, "ext": "py", "lang": "Python", "max_stars_repo_path": "code4step2/data_registration.py", "max_stars_repo_name": "yukeyi/MCDS-Capstone", "max_stars_repo_head_hexsha": "f7ce48fc5d3f5f96c1f29556585ed2338683c7d2", "max_stars_repo_licenses": ["MIT"], "max_...
from sklearn import svm from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier as CART from sklearn.utils import shuffle import numpy as np import sys import re class MachineLearningLib(object): @staticmethod def svm(X, y, params): clf = svm.SVC(n_jobs=param...
{"hexsha": "41c3acfe2b6a4d94fd0ce79c3884a955ea4d046e", "size": 1002, "ext": "py", "lang": "Python", "max_stars_repo_path": "DynamicNetworkEmbedding-master/src/utils/lib_ml.py", "max_stars_repo_name": "yanzihan1/Use-Dynamic-network-embedding-for-Social-Network-Aligment-", "max_stars_repo_head_hexsha": "9bec908d25fbe4c07...
[STATEMENT] lemma Invariants_sets: "sets Invariants = {A \<in> sets M. T-`A \<inter> space M = A}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sets Invariants = {A \<in> sets M. T -` A \<inter> space M = A} [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. sets Invariants = {A \<in> sets M. T...
{"llama_tokens": 6790, "file": "Ergodic_Theory_Invariants", "length": 73}
[STATEMENT] lemma (in encoding) refl_symm_trans_closure_of_indRelT: fixes TRel :: "('procT \<times> 'procT) set" assumes refl: "refl TRel" and symm: "sym TRel" shows "indRelTEQ TRel = (symcl ((indRelT TRel)\<^sup>=))\<^sup>+" [PROOF STATE] proof (prove) goal (1 subgoal): 1. indRelTEQ TRel = (symcl ((indRel...
{"llama_tokens": 1330, "file": "Encodability_Process_Calculi_SourceTargetRelation", "length": 13}
''' Author : Siddharth Nayak email:ee16b073@smail.iitm.ac.in ''' from sklearn import svm from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix import scipy as sp import os, signals from sklearn.externals import joblib from sklearn.model_selection import GridSearchCV from skle...
{"hexsha": "80cb864285099ea64e7defb3c3934a69accaf9c8", "size": 2005, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_classify_first_layer.py", "max_stars_repo_name": "ruc98/Inter-IIT-Tech-Meet-2018-Project", "max_stars_repo_head_hexsha": "8405acd3d650b4f41b669e9cfc59cd27f0fee1a5", "max_stars_repo_licenses"...
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Builder as mb from coremltools.converters.mil.testing_util...
{"hexsha": "e717cb672f85eda6af6f1efe2350be109d5778ac", "size": 12011, "ext": "py", "lang": "Python", "max_stars_repo_path": "coremltools/converters/mil/mil/passes/test_elementwise_fusions.py", "max_stars_repo_name": "LaudateCorpus1/coremltools", "max_stars_repo_head_hexsha": "777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc", ...
try: from astropy.io import fits except: import pyfits as fits import numpy as np import scipy.signal def gen_bad_pix_mask(image, filsize=5, threshold=5.0, return_smoothed_image=False): """ """ image_sm = scipy.signal.medfilt(image, filsize) res = image - image_sm sigma = np.std(res) ...
{"hexsha": "f95f44ace533cc0863371accc5f1eda2aaff812c", "size": 761, "ext": "py", "lang": "Python", "max_stars_repo_path": "charis/tools/badpix.py", "max_stars_repo_name": "thaynecurrie/charis-dep", "max_stars_repo_head_hexsha": "238397bb3ec18edba6e59c7203a623709ff4b50d", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBS...
using Plots using LaTeXStrings pgfplots() c = 1 a₀ = 1 ω = 1 x(τ) = c*(a₀^2)/4 *(τ - 1/2* ω*sin(2ω*τ)) y(τ) = c*a₀/ω *(1-cos(ω*τ)) p1 = plot(x, y, 0, 15, xlabel=L"x", ylabel=L"y", xticks=nothing, yticks=nothing, legend=:none, framestyle=:box, tex_output_standalone=true ) v_drift = c*a₀^2/4 p2 = plot(τ->x...
{"hexsha": "dbd2f178dea2e51df6b64062f7c0ba4cd52b0f43", "size": 628, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/fig8.jl", "max_stars_repo_name": "SebastianM-C/MasterThesis", "max_stars_repo_head_hexsha": "ffbf25e087444644ee73f72a31be969375fa0d10", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...