text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
I_trues = [0.44129802 0.39444956 0.30091208 0.25465866 0.30253774 0.39726529 0.44454934 ; 0.39250948 0.35223311 0.27210130 0.23339588 0.27639321 0.35966691 0.40109329 ; 0.35082997 0.31575536 0.24622966 0.21348201 0.25258702 0.32676664 0.36354469 ; 0.29863696 0.26973242 0.21277028 0.18702656 0.22140580 0.28468958...
{"hexsha": "cd6b1f49a0affa440e8c679f14c99189a0de771f", "size": 3792, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/benchmarks/natraj_trues.jl", "max_stars_repo_name": "RemoteSensingTools/vSmartMOM.jl", "max_stars_repo_head_hexsha": "fe5b7d28ca99bef0d1702293749d217e8c839db6", "max_stars_repo_licenses": ["MI...
"""End to end testing on feedforward models """ # pylint: disable=C0103 # pylint: disable=C0325 # pylint: disable=E1101 import numpy as np from nltk.corpus import brown from model_wrangler.model_wrangler import ModelWrangler from model_wrangler.dataset_managers import DatasetManager from model_wrangler.model.losse...
{"hexsha": "fbea7322ea44f98c3a214394488f77433a7f684d", "size": 2583, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_text.py", "max_stars_repo_name": "bmcmenamin/model_wrangler", "max_stars_repo_head_hexsha": "c5471cc106d475c50bf26791b913f2d556a1de0a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import pathlib import warnings import numpy as np import pytest import xarray as xr from tests.fixtures import generate_dataset from xcdat.dataset import ( _has_cf_compliant_time, _keep_single_var, _postprocess_dataset, _preprocess_non_cf_dataset, _split_time_units_attr, decode_non_cf_time, ...
{"hexsha": "4ca343867c3d63321e254619ee276e43efce15fa", "size": 35933, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_dataset.py", "max_stars_repo_name": "jasonb5/xcdat", "max_stars_repo_head_hexsha": "4a35d6a6131fe3fec22593f54a9e48b640ceac4f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
[STATEMENT] lemma differentiable_on_Pair: "f differentiable_on S \<Longrightarrow> g differentiable_on S \<Longrightarrow> (\<lambda>x. (f x, g x)) differentiable_on S" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. (f x,...
{"llama_tokens": 416, "file": "Smooth_Manifolds_Analysis_More", "length": 3}
""" Created on Okt 01 16:11 2019 @author: nishit """ from pyomo.environ import * from pyomo.opt import SolverStatus, TerminationCondition import pyutilib.subprocess.GlobalData pyutilib.subprocess.GlobalData.DEFINE_SIGNAL_HANDLERS_DEFAULT = False class OptUt: def thread_solver(self, single_ev, data_dict, in...
{"hexsha": "9c52a139c17cfa76cc2296b2c1265a8f95528df7", "size": 3823, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimization/optut.py", "max_stars_repo_name": "storage4grid/PROFESS-PROFEV", "max_stars_repo_head_hexsha": "adf4e26488225206c249938c9eecc394a06f9677", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np import tensorflow as tf from random import choice,shuffle #g_ps = [] #s_ps = [] #for g in glob.glob('../data/training_set/ffp10_p/*.npy'): # g_ps.append(np.load(g)) #g_ps = np.array(g_ps) #print 'g_ps.shape:',g_ps.shape #for s in glob.glob('../data/training_set/string_p/*.npy'): # s_ps.appen...
{"hexsha": "fef652ebd8c37afc107a4fb2409e84884e7cbea8", "size": 8109, "ext": "py", "lang": "Python", "max_stars_repo_path": "cosmic_string/deep_measure/utils.py", "max_stars_repo_name": "vafaei-ar/DeePlanck", "max_stars_repo_head_hexsha": "9e9aab4dc069ed5810a6316cdcc55a1f4a58938e", "max_stars_repo_licenses": ["MIT"], "m...
# -*- coding: utf-8 -*- r""" Morphic words This modules implements morphic words (letter-to-letter coding of fixed point of a morphism). AUTHORS: - Jana Lepsova (January 2021): initial version EXAMPLES: Creation of the fixed point of a morphism:: sage: m = WordMorphism('a->abc,b->baba,c->ca') sage: w = m....
{"hexsha": "3fbbe48f26bf8c9adc8451e738b02e8fdd523a1c", "size": 11077, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/combinat/words/morphic.py", "max_stars_repo_name": "sheerluck/sage", "max_stars_repo_head_hexsha": "b5e572b7d231f70c139d9978d68add80c4ef353d", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
# system utilities from __future__ import print_function import os, datetime, argparse # pytorch utilities import torch import torch.nn as nn import torch.nn.functional as F from torchvision import datasets, transforms # computing utilities import numpy as np import math # custom utilities from BayesNets import Baye...
{"hexsha": "edd83681ec5aa0b44d7e1c8c4a0f105734e24f56", "size": 27207, "ext": "py", "lang": "Python", "max_stars_repo_path": "BQN/class_bqn_train.py", "max_stars_repo_name": "umd-huang-lab/Bayesian-Quantized-Networks", "max_stars_repo_head_hexsha": "eb56fa1cb142cf235dde9cec7badea86009c3fcb", "max_stars_repo_licenses": [...
import numpy as np import hyperparameters as hp class ActionMeta(type): def __init__(cls, name, bases, d): type.__init__(cls, name, bases, d) cls.action_to_num = dict() cls.num_to_action = dict() options = [True, False] counter = 0 for left in options: fo...
{"hexsha": "d24d423fb79c7d42cdaa52822fdaca3af524b0d6", "size": 2066, "ext": "py", "lang": "Python", "max_stars_repo_path": "action.py", "max_stars_repo_name": "tigerneil/cs231n-project", "max_stars_repo_head_hexsha": "2c520fd79fabbba09ad995360c1e21f49e10a52a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24, ...
import numpy as np import pandas as pd from corsempy.model import Model as md from corsempy.optimizer import Optimizer as opt from corsempy.identifier import Identifier as id from corsempy.stats import Statistics as stat df1 = pd.read_csv('data_poli.csv') mod = """xi_1~=x1+x2+x3 eta_1 ~= y1+y2+y3+y4 eta_2 ~= y5+y6+y...
{"hexsha": "18539b9a4a0c27834824f9e740086a795de17914", "size": 421, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "iaousse/corsempy_project", "max_stars_repo_head_hexsha": "e369016e1edd9372556e13d0038088628dc7bb40", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import numpy as np import torch device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") def collect_trajectories(envs, action_dist, ep_length, policy, rollout_length=200): """ collect trajectories for a parallelized parallelEnv object Returns : Shape ====== log_probs_old (tens...
{"hexsha": "7744abf530d38f8a8508ef475f71c02271b4836d", "size": 2890, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "rish-16/gym-navmaze", "max_stars_repo_head_hexsha": "cc21d730ec6ab1e96a4a1a8f602a5bbb951d2929", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
C ALGORITHM 680, COLLECTED ALGORITHMS FROM ACM. C THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE, C VOL. 16, NO. 1, PP. 47. SUBROUTINE WOFZ (XI, YI, U, V, FLAG) C C GIVEN A COMPLEX NUMBER Z = (XI,YI), THIS SUBROUTINE COMPUTES C THE VALUE OF THE FADDEEVA-FUNCTION W(Z) = EXP(-Z**2)*ER...
{"hexsha": "e44ca90816029a4b60166b42f3dff3695e8d2dce", "size": 6385, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "fortran/algo-680-erf.f", "max_stars_repo_name": "lloda/slatec-bessel-c-", "max_stars_repo_head_hexsha": "1140750c3b5374573f92190753e7535ad066e0e7", "max_stars_repo_licenses": ["CC0-1.0"], "max_sta...
import unittest from mixture_net.utils import nnelu, register_custom_activation from mixture_net.model import MDN import numpy as np from sklearn.model_selection import train_test_split from mixture_net.losses import gnll_loss class TestModel(unittest.TestCase): def setUp(self): samples = int(100) ...
{"hexsha": "4f7dfe74923fa3fbeddebac95f24afe542457c2e", "size": 1237, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_model.py", "max_stars_repo_name": "arrigonialberto86/mixture_nets", "max_stars_repo_head_hexsha": "9965ac9c7f378eb7d7e6277e609574344602152b", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma Bag_s_mul_ext: "(Bag xs, Bag ys) \<in> s_mul_ext {(x, y). snd (f x y)} {(x, y). fst (f x y)} \<longleftrightarrow> fst (mul_ext f (ass_list_to_single_list (DAList.impl_of xs)) (ass_list_to_single_list (DAList.impl_of ys)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ((Bag xs, Bag ys) \<in...
{"llama_tokens": 254, "file": "Weighted_Path_Order_Multiset_Extension2_Impl", "length": 1}
import numpy as np import tensorflow as tf DIV2K_RGB_MEAN = np.array([0.4488, 0.4371, 0.4040]) * 255 def normalize(x, rgb_mean=DIV2K_RGB_MEAN): return (x - rgb_mean) / 127.5 def denormalize(x, rgb_mean=DIV2K_RGB_MEAN): return x * 127.5 + rgb_mean def pixel_shuffle(scale): return lambda x: tf.nn.depth_to...
{"hexsha": "803989a8b549c188f5c951f5ad75eb9f384b8a1b", "size": 336, "ext": "py", "lang": "Python", "max_stars_repo_path": "Algorithms/EDSR/common.py", "max_stars_repo_name": "TheStarkor/SuperResolution", "max_stars_repo_head_hexsha": "823aa004b15d1477f685b31bef0c3d8e181741bf", "max_stars_repo_licenses": ["MIT"], "max_s...
import logging import sys import torch from torch.utils.data import DataLoader from tqdm import tqdm from neural_punctuator.base.BaseTrainer import BaseTrainer from neural_punctuator.data.dataloader import BertDataset, collate, get_data_loaders, get_datasets from neural_punctuator.models.BertPunctuator import BertPunct...
{"hexsha": "599682f51a622c2d45b19cafecb18e38b547808a", "size": 6828, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/neural_punctuator/trainers/BertPunctuatorTrainer.py", "max_stars_repo_name": "juliandarley/neural-punctuator", "max_stars_repo_head_hexsha": "2b3ff7e052380ec463b90a74c6960e1e90515c05", "max_st...
from notebooks.profiles import BaseProfile import numpy as np import pandas as pd import math from io import BytesIO import pickle class VotingProfile(BaseProfile): def __init__(self, p=None, bytesIO=None): if bytesIO is not None: state_dict = pickle.load(bytesIO) if state_dict["m...
{"hexsha": "a23c414a336d1bb631ec775bbf1476168bcf9064", "size": 3300, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/notebooks/profiles/_voting_profile.py", "max_stars_repo_name": "grchristensen/avpd", "max_stars_repo_head_hexsha": "f7617844ae454a93825aa231e04c125cb4e58a20", "max_stars_repo_licenses": ...
%%======================================================= %% Chapter 4: JOST SOLUTIONS \& THE DIRECT SCATTERING MAP %%======================================================= \documentclass[../dissertation.tex]{subfiles} \begin{document} \chapter{\chfourtitle}\label{cptr04:DM} %%========================== %% Section ...
{"hexsha": "e0d7e35c2b2d18af17921607114725f585d5ff10", "size": 956, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter4-Jost/Chapter4-Jost.tex", "max_stars_repo_name": "ADGC/ilw-dsm-dissertation", "max_stars_repo_head_hexsha": "de0f27b6389ee55c24d155ff482743acbe6a35a1", "max_stars_repo_licenses": ["MIT"], "ma...
section \<open> Equivalence of a Diamond-Shaped Forwarding Praos Network and a Cross-Shaped Broadcasting Praos Network \<close> theory Ouroboros_Praos_Forwarding_Broadcasting_Equivalence imports "Chi_Calculus_Examples.Network_Equivalences-Forwarding_Broadcasting" Ouroboros_Praos_Implementation begin the...
{"author": "input-output-hk", "repo": "ouroboros-high-assurance", "sha": "f1b63cb176b119183bcbe14786cd5a61e0c5bf97", "save_path": "github-repos/isabelle/input-output-hk-ouroboros-high-assurance", "path": "github-repos/isabelle/input-output-hk-ouroboros-high-assurance/ouroboros-high-assurance-f1b63cb176b119183bcbe14786c...
using Gtk using Test using DrugInteractions DrugInteractions._apps_should_persist[1] = false drug_interactions_app() @test DrugInteractions._apps[end] isa GtkWindow
{"hexsha": "a82fd3997f5d79aa1fbfbd7c3f47dd77a959368a", "size": 173, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "wherrera10/DrugInteractions.jl", "max_stars_repo_head_hexsha": "1a1ba27d64f48e0ca844b50d928c47d1d3c5044d", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma...
import numpy as np from tensorflow.compat.v1 import set_random_seed import os from mp3_to_wav import MP3Processor from wav_to_spectrogram import WavProcessor from autoencoder_network import Autoencoder from cluster_latent_features import HClust import matplotlib.pyplot as plt config = { "mp3_file_dir": "dsilt-ml-...
{"hexsha": "c82f82ed20dce644bac4d5a8337134a20f7a0876", "size": 3497, "ext": "py", "lang": "Python", "max_stars_repo_path": "09 Generative Models/song_similarity/song_similarity_pipeline.py", "max_stars_repo_name": "nlinc1905/dsilt-ml-code", "max_stars_repo_head_hexsha": "d51fffd16e83f93ea7d49f65102e731abd3ba70c", "max_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : 河北雪域网络科技有限公司 A.Star # @contact: astar@snowland.ltd # @site: www.snowland.ltd # @file: color.py # @time: 2018/7/26 0:24 # @Software: PyCharm import numpy as np npa = np.array def rgb2ycbcr(img): origT = npa([[65.481, 128.553, 24.966], [-37.797, -74.203, ...
{"hexsha": "d160b7b2ca0f3b9d6fc2db03537338e3e370d4cc", "size": 1862, "ext": "py", "lang": "Python", "max_stars_repo_path": "snowland/image/color/color.py", "max_stars_repo_name": "astar-club/scikit-snowland", "max_stars_repo_head_hexsha": "fc2e058f61fe44b3f065bcb4dc8de47f95055bfc", "max_stars_repo_licenses": ["BSD-2-Cl...
[STATEMENT] lemma language_equivalence_classes_preserve_observability: assumes "transitions M' = (\<lambda> t . ({q \<in> states M . LS M q = LS M (t_source t)} , t_input t, t_output t, {q \<in> states M . LS M q = LS M (t_target t)})) ` transitions M" and "observable M" shows "observable M'" [PROOF STATE] proo...
{"llama_tokens": 5572, "file": "FSM_Tests_Minimisation", "length": 34}
import numpy as np from dsmlt import stats def test_trimean(): data = np.array(range(101)) true_trimean = (25 + 50 * 2 + 75) / 4 assert stats.trimean(data) == true_trimean data = np.array(range(1, 101)) true_trimean = (25.75 + 50.5 * 2 + 75.25) / 4 assert stats.trimean(data) == true_trimean ...
{"hexsha": "4c924421134468a02aec570da1cd13f50e416e63", "size": 449, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/stats/test_stats.py", "max_stars_repo_name": "pawlyk/dsml-tools", "max_stars_repo_head_hexsha": "6717ff6b4e58c951140e2abfad20f8d306b01d97", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np def confidence_transform(R, param_alpha, param_epsilon): C = R.copy() C.data = param_alpha * np.log(1 + param_epsilon * C.data) return C
{"hexsha": "81235bc67a634555efdcb9d6d3f28404bcbcc597", "size": 169, "ext": "py", "lang": "Python", "max_stars_repo_path": "krotos/msd/latent/als.py", "max_stars_repo_name": "KelvinLu/krotos-convnet", "max_stars_repo_head_hexsha": "e37218aeaf10b73d77dfac911be46d8ab689e41d", "max_stars_repo_licenses": ["MIT"], "max_stars...
# importing libraries library(plyr) library(foreign) library(RWeka) library(dplyr) library(caret) library(xgboost) # reading datasets esl = read.arff("esl.arff") era = read.arff("era.arff") lev = read.arff("lev.arff") swd = read.arff("swd.arff") # function to create dataset train and test partitions createPartitions ...
{"hexsha": "60319db05ca2e21a2e660d8f44251b88b29ca438", "size": 4668, "ext": "r", "lang": "R", "max_stars_repo_path": "monoxgboost.r", "max_stars_repo_name": "CarlosSequi/DataMining-OrdinalMonotonicClassification", "max_stars_repo_head_hexsha": "4a4c5055b37540f5394779b89746d21964b5e727", "max_stars_repo_licenses": ["Apa...
import cv2 import sys import imgaug.augmenters as iaa sys.path.insert(1,"D:\\source\\repos\\rdt-reader\\object_detection_v2") import core.model_new as model from core.config import cfg import numpy as np from utils import data_loader inpImg="../object_detection_mobile_v2/train_hor_ratioCropped/I4.jpg" import ntpath im...
{"hexsha": "90a40103dff9439f3cece114fc73b1fc09591374", "size": 11439, "ext": "py", "lang": "Python", "max_stars_repo_path": "heatmap_newModel.py", "max_stars_repo_name": "DigitalHealthIntegration/rdt-reader", "max_stars_repo_head_hexsha": "242a4d813a6b58b3668f4d4ce35cea8f55bd651f", "max_stars_repo_licenses": ["MIT"], "...
import unittest import umo import math class TestUmoApi(unittest.TestCase): def test_creation(self): m = umo.Model() def test_constants(self): m = umo.Model() b1 = m.constant(False) b2 = m.constant(True) self.assertEqual(b1.value, False) self.assertEqual(b2.va...
{"hexsha": "bc510e79c7cc7c14693f4b1bbe7f71090f79d168", "size": 19197, "ext": "py", "lang": "Python", "max_stars_repo_path": "apis/python/test.py", "max_stars_repo_name": "Coloquinte/umo", "max_stars_repo_head_hexsha": "1f39c316d6584bbed22913aabaa4bfb5ee02d72b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
#include <cradle/gui/app/instance.hpp> #include <wx/glcanvas.h> #include <wx/msgdlg.h> #include <cradle/external/clean.hpp> #include <json\json.h> #include <boost/program_options.hpp> #include <alia/ui/utilities/styling.hpp> #include <cradle/gui/app/internals.hpp> #include <cradle/gui/app/top_level_ui.hpp> #include...
{"hexsha": "f176b0a7ac68540e95ea775d07f8a4c283d65648", "size": 7445, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cradle/src/cradle/gui/app/instance.cpp", "max_stars_repo_name": "dotdecimal/open-cradle", "max_stars_repo_head_hexsha": "f8b06f8d40b0f17ac8d2bf845a32fcd57bf5ce1d", "max_stars_repo_licenses": ["MIT"]...
import logging import numpy as np from astropy.wcs import Sip __author__ = 'drharbeck@gmail.com' log = logging.getLogger(__name__) akwcslookup = { 'ak01': {'SIPA_1_1': 2.8875384573560257e-06, 'SIPA_0_2': -1.2776642259520679e-05, 'SIPA_2_0': 6.873210426347869e-06, 'SIPB_1_1': 1.8322056773537455e-05,...
{"hexsha": "a7b5598a1127ebe269c692d1133b1bb1f7fa968b", "size": 3412, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/LCOWCSLookupProvider.py", "max_stars_repo_name": "LCOGT/lcowcstools", "max_stars_repo_head_hexsha": "e5db536647dbb143a1f75293ec4f2a4acb68182b", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
"""test_poisson.py [options] Solves the Heterogeneous Poisson equation on a unit cube. A full script for testing generation and tools provided by proteus. """ import numpy as np import sys from proteus import Comm, Profiling, NumericalSolution, TransportCoefficients, default_so, default_s from proteus.FemTools impor...
{"hexsha": "12224a77d7874221fed2cfb2da931124d5d10bba", "size": 9849, "ext": "py", "lang": "Python", "max_stars_repo_path": "ignition/utils/proteus/test/test_poisson.py", "max_stars_repo_name": "IgnitionProject/ignition", "max_stars_repo_head_hexsha": "0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6", "max_stars_repo_licenses"...
function cd2EditedFile() % cd2EditedFile: goes to the the file opened in editor % % references at: % <<http://blogs.mathworks.com/community/2011/05/16/matlab-editor-api-examples/>> % Copyright 2012, Clemens Ager %% a = fileparts(matlab.desktop.editor.getActiveFilename); cd(a);
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/38104-cd-to-edited-file/cd2EditedFile.m"}
module Languages using Compat export Language, EnglishLanguage, SpanishLanguage, GermanLanguage export isocode, name export articles, definite_articles, indefinite_articles export prepositions export pronouns export stopwords cache = Dict() include("types.jl") include("utils.jl") include("word_lists.jl") en...
{"hexsha": "96bc3d9575d1c95cc510a34278b3aa23615427e9", "size": 322, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Languages.jl", "max_stars_repo_name": "JuliaPackageMirrors/Languages.jl", "max_stars_repo_head_hexsha": "1a333b0ccf8850f7a7fffe51ef8f4ca56f9d531b", "max_stars_repo_licenses": ["MIT"], "max_stars...
```python %matplotlib inline from sympy import * init_printing(use_unicode=True) ``` ```python r, u, v, c, r_c, u_c, v_c, E, p, r_p, u_p, v_p, e, a, b, q, b_0, b_1, b_2, b_3, q_0, q_1, q_2, q_3, q_4, q_5, t, g, c_0, c_1, c_2, c_3, c_4, c_5 = symbols('r u v c r_c u_c v_c E p r_p u_p v_p e a b q b_0 b_1 b_2 b_3 q_0 q_1...
{"hexsha": "9cb5eecf6a868ad7bcd9949cd51870f880d47e91", "size": 194750, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Smectic/VPEqualZero.ipynb", "max_stars_repo_name": "brettavedisian/Liquid-Crystals", "max_stars_repo_head_hexsha": "c7c6eaec594e0de8966408264ca7ee06c2fdb5d3", "max_stars_repo_licens...
''' This script computes the acuity scores corresponding to the Sepsis patient cohort extracted with the procedure provided at: https://github.com/microsoft/mimic_sepsis using the raw features. ============================================================================================================================...
{"hexsha": "a05c812377b58514a9cf71839e76f551c62cfecd", "size": 7752, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/compute_acuity_scores.py", "max_stars_repo_name": "lysuk96/rl_representations", "max_stars_repo_head_hexsha": "19de69305e40c9b3a1d746a7af26d232c9fb3f6f", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma suicide_aux_r: "\<lbrakk> (\<forall>w\<in>Y. 0\<le>length w); (\<forall>w\<in>X\<^bsup>Suc n\<^esup>. n \<le> length w) \<rbrakk> \<Longrightarrow> (\<forall>w\<in>Y \<cdot> X\<^bsup>Suc n\<^esup>. n \<le> length w)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>\<forall>w\<in>Y. 0 \<l...
{"llama_tokens": 245, "file": "Regular_Algebras_Regular_Algebra_Models", "length": 1}
#!/usr/bin/env python # -*- coding: utf-8 -*- # Implementation in Chainer of https://github.com/tensorflow/models/tree/master/video_prediction # ============================================================================================== import types import random import math from math import floor, log import nump...
{"hexsha": "f93f8f5f54c8b0335e4d92045f0fd57308c74a55", "size": 46527, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "kristofbc/physical-interaction-video-prediction", "max_stars_repo_head_hexsha": "845286629065c6a62580064943800b2b4ef0e04c", "max_stars_repo_lic...
import os import numpy as np from rfvision.datasets import DATASETS from torch.utils.data import Dataset import os import numpy as np import rflib from rfvision.datasets import DATASETS from rfvision.datasets.custom3d import Custom3DDataset SNAP_PARENT = [ 0, # 0's parent 0, # 1's parent 1, 2, 3,...
{"hexsha": "07d7d990228e1363282741543661628b06ce23a4", "size": 6048, "ext": "py", "lang": "Python", "max_stars_repo_path": "rfvision/datasets/ik_dataset.py", "max_stars_repo_name": "tycoer/rfvision-1", "max_stars_repo_head_hexsha": "db6e28746d8251d1f394544c32b9e0af388d9964", "max_stars_repo_licenses": ["Apache-2.0"], "...
/* vim: set tabstop=4 expandtab shiftwidth=4 softtabstop=4: */ /** * \file src/fgt_coalform.cpp * * \brief Form stable coalition among a set of fog nodes. * * \author Marco Guazzone (marco.guazzone@gmail.com) * * <hr/> * * Copyright 2017 Marco Guazzone (marco.guazzone@gmail.com) * * Licensed under the Apach...
{"hexsha": "f897c82d8fd0b2adb994e08f3e245efbbc425ce1", "size": 13335, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/fog_coalform.cpp", "max_stars_repo_name": "sguazt/fog-gt", "max_stars_repo_head_hexsha": "92a01de4f3d71bf89741c7e4af1bebb965c64d28", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
from __future__ import division, print_function, absolute_import from math import sqrt, exp, cos, sin import numpy as np # Import testing parameters try: from scipy.optimize._tstutils import methods, mstrings, functions, fstrings except ImportError: pass from scipy.optimize import newton # newton predates be...
{"hexsha": "37eb95890965155c5d77a89789201381794a0065", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/benchmarks/optimize_zeros.py", "max_stars_repo_name": "magnusja/scipy", "max_stars_repo_head_hexsha": "c4a5a1f984e28840010f20a7e41caa21b8f41979", "max_stars_repo_licenses": ["FSFAP"], "...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <float.h> #define COMPEARTH_PRIVATE_DET3X3 1 #define COMPEARTH_PRIVATE_CROSS3 1 #define COMPEARTH_PRIVATE_NORM3 1 #define COMPEARTH_PRIVATE_GEM3 1 #define COMPEARTH_PRIVATE_GEMT3 1 #include "compearth.h" #ifdef COMPEARTH_USE_MKL #ifde...
{"hexsha": "184e22a232b6a8a23ab9768b171b66a56cf9acf0", "size": 5879, "ext": "c", "lang": "C", "max_stars_repo_path": "c_src/Uorth.c", "max_stars_repo_name": "OUCyf/mtbeach", "max_stars_repo_head_hexsha": "188058083602cebf1471ea88939b07999c90b655", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9.0, "max_stars_r...
import asyncio import sys import numpy as np import pytest import ucp def _skip_if_not_supported(message_type): if message_type == "am" and not ucp._libs.ucx_api.is_am_supported(): pytest.skip("AM only supported in UCX >= 1.11") async def _shutdown_send(ep, message_type): msg = np.arange(10 ** 6) ...
{"hexsha": "acffff045cd59ca3aa1ac5136002a4eca0990cc3", "size": 6351, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_shutdown.py", "max_stars_repo_name": "pentschev/ucx-py", "max_stars_repo_head_hexsha": "d701a3facd85ef2deece619a4f707fdebee36e3c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
module allel_module use atom_module, only: zn_atom use ggrid_module, only: GG use ps_local_variables, only: vqlg use io_tools_module implicit none private public :: init_allel public :: init_ae_local_allel logical,public :: flag_allel=.false. real(8) :: Vcell contains subroutine init_allel(...
{"hexsha": "fd60f2a5133c8895d607c28eccba6d591fc4092f", "size": 1090, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/allel_module.f90", "max_stars_repo_name": "j-iwata/RSDFT_DEVELOP", "max_stars_repo_head_hexsha": "14e79a4d78a19e5e5c6fd7b3d2f2f0986f2ff6df", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
\documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \title{Reflection Report on [Title of Project]} \author{author name} \date{} \input{../Comments} \begin{document} \begin{table}[hp] \caption{Revision History} \label{TblRevisionHistory} \begin{tabularx}{\textwidth}{llX} \toprule \textbf{Date} & ...
{"hexsha": "85d2ea582b8ef4394069bbee22b4b178dd9f0339", "size": 1033, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/Reflection/Reflection.tex", "max_stars_repo_name": "Ao99/MISEG", "max_stars_repo_head_hexsha": "7e07da67e34c460de33fce555e93acb8e795d80b", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib from matplotlib import animation, rc colors = dict() colors[0] = [0.2, 0.2, 0.2] colors[1] = [0, 0, 1] colors[2] = [0, 1, 0] colors[3] = [1, 1, 0] colors[4] = [0, 1, 1] colors[5] = [1, 0, 1] colors[6] = [0, 0.5, 0...
{"hexsha": "36d0a3c1456022fb1883057534debde61986a243", "size": 8444, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/articulated_multi_object/visualize.py", "max_stars_repo_name": "Fzaero/Object-and-Relation-Centric-Representations-for-Push-Effect-Prediction", "max_stars_repo_head_hexsha": "8f5e120983fe2e268...
import torch import numpy as np import time from sklearn.feature_extraction import image from tqdm import tqdm from glob import glob from sklearn.cluster import MeanShift from matplotlib import pyplot as plt from IPython.display import clear_output def normalize(img, mean, std): """Normalize an array of images wit...
{"hexsha": "9642a4a85a22c8fd69bb43b5e0911e87cb8671a9", "size": 11549, "ext": "py", "lang": "Python", "max_stars_repo_path": "divnoising/utils.py", "max_stars_repo_name": "mangalp/DivNoising", "max_stars_repo_head_hexsha": "19336a1dd0878526de119100dd33b26ec5dab2c4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
"""Module using IndRNNCell to solve the addition problem The addition problem is stated in https://arxiv.org/abs/1803.04831. The hyper-parameters are taken from that paper as well. The network should converge to a MSE around zero after 1500-20000 steps, depending on the number of time steps. """ import tensorflow as t...
{"hexsha": "762c3c3ce0e0880c42263b8f7e57b0120d511e45", "size": 4635, "ext": "py", "lang": "Python", "max_stars_repo_path": "ptb/ptb_rnn.py", "max_stars_repo_name": "narutowang/indrnn", "max_stars_repo_head_hexsha": "434e1200b5e742a0eac92bed661c69e97b8b8711", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
import csv from typing import Dict, List import numpy as np from .features import Features CACHED_DATA: Dict[str, List[int]] = {} class TextualFeatures(Features): def __init__(self): super().__init__() self.emotional_words_count = np.zeros(2) self.emoticon_count = np.zeros(3) se...
{"hexsha": "64a151875a8576d9e53d4c7660ffdfef01192cc1", "size": 1559, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/textual_features.py", "max_stars_repo_name": "icycookies/dd_benchmark", "max_stars_repo_head_hexsha": "5551c0654d3dc30d72b817096d0877a02f28f116", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
{"hexsha": "e6ca3e340b8f371de16ee64e61f736833db724dc", "size": 20704, "ext": "py", "lang": "Python", "max_stars_repo_path": "nfnets/dataset.py", "max_stars_repo_name": "bruinxiong/deepmind-research", "max_stars_repo_head_hexsha": "4899440e3eb2dee9335c469c7f01aadcbf21cc72", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 29/07/2020 """ __all__ = ["plot_grad_flow"] import numpy import torch from matplotlib import pyplot from matplotlib.lines import Line2D from draugr.torch_utilities.optimisation.par...
{"hexsha": "536bf4ff9933c7b56e3db22b9b2a5e2602140972", "size": 3286, "ext": "py", "lang": "Python", "max_stars_repo_path": "draugr/torch_utilities/optimisation/debugging/gradients/flow.py", "max_stars_repo_name": "cnHeider/draugr", "max_stars_repo_head_hexsha": "b95e0bb1fa5efa581bfb28ff604f296ed2e6b7d6", "max_stars_rep...
import numpy as np a ='/home/peter/workspace/projects/tradance/traditional-dance-recognition/logs/kordance600_13-rgb-i3d-resnet-18-ts-f32/val_3crops_3clips_224_details.npy' npy = np.load(a) print(npy.shape) print(npy[0])
{"hexsha": "44cd904a8916c456dec0d18dc26ead6847ab8ca6", "size": 228, "ext": "py", "lang": "Python", "max_stars_repo_path": "debug.py", "max_stars_repo_name": "peter-yys-yoon/traditional-dance-recognition", "max_stars_repo_head_hexsha": "be4939d53b838624a04dba0826532c65421d1325", "max_stars_repo_licenses": ["Apache-2.0"]...
from spacy.en import English from numpy import dot from numpy.linalg import norm # from subject_object_extraction import findSVOs import json """ tokenization, sentence recognition, part of speech tagging, lemmatization, dependency parsing, and named entity recognition """ def get_message_info(parsedData): ...
{"hexsha": "786324c45720315d0763b356daf12d68b4ab6676", "size": 6742, "ext": "py", "lang": "Python", "max_stars_repo_path": "chatbot/chatAPI/helper.py", "max_stars_repo_name": "iSuperMostafa/nlp-chatbot-poc", "max_stars_repo_head_hexsha": "519ce184686fd40fcc4ea86bcc200e7bfa01e37f", "max_stars_repo_licenses": ["MIT"], "m...
#include "options.h" #include <boost/program_options.hpp> #include <iostream> namespace po = boost::program_options; bool is_help(const po::variables_map& vm) { return vm.count("help") > 0; } po::variables_map process_cmd_line(const int argc, char** argv) { po::options_description desc("Options"); desc.add_op...
{"hexsha": "952e088618f6b3cc6b58f547fdc655b5d61e8e04", "size": 2162, "ext": "cc", "lang": "C++", "max_stars_repo_path": "examples/test_cpp/options.cc", "max_stars_repo_name": "orenmichaely/reinforcement_learning", "max_stars_repo_head_hexsha": "1a1570641255fdcd03a33996986aa58f3c0c58e2", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma mfinalD: fixes ln assumes "mfinal s" "thr s t = \<lfloor>(x, ln)\<rfloor>" shows "final x" "ln = no_wait_locks" "wset s t = None" [PROOF STATE] proof (prove) goal (1 subgoal): 1. final x &&& ln = no_wait_locks &&& wset s t = None [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: ...
{"llama_tokens": 347, "file": "JinjaThreads_Framework_FWSemantics", "length": 3}
\chapter{\label{resources}Resources} Examples of output from the thesis besides research: \begin{itemize} \item mystatsfunctions plus other packages (eg. FaIR) \item Code accompanying papers \item CEDA archive data \item MARS datasets \end{itemize}
{"hexsha": "2fd16309e231108ea838360128d334f883e12aef", "size": 265, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Appendices/A1.tex", "max_stars_repo_name": "njleach/Thesis", "max_stars_repo_head_hexsha": "a7594eb080d439c01312d44c20b922869c69f8ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
[STATEMENT] lemma map_pred_comp: "map_pred f \<circ> map_pred g = map_pred (g \<circ> f)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_pred f \<circ> map_pred g = map_pred (g \<circ> f) [PROOF STEP] using map_fun_comp[where g=id and g'=id] [PROOF STATE] proof (prove) using this: ?f ---> id \<circ> (?f' ---> id...
{"llama_tokens": 211, "file": "BNF_CC_Concrete_Examples", "length": 2}
[STATEMENT] lemma sturm_id_PR_prio0: "{x::real. P x} = {x::real. (PR_TAG P) x}" "(\<forall>x::real. f x < g x) = (\<forall>x::real. PR_TAG (\<lambda>x. f x < g x) x)" "(\<forall>x::real. P x) = (\<forall>x::real. \<not>(PR_TAG (\<lambda>x. \<not>P x)) x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {x. P x}...
{"llama_tokens": 255, "file": "Sturm_Sequences_Sturm_Method", "length": 1}
[STATEMENT] lemma cfs_times_X: assumes "g \<in> carrier P" shows "(X \<otimes>\<^bsub>P\<^esub> g) (Suc n) = g n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (X_poly R \<otimes>\<^bsub>P\<^esub> g) (Suc n) = g n [PROOF STEP] apply(rule poly_induct3[of g]) [PROOF STATE] proof (prove) goal (3 subgoals): 1. g \...
{"llama_tokens": 783, "file": "Padic_Ints_Cring_Poly", "length": 4}
#!/usr/bin/env python """ ONS Address Index - Test the Performance of the Probabilistic Parser ==================================================================== A simple script to test the performance of a trained probabilistic parser using holdout data. Computes the number of tokens that were correctly identified....
{"hexsha": "e3b752c4f39faaf623367894b5edb77d5f7570a1", "size": 12336, "ext": "py", "lang": "Python", "max_stars_repo_path": "DataScience/ProbabilisticParser/tests/test_performance.py", "max_stars_repo_name": "Yasir326/address-index-data", "max_stars_repo_head_hexsha": "f95da1f5ecda911d5d5a83ce396b33837b629bdd", "max_st...
"""Experiment Runner. It's great!""" from functools import partial import json import os import inspect import random import time import traceback from multiprocessing import Pool import copy import signal import numpy as np from tqdm import tqdm try: import ray @ray.remote(max_calls=1) def ray_eval_fit(pre...
{"hexsha": "5b9345594662b4c873c43351ab4076909dfadb62", "size": 12254, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment_runner/experiment_runner.py", "max_stars_repo_name": "philippjh/experiment_runner", "max_stars_repo_head_hexsha": "e2b1424dfeb9612f92a96ccd96693a6b5556ade5", "max_stars_repo_licenses":...
------------------------------------------------------------------------ -- Pointwise equalities can be lifted ------------------------------------------------------------------------ module Stream.Pointwise where open import Codata.Musical.Notation hiding (∞) open import Stream open import Stream.Equality import Str...
{"hexsha": "a967b51db6b7f8f8af079c1b2de4aa3612734dcf", "size": 6430, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Stream/Pointwise.agda", "max_stars_repo_name": "nad/codata", "max_stars_repo_head_hexsha": "1b90445566df0d3b4ba6e31bd0bac417b4c0eb0e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
function [ A, T, error, alignedShape ] = AlignShapesWithScale( alignFrom, alignTo ) %ALIGNSHAPESWITHSCALE Summary of this function goes here % Detailed explanation goes here numPoints = size(alignFrom,1); meanFrom = mean(alignFrom); meanTo = mean(alignTo); alignFromMeanNormed = bsxfun(@minu...
{"author": "TadasBaltrusaitis", "repo": "OpenFace", "sha": "3d4b5cf8d96138be42bed229447f36cbb09a5a29", "save_path": "github-repos/MATLAB/TadasBaltrusaitis-OpenFace", "path": "github-repos/MATLAB/TadasBaltrusaitis-OpenFace/OpenFace-3d4b5cf8d96138be42bed229447f36cbb09a5a29/matlab_version/PDM_helpers/AlignShapesWithScale....
[STATEMENT] lemma finite_fold_rbt_fold_eq: assumes "comp_fun_commute f" shows "Finite_Set.fold f A (set (RBT.entries t)) = RBT.fold (curry f) t A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Finite_Set.fold f A (set (RBT.entries t)) = RBT.fold (curry f) t A [PROOF STEP] proof - [PROOF STATE] proof (state) go...
{"llama_tokens": 844, "file": null, "length": 10}
module par-swap.confluent where open import par-swap open import par-swap.properties open import Data.Nat using (_+_ ; _≤′_ ; _<′_ ; suc ; zero ; ≤′-refl) open import Esterel.Lang.CanFunction open import utility open import Esterel.Lang open import Esterel.Context open import Data.Product open import Data.Sum open im...
{"hexsha": "32c6ca63d810cc016f5eae4322931bd8eb0bea2c", "size": 9893, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda/par-swap/confluent.agda", "max_stars_repo_name": "florence/esterel-calculus", "max_stars_repo_head_hexsha": "4340bef3f8df42ab8167735d35a4cf56243a45cd", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import os import pickle import gzip import matplotlib.pyplot as plt from sklearn.metrics import roc_auc_score from pybasicbayes.util.text import progprint_xrange from pyhawkes.models import \ DiscreteTimeNetworkHawkesModelGammaMixture, \ DiscreteTimeStandardHawkesModel if __name__ == "_...
{"hexsha": "f1103638ea31a1190bfcd9ada8eb876eec8d886c", "size": 4725, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/inference/gibbs_demo.py", "max_stars_repo_name": "thonic/pyhawkes", "max_stars_repo_head_hexsha": "99804deb9ea22ba3e1a99584420722abdf8eb56b", "max_stars_repo_licenses": ["MIT"], "max_star...
# Copyright (c) 2021. Nicolai Oswald # Copyright (c) 2021. University of Edinburgh # 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 c...
{"hexsha": "4eb63f5cb4135c3626e9fa713e9c97ee64a04a79", "size": 10587, "ext": "py", "lang": "Python", "max_stars_repo_path": "Parser/NetworkxParser/TransTreeGeneration/ClassProtoTransObjectTree.py", "max_stars_repo_name": "Errare-humanum-est/HeteroGen", "max_stars_repo_head_hexsha": "600a7bde441cc1365a465746e15564bd8de8...
#reading data.dat import numpy as np import numpy.random as rd import random as random import scipy import matplotlib as mpl import matplotlib.pyplot as plt file1 = open("data2.dat",'r') out2 = open("out2.txt", 'w') data_string = [] #print(len(file1.readlines())) #looping through the lines for line in file1: if l...
{"hexsha": "06404fc4657a0eb4435cb60a4d8ee3668f4adbbd", "size": 657, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mathematics/PBC_simulations/readingDat2.py", "max_stars_repo_name": "grohalex/Final-Project", "max_stars_repo_head_hexsha": "41ac4e56e1a688a5f03f81d40d99eb2f839f9a26", "max_stars_repo_licenses": ["...
\setlength{\footskip}{8mm} \chapter{Extracting the Object from the Shadows: Maximum Likelihood Object/Shadow Discrimination} \label{ch:shadow} \textit{In this chapter, we propose and experimentally evaluate a new method for detecting shadows using a simple maximum likelihood formulation based on color information. We...
{"hexsha": "5333fc15b6af359b1c45613f011f901c7dc396a7", "size": 41853, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "first-revision/shadow.tex", "max_stars_repo_name": "zkan/dissertation", "max_stars_repo_head_hexsha": "458c5fce241973008bdcc3958bdf962b9197e593", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
"""Provides an easy way of generating several geometric objects. CONTAINS -------- vtkArrowSource vtkCylinderSource vtkSphereSource vtkPlaneSource vtkLineSource vtkCubeSource vtkConeSource vtkDiskSource vtkRegularPolygonSource vtkPyramid vtkPlatonicSolidSource vtkSuperquadricSource as well as some pure-python helpers...
{"hexsha": "d9f6103fa8f9bd7245bcf4a74d66e9b71bc04dcd", "size": 42631, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyvista/utilities/geometric_objects.py", "max_stars_repo_name": "basnijholt/pyvista", "max_stars_repo_head_hexsha": "b1786b99217137e2c67566f5c09374c7a810f597", "max_stars_repo_licenses": ["MIT"],...
__author__ = 'sibirrer' import numpy as np import numpy.testing as npt from lenstronomy.Util import util from lenstronomy.ImSim.Numerics.grid import AdaptiveGrid from lenstronomy.ImSim.Numerics.grid import RegularGrid from lenstronomy.LightModel.light_model import LightModel import pytest class TestAdaptiveGrid(obj...
{"hexsha": "87d0dff27f6614ab760339861fe03601ccdc02ce", "size": 4457, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_ImSim/test_Numerics/test_grid.py", "max_stars_repo_name": "heather999/lenstronomy", "max_stars_repo_head_hexsha": "8102fe026c1f3ba6e81d8a1f59cceb90e68430b4", "max_stars_repo_licenses": [...
import pandas as pd import numpy as np ITEM_COL = 'item_id' USER_COL = 'user_id' FAKE_ITEM_ID = 999999 # Предфильтрация def prefilter_items(data, prevalence_range = (0.05, 0.95), price_range = (1.0, 100.0)): # Уберем самые популярные товары и самые непопулярные товары pop_thr, unpop_thr = prevalence_range ...
{"hexsha": "1e264b5ee81dcbe1834c807a83632f83a6e4cefb", "size": 1729, "ext": "py", "lang": "Python", "max_stars_repo_path": "final/student_utils.py", "max_stars_repo_name": "avidbrain/recsys", "max_stars_repo_head_hexsha": "9f552602b95413ba6389735c51f2253f04d56537", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Engine that performs decisions about whether to employ a surrogate""" from proxima.inference import BaseInferenceEngine, ScikitLearnInferenceEngine from proxima.data import BaseDataSource import numpy as np from sklearn.neighbors import NearestNeighbors # TODO (wardlt): Provide some mechanism for checking if UQ t...
{"hexsha": "85d6dd70b63d2ed233b072c475cb3c928c4fc0b2", "size": 2601, "ext": "py", "lang": "Python", "max_stars_repo_path": "proxima/uq.py", "max_stars_repo_name": "YulianaGomez/proxima-1", "max_stars_repo_head_hexsha": "cfb4d9a530bed1b222b27b9c74b210e61ed7919a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# needs `AbstractObjective` (which in turn needs the Surrogate Interface) Broadcast.broadcastable( mop :: AbstractMOP ) = Ref( mop ); # MANDATORY methods "Return full vector of lower variable vectors for original problem." full_lower_bounds( :: AbstractMOP ) :: Vec = nothing "Return full vector of upper variable vec...
{"hexsha": "ad0c38a7cd451e2eaf9e553c496eceaf750a91bc", "size": 12770, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AbstractMOPInterface.jl", "max_stars_repo_name": "manuelbb-upb/Morbit.jl", "max_stars_repo_head_hexsha": "bfc6b1a7982d2c0003042ec9af75e64ad7ef5cf1", "max_stars_repo_licenses": ["MIT"], "max_st...
import torch.nn.functional as F import torch from torch.autograd import Variable import numpy as np from src.data_ops.wrapping import wrap from src.admin.utils import see_tensors_in_memory def loss(y_pred, y, y_mask, bm): l = nll return l(y_pred, y, y_mask, bm) def kl(y_pred, y, y_mask): n = y_pred.shape...
{"hexsha": "04febf0e2bb6dd4ed7033686c91bb2890a33a4b9", "size": 3024, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/proteins/loss.py", "max_stars_repo_name": "isaachenrion/jets", "max_stars_repo_head_hexsha": "59aeba81788d0741af448192d9dfb764fb97cf8d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
from srtmath import * from srtshapes import * import numpy as np import scipy.misc import time WIDTH = 1280 HEIGHT = 720 SPHERE_COLOR = [0,255,0] if __name__ == "__main__": objects = [] objects.append(Sphere(Point(), 500)) # objects.append(Plane(Point(0, 0, 750), Vector(0,0,-1))) light = Point(0, 700, 1...
{"hexsha": "4306d1a94390867eb6394d07d38537112bdd44b6", "size": 1451, "ext": "py", "lang": "Python", "max_stars_repo_path": "srt.py", "max_stars_repo_name": "Seek/SimpleRT", "max_stars_repo_head_hexsha": "fa9ba1fa1c843b417b1e19a5315a63da718eaa43", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r...
# Simple mnist convutional network import numpy as np from tensorflow import keras from tensorflow.keras import layers import matplotlib.pyplot as plt import math from glob import glob # Model / data parameters num_classes = 10 input_shape = (28, 28, 1) # the data, split between train and test sets (x_train, y_tra...
{"hexsha": "a18fb45f3b3195311ea2a1d416c715eebe341b38", "size": 2242, "ext": "py", "lang": "Python", "max_stars_repo_path": "recognizer.py", "max_stars_repo_name": "ColdBacon/Digit-recognizer", "max_stars_repo_head_hexsha": "af039cf16eff02595cd9806cbc4e0ee314970be6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#xortraintest-5.jl #trains an xornet using noisy and unreliable data. Ten data inputs, top two xor'ed to get the #correct values, 5% of the time. function xortrain_4() srand(10) println("working on unreliable xor data set with backpropagation") input_matrix = rand(Bool, 10, 500) training_results = Array{B...
{"hexsha": "d9711dfb4c0a65e82860aab4fa1602dc0efc6e04", "size": 1173, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/xortraintest-4.jl", "max_stars_repo_name": "interplanetary-robot/GenML", "max_stars_repo_head_hexsha": "f99015ab404250861334e75445b3a701293349e2", "max_stars_repo_licenses": ["MIT"], "max_star...
''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2018 Pupil Labs Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPYING.LESSER for license details. ------------------------------------...
{"hexsha": "615d0f755db6e920713567a40463e412315bd0b3", "size": 10531, "ext": "py", "lang": "Python", "max_stars_repo_path": "pupil_src/shared_modules/calibration_routines/manual_marker_calibration.py", "max_stars_repo_name": "paulmathai01/Pupil-Interfaced", "max_stars_repo_head_hexsha": "4ec40c90876af3bdf75b1def47d21e4...
import pip def install(): if hasattr(pip, 'main'): pip.main(['install', 'keras', 'tensorflow','opencv-python','numpy']) else: pip._internal.main(['install', 'keras', 'tensorflow','opencv-python','numpy']) try: import random,keras,cv2 import os from keras.preprocessing import image ...
{"hexsha": "f3ad2875a683a54650123f86a586c19122952455", "size": 1625, "ext": "py", "lang": "Python", "max_stars_repo_path": "detect.py", "max_stars_repo_name": "newage-virtual-world/tb-and-pneumonia-detection", "max_stars_repo_head_hexsha": "7ac7171f776b90254c86a1cfbc72577470b673b9", "max_stars_repo_licenses": ["Apache-...
import matplotlib.pyplot as plt import os import matplotlib.pyplot as plt import numpy as np import torch class AggregateScalar(object): """ Computes and stores the average and std of stream. Mostly used to average losses and accuracies. """ def __init__(self): self.reset() def reset...
{"hexsha": "adbe8a2320f62460528889c7a53e6d80a3e927b9", "size": 2392, "ext": "py", "lang": "Python", "max_stars_repo_path": "Authors' code/Zero_shot_learning/utils/helpers.py", "max_stars_repo_name": "onicolini/zero-shot_knowledge_transfer", "max_stars_repo_head_hexsha": "9dd6d08eadb8243881f0fb8e9ac2d5653dd25229", "max_...
import autogp import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import sklearn.metrics.pairwise as sk import time import scipy import seaborn as sns import random from kerpy.Kernel import Kernel from kerpy.MaternKernel import MaternKernel from kerpy.GaussianKernel import GaussianKernel # T...
{"hexsha": "44da5af7b25874e6816b71b2b6b88574296afafc", "size": 7652, "ext": "py", "lang": "Python", "max_stars_repo_path": "LGCP_2sparse.py", "max_stars_repo_name": "VirgiAgl/updated_AutoGP", "max_stars_repo_head_hexsha": "2ec5671a4c1554555ab70c351944b3e8649e4237", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import numpy as np import autoarray as aa from autogalaxy.plane.plane import Plane class SimulatorInterferometer(aa.SimulatorInterferometer): def __init__( self, uv_wavelengths, exposure_time: float, transformer_class=aa.TransformerDFT, noise_sigma=0.1, ...
{"hexsha": "3d79ee8efb9e7c816ee8b3dfe5bf350a21682602", "size": 3459, "ext": "py", "lang": "Python", "max_stars_repo_path": "autogalaxy/interferometer/interferometer.py", "max_stars_repo_name": "caoxiaoyue/PyAutoGalaxy", "max_stars_repo_head_hexsha": "ad2b4b27404f5bf0f65ba9a0cd7c3ee6570e2d05", "max_stars_repo_licenses":...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is 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) #ifnd...
{"hexsha": "eeabbc891dfa27dc6414777eed21c614fd231d01", "size": 4739, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Siv3D/src/ThirdParty/boost/geometry/extensions/gis/io/shapelib/shape_creator.hpp", "max_stars_repo_name": "yumetodo/OpenSiv3D", "max_stars_repo_head_hexsha": "ea191438ecbc64185f5df3d9f79dffc6757e419...
const opts = Base.JLOptions() const inline_flag = opts.can_inline == 1 ? `` : `--inline=no` const cov_flag = (opts.code_coverage == 1) ? `--code-coverage=user` : (opts.code_coverage == 2) ? `--code-coverage=all` : `` function run_test(script) srvrscript = joinpath(dirname(@__FILE_...
{"hexsha": "ffa5baed3fc0323f1fa61ddb7b2888ed2ab5ff39", "size": 1734, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "tanmaykm/DagScheduler.jl", "max_stars_repo_head_hexsha": "00859c8f12589166443a04f71a57cacc5b4ccaf1", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
! try movement SUBROUTINE try_conf(imol,itype) use movetype use ints use coupling_pres IMPLICIT NONE integer :: imol, itype logical :: success ! write(*,*) "try_move:" movetype_i_try(itype) = movetype_i_try(itype) + 1 call conf_tran(imol,success) if(success) then movetype_i_success(it...
{"hexsha": "7da7175e85b00af92c3ab67f3b834d69c28d8df4", "size": 6085, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "MonteCarlo/mcrun_v2/try.f90", "max_stars_repo_name": "jht0664/Utility_python_gromacs", "max_stars_repo_head_hexsha": "4457b62e2f0252bcb38021d5deda0cfb932e3ed9", "max_stars_repo_licenses": ["MIT"...
using Polyhedra include("simplex.jl") include("permutahedron.jl") include("board.jl") myeq(x::Real, y::Real) = myeq(promote(x, y)...) myeq{T<:Real}(x::T, y::T) = x == y myeq{T<:AbstractFloat}(x::T, y::T) = y < x+1024*eps(T) && x < y+1024*eps(T) myeq{S<:Real,T<:Real}(x::Vector{S}, y::Vector{T}) = myeq(promote(x, y)......
{"hexsha": "7ae7ba711d2ceb53a085cbfca2efd852ec8a4fff", "size": 2656, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/alltests.jl", "max_stars_repo_name": "JuliaPackageMirrors/Polyhedra.jl", "max_stars_repo_head_hexsha": "a4489180581383b750b1af4e043650f66fa61e76", "max_stars_repo_licenses": ["MIT"], "max_star...
""" Make a histogram of the masses. """ import matplotlib.pyplot as plt plt.rc("text", usetex=True) import numpy as np h=0.7 def get_mass_array(): zs = np.loadtxt("data/z.txt") lMs = [] for i in range(len(zs)): lMs.append(np.loadtxt("results/bestfits/bf_cluster%d.txt"%i)[0]) return np.array(lMs...
{"hexsha": "1e941fd1611f3d04c9603abcdb041deab1a98987", "size": 670, "ext": "py", "lang": "Python", "max_stars_repo_path": "histM.py", "max_stars_repo_name": "tmcclintock/PLANCK_DES_Clusters", "max_stars_repo_head_hexsha": "c9864577d1baec753199327a5a8312576a2c33d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import json import numpy as np import pandas as pd from keras.models import model_from_json import matplotlib.pyplot as plt from ADFA_DDQN import huber_loss from network_classification import NetworkClassificationEnv import itertools from sklearn.metrics import f1_score from sklearn.metrics import accuracy_score, pre...
{"hexsha": "a28c7f6ee5b1c868efb4b956ef476ca6c3de4a33", "size": 5482, "ext": "py", "lang": "Python", "max_stars_repo_path": "estimators/universal_env/ADFA_DDQN_test.py", "max_stars_repo_name": "boyuruan/Anomaly-ReactionRL", "max_stars_repo_head_hexsha": "a82da87e2da28ad333a7e19af5a0608390c3312c", "max_stars_repo_license...
#include <boost/test/unit_test.hpp> #include "golden/include/gold.hpp" using namespace golden; BOOST_AUTO_TEST_CASE(my_test) { // seven ways to detect and report the same error: BOOST_CHECK(add(2, 2) == 4); // #1 continues on error BOOST_REQUIRE(add(2, 2) == 4); // #2 throws on error if (add(2, 2) != 4) ...
{"hexsha": "7ab15ac3be27256a834f1ce161bad435d8a4c348", "size": 691, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/unit/test_golden.cpp", "max_stars_repo_name": "nokx5/golden-cpp", "max_stars_repo_head_hexsha": "1eb5e05d35b315aeeeabf49b0795c9859707ae0a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Created on Dec,27,2020 @author: junyun,Pan Aim:反向拟合物性参数。 """ ###################################################################### #input import sys import os mupif_dir=os.path.abspath(os.path.join(os.getcwd(), "../")) sys.path.append(mupif_dir) import mupif import numpy as np from scipy import stats from bayes...
{"hexsha": "0dbd9be98a753425e48e7eb1b925cee0390e34e0", "size": 3512, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "PjyCMS1Beike/USTB_MGE_ICME_group414", "max_stars_repo_head_hexsha": "e16819eb71bfda5580e4e0147447017a1c22ae19", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma addO_assoc [simp]: "addO n (addO m p) = addO (addO n m) p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. addO n (addO m p) = addO (addO n m) p [PROOF STEP] by (induct p) auto
{"llama_tokens": 95, "file": "Goodstein_Lambda_Goodstein_Lambda", "length": 1}
from scipy.special import gammainc from math import log L = 0 R = 10**9 n = 10 ** 7 T = 0.75 for i in range(1000): M = (L + R) * 0.5 v = gammainc(n, M) if v < T: L = M else: R = M print(L / log(10.0))
{"hexsha": "3a11dcf895624760371c2c41c5e4ad1bee962528", "size": 253, "ext": "py", "lang": "Python", "max_stars_repo_path": "600-700/697.py", "max_stars_repo_name": "Thomaw/Project-Euler", "max_stars_repo_head_hexsha": "bcad5d8a1fd3ebaa06fa52d92d286607e9372a8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from __future__ import division, print_function from bm_tools import OnlineLogsumexp, sigmoid, log1pexp, logsumexp import numpy from scipy import linalg TRAIN = "/home/mark/Projects/succotash/succotash/datasets/train_examples.npy" TEST = "/home/mark/Projects/succotash/succotash/datasets/test_examples.npy" X = numpy.l...
{"hexsha": "536b5d93b0662a5f3cdaf88d61f3c7970e94454c", "size": 3634, "ext": "py", "lang": "Python", "max_stars_repo_path": "structured_gaussian_mixtures/online_full_GMM_no_mean.py", "max_stars_repo_name": "markstoehr/structured_gaussian_mixtures", "max_stars_repo_head_hexsha": "f0c30770c8a851da7a7218b0b040b4f386f2bc5b"...
#= polylagrange: - Julia version: - Author: ymocquar - Date: 2019-11-25 =# include("polyexp.jl") function getpolylagrange(k::Int64, j::Int64, N::DataType) @assert k <= j "_getpolylagrange(k=$k,j=$j) k must be less or equal to j" @assert N <: Signed "the type $N must be an Integer" result = Polynomial([one(...
{"hexsha": "b3966e5473d6d73ac49f6874b54286ad1b18d961", "size": 4333, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/coefexp_ab.jl", "max_stars_repo_name": "vissarion/HOODESolver.jl", "max_stars_repo_head_hexsha": "cabc5b036c94f23a05a338c6dfc86c45982a8e24", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
module AES using StaticArrays, Random abstract type AbstractSymmetricKey end abstract type AbstractCipher end abstract type AbstractCipherCache end abstract type AbstractAESKey <: AbstractSymmetricKey end abstract type AbstractAESCache <: AbstractCipherCache end include("constants.jl") include("types.jl") ...
{"hexsha": "1395eff31c2460f02ef2ffc23ee7d96c9e1b8fa5", "size": 619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AES.jl", "max_stars_repo_name": "Seelengrab/AES.jl", "max_stars_repo_head_hexsha": "7af7764bb7918b91d2c495d238003649e0cc7ca3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "max_star...
# Utils.jl # [[file:~/Documents/Julia/scrap.org::*Utils.jl][Utils.jl:1]] walk(x, inner, outer) = outer(x) walk(x::T, inner, outer) where {T<:AbstractSymExpr} = outer(T(inner(x.op), map(inner, x.args))) walk(x::Expr, inner, outer) = outer(Expr(x.head, map(inner, x.args)...)) postwalk(f, x) = walk(x, x -> postwalk(f, x)...
{"hexsha": "e2a4740961efa2d12ba40b9da9d0417988837244", "size": 1402, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Utils.jl", "max_stars_repo_name": "jagot/Symbolics.jl", "max_stars_repo_head_hexsha": "b8994e3d79803daa3a57012fe9ccbe0b01c346d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 102, "ma...
from __future__ import print_function import os import numpy as np from tractor.ellipses import EllipseESoft from tractor.utils import _GaussianPriors def log_info(logger, args): msg = ' '.join(map(str, args)) logger.info(msg) def log_debug(logger, args): import logging if logger.isEnabledFor(logging...
{"hexsha": "68d0693491cdbe8fed3a219b6a539eb8fcb623d4", "size": 15999, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/legacypipe/utils.py", "max_stars_repo_name": "michaelJwilson/legacypipe", "max_stars_repo_head_hexsha": "47d005356cbd0c9fb864c960ee7bbf800e543cad", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import sys import qprompt import random from enum import Enum from copy import deepcopy from itertools import groupby import numpy as np from scipy.ndimage import rotate from rich.progress import ( BarColumn, TimeRemainingColumn, Progress, ) class Player(Enum): X = 1 O = 2 def initialize_board(): re...
{"hexsha": "2e049f26d8682cf332b16886bde11db4b2c16175", "size": 7522, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "spacekitcat/minimax-tic-tac-toe-python", "max_stars_repo_head_hexsha": "d50872137273cddc467485f1432ea28c86461c57", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import librosa import math import numpy as np def wav_to_mfcc(wav_path, n_mfcc=13, n_fft=2048, hop_length=512): SAMPLE_RATE = 48000 DA_FACTOR = 10 # data augmentation factor X = [] signal, sr = librosa.load(wav_path, sr=None) samples_per_track = len(signal) num_samples_per_segment = 3 * sr ...
{"hexsha": "b827b74f7bc745ab5dd12ba4eae0263c3034c70e", "size": 1509, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/src/main/python/WAV_TO_MFCC.py", "max_stars_repo_name": "peisong0109/Detection", "max_stars_repo_head_hexsha": "16b50ca19a0f26818db897eb0f1c295f4bf42fe9", "max_stars_repo_licenses": ["Apache-2...
import numpy as np import sys, tempfile, subprocess from functools import reduce from calculate_axis import get_axis from amino import get_atom_type_array from Bio import AlignIO from prody import parsePDB, LOGGER LOGGER.verbosity = 'none' def align_fasta(input_pdb_path, target_fasta_path): pdb = parsePDB(input_...
{"hexsha": "55e28ec58869f1927f75cb1b36254849a7288063", "size": 3704, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/make_voxel.py", "max_stars_repo_name": "ishidalab-titech/3DCNN_MQA", "max_stars_repo_head_hexsha": "8f68a3719065338f03eca44da9a6eb0262da0ce9", "max_stars_repo_licenses": ["MIT"], "max_stars...