text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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": "1909ab5da465dab7b98ac67379f30a34fce705ec", "size": 31556, "ext": "py", "lang": "Python", "max_stars_repo_path": "openstack_health/api.py", "max_stars_repo_name": "MountakBernotas/https-github.com-openstack-openstack-health", "max_stars_repo_head_hexsha": "9073777993eac43a2a9bfd9e341d6fd48ab15955", "max_star...
!! # check to see if value exceeds threshold integer function user_exceeds_th(blockno,& qval,qmin,qmax,quad, & dx,dy,dz,xc,yc,zc,threshold, & init_flag, is_ghost) implicit none double precision :: qval,...
{"hexsha": "85c0e847de7fb11652847eaeb2bdf3271476367f", "size": 927, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "applications/clawpack/advection/3d/swirl/user_exceeds_th.f90", "max_stars_repo_name": "ECLAIRWaveS/ForestClaw", "max_stars_repo_head_hexsha": "0a18a563b8c91c55fb51b56034fe5d3928db37dd", "max_star...
import numpy as np import megengine as mge from scipy.spatial.transform import Rotation def np_dcm2euler(mats: np.ndarray, seq: str = "zyx", degrees: bool = True): """Converts rotation matrix to euler angles Args: mats: (B, 3, 3) containing the B rotation matricecs seq: Sequence of euler rota...
{"hexsha": "0119cfe56fefad520741136d2975f7c5f2480640", "size": 1569, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/so3.py", "max_stars_repo_name": "megvii-research/OMNet", "max_stars_repo_head_hexsha": "3585d4d63da3606c6433ec34714df74ef7ad74d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10,...
# Copyright (c) 2022 Dai HBG """ 该脚本用于测试某一个信号矩阵top n股票做多的收益 日志 2022-01-21 - 需要过滤涨停板 """ import numpy as np def top_n_tester(signal: np.array, ret: np.array, top: np.array, zdt_top: np.array, position_date_dic: dict, order_code_dic: dict, s: int, e: int, n: int = 10): abs_ret = [] # 绝对收益 ...
{"hexsha": "01bcfdbd2732575e454e2d717a044e9904e66020", "size": 956, "ext": "py", "lang": "Python", "max_stars_repo_path": "QBG/Tester/tools/top_n_tester.py", "max_stars_repo_name": "GYMS-PKU/Daily-Frequency-Quant", "max_stars_repo_head_hexsha": "808eda9930efecff04ecf98abf617404cadd0003", "max_stars_repo_licenses": ["MI...
using OVERTVerify using LazySets using Dates using JLD2 function run_query(query_number, avoid_set, controller_name) controller = "nnet_files/jmlr/tora_"*controller_name*"_controller.nnet" println("Controller: ", controller_name) query = OvertQuery( Tora, # problem controller, # network file Id(), #...
{"hexsha": "878af8360ee0e5c8cdc52b1272347dc2b744a6ea", "size": 1717, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/examples/jmlr/tora_satisfiability.jl", "max_stars_repo_name": "sisl/OvertVerify.jl", "max_stars_repo_head_hexsha": "c76fe7703b5068cbdc91e058d815f1fcbda44d70", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma Says_Nonce_not_used_guard: "[| Says A' B \<lbrace>A'',r,I,L\<rbrace> \<in> set evs; Nonce n \<notin> used evs |] ==> L \<in> guard n Ks" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Says A' B \<lbrace>A'', r, I, L\<rbrace> \<in> set evs; Nonce n \<notin> used evs\<rbrakk> \<Longrightarro...
{"llama_tokens": 175, "file": null, "length": 1}
# Copyright 2018 The TensorFlow Probability 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 o...
{"hexsha": "f47353ee0b1fe8aec6d1c17bc99825bf21284925", "size": 15461, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/bijectors/reshape_test.py", "max_stars_repo_name": "souravsingh/probability", "max_stars_repo_head_hexsha": "0519b63094fdaa4e326357a0cdff056d5ef76cd8", "max_stars_re...
program t ! from Tom Henderson implicit none character (len=100) :: lawyers integer :: x, y, zzz x = 2 y = 1 zzz = x + ay print *, 'zzz = ',zzz zz az = x * ay print *, 'zzz = ',zzz zzz = x - ay print *, '...
{"hexsha": "5f191e4fba827684a2a75acb734df1d718cdc3e8", "size": 1705, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0212x/t.f", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2, ...
''' This file is designed to determine how often the market index is in a relative bear or bull market state. This file runs through every daily price of the S&P 500 Index and uses the following steps: 1- Look back over past 180 days 2- Set two thresholds- one that is slightly below the max of last 180 day prices, and ...
{"hexsha": "47db8df46bfc97e0faa5a1523f7811c4ca25fa26", "size": 2894, "ext": "py", "lang": "Python", "max_stars_repo_path": "TrendTrading/ProbModel/CheckScripts/comprehensiveStatusChecks.py", "max_stars_repo_name": "benjabee10/WKUResearch", "max_stars_repo_head_hexsha": "5cc384c0e0c1afc82c38a9e6eb63b80c85af7c97", "max_s...
/*********************************************************************** * created: Sun May 25 2014 * author: Timotei Dolean <timotei21@gmail.com> *************************************************************************/ /*************************************************************************** * C...
{"hexsha": "ff10627a3f62c738b42a37ec88e5f0a42447274d", "size": 10577, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/unit/ListView.cpp", "max_stars_repo_name": "bolry/cegui", "max_stars_repo_head_hexsha": "58b776a157409cb13092b77d68ab2618cf5c6e05", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 257....
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: Nienke Brinkman (nienke.brinkman@erdw.ethz.ch), 2020 :license: None """ import obspy import instaseis from typing import Union as _Union import numpy as np import SS_MTI.SourceTimeFunction as _STF def make_GF( or_time: obspy.UTCDateTime, ...
{"hexsha": "508842350dea3b688f103c5f84fbdb20491a5052", "size": 7303, "ext": "py", "lang": "Python", "max_stars_repo_path": "SS_MTI/GreensFunctions.py", "max_stars_repo_name": "nienkebrinkman/SS_MTI", "max_stars_repo_head_hexsha": "2632214f7df9caaa53d33432193ba0602470d21a", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Lean.Elab.Term import Lean.Meta.Tactic.Apply import Lean.Meta.Tactic.Assumption import Lean.Elab.DeclarationRange import Mathlib.Control.SimpSet /-! # HigherOrder a...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/Tactic/HigherOrder.lean"}
from glob import glob from tifffile import imread import mxnet as mx import mxnet.ndarray as nd import numpy as np from matplotlib import pyplot as plt from mxnet import gpu, cpu import time, os import cv2 from glob import glob import sys sys.path.insert(0, 'D:\Github\cellpose') import cellpose from cellpose import ut...
{"hexsha": "fe8a349e8b0a8b095bdcb351deb387513e6fe73e", "size": 7184, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellpose/collect_datasets.py", "max_stars_repo_name": "haoxusci/cellpose", "max_stars_repo_head_hexsha": "ea3cdf687cb026608f2e6a97d3d1e4fac61257d3", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
module rex implicit none public :: rex_init public :: rex_seed public :: rex_exchange public :: rex_id public :: rex_rank public :: rex_finalize private include "mpif.h" ! MPI message tag used for replica exchange messages. This is an arbitrary ! number that is not used for an...
{"hexsha": "dc9421ef16ffa9d8f3469d432bc9daeba1338456", "size": 5922, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "rex.f95", "max_stars_repo_name": "snsinfu/f95-replica-exchange", "max_stars_repo_head_hexsha": "9c400bbe1192d7f102574334590b2a12624a6f63", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_coun...
# -*- coding: utf-8 -*- # @Time : 19-8-2 下午3:08 # @Author : zj from classifier.nn_classifier import NN from tests.gradient_check import eval_numerical_gradient, eval_numerical_gradient_array import numpy as np import pytest def rel_error(x, y): """ returns relative error """ return np.max(np.abs(x - y) ...
{"hexsha": "77b3ad1dbd6b9b76b178eddfa5ada597e6c27d5a", "size": 9939, "ext": "py", "lang": "Python", "max_stars_repo_path": "coding/tests/test_nn_classifier.py", "max_stars_repo_name": "deep-learning-algorithm/cs231n", "max_stars_repo_head_hexsha": "b4da574a00622f1993ae3fe9ef777d751ed7e591", "max_stars_repo_licenses": [...
import fileinput import statistics import numpy as np from scipy import stats degree_data = [] for line in fileinput.input(): line = line.strip() identifier, degree = line.split('\t') degree_data.append(int(degree)) if degree_data: m, c = stats.mode(degree_data) mode = m[0] mode_frequency = c...
{"hexsha": "ce284f7d46d9be2054f0c6007aad1ada2f32614d", "size": 851, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/calculate_degree_stats.py", "max_stars_repo_name": "vphill/metadata-record-graphs", "max_stars_repo_head_hexsha": "69462d7f1fb852b6c6a7d5e27b2221c594456b4b", "max_stars_repo_licenses": ["BSD-3...
[STATEMENT] lemma inverse_prod_list_field: "prod_list (map (\<lambda>x. inverse (f x)) xs) = inverse (prod_list (map f xs :: _ :: field list))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<Prod>x\<leftarrow>xs. inverse (f x)) = inverse (prod_list (map f xs)) [PROOF STEP] by (induction xs) simp_all
{"llama_tokens": 120, "file": "Landau_Symbols_Landau_Real_Products", "length": 1}
\documentclass[stock,9pt,nohan]{oblivoir} \usepackage{fapapersize} \usefapapersize{3in,4.5in,.333in,*,.333in,.333in} \usepackage{gensymb} \linespread{1.25} \frenchspacing \usepackage[verbose=true]{microtype} \renewcommand{\contentsname}{Table of Contents} \newcommand{\gamever}{Alpha 1} \newcommand{\titleEN}{A Poc...
{"hexsha": "dbeac1dbe4fbac014b9d17ddca07f5fe247bb648", "size": 5106, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "assets/books/userguide_ENG.tex", "max_stars_repo_name": "curioustorvald/Terrarum", "max_stars_repo_head_hexsha": "6697f2f5cd77e2fb108ecdab4141b9d23086a4fa", "max_stars_repo_licenses": ["Apache-2.0"]...
[STATEMENT] lemma eq_key_imp_eq_value: "v1 = v2" if "distinct (map fst xs)" "(k, v1) \<in> set xs" "(k, v2) \<in> set xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v1 = v2 [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. v1 = v2 [PROOF STEP] from that [PROOF STATE] proof (chain) pickin...
{"llama_tokens": 899, "file": null, "length": 14}
\section{Blockchain Scalability Proposals}\label{appendix:blockchain_scalability} Here, we review some proposals to solve the Strong Byzantine Generals’ (SBG) problem while scaling the blockchain, and to allow blockchain-like behavior at greater scales. This list is not intended to be exhaustive. \subsection{Base Con...
{"hexsha": "9444dada0e1c3bfd3a78c3078bedc256b6dc8ecd", "size": 11041, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/appendix02_blockchain_scalability.tex", "max_stars_repo_name": "bigchaindb/whitepaper", "max_stars_repo_head_hexsha": "ef42daf8c06bea0bb04747963b3ae23f667ea338", "max_stars_repo_licenses": ["CC...
[STATEMENT] lemma isCont_If_ge: fixes a :: "'a :: linorder_topology" assumes "continuous (at_left a) g" and f: "(f \<longlongrightarrow> g a) (at_right a)" shows "isCont (\<lambda>x. if x \<le> a then g x else f x) a" (is "isCont ?gf a") [PROOF STATE] proof (prove) goal (1 subgoal): 1. isCont (\<lambda>x. if x \...
{"llama_tokens": 1190, "file": null, "length": 13}
import Base: show, string, typejoin abstract type AbstractLogicTerm end abstract type SententialTerm{T<:AbstractLogicTerm} <: AbstractLogicTerm end abstract type JunctionTerm{T<:AbstractLogicTerm} <: SententialTerm{T} end abstract type QuantifierTerm{T<:AbstractLogicTerm} <: SententialTerm{T} end # we make Variable <...
{"hexsha": "0e93bd26278d728c0b58f1ebd93abecd549c0238", "size": 4003, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types.jl", "max_stars_repo_name": "william-macready/FirstOrderLogic.jl", "max_stars_repo_head_hexsha": "6a1a7ee0c5ad4a6fcfa34e907d39ba9f61ab3b57", "max_stars_repo_licenses": ["MIT"], "max_stars...
using Interp1d using Documenter DocMeta.setdocmeta!(Interp1d, :DocTestSetup, :(using Interp1d); recursive=true) makedocs(; modules=[Interp1d], authors="Atsushi Sakai <asakai.amsl+github@gmail.com> and contributors", repo="https://github.com/AtsushiSakai/Interp1d.jl/blob/{commit}{path}#{line}", sitenam...
{"hexsha": "86c079ee4a9d0842d0ea30e4ec60e9934010be5c", "size": 678, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "AtsushiSakai/Interp1d.jl", "max_stars_repo_head_hexsha": "0253a2e5669a2b65af0456d8ff161644efae37eb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
def rdm_concat_df(path, outfile=None, prefix=None, addata=None, columns=None): '''function to create an dictionary containing all RDMs from a given dictory''' global dict_rdms global DefaultListOrderedDict from os.path import join as opj import sys from glob import glob from scipy....
{"hexsha": "e6bd038807f88a0fab7de019838865578527aebc", "size": 2062, "ext": "py", "lang": "Python", "max_stars_repo_path": "urial/utils/rdm_concat_df.py", "max_stars_repo_name": "MirjamSchneider/URIAL", "max_stars_repo_head_hexsha": "be3edb5299dc812f4e4fa75bcb9d71c853209c8a", "max_stars_repo_licenses": ["BSD-3-Clause"]...
using Bootstrap ## COPY function Base.copy(d::NamedTuple{(:X, :Y), Tuple{FreqTab, FreqTab}}) return (X = copy(d.X), Y = copy(d.Y)) end function Base.copy(t::FreqTab) FreqTab( copy(t.table), copy(t.raw), copy(t.interval), merge(t.stats) ) end function copy(x::SGEquateResu...
{"hexsha": "ba3f075a09695d17ab2529e5e15238a98b287a0a", "size": 5511, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SEE.jl", "max_stars_repo_name": "takuizum/Equate.jl", "max_stars_repo_head_hexsha": "8ba0055ef69fc086fd4b39cff545a623d5a793fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
from utils import * from sample_generator import * from cvxopt import matrix from l1 import l1 import numpy as np import math import os def denoise_step(sample, H=3, dn1=1., dn2=1.): def get_denoise_value(idx): start_idx, end_idx = get_neighbor_idx(len(sample), idx, H) idxs = np.arange(start_idx,...
{"hexsha": "86a9b57311f32b13c80f2e042ca2e90ec2edc63e", "size": 5809, "ext": "py", "lang": "Python", "max_stars_repo_path": "RobustSTL.py", "max_stars_repo_name": "leezhi403/LeeDoYup-RobustSTL", "max_stars_repo_head_hexsha": "69ca042ab53ea204a5c17571eb460afcced3937a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import matplotlib.pyplot as plt xs = np.fromfile('utcs.dat', dtype=np.uint32) ys = np.fromfile('values.dat', dtype=np.uint64) print('Loaded') xs = np.random.choice(xs, size=1000000) ys = np.random.choice(ys, size=1000000) / 1e8 xmin = xs.min() ymin = ys.min() xmax = xs.max() ymax = ys.max() print...
{"hexsha": "3df94df13b78860764d893dd3f797accc90c4b8f", "size": 478, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/heatmap.py", "max_stars_repo_name": "NewProggie/fast-dat-parser", "max_stars_repo_head_hexsha": "70c28f16cb5ee33f9cb56c2db81069d27eaca0c4", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import h5py import numpy as np import vigra import json from math import sqrt from cremi.evaluation import NeuronIds from cremi import Volume from skunkworks.postprocessing.watershed.dam_ws import DamWatershed def cremi_scores(seg, gt): if 0 in gt: gt[gt == 0] = -1 seg = Volume(seg) met...
{"hexsha": "9cf5b79e4a5682d62564640c4ecaba761f70f9e3", "size": 1702, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/cremi/offset-experiments/no_ignore_bb.py", "max_stars_repo_name": "constantinpape/inferno-experiments", "max_stars_repo_head_hexsha": "7eb034c330a69b58406ca25f35981b01ca0fdc2d", "max_s...
from numpy.core.numeric import NaN from numpy.lib.type_check import nan_to_num from src.utils import softmax import numpy as np from copy import deepcopy class NaiveBayes: """ A Naive Bayes classifier for binary data. """ def __init__(self, smoothing=1): """ Args: smoothin...
{"hexsha": "7feb0ccecab96550e3c833d55cce88809de54e5e", "size": 12550, "ext": "py", "lang": "Python", "max_stars_repo_path": "naive_bayes_and_expectation_maximization/src/naive_bayes.py", "max_stars_repo_name": "WallabyLester/Machine_Learning_From_Scratch", "max_stars_repo_head_hexsha": "6042cf421f5de2db61fb570b7c4de64d...
from collections import OrderedDict import pytest import pandas as pd import numpy as np from prepnet.category.ordinal_converter import OrdinalConverter from prepnet.category.onehot_converter import OnehotConverter def test_ordinal_converter(): input_series = pd.Series(['frame', 'frame', 'old', 'test', 'old', '...
{"hexsha": "0866d174d9ea4170867da5d340f976b09f50e539", "size": 2245, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_category.py", "max_stars_repo_name": "elda27/prepnet", "max_stars_repo_head_hexsha": "0f05018969496321aaa770b7e22bda858dab0ad6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
// Boost.GIL (Generic Image Library) - tests // // Copyright 2020 Olzhas Zhumabek <anonymous.from.applecity@gmail.com> // // Use, modification and distribution are subject to 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...
{"hexsha": "97fcd8cde5d2e33b8894d0629fde1ffe7f079e69", "size": 4732, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/gil/image_processing/hough_parameter.hpp", "max_stars_repo_name": "harsh-4/gil", "max_stars_repo_head_hexsha": "6da59cc3351e5657275d3a536e0b6e7a1b6ac738", "max_stars_repo_licenses": ["...
import h5py from bisect import bisect_left import matplotlib.pyplot as plt import numpy as np class brianPlotter: def __init__(self, hdf5name , permision = "w"): self.hdf = h5py.File(hdf5name, permision) def saveData(self, dataName , dataArray , downsample=True): self.grp = self.hdf.create_gr...
{"hexsha": "efaadb1e2212b77ba68e0b43cf39c261c3999fa4", "size": 4514, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/brianPlotter.py", "max_stars_repo_name": "Jbwasse2/snn-rl", "max_stars_repo_head_hexsha": "29b040655f432bd390bc9d835b86cbfdf1a622e4", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os import numpy as np from bmtk.builder import NetworkBuilder from bmtk.utils.io.spike_trains import PoissonSpikesGenerator build_virtual_net = True cell_models = [ { 'model_name': 'Scnn1a', 'ei': 'e', 'morphology': 'Scnn1a_473845048_m.swc', 'model_template': 'ctdb:Biophys1.hoc', '...
{"hexsha": "37998fc2914f987a5b78a8cb62559fc4ecb4cc1e", "size": 2650, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/examples/bio_basic_features/build_network.py", "max_stars_repo_name": "tjbanks/bmtk", "max_stars_repo_head_hexsha": "52fee3b230ceb14a666c46f57f2031c38f1ac5b1", "max_stars_repo_licenses": ["BS...
import torch import numpy as np class BeamSearcher(): def __init__(self, width, eos): self.width = width self.eos = eos self.hypos = [{'seq': [], 'score': 0} for _ in range(width)] self.parent_hypos = [i for i in range(width)] self.end_hypos = [] def step(self, step, l...
{"hexsha": "8a61ef2140b20f378b6475e8a6070eb6b37fd3a3", "size": 1810, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_models/models/beam_searcher.py", "max_stars_repo_name": "Ryou0634/pytorch_models", "max_stars_repo_head_hexsha": "cd48f9b3797839df5dbf4e51bed81de44e7b962e", "max_stars_repo_licenses": ["BSD-...
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import numpy as np numbers = np.array([[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]) print(np.flip(numbers, 1)) numbers2 = np.array([[1, 1, 1, 1], [2, 2, 2, 2], ...
{"hexsha": "2d942ad3b37cf341e23474a2ef2bc9d0cea6d0ed", "size": 372, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/intro/intro_numpy_flip.py", "max_stars_repo_name": "Kreijeck/learning", "max_stars_repo_head_hexsha": "eaffee08e61f2a34e01eb8f9f...
using LightGraphs, Plots, StatsPlots, Distributions, GraphRecipes, GraphIO, ParserCombinator, JSON using GraphIO: GML gr() theme(:juno) N = 50 k = 1 function gen_graph(N, k) G = barabasi_albert(N, k) path = a_star(G, 1, N) uni = Set{Int}() for e ∈ path push!(uni, e.src) push!(uni, e....
{"hexsha": "838ceeefe12ff6cb7c9c56e962c767f37be261a1", "size": 1046, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/BI/examples/path/gen.jl", "max_stars_repo_name": "shalinkpatel/GCN_Integration", "max_stars_repo_head_hexsha": "253fa4321606acf0ee0a98667bf6e5eb8ec96cf1", "max_stars_repo_licenses": ["MIT"]...
function readSP3(gpsWeek, day) # Construct string #sp3File = datadir("igs") * "\\igs" * string(gpsWeek) * string(day) * ".sp3" sp3File = datadir("igs", "igs" * string(gpsWeek) * string(day) * ".sp3") if !isfile(sp3File) throw(ErrorException("The file " * sp3File * " does not exist and...
{"hexsha": "e48afee58a2540b7798a0024eb4ebdb07102be1d", "size": 5299, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GPS/readSP3.jl", "max_stars_repo_name": "GrantHecht/OptimalEstimationProject", "max_stars_repo_head_hexsha": "42e595d1991a8f81cbfb36856528d572b45cc598", "max_stars_repo_licenses": ["MIT"], "max...
################################################################################ # Copyright (C) 2011-2012,2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Module for the Dirichlet distribution node. """ import ...
{"hexsha": "8825136a848c5f197c7281a130f07dd49eb9a65f", "size": 11102, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayespy/inference/vmp/nodes/dirichlet.py", "max_stars_repo_name": "dungvtdev/upsbayescpm", "max_stars_repo_head_hexsha": "f6ee877c689046d3c57a2ac06742cfe4a0b6550e", "max_stars_repo_licenses": ["M...
import warnings warnings.filterwarnings("ignore") import string from nltk.tokenize import word_tokenize from nltk.corpus import stopwords import numpy as np import pandas as pd from tensorflow.python.keras.preprocessing.text import Tokenizer from sklearn.metrics import precision_recall_fscore_support from termcolor imp...
{"hexsha": "6fc7d531590683a81b34eb3cce49787fd7210845", "size": 4237, "ext": "py", "lang": "Python", "max_stars_repo_path": "impl/withPSL/RNN/NELL_cnn_random_multiple_features.py", "max_stars_repo_name": "wso2-incubator/knowledge-graph-optimizations", "max_stars_repo_head_hexsha": "4740c27eb5facf6e3ed594400bfb8533ac38de...
using Distributions, SpecialFunctions, FastGaussQuadrature struct PositiveStable <: ContinuousUnivariateDistribution α::Float64 β::Float64 θ::Float64 ρ::Float64 PositiveStable(α::Real,β::Real) = ( β < -1 || β > 1 || (β == -1 && α <= 1) || α <= 0 || α > 2 ) ? error("Parameters' requirements unmet:\n (...
{"hexsha": "ec533aee3ca4a55304b27fcc24320ac513fb8254", "size": 14125, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/positivestable.jl", "max_stars_repo_name": "jorgeignaciogc/StableMeander.jl", "max_stars_repo_head_hexsha": "5e7d9be7ce032445a4c8d7e98a59fbc1d04169ed", "max_stars_repo_licenses": ["MIT"], "max...
# EGEDA TPES plots for each economy import pandas as pd import numpy as np import matplotlib.pyplot as plt import os from openpyxl import Workbook import xlsxwriter import pandas.io.formats.excel # Import the recently created data frame that joins OSeMOSYS results to EGEDA historical EGEDA_years = pd.read_csv('./da...
{"hexsha": "815b1e8fa4b6faef72aafdc3781df041f970bec0", "size": 44287, "ext": "py", "lang": "Python", "max_stars_repo_path": "workflow/scripts/2_charts_tables/2017_egeda/TPES_economy.py", "max_stars_repo_name": "asia-pacific-energy-research-centre/8th_outlook_visualisations", "max_stars_repo_head_hexsha": "a8fed78db955f...
C (C) Copyright 1996-2016 ECMWF. C C This software is licensed under the terms of the Apache Licence Version 2.0 C which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. C In applying this licence, ECMWF does not waive the privileges and immunities C granted to it by virtue of its status as an intergov...
{"hexsha": "9def760b15ff1daee865d882ff97bde179443ed5", "size": 2092, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test/old/fortran/mark.f", "max_stars_repo_name": "dtip/magics", "max_stars_repo_head_hexsha": "3247535760ca962f859c203295b508d442aca4ed", "max_stars_repo_licenses": ["ECL-2.0", "Apache-2.0"], "max...
# -- coding: utf-8 -- import tensorflow as tf import numpy as np from data.data_hour import * import pandas as pd import argparse from gcn_model.hyparameter import parameter file='/Users/guojianzou/Traffic-speed-prediction/data/data_hour/' class HA(): def __init__(self, site_id=0, ...
{"hexsha": "90fda9e1d06dcc01444060245f73cfa476e4a5d5", "size": 3737, "ext": "py", "lang": "Python", "max_stars_repo_path": "MT-STFLN /comparison_model/ha.py", "max_stars_repo_name": "zouguojian/Traffic-speed-prediction", "max_stars_repo_head_hexsha": "4b9917a9e1147c37b64e51be3c060af4bdb9544d", "max_stars_repo_licenses"...
#coverage:ignore """ Determine costs for DF decomposition in QC """ from typing import Tuple import numpy as np from numpy.lib.scimath import arccos, arcsin # has analytc continuation to cplx from openfermion.resource_estimates.utils import QR, QI, power_two def compute_cost(n: int, lam: float, ...
{"hexsha": "53c778a44e560f36094ab6f924ab1881bd85a6c5", "size": 7438, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/openfermion/resource_estimates/df/compute_cost_df.py", "max_stars_repo_name": "cvmxn1/OpenFermion", "max_stars_repo_head_hexsha": "cf53c063d0f124a02ff8776bb7f8afb110d4bde6", "max_stars_repo_li...
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from matplotlib import pyplot as plt from astropy.stats import mad_std from astropy.io import fits from photutils import CircularAperture from astropy.convolution import convolve_fft, Topha...
{"hexsha": "4625cdeae578d6bef6b0e725565f406597180b11", "size": 4608, "ext": "py", "lang": "Python", "max_stars_repo_path": "toolkit/star_selection.py", "max_stars_repo_name": "bmorris3/rem", "max_stars_repo_head_hexsha": "be758a989fba62eac2a24bc201e855ee08173b47", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os.path import scipy.io as io import numpy as np _folder_path = os.path.abspath("./CVACaseStudy/CVACaseStudy/") FILE_NAMES = ( ('Training Data', 'Training.mat'), ('Faulty Case 1', 'FaultyCase1.mat'), ('Faulty Case 2', 'FaultyCase2.mat'), ('Faulty Case 3', 'FaultyCase3.mat'), ('Faulty Case 4...
{"hexsha": "33b093461f193c3ae15e4a049496f4ed0ec413bc", "size": 2197, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sfamanopt/load_cva.py", "max_stars_repo_name": "hsaafan/SSFA", "max_stars_repo_head_hexsha": "61c093c323c324b0eb7d2c93ef62252d71db6f16", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
C C C Support routines for PGPLOT tcl binding C C+ pgInitStream C subroutine pgInitStream( device, psize, paspect, nx, ny, id, s ) C ---------------------------------------------------------------- C C Select and open a new stream for graphical output C C Given: C device specification character ...
{"hexsha": "3938611b2051816bc8a424a9647b7ae397044747", "size": 7084, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "anm3d/pgplot_util.f", "max_stars_repo_name": "CavendishAstrophysics/anmap", "max_stars_repo_head_hexsha": "efb611d7f80a3d14dc55e46cd01e8a622f6fd294", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
""" sepp_base ~~~~~~~~~ A more abstract approach to SEPP type algorithms. """ from . import predictors from . import logger as _ocp_logger from . import data as _ocp_data import numpy as _np import datetime as _datetime import logging as _logging _logger = _logging.getLogger(__name__) class ModelBase(): """Inte...
{"hexsha": "175360094e78bd956c69a2fa63284255e863fa6b", "size": 29946, "ext": "py", "lang": "Python", "max_stars_repo_path": "open_cp/sepp_base.py", "max_stars_repo_name": "sumau/PredictCode", "max_stars_repo_head_hexsha": "e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8", "max_stars_repo_licenses": ["Artistic-2.0"], "max_star...
import torch import numpy import matplotlib.pyplot as plt from torch import nn from einops.layers.torch import Rearrange from einops import rearrange, repeat class PatchEmbedding(nn.Module): """Creates the patches for the model input""" def __init__( self, dim, channels=3, ...
{"hexsha": "ffc31773a9c45770b8da5ab40cb702eca3683574", "size": 2362, "ext": "py", "lang": "Python", "max_stars_repo_path": "transformers/patch_emb.py", "max_stars_repo_name": "mhun1/transformers", "max_stars_repo_head_hexsha": "06376fabd7ccc15bf7fa5a4a4a142961a8c41e79", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np def randomcolor(): ''' PICKS COLORS RANDOMLY ''' colors = [] for i in range(20): colors.append(list((np.random.randint(0, 255, 3) / 255))) return colors
{"hexsha": "ff7fcbb0bfdbde3d1f79a429a9fe598acfe02aeb", "size": 206, "ext": "py", "lang": "Python", "max_stars_repo_path": "astetik/style/random_colors.py", "max_stars_repo_name": "meirm/astetik", "max_stars_repo_head_hexsha": "ea05ce57a0bf1e8bd7ef18c4d5ca8d7ad3fb4be7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
% book : Signals and Systems Laboratory with MATLAB % authors : Alex Palamides & Anastasia Veloni % Fast Fourier Transform of the sequence x=[1 2 3],n=0,1,2 x=[1 2 3]; Xk1=fft(x) Xk2=dft(x)
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/28762-signals-and-systems-laboratory-with-ma...
using GeometryBasics import GeometryBasics import GeometryBasics as gb using Test x = Rect(Vec(0.0, 0.0), Vec(1.0, 1.0)) y = Rect(Vec(0.5, 0.7), Vec(1.0, 1.0)) #z = GeometryBasics.intersect(x,y) # """ # intersect(h1::Rect, h2::Rect) # Perform a intersection between two Rects. # """ # function intersect(h1::Rect...
{"hexsha": "1c77acf13eac7d628bac362e7b7baef79656de03", "size": 2646, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "learn/learn_GeometryBasics.jl", "max_stars_repo_name": "ykyang/org.allnix.julia", "max_stars_repo_head_hexsha": "58933a5848dec81c53d591b4163e9a70df62ddd8", "max_stars_repo_licenses": ["Apache-2.0"]...
import sys import signal import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import time from datetime import timedelta import pygame import pygame.camera import pygame.surfarray from PIL import Image import numpy as np image_path = 'image.jpg' # getting image from camera pygame.camera.init() # pygame.camera.list_came...
{"hexsha": "f1d255079fcba00519d3a1afd498677dd13635de", "size": 1173, "ext": "py", "lang": "Python", "max_stars_repo_path": "Classifier/Old/Camera.py", "max_stars_repo_name": "mugroma3/ClassiPi", "max_stars_repo_head_hexsha": "8a70a5f5691d28c57f084b370f4688b70e8f406a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma fold_sum_aux: assumes "\<forall>u \<in> set (a # xs). \<forall>v \<in> set (a # xs). f v + W u v \<ge> f u" shows "sum_list (map f (a # xs @ [a])) \<le> sum_list (map f (a # xs @ [a])) + weight (a # xs @ [a])" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sum_list (map f (a # xs @ [a])) \<le> ...
{"llama_tokens": 422, "file": "Monad_Memo_DP_example_Bellman_Ford", "length": 2}
function v = subsref( x, S ) try v = subsref( x.value_, S ); catch cvx_throw( 'Invalid tuple reference: %s%s', inputname(1), cvx_subs2str( S ) ); end % Copyright 2005-2014 CVX Research, Inc. % See the file LICENSE.txt for full copyright information. % The command 'cvx_where' will show where this file is locate...
{"author": "yu-jiang", "repo": "radpbook", "sha": "88b9fa7d0a541099cdd1ac29383c89e087d1d895", "save_path": "github-repos/MATLAB/yu-jiang-radpbook", "path": "github-repos/MATLAB/yu-jiang-radpbook/radpbook-88b9fa7d0a541099cdd1ac29383c89e087d1d895/tools/cvx-w64/cvx/lib/@cvxtuple/subsref.m"}
import unittest import numpy as np import json import os, shutil, tempfile from model import Model class ModelTests(unittest.TestCase): def setUp(self): self.model = Model() self.test_model_dir = tempfile.mkdtemp() self.mock_train_set = (np.zeros((1, 10000)), np.zeros((1,))) self...
{"hexsha": "2b7d53cbda8dab4d35589786aadde63ffc0030e4", "size": 5997, "ext": "py", "lang": "Python", "max_stars_repo_path": "IMDB_binary_classification/test/test_model.py", "max_stars_repo_name": "donK23/Thoughtful_DL", "max_stars_repo_head_hexsha": "8cd1b3b0ad35281b2e02a7e8581a606ae659284d", "max_stars_repo_licenses": ...
import os.path import logging import numpy as np from typing import Union import PyMieSim from PyMieSim.Tools.LPModes import GetFarFieldLP from PyMieSim.Tools.Mesh import FibonacciMesh from PyMieSim.Tools.BaseClasses import BaseDetector, MeshProperty from PyMieSim.Tools.ErrorMsg import * from PyMi...
{"hexsha": "a360e1d0d36bdf05eaa24772bedd158592130805", "size": 9241, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyMieSim/Detector.py", "max_stars_repo_name": "MartinPdS/PyMieSim", "max_stars_repo_head_hexsha": "2560c7f4009df5d05bcb0ce8e929aa7baa7be8de", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import common import config import Matlab import math import sys import numpy as np import cv2 CAUSAL_DO_NOT_SMOOTH = True def rand_index(max_index, a_len): if a_len > max_index: index = np.array([]) return index = np.zeros((1, a_len)) available = range(1, max_index) """ From...
{"hexsha": "fe9a013d363f4587ca50dea18218bc0eb9e2033d", "size": 27454, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/multiscale_synchro_decision.py", "max_stars_repo_name": "Spectavi/video-diff", "max_stars_repo_head_hexsha": "4ad28aea48877937f6b5b25f374f9c14eaf79212", "max_stars_repo_licenses": ["BSD-3-...
# -*- coding: utf-8 -*- """ Merge two X/y. Takes care of reading two feature/label files, merges them and shuffels them and writes them to new output directory. Of course, I could also generalize to two lists of X and ys, respectively but this might lead to even worse practices. One big approximation of all of this i...
{"hexsha": "e3f5095371789eab5e0dc65df332b76733095db0", "size": 4840, "ext": "py", "lang": "Python", "max_stars_repo_path": "run/merge_two_x_y.py", "max_stars_repo_name": "kjappelbaum/mof_oxidation_states", "max_stars_repo_head_hexsha": "1bbfe9d84802b2248a23ac3d3ee999ed649fe816", "max_stars_repo_licenses": ["MIT"], "max...
import torch import numpy as np import argparse import mmcv from mmcv.runner import load_checkpoint, init_dist, get_dist_info, build_optimizer, set_random_seed from mmcv import Config, DictAction from mmaction.models import build_recognizer from dataloader.dataloaderTCN import DataloaderTCN from scipy.io import savem...
{"hexsha": "90077805a2b88a470c07bb5128961a69520a0db3", "size": 4963, "ext": "py", "lang": "Python", "max_stars_repo_path": "features_extraction/feature_extractor.py", "max_stars_repo_name": "vinayakShenoy/Video-Swin-Transformer", "max_stars_repo_head_hexsha": "bd90abce394eca0db90d80c334c8b05aba2233b2", "max_stars_repo_...
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE G...
{"hexsha": "9fc969954a0d74d2e86e8f63efa63eea13d0515d", "size": 54507, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "factorio-module-selector.hs", "max_stars_repo_name": "Rotsor/factorio-module-selector", "max_stars_repo_head_hexsha": "22a595ba36bbf9ca337bba0dfbe3c387308f43b3", "max_stars_repo_licenses": ["Unl...
\documentclass[a4paper,10pt]{book} \usepackage{textcomp} \usepackage{amsmath} \usepackage{amsthm} \usepackage[top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry} \usepackage{setspace} \newtheorem{theorem}{Theorem}[chapter] \newtheorem{lemma}[theorem]{Lemma} \theoremstyle{definition} \newtheorem{definition}[t...
{"hexsha": "1290f6d412b54adb53d47f0a6cf771c6cda9bf0e", "size": 6954, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/Metric_Graphs.tex", "max_stars_repo_name": "siddhartha-gadgil/MetricGeometryCourse", "max_stars_repo_head_hexsha": "92ec7727f358107a8ad61a7229bc94e2aa9bbafc", "max_stars_repo_licenses": ["MIT"],...
from re import L import matplotlib import matplotlib.pyplot as plt import numpy as np def test_plotting(): station = "test_station" dates = [2019, 2020, 2021, 2022] levels = [12, 18, 45, 90] plt.plot(dates, levels) plt.xlabel('date') plt.ylabel('water level (m)') plt.xticks(rotation=45); ...
{"hexsha": "e189bcc454e2fc56b5132714fa2cf651d3a9cee9", "size": 377, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_plot.py", "max_stars_repo_name": "reib2/Lab-3-Flood-Warning", "max_stars_repo_head_hexsha": "9f86b4b8a7fa9508ddaa0e9754d64ff6c4e38f66", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" Crossmap class """ from contextlib import suppress from yaml import dump from logging import info, warning, error from os import mkdir, remove from os.path import exists from shutil import rmtree from scipy.sparse import vstack from .settings import CrossmapSettings from .dbmongo import CrossmapMongoDB as Crossmap...
{"hexsha": "fc056ccf3b2eb196b50cedd77ca90723e19f0910", "size": 14916, "ext": "py", "lang": "Python", "max_stars_repo_path": "crossmap/crossmap.py", "max_stars_repo_name": "tkonopka/crossmap", "max_stars_repo_head_hexsha": "237e4319a77281490c4e037918977230fea43d7e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from utils import gif from skimage import io, color import os import cv2 import nrrd import numpy as np import argparse from parse_config import ConfigParser import torch from dataloader.preprocessor import BUSIDataProcessor from model import models from utils import prepare_device def get_prediction(model, device, pa...
{"hexsha": "28d67566830aaf3710399d9449298f16cfe5e506", "size": 4662, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "tqxli/breast_ultrasound_lesion_segmentation_PyTorch", "max_stars_repo_head_hexsha": "d378a624a12b6156364f4f72c3fc60cc0c47f6f0", "max_stars_repo_licenses": ["MIT"]...
#ifndef BOOST_DETAIL_ATOMIC_GCC_PPC_HPP #define BOOST_DETAIL_ATOMIC_GCC_PPC_HPP // Copyright (c) 2009 Helge Bahmann // // 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/atomic/detail/base.hpp> ...
{"hexsha": "cb1dcb9fff380af6aaccae249d23c1bc4d1340a8", "size": 54715, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Dependencies/Theron/Include/External/boost/atomic/detail/gcc-ppc.hpp", "max_stars_repo_name": "sosan/NoahGameFrame", "max_stars_repo_head_hexsha": "38c54014c5c4620b784b2c1d2cab256f42bae186", "max_s...
import base64 import hashlib import json import numpy as np import hypney export, __all__ = hypney.exporter() @export def hashablize(obj): """Convert a container hierarchy into one that can be hashed. See http://stackoverflow.com/questions/985294 """ try: hash(obj) except TypeError: ...
{"hexsha": "3ca336a62f5cea5cf412f189daae83ca36a6102c", "size": 1715, "ext": "py", "lang": "Python", "max_stars_repo_path": "hypney/utils/hashing.py", "max_stars_repo_name": "JelleAalbers/hypney", "max_stars_repo_head_hexsha": "3e38e21743fc9babe0ed47af299d08242a9b6d32", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# ============================================================================= # @author: Shuo Zhou, The University of Sheffield # ============================================================================= import numpy as np from scipy.linalg import eig from numpy.linalg import multi_dot from sklearn.base import B...
{"hexsha": "cc0c8df8eb59e503f03d5525dfdb03144a32e031", "size": 4753, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydale/transformer/_mida.py", "max_stars_repo_name": "sz144/TPy", "max_stars_repo_head_hexsha": "689e38bdc2549015bc45cfacfe42e20a51c76e5a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4...
abstract type Adjoint_rep_Gaugefields_4D{NC,NumofBasis} <: Adjoint_rep_Gaugefields{NC,4,NumofBasis} end include("./Adjoint_rep_gaugefields_4D_wing.jl") function Base.size(U::Adjoint_rep_Gaugefields_4D{NC,NumofBasis}) where {NC,NumofBasis} return NumofBasis,NumofBasis,U.NX,U.NY,U.NZ,U.NT end
{"hexsha": "8c4bcd724b896641d20bb8b85060fa96ff098d95", "size": 300, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/4D/Adjoint_rep_gaugefields_4D.jl", "max_stars_repo_name": "akio-tomiya/Gaugefields.jl", "max_stars_repo_head_hexsha": "dd2180dfe54eba7826ddd45a13ab2f5a007857d1", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma dim_gen_eigenspace: assumes "jordan_nf A n_as" shows "dim_gen_eigenspace A ev k = (\<Sum> n \<leftarrow> map fst [(n, e)\<leftarrow>n_as . e = ev]. min k n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. local.dim_gen_eigenspace A ev k = sum_list (map (min k) (map fst (filter (\<lambda>(n, e...
{"llama_tokens": 828, "file": "Jordan_Normal_Form_Jordan_Normal_Form_Uniqueness", "length": 8}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 26 11:18:02 2022 This script reads daily temperature values from NOAA GHCN-Daily archive, and calculates heatwave magnitude index. FMI Sodankylä station data is read from FMI database. @author: rantanem """ import pandas as pd import numpy as np ...
{"hexsha": "bbf797a58ea6203b6f0ed0d96655e83a8ef918b8", "size": 5858, "ext": "py", "lang": "Python", "max_stars_repo_path": "validation/ghcn-daily_hwm.py", "max_stars_repo_name": "fmidev/resiclim-climateatlas", "max_stars_repo_head_hexsha": "b0c4c0ba6e3d189524cc89904636129733916f69", "max_stars_repo_licenses": ["MIT"], ...
# Advent of Code 2018, Day 20 # (c) blu3r4y from copy import copy import networkx as nx from parglare import Parser, Grammar from parglare.actions import pass_single, pass_inner GRAMMAR = r""" root: '^' expression '$'; expression: element+; element: direction | branch; branch: '(' option+ ')'; option: expression |...
{"hexsha": "3bda85115bdd1a86db858a4feb8b4683840d2d5f", "size": 3218, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/day20.py", "max_stars_repo_name": "blu3r4y/AdventOfCode2018", "max_stars_repo_head_hexsha": "5ef6ee251f9184e0f66657d0eb8b5b129a6f93e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
# -*- coding: utf-8 -*- from datetime import datetime import numpy as np from pandas._libs.tslibs import ccalendar def test_get_day_of_year(): assert ccalendar.get_day_of_year(2001, 3, 1) == 60 assert ccalendar.get_day_of_year(2004, 3, 1) == 61 assert ccalendar.get_day_of_year(1907, 12, 31) == 365 a...
{"hexsha": "b5d562a7b5a9c2bd5d55801dce8223341a6c2d7e", "size": 593, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tests/tslibs/test_ccalendar.py", "max_stars_repo_name": "vimalromeo/pandas", "max_stars_repo_head_hexsha": "7c14e4f14aff216be558bf5d4d2d00b4838c2360", "max_stars_repo_licenses": ["PSF-2.0", ...
using ConcreteStructs using DynamicIterators using DynamicIterators: dub using Base.Iterators: SizeUnknown, IsInfinite import DynamicIterators: dyniterate, evolve export Chain @concrete terse struct Chain{K,M} <: AbstractMeasure κ::K μ::M end function basemeasure(mc::Chain) Chain(basemeasure ∘ mc.κ, base...
{"hexsha": "aac0739750d4e7b712cdce2352b47f3ca3eb524e", "size": 4433, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/combinators/chain.jl", "max_stars_repo_name": "jw3126/MeasureTheory.jl", "max_stars_repo_head_hexsha": "419d2f2fc3cb27c9b1d969d2e05022f3a4a01f66", "max_stars_repo_licenses": ["MIT"], "max_stars...
import cv2 from asteroid import Asteroid import random import numpy as np from spaceship import Spaceship import config import utils from gym import Env class Simulation(Env): action_space = [0, 119, 97, 115, 100, 32] def __init__(self): self.reset() def reset(self): self.ship = Spaceshi...
{"hexsha": "f323f83010c6b09b0c2e44b9b442ab19cfb4c781", "size": 3085, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation.py", "max_stars_repo_name": "Elbrasch/AstroidsReinforcedLearning", "max_stars_repo_head_hexsha": "400d3a51d9ebc5ba48a7fba34c05c783aaff66ab", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np from ..util.backend_functions import backend as bd from .diffractive_element import DOE class RectangularSlit(DOE): def __init__(self, width, height, x0 = 0, y0 = 0): """ Creates a slit centered at the point (x0, y0) with width width and height height """ global...
{"hexsha": "ea4332171fab8e8bfd86e966092486217e810a3d", "size": 806, "ext": "py", "lang": "Python", "max_stars_repo_path": "diffractsim/diffractive_elements/rectangular_slit.py", "max_stars_repo_name": "rafael-fuente/diffractsim", "max_stars_repo_head_hexsha": "7287635d2bfa76f8b1eb24c6208796f761dd6144", "max_stars_repo_...
#include <iostream> #include "gtest/gtest.h" #include <Eigen/Core> #include "mean_curvature_solver.h" #include "uniform_lb_operator.h" #include "cotangent_lb_operator.h" class MeanCurvatureSolverTest : public ::testing::Test { protected: MeanCurvatureSolverTest() : mUnifromMCS(mcurv::uniformLBOperatorStrategy), ...
{"hexsha": "f2bb1a16f9f2c3b52f07ba58aa8a511e9870093c", "size": 1360, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "testing/unit_tests/test_mean_curvature_solver.cpp", "max_stars_repo_name": "dybiszb/MeanCurvatureLibrary", "max_stars_repo_head_hexsha": "b168911ef6bf08b283e7a225cc006b850fe26400", "max_stars_repo_l...
# encoding: UTF-8 # 首先写系统内置模块 import sys import os from datetime import datetime, timedelta, date from time import sleep import copy import logging # 第三方模块 import talib as ta import math import numpy import requests import execjs import pykalman # vntrader基础模块 from vnpy.trader.vtConstant import EM...
{"hexsha": "9644ba0e85872fd05c394e69bc66c662263ff8fe", "size": 80304, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Strategy/strategy30_NonStdArbitrageExecutor.py", "max_stars_repo_name": "frikyalong/vnpy", "max_stars_repo_head_hexsha": "d8ea554e34ff285c97cc2ddb4e881a1f0a6f02d3", "max_stars_repo_licen...
struct MultiDiscreteNonParametricSampler{T <: Real, S <: AbstractVector{T}, A <: AliasTable} <: Sampleable{Multivariate,Discrete} support::Vector{S} probabilities::S aliastable::A function MultiDiscreteNonParametricSampler{T,S}(support::Vector{S}, probs::AbstractVector{<:Real}) where {T <: Real, S<:Abs...
{"hexsha": "a95c4cd8c6f11f8ffbad2dda5058d68cae555fbb", "size": 9449, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/io/smps/sampler.jl", "max_stars_repo_name": "rtwalker/StochasticPrograms.jl", "max_stars_repo_head_hexsha": "2e59f0ad0504515855bbef411c67653b5723b3a2", "max_stars_repo_licenses": ["MIT"], "max_...
\documentclass[main.tex]{subfiles} \begin{document} \subsection{GW interferometry in the TT gauge} \marginpar{Friday\\ 2020-5-1, \\ compiled \\ \today} % We were discussing the basics of GW interferometry. The TT gauge is a coordinate system in which the mirrors are free-falling (in the \(xy\) plane at least, and f...
{"hexsha": "901023c7206d1500ecb99580fd900d49e9695078", "size": 14867, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ap_second_semester/gravitational_physics/may01.tex", "max_stars_repo_name": "jacopok/notes", "max_stars_repo_head_hexsha": "805ebe1be49bbd14c6b46b24055f9fc7d1cd2586", "max_stars_repo_licenses": ["A...
!------------------------------------------------------------------------------------------ ! File: HMC_Module_Phys_ET.f90 ! Author: Fabio Delogu ! ! Created on April 2, 2014, 5:19 PM !------------------------------------------------------------------------------------------ !------------------------------------...
{"hexsha": "4ade231bf03c7d52e4abbf3dc3bec4ff0435edab", "size": 16666, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "HMC_Module_Phys_ET.f90", "max_stars_repo_name": "c-hydro/hmc-dev", "max_stars_repo_head_hexsha": "49577101335633e543ecef35f5dbf1fd48792667", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
import cv2 import numpy as np # TODO: please add gray image support def save_grad_img(grads, out_path): """ Save gradients as img :param grads: gradients obtained from visulaziation model :param out_path: the path to save gradients image :return: """ grads = grads - grads.min() grads ...
{"hexsha": "b2ad6ed36dfcb95f3fe9db5de60acfe665009e03", "size": 1075, "ext": "py", "lang": "Python", "max_stars_repo_path": "vis/utils.py", "max_stars_repo_name": "sunalbert/lucid.pytorch", "max_stars_repo_head_hexsha": "1bcc87a41c99bef1d64d37116c8a2440d11b0def", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11...
! RUN: %python %S/test_errors.py %s %flang_fc1 ! Test that the interface of specific intrinsics passed as dummy arguments ! are correctly validated against actual arguments explicit interface. intrinsic :: abs, dabs interface subroutine foo(f) interface function f(x) real :: f ...
{"hexsha": "91ce2bfccc7f60143f7bb0442575be37af5a3d38", "size": 884, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Semantics/call20.f90", "max_stars_repo_name": "mkinsner/llvm", "max_stars_repo_head_hexsha": "589d48844edb12cd357b3024248b93d64b6760bf", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# Copyright 2020 KCL-BMEIS - King's College London # 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": "c23836cb9a481b39032f9d0d71bba5495db10f66", "size": 7901, "ext": "py", "lang": "Python", "max_stars_repo_path": "exetera/core/csvdataset.py", "max_stars_repo_name": "deng113jie/ExeTera", "max_stars_repo_head_hexsha": "613532a419b93a9838bf5ae5594fc7bb9738cd03", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
include("utils.jl") @testset "Stiefel" begin @testset "Real" begin M = Stiefel(3,2) @testset "Basics" begin x = [1.0 0.0; 0.0 1.0; 0.0 0.0] @test representation_size(M) == (3,2) @test manifold_dimension(M) == 3 @test_throws DomainError is_manifold_poi...
{"hexsha": "cc7c34bafda2a1416236d22dbaa606157f137e2c", "size": 5655, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/stiefel.jl", "max_stars_repo_name": "manuelweisser/Manifolds.jl", "max_stars_repo_head_hexsha": "07f889a290ece01569c6c53bb0c96a5608923a0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import nltk nltk.download('stopwords') import re import numpy as np import pandas as pd from pprint import pprint import gensim import gensim.corpora as corpora from gensim.utils import simple_preprocess from gensim.models import CoherenceModel # spacy for lemmatization import spacy # Plotting tools import pyLDAvis...
{"hexsha": "003fa0288a0586e999b0d3c7cd5701cc9d0af8d2", "size": 4687, "ext": "py", "lang": "Python", "max_stars_repo_path": "daily_gratitude/daily_grat/topicmodeling.py", "max_stars_repo_name": "abigail432/daily_gratitude", "max_stars_repo_head_hexsha": "4427b4f7d5c6b7349b718a17aeac62b603f80d66", "max_stars_repo_license...
# Modified from the SHAPE-MaP pipeline to call mutations # in miRNA cutting assay data. Functions were kepts and # main loop was wrapped in an if __name__ == "__main__" # statement # # Part of the SHAPE-MaP data analysis pipeline (ShapeMapper). # Counts up mutations from sequencing data. # Copyright Steven Busan 2014 ...
{"hexsha": "44b68aa9119fabfd3064d5d8ea4a1e0196daba95", "size": 6550, "ext": "py", "lang": "Python", "max_stars_repo_path": "variomics_pipeline/countMutations.py", "max_stars_repo_name": "grice/DroSeq", "max_stars_repo_head_hexsha": "4fd30f301420927eaae0c9a64cdd67155ff94321", "max_stars_repo_licenses": ["MIT"], "max_sta...
import rpy2.robjects as ro import rpy2.robjects.conversion as conversion import rpy2.rinterface as rinterface from rpy2.rinterface import SexpVector, INTSXP import numpy from rpy2.robjects.vectors import DataFrame, Vector, ListVector original_conversion = conversion.py2ri # The possible kind codes are listed at # ...
{"hexsha": "0efe11597cf83dface429190c1d553f98539cf1c", "size": 2630, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/MethylSig/rpy2/rpy/robjects/numpy2ri.py", "max_stars_repo_name": "psnehal/MethylSig", "max_stars_repo_head_hexsha": "5efad71e71ff2515feff2e49579c856ef9a1bbd8", "max_stars_repo_licenses": ["C...
import os import struct import moderngl.experimental as mgl import numpy as np from objloader import Obj from PIL import Image from pyrr import Matrix44 from example_window import Example, run_example def local(*path): return os.path.join(os.path.dirname(__file__), '..', *path) class MugExample(Example): ...
{"hexsha": "aa0e42dd0faae6698555ddadcc670d7bb0313359", "size": 5284, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/experimental/mug_mockup.py", "max_stars_repo_name": "dougbrion/ModernGL", "max_stars_repo_head_hexsha": "6de8938ccd0042c1389a32b697af5f9c9d279e41", "max_stars_repo_licenses": ["MIT"], "ma...
using ModelingToolkit, DifferentialEquations, Plots @variables t D = Differential(t) function dynamics(; name, τ=0.01, a_max=300.0, V₀=300.0, x_T=5E3, y_T=0.0) states = @variables x(t) y(t) γ(t) a(t) a_cmd(t) r(t) σ(t) λ(t) V(t) ps = @parameters τ = τ a_max = a_max x_T = x_T y_T = y_T eqs = [ D(x)...
{"hexsha": "c8e56eddf14a680f74cf600d6fba67db5f1a28a0", "size": 7327, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "main/LCG_e_0/main_mtk_LCG_e_0.jl", "max_stars_repo_name": "nhcho91/FlightGNC.jl", "max_stars_repo_head_hexsha": "d6a44a434c7ad124bc7271c070d86d64e639582a", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma sender_ip_valid: "paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\<lambda>((\<xi>, _), a, _). anycast (\<lambda>m. not_Pkt m \<longrightarrow> msg_sender m = i) a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^s...
{"llama_tokens": 233, "file": "AODV_variants_d_fwdrreqs_D_Seq_Invariants", "length": 1}
/** @file Copyright John Reid 2007, 2013 */ #include "bio-pch.h" #include "bio/defs.h" #include "bio/matrix_test_data.h" #include "bio/fragment_test_data.h" #include "bio/site_test_data.h" #include "bio/biobase_db.h" #include "bio/biobase_data_traits.h" #include "bio/biobase_tf.h" #include "bio/biobase_binding_mod...
{"hexsha": "ca166150c96b96f68a674b267de83323bd7f36f0", "size": 11048, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "C++/src/bio/lib/test_data.cpp", "max_stars_repo_name": "JohnReid/biopsy", "max_stars_repo_head_hexsha": "1eeb714ba5b53f2ecf776d865d32e2078cbc0338", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma securessel2: assumes "ssel (STMap TAddr (STValue (TUInt 256))) (STR ''balance'') [SENDER] ep env cd st = Normal ((loc, type), st')" and "fmlookup (storage st) (STR ''Victim'') = Some s" and "ReadL\<^sub>i\<^sub>n\<^sub>t (accessBalance (accounts st) (STR ''Victim'')) - SUMM s \<ge> bal \...
{"llama_tokens": 4944, "file": "Solidity_Reentrancy", "length": 17}
C %W% %G% C**************************************************************** C C File: p_gtbase.f C Purpose: IPF shell program to process /OLD_BASE commands C C Author: Walt Powell Date: 20 February 1992 C Modified: 20 February 1992 C Called by: C C***********************************...
{"hexsha": "26e5ed62d5405cb3cbd6947e36faa1d3f20d12d0", "size": 5211, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/p_gtbase.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14,...
import numpy as np from utils import load_data, load_polblogs_data dataset = "polblogs" if dataset == "polblogs": tmp_adj, features, labels, idx_train, idx_test = load_polblogs_data() print (sum(sum(tmp_adj))) print (tmp_adj.shape) else: _, features, labels, idx_train, idx_val, idx_test, tmp_adj = load...
{"hexsha": "46a6e4f0e5cbbd725fcf3671ea23c0d2a63f25b1", "size": 598, "ext": "py", "lang": "Python", "max_stars_repo_path": "GUA/utils_polblogs.py", "max_stars_repo_name": "Anou9531/GUA", "max_stars_repo_head_hexsha": "354acceb69656e76fb4ee296c66ae42c18cd939f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 20, "...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import pytest, remote_data from .utils import turn_off_internet # this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are disc...
{"hexsha": "9bca6d3f69ffece7acf42a68a4ce9bf4d880a7c0", "size": 1261, "ext": "py", "lang": "Python", "max_stars_repo_path": "astroquery/conftest.py", "max_stars_repo_name": "AlexaVillaume/astroquery", "max_stars_repo_head_hexsha": "85402770b9c0d4b98ce9ac451f41a6be1f838076", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
#!/bin/py # # inexact Newton-conjugate gradient method # # solve: # min f(x) = 1/2 x.t (I + mu * A) x + sigma/4 (x.t A x)^2 # import numpy as np def mycg(A,b,maxiter,tol,x): """ Conjugate Gradient Method. """ """ MYCG(A,B,maxiter,tol,x0) solves the system of linear equations A*X=B """ """ for X. Th...
{"hexsha": "126e954cfba8ddb8cdc96958d593304c618f7d4a", "size": 1347, "ext": "py", "lang": "Python", "max_stars_repo_path": "inv_prob/ps2/in-cg.py", "max_stars_repo_name": "nicholasmalaya/paleologos", "max_stars_repo_head_hexsha": "11959056caa80d3c910759b714a0f8e42f986f0f", "max_stars_repo_licenses": ["MIT"], "max_stars...
% To be compiled with pdf LaTeX % This file is to be included into master file via \input command % Note that there is no \begin{document} \end{document} brackets! \newpage \section{Control} \label{sec:control} %\subsection{Nomenclature} %\mbox{} %$\bm{s}$ - vector of wavefront sensor measurements conca...
{"hexsha": "389c71b8030994fd30db9d06e6838e9265d38942", "size": 64660, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "_docGMT/Control.tex", "max_stars_repo_name": "cmcorreia/oomao", "max_stars_repo_head_hexsha": "59787859283e89cdb8c2ee88388198f283be9abb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "...
# # Copyright (c) 2019-2021 James Thorne. # # This file is part of factual error correction. # See https://jamesthorne.co.uk for further info. # # 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 ...
{"hexsha": "8cc1addaafbae8e66a9e0d5be99f1c045f40ba04", "size": 15912, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/error_correction/modelling/error_correction_module.py", "max_stars_repo_name": "gruentee/acl2021-factual-error-correction", "max_stars_repo_head_hexsha": "b500f589cc3e73ffa6958c7dab8c07f2535a...
from __future__ import print_function from time import time, ctime from urllib2 import urlopen import os.path import json import numpy as np from backtest.data import DataSource from backtest.util import parse_date, parse_time def create_argument_parser(parser): default_end = int(time()) default_start = de...
{"hexsha": "b1836247fb2be37e6bebc2e9a4e0a1e80eeb6028", "size": 3389, "ext": "py", "lang": "Python", "max_stars_repo_path": "backtest/data/cli/get.py", "max_stars_repo_name": "dead-beef/backtest", "max_stars_repo_head_hexsha": "052c558aeeffbae7c2fde0a13bcecec3ca4d6bd0", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...