text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright (c) 2020-2021 - for information on the respective copyright owner # see the NOTICE file and/or the repository # https://github.com/boschresearch/pylife # # 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 co...
{"hexsha": "870da316ff987b91e6a2efc529b4719f486a0c0b", "size": 20382, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pylife/vmap/vmap_import.py", "max_stars_repo_name": "alexander-maier/pylife", "max_stars_repo_head_hexsha": "a9dceb3f364af16bf0a2d3015e34fa47192bfcf6", "max_stars_repo_licenses": ["Apache-2.0...
# -*- coding: utf-8 -*- """ RandOm Convolutional KErnel Transform (ROCKET) """ __author__ = "Matthew Middlehurst" __all__ = ["ROCKETClassifier"] import numpy as np from sklearn.linear_model import RidgeClassifierCV from sklearn.pipeline import make_pipeline from sklearn.utils import check_random_state from sklearn.ut...
{"hexsha": "a53926510f81443183811393ae71863ac3f53d50", "size": 5540, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/classification/shapelet_based/_rocket_classifier.py", "max_stars_repo_name": "abdulelahsm/sktime", "max_stars_repo_head_hexsha": "ce056a56246ec26f2bfdaef2d5a58a949ed3bd52", "max_stars_repo_...
import cv2 import torch from scipy import io as mat_io from skimage import io from torch.utils.data import Dataset from torchvision import transforms from .auto_augment import AutoAugment, ImageNetAutoAugment import numpy as np from base import BaseDataLoader class CarsDataset(Dataset): """ Cars Dataset ...
{"hexsha": "07e67ccd5517e49ca4d722be1ddab56a640ac9d2", "size": 2814, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_processing/data_loaders.py", "max_stars_repo_name": "zah-tane/stanford-cars-model", "max_stars_repo_head_hexsha": "b299f9d9b7c55c6e925484ee31355f062066fdf4", "max_stars_repo_licenses": ["MIT"...
from os import times import matplotlib.pyplot as plt import numpy as np import json import cv2 from matplotlib.colors import hsv_to_rgb as hsv2rgb from glob import glob import matplotlib.ticker as plticker from tqdm import tqdm import os def _flow2rgb(flow): # cart to polar ang = (np.arctan2(flow[0], flow[1]) ...
{"hexsha": "819988c6e93a83e9d1b187ca7fa9335765e3ac20", "size": 9408, "ext": "py", "lang": "Python", "max_stars_repo_path": "Json/SequenceVisualizer.py", "max_stars_repo_name": "asd2511/mriSequence", "max_stars_repo_head_hexsha": "de6002fc892acdec5bfe1988bcc85b69b6d16f67", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os, sys from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as patches try: from data_handle.mid_object import * except: sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from data_handle.mid_object import * ''' Th...
{"hexsha": "970e1f7fef998ab31085dc663a1674dc001390c6", "size": 8182, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/util/utils_data.py", "max_stars_repo_name": "georghess/EBM_ONGOING", "max_stars_repo_head_hexsha": "c5cabe71d26972a7346c13248549b6b4b4fca9f0", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include "integration.hpp" #include <iostream> #include <Eigen/Sparse> #include <Eigen/IterativeLinearSolvers> using namespace std; void explicitEulerStep(PhysicalSystem *system, double dt) { forwardEulerStep(system, dt); } void forwardEulerStep(PhysicalSystem *system, double dt) { int n = system->getDOFs(); ...
{"hexsha": "23fe0e1eb896f5c26b0196064b425ad8a722b47f", "size": 663, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "C++/1_MassSpring_Explicit/integration.cpp", "max_stars_repo_name": "mmmovania/ConstrainedDynamicsExperiments", "max_stars_repo_head_hexsha": "9ebcd7256037fb50785bb2a1ddb7473b034a0c5b", "max_stars_rep...
import torch import gym import random import numpy as np torch.backends.cudnn.deterministic=True class Environment: def __init__(self, render=False, seed=None): self.render = render self.env_seed = seed def set_seed(self): if self.env_seed is not None: self.env.seed(self...
{"hexsha": "79b83a40b798807a926b898565300343c23fecfa", "size": 4794, "ext": "py", "lang": "Python", "max_stars_repo_path": "VR_REINFORCE/environments.py", "max_stars_repo_name": "gargiani/VRPG", "max_stars_repo_head_hexsha": "429fe58b089df2f4cdedab01b05564230e2317ac", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "86e22444cb8cb92b20d30e9d59d5bb7eee4aff06", "size": 31519, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/contrib/layers/nn.py", "max_stars_repo_name": "itminner/Paddle", "max_stars_repo_head_hexsha": "f41da8a4ad3caf2a11d3cc2ca89bbcd243438c7f", "max_stars_repo_licenses": ["Apache-...
"""Nexar Dataset Classes """ from pathlib import Path import numpy as np import pandas as pd import torch import torch.utils.data as data from utils.utils import load_image NEXAR_CLASSES = ( # always index 0 'car',) # for making bounding boxes pretty COLORS = ((255, 0, 0, 128), (0, 255, 0, 128), (0, 0, 255, ...
{"hexsha": "8cc778255bc48ef508244207a10ca17fae51d265", "size": 5485, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/nexar2.py", "max_stars_repo_name": "ternaus/nexar2_ssd", "max_stars_repo_head_hexsha": "338dbdef74ebc44098613b1fd1f5124d6e877a33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m...
import numpy import vtreat.stats_utils def test_linear_cor(): y_true = [1, 1, 0, 1, 0, 1, 1, 0, 1, 0] y_pred = [0.8, 1, 0.2, 0.5, 0.5, 0.8, 1, 0.2, 0.5, 0.5] cor, sig = vtreat.stats_utils.our_corr_score(y_true=y_true, y_pred=y_pred) # R: # y_true = c(1, 1, 0, 1, 0, 1, 1, 0, 1, 0) # y_pred = c...
{"hexsha": "fb6a51d070f0db394c9a31c0d4f62601edcf5018", "size": 5515, "ext": "py", "lang": "Python", "max_stars_repo_path": "pkg/tests/test_stats.py", "max_stars_repo_name": "WinVector/pyvtreat", "max_stars_repo_head_hexsha": "eb71be1b43e9310cdf77f89c2ae2d26be3a59d4b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
""" Geometry ==================== Change or get info on the current geometrical configuration, e.g. number of cells in the three crystal translation directions. """ import spirit.spiritlib as spiritlib import ctypes ### Load Library _spirit = spiritlib.load_spirit_library() ### Imports from spirit.scalar import sca...
{"hexsha": "2cdc274d47988889a2c786e800fbdb6c01e4b774", "size": 9577, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/python/spirit/geometry.py", "max_stars_repo_name": "bck2302000/spirit", "max_stars_repo_head_hexsha": "14ed7782bd23f4828bf23ab8136ae31a21037bb3", "max_stars_repo_licenses": ["MIT"], "max_star...
""" This is a stand alone python program that plots the phase plot for a damped oscillator. It starts with the limiting case of all three being approximately critical damping. Then you can adjust gamma higher to show the overdamped case or adjust gamma lower to show the underdampmed case. You can also adjust the ini...
{"hexsha": "c032db1aeb5fd666694a5dc36319e1ae8946bea3", "size": 2681, "ext": "py", "lang": "Python", "max_stars_repo_path": "phase-oscillator.py", "max_stars_repo_name": "drjenncash/MechanicsInteractives", "max_stars_repo_head_hexsha": "6d2756de6d24beaa6c93396a4a975c055b103121", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # 概要 光に関するモジュール # 使い方 # references these data have been downloaded from following site. [Munsell Color Science Laboratory](https://www.rit.edu/cos/colorscience/rc_useful_data.php) """ import os import numpy as np from scipy import linalg import matplotlib.pyplot a...
{"hexsha": "2d2ae9dbb422ced53835957c81af93c420fe9960", "size": 3331, "ext": "py", "lang": "Python", "max_stars_repo_path": "ty_lib/light.py", "max_stars_repo_name": "toru-ver4/sample_code", "max_stars_repo_head_hexsha": "9165b4cb07a3cb1b3b5a7f6b3a329be081bddabe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
SUBROUTINE DT_NUC2CM C*********************************************************************** C Lorentz-transformation of all wounded nucleons from Lab. to nucl.- * C nucl. cms. (This subroutine replaces NUCMOM.) * C This version dated 15.01.95 is written by S. Roesler ...
{"hexsha": "f4aa789f61f2b1c64668196d5256a882d919e102", "size": 2551, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/dpmjet/DT_NUC2CM.f", "max_stars_repo_name": "pzhristov/DPMJET", "max_stars_repo_head_hexsha": "946e001290ca5ece608d7e5d1bfc7311cda7ebaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
""" --- pandoctools: profile: Default out: "*.ipynb" input: True eval: False echo: True ... """ # %% # from importlib import reload from typing import Tuple, Optional as Opt, Any, Iterable, Type, List import warnings from dataclasses import dataclass from itertools import chain import math # noinspection PyPep8Nam...
{"hexsha": "42d7075873f6fc7df6bab3daca6ac60ec6ca56f4", "size": 65291, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "kiwi0fruit/jats-semi-supervised-pytorch", "max_stars_repo_head_hexsha": "67e9bb85f09f8ef02e17e495784d1d9a71c3adec", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np from scipy.linalg import block_diag import openmdao.api as om from openmdao.utils.units import unit_conversion from ...transcriptions.grid_data import GridData from ...utils.lagrange import lagrange_matrices from ...options import options as dymos_options class TimeseriesOutputCompBase(om.Explici...
{"hexsha": "b473f2963c38911c89c21b540f1afb85ff8ecc25", "size": 8956, "ext": "py", "lang": "Python", "max_stars_repo_path": "dymos/transcriptions/common/timeseries_output_comp.py", "max_stars_repo_name": "kaushikponnapalli/dymos", "max_stars_repo_head_hexsha": "3fba91d0fc2c0e8460717b1bec80774676287739", "max_stars_repo_...
From aneris.aneris_lang Require Import ast. From aneris.aneris_lang.lib Require Import set_code. From aneris_examples.transaction_commit Require Import two_phase_code. Definition runner : expr := let: "TM" := MakeAddress #"tm" #80 in let: "RM1" := MakeAddress #"rm.01" #80 in let: "RM2" := MakeAddress #"rm.02" #...
{"author": "fresheed", "repo": "trillium-experiments", "sha": "a9c38a9e9566fb8057ae97ecb8d1a0c09c799aef", "save_path": "github-repos/coq/fresheed-trillium-experiments", "path": "github-repos/coq/fresheed-trillium-experiments/trillium-experiments-a9c38a9e9566fb8057ae97ecb8d1a0c09c799aef/theories/transaction_commit/two_p...
import matplotlib.pyplot as plt import numpy as np from pysdd import hyperparameter if __name__ == "__main__": for encoding in ['standard_enc1_full', 'standard_enc1_noisy', 'standard_enc2_full', 'standard_enc2_noisy']: print(encoding) f = 'cnf/' + encoding + '_pysdd.cnf' plt.figure() ...
{"hexsha": "0cb5271680bba74333d16afe5eeb774180e6da7f", "size": 761, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperparam-cli.py", "max_stars_repo_name": "sventhijssen/PySDD", "max_stars_repo_head_hexsha": "561804d59f5b362410c3a53bca637ae97e967edc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import pandas as pd import numpy as np def label_to_pos_map(all_codes): label_to_pos = dict([(code,pos) for code, pos in zip(sorted(all_codes),range(len(all_codes)))]) pos_to_label = dict([(pos,code) for code, pos in zip(sorted(all_codes),range(len(all_codes)))]) return label_to_pos, pos_to_la...
{"hexsha": "4118ca437d0f414d59c41402546621c7a13fb1f3", "size": 3093, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset_creation/src/utils/train_test_split_experiment.py", "max_stars_repo_name": "neuron1682/cross-lingual-phenotype-prediction", "max_stars_repo_head_hexsha": "3cf139283a39487969bff646dee1eb03f...
import numpy as np arr= np.arange(0,12) print arr print arr[0:5] #this is know as slicing print arr[2:6] arr[0:5]=19,20,21,22,23 print arr
{"hexsha": "156a7c8d0b712fdd82fec2b53e7a65c5b5fbbb0c", "size": 145, "ext": "py", "lang": "Python", "max_stars_repo_path": "Section3/L3,4 Array Index/array_index1.2.py", "max_stars_repo_name": "Mohit-Sharma1/Takenmind_Internship_assignments", "max_stars_repo_head_hexsha": "7099ae3a70fca009f6298482e90e988124868148", "max...
import numpy as np import pandas as pd from pandas.api.types import is_numeric_dtype # from pandas_profiling import ProfileReport def isCategorical(col): unis = np.unique(col) if len(unis)<0.2*len(col): return True return False # def getProfile(data): # report = ProfileReport(data) # rep...
{"hexsha": "e0d7421fe93238410694cf263490be15cf88c140", "size": 2343, "ext": "py", "lang": "Python", "max_stars_repo_path": "pages/utils.py", "max_stars_repo_name": "rypaik/Streamlit_Ref", "max_stars_repo_head_hexsha": "5ce11cecbe8307238463c126b88b3beed66c99fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 59,...
#include <iostream> #include <boost/log/trivial.hpp> int main (int argc, char **argv) { BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; BOOST_LOG_TRIVIAL(info) << "An informational severity message"; BOOST_LOG_TRIVIAL(warning) << "A warnin...
{"hexsha": "b4bd2b492df270dd06f1230b73b40ea6158cc7f3", "size": 478, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "codes/cpp/cplusplus-codesnippet/src/boost/example_boost_log.cpp", "max_stars_repo_name": "zhoujiagen/learning-system-programming", "max_stars_repo_head_hexsha": "2a18e9f8558433708837ba4bd0fae5d7c11bf...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
{"hexsha": "5e8076eccee9e4f3361cc089cd9c05ec0400d6eb", "size": 5732, "ext": "py", "lang": "Python", "max_stars_repo_path": "qiskit/aqua/circuits/fourier_transform_circuits.py", "max_stars_repo_name": "gillenhaalb/qiskit-aqua", "max_stars_repo_head_hexsha": "e2be4401dfdd69def7f842944b761bd3972d7ea2", "max_stars_repo_lic...
using DataFrames function parse_numbers(s) pieces = split(s, ' ', keepempty=false) map(pieces) do piece parse(Float64, piece) end end """ load_H(path) Load a homography matrix from path `path` """ function load_H(path) lines = readlines(path) H = Array{Float64}(undef, (3,3)) for (...
{"hexsha": "fbb639459191e4a7a6334be1d1252eb8c4059a58", "size": 4850, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/birl.jl", "max_stars_repo_name": "Kunz-David/LAP_Julia", "max_stars_repo_head_hexsha": "4978fce94e1ab47224337cac563c5ad0a49e7c8e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
from pyod.models.iforest import IForest from pyod.utils.data import generate_data from pyod.utils.data import evaluate_print import numpy as np import pickle X_train = np.loadtxt('X_train.txt', dtype=float) y_train = np.loadtxt('y_train.txt', dtype=float) X_test = np.loadtxt('X_test.txt', dtype=float) y_test = np.loa...
{"hexsha": "e3a5c0582215c813df6c7f40adfc4b261ed0a427", "size": 674, "ext": "py", "lang": "Python", "max_stars_repo_path": "labs/ai-edge/safety-monitor/IsolatedForrest.py", "max_stars_repo_name": "kartben/iot-curriculum", "max_stars_repo_head_hexsha": "11b930b11123575cc4f68ce106f945c6c0c46dd5", "max_stars_repo_licenses"...
using NBodySimulator, Dates const T = 370 # °K const T0 = 275 # °K const kb = 8.3144598e-3 # kJ/(K*mol) const ϵOO = 0.1554253*4.184 # kJ const σOO = 0.3165492 # nm const ρ = 997/1.6747# Da/nm^3 const mO = 15.999 # Da const mH = 1.00794 # Da const mH2O = mO+2*mH const N = 216#floor(Int, ρ * L^3 / m) const L = (mH2O*N/...
{"hexsha": "7b5ba6184f19606813bb5b62965c114b52efe676", "size": 1363, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/water_for_visualization.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/NBodySimulator.jl-0e6f8da7-a7fc-5c8b-a220-74e902c310f9", "max_stars_repo_head_hexsha": "bc24532487c7b0b2...
theory CoBinaryTree imports "$HIPSTER_HOME/IsaHipster" begin setup Misc_Data.set_noisy setup Tactic_Data.set_sledgehammer_coinduct (* setup Tactic_Data.set_no_proof *) setup Misc_Data.set_time (* Print out timing info *) setup Misc_Data.set_hammer_timeout_medium (* set sledgehammer timeout to 20 s*) codatatype 'a Tr...
{"author": "moajohansson", "repo": "IsaHipster", "sha": "91f6ea3f1166a9de547722ece6445fe843ad89b4", "save_path": "github-repos/isabelle/moajohansson-IsaHipster", "path": "github-repos/isabelle/moajohansson-IsaHipster/IsaHipster-91f6ea3f1166a9de547722ece6445fe843ad89b4/Examples/CoBinaryTree.thy"}
#!/usr/bin/env python3 import os import sys import csv import struct from sympy import * from sympy.parsing.sympy_parser import parse_expr MATH_CHANNELS = [ ("Math_Roll", -180, 180, "rad", 10, "(180/pi) * atan2(AccelX, sqrt(AccelY**2 + AccelZ**2))"), ("Math_Roll2", -180, 180, "rad", 10, "(180/pi) *...
{"hexsha": "ed82141c17120b54c4791d13bcddd997844bd694", "size": 3093, "ext": "py", "lang": "Python", "max_stars_repo_path": "rcp-python-parser/rcp-parse.py", "max_stars_repo_name": "eacmen/hpde", "max_stars_repo_head_hexsha": "7f95038f3f29a5ee9ad4ab78ddc7a9d8553f9b48", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma C_mult_propagate: "C x * y = C x * C y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. C x * y = C x * C y [PROOF STEP] by (smt (z3) C_n_mult_closed order.eq_iff inf.left_commute inf.sup_monoid.add_commute mult_left_sub_dist_inf_right n_L_T_meet_mult_propagate)
{"llama_tokens": 135, "file": "Correctness_Algebras_N_Algebras", "length": 1}
[STATEMENT] lemma max_ipv4_addr_max[simp]: "\<forall>a. a \<le> max_ipv4_addr" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>a. a \<le> max_ipv4_addr [PROOF STEP] by(simp add: max_ipv4_addr_max_word)
{"llama_tokens": 101, "file": "IP_Addresses_IPv4", "length": 1}
isdefined(:FourierOptics) || include("../src/FourierOptics.jl") module TestFourierOptics using Base.Test using FourierOptics using FourierOptics.CoordinateTransforms using FourierOptics.Regions Base.isapprox(x::NTuple{2,Real}, y::NTuple{2,Real}; kwds...) = (isapprox(x[1], y[1]; kwds...) && isapprox(x[2], y[2]; ...
{"hexsha": "9e2a67021c7aed1c4668b5ac41bcfe423d004137", "size": 1990, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "emmt/FourierOptics.jl", "max_stars_repo_head_hexsha": "8d55510b85c6e31f84522db2a68df7a9db183c1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3...
#!/usr/bin/env python # # Copyright (C) 2017 - Massachusetts Institute of Technology (MIT) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
{"hexsha": "3ec22234523dec385c72cec8a6d18e184d0c93d0", "size": 7847, "ext": "py", "lang": "Python", "max_stars_repo_path": "SEAS_Main/Physics/astrophysics.py", "max_stars_repo_name": "zhuchangzhan/SEAS", "max_stars_repo_head_hexsha": "d844ceecc54a475a5384925f45a2078eef3416ee", "max_stars_repo_licenses": ["MIT"], "max_s...
SUBROUTINE loop36_F77(N, x, e) INTEGER i, N REAL*8 x(N), e(N) DO i=1,N x(i) = exp(e(i)); END DO RETURN END SUBROUTINE loop36_F77Overhead(N, x, e) INTEGER i, N REAL*8 x(N), e(N) RETURN END
{"hexsha": "225e734c0907d10fe9cd32a1f76f6bde293221bf", "size": 274, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "depspawn-blitz-0.10/benchmarks/loop36f.f", "max_stars_repo_name": "fraguela/depspawn", "max_stars_repo_head_hexsha": "b5760f4c0d38a1b245ee5274e2ccc5c5fe2d3d45", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma \<psi>_nonneg [intro]: "\<psi> x \<ge> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 \<le> \<psi> x [PROOF STEP] unfolding \<psi>_def sum_upto_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 \<le> sum mangoldt {i. 0 < i \<and> real i \<le> x} [PROOF STEP] by (intro sum_nonneg mangoldt...
{"llama_tokens": 157, "file": "Prime_Number_Theorem_Prime_Counting_Functions", "length": 2}
import sys import torch import numpy as np device = torch.device('cuda') epsilon = 0.031 # epsilon -= np.finfo(np.float32(1.0)).eps x = np.load('data_attack/cifar10_X.npy') x = torch.tensor(x, device=device) xadv = torch.load(sys.argv[1], map_location=device)['adv_complete'] xadv = xadv.permute(0, 2, 3, 1).contiguous...
{"hexsha": "9565d05e9829b70bf857d31ec5a08c6df72be15c", "size": 471, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert.py", "max_stars_repo_name": "admk/TRADES", "max_stars_repo_head_hexsha": "e84865c5b9f5e19af89d44c61e0171a05caa1bee", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
import moviepy.editor from pydub import AudioSegment import librosa as lr import numpy as np # GLOBAL VARIABLES sound_vid = ['Muppets-03-04-03','Muppets-02-01-01','Muppets-02-04-04'] sound_path = ['Muppets-03-04-03-sound/','Muppets-02-01-01-sound/','Muppets-02-04-04-sound/'] sound_target = ['Muppets-03-04-03-sound.csv...
{"hexsha": "30f3fb661cb84b6f6b1d648bb35dc9af76814543", "size": 3583, "ext": "py", "lang": "Python", "max_stars_repo_path": "sm2-classical/create_sound.py", "max_stars_repo_name": "Bassileios/similarityModeling", "max_stars_repo_head_hexsha": "544f266cbca2fe92253a7526fc3d0232b1667692", "max_stars_repo_licenses": ["BSD-2...
import numpy as np import MakeAndPlotDim as ploter import AutoDimUtil as util N_DIMS = 10 # DIM size DNA_SIZE = N_DIMS # DNA (real number) DNA_BOUND = [1, N_DIMS + 1] # solution upper and lower bounds N_GENERATIONS = 8000 POP_SIZE = 100 # population size HALF_POP_SIZE = int(POP_SIZE/2) N_KI...
{"hexsha": "c330aae6e5a0c0ca5345eea42f8004429e905919", "size": 6180, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorial-contents/DimAutoLayout/EVOForDim.py", "max_stars_repo_name": "lidegao899/Evolutionary-Algorithm", "max_stars_repo_head_hexsha": "2b36038ecfe6d7bc848eb8ee72d66f9b0f5ff265", "max_stars_repo...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def strike(path): """Strike Duration Data a cross-section from 1968 to...
{"hexsha": "214b0eadf298d034e8b0b6db4290755c716437be", "size": 1466, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/strike.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif // detail/sp_forward.hpp // // Copyright 2008,2012 Peter Dimov // // Distributed under the Boost Software License...
{"hexsha": "5de47dd20029a05f6c02853fbedf0c87171cd989", "size": 767, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/smart_ptr/detail/sp_forward.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licenses": ["BSL-1.0...
# Goal: # Read the Grease/no Grease data files and plot the graph import sys import os from decimal import Decimal from spikesafe_python.SpikeSafeError import SpikeSafeError from matplotlib import pyplot as plt import numpy as np slow_sampling_string = "SLOWLOG" medium_sampling_string = "MEDIUMLOG" fast_sampling_...
{"hexsha": "6bd4b15f65465b52a7311db424f9e5fb6979f9bd", "size": 6541, "ext": "py", "lang": "Python", "max_stars_repo_path": "application_specific_examples/making_transient_dual_interface_measurement/produce_conductive_thermal_resistance.py", "max_stars_repo_name": "sjdemartini/SpikeSafePythonSamples", "max_stars_repo_he...
# Assignment 1 **CS283 Computer Vision, Harvard University, Fall 2019** **Due Wednesday, Sep. 18, at 5:00pm** Name: *(<font color=red>fill name here</font>)* --- The intended outcomes of this assignment are for you to be familiar with Python as a tool for manipulating images and to deepen your understanding of mode...
{"hexsha": "ba78fa7fdbde915fcfc9ce48239e33a39009677e", "size": 23229, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "pset1 (1).ipynb", "max_stars_repo_name": "nilavghosh/ProtoBuf_Net", "max_stars_repo_head_hexsha": "ee23634dbbb89cc2b91f8054d7b683e4405b964e", "max_stars_repo_licenses": ["Apache-2.0"...
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //===========================...
{"hexsha": "b174292759eb33fc063252d35c472cf6e237d0cc", "size": 1829, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/detail/constant/powlowlim.hpp", "max_stars_repo_name": "xmar/pythran", "max_stars_repo_head_hexsha": "dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592", "max_stars_repo_licenses": ["B...
""" Copyright (c) 2018, University of Oxford, Rama Cont and ETH Zurich, Marvin S. Mueller lobpy - model - lob_linear Defines classes for linear SPDE models: LOBLinearTwoFactor: Linear 2-factor models LOBLinearTwoFactorS: Linear 2-factor models with rescaling to fit the order book profile OrderVolumeMeanRev: Re...
{"hexsha": "53ea375f283a09c1aa08bfc4356cf1a8b5c2b95a", "size": 18969, "ext": "py", "lang": "Python", "max_stars_repo_path": "lobpy/models/loblinear.py", "max_stars_repo_name": "bohblue2/lobpy", "max_stars_repo_head_hexsha": "6bb1c0c70d44ab7d93761e22dd3d42148b469a37", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
(* Title: HOL/Hoare/Arith2.thy Author: Norbert Galm Copyright 1995 TUM More arithmetic. Much of this duplicates ex/Primes. *) theory Arith2 imports Main begin definition cd :: "[nat, nat, nat] \<Rightarrow> bool" where "cd x m n \<longleftrightarrow> x dvd m \<and> x dvd n" definition gcd :: ...
{"author": "landonf", "repo": "isabelle-legacy", "sha": "e40f3ca7e9a42bb91e57fd15f969388e6e83f692", "save_path": "github-repos/isabelle/landonf-isabelle-legacy", "path": "github-repos/isabelle/landonf-isabelle-legacy/isabelle-legacy-e40f3ca7e9a42bb91e57fd15f969388e6e83f692/src/HOL/Hoare/Arith2.thy"}
import numpy as np from collections import deque from PIL import ( Image, ImageSequence ) import tensorflow as tf def get_val_train_indices(length, fold, ratio=0.8): if ratio <= 0 or ratio > 1: raise ValueError("Train/total data ratio must be in range (0.0, 1.0]") np.random.seed(0) indi...
{"hexsha": "5ab334bb2542e1b0ad120e468e007d68518df942", "size": 2669, "ext": "py", "lang": "Python", "max_stars_repo_path": "tftrt/examples/nvidia_examples/unet_medical_tf2/utils.py", "max_stars_repo_name": "tanayvarshney/tensorrt", "max_stars_repo_head_hexsha": "4c3b61837e2e696caa6c09d35577be93beacaca1", "max_stars_rep...
\chapter{Bla} There is something called \acrlong{MIDI}, which is abbreviated \acrshort{MIDI}. This process is similar to that used for the \acrfull{MIDI}. \newpage
{"hexsha": "d207671587909db89cf604dd17460dbfcb9433b4", "size": 166, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis/appa.tex", "max_stars_repo_name": "peter-parque/tiny-trainable-instruments", "max_stars_repo_head_hexsha": "6849aa78b337e7a2092b759aa927758fcc5b9d5b", "max_stars_repo_licenses": ["MIT"], "max_...
from collections import namedtuple import numpy as np from keras.utils import to_categorical from constants import NO_ENTITY_TOKEN, MAX_LEN, PAD, MAX_LEN_CHAR from .data_processor import numericalize from .vocab import TextVocab, LabelVocab, PosVocab, CharacterVocab def load_dataset(): # load examples train...
{"hexsha": "2395abb5b0d9e786431738a6542ccdcd93c1361e", "size": 3604, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/api.py", "max_stars_repo_name": "lbasek/named-entity-recognition", "max_stars_repo_head_hexsha": "d21e41442b67161285efe02a6cb032ce63b8ecf2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os import sys import numpy as np import math class level2(): def __init__(self): pass def chunks(self, l, n): """Yield successive n-sized chunks from l.""" for i in range(0, len(l), n): yield l[i:i + n] def checkLeft(self,v,row,col,arr): return not...
{"hexsha": "ed353fd319b3430e8d022fcca1e5de51261e2819", "size": 2140, "ext": "py", "lang": "Python", "max_stars_repo_path": "Catalyst-Coding/level3.py", "max_stars_repo_name": "userforbidden/Python-Samples", "max_stars_repo_head_hexsha": "95c4cd12d59ff2f974744c335597ca3e3dcb9f2d", "max_stars_repo_licenses": ["MIT"], "ma...
Citizens Who Care provides social support services to senior citizens older adults and their family caregivers through In Home, Convalescent Hospital and Time Off for Caregivers programs. These services are provided to residents of Yolo County and neighboring communities by trained, caring Volunteer Opportunities vol...
{"hexsha": "88a4d35986a4b140a8d81ea5a07d8af3197320dd", "size": 755, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Citizens_Who_Care.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma bal_substitute: "\<lbrakk>bal (Node (ls@(a,b)#rs) t); height t = height c; bal c\<rbrakk> \<Longrightarrow> bal (Node (ls@(c,b)#rs) t)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>bal (Node (ls @ (a, b) # rs) t); height t = height c; bal c\<rbrakk> \<Longrightarrow> bal (Node (ls @ (c, ...
{"llama_tokens": 323, "file": "BTree_BPlusTree", "length": 2}
import numpy as np from tensorflow.keras import utils import math import random from tensorflow.keras.preprocessing.sequence import pad_sequences class SequenceBuckets(utils.Sequence): """ Sequence bucket padding Args: sequences - (list) A list of sequences of tokens choose_length - (functi...
{"hexsha": "25ea78e34ebe3bf65aba614cdba9635c83c5be9e", "size": 2176, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/buckets.py", "max_stars_repo_name": "xiaojoey/eNS", "max_stars_repo_head_hexsha": "e3b1b51c7027f5b6845cbffe5a035dc30c9bb5b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
# flake8: noqa import tempfile import nltk import numpy as np from ..preprocessing.nlp import tokenize_words from ..ngram import AdditiveNGram, MLENGram from ..utils.testing import random_paragraph class MLEGold: def __init__( self, N, K=1, unk=True, filter_stopwords=True, filter_punctuation=True ):...
{"hexsha": "0fd4252d39b73ef147d5405084543b8526eb1b4b", "size": 8272, "ext": "py", "lang": "Python", "max_stars_repo_path": "book-code/numpy-ml/numpy_ml/tests/test_ngram.py", "max_stars_repo_name": "yangninghua/code_library", "max_stars_repo_head_hexsha": "b769abecb4e0cbdbbb5762949c91847a0f0b3c5a", "max_stars_repo_licen...
# https://deeplearningcourses.com/c/unsupervised-machine-learning-hidden-markov-models-in-python # https://udemy.com/unsupervised-machine-learning-hidden-markov-models-in-python # http://lazyprogrammer.me # Create a Markov model for site data. import numpy as np transitions = {} row_sums = {} # collect counts for lin...
{"hexsha": "617863f5db4cec20942828051d972be0c523f370", "size": 890, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hmm_class/sites.py", "max_stars_repo_name": "JouniVatanen/NLP-and-Deep-Learning", "max_stars_repo_head_hexsha": "2fddcc2c39787713d33d17e80565de4ed073ca60", "max_stars_repo_licenses": ["MIT"], "...
import matplotlib.pyplot as plt import netomaton as ntm import numpy as np if __name__ == '__main__': # NKS page 443 - Rule 122R network = ntm.topology.cellular_automaton(n=100) # carefully chosen initial conditions previous_state = [1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, ...
{"hexsha": "de989aea79a8e72f3dd815c5a0b4ea442b7509b1", "size": 1961, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/reversible_ca/rule122R_reverse_demo.py", "max_stars_repo_name": "lantunes/netomaton", "max_stars_repo_head_hexsha": "fef60a787d031c9c7b1eb4ff990f7c12145579ef", "max_stars_repo_licenses": ["A...
[STATEMENT] theorem ltl_to_generalized_rabin\<^sub>C_af\<^sub>\<UU>_correct: assumes "range w \<subseteq> set \<Sigma>" shows "w \<Turnstile> \<phi> \<longleftrightarrow> accept\<^sub>G\<^sub>R_LTS (ltl_to_generalized_rabin\<^sub>C_af\<^sub>\<UU> \<Sigma> \<phi>) w" (is "?lhs \<longleftrightarrow> ?rhs") [PROOF ...
{"llama_tokens": 3756, "file": "LTL_to_DRA_Impl_LTL_Rabin_Impl", "length": 17}
#!/usr/bin/env python -u # -*- coding: utf-8 -*- import os import wave import re import argparse import textgrid import linecache import numpy as np import random import soundfile as sf import re import itertools from itertools import product from subprocess import call import pandas as pd import re ...
{"hexsha": "e35fb9f3b1fc82dead645e4638fce942c75f5618", "size": 3012, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval/calcer_nospk.py", "max_stars_repo_name": "DanBerrebbi/AISHELL-4", "max_stars_repo_head_hexsha": "75ea24e547b671eae05aac365e32b3cd09bb3b3c", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
SUBROUTINE ZERRTR( PATH, NUNIT ) * * -- LAPACK test routine (version 3.1) -- * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. * November 2006 * * .. Scalar Arguments .. CHARACTER*3 PATH INTEGER NUNIT * .. * * Purpose * ======= * * ZERRTR tests the ...
{"hexsha": "40ac95d3de120a2dd386d049773eedbed55b18eb", "size": 16340, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "TESTING/LIN/zerrtr.f", "max_stars_repo_name": "nashmit/lapack-release", "max_stars_repo_head_hexsha": "fd9237f4f4cd45f10a8be62b35e63a702c93328f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
# Copyright 2017 Rice University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
{"hexsha": "d8aea68ca03d71dd8be66d2ee175ac800e00772f", "size": 5156, "ext": "py", "lang": "Python", "max_stars_repo_path": "program_helper/sequence/field_reader.py", "max_stars_repo_name": "jajajaqlt/nsg", "max_stars_repo_head_hexsha": "1873f2b5e10441110c3c69940ceb4650f9684ac0", "max_stars_repo_licenses": ["Apache-2.0"...
from __init__ import OUTPUT print("run _chemprop.sh in chemprop conda environment") print("run _grover.sh in grover conda environment") import pandas as pd import numpy as np import os ROOT = os.path.dirname(os.path.abspath(__file__)) print("DEEP LEARNING PREDICTIONS") df = pd.read_csv(os.path.join(OUTPUT, "data_1...
{"hexsha": "3d141c52b39c865c843e0366a9bf70979669f660", "size": 1455, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/13_deepactivity.py", "max_stars_repo_name": "ersilia-os/osm-series4-candidates-2", "max_stars_repo_head_hexsha": "a0b7f55d79c65182dcc4c102791d2ababbfb176e", "max_stars_repo_licenses": ["MI...
import numpy as np from matplotlib import pyplot as plt np.set_printoptions(precision=6) def plotData(X, y): """Plots the data points X and y into a new figure plotData(x,y) plots the data points with + for the positive examples and o for the negative examples. X is assumed to be a Mx2 matrix. :para...
{"hexsha": "d580390d2962ce2658e0050dc0c97afebbe7437a", "size": 3880, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine-learning-python/machine-learning-ex6/ex6.py", "max_stars_repo_name": "StevenPZChan/ml_dl_coursera_Andrew_Ng", "max_stars_repo_head_hexsha": "c14f3490007392c16547e429c3028e9c80221013", "max...
from datetime import datetime import warnings import numpy as np import pandas as pd from pandas import DataFrame import matplotlib.pyplot as plt from statsmodels.stats.diagnostic import acorr_ljungbox from statsmodels.tsa.stattools import adfuller as ADF from statsmodels.graphics.tsaplots import plot_acf, plot_pacf i...
{"hexsha": "b8d1d6c23332c2e10ddd57cb30d17e2d730dca1f", "size": 9831, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/data_analysis/data_analysis.py", "max_stars_repo_name": "fakecoinbase/ChenYuHoslashvnpy", "max_stars_repo_head_hexsha": "928c83b5cf970f31554fe72da4fb89f4afc4221b", "max_stars_repo_license...
import numpy as np from scipy.ndimage import convolve1d as convolve1d_serial from scipy.signal import lfilter as lfilter_serial from nitime.algorithms import multi_taper_psd as multi_taper_psd_serial from ecogdata.filt.time.blocked_filter import bfilter as bfilter_serial from ecogdata.filt.time.blocked_filter import o...
{"hexsha": "5e045c0f78d04c5c813ded360cf4b4dd04627819", "size": 2822, "ext": "py", "lang": "Python", "max_stars_repo_path": "ecogdata/parallel/split_methods.py", "max_stars_repo_name": "miketrumpis/ecogdata", "max_stars_repo_head_hexsha": "ff65820198e69608634c12686a86b97ac3a77558", "max_stars_repo_licenses": ["BSD-3-Cla...
import os import numpy as np import pytest from jina import Document, DocumentArray from ...custom_image_torch_encoder import CustomImageTorchEncoder cur_dir = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture def encoder(tmpdir): model_state_dict_path = os.path.join(cur_dir, '../model/model_state_dic...
{"hexsha": "5b1aad84e69245bfc280e0a89f5461761c5e78cb", "size": 1491, "ext": "py", "lang": "Python", "max_stars_repo_path": "jinahub/encoders/image/CustomImageTorchEncoder/tests/unit/test_custom_image_torch_encoder.py", "max_stars_repo_name": "makram93/executors", "max_stars_repo_head_hexsha": "9e88b56650ee154e811b8ecfa...
import numpy as np import math def zadoff_chu(u,N,q=0): cf = N%2 n = np.linspace(0,N-1,N); return np.exp(-1j*math.pi*u*np.multiply(n,n+cf+2*q)/N) def barker_13(up_sample_factor): b13 = np.array([1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1]) return b13.repeat(up_sample_factor, axis=0) def weier...
{"hexsha": "68a8d5f180b12a4b0cbb9e1f13e7193d68c7de94", "size": 822, "ext": "py", "lang": "Python", "max_stars_repo_path": "sequences.py", "max_stars_repo_name": "efreneau/Ambiguity-Function", "max_stars_repo_head_hexsha": "63828f85ad5d07290d267c42efe6edfd27d45f4f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Created on Wed Jul 4 08:55:48 2018 @author: C Winkler """ # -*- coding: utf-8 -*- """ Created on Mon Sep 25 16:24:34 2017 @author: C Winkler """ import pandas as pd import numpy as np from cycler import cycler import matplotlib.pyplot as plt import glob, os from scipy.signal import argr...
{"hexsha": "446cd6f306295df426b9be58fbe272ff1109a1a9", "size": 3560, "ext": "py", "lang": "Python", "max_stars_repo_path": "4_curve_fitting/curve_fitting.py", "max_stars_repo_name": "xi2pi/elastance-function", "max_stars_repo_head_hexsha": "ac3422b55a1958fe0ce579a2b49a977545159ccd", "max_stars_repo_licenses": ["Apache-...
function test01 ( input_file_name ) %*****************************************************************************80 % %% TEST01 tests STLA_CHECK. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 24 September 2005 % % Author: % % John Burkardt % fprintf ( 1, '\n' ...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/stla_io/stla_io_test01.m"}
from ReID_CNN.Model_Wrapper import ResNet_Loader from track import Track import argparse import numpy as np import cv2 import os from scipy.misc import imsave from progressbar import ProgressBar import sys import pathlib import pickle def import_pkl(pkl_file): with open(pkl_file, 'rb') as f: return pickl...
{"hexsha": "73d038c28370d64a4c6c97a516064f3b706dbd39", "size": 3947, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/AIC2018_iamai/ReID/SCT.py", "max_stars_repo_name": "gordonjun2/CenterTrack", "max_stars_repo_head_hexsha": "358f94c36ef03b8ae7d15d8a48fbf70fff937e79", "max_stars_repo_licenses": ["MIT"], "max_...
open import Prelude renaming (_<_ to _N<_) module Implicits.Resolution.GenericFinite.Algorithm where open import Induction.WellFounded open import Induction.Nat open import Data.Vec open import Data.List open import Data.Fin.Substitution open import Data.Nat.Base using (_<′_) open import Data.Maybe open import Data.N...
{"hexsha": "2377d1eb8d548ba65cd0f1e56248495f0bdf286a", "size": 3995, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Implicits/Resolution/GenericFinite/Algorithm.agda", "max_stars_repo_name": "metaborg/ts.agda", "max_stars_repo_head_hexsha": "7fe638b87de26df47b6437f5ab0a8b955384958d", "max_stars_repo_license...
[STATEMENT] lemma lookup_monom_mult_plus: "lookup (monom_mult c t p) (t \<oplus> v) = (c::'b::semiring_0) * lookup p v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lookup (monom_mult c t p) (t \<oplus> v) = c * lookup p v [PROOF STEP] by (simp add: lookup_monom_mult term_simps)
{"llama_tokens": 124, "file": "Polynomials_MPoly_Type_Class", "length": 1}
[STATEMENT] lemma LANDAU_PROD'_fold: "BIGTHETA_CONST e \<Theta>(\<lambda>_. d) = BIGTHETA_CONST (e*d) \<Theta>(eval_primfuns [])" "LANDAU_PROD' c (\<lambda>_. 1) = LANDAU_PROD' c (eval_primfuns [])" "eval_primfun f = eval_primfuns [f]" "eval_primfuns fs x * eval_primfuns gs x = eval_primfuns (fs @ gs) x" [PROOF...
{"llama_tokens": 709, "file": "Landau_Symbols_Landau_Real_Products", "length": 3}
SUBROUTINE FFREAD (*,CARD) C C THIS ROUTINE READS INPUT CARDS IN FREE FIELD OR FIXED FIELD C FORMATS. C C IF READFILE COMMAND IS ENCOUNTERED, IT SWITCHE THE INPUT FILE TO C THE ONE SPECIFIED BY READFILE UNTIL EOF IS REACHED. THEN IT C SWITCHES BACK TO THE NORMAL CARD READER. NESTED READ...
{"hexsha": "e8a9f33b01fa3bdb83bb51c0b41fa39dad80cef1", "size": 28403, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/ffread.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count":...
Require Export Term. Require Export Formula. Require Export SignedSubformula. Require Export Sequent. Require Import Base.Lists. Require Import Base.Permutation. Require Import Tactics.FormulaEquality. Require Import Tactics.TermEquality. Require Import Tactics.WellFormedFormulaNoProofs. Require Import Tactics.TermHas...
{"author": "FLAFOL", "repo": "flafol-coq", "sha": "1803453d86ba8be103b513f2300a377aaf84326b", "save_path": "github-repos/coq/FLAFOL-flafol-coq", "path": "github-repos/coq/FLAFOL-flafol-coq/flafol-coq-1803453d86ba8be103b513f2300a377aaf84326b/Logic/Consistency.v"}
import scipy.spatial import numpy as np def as_unc_core(S,r,theta): # Compute Auger variance on signal S core distance r, zenith theta #r should be in m #theta in deg. a = 0.865 b = 0.593 c = 0.023 beta = -2.2 theta = theta * np.pi / 180. avgtheta = 35. * np.pi / 180. ab1 = a**2 * (1+b*(1/np.cos(th...
{"hexsha": "239cd3778d9c82d16ad3c25ad45f3a1a1fc695fa", "size": 4664, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/comparative/calc_mahal_boot_w_cuts.py", "max_stars_repo_name": "seanpquinn/augerta", "max_stars_repo_head_hexsha": "43862fd6b5360c9b7c5a7b3502fb7738ea2e8d75", "max_stars_repo_licenses": [...
section \<open>PDDL and STRIPS Semantics\<close> theory PDDL_STRIPS_Semantics imports "Propositional_Proof_Systems.Formulas" "Propositional_Proof_Systems.Sema" "Propositional_Proof_Systems.Consistency" "Automatic_Refinement.Misc" "Automatic_Refinement.Refine_Util" begin no_notation insert ("_ \<triangleright>...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/AI_Planning_L...
\documentclass{cascadilla-xelatex-biblatex} \ifthenelse{\boolean{usegb4e}}{}{% \usepackage{xcolor} \usepackage{mdframed} \surroundwithmdframed[backgroundcolor=gray!10!white]{verbatim} } \title{Using \texttt{cascadilla-xelatex-biblatex.cls}\thanks{András Bárány, Bielefeld University, \url{andras.ba...
{"hexsha": "20fb8ed7bb507467ac907f7ef9b6c632e1583ed6", "size": 4910, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "example.tex", "max_stars_repo_name": "andrasbarany/cascadilla-xelatex-biblatex", "max_stars_repo_head_hexsha": "b222ef349eb05b4412308b43f0e807e2b6548fb2", "max_stars_repo_licenses": ["Unlicense"], "...
Mike Ivanov and Philip Neustrom founded Davis Wiki in 2004. Mike has a very informative personal page: Users/MikeIvanov.
{"hexsha": "8a1190ea50dd8702f48834706cda6f7125a374bf", "size": 122, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Mike_Ivanov.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Parsers provided by aiida_sirius. Register parsers via the "aiida.parsers" entry point in setup.json. """ from __future__ import absolute_import from aiida.engine import ExitCode from aiida.parsers.parser import Parser from aiida.plugins import CalculationFactory, DataFactory import numpy...
{"hexsha": "c8573a3fe2f680b54f2edcb768e18898fc2ffba4", "size": 3307, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_sirius/parsers/nlcg_cpp.py", "max_stars_repo_name": "simonpintarelli/aiida-sirius", "max_stars_repo_head_hexsha": "5dc968cc4a98a5d0b018f54c4c7023b2a2682795", "max_stars_repo_licenses": ["MIT...
import numpy as np import time import cv2 import requests import json from typing import Tuple import os class TensorflowNetwork: def __init__(self): self.model_uri = 'http://localhost:8501/v1/models/model:predict' self.init_tensorflow_serve() @staticmethod def shape_image(file_route): ...
{"hexsha": "922d3163825e84bb65016bb065e5471dc89e97e0", "size": 1421, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/service/tensorflow_network.py", "max_stars_repo_name": "A-Ortiz-L/hyperspectral-imaging-cnn-final-degree-work", "max_stars_repo_head_hexsha": "e8571a063d24d2ef45039914abe4d59939dfcad8", "max_s...
import numpy import svm_funcs def dataset3_params(x_train, y_train, x_valid, y_valid): """ Returns your choice of reg_C and sigma for Part 3 of the exercise where you select the optimal (reg_C, sigma) learning parameters to use for SVM with RBF kernel. Parameters ---------- x_train : arr...
{"hexsha": "8c9c0766c332fb9c65a92453dd1b66ff52ceb71b", "size": 2536, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ex6_support_vector_machines/svm_funcs/dataset3_params.py", "max_stars_repo_name": "ashu-vyas-github/AndrewNg_MachineLearning_Coursera", "max_stars_repo_head_hexsha": "1be5124b07df61f7295dd1...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % University Assignment Title Page % LaTeX Template % Version 1.0 (27/12/12) % % This template has been downloaded from: % http://www.LaTeXTemplates.com % % Original author: % WikiBooks (http://en.wikibooks.org/wiki/LaTeX/Title_Creation) % % License: % CC BY-NC-SA 3.0 (http://...
{"hexsha": "86c88aa3ab6668346fd13e4d6e6d9378bd689525", "size": 51038, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "arxiv/prediction_market.tex", "max_stars_repo_name": "kandluis/CS186-Final-Project", "max_stars_repo_head_hexsha": "eec4e6527b857e962262af582f6ed5d5e0f9e08b", "max_stars_repo_licenses": ["Apache-2....
""" ################################# # Find Qmax for the Next State ################################# """ ######################################################### # import libraries import numpy as np from statefromloc import getstateloc from copy import deepcopy ########################################...
{"hexsha": "965ae66c15285a2980f08dd17afaf84713e057e8", "size": 3158, "ext": "py", "lang": "Python", "max_stars_repo_path": "findq.py", "max_stars_repo_name": "purbe/Reinforcement_Learning_Team_Q_learnig_MARL_Multi_Agent_UAV_Spectrum_task", "max_stars_repo_head_hexsha": "7434d21a17c0e9c80f0aba5a95e17e5dd3b3480e", "max_s...
import numpy as np import multiprocessing import os import sqlite3 as sql import pandas as pd from itertools import repeat from contextlib import closing from tqdm import tqdm import interaction3.abstract as abstract from interaction3.mfield.simulations import TransmitBeamplot from interaction3.mfield.simulations imp...
{"hexsha": "f55cc792ff9e6d4f8f5f3424b51ebd493937bfd6", "size": 6421, "ext": "py", "lang": "Python", "max_stars_repo_path": "interaction3/mfield/scripts/simulate_transmit_beamplot_with_full_data.py", "max_stars_repo_name": "bdshieh/interaction3", "max_stars_repo_head_hexsha": "b44c390045cf3b594125e90d2f2f4f617bc2433b", ...
""" n_man(sem_fit::SemFit) n_man(model::AbstractSemSingle) Return the number of manifest variables. """ function n_man end n_man(sem_fit::SemFit) = n_man(sem_fit.model) n_man(model::AbstractSemSingle) = n_man(model.observed)
{"hexsha": "8262a78c0269bc9d6ac7dab003dfdd7e0297fb3e", "size": 235, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/frontend/fit/fitmeasures/n_man.jl", "max_stars_repo_name": "sem-jl/SEM.jl", "max_stars_repo_head_hexsha": "456c30170e34ff07c97667a8fc11e5fb6a80d6a2", "max_stars_repo_licenses": ["MIT"], "max_sta...
""" @authors: Chase Coleman, Balint Szoke, Tom Sargent """ import numpy as np import scipy as sp import scipy.linalg as la import quantecon as qe import matplotlib.pyplot as plt from scipy.stats import norm, lognorm class AMF_LSS_VAR: """ This class transforms an additive (multipilcative) functional in...
{"hexsha": "86c32bd1f3525f7f7a9aca9220f911361e38e1d1", "size": 14590, "ext": "py", "lang": "Python", "max_stars_repo_path": "additive_functionals/amflss.py", "max_stars_repo_name": "chenwang/QuantEcon.lectures.code", "max_stars_repo_head_hexsha": "8832a74acd219a71cb0a99dc63c5e976598ac999", "max_stars_repo_licenses": ["...
import os import numpy as np import copy from tensorboardX import SummaryWriter import sys sys.path.append('..') from ding.config import compile_config from ding.worker import BaseLearner, BattleSampleSerialCollector, BattleInteractionSerialEvaluator, NaiveReplayBuffer from ding.envs import SyncSubprocessEnvManager, B...
{"hexsha": "43d5413899a477ef85797abba64eb5f442434215", "size": 3803, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_submission/entry/gobigger_vsbot_baseline_simple_eval.py", "max_stars_repo_name": "abcdcamey/Gobigger-Explore", "max_stars_repo_head_hexsha": "75864164f3e45176a652154147740c34905d1958", "max_sta...
import torch from functools import partial import numpy as np def collate_fn(batch): data = {} imgs = [] depths = [] # sketch_1_1s = [] sketch_1_4s = [] tsdf_1_1s = [] tsdf_1_4s = [] targets = [] # nonempties = [] occ_1_1s = [] mapping_1_1s = [] mapping_1_4s = [] CP_m...
{"hexsha": "0850c1598316dda42880ee94346f5680b53c9e05", "size": 3524, "ext": "py", "lang": "Python", "max_stars_repo_path": "xmuda/data/semantic_kitti/kitti_collate.py", "max_stars_repo_name": "anhquancao/xmuda-extend", "max_stars_repo_head_hexsha": "4b670ec2f6766e3a624e81dbe5d97b209c1c4f76", "max_stars_repo_licenses": ...
from io import StringIO from pathlib import Path import numpy as np from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from sklearn.ensemble import RandomForestClassifier from sklea...
{"hexsha": "c5784f2a7c1091c404025de43357b2babc3a1fdb", "size": 4375, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/utils.py", "max_stars_repo_name": "ojwalch/sleep_classifiers", "max_stars_repo_head_hexsha": "5fbed3d9d076d891a75e5de6678b14b11c2ee724", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" $(TYPEDEF) Defines a total Liouvillian to feed to the solver using the `DiffEqOperator` interface. It contains both closed-system and open-system Liouvillians. # Fields $(FIELDS) """ struct DiffEqLiouvillian{diagonalization,adiabatic_frame} "Hamiltonian" H::AbstractHamiltonian "Open system in eigenba...
{"hexsha": "50f06b9b948d83d24edabddbc64a5827b26de716", "size": 4941, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/opensys/diffeq_liouvillian.jl", "max_stars_repo_name": "neversakura/QTBase.jl", "max_stars_repo_head_hexsha": "937a3236f1b9578bc223b21817dec2e7a8512ee2", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import random import networkx as nx from rdkit.Chem import AllChem from .loader import graph_data_obj_to_nx_simple, nx_to_graph_data_obj_simple from .loader import MoleculeDataset def check_same_molecules(s1, s2): mol1 = AllChem.MolFromSmiles(s1) mol2 = AllChem.MolFromSmiles(s2) return All...
{"hexsha": "8a9b5c75881b05137aabeaf5fe9ff5d80deabc58", "size": 18022, "ext": "py", "lang": "Python", "max_stars_repo_path": "contextPred/chem/util.py", "max_stars_repo_name": "thomasly/slgnn", "max_stars_repo_head_hexsha": "caa1e7814498da41ad025b4e62c569fe511848ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from myskimage import gaussian import numpy as np import imp try: imp.find_module('pyfftw') pyfftw_installed = True import pyfftw except ImportError: pyfftw_installed = False class Spectrogram: fftw_inps = {} fftw_rfft = {} han_wins = {} def __init__(self, use_pyfftw=True): if...
{"hexsha": "d53a534648e57b05532836c04d8409a7c88fc9c0", "size": 4177, "ext": "py", "lang": "Python", "max_stars_repo_path": "bat_eval/spectrogram.py", "max_stars_repo_name": "bgotthold-usgs/batdetect", "max_stars_repo_head_hexsha": "0d4a70f1cda9f6104f6f785f0d953f802fddf0f1", "max_stars_repo_licenses": ["BSD-Source-Code"...
import time import struct import socket import logging from contextlib import closing import cPickle import numpy as np # TODO: verify that the log levels are correct here. logger = logging.getLogger(__name__) def get_udp_packets(ri, npkts, streamid, stream_reg='streamid', addr=('192.168.1.1', 12345)): ri.r.wri...
{"hexsha": "de2a04d303bad8579f82ed8c2ff1d54a594c9cea", "size": 5178, "ext": "py", "lang": "Python", "max_stars_repo_path": "kid_readout/roach/udp_catcher.py", "max_stars_repo_name": "danielflanigan/kid_readout", "max_stars_repo_head_hexsha": "07202090d468669200cab78297122880c1c03e87", "max_stars_repo_licenses": ["BSD-2...
from RQ2 import t2v_w2v_lstm_k_cross, w2v_lstm_k_cross, t2v_lstm_k_cross from RQ2.utils import file_opt import jsonlines import matplotlib.pyplot as plt import pandas as pd from sklearn import metrics from numpy import * from collections import Counter import numpy as np import pandas as pd import config def run(): ...
{"hexsha": "c1452f59b3e570336750dab284a0d893ab0c66ce", "size": 10762, "ext": "py", "lang": "Python", "max_stars_repo_path": "RQ2/cmp_t2v_w2v.py", "max_stars_repo_name": "SuShu19/TiTIC", "max_stars_repo_head_hexsha": "7dd83a1527ee0e57e354eb7843c75ad2e53d69fc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
Require Import Kami.All Kami.Compiler.Compiler. Require Import Kami.Notations. Require Import Kami.Compiler.CompilerSimple. Section SemSimple. Local Notation UpdRegT := RegsT. Local Notation UpdRegsT := (list UpdRegT). Local Notation RegMapType := (RegsT * UpdRegsT)%type. Inductive Sem_RmeSimple: (RmeSimpl...
{"author": "sifive", "repo": "Kami", "sha": "ffb77238f27b603dbd42d2622ba911740bf5eadf", "save_path": "github-repos/coq/sifive-Kami", "path": "github-repos/coq/sifive-Kami/Kami-ffb77238f27b603dbd42d2622ba911740bf5eadf/Compiler/CompilerSimpleSem.v"}
# import the necessary packages from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.ker...
{"hexsha": "94bf4b8d9acfb5581d5605b75b087444cdba14f6", "size": 4258, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainmaskdetector.py", "max_stars_repo_name": "maryamnasir65834/face-mask-detector", "max_stars_repo_head_hexsha": "a31314558620e28c5573cbf87dc128efa8addd6c", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import matplotlib.pyplot as plt def get_random(freqs): freq_vec = sum([[k]*num for k, num in freqs.items()], []) N = len(freq_vec) while True: idx = np.random.randint(0, N) yield freq_vec[idx] def write_random_sequence(fn, freqs, n): with open(fn, "w") as f: ...
{"hexsha": "2e83df72b77f7ad6b64c23e0293df4ad33170a9a", "size": 3119, "ext": "py", "lang": "Python", "max_stars_repo_path": "garageofcode/compression/arithmetic.py", "max_stars_repo_name": "tpi12jwe/garageofcode", "max_stars_repo_head_hexsha": "3cfaf01f6d77130bb354887e6ed9921c791db849", "max_stars_repo_licenses": ["MIT"...
CHECKSUM = 'VtP-A2' import argparse import mlflow import torch import time from torch import optim from torch.nn import functional as F from torch.optim import lr_scheduler from torch.utils.data import Dataset from torchvision import transforms from torchsummary import summary from sklearn.manifold import TSNE from sk...
{"hexsha": "cd376a86d118a4d0f388d8d4462471dcfbd34866", "size": 14619, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/VtPVAE.py", "max_stars_repo_name": "Micky774/NewRepo", "max_stars_repo_head_hexsha": "d3c6f9882fd7f03ff8c33ca07b9584f587e2451e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
from enum import Enum import itertools import operator import numpy as np def input_(): return int(input("Please supply a number: ")) def output_(input_value): print(input_value) def jump_if_true(condition, target): if condition != 0: return target else: return None def jump_if_...
{"hexsha": "c78fd7f7f8e226c8e68ff126fe418a3c5ccd1dd1", "size": 3673, "ext": "py", "lang": "Python", "max_stars_repo_path": "day5/python/main.py", "max_stars_repo_name": "freidrichen/advent-of-code-2019", "max_stars_repo_head_hexsha": "08aca50e86700504d35c934a308a640a95de586e", "max_stars_repo_licenses": ["MIT"], "max_s...
import json #import dbmanager from pprint import pprint import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates import datetime from collections import defaultdict, OrderedDict """ Plot/statistics ideas: - multi-histogram of stress as a function of weekday - -||- of alkoholi as a funct...
{"hexsha": "989a16aec1ad8f6ed8fd2a24b41072f946180937", "size": 19081, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis.py", "max_stars_repo_name": "fyysikkokilta/hyvinvointibot", "max_stars_repo_head_hexsha": "8fa94dfe051937a1d108b0295a3c5edffdd08dc9", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
Address(Stanford Place) is a residential Culdesacs culdesac in Central Davis. Intersecting Streets Sycamore Lane and across the intersection Stanford Drive
{"hexsha": "329fa1740f985646b7717f039994d43022a53584", "size": 163, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Stanford_Place.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import pickle import os import numpy as np import pandas as pd from matplotlib import pyplot as plt import math from scipy import signal objectRep = open("C:\\Users\\asus\\OneDrive\\BSC_brain_math\\year_c\\Yearly\\BCI\\bci4als\\recordings\\adi\\9\\trials.pickle", "rb") file = pickle.load(objectRep) all_data = np.zeros...
{"hexsha": "6d13ec8e122a1440249d9bd2f67a0977b2a59f9f", "size": 2770, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/bci2021.py", "max_stars_repo_name": "Chgabri2/bci4als", "max_stars_repo_head_hexsha": "cfa8bfb6190389e473100cc37281c304b6a3bc4a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...