text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma size_single: "size {#b#} = 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. size {#b#} = 1 [PROOF STEP] by (simp add: size_multiset_overloaded_def size_multiset_single)
{"llama_tokens": 86, "file": null, "length": 1}
# NOTE: # To force matplotlib to use inline rendering, insert # the following line inside the ipython notebook: # %matplotlib inline import matplotlib import matplotlib.pyplot as plt import os import sys import random from cStringIO import StringIO import numpy as np from functools import partial import PIL.Image from...
{"hexsha": "645eddc8e1b5cbc236fc33a1ed6e1c33eff7a720", "size": 3382, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorlight/visualization.py", "max_stars_repo_name": "bsautermeister/tensorlight", "max_stars_repo_head_hexsha": "3139cf508a4d4d76e30c1591e26933d117883b49", "max_stars_repo_licenses": ["MIT"], "m...
\section{Variance of OLS estimators}
{"hexsha": "8f4e1418b582a69f0f337642090d8d77bb0fd92b", "size": 39, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/statistics/olsInference/02-00-variance.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_repo_...
function [struct_irf_record, D_record, gamma_record]=irfsignrespanel(beta_gibbs,sigma_gibbs,It,Bu,IRFperiods,n,p,m,k,signrestable,signresperiods) % function [struct_irf_record D_record gamma_record]=irfsignrespanel(sigma_gibbs,irf_record,It,Bu,IRFperiods,n,signrestable,signresperiods,checkalgo,checkiter) % runs the gi...
{"author": "european-central-bank", "repo": "BEAR-toolbox", "sha": "f33aae80c40f7a2e78a54de99b2ce3663f59aa75", "save_path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox", "path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox/BEAR-toolbox-f33aae80c40f7a2e78a54de99b2ce3663f59aa75/tbx/bear/+bear/irfsi...
################################################################################ # CLASS FOR BCC UNIT CELL MESHES GENERATED USING THE GMSH-PYTHON-API # ################################################################################ # This file provides a class definition for a generation of unit cells with a...
{"hexsha": "0b0fa4a6bb6882f9fbf6f0fa95c8c217b9cb4d14", "size": 11484, "ext": "py", "lang": "Python", "max_stars_repo_path": "gmshModel/Model/BodyCenteredCubicCell.py", "max_stars_repo_name": "gawelk/F3DAS", "max_stars_repo_head_hexsha": "4a4e7233add608820de9ee0fd1c369c2fa1d24c1", "max_stars_repo_licenses": ["BSD-3-Clau...
import numpy as np import scipy as sp from ngboost.scores import LogScore from ngboost.distns import Normal from ngboost.manifold import manifold from ngboost.learners import default_tree_learner, default_linear_learner from sklearn.utils import check_random_state from sklearn.base import clone from sklearn.tree impo...
{"hexsha": "0e54716de8b0ccd514a8c023c5decaf68ba2b2af", "size": 11309, "ext": "py", "lang": "Python", "max_stars_repo_path": "ngboost/ngboost.py", "max_stars_repo_name": "mahat/ngboost", "max_stars_repo_head_hexsha": "0a30225318b25d4c4caace1719be073946fc8401", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
/* * Copyright (c) 2014, Autonomous Systems Lab * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions...
{"hexsha": "cdcea0a34cdfccec4f5e74644c1868d13a740f17", "size": 13059, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/rovio/LocalizationLandmarkUpdate.hpp", "max_stars_repo_name": "ethz-asl/maplab_rovio", "max_stars_repo_head_hexsha": "58d7b79c912415613b60771f1a0402e48a0ebda6", "max_stars_repo_licenses": [...
from unittest import TestCase import numpy as np import numpy.testing as npt from . import sparse_permutations as sp from . import dense_permutations as dp class TestSparsePermutations(TestCase): tol = 0.00001 def test_get_sort_permutation(self): vector = [0.3, 0.2, 0.4, 0.1] npt.assert_all...
{"hexsha": "421927e88c6377ee20352ca976e1b84b00d0333c", "size": 936, "ext": "py", "lang": "Python", "max_stars_repo_path": "semvecpy/permutations/sparse_permutations_test.py", "max_stars_repo_name": "kearnsw/semvecpy", "max_stars_repo_head_hexsha": "bb3871b16f0bd28563510dfee857264ddfcb4685", "max_stars_repo_licenses": [...
import os import numpy as np path = os.path.abspath(os.path.dirname(__file__)) from scripts.change_pressure import set_pressure def test_fort4(): from mcflow.file_formatting.reader import read_fort4 from mcflow.file_formatting.writer import write_fort4 data = read_fort4(os.path.join(path, 'test-data', 'fo...
{"hexsha": "ede5e2afae7fe5f9c294db594a4cbbcf995abb25", "size": 1234, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_io.py", "max_stars_repo_name": "dejac001/MCFlow", "max_stars_repo_head_hexsha": "19d1ee21318b49102842d75493a2fb830ec116f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
\chapter{Examples} The following sections demonstrate some example embedded meta entries in various file types. If you have an additional file type example that is missing in this section, post a minimum-demonstrating-example as an issue at \url{https://github.com/UCREL/CL-metaheaders/issues} either as a plain request...
{"hexsha": "e419f3ca3c17297ef56226544ec1cb46bfc6b05c", "size": 950, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Active Draft/8_samples.tex", "max_stars_repo_name": "UCREL/CL-metaheaders", "max_stars_repo_head_hexsha": "6ffb4b114b8745ad523abcfac34702d082da18de", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import tensorflow as tf import numpy as np import random import os def set_seed(seed=200): """set global seed to fix random-generated value for reproducible. available at Functional API, tf.keras.Sequential and tf.keras subclass. NOTE: operation seed is not fixed. You need to call this before the ope...
{"hexsha": "e985e7161d5fa5b51aad695033a0643cebdc76f3", "size": 1232, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_keras_random_seed/seed.py", "max_stars_repo_name": "tokusumi/tf-keras-random-seed", "max_stars_repo_head_hexsha": "0dc1a92455acf4a4f80892b117c63be2e471fc2f", "max_stars_repo_licenses": ["MIT"],...
function copy = spm_cfg_eeg_copy % configuration file for copying %__________________________________________________________________________ % Copyright (C) 2009-2012 Wellcome Trust Centre for Neuroimaging % Vladimir Litvak % $Id: spm_cfg_eeg_copy.m 5377 2013-04-02 17:07:57Z vladimir $ %-----------------------------...
{"author": "spm", "repo": "spm12", "sha": "3085dac00ac804adb190a7e82c6ef11866c8af02", "save_path": "github-repos/MATLAB/spm-spm12", "path": "github-repos/MATLAB/spm-spm12/spm12-3085dac00ac804adb190a7e82c6ef11866c8af02/config/spm_cfg_eeg_copy.m"}
# Lecture 8 ## Complex Numbers ```python import numpy as np import sympy as sp import scipy.integrate sp.init_printing() ################################################## ##### Matplotlib boilerplate for consistency ##### ################################################## from ipywidgets import interact from ipywid...
{"hexsha": "e69cfdd6088817606cd45e486f0a8f28f32b4ebb", "size": 24145, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "lectures/lecture-08-complex-numbers.ipynb", "max_stars_repo_name": "SABS-R3/2020-essential-maths", "max_stars_repo_head_hexsha": "5a53d60f1e8fdc04b7bb097ec15800a89f67a047", "max_star...
import numpy as np import pandas as pd import pickle import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--dimension', type=int, default=1, help='dimension of the normal data') parser.add_argument('--save_csv', type=bool, default=False, help='whether to save the data in csv format') FLAGS...
{"hexsha": "edd053721e832cf6f9f0fc921329665536709d4e", "size": 3244, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulate.py", "max_stars_repo_name": "vicissitude1999/multi-level-vae", "max_stars_repo_head_hexsha": "83bc98fbe5046c61941298d4fd49b08fd868ee89", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import tensorflow as tf import os import time from datetime import datetime from utils import * from model import * import numpy as np import pdb # ############################################################################## # SEGMENTATION CLASS # #####################################################################...
{"hexsha": "5694fcfb0e7e31247ea8c3487970bd9c0f453bee", "size": 29229, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/segmenter.py", "max_stars_repo_name": "Anguse/salsa_fusion", "max_stars_repo_head_hexsha": "fb820b2a6cb16e008e15af466ab438fea164f4a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <nlopt.h> typedef struct { int N; double *x, *y; /* length N; */ } lorentzdata; static double sqr(double x) { return x * x; } static int count = 0; static double lorentzerr(int n, const double *p, double *grad, void *data) {...
{"hexsha": "6566425e3872dcf734410f18d2523e75e0afe8ae", "size": 2791, "ext": "c", "lang": "C", "max_stars_repo_path": "test/lorentzfit.c", "max_stars_repo_name": "bowie7070/nlopt", "max_stars_repo_head_hexsha": "95df031058531d84fe9c0727458129f773d22959", "max_stars_repo_licenses": ["MIT-0", "MIT"], "max_stars_count": 12...
#Function that performs PSR Bitaper Neff - Waveguide Width Sweep #General Purpose Libaries try: import matplotlib.pyplot as plt except: import pip pip.main(['install', 'matplotlib']) import matplotlib.pyplot as plt import numpy as np import os import sys import platform #Import LUMAPI from lumerical_...
{"hexsha": "03346b2625b2e7bc48bd2dd59a6335cbb531a0ce", "size": 5296, "ext": "py", "lang": "Python", "max_stars_repo_path": "PDK_Generator/design_automation/polarization_splitter_rotator/psr_bitaper/neff_taper_width_sweep.py", "max_stars_repo_name": "seanlam97/PDK_Generator", "max_stars_repo_head_hexsha": "15c1f4f56575f...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import sys, os import pathlib import os.path as osp
{"hexsha": "b2fbd17746b62bc68bd30efcd5350ae11f97b4df", "size": 122, "ext": "py", "lang": "Python", "max_stars_repo_path": "ipython/init.py", "max_stars_repo_name": "matherm/rootrepo", "max_stars_repo_head_hexsha": "f1b432018f685c3a3d8d28588c064002983c863a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import rospy import tf import numpy as np from matplotlib import pyplot as plt class VSCaleCalibrator(object): def __init__(self): rospy.init_node('vscale_calibrator') self._tfl = tf.TransformListener() self._data = [] # (timestamp, distance) self._t0 = rospy.Time.now() def step(self): try: t, q = sel...
{"hexsha": "73d31b73f0697c1375256fae93edb02d86cbf3aa", "size": 1108, "ext": "py", "lang": "Python", "max_stars_repo_path": "pwm_dev/scripts/vscale.py", "max_stars_repo_name": "olinrobotics/Powered-Mobility", "max_stars_repo_head_hexsha": "7294a6ff35dffe130a4c21a7725783515f0de255", "max_stars_repo_licenses": ["MIT"], "m...
# License: 3-clause BSD # Copyright (c) 2016-2018, Ml4AAD Group (http://www.ml4aad.org/) from typing import List, Optional, Tuple, Union from ConfigSpace import ConfigurationSpace import numpy as np import sklearn.gaussian_process.kernels from openbox.surrogate.base.base_model import AbstractModel import openbox.sur...
{"hexsha": "12d03c0c05b8a18b00a248b83c10262d389fe617", "size": 5500, "ext": "py", "lang": "Python", "max_stars_repo_path": "openbox/surrogate/base/base_gp.py", "max_stars_repo_name": "Dee-Why/lite-bo", "max_stars_repo_head_hexsha": "804e93b950148fb98b7e52bd56c713edacdb9b6c", "max_stars_repo_licenses": ["BSD-3-Clause"],...
(* This file is a part of MMIsar - a translation of Metamath's set.mm to Isabelle 2005 (ZF logic). Copyright (C) 2006 Slawomir Kolodynski This program is free software; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi...
{"author": "SKolodynski", "repo": "IsarMathLib", "sha": "879c6b779ca00364879aa0232b0aa9f18bafa85a", "save_path": "github-repos/isabelle/SKolodynski-IsarMathLib", "path": "github-repos/isabelle/SKolodynski-IsarMathLib/IsarMathLib-879c6b779ca00364879aa0232b0aa9f18bafa85a/IsarMathLib/MMI_prelude.thy"}
import torch import torch.nn as nn import numpy as np from torch.jit import Final from typing import List class NeuralStateSpaceModel(nn.Module): n_x: Final[int] n_u: Final[int] n_feat: Final[int] def __init__(self, n_x, n_u, n_feat=64, scale_dx=1.0, init_small=True, activation='relu'): super...
{"hexsha": "86e03f5e18b20f16b2b23b6656a8c1603d7c1a9d", "size": 9324, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchid/ssmodels_ct.py", "max_stars_repo_name": "forgi86/sysid-neural-continuous", "max_stars_repo_head_hexsha": "d4a4c7a8302977a90e63738265cbcd0bf5836e18", "max_stars_repo_licenses": ["Apache-2.0...
""" Copyright 2018 Goldman Sachs. 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 writing, software di...
{"hexsha": "cf514d79b1c135beda8ddd138fa17ef03cf1191c", "size": 27017, "ext": "py", "lang": "Python", "max_stars_repo_path": "gs_quant/test/timeseries/test_statistics.py", "max_stars_repo_name": "S-Manglik/gs-quant", "max_stars_repo_head_hexsha": "af22aa8574571db45ddc2a9627d25a26bd00e09b", "max_stars_repo_licenses": ["A...
# Copyright 2021 Medical Imaging Center, Vingroup Big Data Insttitute (VinBigdata), Vietnam # # 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 ...
{"hexsha": "5537b19f2cc62b589d98a72ea970a7f56e06faec", "size": 7292, "ext": "py", "lang": "Python", "max_stars_repo_path": "spine/classification/dataloader.py", "max_stars_repo_name": "vinbigdata-medical/vindr-spinexr", "max_stars_repo_head_hexsha": "ac9603a10684a4c6469cc480c954504ad127bc20", "max_stars_repo_licenses":...
module TwoPlayerTest using Test import Cribbage: CribbageGame, GameState, UnexpectedPlayerException import Cribbage.RandomPlay: RandomPlayer using Cribbage.TwoPlayer @testset "Test TwoPlayerGame Constructor" begin p₁ = RandomPlayer("player one") @test_throws AssertionError TwoPlayerGame(p₁, p₁) p₂ = Ra...
{"hexsha": "4f8a66abbd46ee225737f6280928675bf92b138a", "size": 2910, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_two_player.jl", "max_stars_repo_name": "KyleSJohnston/Cribbage.jl", "max_stars_repo_head_hexsha": "3eff95ed8fe1bc90973d1542067dcfc4b8072284", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma prefix_refl_conv[simp]: "(prefix\<cdot>xs\<cdot>xs = TT) \<longleftrightarrow> (xs \<noteq> \<bottom>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (prefix\<cdot>xs\<cdot>xs = TT) = (xs \<noteq> \<bottom>) [PROOF STEP] by auto
{"llama_tokens": 103, "file": "BirdKMP_Theory_Of_Lists", "length": 1}
program envelopef implicit none include "sacf.h" ! Define the Maximum size of the data Array integer MAX parameter (MAX=4000) ! Define the Data Array of size MAX real*4 :: ya(MAX), yb(MAX), yc(MAX) ! Declare Variables used in the rsac1() subroutine real beg, del...
{"hexsha": "5cc2f94b598b4142c79f91e334b82f0f9208fbe2", "size": 1198, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "examples/convolve_saclib/convolvef.f90", "max_stars_repo_name": "savage13/sac", "max_stars_repo_head_hexsha": "f13063ae2e3331e40096037d191563c4ec1ca18b", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding:utf-8 -*- import json import math import os import pickle from collections import Counter from datetime import datetime import numpy as np from gensim.models import KeyedVectors UNK_CHAR = "<UNK>" PAD_CHAR = "<PAD>" class NNData(object): """ 将文本数据转换为适合神经网络的数据格式 """ def __init__(self, ...
{"hexsha": "fcb5b54429c6a1c803451d6da79d1dcbfa96dff4", "size": 10379, "ext": "py", "lang": "Python", "max_stars_repo_path": "youmin_textclassifier/preprocessing/nn_dataset.py", "max_stars_repo_name": "WENGIF/youmin_textclassifier", "max_stars_repo_head_hexsha": "15410aaba009019ec387a8e64aec4734ae396922", "max_stars_rep...
Require Import rt.util.all. Require Import rt.model.arrival.basic.job rt.model.arrival.basic.task rt.model.priority. Require Import rt.model.schedule.uni.schedule rt.model.schedule.uni.schedulability. Require Import rt.model.schedule.uni.susp.suspension_intervals. Require Import rt.analysis.uni.basic.workload_bound_fp....
{"author": "cd-public", "repo": "rt-proofs", "sha": "ebef0b65460fe009c51f638fe2b459f16a6d1dd5", "save_path": "github-repos/coq/cd-public-rt-proofs", "path": "github-repos/coq/cd-public-rt-proofs/rt-proofs-ebef0b65460fe009c51f638fe2b459f16a6d1dd5/implementation/uni/susp/dynamic/oblivious/fp_rta_example.v"}
import argparse import time import torchvision import torch from torchvision import transforms as T from PIL import Image import importlib.util import tensorflow_datasets as tfds import tensorflow_hub as hub import sys import os import yaml import re import numpy as np import subprocess import random # import tensor...
{"hexsha": "985b60aed32599c1829918b1c0952c9a1910e1ca", "size": 4443, "ext": "py", "lang": "Python", "max_stars_repo_path": "imagenet_pky.py", "max_stars_repo_name": "parkinkon1/simclr", "max_stars_repo_head_hexsha": "2c1a19baf28e91db119ab32df75d3a6e474dc1b1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import sys sys.path.append('..') from pronoun_cracker import * import numpy as np import pandas as pd cracker = PronounCracker('pronoun', '../input', '../output') cracker.load_data() print(cracker.train.columns) renaming = { 'p_a' : 'P-A-e2e', 'p_b' : 'P-B-e2e', 'a_p' : 'A-P-e2e', 'b_p' : 'B-P-e2e'} train...
{"hexsha": "2c14d0c74ede0f48ea2cb890edca7cac2dd20912", "size": 703, "ext": "py", "lang": "Python", "max_stars_repo_path": "frozen_model/e2e_external/e2e_coref/e2e_output.py", "max_stars_repo_name": "Yorko/gender-unbiased_BERT-based_pronoun_resolution", "max_stars_repo_head_hexsha": "67d8c6b3fce94bbeb75bbc644a3111b168e7...
import time from garage.misc import logger from garage.misc import ext from garage.misc.overrides import overrides from garage.tf.algos import BatchPolopt from garage.tf.optimizers.cg_optimizer import CGOptimizer from garage.tf.misc import tensor_utils from garage.core.serializable import Serializable import tensorflow...
{"hexsha": "65d7d3e9ebd5c752e95fa63b1193825df4cdaf7e", "size": 18330, "ext": "py", "lang": "Python", "max_stars_repo_path": "garage/tf/algos/catrpo.py", "max_stars_repo_name": "Mee321/HAPG_exp", "max_stars_repo_head_hexsha": "ccd0d92ad2ffcd8438efbd6bc09123a4c3aafabe", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
{"hexsha": "9ceb79ee64e9f3ba86bba0d581ba03998bc938c2", "size": 3978, "ext": "hh", "lang": "C++", "max_stars_repo_path": "include/seastar/util/backtrace.hh", "max_stars_repo_name": "bhalevy/seastar", "max_stars_repo_head_hexsha": "f17d48138d5c159b351c2468de890002e013da7d", "max_stars_repo_licenses": ["Apache-2.0"], "max...
[STATEMENT] lemma imp_graph_insert [simp]: "imp_graph (insert cl cls) = edges_of_clause cl \<union> imp_graph cls" [PROOF STATE] proof (prove) goal (1 subgoal): 1. imp_graph (insert cl cls) = edges_of_clause cl \<union> imp_graph cls [PROOF STEP] by (auto simp: imp_graph_def)
{"llama_tokens": 112, "file": "Containers_Examples_TwoSat_Ex", "length": 1}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 29 09:17:18 2020 @author: sblair This is a Python implementation of an example problem from Lecture 31 of EM424. The example is the solution of the Wave Equation in Polar Coordinates. For this script I have implemented only the "ex2" initial cond...
{"hexsha": "22706bcabbb4ab4803c5a110195a4a890d1bdf33", "size": 4909, "ext": "py", "lang": "Python", "max_stars_repo_path": "lecture_31_python.py", "max_stars_repo_name": "stu314159/pyFourierExp", "max_stars_repo_head_hexsha": "889d824f269403f8c2bd190b5da63a82931d1bcf", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Copyright 2021 Huawei Technologies 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 applicable law or agreed to...
{"hexsha": "47c3fc80f561e769b6ba1925f535279215a8227c", "size": 10405, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/cv/ESRGAN/src/util/util.py", "max_stars_repo_name": "leelige/mindspore", "max_stars_repo_head_hexsha": "5199e05ba3888963473f2b07da3f7bca5b9ef6dc", "max_stars_repo_licenses": ["Apache-2.0...
"""Base map class that defines the rendering process """ import matplotlib.pyplot as plt import numpy as np from gym.spaces import Box, Dict from ray.rllib.agents.callbacks import DefaultCallbacks from ray.rllib.env import MultiAgentEnv _MAP_ENV_ACTIONS = { "MOVE_LEFT": [0, -1], # Move left "MOVE_RIGHT": [0,...
{"hexsha": "6f45b028b2985fc8cf6689f072d755f79c4b7808", "size": 38216, "ext": "py", "lang": "Python", "max_stars_repo_path": "social_dilemmas/envs/map_env.py", "max_stars_repo_name": "Caffa/sequential_social_dilemma_games", "max_stars_repo_head_hexsha": "de9af51f6cad2fbbd1fb28707364f997e7fc14f6", "max_stars_repo_license...
struct ShaderSpecification source_file::String reuse_descriptors::Bool entry_point::Symbol stage::Vk.ShaderStageFlag language::ShaderLanguage end function ShaderSpecification(source_file, stage::Vk.ShaderStageFlag; reuse_descriptors = false, entry_point = :main) ShaderSpecification(source_file,...
{"hexsha": "a67cd3dfc51cd847dbc6344c9a79d2a280928dc6", "size": 1103, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/shaders/specification.jl", "max_stars_repo_name": "serenity4/Lava.jl", "max_stars_repo_head_hexsha": "6dc3b27c660a6b555178bb738b634aaa588dc4b2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Copyright (c) 2020, Xilinx # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the follow...
{"hexsha": "108c97c2e83b7f3ca9dd6ead746b3ef8b4d10af5", "size": 5740, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/brevitas/test_brevitas_mobilenet.py", "max_stars_repo_name": "mmrahorovic/finn", "max_stars_repo_head_hexsha": "d1cc9cf94f1c33354cc169c5a6517314d0e94e3b", "max_stars_repo_licenses": ["BSD-3-...
from .conftest import base_config import numpy as np from numpy.testing import assert_allclose import openamundsen as oa from pathlib import Path import pytest @pytest.mark.slow def test_evapotranspiration(tmp_path): config = base_config() config.start_date = '2020-07-01' config.end_date = '2020-07-15' ...
{"hexsha": "f2861d5d40c5699134ec7f9416680061b4419c84", "size": 4291, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_evapotranspiration.py", "max_stars_repo_name": "openamundsen/openamundsen", "max_stars_repo_head_hexsha": "2ac09eb34b0c72c84c421a0dac08d114a05b7b1c", "max_stars_repo_licenses": ["MIT"],...
abstract type PDXObject end mutable struct PDFormXObject <: PDXObject doc::PDDoc cosXObj::CosIndirectObject{CosStream} matrix::Matrix{Float32} bbox::CDRect{Float32} fonts::Dict{CosName, PDFont} xobjs::Dict{CosName, PDXObject} content_objects::PDPageObjectGroup function PDFormXObject(doc...
{"hexsha": "7e2ac4f1d2304ea0af0d807e34ba8ef4c44eeaae", "size": 3076, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PDXObject.jl", "max_stars_repo_name": "gwierzchowski/PDFIO.jl", "max_stars_repo_head_hexsha": "224834081047f55eb42f1fdc293b32795e433512", "max_stars_repo_licenses": ["Zlib"], "max_stars_count":...
Extraction Language Scheme. Require Import NArith. Require Import Arith. Require Import Bool. Require Import List. Require Import Bag. Require Import Dict. Require Import CpdtTactics. Require Import JamesTactics. Require Import KonneTactics. Require Import Coq.Program.Basics. Require Import EqDec. Require Import Enume...
{"author": "konne88", "repo": "bagpipe", "sha": "9338220fe1fec2e7196e1143c92065ce5d5a7b46", "save_path": "github-repos/coq/konne88-bagpipe", "path": "github-repos/coq/konne88-bagpipe/bagpipe-9338220fe1fec2e7196e1143c92065ce5d5a7b46/src/bagpipe/coq/Test/BagpipeExtract.v"}
#!/usr/bin/python import sys from numpy import * import random import numpy.random as nrd from optparse import OptionParser parser = OptionParser(usage="-r REF expressionFile1.exp [expressionFiles2.exp]\n\n Program generates reads from fasta file based on read counts provided in the expression files fi...
{"hexsha": "2c939e375894f0e9e4bdf29ee1ca555e05315adb", "size": 4758, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/matlab/sim/getReads.py", "max_stars_repo_name": "PROBIC/diffsplicing", "max_stars_repo_head_hexsha": "09b5c846de8834696c15459816e0a1916efa8b44", "max_stars_repo_licenses": ["MIT"], "max_star...
# Unit tests for judiRHS and judiWavefield (without PDE solves) # Philipp Witte (pwitte.slim@gmail.com) # May 2018 # # Mathias Louboutin, mlouboutin3@gatech.edu # Updated July 2020 ########################################################### judiRHS #################################################### @testset "judiRH...
{"hexsha": "37012fc0e392942f84c5183f0c42dc7454456703", "size": 2924, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_abstract_vectors.jl", "max_stars_repo_name": "nogueirapeterson/JUDI", "max_stars_repo_head_hexsha": "cc76e950929f0b7a3cf29c2dff71e432e8ea26f8", "max_stars_repo_licenses": ["MIT"], "max_st...
\documentclass[article,oneside]{memoir} %%% custom style file with standard settings for xelatex and biblatex. Note that when [minion] is present, we assume you have minion pro installed for use with pdflatex. %\usepackage[minion]{org-preamble-pdflatex} %%% alternatively, use xelatex instead \usepackage{org-preamble-...
{"hexsha": "5a40a3927b2cc0706a243c21d1d1edcdde8863df", "size": 5983, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "NJCU/Resources/Templates/EthicsTemp.tex", "max_stars_repo_name": "scoconno/scoconno.github.io", "max_stars_repo_head_hexsha": "b62e9848878a57ca28cc9cacecc6c1ef05096b49", "max_stars_repo_licenses": [...
from embeddings import sentence_embedding import numpy as np from training import mlpc_model_for_s2v from hw_helpers import create_csv_submission def run(): neg_embeddings, pos_embeddings, test_embeddings = sentence_embedding("train_pos_full.txt", "train_neg_full.txt", "test_data.txt") train_data = np.vstack((...
{"hexsha": "946fe5872590fe4d7d36ab1d618cbb861aca84c6", "size": 1056, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_s2v.py", "max_stars_repo_name": "lggoch/Proj_2", "max_stars_repo_head_hexsha": "5c893359d8f456664ceb2366ec0d946ea230600b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": null,...
# -*- mode: python; coding: utf-8 -*- # Copyright 2017 the HERA Collaboration # Licensed under the 2-clause BSD license. """Testing for `hera_mc.roach`. """ from __future__ import absolute_import, division, print_function import unittest import nose.tools as nt from math import floor from astropy.time import Time, T...
{"hexsha": "77caed20b85d26c0338cfad30b4ae0f6ea9eb7be", "size": 11646, "ext": "py", "lang": "Python", "max_stars_repo_path": "hera_mc/tests/test_roach.py", "max_stars_repo_name": "pkgw/hera_mc", "max_stars_repo_head_hexsha": "d2769a716a0e68fe709d3834362b94f547136836", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
# coding: utf-8 # %load jupyter_default.py import pandas as pd import numpy as np import os import re import datetime import time import glob from tqdm import tqdm_notebook from colorama import Fore, Style get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt import matplotlib.colors i...
{"hexsha": "608a28999bb14cc0cb54083d3a88f5a652c7c16d", "size": 39933, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/py/4_bayes_poisson.py", "max_stars_repo_name": "agalea91/nhl-goalie-pull-optimization", "max_stars_repo_head_hexsha": "7e57d50163c5f96a22dd5afd96c6e1ba5487c600", "max_stars_repo_license...
# utils import numpy as np import copy SELECT_COL = 'SELECT_COL' SELECT_AGG = 'SELECT_AGG' WHERE_COL = 'WHERE_COL' WHERE_OP = 'WHERE_OP' WHERE_VAL = 'WHERE_VAL' # for models with value prediction # spider WHERE_ROOT_TERM = 'WHERE_ROOT_TERM' ANDOR = 'ANDOR' GROUP_COL = 'GROUP_COL' GROUP_NHAV = 'GROUP_NHAV' HAV_COL = '...
{"hexsha": "db7401fa6217c1c0a76585a90a19d5defd4833a2", "size": 5229, "ext": "py", "lang": "Python", "max_stars_repo_path": "MISP_SQL/utils.py", "max_stars_repo_name": "Deliangus/MISP", "max_stars_repo_head_hexsha": "8632b5ea120f8385825a08eb930232d3ea74c426", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 54, "m...
import pandas as pd import numpy as np from sklearn.preprocessing import LabelBinarizer import gc import time #### # load the data #### print('reading in data') all_train = pd.read_csv('./data/train_cleaned.csv') #all_train.head() final_test = pd.read_csv('./data/test_cleaned.csv') #final_test.head() #raw_test =...
{"hexsha": "ce3e08b61eb38e5cbf427c06787ded0c18f8e783", "size": 7080, "ext": "py", "lang": "Python", "max_stars_repo_path": "google_analytics/clean_to_np_matrix.py", "max_stars_repo_name": "mathxyz/stock2", "max_stars_repo_head_hexsha": "1e07156dea37f987efbc03025693b9ca2acf3f96", "max_stars_repo_licenses": ["MIT"], "max...
# Maze generator -- Randomized Prim Algorithm ## Imports import random import numpy as np import time from colorama import init from colorama import Fore, Back, Style ## Functions def printMaze(maze, height, width): for i in range(0, height): for j in range(0, width): if (maze[i][j] == 'u'): ...
{"hexsha": "1a06791e3e1846f083de359bab1e710488600367", "size": 10904, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/d4rl/d4rl_content/pointmaze/generate_new_maze.py", "max_stars_repo_name": "AliengirlLiv/babyai", "max_stars_repo_head_hexsha": "51421ee11538bf110c5b2d0c84a15f783d854e7d", "max_stars_repo_lic...
import sys sys.path.insert(0, './python/') import caffe import numpy as np import pdb #weights='./models/lenet300100/caffe_lenet300100_original.caffemodel' weights='./models/lenet300100/compressed_lenet300100.caffemodel' #weights='/home/gitProject/Dynamic-Network-Surgery/models/lenet300100/caffe_lenet300100_sparse.caff...
{"hexsha": "734cf6ef4f3dd16ca774d70d3c36b169fd1b5f6a", "size": 1583, "ext": "py", "lang": "Python", "max_stars_repo_path": "CS303_Artifical-Intelligence/NCS/OLMP/sparsity_lenet300100.py", "max_stars_repo_name": "Eveneko/SUSTech-Courses", "max_stars_repo_head_hexsha": "0420873110e91e8d13e6e85a974f1856e01d28d6", "max_sta...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import argparse import random as rand import time import numpy as np import pickle from PIL import Image, ImageDraw, ImageFilter, ImageEnhance, ImageOps, ImageFile from delaunay import delaunay from voronoi import createVoronoiFromDelaunay # # Add a prefix to a...
{"hexsha": "a1e804af7b60717342cdc1d4c76a0a9f0a5bfb4a", "size": 11365, "ext": "py", "lang": "Python", "max_stars_repo_path": "drawTriangles.py", "max_stars_repo_name": "hoojaoh/Delaunay_Triangulation", "max_stars_repo_head_hexsha": "17e65fa8793ca4d7d6d7e25b4899a08beb6499d5", "max_stars_repo_licenses": ["0BSD"], "max_sta...
import os import shutil import numpy as np import tensorflow as tf from utils import conv, fc, plot """ Run file for testing modularity-inducing regularization term in the toy example of MNIST. Much code adopted from Tensorflow's Tensorboard tutorial, available at: https://github.com/tensorflow/tensorflow/blob/r1.8...
{"hexsha": "db804935b8be7a18fe710452f3ca49d4bf0d27f2", "size": 7315, "ext": "py", "lang": "Python", "max_stars_repo_path": "modular/run.py", "max_stars_repo_name": "AI-RG/modular", "max_stars_repo_head_hexsha": "71760680297b6c346e67fb7e077a7a34e7488a7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import copy import datetime import os import random import shutil from dataclasses import dataclass from typing import Optional import numpy as np import pandas as pd import pytest import scipy import psykoda.detection import psykoda.utils from psykoda.cli import internal from psykoda.feature_extraction import Featur...
{"hexsha": "b0d9229b0d324efa185316964ac6aa0a1f4e0761", "size": 21822, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_internal.py", "max_stars_repo_name": "FujitsuResearch/psykoda", "max_stars_repo_head_hexsha": "4268b04064350f0d45a6be9e2f91ace06745d7d6", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Unit test(s) for ordering.py""" import pytest import os import shutil from collections import OrderedDict import copy import pickle import numpy as np from riddle import ordering PRECISION = 4 class TestSummary: @pytest.fixture(scope='module') def summary(self): list_feat = ['John', 'James', ...
{"hexsha": "ad90118e4c61852e5ff870f6779ee4cf4e76159c", "size": 7360, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/riddle/test_ordering.py", "max_stars_repo_name": "LaudateCorpus1/RIDDLE-1", "max_stars_repo_head_hexsha": "c8d6ad5ed1f2c94b947cc30ff9e63fe4a8ff32bd", "max_stars_repo_licenses": ["Apache-2.0"...
import numpy as np import pandas as pd import re ### preformatting class text_clean(): def __init__(self,sentence): self.my_sentence = sentence def clean_words(self): my_sentence = self.my_sentence my_sentence=my_sentence.lower() rep = { "fell down": "loss_of...
{"hexsha": "29aa3a13b7a77ed74d8c6ecea3bbbb38aac81586", "size": 5412, "ext": "py", "lang": "Python", "max_stars_repo_path": "webdev/audio/python_codes/clean_up.py", "max_stars_repo_name": "adikr24/Django_web_development", "max_stars_repo_head_hexsha": "16b10b3547c2e40cc4039b754afe4f9addd9136c", "max_stars_repo_licenses"...
using LichessBot using Test @time begin include("eval.jl") include("netcode.jl") # Write your tests here. end
{"hexsha": "aff26d4997495d055693743cc8f9262ed3c9dea5", "size": 123, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "dave7895/LichessBot", "max_stars_repo_head_hexsha": "72820b0f1ddc1407abce52ded27b104cd367a32e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file df=pd.read_csv(path) # Code starts here X=df.drop(['customerID','Churn'],axis=1) y=df.Churn X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.3,random_state = 0) # -------------- import n...
{"hexsha": "8871c4229e06e5cc36eace9d1f668d789870f703", "size": 3102, "ext": "py", "lang": "Python", "max_stars_repo_path": "boosting-project/code.py", "max_stars_repo_name": "rkkirpane/Best-Projects-ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "b9d52a29eff734696ae269cafc8407d2121b40b0", "max_stars_repo_licenses...
// // Copyright 2007-2012 Christian Henning, Andreas Pokorny, Lubomir Bourdev // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #ifndef BOOST_GIL_IO_READ_AND_CONVERT_VIEW_HPP #define BOOST_GIL_IO_READ_AND_CONVER...
{"hexsha": "f0ce942a5ac557ecdc6a048ef85e562cc3629dd1", "size": 9838, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/gil/io/read_and_convert_view.hpp", "max_stars_repo_name": "sdebionne/gil-reformated", "max_stars_repo_head_hexsha": "7065d600d7f84d9ef2ed4df9862c596ff7e8a8c2", "max_stars_repo_licenses...
/* This program is free software; you can redistribute it and/or modify it under the terms of the European Union Public Licence - EUPL v.1.1 as published by the European Commission. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
{"hexsha": "0fa1c0d6898ab923ca888740d2d9e5693218642a", "size": 2823, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sta-src/Services/serviceAngleRateUnit.cpp", "max_stars_repo_name": "hoehnp/SpaceDesignTool", "max_stars_repo_head_hexsha": "9abd34048274b2ce9dbbb685124177b02d6a34ca", "max_stars_repo_licenses": ["IJ...
import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from rpyopencl import RPyOpenCLCluster import json import numpy as np from decorators import timer # Globals to simplify sample tuning object_type = np.float32 size = 50000 kernel_name = "sum_mul" a_np = np.random....
{"hexsha": "1f864e0f9c65d1477fe77fc5656a5d99752bbd79", "size": 3037, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/app_sync_node.py", "max_stars_repo_name": "shazz/DistributedOpenCL", "max_stars_repo_head_hexsha": "ddfac3ea1be84b13539e7ac07f3ef7811bbd81b6", "max_stars_repo_licenses": ["MIT"], "max_star...
import data.nat.basic import data.int.parity import tactic open int /-lifted from tutorial project. I think there's potential to explain and develop these lemmas and parity in detail, but it could make the tutorial pretty long-/ def odd (n : ℤ) : Prop := ∃ k, n = 2*k + 1 #check int.not_even_iff theorem not_even_i...
{"author": "iceplant", "repo": "mathcamp-tutorials", "sha": "481db142430e47f892e8f984aa08eecfb3167bb5", "save_path": "github-repos/lean/iceplant-mathcamp-tutorials", "path": "github-repos/lean/iceplant-mathcamp-tutorials/mathcamp-tutorials-481db142430e47f892e8f984aa08eecfb3167bb5/root_2_irrational.lean"}
import numpy as np from tinyml import LinearRegression as lr from tinyml import LogisticRegression as lo from sklearn import datasets # Linear Regression X,y = datasets.make_regression(n_features=1,n_informative=1, noise=20, random_state=1) table=np.column_stack((X,y)) p = lr.LinearRegression(table,reg=True,lamda=10)...
{"hexsha": "115eca7593d7f11e50d97382263a7ef95062fb40", "size": 680, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples.py", "max_stars_repo_name": "parasdahal/tinyml", "max_stars_repo_head_hexsha": "cf2fcc021ae65df19d420e3142e4a38d20ca87e0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "max_s...
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Description # ============================================================================== # # Functions to parse the table cells in text back-end. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # "...
{"hexsha": "129dabcee8fbfdc7c8e3c6152d8c607fc501c61b", "size": 5361, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/backends/text/cell_parse.jl", "max_stars_repo_name": "aminnj/PrettyTables.jl", "max_stars_repo_head_hexsha": "904265922ec6ef34600027120d6cefe18f10ba30", "max_stars_repo_licenses": ["MIT"], "max...
import os import cv2 import numpy as np from flask import Flask, render_template, request, jsonify, redirect, url_for from werkzeug.utils import secure_filename from pyimagesearch.colordescriptor import ColorDescriptor from pyimagesearch.searcher import Searcher # create flask instance app = Flask(__name__) IN...
{"hexsha": "b43ff9d86c9dfb76dc8b0ec6b1865c71f546e3ad", "size": 2221, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/app.py", "max_stars_repo_name": "SaraLatif99/image-search-engine", "max_stars_repo_head_hexsha": "50e9fd106d4f56d49afd5367a15b9810117dc510", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# BioCore.jl # ========== # # Core types and methods common to many packages in the BioJulia ecosystem. # # This file is a part of BioJulia. # License is MIT: https://github.com/BioJulia/BioCore.jl/blob/master/LICENSE.md __precompile__() module BioCore include("declare.jl") include("Exceptions.jl") include("IO.jl") ...
{"hexsha": "535896078c021012dd23f8866583f09aedf1a7fc", "size": 483, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BioCore.jl", "max_stars_repo_name": "BenJWard/BioCore.jl", "max_stars_repo_head_hexsha": "23e7669aa854cd59e7e37ae04526d4a079d0c053", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
from pydec.testing import * from scipy import fabs, random, rand, array, sqrt from pydec.math.volume import unsigned_volume, signed_volume def test_unsigned_volume(): cases = [] cases.append((array([[1]]), 1)) cases.append((array([[1],[10]]), 9)) cases.append((array([[0,0],[1,1]]), sqrt(2))) ca...
{"hexsha": "3beebd630dcf63f4916f2e25f392eab87110d88a", "size": 1417, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydec/math/tests/test_volume.py", "max_stars_repo_name": "michaels10/pydec", "max_stars_repo_head_hexsha": "738c3d9cf1cedc95a61be63fae36073e038d08bc", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2020 MBI-Division-B # MIT License, refer to LICENSE file # Author: Luca Barbera / Email: barbera@mbi-berlin.de from tango import AttrWriteType, DevState, DebugIt from tango.server import Device, attribute, command, device_property from random import ran...
{"hexsha": "9ba73ae66a82534d532c19913b89431c92056372", "size": 2806, "ext": "py", "lang": "Python", "max_stars_repo_path": "DummyTDS.py", "max_stars_repo_name": "lucabar/taurusGUI-motor_control", "max_stars_repo_head_hexsha": "95fd384fa8ad42e1be14fb193396bf28d69e0a22", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
""" Test the subcommand scripts """ import os from os import path import unittest import logging import csv import sys import json import copy from numpy import std, average,ceil from operator import itemgetter from itertools import groupby from msings.subcommands import analyzer from msings.subcommands import count...
{"hexsha": "530ac009a5b02c551ff395ca1e1223df87ae4426", "size": 9934, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_subcommands.py", "max_stars_repo_name": "sheenamt/msings", "max_stars_repo_head_hexsha": "7510b3f0e5a72a6774b5e81d6e3305d299320e74", "max_stars_repo_licenses": ["AFL-1.1"], "max_stars_c...
from scipy.spatial import distance import numpy as np class VBM: def __init__(self, actual_high, actual_low): self.actual_high = actual_high self.actual_low = actual_low def scipy_distance(self, vector1, vector2, dist='euclidean'): if dist == 'euclidean': return di...
{"hexsha": "c127b9ba37e36fb2c962bb742fb69c82471fa61e", "size": 2661, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/api_v1/estimate/vbm.py", "max_stars_repo_name": "yasirabd/api-diagnostic", "max_stars_repo_head_hexsha": "2a08b1bd7d01c5922a6438cbf99b512e865653a8", "max_stars_repo_licenses": ["MIT"], "max_st...
* * $Id$ * subroutine integrate_kbppv3e_ray(version,rlocal, > nrho,drho,lmax,locp,nmax, > n_extra,n_expansion,zv, > vp,wp,rho,f,cs,sn, > nray,G_ray,vl_ray,vnl_ray, > ...
{"hexsha": "e93087e9ffe3e852c3e7d374cd13f8a17630aad8", "size": 8222, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/nwpw/pspw/kbpp/integrate_kbppv3e_ray.f", "max_stars_repo_name": "dinisAbranches/nwchem", "max_stars_repo_head_hexsha": "21cb07ff634475600ab687882652b823cad8c0cd", "max_stars_repo_licenses": ["...
# 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": "f4545d406901cec30fb30162ccfdd4182e7c97dc", "size": 5468, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/test_index_select_op.py", "max_stars_repo_name": "zhusonghe/Paddle", "max_stars_repo_head_hexsha": "9147da08e136104a7eb48c724a40732c1cda449d", "max_stars_repo_l...
""" Sep 21 -- Used to figure out how to best fit data using NRG (i.e. what fitting method of lmfit to use and to try and figure out a way to have the "zero" of NRG data line up somewhere close to an occupation of 0.5 for convenience when fitting. Found that the "powell" method was the only reliable method of fitting to...
{"hexsha": "362f2401d8a26d5db1df393e10104f1c9fceb454", "size": 5591, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/Feb2021/NRG_comparison.py", "max_stars_repo_name": "TimChild/dat_analysis", "max_stars_repo_head_hexsha": "2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73", "max_stars_repo_licenses": ["MIT"], "...
import dask.dataframe as dd import numpy as np import pandas as pd import pytest from dask.dataframe.utils import assert_eq, PANDAS_VERSION # Fixtures # ======== @pytest.fixture def df_left(): # Create frame with 10 partitions # Frame has 11 distinct idx values partition_sizes = np.array([3, 4, 2, 5, 3, ...
{"hexsha": "e6afc3158453e63ad9944e4ebdb8602bef05a0b0", "size": 5481, "ext": "py", "lang": "Python", "max_stars_repo_path": "dask/dataframe/tests/test_merge_column_and_index.py", "max_stars_repo_name": "srijan-deepsource/dask", "max_stars_repo_head_hexsha": "0673d9084e02f985f3fdf5ba6ede80e8de5ac15c", "max_stars_repo_lic...
using Quiqbox using Quiqbox.Molden mols = [ ["H", "H"], ["N", "H", "H", "H"] ] molNames = [ "H2", "NH3" ] br = 0.529177210903 # Data from CCCBDB: https://cccbdb.nist.gov molCoords = [ [[0.3705,0.0,0.0], [-0.3705,0.0,0.0]], ...
{"hexsha": "bcd5f2359197ff4c1b6144197e307a014b05c7df", "size": 1327, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/Jmol.jl", "max_stars_repo_name": "frankwswang/Quiqbox.jl", "max_stars_repo_head_hexsha": "e3c137d1017235c68db6389ff4a902e789cfa376", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from metaflow import conda_base, FlowSpec, IncludeFile, Parameter, step, S3 def plot_prc(precisions, recalls, thresholds): import matplotlib.pyplot as plt plt.plot(thresholds, precisions[:-1], "b--", label="Precision") plt.plot(thresholds, recalls[:-1], "g-", label="Recall") plt.xlabel("Thresholds") ...
{"hexsha": "6dcbd56d2986b335943afd82a697d196998896e3", "size": 6104, "ext": "py", "lang": "Python", "max_stars_repo_path": "others/weather_flow.py", "max_stars_repo_name": "rodrigobaron/mlelab", "max_stars_repo_head_hexsha": "9fab643430be1ec4706ba72769a179a6e9d192ff", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import os import sys import random import math import re import time import numpy as np import cv2 import matplotlib import matplotlib.pyplot as plt # Root directory of the project ROOT_DIR = os.path.curdir # Import Mask RCNN sys.path.append(ROOT_DIR) # To find local version of the library from mrcnn.config import C...
{"hexsha": "fd1029d30356832bd5f1942c3a7004b6c9208475", "size": 6272, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_buildings.py", "max_stars_repo_name": "chenzhaiyu/Mask_RCNN", "max_stars_repo_head_hexsha": "ed1e6c41772cbf9d6b8f6c20f10ed66cd659ce9f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import torch import os.path as osp import os from torch.utils.data import Dataset ## This claas loads the feature vector for the videos and the correspoding label. import numpy as np from torch.autograd import Variable import pdb import csv class UCF101(Dataset): def __init__(self, dataset_name, opts): se...
{"hexsha": "202b8ad212ee9ca4e4484cceb2ecb22c7ef5a1aa", "size": 10576, "ext": "py", "lang": "Python", "max_stars_repo_path": "weakly-supvervized-temp/baseline/data/ucf101.py", "max_stars_repo_name": "nileshkulkarni/vlr-project", "max_stars_repo_head_hexsha": "9393aeb5c7134662caf2951318e310692f5dfc51", "max_stars_repo_li...
# Plots a chirp signal, it's discrete fourier transform, and it's spectrogram. import numpy as np from scipy.signal import chirp import matplotlib.pyplot as plt import matplotlib.mlab as mlab time = np.linspace(0.0, 0.01, 2000) chirp = chirp(time, f0=65.0e3, f1=35.0e3, t1=0.01, method='linear') samples = len(chirp...
{"hexsha": "a7ad266b4a48bd111654291fc243ad6ad5b6c76c", "size": 1108, "ext": "py", "lang": "Python", "max_stars_repo_path": "printplots/chirpsignalplot.py", "max_stars_repo_name": "leewujung/soundrae", "max_stars_repo_head_hexsha": "34bf858e330a53930b1296ec0c4c36ee71784adf", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy as np import contextlib from collections import deque from spirl.utils.general_utils import listdict2dictlist, AttrDict, ParamDict, obj2np from spirl.modules.variational_inference import MultivariateGaussian from spirl.rl.utils.reward_fcns import sparse_threshold class Sampler: """Collects rollouts ...
{"hexsha": "7c5bb86893977616bf99379a741a3ca7f6af3003", "size": 12981, "ext": "py", "lang": "Python", "max_stars_repo_path": "spirl/rl/components/sampler.py", "max_stars_repo_name": "kouroshHakha/fist", "max_stars_repo_head_hexsha": "328c098789239fd892e17edefd799fc1957ab637", "max_stars_repo_licenses": ["BSD-3-Clause"],...
[STATEMENT] lemma list_encode_eq: "list_encode x = list_encode y \<longleftrightarrow> x = y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (list_encode x = list_encode y) = (x = y) [PROOF STEP] by (rule inj_list_encode [THEN inj_eq])
{"llama_tokens": 96, "file": null, "length": 1}
import pickle import os import numpy as np import pandas as pd from tqdm import tqdm import torch from sklearn.model_selection import StratifiedKFold from torch.utils.data import Dataset, DataLoader from Functions import * import matplotlib.pyplot as plt tokens='ACGU().BEHIMSX' #eterna,'nupack','rnastructu...
{"hexsha": "d5bd0f5857100052cdbc3ba6b49699b883be4a1e", "size": 3254, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/OpenVaccine/Dataset.py", "max_stars_repo_name": "Shujun-He/Nucleic-Transformer", "max_stars_repo_head_hexsha": "c6527132cd4c04489b28617beb0694605f320ed9", "max_stars_repo_licenses": ["MIT"], "...
import cv2 import numpy as np import pyautogui from pynput.keyboard import Key, Controller import time SCREEN_SIZE = (1920, 1200) fourcc = cv2.VideoWriter_fourcc(*"XVID") keyboard = Controller() keyboard.press(Key.up) keyboard.release(Key.up) while True: img = pyautogui.screenshot(region=(815,7...
{"hexsha": "234a46ffc3f03102021cd5bcdd1d2231951c5238", "size": 2087, "ext": "py", "lang": "Python", "max_stars_repo_path": "Dino.py", "max_stars_repo_name": "CaydendW/Dinogameplayer", "max_stars_repo_head_hexsha": "7382c157b9d4eb665e1279eba58786b2e50316cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
// Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The NIX Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "activeghostnode.h" #include "darksend.h" #include "ghostnode-pa...
{"hexsha": "0e2568426c5256c0115aa4c4dafe3186025a6b57", "size": 33081, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/ghostnode/ghostnode-payments.cpp", "max_stars_repo_name": "nzsquirrell/NixCore", "max_stars_repo_head_hexsha": "0cdc4455b4660f712abe6dc9f2777c77b371461f", "max_stars_repo_licenses": ["MIT"], "m...
// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved // Use of this source code is governed by a apache 2.0 license that can be // found in the LICENSE file. #include "common/plugins/plugin_list_parser.h" #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/split.hpp...
{"hexsha": "b0b05c28202cb889d31f839a4048edcc5fb9816f", "size": 6025, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/common/plugins/plugin_list_parser.cc", "max_stars_repo_name": "tizenorg/platform.core.appfw.app-installers", "max_stars_repo_head_hexsha": "54b7b4972c3ab9775856756a5d97220ef344f7e5", "max_stars_r...
subroutine z_turclo(j ,nmmaxj ,nmmax ,kmax ,ltur , & & icx ,icy ,tkemod , & & kcs ,kfu ,kfv ,kfs ,kfuz1 , & & kfvz1 ,kfsz1 ,kfumin ,kfumax ,kfvmin , & & kfvmax ...
{"hexsha": "1ff1cc5d5e6595e55b4c8fe31976b58f14c21a4d", "size": 30508, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/flow2d3d/packages/kernel/src/compute/z_turclo.f90", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad4353...
from PIL import Image from numpy import asarray from mtcnn.mtcnn import MTCNN def extract_single_face_facenet(file, size=(160,160)): # extract single face from given image image = Image.open(file) # convert to RGB if required image = image.convert('RGB') # convert to numpp array pixel_array = a...
{"hexsha": "b2197ae017a372cbd60c668b226cebb0153c60f9", "size": 780, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/extract_faces.py", "max_stars_repo_name": "Lekose/FaceNet_Veneto", "max_stars_repo_head_hexsha": "f10ea417104b50a2b14140ec35fb3e7b22129100", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
C @(#)kmpvltdif.f 20.3 2/13/96 C**************************************************************** C C File: kmpvltdif.f C C Purpose: Routine to compares kdiff(p) with kdiff(q) c c "key" denotes the interpretation of kdiff(*,*) c 1 = interpret as bus indices. c 2 = interpret ...
{"hexsha": "52fbcbfed8ca9d487c0473a7a7ab4d3a75f00cbc", "size": 5286, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/kmpvltdif.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14...
# pass_args.py import numpy as np import _scalar_args print _scalar_args.scalar_args.__doc__ # these are simple python scalars. int_in = 1.0 real_in = 10.0 # since these are intent(inout) variables, these must be arrays int_inout = np.zeros((1,), dtype = np.int32) real_inout = np.zeros((1,), dtype = np.float32) # a...
{"hexsha": "bee2c4a8faf69adba93155e647aa317dd3a13d71", "size": 605, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/f2py/pass_args.py", "max_stars_repo_name": "kbroman/UW-Madison-swc-boot-camps", "max_stars_repo_head_hexsha": "a1c4b98c74afc06dfc34d64b066c4e5ffebb5aba", "max_stars_repo_licenses": ["CC-BY-3...
[STATEMENT] lemma zero_less_Limit: "Limit \<beta> \<Longrightarrow> 0 < \<beta>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Limit \<beta> \<Longrightarrow> 0 < \<beta> [PROOF STEP] by (simp add: Limit_def OrdmemD)
{"llama_tokens": 86, "file": "ZFC_in_HOL_ZFC_in_HOL", "length": 1}
-- Inverso_del_inverso_en_grupos.lean -- Inverso del inverso en grupos -- José A. Alonso Jiménez -- Sevilla, 7 de julio de 2021 -- --------------------------------------------------------------------- -- --------------------------------------------------------------------- -- Sea G un grupo y a ∈ G. Demostrar que -- ...
{"author": "jaalonso", "repo": "Calculemus", "sha": "0fb664ab298c0e90b4b8034729a2cdad20503e18", "save_path": "github-repos/lean/jaalonso-Calculemus", "path": "github-repos/lean/jaalonso-Calculemus/Calculemus-0fb664ab298c0e90b4b8034729a2cdad20503e18/src/Inverso_del_inverso_en_grupos.lean"}
This editor can edit this entry and tell us a bit about themselves by clicking the Edit icon. 20080905 14:48:13 nbsp Welcome to the Wiki Howdy, Ms. or Mr. 139, and Welcome to the Wiki! You might want to check out the importance of using your RealName, just so we can get to know you (or not: its your choice, but peo...
{"hexsha": "c5d65f81d0147f1cf5b5eb47d067536f9df3389c", "size": 738, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/ces139.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
// test_thread_clock.cpp ----------------------------------------------------------// // Copyright 2009 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #include <boost/chrono/thread_clock.hpp> #include <boost/type_trait...
{"hexsha": "822723853bc010d1461eeb97a54a7e0c5e126b07", "size": 1191, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/chrono/example/test_thread_clock.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64e188fe871f4...
Require Import Coq.Strings.String Coq.Lists.List. Require Export Fiat.Common.Coq__8_4__8_5__Compat. Set Implicit Arguments. Local Open Scope list_scope. Local Open Scope string_scope. Fixpoint list_of_string (s : string) : list Ascii.ascii := match s with | "" => nil | String ch s' => ch :: list_of_s...
{"author": "mit-plv", "repo": "fiat", "sha": "4c78284c3a88db32051bdba79202f40c645ffb7f", "save_path": "github-repos/coq/mit-plv-fiat", "path": "github-repos/coq/mit-plv-fiat/fiat-4c78284c3a88db32051bdba79202f40c645ffb7f/src/Common/StringOperations.v"}
# -*- coding: utf-8 -*- """TimeDelayingRidge class.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # Ross Maddox <ross.maddox@rochester.edu> # # License: BSD (3-clause) import numpy as np from .base import BaseEstimator from ..cuda import _setup_cuda_fft_multiply_repeated from ..filter import next_fast_...
{"hexsha": "16af02c6a2f8324ca8da8855c3d58efd16d45223", "size": 13497, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/decoding/time_delaying_ridge.py", "max_stars_repo_name": "LukeTheHecker/mne-python", "max_stars_repo_head_hexsha": "7d508e4fded73b5beb73564e4a01169530e058a8", "max_stars_repo_licenses": ["BSD...
//---------------------------------------------------------------------------// // Copyright (c) 2018-2021 Mikhail Komarov <nemo@nil.foundation> // Copyright (c) 2020-2021 Nikita Kaskov <nbering@nil.foundation> // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of th...
{"hexsha": "d1ca81c72d803644b4ed42c6ad9abfc3a7aa8e96", "size": 144822, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/marshalling/core/test/types.cpp", "max_stars_repo_name": "Curryrasul/knapsack-snark", "max_stars_repo_head_hexsha": "633515a13906407338a81b9874d964869ddec624", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python # coding: utf-8 # Supplementary codes for: # #Potential severity and control of Omicron waves depending on pre-existing immunity and immune evasion # # Ferenc A. Bartha, Péter Boldog, Tamás Tekeli, Zsolt Vizi, Attila Dénes and Gergely Röst # # # # --- # In[ ]: use_colab = False if use_colab...
{"hexsha": "17544ab55562f67792f2a3e2a6b457fbac0dc0f3", "size": 36434, "ext": "py", "lang": "Python", "max_stars_repo_path": "omicron_waves.py", "max_stars_repo_name": "epidelay/covid-19-omicron-waves", "max_stars_repo_head_hexsha": "e4d2d4dd4a4089d1cc808b3e5723a773d8ccf4d3", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Mon Dec 28 18:41:27 2020 @author: Administrator """ import cv2 import paddlehub as hub import os import CVTools import time import numpy as np from tqdm import tqdm from tqdm._tqdm import trange os.environ['CUDA_VISIBLE_DEVICES'] = '0' def filesInFolder(roo...
{"hexsha": "1706f4089ab4a42a671decbb2fc51d3f7bfe4b84", "size": 4016, "ext": "py", "lang": "Python", "max_stars_repo_path": "cartonModule.py", "max_stars_repo_name": "kevinfu1717/multimediaChatbot", "max_stars_repo_head_hexsha": "2fb8a38b99c04f1e26104d6ae7784b6f655f5a26", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import numpy as np class GeneticOperations: """ GeneticOperations implements crossover and two types of mutation """ @staticmethod def simpleCrossover(pro1, pro2): """ Two point crossover """ fracStart1 = np.random.randint(len(pro1.seq)) fracEnd1 = fracStart1 + np.random.r...
{"hexsha": "f2205b921c627a4c3c4911b5bb38f754f095b244", "size": 5825, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_genetic_programming/_genetic_operations.py", "max_stars_repo_name": "ChengyuanSha/linear_genetic_programming", "max_stars_repo_head_hexsha": "0185cc51ad0e7d732a6dc6b40d35674d03cd086c", "max...