text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import copy import cmath import h5py import math import numpy import scipy.linalg import sys import time from pauxy.walkers.multi_ghf import MultiGHFWalker from pauxy.walkers.single_det import SingleDetWalker from pauxy.walkers.multi_det import MultiDetWalker from pauxy.walkers.multi_coherent import MultiCoherentWalker...
{"hexsha": "fa078b878dbe30e91904cdecca0939654da23115", "size": 20669, "ext": "py", "lang": "Python", "max_stars_repo_path": "pauxy/walkers/handler.py", "max_stars_repo_name": "pauxy-qmc/pauxy", "max_stars_repo_head_hexsha": "1da80284284769b59361c73cfa3c2d914c74a73f", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
[STATEMENT] lemma agg_sum_commute: fixes f :: "('a,'b::aggregation_order) square" shows "(\<Sum>\<^sub>k \<Sum>\<^sub>l f (k,l)) = (\<Sum>\<^sub>l \<Sum>\<^sub>k f (k,l))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. aggregation.sum_0 (\<lambda>k. aggregation.sum_0 (\<lambda>l. f (k, l)) {l. True}) {k. True} =...
{"llama_tokens": 197, "file": "Aggregation_Algebras_Matrix_Aggregation_Algebras", "length": 1}
function slsharedisp_decindent(nsteps) %SLSHAREDISP_DECINDENT Decreases the indent of the displayer % % $ Syntax $ % - slsharedisp_decindent() % - slsharedisp_decindent(nsteps) % % $ Description $ % - slsharedisp_decindent() decreases the indent by one step. % % - slsharedisp_decindent(nsteps) decreases the ind...
{"author": "lmthang", "repo": "nmt.hybrid", "sha": "50d5c025f18ed280ff0fd2e2adce327f4170a2c3", "save_path": "github-repos/MATLAB/lmthang-nmt.hybrid", "path": "github-repos/MATLAB/lmthang-nmt.hybrid/nmt.hybrid-50d5c025f18ed280ff0fd2e2adce327f4170a2c3/code/wordsim/code/sltoolbox_r101/sltoolbox_r101/sltoolbox/utils/slshar...
from fawkes.models import NetworkPoisson import pandas as pd import numpy as np import h5py as h5 import sys import os """Creates HDF5 datasets of estimates and stability from MCMC samples.""" def import_samples(path, name, date, burn): print("Importing data for name {} and date {}...".format(name, date)) try...
{"hexsha": "68d17ad80c5bb0f20778af1e2525b149ecc39ba4", "size": 2356, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/continuous/postprocess_samples.py", "max_stars_repo_name": "cswaney/fawkes", "max_stars_repo_head_hexsha": "90c623476bf62b808947277840a2d5de3c95a7ce", "max_stars_repo_licenses": ["MIT"], ...
# # File: # conmasklc.py # # Synopsis: # Draws contours over a masked lambert conformal map. # # Category: # Contouring over maps. # # Author: # Mary Haley (based on a code by Fred Clare) # # Date of initial publication: # December, 2009 # # Description: # This example produces two frames: # ...
{"hexsha": "aa1e66dd3118d7f198cd6f67ce92070735153b21", "size": 3989, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/conmasklc.py", "max_stars_repo_name": "yang69can/pyngl", "max_stars_repo_head_hexsha": "78a7040ce9de4b7a442b0c3b5faecccab2f01426", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
/////////////////////////////////////////////////////////////////////////////// // importance_sampling::generate.hpp // // // // Copyright 2009 Erwann Rogard. Distributed under the Boost // ...
{"hexsha": "87f75b0dab49b72ac38c91c1468134f30dfdfaea", "size": 2447, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "importance_sampling/boost/statistics/detail/importance_sampling/random/generate.hpp", "max_stars_repo_name": "rogard/boost_sandbox_statistics", "max_stars_repo_head_hexsha": "16aacbc716a31a9f7bb6c53...
import os import numpy as np from sklearn.naive_bayes import GaussianNB import timeit def nbClassifier(X_train, y_train, X_test): clf = GaussianNB() start_time = timeit.default_timer() clf.fit(X_train, y_train) elapsedTraining = (timeit.default_timer() - start_time) * 1000 start_time = timeit.defa...
{"hexsha": "0aa17d9a56d824bcd0abd5771968ec67537213fb", "size": 501, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/Classification Algorithms/NB.py", "max_stars_repo_name": "DrMoe/Evaluation-of-satellite-imagery-based-crop-classification", "max_stars_repo_head_hexsha": "ca7324ee6e5c399ea08d2c3ac11497e4ed9...
#include "App/config.h" #include <pwd.h> #include <sys/types.h> #include <boost/filesystem.hpp> #include <boost/program_options.hpp> #include <boost/property_tree/ini_parser.hpp> #include <iostream> using namespace std; void tc::Config::parseConfigFile() { // parse the config files boost::property_tree::ptree ...
{"hexsha": "eb110bd4e0257cbb4e4ca50f7458e45353a56b7d", "size": 2678, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "App/config.cpp", "max_stars_repo_name": "bl4ck5un/minimal-sgx-app", "max_stars_repo_head_hexsha": "970d368a02fc8ec37475cf8c1d42c3d48cbbdbdb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
// // Created by calebcintary on 3/20/22. // #include <boost/test/unit_test.hpp> #include "pyplot_cpp/Histogram.hpp" #include "pyplot_cpp/plt/Properties.hpp" BOOST_AUTO_TEST_SUITE(Histogram_Test) BOOST_AUTO_TEST_CASE(Histogram_SimpleShow_Test) { pyplot_cpp::Histogram hist; hist.setData({1, 2, 3,...
{"hexsha": "3729e314522a261dae54991deafef1acde3fc166", "size": 760, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/Hist_Test.cpp", "max_stars_repo_name": "CalebCintary/pyplot_cpp", "max_stars_repo_head_hexsha": "de33c3e921229e5efd72a7fc4fdb17212edc9aa9", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
hours : List Nat hours = [1..12] nats : Stream Nat nats = [0,1..]
{"hexsha": "869a0c471e7e63b10e60ccc57cf88f08ff00eb54", "size": 67, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "tests/ideMode/ideMode005/Ranges.idr", "max_stars_repo_name": "ska80/idris-jvm", "max_stars_repo_head_hexsha": "66223d026d034578876b325e9fcd95874faa6052", "max_stars_repo_licenses": ["BSD-3-Clause"],...
using Test using Documenter using ExperimentalDesign tests = ["variance_predictions.jl"] @testset "ExperimentalDesign" begin for test in tests include(test) end @testset "Doctests" begin DocMeta.setdocmeta!(ExperimentalDesign, :DocTestSetup, ...
{"hexsha": "4e8b2653a1710509512984828ff98d74ef59b831", "size": 583, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ExperimentalDesign.jl-4babbea4-9e7d-11e9-116f-e1ada04bd296", "max_stars_repo_head_hexsha": "841a479c0f9a97ac88ae793703df7f90...
# QuTiP Lecture: Particle emission from a photon cascade D. Lukin, Stanford University In this Jupyter notebook, we use QuTiP: The Quantum Toolbox in Python to study a cascaded three level system excited by a classical pulse. This model system captures the essense of the dynamics of a biexcitonic in a quantum dot [[1...
{"hexsha": "0e6c8f5c701bf5da234afac42cf3402ef49e331c", "size": 51083, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "qutip-notebooks-master/examples/photon-emission.ipynb", "max_stars_repo_name": "OliverDudgeon/QSync", "max_stars_repo_head_hexsha": "34adbcf37d501b803aa000b0421ce22fb7934e9b", "max_s...
import os import numpy as np from gym import spaces import mujoco_py from envs.gym_kuka_mujoco.envs.assets import kuka_asset_dir from envs.gym_kuka_mujoco.utils.quaternion import identity_quat, subQuat, quatAdd, mat2Quat from envs.mujoco.utils.kinematics import forwardKinSite, forwardKinJacobianSite, forwardVelKinSite...
{"hexsha": "18b0b1ca46b2cad84738680166609e91ca427f38", "size": 1699, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/envs_assistive/alg_test.py", "max_stars_repo_name": "hzm2016/assistive-gym-robosuite", "max_stars_repo_head_hexsha": "5c529f4444cc386383618bfa584341740a8468f9", "max_stars_repo_licenses": ["M...
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import topology.instances.nnreal import order.liminf_limsup import topology.metric_space.lipschitz /-! # Extended non-negative reals -/ noncomputable theory open cl...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/topology/instances/ennreal.lean"}
# primitive collision detection helper import math import numpy as np import basis.data_adapter as da from panda3d.core import NodePath, CollisionNode, CollisionTraverser, CollisionHandlerQueue, BitMask32 from panda3d.core import CollisionBox, CollisionSphere, CollisionPolygon, GeomVertexReader def gen_box_cdnp(pdnp,...
{"hexsha": "e1d4551754b71a8fffdb2514c120cbb640c0ad15", "size": 8860, "ext": "py", "lang": "Python", "max_stars_repo_path": "modeling/_panda_cdhelper.py", "max_stars_repo_name": "liang324/wrs", "max_stars_repo_head_hexsha": "46eadec355c61a9c7bac1fa0f3cf419b2aac19aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import Base.show export show function show{F}(io::IO, dr::DimRedux{F}) k,n = size(dr.Ξ) print(io, "$(typeof(dr)): dimension reduction map over the field $F from $n to $k dimensions") end function show{F,DR}(io::IO, sk::Sketch{F,DR}) k,n = size(sk.X) m,k = size(sk.Y) s,s = size(sk.Z) print(io, ...
{"hexsha": "89cdaec1a17cab29a0c2a21d6e55ff9320c94213", "size": 423, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utilities.jl", "max_stars_repo_name": "udellgroup/LowRankSketch.jl", "max_stars_repo_head_hexsha": "041401ba5fbf1e6ac4e0abc4367b4111e877bcfa", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import os.path import time import re # Core utilities import SimpleCV import random import pickle import numpy import layer def change_image_format(input_image): r = numpy.array([input_image[:,:,0]])/255. g = numpy.array([input_image[:,:,1]])/255. b = numpy.array([input_image[:,:,2]])/255. output_image...
{"hexsha": "19f021b7e8b479992886adcb30e23cb5ee70e744", "size": 14364, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "unionsetde/ToyNN", "max_stars_repo_head_hexsha": "57dc642ee3500996514a86a129714d6cc38e0824", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
#include <boost/multi_index/composite_key.hpp>
{"hexsha": "2570a53ba663a4d40415c53fc2d1081772265693", "size": 47, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_multi_index_composite_key.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL...
[STATEMENT] lemma reduced_row_echelon_form_def': "reduced_row_echelon_form A = ( (\<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j. j>i \<and> \<not> is_zero_row j A)) \<and> (\<forall>i. \<not> (is_zero_row i A) \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> 0) = 1) \<and> (\<fo...
{"llama_tokens": 1291, "file": "Gauss_Jordan_Rref", "length": 2}
[STATEMENT] lemma remove_const_lv_mondaic_steps: assumes lv: "lv \<R>" and fresh: "(c, 0) \<notin> funas_rel \<R>" and mon: "monadic \<F>" and steps: "(s \<cdot> const_subst c, t \<cdot> const_subst c) \<in> (srstep \<F> \<R>)\<^sup>+" shows "(s, t) \<in> (srstep \<F> \<R>)\<^sup>+" [PROOF STATE] proof (pro...
{"llama_tokens": 328, "file": "Rewrite_Properties_Reduction_Rewriting_Rewriting_LLRG_LV_Mondaic", "length": 2}
""" python clean_generate_JSON.py """ import fnmatch import cv2 import json import numpy as np import os import base64 from copy import deepcopy import imgaug as ia import imgaug.augmenters as iaa import imageio import numpy as np import imgaug as ia import imgaug.augmenters as iaa import shutil # import matplotlib.p...
{"hexsha": "836266187a481112cc833492aba820056c49ada8", "size": 12090, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLModel/LabelMeData/clean_generate_JSON.py", "max_stars_repo_name": "ShubhamKrSingh21/ObjectifyManthan", "max_stars_repo_head_hexsha": "e99a5e69b3bc8d0f8ca66aee61a2185f01bc5bd5", "max_stars_repo_...
[STATEMENT] lemma rel_sv[relator_props]: "single_valued R \<Longrightarrow> single_valued (\<langle>R\<rangle>rel)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. single_valued R \<Longrightarrow> single_valued (\<langle>R\<rangle>rel) [PROOF STEP] unfolding rel_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. ...
{"llama_tokens": 167, "file": "Collections_ICF_ICF_Autoref", "length": 2}
import os from collections import OrderedDict import numpy as np np.set_printoptions(suppress=True) import matplotlib as mpl from matplotlib import cm import matplotlib.pyplot as plt from time import time from copy import copy class designer(): def __init__(self,ff,weight,method='D'): ''' input: ...
{"hexsha": "8d72df36c7c8355ff60411363a5a9ff93d996ac2", "size": 3596, "ext": "py", "lang": "Python", "max_stars_repo_path": "design.py", "max_stars_repo_name": "zhul9311/optimal-design", "max_stars_repo_head_hexsha": "1bf6d3d1879030a679b23113a22d712abfb6fb4c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import os, sys, time import numpy as np from psychopy import visual, core, data, logging, event from .task_base import Task from .videogame import _onPygletKeyPress, _onPygletKeyRelease, _keyPressBuffer, _keyReleaseBuffer from ..shared import config, utils class ButtonPressTask(Task): BUTTONS = { 'l': [(...
{"hexsha": "0452c40ee3c1b341e2a4140f2a08e5092c041299", "size": 8875, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tasks/game_controller.py", "max_stars_repo_name": "eddyfortier/task_stimuli", "max_stars_repo_head_hexsha": "b3e0c477775d42b0efa4389531042a80a848fe86", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python import os.path import sys import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import MultipleLocator, FormatStrFormatter #import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.colors import LinearSegmentedColormap, C...
{"hexsha": "862279c7c0efe902ef6a4402c3274469824cac6e", "size": 15739, "ext": "py", "lang": "Python", "max_stars_repo_path": "Visualization/Null-Space Shuttle/-2/plot_kernel_vp.py", "max_stars_repo_name": "qianchengliu0/Uncertainty_Quantification_Marmousi_Example", "max_stars_repo_head_hexsha": "501775f7ad2c6b83fc12ab7e...
getlibraryfor{T<:Real}(::Type{T}) = SimplePolyhedraLibrary() type SimplePolyhedraLibrary <: PolyhedraLibrary end type SimplePolyhedron{N, T} <: Polyhedron{N, T} hrep::Nullable{HRepresentation{N, T}} vrep::Nullable{HRepresentation{N, T}} end function polyhedron{N, T}(hrep::HRepresentation{N, T}, ::SimplePolyhedra...
{"hexsha": "f28780b54c1b6857729286c65e1a206d8ed0039a", "size": 1024, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simplepolyhedron.jl", "max_stars_repo_name": "JuliaPackageMirrors/Polyhedra.jl", "max_stars_repo_head_hexsha": "a4489180581383b750b1af4e043650f66fa61e76", "max_stars_repo_licenses": ["MIT"], "m...
import os import numpy as np import sklearn.metrics as metrics from sklearn.externals import joblib from utils.Results import ResultsSingleRun class BaseOptionsClassifier: def __init__(self, name, dir_models_base, options_filename_dataset_training, filename_options_clf): self.name = name; self....
{"hexsha": "86f79ae1b13c43525fffd7a6182749ce9f5b06f2", "size": 3695, "ext": "py", "lang": "Python", "max_stars_repo_path": "learning/BaseClassifier.py", "max_stars_repo_name": "ASMDS/PATREC", "max_stars_repo_head_hexsha": "091df6ec20e0736340a2b2ff9a25ac81bec48259", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python3 # # Copyright 2019 ROBOTIS CO., LTD. # # 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 applicabl...
{"hexsha": "2d7881c407cbe92a3730cf2ded3c74f3ca1572c4", "size": 15853, "ext": "py", "lang": "Python", "max_stars_repo_path": "pic4rl/pic4rl/trash/pic4rl_env_test.py", "max_stars_repo_name": "PIC4SeRCentre/pic4rl", "max_stars_repo_head_hexsha": "1a1a511042bf332c96750de084d9ac3a302efa12", "max_stars_repo_licenses": ["MIT"...
import numpy as np import tensorflow as tf class TFGenerator(object): def __init__(self, data, labels, idxs=None, batch_size=32, shuffle=True, prefetch=4, map_fn=None, one_shot=False, data_dtype=tf.float32, labels_dtype=tf.float32): """ Class to create a tf.data.Dataset given a set of data and ass...
{"hexsha": "acbb65688920776ac0fec75aafaf40257338ca89", "size": 4440, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_generator.py", "max_stars_repo_name": "geometrikal/IIC-1", "max_stars_repo_head_hexsha": "6b337670d58fcb5c34b6ec34236ea2ed472e1d92", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import numpy as np import pandas as pd STDoSD = lambda std, n: std/(n**(1/2)) #print(STDoSD(1.36,50)) UCL_nsig = lambda x, nsig, std, n: x + nsig*(STDoSD(std,n)) LCL_nsig = lambda x, nsig, std, n: x - nsig*(STDoSD(std,n)) #print(UCL_nsig(420, 3, 30, 25)) #print(LCL_nsig(420, 3, 30, 25)) UCL_x = lambda MoSM, MF, ARo...
{"hexsha": "83ce2cab421be2e7eb244d2de2164642b60aada1", "size": 1107, "ext": "py", "lang": "Python", "max_stars_repo_path": "OM300Ch6.py", "max_stars_repo_name": "JoshChima/OM300_Mastered", "max_stars_repo_head_hexsha": "db17c8ca1eb1045b8b96fde34f193767d038629f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
[STATEMENT] lemma not_cong_is_anga1: assumes "\<not> A B C CongA A' B' C'" and "A B C AngAcute a" shows "\<not> A' B' C' AngAcute a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> A' B' C' AngAcute a [PROOF STEP] using assms(1) assms(2) is_anga_conga [PROOF STATE] proof (prove) using this: \<not> A B ...
{"llama_tokens": 257, "file": "IsaGeoCoq_Tarski_Neutral", "length": 2}
import numpy as np from sklearn.linear_model import LinearRegression from pyuplift import BaseModel class Cadit(BaseModel): """The class which implements the cadit approach [1]. +----------------+-----------------------------------------------------------------------------------+ | **Parameters** | | **m...
{"hexsha": "f53fb24ff645da5051da99b9b66355b89f81b555", "size": 4289, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyuplift/variable_selection/cadit.py", "max_stars_repo_name": "duketemon/pyuplift", "max_stars_repo_head_hexsha": "33daa0768ff333387cb8223ebfaedaffa57de335", "max_stars_repo_licenses": ["MIT"], "m...
from __future__ import print_function, division import sys import os import torch import numpy as np import random import csv from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from torch.utils.data.sampler import Sampler from future.utils import raise_from from pycocotools.coco...
{"hexsha": "797cbb7f5ce496e3c52ee403e55492cec83bb1d0", "size": 26977, "ext": "py", "lang": "Python", "max_stars_repo_path": "MULTITASK_FILES/RETINANET_FILES/src/pytorch-retinanet/retinanet/dataloader.py", "max_stars_repo_name": "egoodman92/semi-supervised-surgery", "max_stars_repo_head_hexsha": "42f7af7e707e71ecd64b9f2...
from ctapipe.instrument.optics import OpticsDescription from astropy import units as u import pytest def test_guess_optics(): from ctapipe.instrument import guess_telescope answer = guess_telescope(1855, 28.0 * u.m) od = OpticsDescription.from_name(answer.name) assert od.equivalent_focal_length.to_v...
{"hexsha": "d752dc2b4572a5fbbc8f667609c9bcfaba1f4e3c", "size": 827, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctapipe/instrument/tests/test_optics.py", "max_stars_repo_name": "Pluto9th/ctapipe", "max_stars_repo_head_hexsha": "8c4faa674a1949210cbda8cb9e2413dd6362afea", "max_stars_repo_licenses": ["BSD-3-Cla...
import cv2 from PIL import Image import os import sys import torch import argparse import numpy as np from modules import utils from train import train from data import VideoDataset from torchvision import transforms import data.transforms as vtf from models.retinanet import build_retinanet from gen_dets import gen_d...
{"hexsha": "ae110fe2c8a060989aff5d3e8e6785d0216768a1", "size": 22220, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference_vis.py", "max_stars_repo_name": "salmank255/ROADSlowFast", "max_stars_repo_head_hexsha": "e939d8f79fe3eb6f3dd32e967a34530d00f45c8e", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import simpy import sys sys.path #sometimes need this to refresh the path import matplotlib.pyplot as plt import matplotlib.animation as animation import torch import numpy as np from tabulate import tabulate import pandas as pd from pandas import DataFrame import machine import sequencing import job_crea...
{"hexsha": "f628b0fec4facb2d3d6abdc0c632fe58c0b23e30", "size": 6699, "ext": "py", "lang": "Python", "max_stars_repo_path": "JSP/Thesis_tournament.py", "max_stars_repo_name": "Reallyhardtocreateaname/PhD-Thesis-Projects", "max_stars_repo_head_hexsha": "de0878f51ec66c9905227b2d260ffaa0b4946f1f", "max_stars_repo_licenses"...
# coding: utf-8 # # Des dates qui font des nombres premiers ? # # Ce petit [notebook Jupyter](https://www.jupyter.org/), écrit en [Python](https://www.python.org/), a pour but de résoudre la question suivante : # # > *"En 2017, combien de jours ont leur date qui est un nombre premier ?"* # # Par exemple, en 2017, ...
{"hexsha": "77aa6f08f3870d645ac9f2b793f325e5189f5be5", "size": 12996, "ext": "py", "lang": "Python", "max_stars_repo_path": "simus/Des_dates_qui_font_des_nombres_premiers.py", "max_stars_repo_name": "IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/narnt", "max_stars_repo_head_hexsha": "0eda13a7b8663e218b4fe2e06a974b99db9ff166"...
[STATEMENT] lemma verticesFrom_nth: "distinct (vertices f) \<Longrightarrow> d < length (vertices f) \<Longrightarrow> v \<in> \<V> f \<Longrightarrow> (verticesFrom f v)!d = f\<^bsup>d\<^esup> \<bullet> v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>distinct (vertices f); d < |vertices f|; v \<in> \<V...
{"llama_tokens": 8628, "file": "Flyspeck-Tame_FaceDivisionProps", "length": 46}
import types import numpy as np import torch from torch.nn.functional import mse_loss from all.core import State from ._agent import Agent from .a2c import A2CTestAgent from .utils import make_grads_observable, flatten_grads class QMCPG(Agent): """ Quasi Monte Carlo Policy Gradient (QMCPG). Args: ...
{"hexsha": "bbaacbabddaf2886e366da08b67f00c20115f33c", "size": 6613, "ext": "py", "lang": "Python", "max_stars_repo_path": "all/agents/qmcpg.py", "max_stars_repo_name": "kstoneriv3/autonomous-learning-library-with-rrpg", "max_stars_repo_head_hexsha": "11f6dd4e72b4143944cf972a8f938406113d860f", "max_stars_repo_licenses"...
[STATEMENT] lemma pequiv_pr_trans[intro,trans]: "\<lbrakk> a \<simeq> b; b \<sqsubseteq> c \<rbrakk> \<Longrightarrow> a \<sqsubseteq> c" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>a \<simeq> b; b \<sqsubseteq> c\<rbrakk> \<Longrightarrow> a \<sqsubseteq> c [PROOF STEP] unfolding pequiv_def refines_de...
{"llama_tokens": 239, "file": "pGCL_Algebra", "length": 2}
(* Title: CTT/Arith.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1991 University of Cambridge *) section {* Elementary arithmetic *} theory Arith imports Bool begin subsection {* Arithmetic operators and their definitions *} definition add :: "[i,i]\<Righ...
{"author": "Josh-Tilles", "repo": "isabelle", "sha": "990accf749b8a6e037d25012258ecae20d59ca62", "save_path": "github-repos/isabelle/Josh-Tilles-isabelle", "path": "github-repos/isabelle/Josh-Tilles-isabelle/isabelle-990accf749b8a6e037d25012258ecae20d59ca62/src/CTT/Arith.thy"}
import numpy as np import open3d as o3d import pybullet as p # some codes are copied from https://github.com/ethz-asl/vgn.git class CameraIntrinsic(object): """Intrinsic parameters of a pinhole camera model. Attributes: width (int): The width in pixels of the camera. height(int): The height...
{"hexsha": "47d2e4b3718daee35dea4d034db16e639af039e1", "size": 4710, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/perception.py", "max_stars_repo_name": "guodashun/plug-in", "max_stars_repo_head_hexsha": "d805f57af12bbf94a17a52e518903a02c267f4df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy as np import numpy.testing as npt from qspace.bases import spf from qspace.sampling import sphere, space from numpy.testing import (assert_, assert_equal, assert_almost_equal, assert_array_almost_equal, run_module_suite, assert_array_equal) def test_s...
{"hexsha": "54d6b578742251789eac72c11d5ddca82346d226", "size": 2401, "ext": "py", "lang": "Python", "max_stars_repo_path": "qspace/bases/tests/test_spf.py", "max_stars_repo_name": "ecaruyer/qspace", "max_stars_repo_head_hexsha": "5aa6b714bb16e7e769c5dd4ecdd91591f46e04a8", "max_stars_repo_licenses": ["Unlicense"], "max_...
@with_kw mutable struct MomentumParameters{T <: AbstractFloat} <: AbstractPolicyParameters μ::T = 0.9 ϵ::T = 1e-3 end abstract type MomentumTrait end abstract type Classical <: MomentumTrait end abstract type Nesterov <: MomentumTrait end struct Momentum{T <: MomentumTrait} <: AbstractBoosting params::Mom...
{"hexsha": "583a34c903141e3f8ab8560fb4158d2eb62bf0c4", "size": 1342, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/boosting/momentum.jl", "max_stars_repo_name": "pologrp/POLO.jl", "max_stars_repo_head_hexsha": "c866563d02d060c733e3e6da5ccd57a96f85db61", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Created on Sun march 27 00:51:11 2020 @author: Gautam Pala """ import os import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt from PIL import Image import glob import time import h5py import pandas as pd from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2...
{"hexsha": "1fee06ef550d5300ef45fbb645c6130e52707756", "size": 6903, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn_emotion.py", "max_stars_repo_name": "JayeshKriplani/Deep-Learning-based-Emotion_Detection", "max_stars_repo_head_hexsha": "6d77421a94ae73331e8da9adb3604bddf75e909a", "max_stars_repo_licenses":...
# Copyright (c) Facebook, Inc. and its affiliates # Copyright (c) MTRF authors #!/usr/bin/env python import os # os.system('chmod +x sawyer_read_angles.py') import rospy from std_msgs.msg import String from rospy_tutorials.msg import Floats from rospy.numpy_msg import numpy_msg from rospy_message_converter import mess...
{"hexsha": "af191b602de79e6874d1965ba9742161c52c012b", "size": 1438, "ext": "py", "lang": "Python", "max_stars_repo_path": "MTRF/r3l/r3l/sawyer_hardware/sawyer_read_angles.py", "max_stars_repo_name": "facebookresearch/MTRF", "max_stars_repo_head_hexsha": "2fee8f3f1c2150fcecc2db2fa9e122a664a72d72", "max_stars_repo_licen...
/** * @file tests/main_tests/emst_test.cpp * @author Manish Kumar * * Test RUN_BINDING() of emst_main.cpp. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If no...
{"hexsha": "3cf3a8802a46ce4ae6830886f424e26dae7be4ca", "size": 3432, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mlpack/tests/main_tests/emst_test.cpp", "max_stars_repo_name": "oblanchet/mlpack", "max_stars_repo_head_hexsha": "e02ab3be544694294d2f73bd12a98d0d162ef3af", "max_stars_repo_licenses": ["BSD-3-Cl...
[STATEMENT] lemma absc_distr_self: "MDP.MC.T (absc cfg) = distr (MDP.MC.T cfg) MDP.MC.S (smap absc)" if "cfg \<in> valid_cfg" [PROOF STATE] proof (prove) goal (1 subgoal): 1. MDP.MC.T (absc cfg) = distr (MDP.MC.T cfg) (stream_space (count_space UNIV)) (smap absc) [PROOF STEP] using \<open>cfg \<in> _\<close> [PROOF ...
{"llama_tokens": 16430, "file": "Probabilistic_Timed_Automata_PTA", "length": 71}
#!/usr/bin/python import numpy as np import deepSNP import deepSNP_utils def snp_pos_feature_matrix(read, window_start): """ Creates vector of zeros, except 1 at SNP position :param read: pysam read :param window_start: starting position of feature window :return: (WINDOW_SIZE x 1) binary matrix...
{"hexsha": "c5164552d873550fea04536d0bb5515130986354", "size": 3180, "ext": "py", "lang": "Python", "max_stars_repo_path": "snp_pos_feature.py", "max_stars_repo_name": "brianhill11/deepSNP", "max_stars_repo_head_hexsha": "4979fbf84fe3e68d76b0054ba031e084d494411d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ##### Tools ##### *Created on Thu Jun 7 14:45 2017 by A. Pahl* Helper Tools acting on individual data.. """ import os import os.path as op import sys import glob from collections import Counter, namedtuple import yaml import pandas as pd import numpy as np import ...
{"hexsha": "acc3fc6c2acc0495d8d12f612f8db50f46203a8d", "size": 11059, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellpainting2/tools.py", "max_stars_repo_name": "apahl/cellpainting2", "max_stars_repo_head_hexsha": "b0fd4adbca804b136e3dca9c1b466a6efb49cbd3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# example of neural net functions in Econometrics.jl using Econometrics, Glob # generate draws from linear regression model, and # fitted coefficients from correct model, plus # quadratic and cubic models (irrelevant regressors) # and 5 pure noise statistics function make_simdata(reps=100000) n = 30 simdata = ...
{"hexsha": "a55d0937f546ccb0da670c2679c4fa508ce932f1", "size": 1895, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/neural_net_example.jl", "max_stars_repo_name": "UserQuestions/Econometrics.jl", "max_stars_repo_head_hexsha": "f9db0ca3046e7c5328f085581a12b1c733cf9bcf", "max_stars_repo_licenses": ["MIT"]...
# Copyright 2017 Amir Hossein Delgoshaie, amirdel@stanford.edu # # Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee # is hereby granted, provided that the above copyright notice and this permission notice appear in all # copies. # # THE SOFTWARE IS PROVIDED "AS IS" AN...
{"hexsha": "bb957ed6d82e594a1e056c15581a165ccbae810e", "size": 3464, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_scripts/plot_test_uncorrelated_cees.py", "max_stars_repo_name": "amirdel/dispersion-continua", "max_stars_repo_head_hexsha": "2e1f7a3fbfcdc0b27c546cb0ae51a628a926ad60", "max_stars_repo_licens...
% !TeX spellcheck = en_GB \chapter{Results} \section{LWC and LWP from MEPS}%\hfill} \label{app:LWP_MEPS} %%% image LWC Retrieval MEPS comparison %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{figure}[t]%\ContinuedFloat \centering % 21/12 \begin{subfigure}[t]{0.85\textwidth} \includegraphics[trim={.5cm 0.5cm 27cm ....
{"hexsha": "5c4e943779929119f4481b28e4bc05b4c33b918f", "size": 1934, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis_full/Appendix/LWC_MEPS.tex", "max_stars_repo_name": "franzihe/Latex_thesis", "max_stars_repo_head_hexsha": "128284a01155bdc28b3e9374e538a07a1e5722c5", "max_stars_repo_licenses": ["MIT"], "max...
\documentclass[11pt,addpoints,answers]{exam} %\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath, amsfonts} \usepackage{enumerate} \usepackage{graphicx} \usepackage{titling} \usepackage{url} \usepackage{xfrac} % \usepackage{fancyhdr} % CONFLICTS with the exam class \usepackage{geometry}...
{"hexsha": "415cdfa8d4f4dcd2585a9c772ae07de4517669a5", "size": 61208, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "assignments/solutions/hw1/problems/latex_template/hw1.tex", "max_stars_repo_name": "punit-bhatt/cmu-10601-intro-to-ml", "max_stars_repo_head_hexsha": "a4b7bdb27a388a2996e3f4dac99f34156ff9f01e", "ma...
# author: Fernando Paolo; # modify: xin luo, 2021.8.10. """ des: merges several HDF5 files into a single file or multiple larger files. example merge.py ifiles_*.h5 -o ofile.h5 merge.py ifiles_*.h5 -o ofile.h5 -m 5 -n 5 notes - The parallel option (-n) only works for multiple outputs (-m)! - If no 'k...
{"hexsha": "d4647cf450266c851dd68cf8135af3cd1c89201d", "size": 6883, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/merge_files.py", "max_stars_repo_name": "xinluo2018/Glacier-Change-for-RGI1305", "max_stars_repo_head_hexsha": "c0850d7c681181a2046d87c7ede566050cc627b6", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma "\<not> no_spoofing_iface (Iface ''eth0'') [Iface ''eth0'' \<mapsto> [(ipv4addr_of_dotdecimal (192,168,0,0), 24)]] [Rule (MatchAnd (Match (Src (IpAddrNetmask (ipv4addr_of_dotdecimal (192,168,0,0)) 24))) (MatchNot (Match (IIface (Iface ''eth0''))))) action.Drop, ...
{"llama_tokens": 317, "file": "Iptables_Semantics_Primitive_Matchers_No_Spoof", "length": 1}
@testset "TinayHanabiEnv" begin env = TinyHanabiEnv() RLBase.test_interfaces!(env) RLBase.test_runnable!(env) end
{"hexsha": "23c1ae2043b8605ee60b06807135dbcf6e121629", "size": 129, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ReinforcementLearningEnvironments/test/environments/examples/tiny_hanabi.jl", "max_stars_repo_name": "LaarsOman/ReinforcementLearning.jl", "max_stars_repo_head_hexsha": "b04e3f192e71418dbca49633...
# (c) 2016 Gregor Mitscha-Baude import nanopores from matplotlib import pyplot as plt from itertools import product from folders import fields, FIGDIR #fields.update() r = 0.11 #D2D = fields.get_field("pugh_diff2D_test", "D")[0] #data = fields.get_fields("pugh_diff3D_cross", bulkbc=True, rMolecule=2.0779) data = fields...
{"hexsha": "9cc4c0f46284a757ad732ad85356efd15515c397", "size": 3713, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pughpore/plot_diff3D.py", "max_stars_repo_name": "jhwnkim/nanopores", "max_stars_repo_head_hexsha": "98b3dbb5d36464fbdc03f59d224d38e4255324ce", "max_stars_repo_licenses": ["MIT"], "max_sta...
from typing import * import torch import torch.optim as optim import numpy as np from allennlp.data import Instance from allennlp.data.fields import TextField, SequenceLabelField from allennlp.data.dataset_readers import DatasetReader from allennlp.common.file_utils import cached_path from allennlp.data.token_indexers ...
{"hexsha": "08882aebfbcb2cdbe7c185f3415957abeeb27d13", "size": 7036, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/hybrid_model/predicator.py", "max_stars_repo_name": "ShawnLYU/A-Hybrid-Approach-of-Insincere-Questions-Detection", "max_stars_repo_head_hexsha": "0bc76c3fc186245f83e665732dac53a1af3f3fbf", "...
import numpy as np import matplotlib.pyplot as pl import healpy as hp import pickle def graticule(ax): ax.axhline(0.0, color='k') for i in range(2): ax.axhline(30+30*i, color='k', linestyle=':') ax.axhline(-30-30*i, color='k', linestyle=':') for i in range(12): ax.axvline(-180+30*i,...
{"hexsha": "5f3478e35fe26b3122c6d10e04895ba6622e0946", "size": 12879, "ext": "py", "lang": "Python", "max_stars_repo_path": "doplot_iipeg.py", "max_stars_repo_name": "aasensio/bayesDI", "max_stars_repo_head_hexsha": "4ddad57d89c3512b4c4ee5684ddc5608060ebdec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m...
# -*- coding: utf-8 -*- from __future__ import absolute_import from pmdarima.arima._arima import C_is_not_finite import numpy as np def test_not_finite(): assert C_is_not_finite(np.nan) assert C_is_not_finite(np.inf) assert not C_is_not_finite(5.)
{"hexsha": "213285dcd8e57b152df4d8650dffd9668d12aa4b", "size": 265, "ext": "py", "lang": "Python", "max_stars_repo_path": "pmdarima/arima/tests/test_c_arima.py", "max_stars_repo_name": "Saravji/pmdarima", "max_stars_repo_head_hexsha": "7f42e36beb888d9e1e7e41b0d9c9f7419c730a3a", "max_stars_repo_licenses": ["MIT"], "max_...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
{"hexsha": "43ab31d5782ecde55cfe379656b20dd60a7ff259", "size": 29644, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/_label.py", "max_stars_repo_name": "jessica-tu/jupyter", "max_stars_repo_head_hexsha": "917e02bc29e0fa06bd8adb25fe5388ac381ec829", "max_stars_repo_licenses": ["PSF-2.0", "Apache-2.0...
''' Recurrent Deterministic Policy Gradient (DDPG with LSTM network) Update with batch of episodes for each time, so requires each episode has the same length. ''' import math import random import gym import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F f...
{"hexsha": "c324c1b90ad31344c6d8cdb5cfcc631c37a8eb00", "size": 11370, "ext": "py", "lang": "Python", "max_stars_repo_path": "rdpg.py", "max_stars_repo_name": "chagri/SOTA-RL-Algorithms", "max_stars_repo_head_hexsha": "58b416e7c706d8426dc402482e72ca7283568e71", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
(* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) *) theory Fastpath_C imports SyscallArgs_C Del...
{"author": "SEL4PROJ", "repo": "jormungand", "sha": "bad97f9817b4034cd705cd295a1f86af880a7631", "save_path": "github-repos/isabelle/SEL4PROJ-jormungand", "path": "github-repos/isabelle/SEL4PROJ-jormungand/jormungand-bad97f9817b4034cd705cd295a1f86af880a7631/case_study/l4v/proof/crefine/Fastpath_C.thy"}
Require Import FunctionalExtensionality. Require Import ProofIrrelevance. Require Import Program. Require Import Category. Require Import Isomorphism. Require Import Coq. Require Import Co. Set Universe Polymorphism. Class Terminal `{Category} := { terminal : object; receivesAll o : o → terminal; receivesAllUni...
{"author": "konne88", "repo": "category-theory", "sha": "883c4edd35ad47c82300315d1cd5c7f9238bede6", "save_path": "github-repos/coq/konne88-category-theory", "path": "github-repos/coq/konne88-category-theory/category-theory-883c4edd35ad47c82300315d1cd5c7f9238bede6/Construction/Terminal.v"}
import numpy as np from collections import defaultdict import matplotlib.pyplot as plt from multiprocessing.dummy import Pool as ThreadPool import multiprocessing from time import sleep import pickle import utils import search.csp as csp import search.viz as viz #LEFT = 0 #RIGHT = 1 #UP = 2 #DOWN = 3 #ANY = -1 LEFT =...
{"hexsha": "d8949458bd93e20c4665d5eb27f0c488da5c9513", "size": 13278, "ext": "py", "lang": "Python", "max_stars_repo_path": "practice/attempt3.py", "max_stars_repo_name": "bshishov/HashCode2019", "max_stars_repo_head_hexsha": "026ab14fd22d269deec6d809d4426e78a9417677", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
""" require(package::Symbol; [fun_name]::String="", [explanation]::String="") Helper method to check for optional packages and print an error message. ### Input - `package` -- symbol (the package name) - `fun_name` -- (optional; default: `""`) name of the function that requires the pack...
{"hexsha": "93d57018579e0979709ad83f6eb3dcb8ba0e2e92", "size": 2180, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Utils/require.jl", "max_stars_repo_name": "nablabits/LazySets.jl", "max_stars_repo_head_hexsha": "e839322ae970e5b61271b709f8a865184b32c8e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from pythonequipmentdrivers import Scpi_Instrument import numpy as np from typing import Union, Tuple from pathlib import Path class Lecroy_WR8xxx(Scpi_Instrument): """ Lecroy_WR8xxx(address) address : str, address of the connected oscilloscope object for accessing basic functionallity of the Lecroy...
{"hexsha": "689ce5191c667ba849a3126c97144e9a0ed98e83", "size": 30083, "ext": "py", "lang": "Python", "max_stars_repo_path": "pythonequipmentdrivers/oscilloscope/Lecroy_WR8xxx.py", "max_stars_repo_name": "admleman/PythonEquipmentDrivers", "max_stars_repo_head_hexsha": "1e1fbf96ae372757ad90339af5863ab64daef2a0", "max_sta...
import numpy as np import collections from .penalized_regression import PenalizedRegression as PLR from . import elbo as elbo_py from ..models.normal_means_ash_scaled import NormalMeansASHScaled RES_FIELDS = ['theta', 'coef', 'prior', 'residual_var', 'intercept', 'elbo_path', 'outer_elbo_path', 'obj_path', 'niter'] c...
{"hexsha": "b2c088fdab7b05823959ad5d81a8b1ff896bfc4a", "size": 6280, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mrashpen/inference/ebfit.py", "max_stars_repo_name": "banskt/mr-ash-pen", "max_stars_repo_head_hexsha": "a9e574f66ce64265bff22cf0661d23a5706e4515", "max_stars_repo_licenses": ["MIT"], "max_sta...
""" Class and function definitions for word-based modifications """ import json import torch import numpy as np from tqdm import tqdm class WordBasedModifications(): def __init__(self, data_args): self.data_args = data_args # Function for modifying string json to integer json # https://st...
{"hexsha": "2c2f05400ce28fbd8a5ea58be8fe612e04ae65e1", "size": 2477, "ext": "py", "lang": "Python", "max_stars_repo_path": "archive/synthetic_language_modifications_utils.py", "max_stars_repo_name": "princeton-nlp/MultilingualAnalysis", "max_stars_repo_head_hexsha": "b0d61c93c0c020a698a06264897dde14c9db471c", "max_star...
# -*- coding: UTF-8 -*- # !/usr/bin/python3 """ Model for SEMI-CLDC task """ # ************************************************************ # Imported Libraries # ************************************************************ import math import numpy as np import sympy from collections import defaultdict import torch i...
{"hexsha": "58e791d5e78b4286e54417a7c1c77c5ef1361621", "size": 31648, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn_model/semicldc_model.py", "max_stars_repo_name": "onlyrico/mling_sdgms", "max_stars_repo_head_hexsha": "ef6015d1a815a317f16fa1e42cbb048e4fe443f7", "max_stars_repo_licenses": ["MIT"], "max_star...
from __future__ import division from .checks import * from pymc3 import * from numpy import array, inf from nose.tools import raises class DistTest(Continuous): def __init__(self, a, b, *args, **kwargs): super(DistTest, self).__init__(*args, **kwargs) self.a = a self.b = b def logp(s...
{"hexsha": "b3cd04d244f633c5515da3c26c97372bcaf75764", "size": 1412, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymc3/tests/test_distribution_defaults.py", "max_stars_repo_name": "MichielCottaar/pymc3", "max_stars_repo_head_hexsha": "f37198653e7d09881e7bc411cbd10fffbab442c2", "max_stars_repo_licenses": ["Ap...
[STATEMENT] lemma F_base_aux: "{l. length l=n \<and> valid l} = {replicate n B}" if "n > 0" "n < m" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {l. length l = n \<and> local.valid l} = {replicate n B} [PROOF STEP] using that [PROOF STATE] proof (prove) using this: 0 < n n < m goal (1 subgoal): 1. {l. length l =...
{"llama_tokens": 3541, "file": "Monad_Memo_DP_example_Counting_Tiles", "length": 26}
program add_real implicit none INTEGER, PARAMETER :: np=100 REAL, DIMENSION(np) :: A, B INTEGER:: i DO i=1, np A(i)=1 B(i)=1 END DO !$OMP PARALLEL DO REDUCTION(+:A) DO i=1, np A(i)=A(i)+B(i) END DO !$OMP END PARALLEL DO ...
{"hexsha": "762cfbf6ff384379590eae3c091c840359c63e69", "size": 490, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/smoke/flang-272285/flang-272285.f90", "max_stars_repo_name": "raramakr/aomp", "max_stars_repo_head_hexsha": "9a224fe01ca8eff4209b8b79aa1fa15a18da65db", "max_stars_repo_licenses": ["Apache-2....
import os import json import numpy as np import torch import cv2 from PIL import Image import torch.utils.data as data from torch.utils import data from matplotlib.image import imread from pycocotools.coco import COCO from effdet.data.parsers import create_parser class VdotDataset(data.Dataset): def __init__(self, ...
{"hexsha": "757232ac11cb525f233d0c04568bde8d3f9167a6", "size": 4586, "ext": "py", "lang": "Python", "max_stars_repo_path": "vdot.py", "max_stars_repo_name": "Ekta246/efficientdet-pytorch", "max_stars_repo_head_hexsha": "f284a465a9050c26723c268de71fb31bf080048a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import unittest import numpy import chainer from chainer import cuda from chainer.functions import convolution_2d from chainer.functions import deformable_convolution_2d_sampler from chainer import utils from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'para...
{"hexsha": "a3147c76d61ed100a0f25d5ceb95e8daee484906", "size": 4512, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/chainer_tests/functions_tests/connection_tests/test_deformable_convolution_2d_sampler.py", "max_stars_repo_name": "zaltoprofen/chainer", "max_stars_repo_head_hexsha": "3b03f9afc80fd67f65d5e0...
# -*- coding: utf-8 -*- """ Transport example using GSTools. Plotting the plumes at t=15d and calculating the breakthrough curves at the observation wells. Authors: Alraune Zech and Sebastian Müller """ import os import numpy as np from ogs5py.reader import readtec_polyline import meshio as mio import matplotlib.pypl...
{"hexsha": "748d72d3dab4459993a2e18ddf0fd2aae919b7d1", "size": 4745, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/01_plot.py", "max_stars_repo_name": "GeoStat-Examples/gstools-connectivity-and-transport", "max_stars_repo_head_hexsha": "64229f989ff04ad1b822db1369f334353df206ab", "max_stars_repo_licenses": ...
import numpy as np import loupe def test_expc(): a = loupe.rand(size=(10,10)) res = loupe.expc(a) assert np.array_equal(res, np.exp(a.data*1j)) def test_expc_backward(): a = loupe.rand(size=(10,10), requires_grad=True) res = loupe.expc(a) res.backward(grad=np.ones((10,10))) assert np.allcl...
{"hexsha": "d6e6f8ad1994d7ffff4f05c2194a4b492359690b", "size": 355, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/numeric/test_expc.py", "max_stars_repo_name": "andykee/loupe", "max_stars_repo_head_hexsha": "8b10781598973aac7c129e190209acad7e5a9559", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
from __future__ import division from __future__ import absolute_import from builtins import range from past.utils import old_div import numpy as np import cv2 import matplotlib.pyplot as plt from .tesisfunctions import hist_cdf,findminima,threshold import glob def brightness(img): ### LESS BRIGHT http://alienryde...
{"hexsha": "caec59851d589e9da5017946dfce466afe58ef4c", "size": 5066, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/hypothesis2.py", "max_stars_repo_name": "davtoh/RRTools", "max_stars_repo_head_hexsha": "6dde2d4622719d9031bf21ffbf7723231a0e2003", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import time import numpy as np import pandas as pd import os class SpotifyDataExtractor: def __init__(self, sp, artist_uri, artist_name, conn): self.sp = sp self.artist_uri = artist_uri self.artist_name = artist_name self.conn = conn self.sp_albums = self.sp.artist_albums(se...
{"hexsha": "ab318e8aed17367900e3d71f8c678b4aa15554e4", "size": 5559, "ext": "py", "lang": "Python", "max_stars_repo_path": "AI/spotifydataextractor.py", "max_stars_repo_name": "pradeepsalunke/muser-data-analysis", "max_stars_repo_head_hexsha": "08ea051d422431b29e6e32841d8e349e136c6f14", "max_stars_repo_licenses": ["Apa...
#importing the libraries import tensorflow as tf import numpy as np import pandas as pd import json import nltk from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.layers import Input, Embedding, LSTM , Dense,GlobalMaxPooling1D,Flatten from tensorflow.keras.models import Model import matp...
{"hexsha": "33bdb85416dc22da20f39bdeca277af1fe2141e2", "size": 3092, "ext": "py", "lang": "Python", "max_stars_repo_path": "DEW.py", "max_stars_repo_name": "Eeman1113/DEW", "max_stars_repo_head_hexsha": "1b970bf0c8cf83b79d483c3836a6a50349d9ab41", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo...
# Copyright (c) 2020 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": "6a56ff75465b9609e3452617eb4fc91b8dc6263a", "size": 12061, "ext": "py", "lang": "Python", "max_stars_repo_path": "paddlenlp/data/collate.py", "max_stars_repo_name": "JunnYu/ConvBERT-Prod", "max_stars_repo_head_hexsha": "a1351e1e7f9400cb8c71d0a15d23629b4cb055d4", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python3 # # (C) 2014-2020 Ed Bueler import sys, argparse import numpy as np import PetscBinaryIO # may use link petsc = PetscBinaryIO.PetscBinaryIO() parser = argparse.ArgumentParser(description='Generate a structured grid on the unit square in PETSc binary format (.vec,.is), readable by ch9/unfem.')...
{"hexsha": "ff98442a7130057e2c720294822b270354018dd9", "size": 2462, "ext": "py", "lang": "Python", "max_stars_repo_path": "c/ch10/genstructured.py", "max_stars_repo_name": "thw1021/p4pdes", "max_stars_repo_head_hexsha": "421fd3d809b1e23e5a6f3c3e51252cb275a76140", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import sys from glob import glob import numpy as np from setuptools import Extension, find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() # MSVC compiler has different flags; assume that'...
{"hexsha": "7548e10dee63bb8dce13b37a12d169bb829b12e3", "size": 2044, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "duynguyenhoang/pantab", "max_stars_repo_head_hexsha": "d6d44a1a03ab50adfb8f8d850fc6ba98195b6056", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
import numpy as np from .transform import sph2vec, vec2sph def angle_between(ang1, ang2, sign=True): d = (ang1 - ang2 + np.pi) % (2 * np.pi) - np.pi if not sign: d = np.abs(d) return d def angdist(v1, v2, zenith=True): if v1.shape[0] == 2: v1 = sph2vec(v1, zenith=zenith) if v2.sh...
{"hexsha": "790ec48bd68710ab73361d201cd9d2a9e9505382", "size": 1142, "ext": "py", "lang": "Python", "max_stars_repo_path": "sphere/distance.py", "max_stars_repo_name": "jannsta1/insectvision", "max_stars_repo_head_hexsha": "d98a7acbcde1d5faf00131485fa85c706f313814", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import unittest import numpy as np import scipy.sparse from sklearn.datasets import load_boston, load_iris, load_wine from flaml import AutoML from flaml.data import get_output_from_log from flaml.model import SKLearnEstimator from rgf.sklearn import RGFClassifier, RGFRegressor from flaml import tune class MyRegul...
{"hexsha": "d502cb056ce0fb28434fa8fe07f4b0924470faf1", "size": 13120, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_automl.py", "max_stars_repo_name": "dan0nchik/FLAML", "max_stars_repo_head_hexsha": "9d661759b49de6e403d9288af7a015606528fe7e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
## Open a dataset ```python import pandas as pd fn = "../data/benchmarks/diffeq/predpreyfrac_clean.csv" df = pd.read_csv(fn, skipinitialspace=True) print df.columns ``` Index([u'T', u'x', u'y', u'dx', u'dy'], dtype='object') ## Graph the data ```python # visualization libraries import matplotlib.pyplot as p...
{"hexsha": "af5e0ed93e10ec79c93769dcb0ed86c18aa5544b", "size": 68956, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/Dissertation/experiments/diffeq_clean.ipynb", "max_stars_repo_name": "verdverm/pypge", "max_stars_repo_head_hexsha": "7f94595735c08e147bd17056f15d944da61eec6d", "max_stars_...
[STATEMENT] lemma split_two_block_non_interfering: assumes "split_block (two_block_non_interfering A B) (dim_row A) (dim_col A) = (Q1, Q2, Q3, Q4)" shows "Q1 = A" "Q4 = B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Q1 = A &&& Q4 = B [PROOF STEP] using split_four_block_dual_fst_lst[of A _ _ B Q1 Q2 Q3 Q4] ...
{"llama_tokens": 349, "file": "Linear_Programming_LP_Preliminaries", "length": 2}
#' Unit Testing script for NMF package: NMF utility functions. #' #' @author Renaud Gaujoux #' @creation 10 Aug 2010 #' Unit test for rmatrix: random matrix generation test.rmatrix <- function(){ n <- 100; p <- 20 A <- matrix(1, n, p) # square matrix if y is missing set.seed(123456); M <- matrix(runif(n*n), n...
{"hexsha": "d393e2ce559b5da3957050af16034fe19dee8020", "size": 5168, "ext": "r", "lang": "R", "max_stars_repo_path": "packrat/lib/x86_64-pc-linux-gnu/3.2.5/NMF/tests/runit.utils.r", "max_stars_repo_name": "Chicago-R-User-Group/2017-n3-Meetup-RStudio", "max_stars_repo_head_hexsha": "71a3204412c7573af2d233208147780d31343...
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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.apa...
{"hexsha": "8bc717b875565a49b08f5346c4077b04d6a70e03", "size": 3491, "ext": "py", "lang": "Python", "max_stars_repo_path": "nlp_architect/data/cdc_resources/embedding/embed_elmo.py", "max_stars_repo_name": "maheshwarigagan/nlp-architect", "max_stars_repo_head_hexsha": "f6466edfd3ec6fe7d3682ec54306a1c65980d288", "max_st...
import investor_simulator as invsim import os import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter from datetime import datetime # Handle date time conversions between pandas and matplotlib from pandas.plotting import register_matplotli...
{"hexsha": "b89c02337b7151aee7f608cfc0eb1814497204ea", "size": 3532, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/Simulation_bonus.py", "max_stars_repo_name": "caiomts/financial-programming", "max_stars_repo_head_hexsha": "ad23c091b6d7238e3dffdf748eedd0b8a2e41874", "max_stars_repo_licenses": ["MIT"], "ma...
import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn as nn from torch.autograd import Variable from torch.optim.lr_scheduler import ExponentialLR from probabilistic_forecast.utils.torch_utils import get_device from probabilistic_forecast.utils.plot_utils impor...
{"hexsha": "a8b18f8791797976a6ecc092baf95976ee4389ab", "size": 10017, "ext": "py", "lang": "Python", "max_stars_repo_path": "probabilistic_forecast/lstm_mc.py", "max_stars_repo_name": "Abdulmajid-Murad/deep_probabilistic_forecast", "max_stars_repo_head_hexsha": "399846381af4bb789021c9f63f121dd69fa0125d", "max_stars_rep...
import pandas as pd import numpy as np from os import listdir, makedirs from os.path import join, exists import gc import argparse parser = argparse.ArgumentParser() parser.add_argument('-index_batch', type=int) parser.add_argument('--data_split', default='temporal_5') args = parser.parse_args() index_batch = args....
{"hexsha": "1603b805350c2810080360348310bd5dd221bb11", "size": 5115, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm/data_processing/signal_extraction.py", "max_stars_repo_name": "ratschlab/circEWS", "max_stars_repo_head_hexsha": "b2b1f00dac4f5d46856a2c7abe2ca4f12d4c612d", "max_stars_repo_licenses": ["MIT"]...
import pytest import numpy as np import tensorflow as tf from tensorflow.keras.optimizers import Adam from flowket.callbacks.exact import ExactLocalEnergy from flowket.callbacks.monte_carlo import LocalEnergyStats from flowket.evaluation import evaluate, exact_evaluate from flowket.operators import Heisenberg, NetketO...
{"hexsha": "b78b499c69dccf3702024011451e3fdd24f47744", "size": 5578, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_variational.py", "max_stars_repo_name": "vigsterkr/FlowKet", "max_stars_repo_head_hexsha": "0d8f301b5f51a1bab83021f10f65cfb5f2751079", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
"""Created on 25 mars 2019. @author: Aurele Durand """ import datetime, decimal import pandas as pd import numpy as np from _collections_abc import dict_keys from flask.json import JSONEncoder from sqlalchemy.exc import OperationalError class AlphaJSONEncoder(JSONEncoder): rules = {} def __init__(self, *a...
{"hexsha": "9a7fc7c87c940cadec790a63805b1cb3a1c432db", "size": 2255, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/json/_converters.py", "max_stars_repo_name": "ZAurele/alpha-py", "max_stars_repo_head_hexsha": "b6330f1e714d07a2010ebe500d5ccdf4cc637998", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma ListAif1: "bval b s \<Longrightarrow> preList upds (IF b THEN C1 ELSE C2) l s = preList upds C1 l s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bval b s \<Longrightarrow> preList upds (IF b THEN C1 ELSE C2) l s = preList upds C1 l s [PROOF STEP] apply(induct upds) [PROOF STATE] proof (prove) go...
{"llama_tokens": 404, "file": "Hoare_Time_Nielson_VCG", "length": 3}
# ====================================================================== # Copyright (c) 2010, G. Fiori, University of Pisa # # This file is released under the BSD license. # See the file "license.txt" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # ==========...
{"hexsha": "e7ed367b26169c48713f315052f85ad6fa10092f", "size": 4370, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/section.py", "max_stars_repo_name": "aravindhk/Vides", "max_stars_repo_head_hexsha": "65d9ea9764ddf5f6ef40e869bd31387d0e3e378f", "max_stars_repo_licenses": ["BSD-4-Clause"], "max_stars_count":...
import numpy as np import random from rl.core import Env class MultiInputTestEnv(Env): def __init__(self, observation_shape): self.observation_shape = observation_shape def step(self, action): return self._get_obs(), random.choice([0, 1]), random.choice([True, False]), {} def reset(self...
{"hexsha": "5d8cee49375c0a894cb8c20f0732e6ec340536ae", "size": 612, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/rl/util.py", "max_stars_repo_name": "stefanbschneider/keras-rl", "max_stars_repo_head_hexsha": "216c3145f3dc4d17877be26ca2185ce7db462bad", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
###### Content provided under a Creative Commons Attribution license, CC-BY 4.0; code under MIT License. (c)2014 [David I. Ketcheson](http://davidketcheson.info) #An illustrated guide to limiters ## Or: how to interpolate non-smooth data without creating wiggles Many interesting wave phenomena -- like fluid dynamics,...
{"hexsha": "92f8bbeaeafef5c456f0b31a54f5e1ff1807b234", "size": 39615, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Guide_to_limiters.ipynb", "max_stars_repo_name": "nemethedr/HyperPython", "max_stars_repo_head_hexsha": "ce3d8ccd898fcb3d54f04af283d92b2436ba3eaa", "max_stars_repo_licenses": ["CC-BY...
################################################################################ ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2.1 of the License, or (at your op...
{"hexsha": "4590c0b79bd42361d4a03a813d3960db493b7918", "size": 17719, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/ADFRsuite/CCSBpckgs/DejaVu2/Qt/Viewer.py", "max_stars_repo_name": "AngelRuizMoreno/Jupyter_Dock_devel", "max_stars_repo_head_hexsha": "6d23bc174d5294d1e9909a0a1f9da0713042339e", "max_stars_re...