text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma Vfrom_rank_eq: "Vfrom A (rank(x)) = Vfrom A x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Vfrom A (rank x) = Vfrom A x [PROOF STEP] proof (rule order_antisym) [PROOF STATE] proof (state) goal (2 subgoals): 1. Vfrom A (rank x) \<le> Vfrom A x 2. Vfrom A x \<le> Vfrom A (rank x) [PROOF STEP] sh...
{"llama_tokens": 2379, "file": "ZFC_in_HOL_ZFC_Cardinals", "length": 23}
using ITensors using ITensors.ITensorNetworkMaps using KrylovKit using LinearAlgebra χ = 3 d = 2 l = Index(χ, "l") s = Index(d, "s") l0 = addtags(l, "c=0") l1 = addtags(l, "c=1") A = randomITensor(l0, l1, s) A′ = prime(dag(A); inds=(l0, l1)) T = ITensorNetworkMap([A, A′]; input_inds=(l1, l1'), output_inds=(l0, l0'))...
{"hexsha": "051b3d9bad0fc5491c028771c0b707ad6e62bad9", "size": 463, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/ITensorNetworkMaps/imps_transfer_matrix.jl", "max_stars_repo_name": "anupam-mitra/ITensors.jl", "max_stars_repo_head_hexsha": "ed8a4a45099bd55358c1dc0a7521a34a4c49c663", "max_stars_repo_lic...
import argparse import matplotlib.pyplot as plt from matplotlib.ticker import ScalarFormatter import numpy as np from astropy.table import QTable import astropy.units as u from astropy.modeling.fitting import LevMarLSQFitter from plot_irv_params import G21mod def plot_irv_ssamp( ax, itab, label, color="k", line...
{"hexsha": "938a7d34357a88fd878e06a3b5429a0b5c052d02", "size": 10766, "ext": "py", "lang": "Python", "max_stars_repo_path": "Figs/plot_irv_params_waveregion.py", "max_stars_repo_name": "karllark/fuv_mir_rv_relationship", "max_stars_repo_head_hexsha": "a25ef0500be5b9c3477883b7f568b41e91b59a90", "max_stars_repo_licenses"...
# Copyright 2018-2019, Carnegie Mellon University # See LICENSE for details Class(arctan, AutoFoldExp, rec( ev := self >> self._ev(self.args).ev(), computeType := self >> TReal, )); Class(TArcTan, Tagged_tSPL_Container, rec( abbrevs := [ () -> []], dims := self >> [1, 2], transpose := self >> Co...
{"hexsha": "20a6e90c6d34eda2aba4a19f57df48e47b912e0b", "size": 693, "ext": "gi", "lang": "GAP", "max_stars_repo_path": "arctan.gi", "max_stars_repo_name": "spiral-software/spiral-package-hcol", "max_stars_repo_head_hexsha": "b4a0118382e3bba91ecd82a6c667f2cdb6389ceb", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"],...
import argparse import os from typing import Optional, List, Union import numpy as np import pandas as pd import torch from pytorch_toolbelt.utils.distributed import all_gather from xview3 import * from xview3.centernet.models.inference import get_box_coder_from_model from xview3.inference import ( model_from_che...
{"hexsha": "35caa3a08bb8566a5cb5f6a4a9f8878d0de08270", "size": 5267, "ext": "py", "lang": "Python", "max_stars_repo_path": "submit_multilabel.py", "max_stars_repo_name": "BloodAxe/xView3-The-First-Place-Solution", "max_stars_repo_head_hexsha": "9a9600e7dfbaa24ff5a72c81061fbbbfed865847", "max_stars_repo_licenses": ["MIT...
using Test using SafeTestsets using Plots unicodeplots() include(joinpath(@__DIR__, "generate_example_tests.jl")) include(joinpath(@__DIR__, "download_dumps.jl")) # Note: comment outer @testset to stop after first @safetestset failure @time @testset verbose = true "Krotov.jl Package" begin print("\n* Example 1...
{"hexsha": "ee0f491dbb9f9c7a551d4d49826de1ee9ccef0d5", "size": 1031, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaQuantumControl/Krotov.jl", "max_stars_repo_head_hexsha": "6eab22b1d2e084210ecaf7fe32fcf28a2183be83", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // Name : // Author : Avi // Revision : $Revision: #30 $ // // Copyright 2009- ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/license...
{"hexsha": "b82e22d601618041e2473b2bc814b7de61aade57", "size": 10650, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Base/src/cts/LogCmd.cpp", "max_stars_repo_name": "mpartio/ecflow", "max_stars_repo_head_hexsha": "ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
const _allowslow = Ref(true) allowslow(flag = true) = (_allowslow[] = flag) function assertslow(op = "Operation") _allowslow[] || error("$op is disabled") return end Base.IndexStyle(::Type{<:GPUArray}) = IndexLinear() function _getindex(xs::GPUArray{T}, i::Integer) where T x = Array{T}(1) copy!(x, 1...
{"hexsha": "40a4fd3c9ff6e19b58d36e32a26c77ff57fe37d2", "size": 1822, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/indexing.jl", "max_stars_repo_name": "americast/GPUArrays.jl", "max_stars_repo_head_hexsha": "fa1f9de3440f72b542945b99184804216d81c133", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import os from .common_setup import * import numpy as np import os import tensorflow as tf from bayes_filter import jitter from bayes_filter.misc import (random_sample, flatten_batch_dims, load_array_file, timer, diagonal_jitter, log_normal_solve_fwhm,make_example_datapack, maybe_create_posterior_solsets, graph_s...
{"hexsha": "37101c9b5c8d102863a00f5eb5625e0706192b1e", "size": 4304, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayes_filter/tests/test_misc.py", "max_stars_repo_name": "Joshuaalbert/bayes_filter", "max_stars_repo_head_hexsha": "2997d60d8cf07f875e42c0b5f07944e9ab7e9d33", "max_stars_repo_licenses": ["Apache-...
module Effect.StdIO import Effects import Control.IOExcept data StdIO : Effect where PutStr : String -> { () } StdIO () GetStr : { () } StdIO String instance Handler StdIO IO where handle () (PutStr s) k = do putStr s; k () () handle () GetStr k = do x <- getLine; k x () {- instance Handler ...
{"hexsha": "abda7f5b6100651c6bfab7a7532b6a0776031b90", "size": 1878, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Effect/StdIO.idr", "max_stars_repo_name": "edwinb/Eff-new", "max_stars_repo_head_hexsha": "e906e2d22a1606de015086bd92acc6f4e0e40ec1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
## This file is meant to replicate the exact same process, P. Schwab has implemented # for the voice data. The goal is to extract the same train, test and validation # sets! # dated 04-01-2019 #%% importing libraries import pandas as pd import numpy as np #%% # lets load the demographics file here demo_data = pd.read...
{"hexsha": "9bddc63884bec5346aadcb1ec5f0800fc6cb7b7d", "size": 3636, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Voice/voiceEDA.py", "max_stars_repo_name": "khizar-anjum/mPowerAnalysis", "max_stars_repo_head_hexsha": "890abda28e692b31640c957b4a01d076025e3fc4", "max_stars_repo_licenses": ["MIT"], "max...
import os import sys import json import pickle import argparse import numpy as np sys.path.append( os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))) from perception.utterance.eval import UtteranceEncoder from interaction.common.utils import stable_utterance_hash from interaction.action import action...
{"hexsha": "dfbc5c4e0db6756c2d7f403e8dbfcb965a99b078", "size": 4218, "ext": "py", "lang": "Python", "max_stars_repo_path": "HRI/TFVT_HRI/scripts/collect_act_emb.py", "max_stars_repo_name": "WorldEditors/PaddleRobotics", "max_stars_repo_head_hexsha": "d02efd74662c6f78dfb964e8beb93f1914dcb2f3", "max_stars_repo_licenses":...
[STATEMENT] lemma emp_to_emp': "w = \<epsilon> \<Longrightarrow> f w = \<epsilon>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. w = \<epsilon> \<Longrightarrow> f w = \<epsilon> [PROOF STEP] using morph_on[of \<epsilon> \<epsilon>] self_append_conv2[of "f \<epsilon>" "f \<epsilon>"] [PROOF STATE] proof (prove) usi...
{"llama_tokens": 248, "file": "Combinatorics_Words_Morphisms", "length": 2}
using EngEconomics, Roots, Plots # Given init = -610000 annual = 200000 N = 10 salvage = -1500000 MARR = 0.1 # Determine the better alternative NPW(x) = init + annual * seriesPresentAmountFactor(x, N) + salvage * presentWorthFactor(x, N) xVec = collect(0:0.01:1.0) zVec = zeros(size(xVec)) # Two irrs that are equal t...
{"hexsha": "7dd99a72c082573d8d95246bd977d8e9231dffc9", "size": 368, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "problems/examples/multiple_irr1.jl", "max_stars_repo_name": "zborffs/EngineeringEconomics.jl", "max_stars_repo_head_hexsha": "f17d84f0ae79453a516a6b7d9e958d6ff08a87a0", "max_stars_repo_licenses": ["...
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ # MIT License # # Copyright (c) 2021 Nathan Juraj Michlo # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwar...
{"hexsha": "0367833b948e9da0d2f3950f789e6db2ac6c41fd", "size": 7616, "ext": "py", "lang": "Python", "max_stars_repo_path": "disent/schedule/_schedule.py", "max_stars_repo_name": "neonkitchen/disent", "max_stars_repo_head_hexsha": "0f45fefea03473690dfdbf48ef83f6e17ca9b8b3", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Helpers to test runtimes. """ import numpy import pandas import warnings from skl2onnx.helpers.onnx_helper import ( select_model_inputs_outputs, enumerate_model_node_outputs, enumerate_model_initializers ) from skl2onnx.algebra.type_helper import _guess_type from .utils_backend import ( load_data_a...
{"hexsha": "0aa8b62c9cadca44d1da5dce8b225fd566d34598", "size": 21510, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils/utils_backend_onnxruntime.py", "max_stars_repo_name": "MaxNoe/sklearn-onnx", "max_stars_repo_head_hexsha": "698c9347e7c70cbb1a2c5bba1657e6548ff5897d", "max_stars_repo_licenses": ...
import unittest import numpy as np from learning_rate import * def make_flags(): from yacs.config import CfgNode as CN flags = CN() flags.max_iter = 160000 # Maximum training iterations flags.lr_type = 'step' # Learning rate type: step or cos flags.learning_rate = 0.1 # Initial learning rate...
{"hexsha": "d53426c8497e2ecd1d4fe998b689e9fc27f44772", "size": 5767, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/script/tests/test_learning_rate.py", "max_stars_repo_name": "christinazavou/ANNFASS_Structure", "max_stars_repo_head_hexsha": "f7b6d3e44d2466ed15009a3335e757def62adfa6", "max_stars_repo...
// // test-video-coder.cc // // Created by Peter Gusev on 15 April 2016. // Copyright 2013-2016 Regents of the University of California // #include <cstdlib> #include <ctime> #include <stdlib.h> #include <boost/asio.hpp> #include "gtest/gtest.h" #include "src/video-coder.hpp" #include "mock-objects/encoder-delegate...
{"hexsha": "4e6bc1c5e249ba497e5b670b03e93f6d6e972e2c", "size": 36514, "ext": "cc", "lang": "C++", "max_stars_repo_path": "cpp/tests/test-video-coder.cc", "max_stars_repo_name": "peurpdapeurp/ndnrtc", "max_stars_repo_head_hexsha": "59552bff9398ee2e49636f32cac020cc8027ae04", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
[STATEMENT] lemma fv_fo_fmla_list_exists: "fv_fo_fmla_list (Exists n \<phi>) = filter ((\<noteq>) n) (fv_fo_fmla_list \<phi>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fv_fo_fmla_list (Exists n \<phi>) = filter ((\<noteq>) n) (fv_fo_fmla_list \<phi>) [PROOF STEP] by (auto simp: fv_fo_fmla_list_def) (metis...
{"llama_tokens": 225, "file": "Eval_FO_Ailamazyan", "length": 1}
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator class Visualizer: def __init__(self, path): self.data = np.genfromtxt(path, delimiter=',') print(self.data) def show(self, cumsum=True): x = self.data[:, 0] inside = self.data[:, 1] ...
{"hexsha": "f37b5c19676bf4681b0cfa6dc7fb6588488bd877", "size": 1231, "ext": "py", "lang": "Python", "max_stars_repo_path": "tracking/log_visualizer.py", "max_stars_repo_name": "t9s9/BeeMeter", "max_stars_repo_head_hexsha": "d0dfbf621a9147c047708a18540ba61266324176", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
### # helpers ### # make sure a passed distance matrix is a square function check_square(m, msg) n = size(m, 1) if n != size(m, 2) error(msg) end return n end """ legal_circuit(circuit::AbstractArray{<:Integer}) Check that an array of integers is a valid circuit. A valid circuit over `n` ...
{"hexsha": "a0e96539d0f0c461f6d57d2b91e914f3f29e11a5", "size": 6081, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/helpers.jl", "max_stars_repo_name": "evanfields/TravelingSalesmanHeuristics.jl", "max_stars_repo_head_hexsha": "40f33ae2c07c836840674313ce9345a7d755f09b", "max_stars_repo_licenses": ["MIT"], "m...
# File to compute the number of connections between # R > G, G < R, G > G and R > R # TODO: Check the code; there seems to be unnatural trends in the data. import numpy as np import glob import pandas as pd files = glob.glob("../../output/csv/ADJ/ADJ_A_*.csv") CWC = [] CNC = [] for i, _file in enumerate(files): I...
{"hexsha": "ade3c62d9ef666da5bdf59dfb7022cbc6f138bb8", "size": 1304, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/SNA_relations.py", "max_stars_repo_name": "soham1112/spider-networks", "max_stars_repo_head_hexsha": "0607f54044f2b16de8f543df4755c5ce3875e153", "max_stars_repo_licenses": ["MIT"], "max_stars_...
%% SECTION HEADER ///////////////////////////////////////////////////////////////////////////////////// \section{Subsection} \label{sec61} %% SECTION CONTENT //////////////////////////////////////////////////////////////////////////////////// \lipsum[1] %% SUBSECTION HEADER //////////////////////////////////////////...
{"hexsha": "46432d3bc0f30d245b889c1476e138a99592d12b", "size": 733, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapters/Chapter6/sect61.tex", "max_stars_repo_name": "SeaShadow/LaTeX-AMC-PhD-Thesis-Template", "max_stars_repo_head_hexsha": "9e8255d5406211b07253fca29788a3557860edc0", "max_stars_repo_licenses": [...
#include <octomap/GaussionOcTree.h> #include <octomap/octomap.h> #include <pcl/common/centroid.h> #include <pcl/common/transforms.h> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <Eigen/Dense> #include <unordered_map> #include <unordered_set> #define maxdepth 16 // unit: layer #define resolution ...
{"hexsha": "4a6c9ce4105d42d4b0f54db1091d6317513cd1ef", "size": 8319, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "octomap/src/testing/test_gaussion_tree.cpp", "max_stars_repo_name": "Peiwvy/octomap_gaussion", "max_stars_repo_head_hexsha": "74d46af2046c8f0e95419e17a584501240e24f3c", "max_stars_repo_licenses": ["...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 Aruul Mozhi Varman S. # # This 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, or (at your option) # any later version. # #...
{"hexsha": "1dc868a1b3b9aa4533c04b4f17cb6b52df75d705", "size": 2045, "ext": "py", "lang": "Python", "max_stars_repo_path": "gr-ConvCodes/python/ConvCode_encoder.py", "max_stars_repo_name": "AruulmozhivarmanS/Convolution-Encoder-SDR-GNU-Radio", "max_stars_repo_head_hexsha": "cf860349d4cad62e28faadb9e1b54cc8c9dfee67", "m...
# -------------- # Import packages import numpy as np import pandas as pd from scipy.stats import mode # code starts here bank=pd.read_csv(path) categorical_var=bank.select_dtypes(include='object') print(categorical_var) numerical_var=bank.select_dtypes(include='number') print(numerical_var) # code ends here...
{"hexsha": "62e88e0e53e902fc19cd512c4d2ebfa27cd4aa98", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data-Wrangling-With-Pandas/code.py", "max_stars_repo_name": "fakhruddin950/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "388b13867667167514ef8a6cb314daa06e862850", "max_stars_repo_licenses...
// wait.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Copyright 2015 Andrey Semashev // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_DETAIL_WINAPI_WAIT_HPP #define BOOST...
{"hexsha": "bd20d46826cc899300465343beb469098d44f4f1", "size": 2371, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "contrib/libboost/boost_1_62_0/boost/detail/winapi/wait.hpp", "max_stars_repo_name": "189569400/ClickHouse", "max_stars_repo_head_hexsha": "0b8683c8c9f0e17446bef5498403c39e9cb483b8", "max_stars_repo_...
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import sys import argparse import json import shutil from collections import defaultdict import numpy as np import pandas as pd from sklearn import linear_mo...
{"hexsha": "2d107c55473157cc507ad07451ae607566299aab", "size": 18707, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_defenses.py", "max_stars_repo_name": "iamgroot42/data-poisoning-release", "max_stars_repo_head_hexsha": "fef371060878b7524af9b31225d3144d268b98b3", "max_stars_repo_licenses": ["MIT"], "max_s...
abstract type AbstractGPLayer end; struct SVGPLayer{GPType} <: AbstractGPLayer dim::Int gps::Vector{GPType} function SVGPLayer(dim,μ,Σ,Z,kernel,μ₀) gps = [SVGP_Base(copy(μ),copy(Σ),copy(Z),deepcopy(kernel),deepcopy(μ₀)) for _ in 1:dim] new{SVGP_Base}(dim,gps) end end Base.le...
{"hexsha": "dcaf4f461a10a12465fc691dca73dddd4e156461", "size": 2528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/layers.jl", "max_stars_repo_name": "JuliaTagBot/DeepGP.jl", "max_stars_repo_head_hexsha": "b05fb0be388358bcfe7c31ce2b2dd959b846dae4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import pyuvdata.utils as uvutils import sys import numpy as np import os from pyuvdata import UVData, UVBeam import healpy as hp from astropy.constants import c #include locally-revised Github code: sys.path.insert(1, '/home/atj/Github_Repos/local_edits/') # insert at 1, 0 is the script path (or '' in REPL) c_ms = c....
{"hexsha": "a15abd579b69cdf5afe884ba20c87a849fe065ee", "size": 33661, "ext": "py", "lang": "Python", "max_stars_repo_path": "CoupledRadioInterferometer/Functions/first_order_coupling_functions.py", "max_stars_repo_name": "alphatangojuliett/coupled-radio-interferometer", "max_stars_repo_head_hexsha": "6b3de76dddb5eaf5fd...
(* Copyright 2016 Luxembourg University Copyright 2017 Luxembourg University This file is part of Velisarios. Velisarios 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 the Licen...
{"author": "vrahli", "repo": "Velisarios", "sha": "6fb353b18610cd79210755fcc90123536c367aaa", "save_path": "github-repos/coq/vrahli-Velisarios", "path": "github-repos/coq/vrahli-Velisarios/Velisarios-6fb353b18610cd79210755fcc90123536c367aaa/PBFT/PBFTnew_view_learns_or_knows.v"}
[STATEMENT] lemma nonneg_incseq_Bseq_subseq_iff: fixes f :: "nat \<Rightarrow> real" and g :: "nat \<Rightarrow> nat" assumes "\<And>x. f x \<ge> 0" "incseq f" "strict_mono g" shows "Bseq (\<lambda>x. f (g x)) \<longleftrightarrow> Bseq f" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Bseq (\<lambda>x. f ...
{"llama_tokens": 245, "file": null, "length": 2}
import numpy as np # #---------function definitions---------- #---------you might want to move along to the main() funtion section. more fun over there--------------- # #function: assign colour by plate id def get_colour_by_plateid(plate_id): from matplotlib import colors converter = colors.ColorConverter() ...
{"hexsha": "d2bda0aaf4e70898e83ad3c33d72cf6fb3551f51", "size": 2048, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/plate_tectonic_utils.py", "max_stars_repo_name": "datuadiatma/pygplates-tutorials", "max_stars_repo_head_hexsha": "69801b101fae375565b705358ff6e52c5c1a2ddd", "max_stars_repo_licenses": ["CC-B...
\appendix \section{Appendix} We release our source code online under the free MIT license.\footnote{\url{https://github.com/heinrichreimer/modern-talking}}
{"hexsha": "b0d02a5ef27b7b8af32e8770c92f8e31d5301030", "size": 157, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/05-appendix.tex", "max_stars_repo_name": "maxhenze/modern-talking", "max_stars_repo_head_hexsha": "2a08027a1ee197bc86bb5b3eee75bc7c952dd288", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) 2018-2020, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
{"hexsha": "cab139ec4bd7335ae5db32cfd2724e54038d7f70", "size": 13680, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/utils/run_benchmarks.py", "max_stars_repo_name": "BradReesWork/cugraph", "max_stars_repo_head_hexsha": "9ddea03a724e9b32950ed6282120007c76482cbc", "max_stars_repo_licenses": ["Apache-2.0"]...
# This file includes intregrator construction function construct_integrator(deproblem, input, righthandside, state, t, modelargs=(), solverargs=(); alg=nothing, stateder=state, modelkwargs=NamedTuple(), solverkwargs=NamedTuple(), numtaps=3) # If needed, construct interpolant for input. interpolant = inpu...
{"hexsha": "80c196df3afd1be46331278a8663246bd2fdbc65", "size": 1845, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/components/systems/dynamicalsystems/init.jl", "max_stars_repo_name": "NumHack/Causal.jl", "max_stars_repo_head_hexsha": "6cfc0eaacae742c681bf02f3275e413db4f5e3d9", "max_stars_repo_licenses": ["...
/* Copyright 2019 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include <boost/core/alloc_construct.hpp> #include <boost/core/default_allocator.hpp> #include <boost/core/lightweight_test.hpp> class type { public: ty...
{"hexsha": "0a86fc8f3d3adc64fedf439fb3d499fe75e43274", "size": 873, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/core/test/alloc_construct_throws_test.cpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b444494140676da98e2", "max...
# For compatibility with Python2 # from __future__ import print_function, division, absolute_import ################################## import numpy as np import spekpy.SpekConstants as Const from scipy import integrate import spekpy.SpekAniso as aniso ## References (Note: Ref. 1-3 describe "legacy" model i.e. SpekCalc...
{"hexsha": "5d9ff991e7cf0efba8dc7f2dedc17a94c2320750", "size": 19104, "ext": "py", "lang": "Python", "max_stars_repo_path": "spekpy/SpekModel.py", "max_stars_repo_name": "salvol/metalsf2", "max_stars_repo_head_hexsha": "4900173da33114216890ba2e57e12c18ec051416", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
if __name__ == '__main__': import os import sys import shutil import argparse import numpy as np from ray import tune sys.path.append(os.getcwd()) from predict_utils import predict_rna parser = argparse.ArgumentParser() parser.add_argument('--indir', type=str, default=None, he...
{"hexsha": "34769dd35837624a5c7197dc4d6bbd3635e231a6", "size": 2198, "ext": "py", "lang": "Python", "max_stars_repo_path": "3_prediction/predict.py", "max_stars_repo_name": "phiwei/prostate_coexpression", "max_stars_repo_head_hexsha": "2cfbd4d292e52377b881f816aff5eaaa61f32a41", "max_stars_repo_licenses": ["MIT"], "max_...
// Copyright (C) 2013 Vicente J. Botet Escriba // // 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) // <boost/thread/synchronized_value.hpp> // class synchronized_value<T,M> // strict_lock_ptr<T,M> synch...
{"hexsha": "6044ea200c33787dac84c127025bba34d31f9606", "size": 963, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/libs/thread/test/sync/mutual_exclusion/synchronized_value/synchronize_pass.cpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo...
import queue import threading import random import numpy as np import pandas as pd import time class Recognizer(threading.Thread): def __init__(self, stop_event, select_event, sig_queue, pat_queues, algo, n, interval, pats, model_period, model_delay): threading.Thread.__init__(self) self.algo = alg...
{"hexsha": "c9dc56a20597403e189fa21bb73ac511b8914957", "size": 9140, "ext": "py", "lang": "Python", "max_stars_repo_path": "recognizer.py", "max_stars_repo_name": "saintnever/synctap_study_platform", "max_stars_repo_head_hexsha": "8188aa57b1ed2ad4762741ac03bca9ce03f9ffc3", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma Rep_Abs_1: "Rep (Abs 1) = 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Rep (Abs 1) = 1 [PROOF STEP] by (simp add: Abs_inverse size1)
{"llama_tokens": 80, "file": null, "length": 1}
""" ccenergy.py: CC T-amplitude Solver """ if __name__ == "__main__": raise Exception("This file cannot be invoked on its own.") import psi4 import time import numpy as np from opt_einsum import contract from .utils import helper_diis from .cc_eqs import build_Fae, build_Fmi, build_Fme from .cc_eqs import build_...
{"hexsha": "15ca125589eac1e1bab96a4dd93d1cb8acc9272c", "size": 6897, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycc/ccenergy.py", "max_stars_repo_name": "RitvikPrabhu/pycc", "max_stars_repo_head_hexsha": "3ec3a0545296e44cd8dfbb4ad3e92553f3b8a9a8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
''' Reference: https://github.com/santi-pdp/segan_pytorch/blob/master/segan/utils.py https://github.com/svj1991/Adaptive_front_ends/blob/master/sepcosts.py ''' from subprocess import run, PIPE from scipy.linalg import toeplitz from scipy.io import wavfile # from numba import jit, int32, float32 import soundfile as sf...
{"hexsha": "23ec1863d101fe8c405372b429550b99796d1438", "size": 21143, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics.py", "max_stars_repo_name": "jeffreyjeffreywang/SSE", "max_stars_repo_head_hexsha": "9276f96d3b54bd542e32568bbc5b3a157b55b5e7", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count"...
%MINENCLOSINGCIRCLE Finds a circle of the minimum area enclosing a 2D point set % % [center,radius] = cv.minEnclosingCircle(points) % % ## Input % * __points__ Input vector of 2D points, stored in numeric array % (Nx2/Nx1x2/1xNx2) or cell array of 2-element vectors (`{[x,y], ...}`). % % ## Output % * __center__ ...
{"author": "kyamagu", "repo": "mexopencv", "sha": "d29007b2a484d0fd92e6e941dc5fd4750014fa6a", "save_path": "github-repos/MATLAB/kyamagu-mexopencv", "path": "github-repos/MATLAB/kyamagu-mexopencv/mexopencv-d29007b2a484d0fd92e6e941dc5fd4750014fa6a/+cv/minEnclosingCircle.m"}
import numpy as np import os.path as path import pickle from keras.layers.core import Dense from keras.layers.pooling import GlobalMaxPooling1D from keras.layers.recurrent import LSTM from keras import optimizers from fnc.models.Keras_utils import EarlyStoppingOnF1, convert_data_to_one_hot, calculate_class_weight, spl...
{"hexsha": "ad2f2b3cb39358ee8cb19a98f7bf6f45b83f376d", "size": 21994, "ext": "py", "lang": "Python", "max_stars_repo_path": "fnc/models/single_f_ext_LSTM.py", "max_stars_repo_name": "UKPLab/coling2018-fake-news-challenge-", "max_stars_repo_head_hexsha": "6446c4459b520b7f7713bc66117917e341d899dc", "max_stars_repo_licens...
from gurobipy import Model, GRB, quicksum from networkx import Graph, connected_components edge2var = None def callback_cycle(model, where): """ Callback inserts constraints to forbid more than one cycle in solution candidates :param model: a `gurobipy model <https://www.gurobi.com/documentation/9.1/refman/...
{"hexsha": "d73e74bd5032a2cfcd5307cfd4217cc2db65be36", "size": 6136, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphilp/network/tsp_callbacks.py", "max_stars_repo_name": "VF-DE-CDS/GraphILP-API", "max_stars_repo_head_hexsha": "841b80256f06b5dfc9f3bd4e514f1e24fb82b6ce", "max_stars_repo_licenses": ["MIT"], "...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) 2003-2018 by The University of Queensland % http://www.uq.edu.au % % Primary Business: Queensland, Australia % Licensed under the Apache License, version 2.0 % http://www.apache.org/licenses/LICENSE-2.0 % % Development until...
{"hexsha": "166a297a6f1eb74d1833290b6b259478d53cb804", "size": 7060, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/user/levelsetmodel.tex", "max_stars_repo_name": "markendr/esys-escript.github.io", "max_stars_repo_head_hexsha": "0023eab09cd71f830ab098cb3a468e6139191e8d", "max_stars_repo_licenses": ["Apache-2...
"""GraphWave class implementation.""" import pygsp import random import numpy as np import pandas as pd from tqdm import tqdm import networkx as nx from pydoc import locate class WaveletMachine: """ An implementation of "Learning Structural Node Embeddings Via Diffusion Wavelets". """ def __init__(sel...
{"hexsha": "ec920d5fb485ee977d7f5f2b8e3e2b22c56f8385", "size": 4863, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/spectral_machinery.py", "max_stars_repo_name": "cafeal/GraphWaveMachine", "max_stars_repo_head_hexsha": "e6b84a4a60dd1fc660995999d89fea7f54282a5f", "max_stars_repo_licenses": ["MIT"], "max_sta...
""" inverter.py """ from typing import List from dataclasses import dataclass import numpy as np from pydantic import validator, BaseModel from scipy.optimize import minimize import matplotlib.pyplot as plt from opt_einsum import contract # from pyscf import scf from .methods.wuyang import WuYang from .methods.wuyan...
{"hexsha": "a264791cbfc8b0b83c261259d936fac31da5f638", "size": 7210, "ext": "py", "lang": "Python", "max_stars_repo_path": "partition/inverter/inverter.py", "max_stars_repo_name": "VHchavez/Partition", "max_stars_repo_head_hexsha": "526823ac6497ef36b428ad013df789e97546a4c9", "max_stars_repo_licenses": ["BSD-3-Clause"],...
using Test, SegmentIntersections @testset "Test event creation" begin e1 = Event(1,2) e2 = Event(0,5) e3 = Event(1,2) @test e1.point == Point(1,2) @test e2 < e1 @test e1 == e3 end
{"hexsha": "e201392a4cd81d362d4d6b162366ac417361f9f7", "size": 205, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/bentley_ottmann/event_tests.jl", "max_stars_repo_name": "arnauqb/BentleyOttmann.jl", "max_stars_repo_head_hexsha": "638caf8906a431eebbc61f68569ddeb1a8cbc1f8", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python # -*- coding: utf-8 -*- from std_msgs.msg import Float32, UInt8 from sensor_msgs.msg import Image, CompressedImage from mission_processor import MissionProcessor from intersection_detector import IntersectionDetector from nav_msgs.msg import Odometry from cv_bridge import CvBridge import numpy as ...
{"hexsha": "3e09a41b5738a31e52e8ec334030f769084227ef", "size": 22927, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mission_node/src/intersection_mission_node.py", "max_stars_repo_name": "mommy79/AuDi-GIT-turtlebot3_autorace", "max_stars_repo_head_hexsha": "fd1382246f1ee74ee70857006563184d672a6666", "max_s...
[STATEMENT] lemma linear_irreducible_int: fixes p :: "int poly" assumes deg: "degree p = 1" and cp: "content p dvd 1" shows "irreducible p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. irreducible p [PROOF STEP] proof (intro irreducibleI) [PROOF STATE] proof (state) goal (3 subgoals): 1. p \<noteq> 0 2. \<...
{"llama_tokens": 1946, "file": "Algebraic_Numbers_Algebraic_Numbers_Prelim", "length": 23}
from __future__ import print_function # In python 2.7 from flask import Flask, session, render_template, make_response, jsonify, request, send_from_directory, g, url_for from flask_limiter import Limiter from flask_limiter.util import get_remote_address import json from sklearn.naive_bayes import GaussianNB import num...
{"hexsha": "1d2eb05ca643c4645167b8fc3de81f0c5dcc20e8", "size": 6148, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "sparrow-platform/sparrow-disease-diagnostics", "max_stars_repo_head_hexsha": "62a5d92202852caf57b872ebf62ffc9613603a96", "max_stars_repo_licenses": ["Apache-2.0"],...
# FFSSolver: (F)orward (S)ingle (S)hooting (Solver) # Solves indirect trajectory optimization problem using a forward # single shooting based approach. # NOTE: Likely only supports spacecraft trajectory optimization problems # involving a single spacecraft using a 6 element state representation # with mass (7 total e...
{"hexsha": "3087f9187738b2919814a5e24fca06e1efbc716a", "size": 9635, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FSSSolver.jl", "max_stars_repo_name": "GrantHecht/IndirectShooting.jl", "max_stars_repo_head_hexsha": "7a33a1b9af86b08718b871c65436233835cd8b1c", "max_stars_repo_licenses": ["MIT"], "max_stars_...
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden 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) ======...
{"hexsha": "8b0eb1fda42f7a3a7649e15f3ea7f36e42bb6b7e", "size": 3046, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "deps/src/boost_1_65_1/boost/fusion/view/zip_view/detail/begin_impl.hpp", "max_stars_repo_name": "shreyasvj25/turicreate", "max_stars_repo_head_hexsha": "32e84ca16aef8d04aff3d49ae9984bd49326bffd", "m...
from collections import defaultdict from contextlib import contextmanager from pathlib import Path import networkx as nx import numpy as np import torch from plan import Plan, get_sub_plans from tree import Tree def to_forest(plan): forest = [] for root in plan.get_roots(): g = plan.G.subgraph(nx.de...
{"hexsha": "2ec8d245151eb0ad130eb9c926254c20666ac05c", "size": 5008, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils.py", "max_stars_repo_name": "simplerick/sqlopt", "max_stars_repo_head_hexsha": "59bc781e752887c9a5e9157d53e81fdd24ac77f1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
/- Copyright (c) 2018 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis Define the p-adic numbers (rationals) ℚ_p as the completion of ℚ wrt the p-adic norm. Show that the p-adic norm extends to ℚ_p, that ℚ is embedded in ℚ_p, and that ℚ_...
{"author": "digama0", "repo": "mathlib-ITP2019", "sha": "5cbd0362e04e671ef5db1284870592af6950197c", "save_path": "github-repos/lean/digama0-mathlib-ITP2019", "path": "github-repos/lean/digama0-mathlib-ITP2019/mathlib-ITP2019-5cbd0362e04e671ef5db1284870592af6950197c/src/data/padics/padic_numbers.lean"}
/* (c) Copyright 2012 Felipe Magno de Almeida * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #ifndef MORBID_IDL_COMPILER_TYPEDEF_GENERATOR_HPP #define MORBID_IDL_COMPILER_TYPEDEF_GENERATOR_HPP #include ...
{"hexsha": "3c7968d2ac1392de88de9f6e071d021ce782ad1c", "size": 1448, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "idl_compiler/include/morbid/idl_compiler/generator/typedef_generator.hpp", "max_stars_repo_name": "felipealmeida/mORBid", "max_stars_repo_head_hexsha": "3ebc133f9dbe8af1c5cfb39349a0fbf5c125229b", "m...
#!/usr/bin/env python3 import re import sys import logging import pysam import json import statistics as stats from subprocess import run from scipy.stats import mannwhitneyu from scipy.stats import ttest_ind from collections import defaultdict from Bio import SeqIO from Bio.SeqRecord import SeqRecord from Bio import...
{"hexsha": "a6641da07fe11bb44b73d941347a28249c9c4d83", "size": 22941, "ext": "py", "lang": "Python", "max_stars_repo_path": "bleties/main.py", "max_stars_repo_name": "Swart-lab/bleties", "max_stars_repo_head_hexsha": "92387085db8f6e3eaf6c2b3271b0a1576cb53608", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
""" OXASL - Structural data module Copyright (c) 2008-2020 Univerisity of Oxford """ import os import glob import numpy as np import fsl.wrappers as fsl from fsl.data.image import Image from fsl.utils.path import PathError from oxasl.options import OptionCategory, OptionGroup from oxasl.reporting import LightboxIma...
{"hexsha": "db2da67f8574923ccde5fea7f3bd3781b206d785", "size": 7381, "ext": "py", "lang": "Python", "max_stars_repo_path": "oxasl/struc.py", "max_stars_repo_name": "physimals/oxasl", "max_stars_repo_head_hexsha": "e583103f3313aed2890b60190b6ca7b265a46e3c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1...
/* * S2E Selective Symbolic Execution Platform * * Copyright (c) 2015, Dependable Systems Laboratory, EPFL * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source...
{"hexsha": "4f3be48990322b6e6cf41e0f68f91d70ad5966b2", "size": 4470, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "klee/lib/Solver/Z3IteBuilder.cpp", "max_stars_repo_name": "sebastianpoeplau/s2e", "max_stars_repo_head_hexsha": "995cac6126e7d80337e8c4a72bfa9a87eea7eb68", "max_stars_repo_licenses": ["MIT"], "max_s...
from datetime import timezone, timedelta, datetime from unittest.mock import MagicMock, patch import re import geopandas as gpd import numpy as np import pandas as pd import pytest from pandas import Timestamp from metloom.pointdata import CDECPointData, PointDataCollection from metloom.variables import CdecStationVa...
{"hexsha": "59604d0fd71e95a54bd4e9e2afc3c57c6e051d79", "size": 21524, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_cdec.py", "max_stars_repo_name": "M3Works/metloom", "max_stars_repo_head_hexsha": "3e41dbdd6b2889c9917828f4198460a0edc151b4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import numpy as np from PIL import Image def plot(image, filename): """Plot the image as a log2 greyscale image""" image = np.log2(1 + image.astype(np.float64)) image *= 255.0 / np.max(image) Image.fromarray(image.astype(np.uint8)).save(filename) def field(scl): """Generate a field of complex va...
{"hexsha": "ee2975dc1f11cac359815185d401f394a0d03d41", "size": 647, "ext": "py", "lang": "Python", "max_stars_repo_path": "mandelbrot/__init__.py", "max_stars_repo_name": "graeme-winter/sidewinder", "max_stars_repo_head_hexsha": "c0c7f61dbf3aadad0f9dbf803051f6c81a255317", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# SPDX-License-Identifier: Apache-2.0 """ Tests h2o's tree-based methods' converters. """ import unittest import os import sys import numpy as np import pandas as pd from onnx.defs import onnx_opset_version from onnxconverter_common.onnx_ex import DEFAULT_OPSET_NUMBER from sklearn.datasets import load_diabetes, load_i...
{"hexsha": "db5d990af8f37cfe17e0890210493cc2498f12ec", "size": 11166, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/h2o/test_h2o_converters.py", "max_stars_repo_name": "xadupre/onnxmltools", "max_stars_repo_head_hexsha": "a1588df9aaa239e4c2bd67acf76d900db22dc58c", "max_stars_repo_licenses": ["Apache-2.0"...
! ................................................. ! ____ _ _ ____ _____ _ ! | _ \| | |_| | _ \| ___| |_| ! | |_) | |___ _ | |_) | |___ _ ! | _ /| _ | | | | _ /|___ | | | ! | | | | | | | | | | ...
{"hexsha": "2c791e1b88d0f05261a151adbb7ccae16226a647", "size": 4161, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Force_Vector.f", "max_stars_repo_name": "PhiPsi-Software/PhiPsi_XFEM_Fortran_Codes_Early_Version", "max_stars_repo_head_hexsha": "1eae63a8f0dc968b9d5220397879645a83e5d083", "max_stars_repo_license...
# # Copyright 2020 Spotify AB # 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, s...
{"hexsha": "5231c2ac6a40381b62ca5f742313b72e436cf22b", "size": 2964, "ext": "py", "lang": "Python", "max_stars_repo_path": "rips/policy/base.py", "max_stars_repo_name": "spotify-research/RIPS_KDD202", "max_stars_repo_head_hexsha": "84f9cde9528a176b36cad2417f363a7890e92486", "max_stars_repo_licenses": ["Apache-2.0"], "m...
from math import ceil import random from scipy.io import loadmat from scipy import signal import numpy as np import os from PIL import Image from matplotlib.pyplot import get_cmap import shutil def butter_highpass_filter(data, cutoff=1, fs=128, order = 5): ''' -> Used to remove the low frequency signals causing b...
{"hexsha": "1ddb01729119e4951f88e3f3fd5b6e14313d9dc2", "size": 7951, "ext": "py", "lang": "Python", "max_stars_repo_path": "createDataset.py", "max_stars_repo_name": "SriniMaiya/ECG-Signal-Classification", "max_stars_repo_head_hexsha": "8ba953ce344f10dc27aca1c9221a3a9272ff8bef", "max_stars_repo_licenses": ["MIT"], "max...
module Search include("beam_search.jl") export beam_search, greedy_search end # module
{"hexsha": "82d9d3ca11f287e23d835e34732fbaa8fb708e8a", "size": 89, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/search/Search.jl", "max_stars_repo_name": "heinrichreimer/text-summarization-bert-reproducability", "max_stars_repo_head_hexsha": "728bdde483b53332e25b60f97981df7cc7c5ff9c", "max_stars_repo_licen...
from functools import lru_cache from typing import Tuple import numpy as np import pandas as pd from scipy.optimize import minimize TRADING_DAYS_PER_YEAR = 365 def get_log_returns_over_period(price_history: pd.DataFrame) -> np.array: """ Given the price time series, compute the logarithm of the ration betwe...
{"hexsha": "73319907ebe708cb699262e90b93d73283801ea5", "size": 5799, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpt.py", "max_stars_repo_name": "thelearningwolf/mpt_medium", "max_stars_repo_head_hexsha": "461378336080de7da05fb5b1a4a8834c777450c9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
#ifndef XAOS_DETAIL_BACKEND_ALLOC_HPP #define XAOS_DETAIL_BACKEND_ALLOC_HPP #include <boost/core/pointer_traits.hpp> namespace xaos { namespace detail { struct alloc_interface { virtual auto relocate(void* alloc) -> void* = 0; virtual void delete_this(void* alloc) = 0; protected: ~alloc_interface() = defau...
{"hexsha": "a8a2d05db4863f037f573fb68d24ec6cb6771051", "size": 1904, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/xaos/detail/backend_alloc.hpp", "max_stars_repo_name": "grisumbras/xaos", "max_stars_repo_head_hexsha": "9d8a93911b9284a826ad43ba133a2febf960481c", "max_stars_repo_licenses": ["BSL-1.0"], "m...
import torch import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import sys from os.path import join as pjoin import scanpy as sc import squidpy as sq import anndata from sklearn.metrics import r2_score, mean_squared_error from gpsa import VariationalGPSA, rbf_kernel from gpsa...
{"hexsha": "735c06655c3db8434eec9ddb5eafd5f68b02591d", "size": 11815, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/expression/visium/visium_prediction.py", "max_stars_repo_name": "andrewcharlesjones/spatial-alignment", "max_stars_repo_head_hexsha": "70aecf800c5efea6a92990ccf87a1950752a268b", "max_...
r"""Shift in linear model""" import numpy as np from . import pw_constant def pw_linear(n_samples=200, n_features=1, n_bkps=3, noise_std=None, seed=None): """Return piecewise linear signal and the associated changepoints. Args: n_samples (int, optional): signal length n_features (int, option...
{"hexsha": "a50f52ac91f428e15bc6d448874a07be53f5a729", "size": 1065, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ruptures/datasets/pw_linear.py", "max_stars_repo_name": "Lucas-Prates/ruptures", "max_stars_repo_head_hexsha": "9685818d08ca024c0abb6ecf6121f2f86fb26dba", "max_stars_repo_licenses": ["BSD-2-Cl...
@testset "Manopt.jl Error Measures" begin M = Sphere(2) N = PowerManifold(M, NestedPowerRepresentation(), 2) using Random: seed! seed!(42) d = Manifolds.uniform_distribution(M, [1.0, 0.0, 0.0]) w = rand(d) x = rand(d) y = rand(d) z = rand(d) a = [w, x] b = [y, z] @test me...
{"hexsha": "f891b109932ddbb60c0bcfaaf6e36b68a6c1f1c7", "size": 595, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/helpers/test_error_measures.jl", "max_stars_repo_name": "fkastner/Manopt.jl", "max_stars_repo_head_hexsha": "89c60404c7cf756102bcf45dd58dc443ef2b2d4e", "max_stars_repo_licenses": ["MIT"], "max_...
Inductive IND2 (A:Type) (T:=fun _ : Type->Type => A) := CONS2 : IND2 A -> IND2 (T IND2).
{"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq/test-suite/coqchk/bug_8655.v"}
import pandas as pd from textblob import TextBlob import numpy as np from sklearn.feature_extraction.text import CountVectorizer from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.tree import DecisionTreeClassifier from sklearn.cross_validation impor...
{"hexsha": "3710df5041c0a85243abff568a6e732ef931bb18", "size": 30710, "ext": "py", "lang": "Python", "max_stars_repo_path": "cooking1.py", "max_stars_repo_name": "Bolaka/kaggle-whats-cooking", "max_stars_repo_head_hexsha": "2e8eac8bdc36188c43eac1979a47a77e246db617", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
using BinaryBuilder, Pkg name = "MKL" version = v"2021.1.1" # Bash recipes for building across all platforms script = read(joinpath(@__DIR__, "script.sh"), String) script_macos = read(joinpath(@__DIR__, "script_macos.sh"), String) non_reg_ARGS = filter(arg -> arg != "--register", ARGS) platform_sources = [ ( ...
{"hexsha": "899af5ed1ec3f1107cc564b0f5abffa27b50137a", "size": 3577, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "M/MKL/build_tarballs.jl", "max_stars_repo_name": "plut/Yggdrasil", "max_stars_repo_head_hexsha": "594ecaf79fb5f7a7e53055b8d125d8d4538ea68e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ----------------------------------------------------------------------...
{"hexsha": "94fa8cd14b3ef0bb752b60e4cfe18e274cd0d5f8", "size": 4161, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyStationB/libraries/ABEX/tests/plotting/test_convergence_plotting.py", "max_stars_repo_name": "BrunoKM/station-b-libraries", "max_stars_repo_head_hexsha": "ea3591837e4a33f0bef789d905467754c27913b...
subroutine DecisionsRet !**************************************************************************** ! ! PROGRAM: DecisionsRet ! ! PURPOSE: Compute Decision Rules of Retired ! ! VERSION: ! 0.1, 11-June-2012 ! 1.0, 27-May-2013 ! 1.1, 10-June-2014 ! ! LAST EDITED BY: Kurt, 13-June-201...
{"hexsha": "3793df05826b6ff94fa1818e2e40f3e6613ffeb7", "size": 50956, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "FortranCode/benchmark-code/DecisionsRet.f90", "max_stars_repo_name": "lnsongxf/housing-boom-bust", "max_stars_repo_head_hexsha": "bb75a2fd0646802dcdf4d5e56d1392bae7090e1c", "max_stars_repo_lice...
/* * GridTools * * Copyright (c) 2014-2021, ETH Zurich * All rights reserved. * * Please, refer to the LICENSE file in the root directory. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <ostream> #include <string> #include <typeinfo> #include <boost/core/demangle.hpp> #include <nlohmann/json...
{"hexsha": "5d8c9d6e7b690b8d2604b694eb45204379e0617f", "size": 6116, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/gridtools/stencil/dump.hpp", "max_stars_repo_name": "afanfa/gridtools", "max_stars_repo_head_hexsha": "6b1fd1f916d291f9a1cab1d27b48aa0282097d68", "max_stars_repo_licenses": ["BSD-3-Clause"],...
# -*- coding: utf-8 -*- """ Class for "reading" fake data from an imaginary file. For the user, it generates a :class:`Segment` or a :class:`Block` with a sinusoidal :class:`AnalogSignal`, a :class:`SpikeTrain` and an :class:`EventArray`. For a developer, it is just an example showing guidelines for someone who wants...
{"hexsha": "c79f7e8eba26857a59e577634aea58f52f706d46", "size": 11859, "ext": "py", "lang": "Python", "max_stars_repo_path": "neo/io/exampleio.py", "max_stars_repo_name": "tclose/python-neo", "max_stars_repo_head_hexsha": "338d381b735a019f6be68ab7196366eed33815fe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
[STATEMENT] lemma norm_\<P>\<^sub>L_le_one: "norm (\<P>\<^sub>L d) \<le> 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. norm (\<P>\<^sub>L d) \<le> 1 [PROOF STEP] using norm_\<P>\<^sub>L_le norm_\<P>\<^sub>1 [PROOF STATE] proof (prove) using this: norm (\<P>\<^sub>L ?d) \<le> norm (\<P>\<^sub>1 (mk_dec_det ?d)) n...
{"llama_tokens": 199, "file": "MDP-Algorithms_Splitting_Methods", "length": 2}
"""Zernike polynomials.""" from collections import defaultdict import numpy as truenp from .jacobi import jacobi, jacobi_sequence from prysm.mathops import np, kronecker, sign, is_odd from prysm.util import sort_xy from prysm.plotting import share_fig_ax def zernike_norm(n, m): """Norm of a Zernike polynomial...
{"hexsha": "16adf1ae7b5caa70b9478190d844f451bb853432", "size": 14644, "ext": "py", "lang": "Python", "max_stars_repo_path": "prysm/polynomials/zernike.py", "max_stars_repo_name": "deisenroth/prysm", "max_stars_repo_head_hexsha": "53a400ef89697041f67192e879e61ad28c451318", "max_stars_repo_licenses": ["MIT"], "max_stars_...
module clblas use cl implicit none private public :: & clblasGetVersion, & clblasSetup, & clblasTeardown, & clblasDtrsmEx, & clblasZtrsmEx, & clblasDgemmEx, & clblasZgemmEx, & clblasDsyrkEx, & clblasZhe...
{"hexsha": "fd44eab9df158ab6d36104ed375715a23d2d852d", "size": 13856, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "external_libs/fortrancl/clblas.f90", "max_stars_repo_name": "gimunu/octopus-metric", "max_stars_repo_head_hexsha": "baabccd5402922a2f62f5cf6030d15e7ea76dc9b", "max_stars_repo_licenses": ["Apach...
import category_theory.base import category_theory.replete open category_theory open category_theory.category local notation f ` ∘ `:80 g:80 := g ≫ f universes v u namespace homotopy_theory.weak_equivalences class has_weak_equivalences (C : Type u) [category C] := (is_weq : Π ⦃a b : C⦄, (a ⟶ b) → Prop) def is_weq ...
{"author": "rwbarton", "repo": "lean-homotopy-theory", "sha": "39e1b4ea1ed1b0eca2f68bc64162dde6a6396dee", "save_path": "github-repos/lean/rwbarton-lean-homotopy-theory", "path": "github-repos/lean/rwbarton-lean-homotopy-theory/lean-homotopy-theory-39e1b4ea1ed1b0eca2f68bc64162dde6a6396dee/src/homotopy_theory/formal/weak...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import processing_cxx from utils.detection_input import DetectionAugmentation from rangedet.core.util_func import jit_class_aware_expand, sample_data EPS = 1e-3 class LoadRecord(Detection...
{"hexsha": "4790402dad54af7d6ab01704aa18dab9a9a93cdb", "size": 24363, "ext": "py", "lang": "Python", "max_stars_repo_path": "rangedet/core/input.py", "max_stars_repo_name": "jie311/RangeDet", "max_stars_repo_head_hexsha": "5078ce339c6d27a009aed1ca2790911ce4d10bc7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import numpy as np from keras.models import load_model data = np.load('face_test.npz') # print(data['arr_0']) trainX, trainy, testX, testy = data['arr_0'], data['arr_1'], data['arr_2'], data['arr_3'] print('Loaded: ', trainX.shape, trainy.shape, testX.shape, testy.shape) model = load_model('facenet_keras.h5') print(...
{"hexsha": "46fb5f90665c67086a815fd1f61fe1e8101e2e58", "size": 1039, "ext": "py", "lang": "Python", "max_stars_repo_path": "Face Attendance/detect.py", "max_stars_repo_name": "dipesh-commits/ML_Materials", "max_stars_repo_head_hexsha": "e5168b5e7287ce99c0e875169a2e11fba2a5462e", "max_stars_repo_licenses": ["MIT"], "max...
# Copyright 2021 Fedlearn authors. # 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 writi...
{"hexsha": "3a8382b37ed6e3cc7aa4af996a753d5b54dac9b9", "size": 9105, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/kernelmethod/server_kernelmethod.py", "max_stars_repo_name": "monadyn/fedlearn-algo", "max_stars_repo_head_hexsha": "c4459d421139b0bb765527d636fff123bf17bda4", "max_stars_repo_licenses": ["A...
import matplotlib.pyplot as plt import numpy as np lines = np.loadtxt("episode_reward_3.txt", comments="#", delimiter="\n", unpack=False) lines_2 = np.loadtxt("episode_reward_2.txt", comments="#", delimiter="\n", unpack=False) plt.plot(lines) plt.plot(lines_2) plt.show()
{"hexsha": "6e464cbc4fae401b193233f84c36c4a882904777", "size": 273, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "anirudh9119/credit_assignment", "max_stars_repo_head_hexsha": "b3135f82ca40a93a0490ae103b007cf1b837531a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,...
import unittest import numpy as np from ffthompy.matvecs import DFT, VecTri class Test_matvec(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_matrix_versions(self): print('\nChecking Matrices...') for dim in [2, 3]: for n in [4, 5]...
{"hexsha": "f40f1891729caa750b617c381f79d13329b7fd52", "size": 1545, "ext": "py", "lang": "Python", "max_stars_repo_path": "ffthompy/matvecs/unittest_matvec.py", "max_stars_repo_name": "TruongQuocChien/FFTHomPy", "max_stars_repo_head_hexsha": "2c23c80dd2cab46f1090103e613b4f886b3daac7", "max_stars_repo_licenses": ["MIT"...
from typing import List import numpy as np import gunpowder as gp class MergeMasks(gp.BatchFilter): def __init__( self, arrays: List[gp.ArrayKey], output_array: gp.ArrayKey): """Merge multiple binary masks with a logical and Args: arrays: list of bi...
{"hexsha": "33297b55761feecf298920a8ed3463af51b869b3", "size": 1151, "ext": "py", "lang": "Python", "max_stars_repo_path": "incasem/gunpowder/merge_masks.py", "max_stars_repo_name": "kirchhausenlab/incasem", "max_stars_repo_head_hexsha": "ee9e007c5c04571e547e2fb5af5e800bd2d2b435", "max_stars_repo_licenses": ["BSD-3-Cla...
# Copyright 2016 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 applicable ...
{"hexsha": "938401f80cefa249a9692cd9bff36b5f624da758", "size": 3110, "ext": "py", "lang": "Python", "max_stars_repo_path": "Fine-tuning/datasets/dataset_factory.py", "max_stars_repo_name": "ivclab/NeuralMerger", "max_stars_repo_head_hexsha": "9802f79ee2bfdb24aca5c5710bc68e045ee7563a", "max_stars_repo_licenses": ["MIT"]...
import numpy as np import requests def hello_world(): print('hello world!') def get_numpy(): matrix_a = np.random.randn(3, 3) return matrix_a def get_requests(): r = requests.get('https://www.google.com') return r.content if __name__ == '__main__': hello_world() print(get_numpy()) ...
{"hexsha": "cc5732d6b6f24ba206d04a02965e5fe39ea0deb7", "size": 344, "ext": "py", "lang": "Python", "max_stars_repo_path": "sayhello/say_hello.py", "max_stars_repo_name": "frzmohammadali/my_pypi_package", "max_stars_repo_head_hexsha": "96d12da422cd1d4a644f4742aeed6aa15960e3f5", "max_stars_repo_licenses": ["MIT"], "max_s...
import .love01_definitions_and_statements_demo /-! # LoVe Exercise 1: Definitions and Statements Replace the placeholders (e.g., `:= sorry`) with your solutions. -/ set_option pp.beta true set_option pp.generalized_field_notation false namespace LoVe /-! ## Question 1: Truncated Subtraction 1.1. Define the fun...
{"author": "jappaaa", "repo": "Bachelor-project", "sha": "56d13d7ad5136ac2142d0d7cccb859c1a96a81e5", "save_path": "github-repos/lean/jappaaa-Bachelor-project", "path": "github-repos/lean/jappaaa-Bachelor-project/Bachelor-project-56d13d7ad5136ac2142d0d7cccb859c1a96a81e5/master course files/logical_verification_2021-main...
from recon.wall import WallReader, WallWriter from recon.meld import MeldReader, MeldWriter def wall2meld(wfp, mfp): """ This function reads a wall file in and converts it to a meld file. """ wall = WallReader(wfp) meld = MeldWriter(mfp, metadata=wall.metadata) objects = {} tables = {}...
{"hexsha": "d2b34eb02fe714f241d5c55c69ad802ff71e11a4", "size": 5483, "ext": "py", "lang": "Python", "max_stars_repo_path": "recon/trans.py", "max_stars_repo_name": "xogeny/recon", "max_stars_repo_head_hexsha": "72618d6f6b063bc37bd80a364d6f95934b0f3f79", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_sta...
%\documentstyle[times,titlepage,twoside,verbatimfiles]{article} \documentstyle[titlepage,twoside,verbatimfiles]{article} % margins from ~/tex/opengl/*.tex documents \topmargin -0.3in \headheight 10pt \headsep 15pt \oddsidemargin -.20in \evensidemargin -.35in \textwidth 7.1in \textheight 9in \makeindex ...
{"hexsha": "4babd5b22203cd88aa56beac5c274c3238af9ae7", "size": 27058, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "glut/doc/spec/spec2.tex", "max_stars_repo_name": "huidian200803/osg3RD", "max_stars_repo_head_hexsha": "5adb8824e49d339c73587582858ab6896898f9ad", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
""" Python 3.9 программа класса доски и класса игры между двумя игроками программа на Python по изучению обучения с подкреплением - Reinforcement Learning Название файла connect4_game.py Version: 0.1 Author: Andrej Marinchenko Date: 2021-12-22 """ import numpy as np # базовые методы для манипуляции с большими массива...
{"hexsha": "b74c5cdf244fbbe8ebfe01f581abe8025ebf155d", "size": 12725, "ext": "py", "lang": "Python", "max_stars_repo_path": "Game_AI_and_Reinforcement_Learning/ConnectX/v2/connect4_game.py", "max_stars_repo_name": "BEPb/Python-100-days", "max_stars_repo_head_hexsha": "163a68b42d1933d82599774a198eeef1624607bb", "max_sta...
"""Create 4x4 transformation matrices.""" import numpy from numpy import linalg from numpy.linalg import inv import math identity = numpy.asfortranarray(numpy.eye(4, dtype=numpy.float32)) def stretching(sx, sy, sz): """Create a transformation matrix that represents a stretching along x, y and z direction.""" ...
{"hexsha": "456617e5caefc35af400d0cc630d86d8cf0de75b", "size": 2764, "ext": "py", "lang": "Python", "max_stars_repo_path": "rpigl/transforms.py", "max_stars_repo_name": "stephanh42/rpigl", "max_stars_repo_head_hexsha": "6e546d961bb189b8b4c65317c1e9aa2b5cbd160e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 26...
import networkx as nx import matplotlib.pyplot as plt import numpy as np #graph: np.random.seed(42) G = nx.Graph() fig = plt.figure(figsize=(3,3),dpi=200) G.add_nodes_from([1,2,3,4,5,6]) G.add_edges_from([(1,2),(2,3),(4,5),(6,5),(3,4),(4,6),(3,1)]) nx.draw(G, node_color='#e3427d') G2 = nx.Graph() G2.add_nodes_from([1,...
{"hexsha": "2d3540413d47617dd6b1b9f56eb83e367c051d9f", "size": 1380, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/experiments/figure_link_pred_method.py", "max_stars_repo_name": "ChristianDjurhuus/RAA", "max_stars_repo_head_hexsha": "b2eb1db527bcb09f35598c2bbf8dff2689ad599b", "max_stars_repo_licenses": ["...
import numpy as np import torch import random class PointcloudRotate(object): def __call__(self, pc): bsize = pc.size()[0] for i in range(bsize): rotation_angle = np.random.uniform() * 2 * np.pi cosval = np.cos(rotation_angle) sinval = np.sin(rotation_angle) ...
{"hexsha": "edb06083d45226b5795b8a46dc9a370069d3a4ef", "size": 4190, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/data_transforms.py", "max_stars_repo_name": "Pang-Yatian/Point-MAE", "max_stars_repo_head_hexsha": "61727f76e9d0c28babf422505073bd43c2f517bc", "max_stars_repo_licenses": ["MIT"], "max_sta...