text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
/* * Copyright (C) 2021 FISCO BCOS. * SPDX-License-Identifier: Apache-2.0 * 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 * * Unl...
{"hexsha": "6bc8722fc3f6ce13670cf49595b3820fa8cd5931", "size": 3218, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "bcos-executor/src/vm/VMFactory.cpp", "max_stars_repo_name": "contropist/FISCO-BCOS", "max_stars_repo_head_hexsha": "1605c371448b410674559bb1c9e98bab722f036b", "max_stars_repo_licenses": ["Apache-2.0...
# -*- coding: utf-8 -*- """ Created on Thu Mar 29 14:08:21 2018 @author: tih """ def run(input_nc, Inflow_Text_Files): ''' This functions add inflow to the runoff dataset before the channel routing. The inflow must be a text file with a certain format. The first line of this format are the latitude and lo...
{"hexsha": "0af20e8c3d82510abf1d06ff99f00a6c2fc81aaf", "size": 2195, "ext": "py", "lang": "Python", "max_stars_repo_path": "Models/SurfWAT/Part0_Add_Inlets.py", "max_stars_repo_name": "ali1100/wa", "max_stars_repo_head_hexsha": "700e5014533c45f38a245c3abdeacc537cb307bc", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np try: from .pkg import rolex from .parse_datetime import any2datetime except: # pragma: no cover from convert2.pkg.rolex import rolex from convert2.parse_datetime import any2datetime class Anything2Date(object): """Parse anything to...
{"hexsha": "dc0ec26e3f08d9c8ca2c1b0207e0ebc25e4301cf", "size": 1543, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert2/parse_date.py", "max_stars_repo_name": "MacHu-GWU/convert2-project", "max_stars_repo_head_hexsha": "aad1837676b3702aa22f53f6462beb8c5c17d4e1", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # coding: utf-8 """ Author: Arnaud Ferré Mail: arnaud.ferre.pro@gmail.com Description: Training module for C-Norm method 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 cop...
{"hexsha": "804df5e345a19fbd0e940f19119eaec2491a4aeb", "size": 13136, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "ArnaudFerre/C-Norm_PostLab", "max_stars_repo_head_hexsha": "edb9462a32b3e47b38bfd62836427d3a90f510ab", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# Implementation of the Douglas-Peucker algorithm for line thinning # http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm simplify_rec <- function(points, tol = 0.01) { n <- nrow(points) if (n <= 2) return() # c(1, n)) dist <- with(points, point_line_dist(x, y, x[1], y[1], x[n], y[n])) if (max(dist,...
{"hexsha": "edbf20b3138c8f8fc93ddb53695948b70d8deb6c", "size": 1431, "ext": "r", "lang": "R", "max_stars_repo_path": "data/r/4d3b204f419e13c711e427f1e3aae40b_thin.r", "max_stars_repo_name": "maxim5/code-inspector", "max_stars_repo_head_hexsha": "14812dfbc7bac1d76c4d9e5be2cdf83fc1c391a1", "max_stars_repo_licenses": ["Ap...
SUBROUTINE ADDEND( SPDBSP, LASCEN, SAMPLE, ENDRAD, & CVECT, PERPVE, PERPVN, & ATMAX, ATNO, ATXYZ, ATVDW, CUTSIZE) IMPLICIT NONE C ******************************************************************** C * ...
{"hexsha": "4e8d9c86cbbc3598e0ea05e9a27769b32a3bea9b", "size": 4961, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/addend.f", "max_stars_repo_name": "MDAnalysis/hole2", "max_stars_repo_head_hexsha": "ed28b2ac0dfc714933ddf2befe0a06ed87ede98e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 15...
#!python import os from os.path import join import sys import click import json import csv from tqdm import tqdm import hashlib from glob import glob import cv2 as cv import imutils import faiss import pickle import numpy as np import pandas as pd import sqlite3 import time import csv # TODO change to relative sys.pat...
{"hexsha": "4848c7fbf4c2a028685944d476191cc3865325ca", "size": 7146, "ext": "py", "lang": "Python", "max_stars_repo_path": "vframe/vframe/tools/faiss/train_ah.py", "max_stars_repo_name": "kant/vframe", "max_stars_repo_head_hexsha": "28e49ca62d9036a78a25b26eb0fb7e3cf8c79031", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np from dedalus import public as de from pySDC.core.Problem import ptype from pySDC.core.Errors import ParameterError from pySDC.implementations.datatype_classes.mesh import mesh, imex_mesh class dynamogp_2d_dedalus(ptype): """ """ def __init__(self, problem_params, dtype_u=mesh, dtype_...
{"hexsha": "099ba8af28bddede6fdfec5fee7cdaee9ca9c4bb", "size": 6224, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySDC/playgrounds/deprecated/Dedalus/DynamoGP_2D_Dedalus_NEW.py", "max_stars_repo_name": "brownbaerchen/pySDC", "max_stars_repo_head_hexsha": "31293859d731646aa09cef4345669eac65501550", "max_stars...
theory nat_pow_le_factorial imports Main "$HIPSTER_HOME/IsaHipster" begin datatype Nat = Z | S "Nat" fun plus :: "Nat => Nat => Nat" where "plus (Z) y = y" | "plus (S n) y = S (plus n y)" fun mult :: "Nat => Nat => Nat" where "mult (Z) y = Z" | "mult (S n) y = plus y (mult n y)" fun pow :: "Nat => Nat => Na...
{"author": "moajohansson", "repo": "IsaHipster", "sha": "91f6ea3f1166a9de547722ece6445fe843ad89b4", "save_path": "github-repos/isabelle/moajohansson-IsaHipster", "path": "github-repos/isabelle/moajohansson-IsaHipster/IsaHipster-91f6ea3f1166a9de547722ece6445fe843ad89b4/benchmark/tip2015/nat_pow_le_factorial.thy"}
""" .. currentmodule: arim.geometry Utilities for geometric operations: translation, rotation, change of basis, etc. Points ====== A :class:`Points` object contains the Cartesian coordinates of one or more points. The points can be stored as a ndarray. However ray tracing and many parts of arim expects as input an 1...
{"hexsha": "f4e662c29f5a389c03705061d5ae23080eb8a010", "size": 41425, "ext": "py", "lang": "Python", "max_stars_repo_path": "arim/geometry.py", "max_stars_repo_name": "will-jj/arim", "max_stars_repo_head_hexsha": "fc15efe171a41355090123fcea10406ee75efe31", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "max...
import argparse import os import torch import numpy as np import torch import random def set_deterministic(seed): # seed by default is None if seed is not None: print(f"Deterministic with seed = {seed}") random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) ...
{"hexsha": "35ff1d403d5b16d2b9d9aa10621be2c87764b34e", "size": 3598, "ext": "py", "lang": "Python", "max_stars_repo_path": "configs/__init__.py", "max_stars_repo_name": "rjean/SimSiam", "max_stars_repo_head_hexsha": "d754dc0b5adf408c57cc23f4eb207276d559b3c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
(* * Unique.v * Wolf Honore * * Defines an interface for a generator of unique values. *) Require Import Le. Require Import List. Require Import Max. Module Type UNIQUE. Parameter t : Set. Parameter init : list t. Parameter new : list t -> list t * t. Parameter eq : forall (u1 u2 : t), {u1 = u2} + {u1 ...
{"author": "whonore", "repo": "CerTiger", "sha": "b99908ce11a2e8095d7f33353cb69f8b0d6315b8", "save_path": "github-repos/coq/whonore-CerTiger", "path": "github-repos/coq/whonore-CerTiger/CerTiger-b99908ce11a2e8095d7f33353cb69f8b0d6315b8/util/Unique.v"}
#!/usr/bin/env python3 import numpy as np import cv2 import sys import rospkg from sensor_msgs.msg import Image from cv_bridge import CvBridge import rospy def lane_callback(msg): #print(msg) br = CvBridge() current_frame = br.imgmsg_to_cv2(msg) cv2.imshow("test", current_frame) def main(): print...
{"hexsha": "36cddcb49a5c6fda84343ff9686a3107342e6f50", "size": 565, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/binocular_p3/src/basic_python3.py", "max_stars_repo_name": "PatWatson/Queens-Autonomous-Taxi-2021-Capstone", "max_stars_repo_head_hexsha": "2706927e9c98c3ddddf7f5f03301d178a827e147", "max_stars...
""" Copyright (c) 2019 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.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
{"hexsha": "60d4b5d9cb66efb7bc8cff3526fa055767263c00", "size": 26829, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/accuracy_checker/accuracy_checker/adapters/detection.py", "max_stars_repo_name": "allnes/open_model_zoo", "max_stars_repo_head_hexsha": "693ba31b3b7671f5fb8ecf8f9b8d670cfec21bc3", "max_star...
// Copyright Gavin Band 2008 - 2012. // 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 COMPONENTS_RELATEDNESS_COMPONENT_PCA_COMPUTER_HPP #define COMPONENTS_RELATEDNESS_COMPONENT_PCA_C...
{"hexsha": "610e3270b49511fb1c1921350829cbac56e293ce", "size": 3564, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "components/RelatednessComponent/include/components/RelatednessComponent/PCAComputer.hpp", "max_stars_repo_name": "CreRecombinase/qctool", "max_stars_repo_head_hexsha": "6dad3a15c461177bf6940ba7b9913...
from lltk.imports import * def newpolyfit(X,Y): newdf=pd.DataFrame({'X':X, 'Y':Y}) results = smf.ols('Y ~ X + I(X**2)', data=newdf).fit() return results.rsquared, results.f_pvalue def regressions(df,resultdf=None): word2rp={} RRs=[] Ps=[] for word in df.index: Y=list(df.loc[word]) ...
{"hexsha": "9da686ffba36749208eee6345e1a9c029a79e890", "size": 7999, "ext": "py", "lang": "Python", "max_stars_repo_path": "lltk/tools/stats.py", "max_stars_repo_name": "literarylab/lltk", "max_stars_repo_head_hexsha": "0e516d7fa0978c1a3bd2cb7636f0089772e515ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5,...
import unittest class PackagesTestCase(unittest.TestCase): def test_pygame_installation(self): try: import pygame pygame.init() pygame.display.set_mode((500, 400), 0, 32) pygame.quit() except ModuleNotFoundError: self.fail("PyGame is not ...
{"hexsha": "41766b2c008b581ca2b4f9c6701ceba7102bd822", "size": 569, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/environment_test.py", "max_stars_repo_name": "jfajkowski/PyCheckers", "max_stars_repo_head_hexsha": "2747ec645fe78bbaa9306987cfad0117b366dcc1", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os import timeit import numpy as np import argparse from psyneulink import * from double_dqn import DoubleDQNAgent from gym_forager.envs.forager_env import ForagerEnv parser = argparse.ArgumentParser() parser.add_argument("--seed", type=int, default=int.from_bytes(os.urandom(4), byteorder="big"), ...
{"hexsha": "0eb89fb2ed7109fa04aeb17f2e138fc497fa7bc6", "size": 21477, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Debug/predator_prey_opt/predator_prey_dmt.py", "max_stars_repo_name": "MetaCell/PsyNeuLink", "max_stars_repo_head_hexsha": "aeddf3e8ea62504a5d928b100b59aa18e593156c", "max_stars_repo_lice...
# -*- coding: utf-8 -*- """ Module to implement acoustic shadowing along with spherical spreading of sound Created on Mon Jun 17 16:08:50 2019 @author: tbeleyur """ import time import sys sys.path.append('..//bridson//') sys.path.append('..//') import numpy as np import pandas as pd import scipy.spatial as spatial ...
{"hexsha": "bde9076396af94c726fc4471c10686e14a136a25", "size": 15041, "ext": "py", "lang": "Python", "max_stars_repo_path": "acoustics/detailed_sound_propagation.py", "max_stars_repo_name": "thejasvibr/the_cocktail_party_nightmare", "max_stars_repo_head_hexsha": "385bd4c6d1b8bfc7079b3ba68a0fc3ce79cec3f6", "max_stars_re...
c********************************************************* c c Test program for subroutine ABLE77V2 c c********************************************************* c INCLUDE 'VICMAIN_FOR' SUBROUTINE MAIN44 c INTEGER IND, ARR(50), UNIT, NUM(3) DATA NUM /39,6,22/ CHARACTER*132 MSG c ...
{"hexsha": "ebc7015d3884beb580ad726ad0b93dcc035fba12", "size": 4068, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/sub/able77v2/test/table77v2.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Claus...
# hack until we figure out how to detect automatically if Sys.iswindows() const libniscope = "C:/Program Files/IVI Foundation/IVI/Bin/niScope_64" const libnidmm = "C:/Program Files/IVI Foundation/IVI/Bin/nidmm_64" const libnifgen = "C:/Program Files/IVI Foundation/IVI/Bin/niFgen_64" const libnihsdio = "C:/Progra...
{"hexsha": "9986d2e8160a14448022667c8573731b0f086fd8", "size": 1012, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/lib_locations.jl", "max_stars_repo_name": "iuliancioarca/GenericInstruments.jl", "max_stars_repo_head_hexsha": "93d411d026b8fad36c46a8e99206b2d788176f8f", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/python import csv import time import json import talib import requests import numpy as np import pandas as pd from datetime import datetime, date, timedelta, timezone from backtesting import Backtest from backtesting import Strategy from backtesting.lib import crossover from sklearn.pipeline import Pipeline ...
{"hexsha": "7baec853bf26e394a40c3621490078738595c920", "size": 5972, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "yuyasugano/ml-classifier-Ta-Lib-ohlc", "max_stars_repo_head_hexsha": "02f4b24bc2b80f962dca49e6469f45ee0cb6d37d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from common.utils import AverageMeter, split_states, generate_eom, gen_loader from common.model import DeLaN, init_weights from common.obj import Visualizer ...
{"hexsha": "f2f309ef7680b1c9f9e8474942484fa9ec27d670", "size": 3905, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "xth430/DeepLagrangian", "max_stars_repo_head_hexsha": "acec4cc4429b6d08e9f7b8caadea9a2750837598", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import os import sys # Add /Modules to sys path so that program has access to the files in the Modules folder sys.path.append(os.getcwd() + '/Modules') import time import mysql.connector import numpy as np import pandas as pd import json from datetime import datetime import os.path import csv from DepartureDelay imp...
{"hexsha": "ba06601ca826bba0b50ebaed269dab8f7fc16406", "size": 24799, "ext": "py", "lang": "Python", "max_stars_repo_path": "CronJob/cron_job.py", "max_stars_repo_name": "md3997/FYP", "max_stars_repo_head_hexsha": "428a54714255dcd4cfd222cd4e3f8b28285c8b6f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
module TestCount using Test using LazyGroupBy @testset begin @test count.(_ -> true, grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) == Dict(false => 3, true => 7) @test count.(grouped(identity, [true, false, true, true, true])) == Dict(false => 0, true => 4) @test_throws( Exce...
{"hexsha": "88db30ff12ddae142829ec1edc3d96183f606512", "size": 426, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_count.jl", "max_stars_repo_name": "JuliaFolds/LazyGroupBy.jl", "max_stars_repo_head_hexsha": "293c338d6a1efc4d17453bf85eb3addf7fa90194", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[GOAL] E : Type u_1 inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace ℝ E F : Type u_2 inst✝¹ : NormedAddCommGroup F inst✝ : NormedSpace ℝ F f : E → F s : Set E x : E f' : E →L[ℝ] F f_diff : DifferentiableOn ℝ f s s_conv : Convex ℝ s s_open : IsOpen s f_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y h : Te...
{"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Extend", "llama_tokens": 51779}
#!/usr/bin/env python # -*- coding: utf-8 -*- # this file is from https://github.com/ucbdrive/dla/blob/master/dla.py. import math from os.path import join import numpy as np import torch from torch import nn import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import fvcore.nn.weight_init as wei...
{"hexsha": "2a33c66bf3d5b97bf882eaf0b80de012151a62b4", "size": 17423, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/CenterNet2/centernet/modeling/backbone/dlafpn.py", "max_stars_repo_name": "collector-m/CenterNet2", "max_stars_repo_head_hexsha": "68c0a468254b013e1d08309cd7a506756120ca62", "max_stars_r...
import argparse import numpy as np import torch from torch import nn from torch.autograd import Function # https://zhuanlan.zhihu.com/p/359524837 class AddModelFunction(Function): @staticmethod def forward(ctx, a, b, n): c = torch.empty(n).to(device="cuda:0") if args.compiler == 'jit': ...
{"hexsha": "e25ba968602b69de0dd0db4c2b6660b1c9086220", "size": 2459, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/train.py", "max_stars_repo_name": "yuanzhedong/NN-CUDA-Example", "max_stars_repo_head_hexsha": "15f37a07591d29459abc290173e95aa9918615be", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Badlands surface processes modelling application. ## ## ...
{"hexsha": "16ebd6945c0d1a323ed381040dffe53e61f28f9a", "size": 3373, "ext": "py", "lang": "Python", "max_stars_repo_path": "badlands/badlands/forcing/pelagicGrowth.py", "max_stars_repo_name": "intelligentEarth/surrogateBayeslands", "max_stars_repo_head_hexsha": "24462cafed05ac0c377865d8fe039cafa0aa59d4", "max_stars_rep...
[STATEMENT] lemma bc_mt_corresp_IAdd: " bc_mt_corresp [IAdd] (replST 2 (PrimT Integer)) (PrimT Integer # PrimT Integer # ST, LT) cG rT mxr (Suc 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bc_mt_corresp [IAdd] (replST 2 (PrimT Integer)) (PrimT Integer # PrimT Integer # ST, LT) cG rT mxr (Suc 0) [PR...
{"llama_tokens": 1014, "file": null, "length": 7}
#include "c8-sq-lite/SelectResult.hpp" #include <boost/format.hpp> #include <gmock/gmock.h> #include <stdexcept> namespace C8::SqLite { using namespace testing; class SelectResultTestSuite : public Test { public: void SetUp() override { sut.addColumn("id", 0); sut.addColumn("name", 1); sut...
{"hexsha": "5dbd9f19ffb46e082f92586c7647de9f81c4189a", "size": 1539, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/c8-sq-lite/SelectResultTestSuite.cpp", "max_stars_repo_name": "chaos0x8/cpp-c8", "max_stars_repo_head_hexsha": "f64004e59339a5e3e066128aa75e6a090449b644", "max_stars_repo_licenses": ["MIT"], "m...
#! /usr/bin/env python3 ########################################################### # The example shows how to get mapping data # # The peak ratio at 1315 cm^-1 and 1380 cm^-1 are plotted # # Details see Small 14, 1804006 (2018). # #######################################################...
{"hexsha": "8a70aebddaee853d32090cf748aea94d45f0b9c8", "size": 2391, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex5_mapping.py", "max_stars_repo_name": "lovaulonze/py-wdf-reader", "max_stars_repo_head_hexsha": "f9632eaf35fe51634bdce71dc0a6937e1454707f", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import numpy as np import pandas as pd import requests from epw import epw from datetime import datetime import calendar def download_epw(lat, lon, year, location, attributes, interval, utc, your_name, api_key, reason_for_use, your_affiliation, your_email, mailing_list, leap_year): cu...
{"hexsha": "0ec8999d3574ec862b49c1d6739f4af7dea1db4f", "size": 11887, "ext": "py", "lang": "Python", "max_stars_repo_path": "assets.py", "max_stars_repo_name": "kastnerp/NREL-PSB3-2-EPW", "max_stars_repo_head_hexsha": "94a4407073f09e2718a9efe8ed24c9a78e1990f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
// // Copyright (c) 2008, 2009 Boris Schaeling <boris@highscore.de> // // 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) // #define BOOST_AUTO_TEST_MAIN #include <boost/test/auto_unit_test.hpp> #include <boost/filesys...
{"hexsha": "445ff1ebf9eb6f1a200d3e7e266455357e9b2fa4", "size": 4092, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/test_sync.cpp", "max_stars_repo_name": "Librevault/dir_monitor", "max_stars_repo_head_hexsha": "1b7220520ac3a6a543d4c63f0a5ff4a9ff113835", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_co...
# 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 # distribu...
{"hexsha": "fc423231af76b78ce392a12bcc2b8068369293a8", "size": 2364, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nisqai/encode/_plus_minus_encoding_test.py", "max_stars_repo_name": "obliviateandsurrender/nisqai-dev", "max_stars_repo_head_hexsha": "cf6c38d34acb8fe776913c69212845c547cb47a6", "max_stars_rep...
import streamlit as st import numpy as np import pandas as pd from PIL import Image import cv2 #inittalise haarcascade CascadeClassifier and read in model xml file for face detction face_cascade = cv2.CascadeClassifier('./haarcascade_frontalface_default.xml') #takes in image from streamlit fileuploader as P...
{"hexsha": "eb24a971bb41122073eb8536313f22aaa44457f6", "size": 1611, "ext": "py", "lang": "Python", "max_stars_repo_path": "harcasscade_stremlit_demo.py", "max_stars_repo_name": "poipiii/stream-lit-demo", "max_stars_repo_head_hexsha": "a8624ebf1c8e4d84911f569e8692d9d11f35cac1", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 14 15:08:56 2019 @author: riselAir """ #unit testing for peakdetect_RI.py import unittest import math import numpy as np from scipy.stats import norm from peakfunctions import second_largest, fit_gaussian_to_shifted_data, xvalues_for_continuous_cu...
{"hexsha": "9e8ccc3cf7eb2d01c6b58f43a35a09ff8824853b", "size": 2704, "ext": "py", "lang": "Python", "max_stars_repo_path": "peakdetect_testing.py", "max_stars_repo_name": "riselin/Intensity_measurement", "max_stars_repo_head_hexsha": "7edb458fe49ae3bcf30b4d025b8fb2131b99ab65", "max_stars_repo_licenses": ["MIT"], "max_s...
import random import unittest import numpy as np from skratch.datasets import load_boston from skratch.datasets import load_diabetes from skratch.bonsai import DecisionBonsaiRegressor def r2_score(y_true, y_pred): """ Very similar to the Sklearn implementation but without weights and single output. ...
{"hexsha": "e686594078f249954c62c5fb1807177019439de4", "size": 3942, "ext": "py", "lang": "Python", "max_stars_repo_path": "skratch/test/test_bonsai_regressor.py", "max_stars_repo_name": "DelgadoPanadero/Scratch-Python-Forest", "max_stars_repo_head_hexsha": "1dbeeab8a0cc5c9078dbe700ccee42c8afdcc597", "max_stars_repo_li...
#!/usr/bin/env python # Copyright (c) 2011-2019, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Xarray powered Data I/O ^^^^^^^^^^^^^^^^^^^^^^^ Reads data from netcdf-based CfRadial1, CfRadial2 and hdf5-based ODIM_H5 and other hdf5-flavours (GAMIC). Writes data to CfRadi...
{"hexsha": "fb8bdc8406fb18a18c38eb11660da1c5404d6808", "size": 65078, "ext": "py", "lang": "Python", "max_stars_repo_path": "wradlib/io/xarray.py", "max_stars_repo_name": "nschaffner/wradlib", "max_stars_repo_head_hexsha": "eaa74701464e4ca2e01c96be7d47667983b6cfd6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python import numpy as np import sys def avg_data(d_f): data = np.loadtxt(d_f) vs = [] print len(data) for i in range(len(data)): vs.append(data[i][1]) avg = np.average(vs) return avg avg = avg_data(sys.argv[1]) print avg
{"hexsha": "3fdc6986d0b17c9c10f68b3115761e69a49b5362", "size": 249, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/lipid/misc/get_avgv.py", "max_stars_repo_name": "kmckiern/scripts", "max_stars_repo_head_hexsha": "acc8326ca653d804ee06752af9e7f5b011fc6e0e", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- """ Created on Mon Dec 11 20:02:37 2017 @author: Anastasios Tzavellas """ import numpy as np import matplotlib.pyplot as plt import interpolation def f(x): return np.exp(-x) def df(x): return -np.exp(-x) def d2f(x): return f(x) def err2(x): return np.exp(-x) * (x-0.25) ...
{"hexsha": "727fd25f1c910c848caeff6621dcd4cb4b24d2b3", "size": 883, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment3/ex5.py", "max_stars_repo_name": "tzavellas/ComputationalPhysics", "max_stars_repo_head_hexsha": "7dd95d1a55faa4d467b9a96c7ee1933e88652370", "max_stars_repo_licenses": ["MIT"], "max_star...
import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader, Dataset, TensorDataset from sklearn.model_selection import train_test_split import numpy as np import logging from pdb import set_trace as st import os.path as osp import os import copy import wandb from fedml...
{"hexsha": "b500a9913816ffd3452097de4d0061d7dfa91b40", "size": 13275, "ext": "py", "lang": "Python", "max_stars_repo_path": "privacy_fedml/MI_attack/NN_attack.py", "max_stars_repo_name": "ziqi-zhang/FedML", "max_stars_repo_head_hexsha": "83cfc1245609c50f21d13be5f180f67576c57735", "max_stars_repo_licenses": ["Apache-2.0...
#!/usr/bin/env python """Tests for `datawrangler` package (decorate module).""" import os import datawrangler as dw import pandas as pd import numpy as np # noinspection PyTypeChecker def test_list_generalizer(): @dw.decorate.list_generalizer def f(x): return x ** 2 assert f(3) == 9 assert ...
{"hexsha": "b9f934a8376d0258765f1733a983cf48c3d49593", "size": 5147, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/wrangler/test_decorate.py", "max_stars_repo_name": "ContextLab/data-wrangler", "max_stars_repo_head_hexsha": "80cebdb1acaf0c1a2af34f56161e80d81e962ab1", "max_stars_repo_licenses": ["MIT"], "...
import importlib import logging import os import pkg_resources import sys import time import numpy as np import pandas as pd import tables import yaml def setup_logging(config, log_dir, debug, log_to_file): # Log configuration to a text file in the log dir time_str = time.strftime('%Y%m%d_%H%M%S') config...
{"hexsha": "999881516f5de581f406dd1f5006208493a9f300", "size": 7236, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctlearn/utils.py", "max_stars_repo_name": "bryankim96/deep-learning-gamma", "max_stars_repo_head_hexsha": "cac4f2d90b6536eedf95c3a07ea73d4c7a69c5b7", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
export BackwardPlanner, BackwardGreedyPlanner, BackwardAStarPlanner "Heuristic-guided best-first backward search." @kwdef mutable struct BackwardPlanner <: Planner heuristic::Heuristic = GoalCountHeuristic(:backward) g_mult::Float64 = 1.0 # Path cost multiplier h_mult::Float64 = 1.0 # Heuristic multiplier ...
{"hexsha": "e969f7f2b0e55789190b680dba96a75ffd5bb98b", "size": 4224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/planners/backward.jl", "max_stars_repo_name": "owenps/SymbolicPlanners.jl", "max_stars_repo_head_hexsha": "824dedf9a73b9ee4f4881af0c16fe8963f033e4f", "max_stars_repo_licenses": ["Apache-2.0"], ...
# (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative works of this code must retain this...
{"hexsha": "7481637669d33bf88f72b953f4d3040cc8e71d33", "size": 2490, "ext": "py", "lang": "Python", "max_stars_repo_path": "figure4/plot.py", "max_stars_repo_name": "ChriPiv/stinespring-algo-paper", "max_stars_repo_head_hexsha": "d61cf46c302c511286280e5de2b22d01284a4379", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import os import numpy as np import pandas as pd import time import ray import tensorflow.keras as keras from cerebro.backend.ray.backend import RayBackend from cerebro.storage import LocalStore from cerebro.keras import RayEstimator from cerebro.tune import RandomSearch, GridSearch, hp_choice import rand...
{"hexsha": "8e4b9f0832584870319dd94e7291d6e64132b1b3", "size": 3060, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/mnist/model_selection.py", "max_stars_repo_name": "Abhishek2304/Cerebro-System-Ray", "max_stars_repo_head_hexsha": "1e2f2ae291cd449573f87bb83fb2bda12e606b3a", "max_stars_repo_licenses": [...
# help manual of "Data input" functions ?read.table ?read.csv # read csv to frame my_data <- read.csv('evals.csv') # open data table in window View(mydata) # structure of frame str(mydata) # return vector of value's names names(mydata) # create new var in frame mydata$nvar <- 0 # amount of rows in frame nrow(myd...
{"hexsha": "4b4810f169088ee0881b6eeff57c8dfa36e5f5bd", "size": 1243, "ext": "r", "lang": "R", "max_stars_repo_path": "dataframes.r", "max_stars_repo_name": "Sokel/R-shchu", "max_stars_repo_head_hexsha": "0b5b48b018bf85caca89fefb1896468f6039568c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_...
from os import listdir from os.path import isfile, join,isdir import sys from pathlib import Path import numpy as np from PIL import Image import cv2 import os class DataPrepare(): def __init__(self): self.basedir=r'./DeepLabv3FineTuning/ADEChallengeData2016/' self.basedir_annt=r'..\freespacetrai...
{"hexsha": "0040dbad23a817ac42fffbcd07ba2d8239533a59", "size": 2558, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataprepare.py", "max_stars_repo_name": "angrysword/DeepLabv3FineTuning", "max_stars_repo_head_hexsha": "d97dd31620c0e65dd7cf4fd24581ded5af17465c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import argparse import os import pickle import torch import numpy as np import matplotlib.pyplot as plt from util.bioinformatics_algorithms.edit_distance import cross_distance_matrix_threads from util.data_handling.string_generator import string_to_list class ClosestStringGenomicDatasetGenerator: def __init__(s...
{"hexsha": "758d1773af9eeecf6f1f8a511c0ea0d4d9dce95f", "size": 3276, "ext": "py", "lang": "Python", "max_stars_repo_path": "closest_string/task/dataset_generator_genomic.py", "max_stars_repo_name": "pchlenski/NeuroSEED", "max_stars_repo_head_hexsha": "6318431dcce22df70948251b103374f4a6e96fff", "max_stars_repo_licenses"...
# B.C. Goodwin # Oscillatory behavior in enzymatic control processes # https://doi.org/10.1016/0065-2571(65)90067-1 using Logging using StructuralIdentifiability logger = Logging.SimpleLogger(stdout, Logging.Info) global_logger(logger) ode = @ODEmodel( x1'(t) = -b * x1(t) + 1 / (c + x4(t)), x2'(t) = alpha *...
{"hexsha": "a6716bc0d752d99f492bd01c3ffb68581a3c5177", "size": 518, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/Goodwin.jl", "max_stars_repo_name": "iliailmer/StructuralIdentifiability.jl", "max_stars_repo_head_hexsha": "29f1104e357f2f2942ff5477871856d80518a6ed", "max_stars_repo_licenses": ["MIT"], "...
# standard library import sys import re from typing import Any, Dict, List, Literal, Tuple, Union import os import json import subprocess import time # third-party libraries import numpy as np import matplotlib.pyplot as plt import matplotlib.patheffects as path_effects # local from validate_utils import write_report...
{"hexsha": "91447de326a6694923d1d117820be2b0251adee7", "size": 20509, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/validate_GWASSS_entries.py", "max_stars_repo_name": "Titorat/SSrehab", "max_stars_repo_head_hexsha": "6691ee1ed442073bfa00a51f0d9ab74b9252d302", "max_stars_repo_licenses": ["MIT"], "max_stars...
@testset "678.valid-parenthesis-string.jl" begin @test check_valid_string("(())((())()()(*)(*()(())())())()()((()())((()))(*") == false @test check_valid_string(")(") == false @test check_valid_string("(*))") == true @test check_valid_string("(*)") == true @test check_valid_string("()") == true end
{"hexsha": "c70c5c4347c7c1ab92203ea069f822acca167b91", "size": 319, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/problems/678.valid-parenthesis-string.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_licenses": ["MI...
import torch import torch.nn as nn import torch.nn.functional as func from torch.autograd import Variable from torchvision.utils import save_image import os import numpy as np class Discriminator(nn.Module): def __init__(self, config): super(Discriminator, self).__init__() self.label...
{"hexsha": "1344a8dc65b804a057029c39b4542cad017b2104", "size": 2206, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cGan.py", "max_stars_repo_name": "Ls-Dai/Pytorch_FL_GAN", "max_stars_repo_head_hexsha": "63b38600751c6245e07b022f64e63d783e531b5e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
function Y = cosh(X) % Symbolic hyperbolic cosine. % Convert inputs to SymExpression % X = SymExpression(X); % construct the operation string sstr = ['Cosh[' X.s ']']; % create a new object with the evaluated string Y = SymExpression(sstr); end
{"author": "ayonga", "repo": "frost-dev", "sha": "e5dc0624d834520872bfa588dd3eda5643da71de", "save_path": "github-repos/MATLAB/ayonga-frost-dev", "path": "github-repos/MATLAB/ayonga-frost-dev/frost-dev-e5dc0624d834520872bfa588dd3eda5643da71de/matlab/symbolic/@SymExpression/cosh.m"}
import requests import re import time import datetime import numpy as np """ Prerequisite: Create access tokens You need private access token to have full access to Github search API. Generate your access token in [here](https://github.com/settings/tokens) you don't need to tick on any access permission because you ar...
{"hexsha": "076ff7f288ae3e101b0b411debeee5fea728fdf5", "size": 2265, "ext": "py", "lang": "Python", "max_stars_repo_path": "find_other_frameworks_usage.py", "max_stars_repo_name": "koreyou/chainer-usage-analysis", "max_stars_repo_head_hexsha": "f394b7e38f0608110a4e70e04c0fc91449a4351b", "max_stars_repo_licenses": ["CC0...
import dask.array as da import numpy as np import abmvisum.engines.choice_engine as choice_engine import abmvisum.tools.utilities as utilities daskfactory = choice_engine.DaskFactory(10000) def calc_dest_zone_utility_matrix(origin_zones, betas, utility_matrices, target_zones_for_ru...
{"hexsha": "6c2621be24393402b9549cb29d26760b67bf5e8b", "size": 9099, "ext": "py", "lang": "Python", "max_stars_repo_path": "abmvisum/engines/location_choice_engine.py", "max_stars_repo_name": "SchweizerischeBundesbahnen/abm-in-visum", "max_stars_repo_head_hexsha": "b67451c331482a70fab20c7340d27e78b9e50461", "max_stars_...
function load_xyz_data(file_path :: String; atom_names = nothing, radii = [3.5], weights = [1.0], masses = [1.0], boundary_type = ["p", "p", "p"], units = "lj") # frames = read_frames(file_path) # n = length(frames) # r = Vector{Configuration}(undef, n) # if atom_names == nothing # atom_names =...
{"hexsha": "2ca3dc241b0445739ed72fb0a69b0ec4017a3fc5", "size": 1873, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/IO/io_xyz.jl", "max_stars_repo_name": "stefanbringuier/InteratomicPotentials.jl", "max_stars_repo_head_hexsha": "96d6808d4ccd974817d0220b72b29ed4dd173e4f", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np from core import GraphicalObject, DrawContext import typing as tp class Point(GraphicalObject): def __init__(self, name: str, x: float, y: float, z: float = ...): if z is ...: self.is_3d = False super().__init__(name, np.array([[x, y, 1.]])) else: ...
{"hexsha": "1159ab058cfe5d1d1d64dded00d9d60d2528e160", "size": 1361, "ext": "py", "lang": "Python", "max_stars_repo_path": "shapes/point.py", "max_stars_repo_name": "HENRDS/INE5408", "max_stars_repo_head_hexsha": "3216fe813200eff6480bd8db3d63299fb5255cda", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
! ================================================================================================================================= ! MODULE : hydrolc ! ! CONTACT : orchidee-help _at_ listes.ipsl.fr ! ! LICENCE : IPSL (2006) ! This software is governed by the CeCILL licence see ORCHIDEE/O...
{"hexsha": "a1540f8dd85d4f423868ae2674c50199d197d261", "size": 213320, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/examples_large/ORCHIDEE_hydrolc.f90", "max_stars_repo_name": "mbdevpl/open-fortran-parser-xml", "max_stars_repo_head_hexsha": "127f4ec2ba7cd06eb010794560eb8e4b9494fdfe", "max_stars_repo_l...
module VermontTerrestrialPassageTool using ArchGDAL using DelimitedFiles using GeoData using Omniscape using Shapefile using Statistics include("utils.jl") include("main.jl") include("consts.jl") export compute_all_culverts end
{"hexsha": "d6d0d2943d5f50faa30aba936871f95e915277a2", "size": 232, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/VermontTerrestrialPassageTool.jl", "max_stars_repo_name": "csp-inc/VermontTerrestrialPassageTool.jl", "max_stars_repo_head_hexsha": "9c5273012bcdb77241ec6caddf2bc02c99c4e817", "max_stars_repo_li...
/**************************************************************************** * hipipe library * Copyright (c) 2017, Cognexa Solutions s.r.o. * Copyright (c) 2018, Iterait a.s. * Author(s) Filip Matzner * * This file is distributed under the MIT License. * See the accompanying file LICENSE.txt for the comp...
{"hexsha": "3a624e818493180be0319f99347f08d5b0f56f15", "size": 1603, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/tensorflow/run_graph.cpp", "max_stars_repo_name": "iterait/hipipe", "max_stars_repo_head_hexsha": "c2a6cc13857dce93e5ae3f76a86e8f029ca3f921", "max_stars_repo_licenses": ["BSL-1.0", "MIT"], "max...
subroutine difu(icreep ,timest ,lundia ,nst ,icx , & & icy ,j ,nmmaxj ,nmmax ,kmax , & & lstsci ,lstsc ,lsal ,ltem ,lsecfl , & & lsec ,lsed ,lsts ,norow ,irocol , & & kcs ...
{"hexsha": "1d7ca2ec6776a1f20d8beeff045e7dabc98a884c", "size": 49066, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/flow2d3d/packages/kernel/src/compute/difu.f90", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02...
from vpython import * from cubes.configs import * from cubes.cube import * from cubes.util import * from time import time import numpy as np def smooth_step(x): """ Smooth interpolation function """ return 0.5 - np.cos(x * pi) / 2 class Cube3D(Cube): """ Initialize the cube structure...
{"hexsha": "86e7168fb5792e92bab81e59daa74a183d8ba426", "size": 7397, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cubes/cube_3d.py", "max_stars_repo_name": "pabloqb2000/py-rubik_solver", "max_stars_repo_head_hexsha": "c1cf83fa62b6ff0dce9859fe59296c85a57f8d3f", "max_stars_repo_licenses": ["Apache-2.0"], "m...
[STATEMENT] lemma ZfunD: "Zfun f F \<Longrightarrow> 0 < r \<Longrightarrow> eventually (\<lambda>x. norm (f x) < r) F" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Zfun f F; 0 < r\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. norm (f x) < r [PROOF STEP] by (simp add: Zfun_def)
{"llama_tokens": 123, "file": null, "length": 1}
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd import tempfile import argparse import os from tabulate import tabulate import pickle header = '''data_nef_MELD_{} save_nef_nmr_meta_data _nef_nmr_meta_data.sf_category nef_nmr_meta_data _nef_nmr_meta_data.sf_frameco...
{"hexsha": "30d7c13ff330b83433c9f4a89eae54e0599628e9", "size": 13294, "ext": "py", "lang": "Python", "max_stars_repo_path": "MELD_NEF_Classes.py", "max_stars_repo_name": "alberto99/MELDNMRParser", "max_stars_repo_head_hexsha": "cabffff5dcb6fbc9ff01446367659d42ce236644", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma cxt_inv: "\<lbrakk> cxt_to_stmt E c = c' ; \<And> p q. c' \<noteq> Seq p q \<rbrakk> \<Longrightarrow> E = [] \<and> c' = c" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>cxt_to_stmt E c = c'; \<And>p q. c' \<noteq> p ;; q\<rbrakk> \<Longrightarrow> E = [] \<and> c' = c [PROOF STEP] by ...
{"llama_tokens": 181, "file": "Dependent_SIFUM_Type_Systems_Language", "length": 1}
import bw2data as bd import numpy as np from scipy.stats import norm import stats_arrays as sa # Local files from .constants import air_molecular_weight, atmosphere_total_mass, substances_data def get_uncertain_flows(time_horizon=100, verbose=False): method = ('IPCC 2013', 'climate change', 'GWP {}a'.format(t...
{"hexsha": "a48992b3004e3cd44cb75679d302b2e6fd07b1c5", "size": 11226, "ext": "py", "lang": "Python", "max_stars_repo_path": "gwp_uncertainties/gwp_computations.py", "max_stars_repo_name": "aleksandra-kim/bw_gwp_uncertainties", "max_stars_repo_head_hexsha": "de428c60b2ff54def15f976657ebf55823ccb86d", "max_stars_repo_lic...
\section{PWGrid version 1} \subsection{The implementation: {\tt PWGrid\_01.jl}} The type definition \begin{juliacode} type PWGrid Ns::Array{Int64} LatVecs::Array{Float64,2} RecVecs::Array{Float64,2} Npoints::Int Ω::Float64 r::Array{Float64,2} G::Array{Float64,2} G2::Array{Float64} end \end{juliacode}...
{"hexsha": "890c23178c50e7e7a1b8d37e67fe95dcb3aee533", "size": 3007, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "PW/annotated/PWGrid_01.tex", "max_stars_repo_name": "f-fathurrahman/ffr-ElectronicStructure.jl", "max_stars_repo_head_hexsha": "35dca9831bfc6a3e49bb0f3a5872558ffce4b211", "max_stars_repo_licenses": ...
*DECK SCOEF SUBROUTINE SCOEF (YH, YP, NCOMP, NROWB, NFC, NIC, B, BETA, COEF, + INHOMO, RE, AE, BY, CVEC, WORK, IWORK, IFLAG, NFCC) C***BEGIN PROLOGUE SCOEF C***SUBSIDIARY C***PURPOSE Subsidiary to BVSUP C***LIBRARY SLATEC C***TYPE SINGLE PRECISION (SCOEF-S, DCOEF-D) C***AUTHOR Watts, H. A., (SNLA...
{"hexsha": "c53d812c3bbb6eef1123f0c47045a8adc9102279", "size": 5511, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/scoef.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Truncation.FromNegOne where open import Cubical.HITs.Truncation.FromNegOne.Base public open import Cubical.HITs.Truncation.FromNegOne.Properties public
{"hexsha": "fdbb77ecd12a49b7635e67c6a865c42578a19d8d", "size": 224, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/HITs/Truncation/FromNegOne.agda", "max_stars_repo_name": "bijan2005/univalent-foundations", "max_stars_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_stars_repo_license...
################################################################################ # interHapLabels function # # Author: Heidi Lischer # Date: 10.2008 ################################################################################ interHapLabels <- function(xmlText){ tagData2 <- as.character(xmlText) tag...
{"hexsha": "f913e9408a79d6ae0bafaea3655ab04eae4534c9", "size": 735, "ext": "r", "lang": "R", "max_stars_repo_path": "code/tools/arlequin/arlecore_linux/Rfunctions/interHapLabels.r", "max_stars_repo_name": "kibet-gilbert/co1_metaanalysis", "max_stars_repo_head_hexsha": "1089cc03bc4dbabab543a8dadf49130d8e399665", "max_st...
[STATEMENT] lemma Spy_not_see_NB: "[| A \<notin> bad; B \<notin> bad |] ==> Nprg \<in> Always {s. Says B A (Crypt (pubK A) \<lbrace>Nonce NA, Nonce NB\<rbrace>) \<in> set s & (\<forall>C. Says A C (Crypt (pubK C) (Nonce NB)) \<notin> set s) --> Nonce NB \<notin>...
{"llama_tokens": 11201, "file": null, "length": 14}
# -*- coding: utf-8 -*- #========================================== # Title: util.py # Author: Binxin Ru and Ahsan Alvi # Date: 20 August 2019 # Link: https://arxiv.org/abs/1906.08878 #========================================== from typing import Tuple import numpy as np def add_hallucinations_to_x_and_y(bo, o...
{"hexsha": "6e1ce39236517ddd8add2e4ed3432963bd4fc2e7", "size": 2977, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/bayesopt/util.py", "max_stars_repo_name": "ChangYong-Oh/CoCaBO_code", "max_stars_repo_head_hexsha": "d7eab8c8419de8df68355f1e410b8c4b4e697e44", "max_stars_repo_licenses": ["MIT"], "max_stars...
# Copyright - Transporation, Bots, and Disability Lab - Carnegie Mellon University # Released under MIT License """ Convert Functions for roslibpy """ import numpy as np import base64 import sys import logging logging.basicConfig() def _get_encoding_information(encoding): if encoding == 'bgra8': retur...
{"hexsha": "2341f34b64ccd6a300739731b72130ee5aecee57", "size": 2381, "ext": "py", "lang": "Python", "max_stars_repo_path": "alloy/ros/roslibpy.py", "max_stars_repo_name": "CMU-TBD/alloy", "max_stars_repo_head_hexsha": "cf66738e044613fb274bd1b159864a7600e15cb5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# coding: utf-8 import logging import sys import time import numpy as np import pytest import ray.cluster_utils from ray._private.test_utils import ( client_test_enabled, SignalActor, ) if client_test_enabled(): from ray.util.client import ray else: import ray logger = logging.getLogger(__name__) ...
{"hexsha": "0bda228682f4c17f72575843529b6586900a48d8", "size": 7318, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ray/tests/test_advanced_5.py", "max_stars_repo_name": "jianoaix/ray", "max_stars_repo_head_hexsha": "1701b923bc83905f8961c06a6a173e3eba46a936", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#include <boost/log/sinks/basic_sink_frontend.hpp>
{"hexsha": "53c787c860d9565abaa498078196dfb7f23b03ee", "size": 51, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_log_sinks_basic_sink_frontend.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": [...
import numpy as np import tensorflow as tf from sklearn.ensemble import IsolationForest class EarlyStoppingBeforeOverfit(tf.keras.callbacks.Callback): """ """ def __init__(self, patience=15, min_acc=0.95): super(EarlyStoppingBeforeOverfit, self).__init__() self.min_acc = min_acc s...
{"hexsha": "134b1b6c6674e64f977ddd5c3921921ec22451ed", "size": 3410, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp_table2/aosr_utility.py", "max_stars_repo_name": "Anjin-Liu/Openset_Learning_AOSR", "max_stars_repo_head_hexsha": "8b9435dfd33abf5969122beddf07bf9314d0969a", "max_stars_repo_licenses": ["MIT"],...
from scipy.signal import butter, lfilter, resample, firwin, decimate from sklearn.decomposition import FastICA, PCA from sklearn import preprocessing import numpy as np import pandas as np import matplotlib.pyplot as plt import scipy import pandas as pd class SpectrogramImage: """ Plot spectrogram for each ch...
{"hexsha": "767f756df6c9b01fb861185b1d3f165d996d8fe9", "size": 12247, "ext": "py", "lang": "Python", "max_stars_repo_path": "transforms.py", "max_stars_repo_name": "A-Jacobson/iEEG_Seizure_Prediction", "max_stars_repo_head_hexsha": "bdee7f4aab72674e01af7ec254b5d6ec7f65e620", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import sigpy as sp import math from subtle_data_crimes.functions import new_poisson import matplotlib.pyplot as plt # ===================== 2D Variable-density Sampling (based on Miki Lustig's Sparse MRI toolbox) ============================ def create_samp_mask(R, imSize, calib=[24, 24],...
{"hexsha": "58151f4d1b634b3b26644f2126dbb4f0f46ed993", "size": 5712, "ext": "py", "lang": "Python", "max_stars_repo_path": "subtle_data_crimes/crime_2_jpeg/Fig7/DL/utils/sampling_funcs.py", "max_stars_repo_name": "mikgroup/subtle_data_crimes", "max_stars_repo_head_hexsha": "210025d9cb8f92583f5f983be15af06b57cfea36", "m...
import gc import os import numpy as np import tensorflow as tf from tensorflow.contrib.image import translate as tf_translate from scipy.ndimage import gaussian_filter from utils.distance_measures import DistL2 from models.minibatch_wrapper import MinibatchWrapper from utils import saliency, dataset_imagenet from util...
{"hexsha": "7ebd9fe264e36fbf306a04603ddc626fe83b1347", "size": 14391, "ext": "py", "lang": "Python", "max_stars_repo_path": "starting_point_finder.py", "max_stars_repo_name": "ttbrunner/blackbox_starting_points", "max_stars_repo_head_hexsha": "7d489cc712a3ee53bfd630ce2830bf643feecb0c", "max_stars_repo_licenses": ["MIT"...
function tapas_validate_data(data) %% Check that data complies with the inferface. % % aponteeduardo@gmail.com % copyright (C) 2016 % if ~isstruct(data) error('tapas:validate:data', 'data is not a structure') end if ~isfield(data, 'y') error('tapas:validate:data', 'data lacks field y'); end if ~isfield(data,...
{"author": "translationalneuromodeling", "repo": "tapas", "sha": "604c56843c15411f5bd80190f81d845ac57d8592", "save_path": "github-repos/MATLAB/translationalneuromodeling-tapas", "path": "github-repos/MATLAB/translationalneuromodeling-tapas/tapas-604c56843c15411f5bd80190f81d845ac57d8592/tools/ti/tapas_validate_data.m"}
abstract Initializer type NormalInit <: Initializer mu :: AbstractFloat sd :: AbstractFloat function NormalInit(mu=0.0, sd=1.0) new(mu, sd) end end type UniformInit <: Initializer min :: AbstractFloat max :: AbstractFloat function UniformInit(min=0.0, max=1.0) new(min, max)...
{"hexsha": "d2a9863fb3ade191aaf299ba6ce4bfc0586c258c", "size": 650, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/initializer.jl", "max_stars_repo_name": "peakbook/BlockMatchingSOMs.jl", "max_stars_repo_head_hexsha": "e70d20a4e6dce296f6b489a3344090e97db1085d", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import matplotlib.pyplot as plt from numpy import * import Model def read_data_from_file(filename): file = open(filename, "r") file.readline() data = file.readlines() x_true, y_true = [], [] for line in data: temp = line.split(",") x_true.append(int(temp[0])) ...
{"hexsha": "eb165e96358ce4fa0a45b5fc31956ef3d361a997", "size": 1358, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW1/Experiment1.py", "max_stars_repo_name": "efkandurakli/Pattern-Recognition-Homewoks", "max_stars_repo_head_hexsha": "0d24a2c5d38fb70b02313ea6c1b8342bdcfa4495", "max_stars_repo_licenses": ["MIT"...
import os import sys import numpy as np BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = BASE_DIR DATA_PATH = os.path.join(ROOT_DIR, 'data/') out_fname = ['rgbnss_trn', 'rgbnss_tst', 'depth_trn', 'depth_tst'] xtrn_list = [line.rstrip() for line in open(os.path.join(DATA_PATH, 'xtrn_list.txt'))] xtst_l...
{"hexsha": "d30ca922ec617070f128fb08b1254f810e36c951", "size": 931, "ext": "py", "lang": "Python", "max_stars_repo_path": "stack_all_data.py", "max_stars_repo_name": "yustisiardhitasari/sdbcnn", "max_stars_repo_head_hexsha": "5b591009c1576c6879bf883c6eec23b0b743d2cd", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
\section{Conclusion} \label{sec:conc} Blockchains have the potential to disrupt incumbent applications on the data sharing economy. In addition to this, the Transportation industry is going through a radical shift due to the new types of data and applications that have become available. For instance the proliferation ...
{"hexsha": "b2e8d0fc92d13be2a554aa2c87c5fd0f18aa7a54", "size": 1535, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "conclusion.tex", "max_stars_repo_name": "arunesh/latwp", "max_stars_repo_head_hexsha": "a84fff7e01cfea691a81024f13cd730bea6c8c05", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
# Copyright 1999-2020 Alibaba Group Holding 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 a...
{"hexsha": "82f331067cbf449dccaf1ca643ded164e42d9dbf", "size": 3379, "ext": "py", "lang": "Python", "max_stars_repo_path": "mars/learn/metrics/pairwise/tests/test_pariwise_distances.py", "max_stars_repo_name": "tomzhang/mars-1", "max_stars_repo_head_hexsha": "6f1d85e37eb1b383251314cb0ba13e06288af03d", "max_stars_repo_l...
[STATEMENT] lemma set_attribute_get_attribute: "h \<turnstile> set_attribute ptr k v \<rightarrow>\<^sub>h h' \<Longrightarrow> h' \<turnstile> get_attribute ptr k \<rightarrow>\<^sub>r v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. h \<turnstile> set_attribute ptr k v \<rightarrow>\<^sub>h h' \<Longrightarrow>...
{"llama_tokens": 221, "file": "Core_DOM_common_Core_DOM_Functions", "length": 1}
# -*- coding: utf-8 -*- import numpy as np import statistics from skimage import filters, morphology, measure import matplotlib.pyplot as plt def kymo_to_coords(kymo, thres=15, pixel_length = 0.1833333): """ This function takes a kymograph and extract the membrane position from the image. Parameters ...
{"hexsha": "9ddef7453170ff5287628ed61ad810197cbd1558", "size": 2784, "ext": "py", "lang": "Python", "max_stars_repo_path": "kymo_to_coords.py", "max_stars_repo_name": "ernestiu/Cell-spreading-analysis", "max_stars_repo_head_hexsha": "5a8807be9e25b6cc8cc4850f03810eacc48fe8e0", "max_stars_repo_licenses": ["BSD-2-Clause"]...
import unittest import pytest import numpy as np import pickle from s2and.data import ANDData from s2and.model import Clusterer from s2and.featurizer import FeaturizationInfo, many_pairs_featurize from s2and.consts import LARGE_DISTANCE from sklearn.linear_model import LogisticRegression class TestClusterer(unittest...
{"hexsha": "66579e70df0c64235d8dccafc00bc12f5eb65e1a", "size": 3368, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_cluster_incremental_incompatible.py", "max_stars_repo_name": "atypon/S2AND", "max_stars_repo_head_hexsha": "d1af114edf5941d0ec00f56b11508582e1091913", "max_stars_repo_licenses": ["Apach...
#!/usr/bin/env python # -*- coding: utf-8 -*- import openravepy import numpy import random from copy import deepcopy if not __openravepy_build_doc__: from openravepy import * from numpy import * class Node: def __init__(self, _input, id_in, parentid_in): self.config = _input self.id = id_i...
{"hexsha": "c5bd2174ba11d708ebe4816cf5f4f785a2a3c928", "size": 7075, "ext": "py", "lang": "Python", "max_stars_repo_path": "RRT/rrt_fun.py", "max_stars_repo_name": "Simon0323/A-star-RRT-Motion-Planning", "max_stars_repo_head_hexsha": "3319a4da07b9a81fdc6ab64aeef119abb5aedd93", "max_stars_repo_licenses": ["MIT"], "max_s...
// Copyright (c) 2012, Yahoo! Inc. All rights reserved. // Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. #include <tap/trivial.h> #include <gearbox/core/util.h> #include <gearbox/core/TempFile.h> using namespace Gearbox; #include "log4cxx/propertyconfigurator.h" #includ...
{"hexsha": "e35b8394c24a7ecb6c0eef6d57a97414bdb5de8e", "size": 1468, "ext": "cc", "lang": "C++", "max_stars_repo_path": "gearbox/t/core/ffdigest.t.cc", "max_stars_repo_name": "coryb/gearbox", "max_stars_repo_head_hexsha": "88027f2f101c2d1fab16093928963052b9d3294d", "max_stars_repo_licenses": ["Artistic-1.0-Perl", "BSD-...
import numpy as np from flask import Flask, jsonify, request import pickle #model my_model = pickle.load(open('iris_model2.pkl', 'rb')) app = Flask(__name__) @app.route('/api', methods=['POST']) def make_predict(): #get data data = request.get_json(force=True) #transform/parse predict_request = [data...
{"hexsha": "99e3fd6a4ec6768a5b8f3e33e66481c19064c5db", "size": 1009, "ext": "py", "lang": "Python", "max_stars_repo_path": "module3-adding-data-science-to-a-web-application/iris_model_app_two.py", "max_stars_repo_name": "nrvanwyck/DS-Unit-3-Sprint-3-Productization-and-Cloud", "max_stars_repo_head_hexsha": "186a2420ddaf...
module day24 include("inputs.jl") ex = inputs.ex_d24() input = inputs.input_d24() # https://www.redblobgames.com/grids/hexagons/#coordinates-cube struct Tile # cube coordinates for hex grid (see link) x::Int y::Int z::Int end function parse_input(input) rgx = r"(ne|se|sw|nw|e|w)" return map(...
{"hexsha": "81685e76ae7e8b529b74434be4aa9fb2ea921c59", "size": 3104, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/day_24.jl", "max_stars_repo_name": "danjburns/AdventOfCode2020", "max_stars_repo_head_hexsha": "2c7cb0d1cbc41960da26691d55a572b9806bdb32", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\documentclass[]{book} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex \ifxetex \usepackage{mathsp...
{"hexsha": "19169839b95ff0711fb4b83344b1e701534451b4", "size": 6675, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "bookdown-start.tex", "max_stars_repo_name": "watzek/BLTdocs", "max_stars_repo_head_hexsha": "e21c8f809de6bf20d235ee7e4f4c6617df52bb53", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": nul...
PROGRAM SECEME C C CALCULATES AVERAGE VALUE OF 1/SQRT(ES) FOR SECONDARY C EMISSION FROM COPPER, SEAH, SURFACE SCIENCE 17,132-160,(1969) C DELE = .05 VAL1 = 0. VAL2 = 0. DO N = 1,1000 ES = .05*N FSR = 1 + (N.AND.1) Y = ES/(ES +.35)/(ES + 4.5)**1.6 VAL1 = VAL1 + DELE*FSR*Y VAL2 = VAL2 + DELE*FSR*Y/SQRT(ES) END...
{"hexsha": "e7164c9fb75d9e805c3badd47e11457c6356ab76", "size": 388, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "WAVES_VMS_Fortran/PJK_Fortran/waves_dir/seceme_1.for", "max_stars_repo_name": "lynnbwilsoniii/Wind_Decom_Code", "max_stars_repo_head_hexsha": "ef596644fe0ed3df5ff3b462602e7550a04323e2", "max_star...
# Copyright 2017 Battelle Energy Alliance, LLC # # 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 t...
{"hexsha": "dcf7dbc44b8c4a0b18e3ce5cd3d8b8f3c360df53", "size": 15558, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework/Models/PostProcessors/Metric.py", "max_stars_repo_name": "FlanFlanagan/raven", "max_stars_repo_head_hexsha": "bd7fca18af94376a28e2144ba1da72c01c8d343c", "max_stars_repo_licenses": ["Apa...
function x = Adj_USFFT(n,y,omega,D,L,center) % USFFT_simple -- 1d adjoint unequispaced Fourier transform % Usage: % x = USFFT(n,y,omega,D,L,center) % Inputs: % n length of output x % y vector of length m, % omega vector of sampled frequencies (length m) % center 0 for unbiased FT, 1 otherwise % Outp...
{"author": "thomaskuestner", "repo": "CS_MoCo_LAB", "sha": "a26e8e483624b2e4ee669e7a069ba9c74d2d2e4b", "save_path": "github-repos/MATLAB/thomaskuestner-CS_MoCo_LAB", "path": "github-repos/MATLAB/thomaskuestner-CS_MoCo_LAB/CS_MoCo_LAB-a26e8e483624b2e4ee669e7a069ba9c74d2d2e4b/reconstruction/matlab/CS_LAB_matlab/utils/uti...
From Test Require Import tactic. Section FOFProblem. Variable Universe : Set. Variable UniverseElement : Universe. Variable wd_ : Universe -> Universe -> Prop. Variable col_ : Universe -> Universe -> Universe -> Prop. Variable col_swap1_1 : (forall A B C : Universe, (col_ A B C -> col_ B A C)). Variable col_swap2_...
{"author": "janicicpredrag", "repo": "Larus", "sha": "a095ca588fbb0e4a64a26d92946485bbf85e1e08", "save_path": "github-repos/coq/janicicpredrag-Larus", "path": "github-repos/coq/janicicpredrag-Larus/Larus-a095ca588fbb0e4a64a26d92946485bbf85e1e08/benchmarks/coq-problems/col-trans/col_trans_0888.v"}
import h5py import numpy as np import os from numpy.lib.shape_base import expand_dims import open3d as o3d import torch from torch.utils.data import Dataset from sklearn.neighbors import NearestNeighbors from scipy.spatial.distance import minkowski def farthest_subsample_points(pointcloud1, pointcloud2, num_subsampl...
{"hexsha": "65fddea90094215400f8ea85d65c4f143087e9a8", "size": 6861, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dataset.py", "max_stars_repo_name": "paul007pl/GMCNet", "max_stars_repo_head_hexsha": "ebe3005874ec6040ac6d2b2f4aee7aeb9b21e7ee", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...