text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import torch import os import numpy as np import random from librosa import load def read(data, normalize=False, sr=16000): data, sr = load(data, sr=sr) if normalize: data /= np.abs(data).max() return data, sr class SpeechDataset(torch.utils.data.Dataset): def __init__(self, noisy_path, clean...
{"hexsha": "1c2f304c2cdde31005f56751f34965b6155440a8", "size": 1341, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "ChangLee0903/SERIL-Noise-Adaptive-Speech-Enhancement-using-Regularization-based-Incremental-Learning", "max_stars_repo_head_hexsha": "73c5dbd8a272a534cc0af455a...
using RealNeuralNetworks.SWCs using Test @testset "test SWC" begin # read swc exampleFile = joinpath(@__DIR__, "../asset/77625.swc") println("load plain text swc ...") @time swc = SWCs.load( exampleFile ) str = String(swc) tempFile = tempname() * ".swc" println("save plain text swc ...") ...
{"hexsha": "3cb17b408b688d6736b57f4bdd2bc1a22251c872", "size": 751, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/SWCs.jl", "max_stars_repo_name": "UnofficialJuliaMirror/RealNeuralNetworks.jl-4491297b-8966-5840-8cb9-b189d60f3398", "max_stars_repo_head_hexsha": "e6f19dd0515e2105de0ff7c26997d7de64fb3153", "m...
%% PLANETOID CLASS (planetoid.m) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The Moon class is an iteration of the spheriod obstacle class aimed % mostly providing a reference for satelite simulation. % Author: James A. Douthwaite 09/02/2019 classdef planetoid < obstacle_spheroid properties inclination; ...
{"author": "douthwja01", "repo": "OpenMAS", "sha": "962f321f82167db78066b2c88c783423ecc3b73a", "save_path": "github-repos/MATLAB/douthwja01-OpenMAS", "path": "github-repos/MATLAB/douthwja01-OpenMAS/OpenMAS-962f321f82167db78066b2c88c783423ecc3b73a/objects/planetoid.m"}
# TRAIN_ON_SMALL=True python3 -m torch.distributed.launch --nproc_per_node=2 train_nq.py from transformers import BigBirdForQuestionAnswering, BigBirdTokenizer from transformers import TrainingArguments, Trainer from datasets import load_dataset import torch_xla.distributed.xla_multiprocessing as xmp import torch im...
{"hexsha": "b40895dc4fe10856f80236e7ed1407d4511f447a", "size": 5642, "ext": "py", "lang": "Python", "max_stars_repo_path": "natural-questions/train_nq_tpu.py", "max_stars_repo_name": "pasikon/bigbird", "max_stars_repo_head_hexsha": "0a06e5aa6a6f8663afdfd6b3886b911946895c93", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import splatalogue from ...utils.testing_tools import MockResponse from astropy import units as u from astropy.tests.helper import pytest, remote_data import requests import os SPLAT_DATA = 'CO_colons.csv' def data_path(filename): data_dir ...
{"hexsha": "0ae2b3810a5b57255dd74483adc68a780669968d", "size": 4357, "ext": "py", "lang": "Python", "max_stars_repo_path": "astroquery/splatalogue/tests/test_splatalogue.py", "max_stars_repo_name": "astrocatalogs/astroquery", "max_stars_repo_head_hexsha": "9919a32cb027febcd73cd743efaae6754061a534", "max_stars_repo_lice...
import gym import numpy as np import torch from gym.spaces import Box, Discrete ################################ ################################ class DiscretizedObservationWrapper(gym.ObservationWrapper): def __init__(self, env, n_bins=10, low=None, high=None): super().__init__(env) assert isins...
{"hexsha": "370ab9404ccc099de6ded1c5f6f62cc588131da7", "size": 7068, "ext": "py", "lang": "Python", "max_stars_repo_path": "asynch_rl/envs/wrappers.py", "max_stars_repo_name": "EnricoReg/asynch-rl", "max_stars_repo_head_hexsha": "acd01a49a7a4b8ff4ff0694d1e24274ba87691ee", "max_stars_repo_licenses": ["CC0-1.0"], "max_st...
using Hiccup using Test @tags br, link # hiccup div conflicts with main div, so use this as compromise ediv = Hiccup.div @test occursin("class=\"class1 class2\"", sprint(Hiccup.render, Node(:img, "#id.class1.class2", Dict(:src=>"http://www.com")))) classMatching = ((".section-title", "section-title"), ...
{"hexsha": "252edc615c746961f8099793ddff97cbed369793", "size": 1747, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Hiccup.jl-9fb69e20-1954-56bb-a84f-559cc56a8ff7", "max_stars_repo_head_hexsha": "28ea6088fd2ada3e1667d98f8808cee1a4fd70d8", "max_star...
# -*- coding: utf-8 -*- """ Created on Tue Nov 17 18:10:16 2020 @author: Ashna """ #Importing libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.feature_selection import RFE # feature elimination from sklearn.ensemble import ExtraTreesRegressor #importing estim...
{"hexsha": "8c8c2c77344f91630ef95ee9e34822fd1f44c40f", "size": 7077, "ext": "py", "lang": "Python", "max_stars_repo_path": "propulsion_plant.py", "max_stars_repo_name": "AshnaVirdikar/Prediction_models", "max_stars_repo_head_hexsha": "21a235944f98e97b3e80d02fcaeaee57fd8f8535", "max_stars_repo_licenses": ["MIT"], "max_s...
""" IBN-ResNet for ImageNet-1K, implemented in TensorFlow. Original paper: 'Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net,' https://arxiv.org/abs/1807.09441. """ __all__ = ['IBNResNet', 'ibn_resnet50', 'ibn_resnet101', 'ibn_resnet152'] import os import tensorflow as tf import t...
{"hexsha": "65f2aa0f53935ce7e6e49b92129ec8708b4d88cc", "size": 14465, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow2/tf2cv/models/ibnresnet.py", "max_stars_repo_name": "naviocean/imgclsmob", "max_stars_repo_head_hexsha": "f2993d3ce73a2f7ddba05da3891defb08547d504", "max_stars_repo_licenses": ["MIT"],...
subroutine addinp(a0 , dav , cgen , cadd , cmax , * cmin , itypc , typbnd, nobnd , namcon, * lstci , kmax ) !----- GPL --------------------------------------------------------------------- ! ...
{"hexsha": "cc0d4614e5423cd9894c09be4282ee01d60818d8", "size": 5483, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/tools_gpl/nesthd2/packages/nesthd2/src/addinp.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5bd0d9a1...
import numpy as np import time from plotnine import * from sklearn import manifold import pandas as pd import scanpy as sc import pdb import os import scipy.sparse as ssp from .. import help_functions as hf from matplotlib import pyplot as plt from .. import settings from .. import logging as logg ##################...
{"hexsha": "f903da4e0c37915e7f9b1a1c4902070c1d930943", "size": 105822, "ext": "py", "lang": "Python", "max_stars_repo_path": "cospar/plotting/_plotting.py", "max_stars_repo_name": "ascendancy09/CoSpar", "max_stars_repo_head_hexsha": "791b320e4f7722d7fc3a61c5ff7d45f23db7af91", "max_stars_repo_licenses": ["MIT"], "max_st...
#-*-coding:UTF-8-*- from numpy import * import matplotlib.pyplot as plt x=linspace(0,10,50000) y=x/2-cos(x)-pi/4 plt.figure() plt.plot(x,y) plt.savefig("easyplot.png")#导出图像入图片 plt.show()
{"hexsha": "50ee526d609c6b33e2635910938384dafb4579b8", "size": 188, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pictures/pic.py", "max_stars_repo_name": "coder109/HighSchoolFiles", "max_stars_repo_head_hexsha": "4a73bfcf1ebd6f74787b2c9e34adbda423664b53", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import torch import cv2 import numpy as np import sys import os import numpy as np import torch class Logger(object): def __init__(self, logfile): self.terminal = sys.stdout self.log = open(logfile, "a") def write(self, message): self.terminal.write(message) self.log.write(mes...
{"hexsha": "f7eb9d71a21da2d85b171aec17f848c6929cffbb", "size": 17427, "ext": "py", "lang": "Python", "max_stars_repo_path": "solutions/2nd-place/bbox_model/utils.py", "max_stars_repo_name": "henriquesimoes/humpback", "max_stars_repo_head_hexsha": "ba687a71f95ef9c9c30426eefae11a69efd6f942", "max_stars_repo_licenses": ["...
% ============================================================================= In a software-only implementation, execution of AES and the associated application program is performed by a general-purpose processor core, using only instructions in the base ISA. Since we only consider use of the RISC-V scalar base IS...
{"hexsha": "983ea86b01e9a1bdd885d9b06d56716b5153b6a1", "size": 7154, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/tex/bg-aes_impl_sw.tex", "max_stars_repo_name": "mfkiwl/aes-risc-pipeline", "max_stars_repo_head_hexsha": "9ebf788db1465cd5959fb23fbbcefdd60a5e0a34", "max_stars_repo_licenses": ["MIT"], "max_sta...
using Blocks using Compat const datafile = joinpath(dirname(@__FILE__), "test.csv") const nloops = 10 function testfn(f::Function, s::AbstractString, exp_res) println("\t$(s)...") ret = f() println("\t\tresult: $(ret)") @assert (ret == exp_res) println("\t\tresult: $(ret)") t = @elapsed for i...
{"hexsha": "cd43651868b231dc030df3b6fea91dfbc545ddbe", "size": 2525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Blocks.jl-7cb6cbaf-3823-58df-a841-732a989b1231", "max_stars_repo_head_hexsha": "36ad82ee703de133045469780319cdd6f7883339", "max...
# -*- coding: utf-8 -*- """ A module to generate simulated 2D time-series SOSS data Authors: Joe Filippazzo, Kevin Volk, Jonathan Fraine, Michael Wolfe """ import datetime from functools import partial, wraps from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count import os from pkg_resources...
{"hexsha": "ccb7c52d035270555f2cc4e7d1f1dd788ae7b455", "size": 49664, "ext": "py", "lang": "Python", "max_stars_repo_path": "awesimsoss/awesim.py", "max_stars_repo_name": "jotaylor/awesimsoss", "max_stars_repo_head_hexsha": "e8047cad598d0af8c7b41ddaae1ea7d01d116eaf", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" * Assignment: Numpy Trigonometry * Complexity: easy * Lines of code: 8 lines * Time: 13 min English: 1. Define function `trigonometry(angle_deg: int|float) -> dict` 2. Return angle in radians and trigonometric function values (sin, cos, tg, ctg) 3. Ctg for angle 180 and Tan for 90 degrees has infinite ...
{"hexsha": "a57f9aa3ca295721754f29d35aa8403332d7f2a3", "size": 1832, "ext": "py", "lang": "Python", "max_stars_repo_path": "_assignments/numpy/math/numpy_trigonometry_a.py", "max_stars_repo_name": "sages-pl/2022-01-pythonsqlalchemy-aptiv", "max_stars_repo_head_hexsha": "1d6d856608e9dbe25b139e8968c48b7f46753b84", "max_s...
[STATEMENT] lemma bit_shiftl_word_iff [bit_simps]: \<open>bit (w << m) n \<longleftrightarrow> m \<le> n \<and> n < LENGTH('a) \<and> bit w (n - m)\<close> for w :: \<open>'a::len word\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. bit (w << m) n = (m \<le> n \<and> n < LENGTH('a) \<and> bit w (n - m)) [...
{"llama_tokens": 161, "file": "Word_Lib_Word_Lemmas", "length": 1}
import numpy as np from ..graph_io import TensorProtoIO, OpsProtoIO from ..operations import OpsParam def shape_2_ak_shape(shape): """ onnx shape to anakin shape :param shape: :return: """ mini_shape = [i for i in shape if (i is not None and i > 0)] return map(int, [1] * (4 - len(mini_shape...
{"hexsha": "31c479efed5a3a150666bc4f3f5c9d23bc82381c", "size": 10522, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/external_converter_v2/parser/onnx/med_trans_util.py", "max_stars_repo_name": "baajur/Anakin", "max_stars_repo_head_hexsha": "5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730", "max_stars_repo_licen...
""" Provides the functions related to generating documentation stubs. """ module Generator using DocStringExtensions """ $(SIGNATURES) Attempts to save a file at `\$(root)/\$(filename)`. `f` will be called with file stream (see [`open`](https://docs.julialang.org/en/latest/base/io-network/#Base.open)). `filename` c...
{"hexsha": "24a7ea37d363991201af036a1b5541fce9576e3c", "size": 3467, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Generator.jl", "max_stars_repo_name": "aminya/DocumenterTools.jl", "max_stars_repo_head_hexsha": "34383ad76869e2a0a21e6b9e1d6701a37ac77de4", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
! ! Copyright 2011 Sebastian Heimann ! ! 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...
{"hexsha": "4707ea30b147ac9b5cb94c8605583a4b171ea372", "size": 19445, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source_circular.f90", "max_stars_repo_name": "emolch/kiwi", "max_stars_repo_head_hexsha": "8aa37d74b578afadb344a34117a99b8d144f4a6b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
#!/usr/bin/env python # -*- coding: utf-8 # Functions dealing with centerline detection and manipulation from __future__ import absolute_import, division import os, datetime, logging import numpy as np import sct_utils as sct from ..image import Image logger = logging.getLogger(__name__) def centerline2roi(fname...
{"hexsha": "7c4d9f2c878eba67fec343e6a7c1a2ac4eb72649", "size": 4744, "ext": "py", "lang": "Python", "max_stars_repo_path": "spinalcordtoolbox/centerline/optic.py", "max_stars_repo_name": "valosekj/spinalcordtoolbox", "max_stars_repo_head_hexsha": "266bfc88d6eb6e96a2c2f1ec88c2e185c6f88e09", "max_stars_repo_licenses": ["...
import torch import wandb import numpy as np import os from sklearn.model_selection import train_test_split from attack.unsupervised import generate_chain from attack.supervised import generate_adv from thirdparty.pytorch_msssim import msssim from utils.distributions import gaus_skl def train(model, dataloader, args...
{"hexsha": "b552eb2f22ff2a50a1cb79512d24920d291c9626", "size": 4258, "ext": "py", "lang": "Python", "max_stars_repo_path": "attack/trainer.py", "max_stars_repo_name": "AKuzina/attack_vae", "max_stars_repo_head_hexsha": "c6930e89bb4c7fc676c2c241b81e05ec71bb3363", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7,...
#====================================================================== # IMPORTS: #====================================================================== import csv import numpy as np import matplotlib.pyplot as plt #--------------------------------------------------------- # DEBUGGERS: #-----------------------...
{"hexsha": "c38c73423a0f0c57b86c283253587184fc742c1a", "size": 5766, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/count.py", "max_stars_repo_name": "Olo112/Avrage-Death-Rate", "max_stars_repo_head_hexsha": "9260da3174ad0b9909ac364f15f7690205a370f3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
program demo_ceiling implicit none real :: x = 63.29 real :: y = -63.59 print *, ceiling(x) print *, ceiling(y) ! elemental print *,ceiling([ & & -2.7, -2.5, -2.2, -2.0, -1.5, -1.0, -0.5, & & 0.0, & & +0.5, +1.0, +1.5, +2.0, +2.2, +2.5, +2.7 ]) ...
{"hexsha": "f07ef95b0a59dc967ef439bb3129be5f57182fad", "size": 347, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "example/ceiling.f90", "max_stars_repo_name": "urbanjost/fortran-intrinsic-descriptions", "max_stars_repo_head_hexsha": "59b3618e6c247802cb26f32a1a77e8b718bcc165", "max_stars_repo_licenses": ["MIT...
import numpy as np import numpy as np import skimage.io import skimage.transform from image_transform import perturb import matplotlib.pyplot as plt from matplotlib import animation import matplotlib.pyplot as plt from skimage import io image = np.clip(io.imread("dickbutt.jpg"),0.0, 1.0)[:,:,0] print image.shape res...
{"hexsha": "ffb5506f08d93a1d5ed28584401fa3f3a06002e8", "size": 1842, "ext": "py", "lang": "Python", "max_stars_repo_path": "util_scripts/test_shearing.py", "max_stars_repo_name": "ShuaiW/kaggle-heart", "max_stars_repo_head_hexsha": "022997f27add953c74af2b371c67d9d86cbdccc3", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma weakStatImpWeakenStatImp: fixes \<Psi> :: 'b and P :: "('a, 'b, 'c) psi" and Rel :: "('b \<times> ('a, 'b, 'c) psi \<times> ('a, 'b, 'c) psi) set" and Q :: "('a, 'b, 'c) psi" assumes cSim: "\<Psi> \<rhd> P \<lessapprox><Rel> Q" and cStatEq: "\<And>\<Psi>' R S \<Psi>''. \<lb...
{"llama_tokens": 2808, "file": "Psi_Calculi_Weaken_Stat_Imp", "length": 25}
\documentclass[a4paper,12pt,twoside]{article} %DIF LATEXDIFF DIFFERENCE FILE %DIF DEL doc/sed/v1.2/main.tex Mon Mar 12 15:32:28 2018 %DIF ADD doc/sed/v2.0/main.tex Mon May 14 17:10:32 2018 \usepackage[utf8]{inputenc} \usepackage[english]{babel} \renewcommand\familydefault{\sfdefault} % \usepackage[backref=true,back...
{"hexsha": "4fe547db4dd756a06bda828bdfb5a4b097ebb490", "size": 525086, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "diffs/06-diff-v1.2-v2.0-fixed.tex", "max_stars_repo_name": "georgeslabreche/tubular-bexus-sed", "max_stars_repo_head_hexsha": "c0db957167dfc90c25743af64c514fce837c1405", "max_stars_repo_licenses":...
import sys,re from sympy.solvers import solve from sympy import Symbol from fractions import gcd #최대공약수 from collections import defaultdict Ls=list('abcdefghijklmnopqrstuvwxyz') print("Example = C7H16+O2->CO2+H2O ") eq= input("화학방응식을 입력하세요 : ") first_OBJ = defaultdict(list) second_OBJ = Ls[:] Get = [] a = 1 i = 1...
{"hexsha": "69eaeb0cdc981fb701b817c0f64be008094d3b36", "size": 1568, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chemical equation/equation.py", "max_stars_repo_name": "kwonbosung02/2019_-_-", "max_stars_repo_head_hexsha": "4ae45f9a4bc6e2088522d61fda72cae48a22e553", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Engagement AI """ # Import dependencies from src.engine import reko,Bucket_name,Folder_in_S3,upload_folder_to_s3,s3,facedetect import os import glob import json import cv2 from sklearn.metrics.pairwise import cosine_similarity import pandas as pd import numpy as np from PIL import Image from tqdm im...
{"hexsha": "2f20187066652340cf9f24617d37c2bfc02ce746", "size": 9257, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "ashishkrb7/EngagementAI", "max_stars_repo_head_hexsha": "fe253db082f35643e2c07d5b9c5211247f6496ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
INCLUDE 'VICMAIN_FOR' subroutine main44 implicit integer(a-z) real slat,slon,plat,plon,rpol,requ,range,rlat,rlon,tg,cg,ci,ce, * lumlat,lumlon,rad DATA rad/57.2957795/ call XVMESSAGE( . 'this pix vgr:1636832 image space line 500,samp 500',' ') slat=.55539604/rad ...
{"hexsha": "55c2c79f3da400d54cd4a00ead7645274fcff78d", "size": 2763, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/sub/lumllp/test/tlumllp.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Clause"],...
# -*- coding: utf-8 -*- # # Copyright (c) 2014-2015, Ghislain Antony Vaillant # All rights reserved. # # This file is distributed under the BSD License, see the LICENSE file or # checkout the license terms at http://opensource.org/licenses/BSD-2-Clause). from __future__ import absolute_import, division, print_function...
{"hexsha": "96c7bd87045dc2f867ffcdc6e745091a64ccc919", "size": 894, "ext": "py", "lang": "Python", "max_stars_repo_path": "ismrmrdpy/backend/hdf5.py", "max_stars_repo_name": "ghisvail/ismrmrdpy", "max_stars_repo_head_hexsha": "1e4e5085473cf6fc9731c834b6d62460866c430a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
# -*- coding: utf-8 -*- import numpy as np from numpy.linalg import inv from numba import njit, prange from ..utils import points_of_layers __cache = True @njit(nogil=True, parallel=True, cache=__cache) def rotation_matrices(angles: np.ndarray): """ Returns transformation matrices T_126 and T_45 for each an...
{"hexsha": "9a58605dc6e7136d5ea71989937f85ad0ddcf03c", "size": 8470, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dewloosh/solid/model/mindlin/utils.py", "max_stars_repo_name": "dewloosh/dewloosh-solid", "max_stars_repo_head_hexsha": "dbd6757ddd1373df870ccd99f5ee791c08d342cb", "max_stars_repo_licenses": [...
from flask import Flask,request,jsonify from funcs import getClasses,bagOfWords,load_JSON,ProcessData from pathlib import Path import numpy as np from model import get_prediction import os from flask_cors import CORS app = Flask(__name__) CORS(app) dir_path = os.path.dirname(os.path.realpath(__file__)) root = Path(d...
{"hexsha": "bd16902cdf4da151734a2ec6ea45496f367ff7b7", "size": 1582, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "deepraj1729/TChatBot-API", "max_stars_repo_head_hexsha": "24fb47c0801ee798d251975e8d2374b0b70dff93", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
module NicePipes if VERSION < v"1.3.0-rc4" @warn "Can't use binary artifacts, using your system's `grep` and `sed`." grep(f) = f("grep") sed(f) = f("sed") else using grep_jll, sed_jll end struct ShPipe{T,C} val::T cmd::C args::Cmd end # like Base.open, but doesn't throw if exitcode is non...
{"hexsha": "40fd9dd59cdd5a33f4e25304453982f1765d17ac", "size": 2084, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/NicePipes.jl", "max_stars_repo_name": "simeonschaub/NicePipes.jl", "max_stars_repo_head_hexsha": "cc0382a7510f997726317b8a872a5b8daa9f55ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import cv2 from skimage.transform import PiecewiseAffineTransform, warp from skimage import img_as_ubyte from scipy.ndimage.interpolation import map_coordinates from scipy.ndimage.filters import gaussian_filter import FIMM_histo.deconvolution as deconv f...
{"hexsha": "6f19d73c4a2b86926625b91eafb21071fc6b34b4", "size": 19390, "ext": "py", "lang": "Python", "max_stars_repo_path": "src_RealData/Data/ImageTransform.py", "max_stars_repo_name": "XYZsake/DRFNS", "max_stars_repo_head_hexsha": "73fc5683db5e9f860846e22c8c0daf73b7103082", "max_stars_repo_licenses": ["MIT"], "max_st...
# Tests for @snn_kw constructors coretype(T::UnionAll) = coretype(T.body) coretype(T::DataType) = T paramnames(T) = coretype(T).parameters function test_typeparams(Model; args=()) Model = coretype(Model) n = Model(args...) for idx in 1:length(fieldnames(Model)) fieldtypes(Model)[idx] isa TypeVar ||...
{"hexsha": "83c75c54ac88ffd7f2b701153eda77abcc0edcea", "size": 1766, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ctors.jl", "max_stars_repo_name": "aquaresima/SpikingNeuralNetworks.jl", "max_stars_repo_head_hexsha": "8135f6c375ca07a07036e9894d2b58910e8e46df", "max_stars_repo_licenses": ["MIT"], "max_star...
import pytest, os import numpy as np import astraeus.hdf5IO as h5io """ pytest --cov=. """ def test_writeH5(): """ Test writing HDF5 file. """ flux = np.ones((5,5)) time = np.arange(5) filename = "foo.hdf5" success = h5io.writeH5(filename, flux=flux, time=time) assert success == 1 ...
{"hexsha": "605ea6f6da1ba831082fdc33113ae3af6ef3e2d4", "size": 974, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_h5.py", "max_stars_repo_name": "kevin218/Astreus", "max_stars_repo_head_hexsha": "b0e346193e22e2bef5d6103ee85022c89ba2eb04", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
# Copyright 2020 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
{"hexsha": "811075c5573ba0dddd94d0b6f6085af05f2cb270", "size": 7724, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_graphics/rendering/reflectance/tests/lambertian_test.py", "max_stars_repo_name": "jackd/graphics", "max_stars_repo_head_hexsha": "736b99a3306e302674a9b7599e3e2857b85fdb74", "max_stars_r...
[STATEMENT] theorem (in Congruence_Rule) Ang_split_unique : assumes "Def (Ang (An h1 o1 k1))" "Def (Ang (An h2 o2 k2))" "Cong (Geos (Ang (An h1 o1 k1)) add Emp) (Geos (Ang (An h2 o2 k2)) add Emp)" "Ang_inside (An h1 o1 k1) l1" "Ang_inside (An h2 o2 k2) l21" "Cong (Geos (Ang (An h1 o1 l1)) add Emp...
{"llama_tokens": 11362, "file": "Foundation_of_geometry_Congruence", "length": 76}
import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters from statsmodels.tsa.holtwinters import ExponentialSmoothing from gamestonk_terminal.helper_funcs import ( check_positive, get_next_stock_market_days, parse_known...
{"hexsha": "9f15c595217dd7b3192b9053e6d65802a6f6d162", "size": 10427, "ext": "py", "lang": "Python", "max_stars_repo_path": "gamestonk_terminal/prediction_techniques/ets.py", "max_stars_repo_name": "sandsturm/GamestonkTerminal", "max_stars_repo_head_hexsha": "1969ff3b251711099a448024ec71e5b4e50413f7", "max_stars_repo_l...
C %W% %G% function get_value (ib, ia) integer ib, ia include 'tspinc/params.inc' include 'tspinc/wstequ.inc' include 'tspinc/room.inc' include 'tspinc/wfeq.inc' include 'tspinc/vfhistory.inc' include 'tspinc/filter.inc' if (ia .eq. 1) then volt = sqrt (e...
{"hexsha": "3b7eca9563bd8e931459f51a6146341b302410c5", "size": 820, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "libtsp/get_value.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Returns parameters of a two phase hyper-exponential fitting a mean and an SCV. """ function hyper_exp_init(mean_desired::Float64, scv_desired::Float64)::PHDist scv_desired < 1.0 && error("SCV must be greater than 1") μ1 = 1/(scv_desired+1) #mean parameter p = (scv_desired-1)/(scv_desired+1+2/(μ1^2)-4...
{"hexsha": "25e889f3213d9df79a6aacc8985d0a1346e41584", "size": 1099, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structured_ph.jl", "max_stars_repo_name": "yoninazarathy/PhaseTypeDistributions.jl", "max_stars_repo_head_hexsha": "d709fc6f763baa6eeec50d10452482cd295606a0", "max_stars_repo_licenses": ["MIT"]...
#include <tiny.h> #include <convex.h> #define BOOST_AUTO_TEST_MAIN #include <boost/test/auto_unit_test.hpp> #include <boost/test/unit_test_suite.hpp> #include <boost/test/floating_point_comparison.hpp> #include <boost/test/test_tools.hpp> BOOST_AUTO_TEST_SUITE(convex_simplex); BOOST_AUTO_TEST_CASE(simplex_testing) {...
{"hexsha": "3af7cb84a22b3e933d0c6d538f54669a790bcf41", "size": 19988, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "PROX/FOUNDATION/CONVEX/unit_tests/convex_simplex/convex_simplex.cpp", "max_stars_repo_name": "diku-dk/PROX", "max_stars_repo_head_hexsha": "c6be72cc253ff75589a1cac28e4e91e788376900", "max_stars_rep...
import pandas as pd import numpy import re file = pd.read_csv("works.csv", header=0, index_col=False) administration = r'(.*менедж.*)|(.*директ.*)|(.*секретар.*)|(.*управ.*)' studies = r'(.*педагог.*)|(.*преподават.*)|(.*учител.*)|(.*воспита.*)' law = r'(.*юри.*)|(.*адвокат.*)' finance = r'(.*эконом.*)|(.*банк.*)|(.*...
{"hexsha": "b8a84cf4e496388614e5b7ab21dbf0a84d121e41", "size": 1822, "ext": "py", "lang": "Python", "max_stars_repo_path": "jobs.py", "max_stars_repo_name": "KirillDmit/da", "max_stars_repo_head_hexsha": "67afbc46f478f5591724ece065a5d8de1a235767", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
import time import string import math import random import csv from functools import reduce from openpyxl import load_workbook import pandas as pd import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import seaborn as sns import itertools import selenium from selenium impor...
{"hexsha": "53edcce747f9f88cfb0490c35337f92dd19156c0", "size": 19056, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/source/GA_Analysis.py", "max_stars_repo_name": "jg719/test_documentation", "max_stars_repo_head_hexsha": "0b466ada5b7de7b22dcc1135a15ed72aa68f7966", "max_stars_repo_licenses": ["MIT"], "max_...
import pytest import pandas as pd import numpy as np from orbit.diagnostics.backtest import TimeSeriesSplitter, BackTester from orbit.diagnostics.metrics import smape, wmape, mape, mse, mae, rmsse from orbit.models import LGT, KTRLite @pytest.mark.parametrize( "scheduler_args", [ { 'min_tr...
{"hexsha": "6d1ead99b3081605e3d741e4f6029a7198a3c8fc", "size": 6553, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/orbit/diagnostics/test_backtest.py", "max_stars_repo_name": "uber/orb", "max_stars_repo_head_hexsha": "c1d65082728e627d1bd048978a3a1abb85cbbee6", "max_stars_repo_licenses": ["Apache-2.0"], "...
import torch.nn.functional as F from torch.autograd import Variable import torch import torch.nn as nn import numpy as np class cdssmtb(nn.Module): def __init__(self, opt): super(cdssmtb, self).__init__() self.vocab_size = opt.vocab_size self.d_word_vec = opt.term_size self.use_cuda...
{"hexsha": "b65f42137400bb6a569832d2408b36f4e7aa3067", "size": 2426, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/cdssmtb.py", "max_stars_repo_name": "thunlp/NeuDEF", "max_stars_repo_head_hexsha": "8e8b4cc1da2d51783d23729a8563c6186230dff8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
""" Script for serving. """ import os import random import numpy as np import torch from PIL import Image from flask import Flask, request from utils.datasets import letterbox from utils.general import check_img_size, non_max_suppression, scale_coords, xyxy2xywh, plot_one_box from utils.serve import encode_image, dec...
{"hexsha": "97c6704fe4c75d73303416732a38bb57019a4df1", "size": 3468, "ext": "py", "lang": "Python", "max_stars_repo_path": "yolov5_shellfish/serve_http.py", "max_stars_repo_name": "kesamet/examples", "max_stars_repo_head_hexsha": "6baef94cc7db99abf17ca3df7dae35fcc3b08d25", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
'''Backtest Moving Average (MA) crossover strategies ''' import math import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from backtester import Backtester class HigherPriceBacktester(Backtester): '''Backtest a strategy that goes long when the price today is higher than loo...
{"hexsha": "a6784116dfef46138c0d9d009334ddd2bbdad3bd", "size": 1382, "ext": "py", "lang": "Python", "max_stars_repo_path": "backtesters/higher.py", "max_stars_repo_name": "learn-crypto-trading/crypto-price-analysis", "max_stars_repo_head_hexsha": "70618ecf296e40404f3ebaa2e640c90097c227cb", "max_stars_repo_licenses": ["...
import numpy as np from sklearn.metrics import precision_score, recall_score, f1_score, confusion_matrix, precision_recall_fscore_support def compute_accuracy(y_true, y_pred, n_class): """ compute accuracy for each class and the "macro"&"micro" average accuracies. :param y_true: 1-D array or 2-D array. :p...
{"hexsha": "a42a1bee9a2ffde6e0a424a9c831af2881d422f9", "size": 6186, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/utils/metric_utils.py", "max_stars_repo_name": "liuph0119/Semantic_Segmentation_Keras", "max_stars_repo_head_hexsha": "b595f0e2d62c471256dcc800f9539dbdf354d391", "max_stars_repo_licenses": ["...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import Imputer dataset = pd.read_csv('DataSample/train.csv') test_data = pd.read_csv('DataSample/test.csv') # Histogram dataset['Age'].h...
{"hexsha": "45ab629a06abf62f9ea99a41bdd943866db25987", "size": 3755, "ext": "py", "lang": "Python", "max_stars_repo_path": "Sundar/Titanic-Analysis/ChatVisualization.py", "max_stars_repo_name": "techunison-software/data-science-trials", "max_stars_repo_head_hexsha": "46c9e7bfcda8270573e49a7be8cee3b9c445c2cf", "max_star...
From Coq Require Import Arith.Arith. From Coq Require Import Arith.EqNat. From Coq Require Import Arith.PeanoNat. Import Nat. From Coq Require Import micromega.Lia. From Coq Require Import micromega.Zify. From Coq Require Import Lists.List. From Coq Require Import Reals.Reals. From Coq Require Import Logic.FunctionalEx...
{"author": "ChezJrk", "repo": "verified-scheduling", "sha": "e9876602147114e4378f10ac1402bd5705c0cef0", "save_path": "github-repos/coq/ChezJrk-verified-scheduling", "path": "github-repos/coq/ChezJrk-verified-scheduling/verified-scheduling-e9876602147114e4378f10ac1402bd5705c0cef0/src/LetLifting.v"}
from functools import reduce import numpy as np from manim2.constants import * from manim2.animation.animation import OldAnimation from manim2.old_animations.old_movement import OldHomotopy from manim2.animation.composition import OldAnimationGroup from manim2.animation.composition import OldSuccession from manim2.ol...
{"hexsha": "bbdaad93a2e533c7274186945c9457d74cb4771b", "size": 9428, "ext": "py", "lang": "Python", "max_stars_repo_path": "manim2/old_animations/old_indication.py", "max_stars_repo_name": "tigerking/manim2", "max_stars_repo_head_hexsha": "93e8957e433b8e59acb5a5213a4074ee0125b823", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- """ Created on Mon Mar 9 01:50:32 2020 @author: varun """ import numpy as np import math class adaBoost(object): def __init__(self, weakClf=5): self.weakClf = weakClf self.thresh = None self.alpha = None self.polarity = 1 self.fea...
{"hexsha": "79f3c3b9928f684239ee61adf69b8acee2613c13", "size": 3739, "ext": "py", "lang": "Python", "max_stars_repo_path": "Face-Detection/Face detection using probabilistic-modelling/Adaboost/ada_boost.py", "max_stars_repo_name": "swapnilgarg7/Face-X", "max_stars_repo_head_hexsha": "fab21bf667fa7387b8e73e5a1d72fcba4fb...
# Let's Do Some Algebra In a Jupyter notebook, with sympy. ```python # First we import sympy: from sympy import * # Init pretty printing init_printing() ``` ```python # Then we define some symbols: x, a, b, c, d = symbols('x, a, b, c, d') ``` ```python # Write some expressions with our symbols: expr1 = a + x * c...
{"hexsha": "8d5f17f0ec3a52a32e742593a6ba572c7a7d46f1", "size": 9326, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "JupyterAlgebraTest.ipynb", "max_stars_repo_name": "ErnstHot/Jupyter", "max_stars_repo_head_hexsha": "bcaf5dde1411e8024f41802bc78f1bf6f7cb73e5", "max_stars_repo_licenses": ["MIT"], "ma...
import requests import time from time import sleep from distutils.version import LooseVersion from functools import partial from codetiming import Timer from astropy.io.votable import parse as votableparse from pyvo.dal.tap import AsyncTAPJob, TAPService, TAPQuery, TAPResults from pyvo.dal.exceptions import DALQueryE...
{"hexsha": "78339111f77208f3bc9f9218f1ed1730e5de8363", "size": 9458, "ext": "py", "lang": "Python", "max_stars_repo_path": "servicemon/pyvo_wrappers.py", "max_stars_repo_name": "JohnGood/servicemon", "max_stars_repo_head_hexsha": "a320033904ee86c710248e68f12de7da7959853c", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# -*- coding: utf-8 -*- """ @author: Pu Du @email: pdu2@lsu.edu anaconda is required: https://www.continuum.io/downloads modified xyz file is required: **************************************************** *number of atom * *Boxx Boxy Boxz * *Atom...
{"hexsha": "437eb1f9814f41c2a1f7b4a5cb29d1894952d4f5", "size": 13644, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/cf.py", "max_stars_repo_name": "ipudu/correlation_functions", "max_stars_repo_head_hexsha": "0778d857d30c8b9c4132ff93de6debc313b9a8e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import data.num.lemmas data.list.basic .tactics .int open tactic def nat.to_num (n : nat) : num := n def int.to_znum (z : int) : znum := z def nat.to_znum : nat → znum := int.to_znum ∘ nat.to_int def num.to_nat (n : num) : nat := n def znum.to_int (z : znum) : int := z def znum.to_nat : znum → nat := int.to_nat ∘ znu...
{"author": "skbaek", "repo": "cooper", "sha": "812afc6b158821f2e7dac9c91d3b6123c7a19faf", "save_path": "github-repos/lean/skbaek-cooper", "path": "github-repos/lean/skbaek-cooper/cooper-812afc6b158821f2e7dac9c91d3b6123c7a19faf/num.lean"}
import random from typing import List, Set, Tuple, Union from pathlib import Path import gym import networkx as nx import numpy as np from gym.spaces import Discrete, MultiBinary from gym_PBN.types import GYM_STEP_RETURN, REWARD, STATE, TERMINATED from .bittner import base, utils class PBNTargetEnv(gym.Env): me...
{"hexsha": "67c31b606a39588e47ce3475169da4bae679870d", "size": 11031, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_PBN/envs/pbn_target.py", "max_stars_repo_name": "UoS-PLCCN/gym-PBN", "max_stars_repo_head_hexsha": "b5d22cf5892cc004d24f66b236cd2d5edcbddddc", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import os import sys import numpy as np import pprint import time import _init_paths import torch import pickle from roi_data_layer.roidb import combined_roidb from roi_data_layer.roibatchLoader import roibatchLoader from model.utils.config import cfg, cfg_from_file, cfg_from_list, get_output_dir from model.rpn.bbox_t...
{"hexsha": "5ea0fc77b67f1ba3baa34f30cb359ad0bb5a1b16", "size": 11053, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_annos.py", "max_stars_repo_name": "strongwolf/CDG", "max_stars_repo_head_hexsha": "a78864ca3519de77deb60a11f68059b76e076b5c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "...
module aws_cloudfront include("AWSCorePrototypeServices.jl") using .AWSCorePrototypeServices: cloudfront """ List CloudFront distributions. """ ListDistributions2019_03_26() = cloudfront("GET", "/2019-03-26/distribution") """ Add tags to a CloudFront resource. """ TagResource2019_03_26(Resource, Tags) = cloudfront("P...
{"hexsha": "6cce14ffb99f4987718d57a8e387332641863fa0", "size": 14954, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/services/cloudfront.jl", "max_stars_repo_name": "nicoleepp/JuliaCloud-AWS-State", "max_stars_repo_head_hexsha": "a1568b0e3f8ef48e5d8ed5a737a9361a38d51591", "max_stars_repo_licenses": ["MIT"], ...
/** * Copyright (c) 2017 Melown Technologies SE * * 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 f...
{"hexsha": "79efe2474ac26e9e19e42ce600e3a0972dbdb5e4", "size": 3323, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "mapproxy/src/mapproxy/generator/geodatavectorbase.hpp", "max_stars_repo_name": "maka-io/vts-mapproxy", "max_stars_repo_head_hexsha": "13c70b1bd2013d76b387900fae839e3948e741c3", "max_stars_repo_licen...
import vision.datasets.mtsd_default_classes as dflt from sys import argv import pathlib import json import os import numpy as np from tqdm import tqdm if len(argv) < 4: print("Usage: prune_mtsd_dataset.py <dataset> <orig split> <output> [-y]") exit(1) dataset_path = pathlib.Path(argv[1]) orig_split = pathlib....
{"hexsha": "70b7076f97f6c7d0840819fb165ca8007fcb3af3", "size": 2560, "ext": "py", "lang": "Python", "max_stars_repo_path": "balance_mtsd_dataset.py", "max_stars_repo_name": "hdamron17/pytorch-ssd", "max_stars_repo_head_hexsha": "04c00243d40c1f9d2d3d6e17f711d7da5e7177f6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma leftmost_unique: "leftmost i a \<Longrightarrow> leftmost j a \<Longrightarrow> i = j" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>leftmost i a; leftmost j a\<rbrakk> \<Longrightarrow> i = j [PROOF STEP] by (metis leftmost_def leftmost_notword linorder_neqE_nat)
{"llama_tokens": 109, "file": "LocalLexing_Derivations", "length": 1}
####################################################################### # Copyright (C) # # 2020 solitone (https://github.com/solitone) # # 2018 Carsten Friedrich (Carsten.Friedrich@gmail.com). # # ...
{"hexsha": "8f79b50c5cecc563100d9c6d4eea6738f643e5d8", "size": 5051, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "solitone/tic-tac-toe", "max_stars_repo_head_hexsha": "a6795c42700a333e829649116f41ef2cfbf43c3a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
theory Closure imports "../03Debruijn/Debruijn" begin datatype closure = CConst nat | CLam ty "closure list" dexpr datatype cframe = CApp1 "closure list" dexpr | CApp2 closure | CReturn "closure list" datatype closure_state = CSE "cframe list" "closure list" dexpr | CSC "cframe list" closure fun...
{"author": "xtreme-james-cooper", "repo": "Lambda-RAM-Compiler", "sha": "24125435949fa71dfc5faafdb236d28a098beefc", "save_path": "github-repos/isabelle/xtreme-james-cooper-Lambda-RAM-Compiler", "path": "github-repos/isabelle/xtreme-james-cooper-Lambda-RAM-Compiler/Lambda-RAM-Compiler-24125435949fa71dfc5faafdb236d28a098...
program t print *,'don''t' end program t
{"hexsha": "04691b68f00bf6062d898229ce283fdd92e23e84", "size": 59, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0044x/t.f", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, "m...
[STATEMENT] lemma DirProds_one_cong: "(DirProds f {G}) \<cong> (f G)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. DirProds f {G} \<cong> f G [PROOF STEP] using DirProds_one_iso is_isoI [PROOF STATE] proof (prove) using this: (\<lambda>x. x ?G) \<in> Group.iso (DirProds ?f {?G}) (?f ?G) ?h \<in> Group.iso ?G ?H \<...
{"llama_tokens": 193, "file": "Finitely_Generated_Abelian_Groups_DirProds", "length": 2}
import numpy as np from numdifftools import Gradient, Hessian, Jacobian import itertools import seaborn as sns # import pandas as pd from cycler import cycler import palettable import logging.config import matplotlib.pyplot as plt from plots.plot_helper_functions import set_size import os import matplotlib a...
{"hexsha": "a22119a02ca742e1de5f0003468c8cff0dfc6029", "size": 15618, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hybrid_rosenbrock.py", "max_stars_repo_name": "leviyevalex/hybrid_rosenbrock", "max_stars_repo_head_hexsha": "798a5442db78e1676dafd8a90f4801a337cc17b8", "max_stars_repo_licenses": ["MIT"], "m...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def nlschools(path): """Eighth-Grade Pupils in the Netherlands Snijder...
{"hexsha": "e7e0c85a3d0f433476689b60385028c6f8351404", "size": 2109, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/nlschools.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma isin_prefix : assumes "isin t (xs@xs')" shows "isin t xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. isin t xs [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. isin t xs [PROOF STEP] obtain m where "t = PT m" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>m. ...
{"llama_tokens": 2216, "file": "FSM_Tests_Prefix_Tree", "length": 26}
#!/usr/bin/env python import numpy as np import math import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def SchwarzD(x): """ :param x: a vector of coordinates (x1, x2, x3) :return: An approximation of the Schwarz D "Diamond" infinite periodic minimal surface """ a = np.sin(x...
{"hexsha": "eb18b0de5117179dd3480122289b3b3b4a16142b", "size": 1984, "ext": "py", "lang": "Python", "max_stars_repo_path": "LLC_Membranes/BCC/Scripts/pn3m.py", "max_stars_repo_name": "shirtsgroup/LLC_Membranes", "max_stars_repo_head_hexsha": "e94694f298909352d7e9d912625314a1e46aa5b6", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python # coding: utf-8 # In[1]: import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import pandas as pd import datashader as ds from pyproj import Proj, transform from datashader.utils import lnglat_to_meters as webm from functools import partial from datashader.uti...
{"hexsha": "54737436359a1f68eeaf6b2139932f8782ec3c8d", "size": 6435, "ext": "py", "lang": "Python", "max_stars_repo_path": "Baumkataster_Visualisierung/Viz/Baumanalyse_Frankfurt.py", "max_stars_repo_name": "smorrow1/baumkataster_viz", "max_stars_repo_head_hexsha": "611085a4b5e4f334f7016e4d3df0efbf34b56f72", "max_stars_...
#!/usr/bin/env julia pnglist = filter!(r"\.png", readdir()) function expand(locci) list = [] pos = split(locci, ':') chr = pos[1] region = split(pos[2], '-') n = parse(Int64, region[1]) while n <= parse(Int64, region[end]) out = "$chr" * ":" * "$n" push...
{"hexsha": "f277b3fbcb614c1a75134b8f4d6a1474ad2b4acd", "size": 815, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "misc/filter_igvIMG.jl", "max_stars_repo_name": "mgvel/NGS.jl", "max_stars_repo_head_hexsha": "56f5cabacdb47bcabe930541afdf7a74680106a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
#ifndef MEDIA_SERVER_H #define MEDIA_SERVER_H class rtmp2rtc_writer; class hls_writer; class httpflv_server; class websocket_server; class rtmp_server; class httpapi_server; class rtmp_relay_manager; #include <stdint.h> #include <stddef.h> #include <iostream> #include <boost/asio.hpp> class MediaServer { public: ...
{"hexsha": "6ec975f3951cb4a9d4ee9f784c0b3919bc6cbe7c", "size": 1235, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/media_server.hpp", "max_stars_repo_name": "mtdxc/cpp_media_server", "max_stars_repo_head_hexsha": "98e267e712690c2fe36796ce752fcc1b969afa24", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
c----------------------------------------------------------------------- subroutine bjinta(ier) c----------------------------------------------------------------------- c fin. state interactions and decays c----------------------------------------------------------------------- include 'epos.inc' dou...
{"hexsha": "9814d3f5dd9023b3b2f4806b75a20731276571a7", "size": 199391, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "GeneratorInterface/ReggeGribovPartonMCInterface/src/epos-int.f", "max_stars_repo_name": "ckamtsikis/cmssw", "max_stars_repo_head_hexsha": "ea19fe642bb7537cbf58451dcf73aa5fd1b66250", "max_stars_r...
# maintenance.jl println("Updating all packages\n") @time Pkg.update() println("Done!\n")
{"hexsha": "06defa5fe4424d52340a40872b1deaaa28fa1a6e", "size": 92, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "maintenance.jl", "max_stars_repo_name": "anthony-wang/julia-scripts", "max_stars_repo_head_hexsha": "01401a57873103c3b12f0da8e0551932834a2ef6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#= Examples of tuples. =# # Tuple of strings people = ("Marge", "Homer", "Bart", "Lisa") println(people) println(people[2]) # Tuple with one item item = (2,) println(item[1]) # Named tuple vehicle = (make="Ford", model="Bronco", year=2021) println(vehicle.make) println(vehicle[1]) println(vehicle.model) println(vehi...
{"hexsha": "a75f63e897d9a191f4668b7ef21af75c5f02bfef", "size": 330, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/tuples.jl", "max_stars_repo_name": "wigging/julia-computing", "max_stars_repo_head_hexsha": "927ee1667d5aa88a9f634fb4135a58d1244613eb", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/// @file /// /// @brief Thread which does correlation /// @details This class holds shared pointers to the filler and the buffer /// manager. The parallel thread extracts data corresponding to all three /// baselines, some spectral channel and beam, correlates them and passes /// to the filler for writing. The fille...
{"hexsha": "81a52e4d212062045ef709e53c47316b4d942a2f", "size": 7687, "ext": "cc", "lang": "C++", "max_stars_repo_path": "Code/Components/swcorrelator/current/swcorrelator/CorrWorker.cc", "max_stars_repo_name": "rtobar/askapsoft", "max_stars_repo_head_hexsha": "6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e", "max_stars_repo_...
# Automatically generated using Clang.jl const LIBSSH2_H = 1 const LIBSSH2_COPYRIGHT = "2004-2019 The libssh2 project and its contributors." const LIBSSH2_VERSION = "1.9.0" const LIBSSH2_VERSION_MAJOR = 1 const LIBSSH2_VERSION_MINOR = 9 const LIBSSH2_VERSION_PATCH = 0 const LIBSSH2_VERSION_NUM = 0x00010900 const LIBS...
{"hexsha": "55ac70b020fa8576ce7684bba4a100edf1a61459", "size": 24962, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/libssh2/libssh2_api.jl", "max_stars_repo_name": "PhilipVinc/LibSSH2.jl", "max_stars_repo_head_hexsha": "269f0da16a2e730e3356e0b24432ad3ffb79768f", "max_stars_repo_licenses": ["MIT"], "max_star...
#pragma once #include "order_executor.hpp" #include <ccapi_cpp/ccapi_logger.h> #include <ccapi_cpp/ccapi_macro.h> #include <ccapi_cpp/ccapi_session.h> #include <boost/describe/enum.hpp> #include <boost/log/trivial.hpp> #include <atomic> #include <map> #include <tuple> #include <unordered_map> #include <vector> nam...
{"hexsha": "2bc4130e65b27357297d179fff02434ec75484d6", "size": 6087, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/ccex_order_executor.hpp", "max_stars_repo_name": "Twon/cpp_crypto_algos", "max_stars_repo_head_hexsha": "e785f6c25ef50dc3c2f593b08b6857dffcd32eca", "max_stars_repo_licenses": ["MIT"], "max_stars...
import os import torch from PIL import Image from torch.utils.data import Dataset import pandas as pd import numpy as np class RoofImages(Dataset): def __init__(self, csv_file, transforms, npid=False,test_mode=False, classes = None): self.transforms = transforms self.data_df = pd.read_csv...
{"hexsha": "434f9ec7fa4cee7d86152e4d2847b7ab41c3def9", "size": 3399, "ext": "py", "lang": "Python", "max_stars_repo_path": "brails/modules/Roof_Material_Classification/utils/datasets.py", "max_stars_repo_name": "fmckenna/BRAILS", "max_stars_repo_head_hexsha": "cdd4ca4bbc50cbf58f03877b46f1b3d10a281204", "max_stars_repo_...
[STATEMENT] lemma partition_by_Nil [simp]: "partition_by [] ys = replicate (length ys) []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. partition_by [] ys = replicate (length ys) [] [PROOF STEP] by (induct ys) simp_all
{"llama_tokens": 91, "file": "FO_Theory_Rewriting_Util_Multihole_Context", "length": 1}
from astropy.io import fits import sys def parse_expression(expr): pass def create_parser(subparsers): parser_map = subparsers.add_parser("map", help="map help") parser_map.add_argument("-o", "--output", metavar="OUTFILE", default=sys.stdout.buffer) parser_map.add_argument("-m", "--map-function", requ...
{"hexsha": "f9ca8e5821c2816c862065331c0c22a19d113ceb", "size": 459, "ext": "py", "lang": "Python", "max_stars_repo_path": "miniraf/map.py", "max_stars_repo_name": "vulpicastor/miniraf", "max_stars_repo_head_hexsha": "05653a8138098ac49e19fb43cc4fca890102b2ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ \example X4M200_X4M300_printout_pulsedoppler_data.py #Target module: X4M200,X4M300 #Introduction: This is an example of how to set up a module for streaming pulse-Doppler telegrams, and how to assemble them to whole range-Doppler matrices. #Comm...
{"hexsha": "198d9fedbdafdb655f6f7d4b66a9c6a120d40176", "size": 6688, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup/pymoduleconnector/Linux/pymoduleconnector/examples/X4M200_X4M300_printout_pulsedoppler_data.py", "max_stars_repo_name": "kulia/x4m300-parser", "max_stars_repo_head_hexsha": "f37451774daf9d35...
import numpy as np from .policy import ParametricPolicy from scipy.stats import multivariate_normal class AbstractGaussianPolicy(ParametricPolicy): """ Abstract class of Gaussian policies. """ def __call__(self, state, action): mu, sigma = self._compute_multivariate_gaussian(state)[:2] ...
{"hexsha": "e8d7e7ce3a6112419d626e686e6b58334a4f4ac9", "size": 11182, "ext": "py", "lang": "Python", "max_stars_repo_path": "x_mushroom_rl/policy/gaussian_policy.py", "max_stars_repo_name": "ml-research/X-mushroom-rl", "max_stars_repo_head_hexsha": "ef5f131d3cfa9c229a614c044d8c001afe8812d2", "max_stars_repo_licenses": ...
import logging import time from typing import Optional import cv2 import numpy as np from numpy import ndarray from config import CarStatus, Config logger = logging.getLogger(__name__) class Track: def __init__(self) -> None: self._jpeg = None self._lines = Config.PROCESS_LINES def __call_...
{"hexsha": "687c0c0c98297f12f0a7de5ad5e4dccfa66d2f5b", "size": 2902, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/track.py", "max_stars_repo_name": "guitaoliu/raspi-autonomous-vehicle", "max_stars_repo_head_hexsha": "1cf41038b4b03a66b09f4194710109b00ce2ba2d", "max_stars_repo_licenses": ["MIT"], "max_s...
// -*- C++ -*- // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Jiao Lin // California Institute of Technology // (C) 2007 All Rights Reserved // // {LicenseText} // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
{"hexsha": "3c8fb467af3d3f21bbcb03d838d06ec738fea306", "size": 1677, "ext": "cc", "lang": "C++", "max_stars_repo_path": "packages/mccomponents/mccomponentsbpmodule/wrap_He3TubeKernel.cc", "max_stars_repo_name": "mcvine/mcvine", "max_stars_repo_head_hexsha": "42232534b0c6af729628009bed165cd7d833789d", "max_stars_repo_li...
from __future__ import print_function import numpy as np import cv2 import sys import os def print_process_bar(percent): cnt = 50 print('['+('>'*int(percent*cnt+0.5)).ljust(cnt)+']%2d%s'%(int(percent*100),'%'), end='\r') def video2img(video_file,save_dir,stride=1,resize=1,suffix='.png'): if not os.path.ex...
{"hexsha": "f5a8e6b1272c4091b31e602f26968651febd5dc3", "size": 1901, "ext": "py", "lang": "Python", "max_stars_repo_path": "video2img.py", "max_stars_repo_name": "LEE-SEON-WOO/grabcut_to_labelme", "max_stars_repo_head_hexsha": "107c6bf7332e8cabd1a7b13b2bdd14d818468dfc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
c--------------------------------------------------------------------- double precision function randlc (x, a) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c This routine returns a uniform pseudorandom double pre...
{"hexsha": "c7080717ceb0260973f3860a56db6d6c4a4dabbc", "size": 7104, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/NPB3.1/common/randdpvec.f", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_licenses": ["MIT...
MODULE trdglo USE oce USE dom_oce USE sbc_oce USE trd_oce USE phycst USE ldftra USE ldfdyn USE zdf_oce USE zdfddm USE eosbn2 USE phycst USE lib_mpp USE in_out_manager USE iom IMPLICIT NONE PRIVATE PUBLIC :: trd_glo PUBLIC :: trd_glo_init REAL(KIND = wp) :: tvolt REAL(KIND = wp) :...
{"hexsha": "efd60c9eb8e09a0ab9bd7fff291859c9439c87c7", "size": 19171, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "trdglo.f90", "max_stars_repo_name": "deardenchris/psycloned_nemo_CDe", "max_stars_repo_head_hexsha": "d0040fb20daa5775575b8220cb5f186857973fdb", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import numpy as np from tensorflow.keras.models import Model from tensorflow.keras import layers from tensorflow.keras import backend from tensorflow.keras import regularizers import lib.tensor_helper as tensor_helper class ConvAutoencoder(Model): ''' Appropriate hyperparameter combos: learning rate:...
{"hexsha": "db9b1f2efcbbb7e174dab21ae1f74ca31aabefd8", "size": 2117, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/classes/model_classes/ConvAutoencoder.py", "max_stars_repo_name": "jwspaeth/FAA-Project", "max_stars_repo_head_hexsha": "afa9d3bec10deead48c4b17dff69df2e02691e41", "max_stars_repo_licenses": [...
from maze import BlockingMaze import numpy as np class DynaAgentPlus: def __init__(self, epsilon=0.3, lr=0.9, n_steps=5, episodes=1, kappa=1e-4, with_model=True, enable_change_env=False, enable_after=0): self.maze = BlockingMaze() self.state = self.maze.state self.actions = self.maze.actions_index self.sta...
{"hexsha": "fa2047af0685a685c223ebcb2878800d6f797d90", "size": 3396, "ext": "py", "lang": "Python", "max_stars_repo_path": "dyna/dynaqplus.py", "max_stars_repo_name": "code-asc/rl", "max_stars_repo_head_hexsha": "8e217f695d4219327fcec58061c213e534578a4d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
using CoilFunctions using CoilFunctions: ideal_fill, AWG_Chart using Unitful using Test @testset "CoilGeometry" begin @test CoilGeometry(10u"mm",20u"mm",30u"mm") == CoilGeometry(10.0u"mm",20.0u"mm",30.0u"mm") @test CoilGeometry(10u"mm",20u"mm",30u"mm", 1.5u"mm") == CoilGeometry(13u"mm",17.0u"mm",27u"mm") @...
{"hexsha": "c9ad60a7fb438c70bc0b30fd49d101d598f72a46", "size": 3083, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "DanBerge/CoilFunctions.jl", "max_stars_repo_head_hexsha": "4d836be16005e1cb41410da8fb6eeacfc4cd2075", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Computes statistics for dense isosurface superresolution. """ import math import os import os.path import time import json import h5py import collections import numpy as np import scipy.misc import cv2 as cv import torch import torch.nn as nn import torch.nn.functional as F import matplotlib.pyplot as plt from...
{"hexsha": "66bfc94b6fe77faf24fb664425bc78d9cb5e91ca", "size": 18129, "ext": "py", "lang": "Python", "max_stars_repo_path": "network/statistics/mainDenseIsoStats.py", "max_stars_repo_name": "shamanDevel/AdaptiveSampling", "max_stars_repo_head_hexsha": "2d3014a61fc8128b2b5c578a3fc6bade4cb3fe4e", "max_stars_repo_licenses...
[STATEMENT] theorem sturm_above: assumes "poly p a \<noteq> 0" shows "card {x. poly p x = 0 \<and> a < x} = changes_gt_smods a p (pderiv p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. int (card {x. poly p x = 0 \<and> a < x}) = changes_gt_smods a p (pderiv p) [PROOF STEP] using sturm_tarski_above[OF assms, ...
{"llama_tokens": 276, "file": "Sturm_Tarski_Sturm_Tarski", "length": 2}
""" Test module for :py:class:`emloop.hooks.Check`. """ import numpy as np import collections import pytest from emloop.hooks.check import Check from emloop.hooks.abstract_hook import TrainingTerminated _VAR = "accuracy" _MIN_ACCURACY = 0.95 _MAX_EPOCH = 10 _CURRENT_EPOCH = 5 def _get_epoch_data(): epoch_data...
{"hexsha": "b927d08ba5f444e34e56506f14d6ef5451527ade", "size": 1387, "ext": "py", "lang": "Python", "max_stars_repo_path": "emloop/tests/hooks/check_test.py", "max_stars_repo_name": "iterait/cxflow", "max_stars_repo_head_hexsha": "4dfccf2b49186261ab3fe151bc4f7d0de454ac03", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- """ Created on Sun Aug 23 20:48:10 2015 @author: jmeza """ # =========================================================================== # Packages ================================================================== # =========================================================================== ...
{"hexsha": "617bdff970740e0eb384340f02bb0f4655a0035b", "size": 30823, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReduceSpec_tools.py", "max_stars_repo_name": "joshfuchs/photometry", "max_stars_repo_head_hexsha": "b12e7c1d54dcc7a0ddc02a43917c341206c034b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
* * Routine: PZMOUT - Parallel Version of ARPACK utility routine ZMOUT * * Purpose: Complex*16 matrix output routine. * * Usage: CALL PZMOUT (COMM, LOUT, M, N, A, LDA, IDIGIT, IFMT) * * Arguments * COMM - MPI Communicator for the processor grid * M - Number of rows of A. (Input) * N ...
{"hexsha": "727b20b5550fb7833cad6b38d4be96a298772f6d", "size": 9180, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "roms_Sep2018/roms/Lib/ARPACK/PARPACK/UTIL/MPI/pzmout.f", "max_stars_repo_name": "JamiePringle/ROMScode-PringleBBLpaper", "max_stars_repo_head_hexsha": "87166b65c0d926ea04e5f17ea96d16e694bac1ea", "...