text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
export disassemble export load """ load(filename) -> Vector{Int} Loads machine code file and return as an integer array """ function load(filename::AbstractString) parse.(Int, filter(!isempty, readlines(filename))) end """ disassemble(filename::AbstractString) Print out the disassembled contents of `f...
{"hexsha": "5db8bb3d90ad178c7e31ddb3a9ea8dd522ce6c6c", "size": 1337, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/disassembler.jl", "max_stars_repo_name": "FourMInfo/LittleManComputer.jl", "max_stars_repo_head_hexsha": "602f21bcfb7cc8bda6f3868d4603672ceab59afd", "max_stars_repo_licenses": ["MIT"], "max_sta...
#--------------------------------------------------------- # # [Groundwater discharge](@id groundwater-discharge) #--------------------------------------------------------- #md # [![](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/notebooks/6_groundwater_discharge.ipynb) #md # [![](https://img.shields.io/...
{"hexsha": "3da45dbde45b34c4d16868b271e335a5fa24a680", "size": 4988, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/lit/tutorials/6_groundwater_discharge.jl", "max_stars_repo_name": "briochemc/AIBECS.jl", "max_stars_repo_head_hexsha": "bfd6125b23062806f5156d4ea518a530921c56a1", "max_stars_repo_licenses": ["...
(** * Utheory.v: Specification of $U$, interval $[0,1]$ *) From ALEA Require Export Misc. From ALEA Require Export Ccpo. Set Implicit Arguments. Open Scope O_scope. (** ** Basic operators of $U$ *) (** - Constants : $0$ and $1$ - Constructor : [Unth] $n (\equiv \frac{1}{n+1})$ - Operations : $x+y~(\equiv min ...
{"author": "coq-community", "repo": "alea", "sha": "0cd68687229aaa26623c7092d4b40e9a812f17bc", "save_path": "github-repos/coq/coq-community-alea", "path": "github-repos/coq/coq-community-alea/alea-0cd68687229aaa26623c7092d4b40e9a812f17bc/Utheory.v"}
''' Copyright (c) 2018 Hai Pham, Rutgers University http://www.cs.rutgers.edu/~hxp1/ This code is free to use for academic/research purpose. ''' import numpy as np import pathlib as plb from SysUtils import get_items, make_dir, get_path def convert_vector_to_string(np_vec): a = list(np_vec) ret = " ".join([...
{"hexsha": "2a560155937d2bc2da3fcf83d4391a5ee85a9037", "size": 5244, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/create_spectrogram_CTF.py", "max_stars_repo_name": "MonkeyDTH/end2end_AU_speech", "max_stars_repo_head_hexsha": "8fa497d2c39bffd25539f1837a3b3ee02ae6fcfe", "max_stars_repo_licenses": ["MIT"], ...
/* * Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. */ #include <string> #include <vector> #include <vnc_cfg_types.h> #include <base/logging.h> #include <base/string_util.h> #include <boost/uuid/uuid_io.hpp> #include <cmn/agent_cmn.h> #include <init/agent_param.h> #include <ifmap/ifmap_node.h> #inclu...
{"hexsha": "cd965ca06ae4e4ed67ca4ef4115e9a01d90b9f66", "size": 14315, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/vnsw/agent/oper/bgp_as_service.cc", "max_stars_repo_name": "awesome-sdx/contrail-controller", "max_stars_repo_head_hexsha": "ff328a928a32ea755dab0b9c9e25ab9b1a6b6267", "max_stars_repo_licenses":...
function out = cfg_run_named_file(job) % Return selected files as separate output arguments. % % This code is part of a batch job configuration system for MATLAB. See % help matlabbatch % for a general overview. %_______________________________________________________________________ % Copyright (C) 2007 Freibur...
{"author": "spm", "repo": "spm12", "sha": "3085dac00ac804adb190a7e82c6ef11866c8af02", "save_path": "github-repos/MATLAB/spm-spm12", "path": "github-repos/MATLAB/spm-spm12/spm12-3085dac00ac804adb190a7e82c6ef11866c8af02/matlabbatch/cfg_basicio/cfg_run_named_file.m"}
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category module Categories.Object.Products.Properties {o ℓ e} (C : Category o ℓ e) where open Category C open import Level import Categories.Object.Terminal open Categories.Object.Terminal C import Categories.Object.BinaryProducts open Categories.O...
{"hexsha": "39715b7dc66fea0d5c2af1fc96e7b58c7e16ca2c", "size": 1989, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Categories/Object/Products/Properties.agda", "max_stars_repo_name": "copumpkin/categories", "max_stars_repo_head_hexsha": "36f4181d751e2ecb54db219911d8c69afe8ba892", "max_stars_repo_licenses": ["B...
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "3c5a90afced72cef52151533d2e614ab438e1c71", "size": 5937, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/ipu/test_activation_ops_ipu.py", "max_stars_repo_name": "Shaun2016/Paddle", "max_stars_repo_head_hexsha": "b963903806c8a6694df79b42aaab6578a0ef6afb", "max_stars...
SUBROUTINE HQCLRS ( ibank, ncolr, iret ) C************************************************************************ C* HQCLRS - XWP * C* * C* This subroutine gets the number of colors in a color bank. * C* * C* HQCLRS ( IBANK, NCOLR, IRET ) * C* * C* Input parameters: * C*...
{"hexsha": "8b4d234dbe5038bbd5db976169fc8d1ce2e9c6c1", "size": 1188, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/driver/active/xwp/hqclrs.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Cla...
from typing import Callable, Dict, Tuple import numpy as np from scipy.stats import linregress from specc.data.signal import Signal from specc.data.validators import validate_compatible_signals from specc.utils import find_nearest_index, relative_phase class SignalResponse: def __init__(self, input_signal: Sign...
{"hexsha": "665adfbbc55a1628d0eab0865e7755876302af4a", "size": 4503, "ext": "py", "lang": "Python", "max_stars_repo_path": "specc/data/results.py", "max_stars_repo_name": "jvdoorn/SpectrumAnalyzer", "max_stars_repo_head_hexsha": "264afaa795bd7246da2967d49b176361c454746e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import math; import numpy as np; import DataHelper; import KDTree; class KNN: def __init__(self, dataSet, featureCount = None, distanceCalculator = None, isNormalizeFeatures = True): if featureCount is not None and featureCount > dataSet.shape[1]: raise ValueError(); if featureCount ...
{"hexsha": "a55b268e00428cf37e795ea5baa4fd0d2fd5d4de", "size": 5353, "ext": "py", "lang": "Python", "max_stars_repo_path": "KNN.py", "max_stars_repo_name": "xphter/PythonMachineLearning", "max_stars_repo_head_hexsha": "7d763f210152f43d1fad16838762bccd21199762", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
module PSSR # External package using Revise using ProgressMeter: showprogress using ProgressMeter using Flux using Flux: train! using Flux: throttle using IterTools using Statistics: mean # Program packages export get_protein_data include("./get_protein_data.jl") export check_data export count_size include("./test.jl...
{"hexsha": "f30fee3da8481d1659ae8e1cb06e9368632e822e", "size": 593, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PSSR.jl", "max_stars_repo_name": "alehono/PSSR.jl", "max_stars_repo_head_hexsha": "96a18a86516c9643b55689b1cec864b0bee72260", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
Require Export ZArith. Require Export String. Require Export List. Require Export maps. Global Open Scope Z_scope. Global Open Scope string_scope. Global Open Scope list_scope. Set Implicit Arguments. Inductive Defn : Set := FunDef : string -> list string -> Stmt -> Defn with Exp : Set := BCon : bool -> Exp |...
{"author": "Formal-Systems-Laboratory", "repo": "coinduction", "sha": "1031da11c4a4523ea9b7347036b6bdabc7620e1d", "save_path": "github-repos/coq/Formal-Systems-Laboratory-coinduction", "path": "github-repos/coq/Formal-Systems-Laboratory-coinduction/coinduction-1031da11c4a4523ea9b7347036b6bdabc7620e1d/coinduction-proofs...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from analogistics.statistics import time_series as ts from analogistics.supply_chain.P8_performance_assessment.utilities_movements import getCoverageStats from analogistics.supply_chain.P8_performance_assessment.vehicle_assessment import createTabe...
{"hexsha": "12959b32c1526958adf8d11ad2736fc623528863", "size": 12617, "ext": "py", "lang": "Python", "max_stars_repo_path": "analogistics/supply_chain/P8_performance_assessment/level_of_service_assessment.py", "max_stars_repo_name": "aletuf93/analogistics", "max_stars_repo_head_hexsha": "c5f76910683bc3a1cc6f24799f02992...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Minchao Wu -/ import meta.rb_map import tactic.core /-! # `#explode` command Displays a proof term in a line by line format somewhat akin to a Fitch style proof or the...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/tactic/explode.lean"}
using Test m = test_page_model() include("../src/components/LGemissions.jl") add_comp!(m, LGemissions) set_param!(m, :LGemissions, :e0_baselineLGemissions, readpagedata(m,"data/e0_baselineLGemissions.csv")) set_param!(m, :LGemissions, :er_LGemissionsgrowth, readpagedata(m, "data/er_LGemissionsgrowth.csv")) # run M...
{"hexsha": "8372f42303dd43289ca8bdd46b3adb93ec9185aa", "size": 515, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_LGemissions.jl", "max_stars_repo_name": "gianeconomics/MimiPAGE2009.jl", "max_stars_repo_head_hexsha": "c21fda3a76c3ed3a4bfdfddaff7b56ac71cff0ec", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma del_block_points_index: assumes "ps \<subseteq> \<V>" assumes "card ps = 2" assumes "bl \<in># \<B>" shows "ps \<subseteq> bl \<Longrightarrow> points_index (del_block bl) ps = points_index \<B> ps - 1" "\<not> (ps \<subseteq> bl) \<Longrightarrow> points_index (del_block bl) ps = poi...
{"llama_tokens": 1168, "file": "Fishers_Inequality_Design_Extras", "length": 13}
# Angus Dempster, Daniel F Schmidt, Geoffrey I Webb # MiniRocket: A Very Fast (Almost) Deterministic Transform for Time Series # Classification # https://arxiv.org/abs/2012.08791 # ** This is a naive extension of MiniRocket to multivariate time series. ** from numba import njit, prange, vectorize import numpy as np...
{"hexsha": "43d1cdcf045e013adf10af3591fa47f0f3efcae9", "size": 10761, "ext": "py", "lang": "Python", "max_stars_repo_path": "datascience/MiniRocket/minirocket_multivariate.py", "max_stars_repo_name": "bentlyedyson/HEARTY-HEARTY", "max_stars_repo_head_hexsha": "64bb8c766b61212f2d26b0eebdd19974ed506d51", "max_stars_repo_...
from mpl_toolkits.basemap import Basemap from mpl_toolkits.basemap import shiftgrid import matplotlib.pyplot as plt from osgeo import gdal import numpy as np fig=plt.figure(figsize=(9, 3)) map = Basemap(projection='merc', lat_0=0, resolution='h', llcrnrlon=32, ...
{"hexsha": "ec270708551a319b272d66da9275cc22bf5c54c2", "size": 987, "ext": "py", "lang": "Python", "max_stars_repo_path": "code_examples/utilities/transform_scalar.py", "max_stars_repo_name": "ezcitron/BasemapTutorial", "max_stars_repo_head_hexsha": "0db9248b430d39518bdfdb25d713145be4eb966a", "max_stars_repo_licenses":...
# -*- coding: utf-8 -*- """ ======================================================== 2D free support Wasserstein barycenters of distributions ======================================================== Illustration of 2D Wasserstein barycenters if distributions are weighted sum of diracs. """ # Author: Vivien Seguy <vi...
{"hexsha": "2d68a3922028646c640a8a8897290c3b5d83465b", "size": 2031, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/barycenters/plot_free_support_barycenter.py", "max_stars_repo_name": "kguerda-idris/POT", "max_stars_repo_head_hexsha": "14c30d4cfac060ff0bf8c64d4c88c77df32aad86", "max_stars_repo_license...
[STATEMENT] lemma gauge_reflect: fixes \<gamma> :: "'a::euclidean_space \<Rightarrow> 'a set" shows "gauge \<gamma> \<Longrightarrow> gauge (\<lambda>x. uminus ` \<gamma> (- x))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. gauge \<gamma> \<Longrightarrow> gauge (\<lambda>x. uminus ` \<gamma> (- x)) [PROOF STE...
{"llama_tokens": 225, "file": null, "length": 2}
[STATEMENT] lemma mono_hide_DT[simp]: "P \<sqsubseteq>\<^sub>D\<^sub>T Q \<Longrightarrow> P \\ A \<sqsubseteq>\<^sub>D\<^sub>T Q \\ A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. P \<sqsubseteq>\<^sub>D\<^sub>T Q \<Longrightarrow> P \ A \<sqsubseteq>\<^sub>D\<^sub>T Q \ A [PROOF STEP] proof - [PROOF STATE] proof...
{"llama_tokens": 1217, "file": "CSP_RefTK_Assertions_ext", "length": 10}
# #/BER = sum(xor(m*,m))/ (#m) # BER <= E # import numpy as np import matplotlib.pyplot as plt # create message bits n = 30000 m = np.random.randint(low=0,high=2, size=n).astype('bool') print("Message Bits\n", m) # Create code bits r = 5 c = np.tile(m,(r,1)) # takes the matrix and tiles it print("Codewords for R = ...
{"hexsha": "00c6fa49fd36b231cfb29f40a173c332427d572f", "size": 719, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Epuerto96/Linear-Block-Coding-Example", "max_stars_repo_head_hexsha": "c5a4ce1a2f1b4222242f5882f74fa1d898fcefa4", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Plot 2D rift profiles """ #%matplotlib inline import pylab as plt from numpy import * import numpy as np def plot_snap(fig,water_depth,surf_slope,bed_slope,flux,step,annotate_left=True): fname_base ='../data/cliff/water_depth_'+str(water_depth)+'/glacier_surf_slope_'+str(surf_slope)+'_bed_slope_'+str(bed_slope...
{"hexsha": "36bd9a2df127e3b64cb4f375d9b4bc3046c44b23", "size": 7570, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/plotting/plot_cliff.py", "max_stars_repo_name": "jbassis/MICI-2021", "max_stars_repo_head_hexsha": "5dd7db0d0563e7e673981724fab5e9f74be5c986", "max_stars_repo_licenses": ["MIT"], "max_stars...
#!/usr/bin/env python import os import argparse import numpy as np import healpy as hp import comptools as comp if __name__ == "__main__": p = argparse.ArgumentParser( description='Extracts and saves desired information from simulation/data .i3 files') p.add_argument('--infiles', dest='infiles', na...
{"hexsha": "2ccd360241138c777bcd4f33ed17dd9b17925292", "size": 1626, "ext": "py", "lang": "Python", "max_stars_repo_path": "processing/legacy/anisotropy/merge_maps.py", "max_stars_repo_name": "jrbourbeau/cr-composition", "max_stars_repo_head_hexsha": "e9efb4b713492aaf544b5dd8bb67280d4f108056", "max_stars_repo_licenses"...
import sys import os import numpy as np import tensorflow as tf import pathlib import glob class MNIST : TARGET_DIR = '_dataset/mnist/' @staticmethod def _load_dataset(labels=True): if not os.path.exists(MNIST.TARGET_DIR): os.makedirs(MNIST.TARGET_DIR) if sys.version_info[0] ==...
{"hexsha": "bcc2ca29e3f50092420fdccccd0d01180528ebda", "size": 5659, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "irfixq/wae-wgan", "max_stars_repo_head_hexsha": "30363fc3c9071cef3d7eb2d7c805a4362126b4ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "max_sta...
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. Uniter for VCR model """ from collections import defaultdict import numpy as np import os from torch import nn from torch.nn import functional as F from apex.normalization.fused_layer_norm import FusedLayerNorm as LayerNorm # from .layer import ...
{"hexsha": "cfa1ea3850c4d8507a525669da22f842b0a4bd73", "size": 8657, "ext": "py", "lang": "Python", "max_stars_repo_path": "downstream/UNITER/model/vcr.py", "max_stars_repo_name": "yeonseok-jeong-cm/multimodal_research", "max_stars_repo_head_hexsha": "bb1140f13f76d4cda6175a072806a0ee0908bd0d", "max_stars_repo_licenses"...
/* Copyright 2015-2016 Joanna Hulboj <j@hulboj.org> Copyright 2016 Milosz Hulboj <m@hulboj.org> 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 Unles...
{"hexsha": "eaf87b08c074978896df924a4cbfc1444bd804ec", "size": 6328, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cornelich/vanilla_index.cpp", "max_stars_repo_name": "jh0x/cornelich", "max_stars_repo_head_hexsha": "ef9265d0bc1deefcd02571fe6b9b6ef4b17d013b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
""" classify_image.py Purpose: Use classifier made by generate_classifier.py to classify an image. Author: Steve Foga Created: 02 Nov 2017 Python version: 3.8.2 """ import os import glob from itertools import chain import numpy as np import multiprocessing as mp from lib import common logger = common.lo...
{"hexsha": "24d42878d0fc21d9ca837cfa210c83e39bfc0eb9", "size": 3470, "ext": "py", "lang": "Python", "max_stars_repo_path": "classify_images.py", "max_stars_repo_name": "stevefoga/image-classifier", "max_stars_repo_head_hexsha": "0041ade6bd1bd9957b69ea47013f60f5f4c58b89", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
using MacroTools export Parameter export @gen_convert_parameter, convert_parameter @doc doc""" @gen_convert_parameter(model_typename, (keyname, size_fn, default)...) Generates `convert_parameter(model::model_typename, param::Parameter)`. # Example ``` julia @gen_convert_parameter(A, ("A", numbondtypes, 1.0), (...
{"hexsha": "6de38d25e2c5f085f589572c7d0103eaa5641a34", "size": 3250, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/API/parameter.jl", "max_stars_repo_name": "UnofficialJuliaMirror/SpinMonteCarlo.jl-71c4a2d3-ecf8-5cd9-ab6a-09a504837b4f", "max_stars_repo_head_hexsha": "fdd23854c33846b4e61396add4787c023ac97209...
""" This script can be used to derive statistics of background pixels. """ import matplotlib matplotlib.rc('text', usetex=True) matplotlib.rcParams['font.size'] = 17 matplotlib.rc('xtick', labelsize=14) matplotlib.rc('axes', linewidth=1.1) matplotlib.rcParams['legend.fontsize'] = 11 matplotlib.rcParams['legend.handlele...
{"hexsha": "6d42ea455530a66f9a1288aa34effa5c4e393c88", "size": 9374, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/analyseBackground.py", "max_stars_repo_name": "Borlaff/EuclidVisibleInstrument", "max_stars_repo_head_hexsha": "73a64ad275054d7b1a26f0fe556eae222b65f613", "max_stars_repo_licenses": ["BSD...
mutable struct Pointer lstack::Array{UInt64,1} loc::Array{Int,1} dir::Int wait::Int printstate::Bool alive::Bool Pointer(lstack,loc,dir,wait,printstate,alive) = new(lstack,loc,dir,wait,printstate,alive) end mutable struct Honeycomb a::Array{Char,2} Honeycomb(a)=new(a) end mutable s...
{"hexsha": "fba7d509de50b74a827fe2c8bb79b325ac565099", "size": 13438, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/beeswax.jl", "max_stars_repo_name": "m-lohmann/BeeswaxEsolang.jl", "max_stars_repo_head_hexsha": "39ff83011a0d7f144bbf2cff27ddcae0dd659a56", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
% % Usage: [W [W2]]=mexStochasticProx(y,X,W0,param); % % Name: mexStochasticProx % % Description: mexStochasticProx implements a proximal MM stochastic algorithm % for composite optimization in a large scale setting. % X is a design matrix of size p x n % y is a vector of size n % WARNING, X is transp...
{"author": "tiepvupsu", "repo": "DICTOL", "sha": "1a0361aa35c32d70525d06910d0e9b87997ff246", "save_path": "github-repos/MATLAB/tiepvupsu-DICTOL", "path": "github-repos/MATLAB/tiepvupsu-DICTOL/DICTOL-1a0361aa35c32d70525d06910d0e9b87997ff246/build_spams/mexStochasticProx.m"}
(* Copyright (C) 2017 M.A.L. Marques This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. *) (* These numbers are taken from the original reference, but divided by two t...
{"hexsha": "51ffa6949ed9bd5253c4da1a82df0f2664502f5e", "size": 1498, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "libxc-5.1.6/maple/vwn.mpl", "max_stars_repo_name": "pwang234/lsms", "max_stars_repo_head_hexsha": "6044153b6138512093e457bdc0c15c699c831778", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
\documentclass{beamer} \usetheme{Szeged} \usecolortheme{beaver} \usepackage{minted} \usemintedstyle{pastie} \usepackage{graphicx} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta, urlcolor=cyan, } \title{Discussion 05} \subtitle{Higher-Order Functions} \auth...
{"hexsha": "d107ff001f7823eee5f36ec77b9416167a60ae01", "size": 4631, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "dis-05/slides/slides.tex", "max_stars_repo_name": "nwtnni/discussion-sp19", "max_stars_repo_head_hexsha": "c364d1afa7b854d69305f8c99a10908ac29906a9", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#pragma once #include <libdevcore/Address.h> #include <libdevcore/FixedHash.h> #include <libdevcrypto/Common.h> #include <boost/asio.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <chrono> #include <filesystem> #include <string> #include <type_traits> namespace taraxa { namespace fs = std::filesystem; u...
{"hexsha": "a640ec8e69f326352d25af0237d81bc1e55b2b35", "size": 2783, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libraries/common/include/common/types.hpp", "max_stars_repo_name": "Taraxa-project/taraxa-node", "max_stars_repo_head_hexsha": "de720448774d0a59be5f7c789eab6f1f2e202c0d", "max_stars_repo_licenses": ...
@symbol_func function K_DR(cur_reactor::AbstractReactor) cur_reactor.is_pulsed || return 0.0 cur_denominator = cur_reactor.sigma_CS cur_denominator *= (12/5) * cur_reactor.pi cur_denominator -= cur_reactor.B_CS ^ 2 cur_numerator = 3.0 cur_numerator *= cur_reactor.B_CS ^ 2 cur_K = cur_numerator cu...
{"hexsha": "a5852ff050278262bf4c27cf4d07e7e9e5598684", "size": 356, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/methods/reactors/coefficients/k_dr.jl", "max_stars_repo_name": "djsegal/Fusion.jl", "max_stars_repo_head_hexsha": "a0540fbf3345a778965fa092e9e56907a44c6521", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import matplotlib.pyplot as plt ### for cross # window = 7.5 # starts = [2.5, 11, 19, 26, 33, 40, 46.5, 53, 60, 66.5, 73] ### for wave # window = 5 # starts = [1, 6, 11.5, 17.5, 23, 28.5, 33.5, 39, 44, 49.5, 55, 61, 66.5, 71.5, 76.5, 83] ### for fwd/bkwd window = 5 starts = [2.5, 9, 16, 21, 27, 33, ...
{"hexsha": "74041db4297516f38180d904fb424b7fe10456cc", "size": 1384, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/split_data.py", "max_stars_repo_name": "Ishanh2000/CS698F", "max_stars_repo_head_hexsha": "c69d2195fa9c06b723085e6f48c2bd28e0037838", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
#'## Compute CIs for prediction ratios #'### Functions for computing Ratio CIs FiellerRatioCI <- function(a, b, V, t) { theta <- a/b g <- (t^2)*V[2,2]/b^2 se <- sqrt(V[1,1] - 2*theta*V[1,2] + theta^2 * V[2,2] - g*(V[1,1]-V[1,2]^2/V[2,2])) LCL <- (1/(1-g))*(theta- g*V[1,2]/V[2,2] - t/b * se) UCL <- (1/(1-g))*...
{"hexsha": "0a53b40be7e69a0d32ce6388458ffda5b07448b0", "size": 15273, "ext": "r", "lang": "R", "max_stars_repo_path": "R/pairTrans.r", "max_stars_repo_name": "briencj/asremlPlus", "max_stars_repo_head_hexsha": "108fb4d50e644fa4c46c8265ac9c1583ce10c2d5", "max_stars_repo_licenses": ["MIT", "BSD-3-Clause"], "max_stars_cou...
[STATEMENT] lemma foldr_strict [simp]: "foldr\<cdot>f\<cdot>d\<cdot>\<bottom> = \<bottom>" "foldr\<cdot>f\<cdot>\<bottom>\<cdot>[] = \<bottom>" "foldr\<cdot>\<bottom>\<cdot>d\<cdot>(x : xs) = \<bottom>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. foldr\<cdot>f\<cdot>d\<cdot>\<bottom> = \<bottom> &&& foldr\<...
{"llama_tokens": 182, "file": "HOLCF-Prelude_Data_List", "length": 1}
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "fc18afaa842fd1469e236fd6fc5194deb9045185", "size": 6482, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/data/experimental/kernel_tests/directed_interleave_dataset_test.py", "max_stars_repo_name": "joshz123/tensorflow", "max_stars_repo_head_hexsha": "7841ca029060ab78e221e757d4b1ee6e...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals import cv2 import numpy as np import ubelt as ub import sklearn.metrics import scipy.io import pandas as pd from os.path import expanduser from . import algos as ctalgo def to_mat_format(): import panda...
{"hexsha": "fce696fc5c21fdfb24b08c69c40c1576c617fc89", "size": 11328, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/camtrawl/python/viame/processes/camtrawl/expt.py", "max_stars_repo_name": "melster1010/VIAME", "max_stars_repo_head_hexsha": "0062265088aae65effbfcd130bfb874c343c785f", "max_stars_repo_li...
# -*- coding: utf-8 -*- import IPython import json import matplotlib.pyplot as plt import numpy as np import pandas as pd import plotly import plotly.graph_objs as go import scipy.stats as ss import seaborn as sns from sklearn.metrics import auc, roc_curve import statsmodels.graphics.gofplots as smg class Plot: _...
{"hexsha": "983a1692b62dd83693205fab752f4130049dea51", "size": 5046, "ext": "py", "lang": "Python", "max_stars_repo_path": "molecular/plotting/plot.py", "max_stars_repo_name": "fbrundu/molecular", "max_stars_repo_head_hexsha": "14f604fd2b34a9f141bfb6202d7a73293761e830", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: UTF8 -*- """ some functions for trajectories author: Michael Grupp This file is part of evo (github.com/MichaelGrupp/evo). evo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of th...
{"hexsha": "d7ed96e80b671f34c0bbc3cd9881902e6a1b4cc2", "size": 13830, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/evo-plot/evo/core/trajectory.py", "max_stars_repo_name": "jiexuan/evaluation_tools", "max_stars_repo_head_hexsha": "d8cab5cea2c859ef6067aaedc8cf11be102ad7f8", "max_stars_repo_licenses": ["M...
theory "insertion-sort" imports Main "HOL-Library.Multiset" begin declare[[names_short]] text \<open>non-tail recursive\<close> primrec insert:: "nat \<Rightarrow> nat list \<Rightarrow> nat list" where insert_Nil: "insert x [] = [x]" | insert_Cons: "insert x (y#ys) = (if x < y then (x#y#ys) else y#insert x ys)" ...
{"author": "marco10507", "repo": "formalization-of-sorting-algorithms", "sha": "de905424e53d55829d54c2cd3c8f5241ac5ca904", "save_path": "github-repos/isabelle/marco10507-formalization-of-sorting-algorithms", "path": "github-repos/isabelle/marco10507-formalization-of-sorting-algorithms/formalization-of-sorting-algorithm...
\batchmode \makeatletter \def\input@path{{/home/cooperw/RStudio/KalmanFilter/}} \makeatother \documentclass[12pt,twoside,english,12pt,twoside,english]{article}\usepackage[]{graphicx}\usepackage[]{color} %% maxwidth is the original width if it is less than linewidth %% otherwise use linewidth (to make sure the graphics ...
{"hexsha": "6eec51ab67013462112c7488c9176a87ce9b9db3", "size": 194704, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "KalmanFilterTechNote.tex", "max_stars_repo_name": "NCAR/KalmanFilter", "max_stars_repo_head_hexsha": "f0c2354328c2c4a5d535514cabe804814c028f66", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np from helpers.file_helper import FileHelper from helpers.metadata_helper import get_shapes_metadata from enums.dataset_type import DatasetType file_helper = FileHelper() def set_zero_shot_data(propertyOne, propertyTwo): train_features = np.load(file_helper.train_input_path) prev_train_len = trai...
{"hexsha": "4dd180ea3e2a4d2d0810f8c994939ad88258a5de", "size": 4936, "ext": "py", "lang": "Python", "max_stars_repo_path": "baseline/data_to_zeroshot.py", "max_stars_repo_name": "ktodorov/diagnostics-shapes", "max_stars_repo_head_hexsha": "aea1c3669afd596a8d3908cd310c1e0bec5f85b1", "max_stars_repo_licenses": ["MIT"], "...
C C $Id: kurvp1.f,v 1.5 2008-07-27 03:10:11 haley Exp $ C C Copyright (C) 2000 C University Corporation for Atmospheric Research C All Rights Reserved C C The use of this Software is governed by a License Agreeme...
{"hexsha": "8558e832b5043ff8d3714888b503f677c6718430", "size": 5269, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ngmath/src/lib/gridpack/fitgrid/kurvp1.f", "max_stars_repo_name": "tenomoto/ncl", "max_stars_repo_head_hexsha": "a87114a689a1566e9aa03d85bcf6dc7325b47633", "max_stars_repo_licenses": ["Apache-2.0"...
\newpage \subsection{Scalar AES Acceleration} \label{sec:scalar:aes} This section details proposals for acceleration of the AES block cipher \cite{nist:fips:197} within a scalar RISC-V core, obeying the two-read-one-write constraint on general purpose register file accesses. Supporting material, including rationale a...
{"hexsha": "3e2577aa2e32a6e150b468a8dfed1c174a27dc8a", "size": 6775, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/old-tex/tex/sec-scalar-aes.tex", "max_stars_repo_name": "dingiso/riscv-crypto", "max_stars_repo_head_hexsha": "608f550ea2a791fb091133fe6050321545dfc547", "max_stars_repo_licenses": ["CC-BY-4.0"]...
""" This is an example of an extremely simple exchange, meant to represent a primitive market-order only system. This exchange most closely resembles the following scenario: + k agents are waiting outside of a room, and none of them can communicate with one another + each agent has some cash and some of asset A + eac...
{"hexsha": "36d1bddd675d19ab398a86b5b6f9f0cb237a4078", "size": 4930, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/stock_exchange_v0/stock_exchange_v0.py", "max_stars_repo_name": "maxholloway/agent-exchange", "max_stars_repo_head_hexsha": "13eab47b2aa709f416fbd3866d08cdfc876fbb1a", "max_stars_repo_lic...
# -*- coding: utf-8 -*- import cv2 import time import logging import numpy as np from pathlib import Path import torch import torch.nn as nn import torch.backends.cudnn as cudnn from src.config import config from src.data.data_augment import BaseTransform from src.detector import Detector from src.prior_box import P...
{"hexsha": "f84b1c6f981777653a651f74c3c24f16316b8539", "size": 6077, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval.py", "max_stars_repo_name": "lexuszhi1990/PytorchSSD", "max_stars_repo_head_hexsha": "05c84b830626d8daea699ae3291f625e58d502b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
function r8_cube_root_test ( ) %*****************************************************************************80 % %% R8_CUBE_ROOT_TEST tests R8_CUBE_ROOT. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 26 July 2014 % % Author: % % John Burkardt % fprintf ( 1, '\...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8_cube_root_test.m"}
#= Copyright 2021 BlackRock, Inc. 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...
{"hexsha": "09e5a994b5a1b614b110718c5a1bb9fa489094b9", "size": 1746, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "JuliaFirstOrder/PiecewiseQuadratics.jl", "max_stars_repo_head_hexsha": "0e55fcdbb26605919b4bdae60e1edb0929ab1bd8", "max_stars_repo_licenses": ["Apache-2.0"], ...
\sekshun{Input and Output} \label{Input_and_Output} % got one right below: \index{input and output} \index{input/output} \section{See Library Documentation} Chapel includes an extensive library for input and output that is documented in the standard library documentation. See \url{http://chapel.cray.com/docs/latest/m...
{"hexsha": "62a68d48cd6903efaaea7c33641a99e0699b05a4", "size": 8846, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "spec/Input_and_Output.tex", "max_stars_repo_name": "aroonsharma1/chapel_aroon_benchmarks_cleaned", "max_stars_repo_head_hexsha": "806638e1035de1fe4cf5a304eea35b8622edd497", "max_stars_repo_licenses"...
from itertools import permutations, combinations import numpy as np from sklearn.metrics import accuracy_score, \ matthews_corrcoef, \ f1_score, \ precision_score, \ recall_score from copy import deepcopy d...
{"hexsha": "01178b05c231345763011e2a4042d1816e031f99", "size": 2051, "ext": "py", "lang": "Python", "max_stars_repo_path": "CIoTS/evaluation.py", "max_stars_repo_name": "danthe96/CIoTS", "max_stars_repo_head_hexsha": "6274f5b35a24ae11cb7456628f164b62440a8731", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
function [xfbp, sino] = em_fbp(sg, ig, yi, ci, ri, varargin) %function [xfbp, sino] = em_fbp(sg, ig, yi, ci, ri, [options]) % Emission FBP reconstruction from Poisson measurements % model: Y_i ~ Poisson(c_i [G x]_i + r_i) % in % sg sino_geom() % ig image_geom() % yi transmission sinogram % ci calibration factors %...
{"author": "JeffFessler", "repo": "mirt", "sha": "b7f36cc46916821e8bc8502301b1554ebc7efe1d", "save_path": "github-repos/MATLAB/JeffFessler-mirt", "path": "github-repos/MATLAB/JeffFessler-mirt/mirt-b7f36cc46916821e8bc8502301b1554ebc7efe1d/emission/em_fbp.m"}
function solve() xs = [parse(Int, x) for x in split(readline())] 15 - sum(xs) end println(solve())
{"hexsha": "7ec3e6ef23f21dad783dd350b433773461261351", "size": 108, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "abc161-170/abc170/a.jl", "max_stars_repo_name": "aishikawa/atcoder-julia", "max_stars_repo_head_hexsha": "93339ea6dd954b0739b3895a5625f94433e33baf", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import binascii import logging import warnings import numpy import numpy as np import scipy import scipy.cluster import scipy.misc from PIL import Image log = logging.getLogger(__name__) def isValidImage(path): try: Image.open(path).verify() return True except: ret...
{"hexsha": "b4713d9733128575e8cfc76e3b6b91d0b466fe0a", "size": 5598, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdst/analysis.py", "max_stars_repo_name": "Veritas1000/pdst", "max_stars_repo_head_hexsha": "99b7f1dd5d42976640557e2b8b84d5b90419107a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
[STATEMENT] lemma q65_infinite_def: "q65 = (\<lambda>k. k\<^sup>2 mod 65) ` {0..}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. q65 = (\<lambda>k. k\<^sup>2 mod 65) ` {0..} [PROOF STEP] unfolding q65_upto_def image_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. {y. \<exists>x\<in>{..<65}. y = x\<^sup>2 mod ...
{"llama_tokens": 764, "file": "Pell_Efficient_Discrete_Sqrt", "length": 7}
[STATEMENT] lemma "let P = 2 * x + 1 > x + (x::real) in P \<or> False \<or> P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. let P = x + x < 2 * x + 1 in P \<or> False \<or> P [PROOF STEP] by (smt (verit))
{"llama_tokens": 101, "file": null, "length": 1}
""" An implementation of the Exact Fit of the first 3 Moments (#F3M) of finding the parameters that make up the mixture of 2 Gaussian distributions. Based on the work by Lopez de Prado and Foreman (2014) "A mixture of two Gaussians approach to mathematical portfolio oversight: The EF3M algorithm." Quantitative Finan...
{"hexsha": "b2ebfd4fbc3e7f91d56134294ff17e00630fc2f7", "size": 13593, "ext": "py", "lang": "Python", "max_stars_repo_path": "jupyter-notebooks/hudson-and-thames-quant/Advances in Financial Machine Learning/Bet Sizing/EF3M/ef3m.py", "max_stars_repo_name": "BlackSwine/compendium", "max_stars_repo_head_hexsha": "8ca631d79...
[STATEMENT] lemma D_eq: "D = {x. \<exists>y \<in> A. (x = (y * a) mod p \<and> (y * a) mod p \<le> (int p - 1) div 2)}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. D = {x. \<exists>y\<in>A. x = y * a mod int p \<and> y * a mod int p \<le> (int p - 1) div 2} [PROOF STEP] by (auto simp add: D_def C_def B_def A_def)
{"llama_tokens": 157, "file": null, "length": 1}
import copy import random import numpy as np def perturb(config, hyperparam_space, min_perturb=0.002, clip=False, unbiased=True): """Perturbs a configuration based on the HPs specified. Parameters ---------- config : dict The configuration to perturb. hyperparam_space : dict of tune_tf2....
{"hexsha": "9bf8395a669ae5996c5db27d1a3810cc1df86e0e", "size": 2512, "ext": "py", "lang": "Python", "max_stars_repo_path": "tune-tf2/tune_tf2/pbt/explorers.py", "max_stars_repo_name": "WenyingZhu/autolfads-tf2", "max_stars_repo_head_hexsha": "66ddeda34a44f9b64135e496d83cd2bd6f539a64", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python3 ## # A simple example of taking two images and finding the common points between them ## import sys import cv2 import numpy from matplotlib import pyplot as plt # OpenCV loads into BGR colorspace but pyplot works in RGB def bgr2rgb(img): b, g, r = cv2.split(img) return cv2.merge([r, g...
{"hexsha": "6be95caa9db0bc2c402cba1b4bbc65fc974a9f3a", "size": 1731, "ext": "py", "lang": "Python", "max_stars_repo_path": "Archive/CDR_Testing_Archive/match_points/match_points.py", "max_stars_repo_name": "Jual6332/OTheRS_IP", "max_stars_repo_head_hexsha": "420cfde562249941f4a85f936d549d11edadc36f", "max_stars_repo_li...
[STATEMENT] lemma pp_fusion_leftneutral [simp]: "pp_fusion (Node (pp_first x)) x = x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. pp_fusion (Node (pp_first x)) x = x [PROOF STEP] by simp
{"llama_tokens": 84, "file": "Quantales_Dioid_Models_New", "length": 1}
[STATEMENT] lemma set_shadow_root_types_preserved: assumes "w \<in> set_shadow_root_locs element_ptr" assumes "h \<turnstile> w \<rightarrow>\<^sub>h h'" shows "type_wf h = type_wf h'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. type_wf h = type_wf h' [PROOF STEP] apply(unfold type_wf_impl) [PROOF STATE] pr...
{"llama_tokens": 946, "file": "Shadow_SC_DOM_Shadow_DOM", "length": 3}
from meta_mb.dynamics.layers import MLP import tensorflow as tf import numpy as np from meta_mb.utils.serializable import Serializable from meta_mb.utils import compile_function from meta_mb.logger import logger from meta_mb.dynamics.mlp_dynamics import MLPDynamicsModel import time from collections import OrderedDict f...
{"hexsha": "ad73572a9387ef51b7f2ba3047263aeb4747b551", "size": 48799, "ext": "py", "lang": "Python", "max_stars_repo_path": "meta_mb/dynamics/mlp_dynamics_ensemble.py", "max_stars_repo_name": "iclavera/meta-mb", "max_stars_repo_head_hexsha": "a1204e573c1415161129403cfb287bf120488fd0", "max_stars_repo_licenses": ["MIT"]...
""" NNの学習 """ import argparse import numpy as np import chainer from .train_config import load_trainer def main(): parser = argparse.ArgumentParser() parser.add_argument("config_dir") parser.add_argument("--gpu", type=int, default=0) args = parser.parse_args() if args.gpu >= 0: chainer....
{"hexsha": "f78afb54468571d19f59cd79143a79dc88517681", "size": 497, "ext": "py", "lang": "Python", "max_stars_repo_path": "neneshogi/train.py", "max_stars_repo_name": "select766/neneshogi", "max_stars_repo_head_hexsha": "f355745844fb4c1add3e10083783d849be8ab80f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 3 18:40:58 2018 @author: dberke Test script for the HARPSFile2D class and subclasses """ from pathlib import Path import shutil import numpy as np import pytest import unyt as u import varconlib from varconlib.exceptions import WavelengthNotFou...
{"hexsha": "207462df2210aa5b0d9d168eebb9d1ca7dbcacc2", "size": 6032, "ext": "py", "lang": "Python", "max_stars_repo_path": "varconlib/obs2d/tests/test_obs2d.py", "max_stars_repo_name": "DBerke/varconlib", "max_stars_repo_head_hexsha": "4771cf315c8fa76e1982612f3ac520c0cec098d8", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
{"hexsha": "dbf566f5e271a38bb7effb6c5cb9d1b3bcf1fdab", "size": 22131, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/python/quantum_info/operators/test_operator.py", "max_stars_repo_name": "EnriqueL8/qiskit-terra", "max_stars_repo_head_hexsha": "08b801f1f8598c4e44680b4a75c232ed92db0262", "max_stars_repo_li...
"""Test the reduce API.""" import pytest import cupy as cp import ray from ray.util.collective.types import ReduceOp from ray.util.collective.tests.util import create_collective_workers @pytest.mark.parametrize("group_name", ["default", "test", "123?34!"]) @pytest.mark.parametrize("dst_rank", [0, 1, 2, 3]) def test_...
{"hexsha": "9646f8d12a2900bb9767edfd9e4db66f63f73894", "size": 4413, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ray/util/collective/tests/distributed_tests/test_distributed_reduce.py", "max_stars_repo_name": "Crissman/ray", "max_stars_repo_head_hexsha": "2092b097eab41b118a117fdfadd0fe664db41f63", "ma...
C$Procedure DASINE (arc sine of bracketed argument) DOUBLE PRECISION FUNCTION DASINE ( ARG, TOL ) C$ Abstract C C This routine produces a SPICE error if the |argument| exceeds C 1.D0 by more than TOL. If ARG exceeds 1.D0, the argument is C evaluated as if it equaled 1.D0, if ARG is less than -1., ...
{"hexsha": "619e55744bc1e002f6e495ebd826304c26c61ab4", "size": 5216, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/dasine.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import math import pdb import numpy as np import torch import torch.nn.functional as F from torch import nn from .embednets import ItemEmbeddingNetwork, WordEmbeddingNetwork from .decoder import Decoder from .old_encoder import SingleEncoder from .bert import BertEncoder from transformers import BertTokenizer #todo r...
{"hexsha": "9f26b573958655cb1a197df174dee433e2266131", "size": 18570, "ext": "py", "lang": "Python", "max_stars_repo_path": "mm_response_generation/models/matransformer.py", "max_stars_repo_name": "seo-95/dstc9-SIMMC", "max_stars_repo_head_hexsha": "0f967f874e360ea00ac4629b0ac9f3d9c25a833a", "max_stars_repo_licenses": ...
/* Copyright (c) 2005-2021, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
{"hexsha": "c87af1a2140e8d0eceee4c02f2f887830753f823", "size": 18617, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cell_based/src/simulation/AbstractCellBasedSimulation.hpp", "max_stars_repo_name": "jmosborne/Chaste", "max_stars_repo_head_hexsha": "b0388985bb710139bf4b424579513d40e925e896", "max_stars_repo_lice...
// 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) // (C) Copyright 2009-2012 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // Based on the Anthony's idea of thread_joiner in CCiA #ifndef...
{"hexsha": "6a1548d5c9ce9293eb0b07a185b43f0cf647fbc0", "size": 1115, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "deps/boost/include/boost/thread/thread_guard.hpp", "max_stars_repo_name": "kindlychung/mediasoup-sfu-cpp", "max_stars_repo_head_hexsha": "f69d2f48f7edbf4f0c57244280a47bea985f39cf", "max_stars_repo_l...
[STATEMENT] lemma substEnv_compose1: assumes "goodEnv rho" and "good Y1" and "good Y2" shows "((rho &[Y1 / y]_ys) &[Y2 / y]_ys) = (rho &[(Y1 #[Y2 / y]_ys) / y]_ys)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rho &[Y1 / y]_ys &[Y2 / y]_ys = rho &[Y1 #[Y2 / y]_ys / y]_ys [PROOF STEP] by (simp add: assms psubstEnv_...
{"llama_tokens": 181, "file": "Binding_Syntax_Theory_Terms", "length": 1}
include("./MyPlots/target-plot.jl") import .TargetPlot as tp tp.plot()
{"hexsha": "a1f6e6b85f7ecb5a2968e4227647cccc16f03f5d", "size": 73, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "my-plots/main.jl", "max_stars_repo_name": "applied-math-coding/heuristic", "max_stars_repo_head_hexsha": "b1ebb17c1f3026eef9b553625d6a77952b88dee7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from floodsystem.stationdata import update_water_levels from floodsystem.stationdata import build_station_list import matplotlib.pyplot as plt from datetime import datetime, timedelta import matplotlib as mpl import numpy as np from floodsystem.datafetcher import fetch_measure_levels from floodsystem.plot import plot_w...
{"hexsha": "7ddd56cf48d9724fd4355f21897b9ecc7ffd4110", "size": 951, "ext": "py", "lang": "Python", "max_stars_repo_path": "Task2E.py", "max_stars_repo_name": "kjalucas/Flood-Warning-Group-63", "max_stars_repo_head_hexsha": "16c8058bd3a6bd1952c8d2562fe5ab5c720309ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
% !TEX root = ../../../proposal.tex In the following, $a||b$ denotes concatenation of strings $a$ and $b$. $a{[i]}$ references the $i$-th byte in $a$. $(N,e)$ denotes an RSA public key, where $N$ has byte-length $\ell_m$ ($|N|=\ell_m$) and $e$ is the public exponent. The corresponding secret exponent is $d = 1/e \bmod ...
{"hexsha": "4a60f5cb996bfebc4ad2aa956e72e8ea8e9c7a44", "size": 13028, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "papers/drown/paper/background.tex", "max_stars_repo_name": "dadrian/dissertation", "max_stars_repo_head_hexsha": "5607114fb4340c5b6e944c73ed6019006d3ebec9", "max_stars_repo_licenses": ["Apache-2.0"...
import pandas as pd import numpy as np import category_encoders as ce def ordinal_encode(data): encoding_data= data.copy() encoder= ce.OrdinalEncoder(encoding_data) data_encoded= encoder.fit_transform(encoding_data) return(data_encoded) def Overlap(data): data= ordinal_encode(data) r = data.sha...
{"hexsha": "497725c6ff901440ae1888b844d2b66c4fc8d00e", "size": 962, "ext": "py", "lang": "Python", "max_stars_repo_path": "Categorical_similarity_measures/Overlap.py", "max_stars_repo_name": "AjayMukundS/Categorical_similarity_measures", "max_stars_repo_head_hexsha": "201e2a0dbf870936dff29b88b5918507374ac5b6", "max_sta...
import GeometricFlux: message, update, propagate in_channel = 10 out_channel = 5 N = 6 adj = [0. 1. 0. 0. 0. 0.; 1. 0. 0. 1. 1. 1.; 0. 0. 0. 0. 0. 1.; 0. 1. 0. 0. 1. 0.; 0. 1. 0. 1. 0. 1.; 0. 1. 1. 0. 1. 0.] ne = [[2], [1,4,5,6], [6], [2,5], [2,4,6], [2,3,5]] struct NewLayer <: Mess...
{"hexsha": "0ca3db711e9c0a0dc4c950999330743bbe9e98bf", "size": 864, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/layers/msgpass.jl", "max_stars_repo_name": "XVilka/GeometricFlux.jl", "max_stars_repo_head_hexsha": "af629878a1d60009ab308e73b8b1d5d8c297585b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import networkx as nx from .utils import to_binary, to_decimal from .calculations import word_entropy class Nontotalistic1D: def __init__(self, k: int, rule: int, random_seed=None, float_precision=16): """ This class has methods for simulating elementary cellula...
{"hexsha": "28dfc318a2e6873c05cfe5b6aecc4df6b556747c", "size": 10331, "ext": "py", "lang": "Python", "max_stars_repo_path": "casim/Nontotalistic1D.py", "max_stars_repo_name": "godzilla-but-nicer/cellularautomata", "max_stars_repo_head_hexsha": "16c1d31403a26131f1e18f5d72b96a316082e596", "max_stars_repo_licenses": ["MIT...
# coding: utf-8 import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim class KDLoss(nn.Module): def __init__(self, temp_factor): super(KDLoss, self).__init__() self.temp_factor = temp_factor self.kl_div = nn.KLDivLoss(reduction="su...
{"hexsha": "d3db3e9dfa5bafc378580c303032f228d6c9e23d", "size": 8061, "ext": "py", "lang": "Python", "max_stars_repo_path": "flearn/common/distiller/Distiller.py", "max_stars_repo_name": "wnma3mz/flearn", "max_stars_repo_head_hexsha": "df3c837bb164ec81736a3a64aaa85f574e7f67fa", "max_stars_repo_licenses": ["Apache-2.0"],...
from constclust.aggregate import reconcile, gen_neighbors from typing import Tuple from itertools import product import pandas as pd import pytest import numpy as np # from collections import namedtuple # FakeRequest = namedtuple("FakeRequest", ("param")) # s, c = clustering_run(FakeRequest(int)) # TODO: Rethink how I...
{"hexsha": "129fa04ab58e6347f5978f9aab8d2a81c8c35534", "size": 3816, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_aggregate.py", "max_stars_repo_name": "ivirshup/constclust", "max_stars_repo_head_hexsha": "6b7ef2773a3332beccd1de8774b16f3727321510", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import pandas as pd import numpy as np import os import gc import warnings warnings.filterwarnings('ignore') def files_in_directory(path): files = os.listdir(path) try: files.remove('.ipynb_checkpoints') except: print("ipynb_checkpoints doesn't exits") return files used_columns = ["c...
{"hexsha": "7f7ebf983c4a8ddcb7e4f07b39f7dca65f872077", "size": 1765, "ext": "py", "lang": "Python", "max_stars_repo_path": "hybrid_linker/1_non_textual_data.py", "max_stars_repo_name": "MalihehIzadi/hybrid-linker", "max_stars_repo_head_hexsha": "5e9e134634e71c9c44d7fb74997d809355cabfd1", "max_stars_repo_licenses": ["MI...
import numpy as np from mesonh_atm.mesonh_atmosphere import MesoNHAtmosphere import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from scipy.interpolate import RegularGridInterpolator import scipy.optimize as sciopt import modules.cloud as ModCloud #Old Data without advection path = "/net/skyscanner...
{"hexsha": "b99c4fddfff8aa0701a1e1fbd8b5bc10fb2419b4", "size": 8324, "ext": "py", "lang": "Python", "max_stars_repo_path": "radial_trend_estimation.py", "max_stars_repo_name": "DiegoSelle/master_thesis", "max_stars_repo_head_hexsha": "cf3d097c12ddb019195385b1c5077061d28d063d", "max_stars_repo_licenses": ["MIT"], "max_s...
# from: https://fastapi.tiangolo.com/tutorial/bigger-applications/ from fastapi import FastAPI, Form, File, UploadFile import pickle import fastai from fastai.vision import load_learner from fastai.vision.image import pil2tensor, open_image from PIL import Image from io import BytesIO import numpy as np from pydantic ...
{"hexsha": "cac4aeadb25782291025cfac523e63b020791558", "size": 1423, "ext": "py", "lang": "Python", "max_stars_repo_path": "image_classifier_api/main.py", "max_stars_repo_name": "FlorianBorn/fastapi-playground", "max_stars_repo_head_hexsha": "c96fb03c4781642195c7752d73ffc009d7f021fb", "max_stars_repo_licenses": ["MIT"]...
# Copyright (C) 2022 ST John # # 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, soft...
{"hexsha": "a2b138632943c9150c5b305c4f7ad9196da95ebf", "size": 3176, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_model.py", "max_stars_repo_name": "st--/vbpp", "max_stars_repo_head_hexsha": "26c2a71101475c4480cb7af6166f45351470613f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 4,...
import numpy as np import time def dp_si(data, sigma, beta): x = np.array(data[:]) x = x.reshape((x.shape[0], 1)) n = len(data) sum_x = np.zeros(n) sum_x_matrix = [] list_matrix = [[]] list_condition_matrix = [] F = np.zeros(n + 1) R = [] cp = [] for i in range(n): ...
{"hexsha": "156d7d5fedd836056a3a4d169dea10babcbc2775", "size": 5238, "ext": "py", "lang": "Python", "max_stars_repo_path": "core_dp_si/penalized_pelt.py", "max_stars_repo_name": "LeoGrin/selective_inference_changepoint", "max_stars_repo_head_hexsha": "ad19e44c6b7e04b82c42d29dc84885ff9ef43665", "max_stars_repo_licenses"...
! ################################################################### ! Copyright (c) 2013-2020, Marc De Graef Research Group/Carnegie Mellon University ! All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are...
{"hexsha": "e04aaa8e15a1732dee9a31978dfef86b729ef8bc", "size": 21179, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/EMsoftHDFLib/ECPiomod.f90", "max_stars_repo_name": "maochsendorf/EMsoft", "max_stars_repo_head_hexsha": "fd4baee3254b3c51043b5a5306f7d0eb3c5eefd0", "max_stars_repo_licenses": ["Intel", "...
using Zygote using FiniteDifferences using KernelFunctions using Distances using Test x = rand(5) y = rand(5) @testset "Testing Zygote adjoints" begin gzeucl = first(Zygote.gradient(xy->evaluate(Euclidean(),xy[1],xy[2]),[x,y])) gzsqeucl = first(Zygote.gradient(xy->evaluate(SqEuclidean(),xy[1],xy[2]),[x,y])) gzdotpro...
{"hexsha": "d50240f7e8ce38742d19db31171c4bce34e64f58", "size": 848, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_adjoints.jl", "max_stars_repo_name": "IsakFalk/KernelFunctions.jl", "max_stars_repo_head_hexsha": "d629d2f8d26e31fa4a07d417d115416292aa7c62", "max_stars_repo_licenses": ["MIT"], "max_stars...
# pylint: disable=no-self-use,invalid-name,protected-access import torch import pytest import numpy from allennlp.common.testing import AllenNlpTestCase from allennlp.common.checks import ConfigurationError from allennlp.training.metrics import SequenceAccuracy class SequenceAccuracyTest(AllenNlpTestCase): def te...
{"hexsha": "4c8d55de7f4d6b11314f951022436d63689d3cf9", "size": 2005, "ext": "py", "lang": "Python", "max_stars_repo_path": "allennlp/tests/training/metrics/sequence_accuracy_test.py", "max_stars_repo_name": "rlebras/allennlp", "max_stars_repo_head_hexsha": "b7af457e4fc2ce85ec6937ae5c57db8e4513ce86", "max_stars_repo_lic...
import functools import hashlib import inspect import os import sys import tempfile import zlib import matplotlib.image as mpimg import numpy as np import pytest import yaml from matplotlib.testing.compare import compare_images import yt.visualization.particle_plots as particle_plots import yt.visualization.plot_wind...
{"hexsha": "9164c0e014cb353cf1956772d0a0e8c6e1c1dd38", "size": 17559, "ext": "py", "lang": "Python", "max_stars_repo_path": "yt/utilities/answer_testing/testing_utilities.py", "max_stars_repo_name": "Xarthisius/yt", "max_stars_repo_head_hexsha": "321643c3abff64a6f132d98d0747f3558f7552a3", "max_stars_repo_licenses": ["B...
""" Coefficient of Variation """ # Author: Avraam Marimpis <avraam.marimpis@gmail.com> import numpy as np def cv(x: np.ndarray) -> float: """ Coefficient of Variation Parameters ---------- x : array-like, shape(n_samples) Input time series Returns ------- cv : float Th...
{"hexsha": "a7a4fe44f4e9838c3ac9891cff1c4f7ed644a86d", "size": 399, "ext": "py", "lang": "Python", "max_stars_repo_path": "dyconnmap/ts/cv.py", "max_stars_repo_name": "wmvanvliet/dyconnmap", "max_stars_repo_head_hexsha": "15a830a5755ce198a33b245b18927c494c767a60", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
#pragma once #include <boost/asio/ssl/context.hpp> #include <net/http.hpp> #include <net/https.hpp> #include <net/ws.hpp> #include <net/wss.hpp> #include <boost/asio.hpp> #include <boost/asio/io_context.hpp> #include <boost/asio/ip/tcp.hpp> #include <future> namespace net { class server { public: server();...
{"hexsha": "54de68b8eb5466cc12ee8c0e8465f3944be064e8", "size": 1426, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "inc/net/server.hpp", "max_stars_repo_name": "shimondoodkin/net", "max_stars_repo_head_hexsha": "3dce378376eb23b4e15d71a9a87b100716756f4e", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": ...
PROGRAM FM006 C COMMENT SECTION 00010006 C 00020006 C FM006 00030006 C ...
{"hexsha": "5d17a53a3fcac91c38b541c2d192cc1372286566", "size": 61743, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Fortran/UnitTests/fcvs21_f95/FM006.f", "max_stars_repo_name": "MrSidims/llvm-test-suite", "max_stars_repo_head_hexsha": "8a717b0ecf8302afcf8606f25dc1713435cea69d", "max_stars_repo_licenses": ["Ap...
// // Boost.Process // ~~~~~~~~~~~~~ // // Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Boris Schaeling // // 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) // #include <boost/proces...
{"hexsha": "f3634ffb8fe0565eec56a38c46e3d04675e411a9", "size": 6299, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "vendor/boost-process/libs/process/test/detail_file_handle_test.cpp", "max_stars_repo_name": "Flusspferd/flusspferd", "max_stars_repo_head_hexsha": "f2a070c4805e0bdbae4b5f528e94a9a36ceb80c5", "max_st...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from mla.base import add_intercept class PLA: """ 感知机算法, Model: f(x) = sign(w * x + b) self._X : [[x1], [x2], ... x[m]] self._Y : [y1, y2, ..., ym] """ def __init__(self, eta, max_iters=None): self._eta = eta ...
{"hexsha": "4f50efff91f2a964268931f36939cd070af8966f", "size": 3051, "ext": "py", "lang": "Python", "max_stars_repo_path": "mla/perceptron/PLA.py", "max_stars_repo_name": "qianlv/MachineLearningAlgorithm", "max_stars_repo_head_hexsha": "c66d37bc9c0c1bebf97cdc142213b96cb6ceb989", "max_stars_repo_licenses": ["MIT"], "max...
""" General, miscellaneous functions for FRET data assimilation Created by Nirag Kadakia at 12:30 10-16-2017 This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. """ ...
{"hexsha": "5d62bde46062d482850a3f0350e623e14a88ffc9", "size": 2893, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "niragkadakia/FRET-data-assimilation", "max_stars_repo_head_hexsha": "a54dbca83fa96851be97d6294fee87716562c83c", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 """Module with auxiliar functions: Transform AltAz coordinates into Camera coordinates (This should be implemented already in ctapipe but I haven't managed to find how to do it) Calculate source position from disp_norm distance. Calculate disp_ distance from source position. Usage: "import util...
{"hexsha": "2965af5f1ad10288ae20fcd5f7fcfed018de04a9", "size": 11354, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstchain/reco/utils.py", "max_stars_repo_name": "labsaha/cta-lstchain", "max_stars_repo_head_hexsha": "7e65e2cd9c42fbc827b0dcf1bccc7141203ebd22", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...