text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import warnings warnings.warn("Module is deprecated.", DeprecationWarning) ### Note, these are placeholder solutions # Since this module is meant to offer safety wrappers around some numpy # functions, if we can't import numpy, then gracefully handle the import error # and define stubs. try: from numpy import am...
{"hexsha": "80cd9184af86f6dfdd95b15390c1655462097c14", "size": 1514, "ext": "py", "lang": "Python", "max_stars_repo_path": "enthought/util/nan_ops_for_numpy.py", "max_stars_repo_name": "enthought/etsproxy", "max_stars_repo_head_hexsha": "4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347", "max_stars_repo_licenses": ["BSD-3-Clau...
import torch import os import numpy as np from config.config import Configuration FEATS_PATH_NPY = '/xxx/projects/tmp_extraction_features/log/feats.pth' IMG_PATH_NPY = '/xxx/projects/tmp_extraction_features/log/img_path.npy' def euclidean_distance(qf, gf): m = qf.shape[0] n = gf.shape[0] dist_mat = torch....
{"hexsha": "f92c023200d113634a32f02264067e0f6f98cf97", "size": 1210, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-purifying-GCN/graph-clustering/convert_npy_for_gcn.py", "max_stars_repo_name": "lulujianjie/efficient-person-generation-for-reid", "max_stars_repo_head_hexsha": "1bb29c7c280e3322a65af36b37dee...
import os import random import socket from collections import deque from typing import Any, Dict, List, Literal, cast import cv2 import gym import numpy as np from gym import spaces from gym.utils import seeding from py4j.java_gateway import GatewayParameters, JavaGateway from carl.envs.mario.level_image_gen import Le...
{"hexsha": "d38a792ead94b5a01924542ca744f9a002f5b7b0", "size": 6816, "ext": "py", "lang": "Python", "max_stars_repo_path": "carl/envs/mario/mario_env.py", "max_stars_repo_name": "automl/genRL", "max_stars_repo_head_hexsha": "b7382fec9006d7da768ad7252194c6c5f1b2bbd7", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
[STATEMENT] lemma "\<lparr>xc = x, yc = y, zc = z\<rparr> = p\<lparr>zc := z\<rparr>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lparr>xc = x, yc = y, zc = z\<rparr> = p\<lparr>zc := z\<rparr> [PROOF STEP] nitpick [expect = genuine] [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lparr>xc = x, yc = y, zc =...
{"llama_tokens": 199, "file": null, "length": 2}
from data import load_corpus, convert_id_to_text from bert_phrase_sim import BERT_sim from model1e_phrase_sim import BERT1E_sim from model1f_phrase_sim import BERT1F_sim from wordvec_based_phrase_sim import wordvec_sim import numpy as np import codecs, argparse parser = argparse.ArgumentParser() parser.add_argument("-...
{"hexsha": "57d03989a30ba7235ceb870b3cf61c59f7648eb2", "size": 10335, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/baseline_wo_ted.py", "max_stars_repo_name": "yukiar/phrase_alignment_cted", "max_stars_repo_head_hexsha": "7706ca1b8be849f2413d813ea1f3c77919b635ee", "max_stars_repo_licenses": ["MIT"], "max_...
#https://stackoverflow.com/questions/49429368/how-to-solve-memory-issues-problems-while-multiprocessing-using-pool-map #https://pypi.org/project/memory-profiler/ import cProfile import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import random import seaborn as sns import sta...
{"hexsha": "3b9c318f9408dde84f29042ac8697428c83d6724", "size": 1763, "ext": "py", "lang": "Python", "max_stars_repo_path": "contact-tracing/code/Python/test.py", "max_stars_repo_name": "sbenthall/privacy-abm", "max_stars_repo_head_hexsha": "eb40ff0aedf0d212bdc43c2e019a29599869f7d4", "max_stars_repo_licenses": ["MIT"], ...
import re import numpy as np def parse_gaussian(filename): find_natoms = "NAtoms= " find_energy = "SCF Done: E(" find_force = "Atomic Forces " natoms = 0 f = open(filename, 'r') for line in f: if find_natoms in line: numbers = re.findall(r'\d+', lin...
{"hexsha": "6dc83ce65e82f131e1b5508a16baaa6ef4a44df9", "size": 1326, "ext": "py", "lang": "Python", "max_stars_repo_path": "qml_md/read_forces.py", "max_stars_repo_name": "charnley/qml-md", "max_stars_repo_head_hexsha": "54fa7f4c1960e624585904c6517ab4cb21a0c916", "max_stars_repo_licenses": ["Intel"], "max_stars_count":...
# Copyright (c) 2021, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root # or https://opensource.org/licenses/BSD-3-Clause import unittest import numpy as np from warp_drive.managers.data_manager import CUDADataManager fr...
{"hexsha": "290306801f53b7bcc03c95691e22e4b3bb80e649", "size": 3247, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/warp_drive/test_data_manager.py", "max_stars_repo_name": "MetaMind/warp-drive", "max_stars_repo_head_hexsha": "ecc17aae6c75a00c46b0e9f3297963f1beb697c0", "max_stars_repo_licenses": ["BSD-3-C...
# import the necessary packages from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.models import load_model import numpy as np import argparse import cv2 import os class detector: def __init__(self,save_path): ...
{"hexsha": "655741a08c070e027933c3ca6c9d15d706b27b8c", "size": 3569, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/test_face_detectors.py", "max_stars_repo_name": "visiont3lab/mask-detector-covid", "max_stars_repo_head_hexsha": "48d28fffa1278ae48657938262b17b8bd07e6986", "max_stars_repo_licenses": ["MIT"...
import tensorflow as tf import numpy as np import librosa import librosa.filters if __name__ == "__main__": try: tf.enable_eager_execution() except ValueError as e: if e.args[0] != 'tf.enable_eager_execution must be called at program startup.': raise e # persistent variables _mel...
{"hexsha": "b4d5c0290340bc38ddb2ed54f0c236f6fb8a2e46", "size": 3987, "ext": "py", "lang": "Python", "max_stars_repo_path": "melspec.py", "max_stars_repo_name": "ljuvela/GELP", "max_stars_repo_head_hexsha": "6d1084aa7471530224c8f0498efcce696069ec87", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 27, "max...
#! /bin/env python import os import argparse import numpy as np import pandas as pd import atat_module import matplotlib as mpl pd.set_option('display.max_rows', None) parser = argparse.ArgumentParser( description="Print the output of a file generated by a program in ATAT.") parser.add_argument('-c', nargs='*', m...
{"hexsha": "1d2effe2a5511d803cecbc70ba007660a3ba1321", "size": 4071, "ext": "py", "lang": "Python", "max_stars_repo_path": "print-as-df.py", "max_stars_repo_name": "terencezl/atat-tools", "max_stars_repo_head_hexsha": "f61d772a58f0c768fcbb33474eb3bcbd4f68d926", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
\documentclass[apjl]{emulateapj} %\documentclass[letterpaper,12pt,preprint]{aastex} % packages \usepackage{amssymb,amsmath,amsbsy} \usepackage{booktabs} \usepackage{multirow} \usepackage{url} % commands \newcommand{\given}{\,|\,} \newcommand{\dd}{\mathrm{d}} \newcommand{\transpose}[1]{{#1}^{\mathsf{T}}} \newcommand{\...
{"hexsha": "7a16821f98c668dcbc30168aaeeca02d8a7886e6", "size": 41842, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documents/letter/ms.tex", "max_stars_repo_name": "adrn/tilt-shift", "max_stars_repo_head_hexsha": "23d1a024bcec4061de09df834ad7cbe97b9f37ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
% AUTORIGHTS % Copyright (C) 2007 Princeton University % % This file is part of Ferret Toolkit. % % Ferret Toolkit 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 2, or (at your option) ...
{"hexsha": "7a37ce5519f78b228661e00b638d2423a02fcd43", "size": 3111, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "pkgs/netapps/netferret/src/server/doc/spec/index.tex", "max_stars_repo_name": "manggoguy/parsec-modified", "max_stars_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_stars_repo_l...
"""Iterative deconvolution solvers""" import warnings import numpy as np from scipy import optimize, signal from scipy.sparse.linalg import LinearOperator from .utils import (convolution_matrix, convolution_output_size, least_squares_cost, asanyoperator) def least_squares(A, y, gamma_L2=0, gam...
{"hexsha": "9c97bd0e2ca9963f0e71090047d1e199c2cbe665", "size": 4485, "ext": "py", "lang": "Python", "max_stars_repo_path": "regper/iterative.py", "max_stars_repo_name": "jakevdp/regper", "max_stars_repo_head_hexsha": "bd2361a7bdf27a61c6b06ea509b3f25f5786d814", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
import numpy as np import pandas as pd """this actually includes dissimilarity analysis functions, not just distances """ def dissimilarity_nominal(dataset=None, p=None, m=None, weights=None): """computes the dissimilarity b/t two objects (for nominal attributes). Can input either a column dataset or directl...
{"hexsha": "db55a20389559b300afd539ac02acf73de09238d", "size": 17321, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/distances.py", "max_stars_repo_name": "summeryriddles/geopolymeric-tribbles", "max_stars_repo_head_hexsha": "70407e4b754cd6cbafe603755ae1b4d3679115e0", "max_stars_repo_licenses": ["MIT"],...
let counter = 0 global clearcounter() = counter = 0 global counter!() = (counter += 1; (counter > 100) && throw("Excessive Recursion Error")) end
{"hexsha": "284b6c4c6a89a4a6e822b1d93e9768e224c1436b", "size": 158, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/main/counter.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/AbstractLogic.jl-bd85187e-0531-4a3e-9fea-713204a818a2", "max_stars_repo_head_hexsha": "1b8adac10854471ec7ce83b9039cdeb1e4...
# * Ponderomotive potential @doc raw""" ponderomotive_potential(f) Return the [ponderomotive potential](https://en.wikipedia.org/wiki/Ponderomotive_energy) ``U_p``, which is the cycle-average quiver energy of a free electron in an electromagnetic field `f`. It is given by ```math U_p = \frac{e^2E_0^2}{4m\omega^2}...
{"hexsha": "8b00fe83ef44e28980dd1573153bf56efdd2cc79", "size": 2424, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/strong_field_properties.jl", "max_stars_repo_name": "jagot/ElectricFields.jl", "max_stars_repo_head_hexsha": "626fcd1beebf472487f11cd588661e2d5303de7d", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma update_eqD: "update k v al = update k v' al' \<Longrightarrow> v = v'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. update k v al = update k v' al' \<Longrightarrow> v = v' [PROOF STEP] proof (induct al arbitrary: al') [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>al'. update k v [] = ...
{"llama_tokens": 998, "file": null, "length": 11}
import numpy as np # quaternion representation: [x, y, z, w] # JPL convention def skew(vec): """ Create a skew-symmetric matrix from a 3-element vector. """ x, y, z = vec return np.array([ [0, -z, y], [z, 0, -x], [-y, x, 0]]) def to_rotation(q): """ ...
{"hexsha": "0013e0baf4e307abb23344d8a3e1f39151f3bd20", "size": 5227, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "shanmo/OrcVIO-Stereo-Python", "max_stars_repo_head_hexsha": "849ddaeb4623e89ef84d0bf954cd76bb0cd30351", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,...
# from Par_file const ANGULAR_WIDTH_XI_IN_DEGREES_VAL = 60.0 const ANGULAR_WIDTH_ETA_IN_DEGREES_VAL = 60.0 const NEX_XI_VAL = 336 const NEX_ETA_VAL = 336 const REGIONAL_MOHO_MESH = true # some constant values const R_UNIT_SPHERE = one(Float64) const NGLLX = 5 const NGLLY = 5 const NGLLZ = 5 const MIDX = 3 const MIDY ...
{"hexsha": "e8506af9f258ec9c7aac6829a691ff34a70dee2d", "size": 568, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "FWI_tools/specfem_helper.jl/src/setting/constants.jl", "max_stars_repo_name": "ziyixi/SeisScripts", "max_stars_repo_head_hexsha": "a484bc1747eae52b2441f0bfd47ac7e093150f1d", "max_stars_repo_licenses...
# Copyright (c) 2020,21 NVIDIA CORPORATION & AFFILIATES.. 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 re...
{"hexsha": "3ead941ef015c68bb6786daecaafb421a9840f3c", "size": 4273, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils_functions.py", "max_stars_repo_name": "nv-tlabs/DIB-R-Single-Image-3D-Reconstruction", "max_stars_repo_head_hexsha": "faa6364cc6ec464f81f960a9fa6b55bbf3443d5f", "max_stars_repo_license...
/* Test tree Ref : https://www.boost.org/doc/libs/1_75_0/libs/test/doc/html/boost_test/tests_organization/test_tree.html Boost.test,其 Unit Test Framework,會經由 Test tree 結構,逐步執行開發者設計的測試內容,其順序依序如下 MAIN / MODULE └ SUITE └ CASE */ // 定義測試模組名稱 // 在此可選用 BOOST_TEST_MAIN、BOOST_TEST_MODULE #define BOOST_TEST_MODULE Exam...
{"hexsha": "035099dc2a9d1fa18ba4b7f2f8509e02fc34ccc9", "size": 691, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/base/main.cpp", "max_stars_repo_name": "eastmoon/tutorial-c-boost", "max_stars_repo_head_hexsha": "06530df17ea1fafce54c820a50f9d092fbd3ec90", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta...
# -*- coding: utf-8 -*- __all__ = ["disk_model"] import numpy as np import scipy.constants as sc from astropy.convolution import convolve_fft from astropy.convolution import Gaussian2DKernel def disk_model(inc=30., mstar=1.0, dist=100., Npix=128, r_max=150., vchan=200., Nchan=64, noise=2.0, Tkin0=40....
{"hexsha": "a8be76b67ec2c1d9c448d87294437058294bfc3e", "size": 3457, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/diskmodel.py", "max_stars_repo_name": "mirca/bettermoments", "max_stars_repo_head_hexsha": "50000f3db738ba11d30504ad00e3a4452ae23f64", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma ffb_prop: "fb\<^sub>\<F> f = \<partial> \<circ> bd\<^sub>\<F> (op\<^sub>K f) \<circ> \<partial>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fb\<^sub>\<F> f = \<partial> \<circ> bd\<^sub>\<F> (op\<^sub>K f) \<circ> \<partial> [PROOF STEP] by (simp add: ffb_def map_dual_def)
{"llama_tokens": 132, "file": "Transformer_Semantics_Kleisli_Transformers", "length": 1}
[STATEMENT] lemma (in \<Z>) dghm_dag_Rel_is_iso_dghm: "\<dagger>\<^sub>D\<^sub>G\<^sub>.\<^sub>R\<^sub>e\<^sub>l \<alpha> : op_dg (dg_Rel \<alpha>) \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> dg_Rel \<alpha>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<dagger>\<...
{"llama_tokens": 7464, "file": "CZH_Foundations_czh_digraphs_CZH_DG_Rel", "length": 28}
import unittest import numpy as np from ensemble_boxes import * class TestWBF(unittest.TestCase): def test_box_and_model_avg(self): boxes_list = [ [ [0.10, 0.10, 0.50, 0.50], # cluster 2 [0.11, 0.11, 0.51, 0.51], # cluster 2 [0.60, 0.60, 0.80, 0....
{"hexsha": "e8b88f4c6826437bfe631eb35faefab982061d95", "size": 10535, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_bbox.py", "max_stars_repo_name": "Sergey-Zlobin/Weighted-Boxes-Fusion", "max_stars_repo_head_hexsha": "773ed6f9513ade442c0f89885f3a36d95cf0629d", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma word_less_nowrapI: "x < z - k \<Longrightarrow> k \<le> z \<Longrightarrow> 0 < k \<Longrightarrow> x < x + k" for x z k :: "'a::len word" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x < z - k; k \<le> z; 0 < k\<rbrakk> \<Longrightarrow> x < x + k [PROOF STEP] by uint_arith
{"llama_tokens": 128, "file": null, "length": 1}
# MINLP written by GAMS Convert at 04/21/18 13:51:17 # # Equation counts # Total E G L N X C B # 4241 1603 946 1692 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
{"hexsha": "76811ddbffadd4c5e4dfe16ed523124e4b7d0e24", "size": 517559, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/crudeoil_lee2_08.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["...
import unittest import numpy as np import torch from torch.autograd import Variable, grad, gradcheck from qmctorch.wavefunction.jastrows.elec_elec_nuclei.jastrow_factor_electron_electron_nuclei import JastrowFactorElectronElectronNuclei from qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.boys_handy_jastrow_ke...
{"hexsha": "b2d31fef1c497064ac8254e5ff8ad35b26f38b7c", "size": 4359, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/wavefunction/jastrows/elec_elec_nuc/test_three_body_jastrow_boys_handy.py", "max_stars_repo_name": "NLESC-JCER/QMCTorch", "max_stars_repo_head_hexsha": "c56472cd3e9cc59f2e01a880e674b7270d2cd...
function z = quad_pos_over_lin( x, y, dim ) %QUAD_POS_OVER_LIN Sum of squares of positives over linear. % Z=QUAD_POS_OVER_LIN(X,Y), where X is a vector and Y is a scalar, is equal to % SUM(MAX(X,0).^2)./Y if Y is positive, and +Inf otherwise. Both X and Y must % be real. % % For matrices, QUAD_POS_OVER_LIN(X,Y...
{"author": "goodshawn12", "repo": "REST", "sha": "e34ce521fcb36e7813357a9720072dd111edf797", "save_path": "github-repos/MATLAB/goodshawn12-REST", "path": "github-repos/MATLAB/goodshawn12-REST/REST-e34ce521fcb36e7813357a9720072dd111edf797/dependencies/BCILAB/dependencies/cvx-1.21.b795/functions/quad_pos_over_lin.m"}
!############################################################################## ! ________ _____ ______________ ! / ____/ |/ / / / /_ __/ _/ / ! / /_ / /|_/ / / / / / / / // / ! / __/ / / / / /_/ / / / _/ // /___ ! /_/ /_/ /_/\____/ /_/ /___/_____/ ! ! Copy...
{"hexsha": "91f3c065bec1092b9483e1772fb367808dfa557b", "size": 12246, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/datastructs/list.f90", "max_stars_repo_name": "princemahajan/FMUTIL", "max_stars_repo_head_hexsha": "30f19755291276287a2ab0cbf25b466f8a4be8d7", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# MIT License # # Copyright (c) 2017 Tom Runia # # 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 Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
{"hexsha": "343f56a583e8caa058ebadc3c837a30874dad286", "size": 6647, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_extraction/example_classification.py", "max_stars_repo_name": "ec500-software-engineering/project-07-aurora-borealis-classification", "max_stars_repo_head_hexsha": "9ad1627741a6b3af4a9ba11...
[STATEMENT] lemma exec_mbindFStop_E: assumes seq : "(\<sigma> \<Turnstile> (s \<leftarrow> mbind\<^sub>F\<^sub>a\<^sub>i\<^sub>l\<^sub>S\<^sub>t\<^sub>o\<^sub>p (a#S) ioprog ; (P s)))" and some: "\<And>b \<sigma>'. ioprog a \<sigma> = Some(b,\<sigma>') \<Longrightarrow> (\<sigma>'\<Turnstile> (s \<leftarrow> mbind\...
{"llama_tokens": 2298, "file": "Clean_src_Symbex_MonadSE", "length": 18}
function CatStr(s1::Array,sep::AbstractString,s2::Array) #Assume s1 and s2 are arrays of String #Also sep is a string s12 = s1 .* [sep] .* s2 return s12 end
{"hexsha": "4228368daf58f9fe05e583e824356436be7b0530", "size": 176, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CatStr.jl", "max_stars_repo_name": "achen12/julia-d4m", "max_stars_repo_head_hexsha": "29b90b63ca620b726ced121d76c2d4912354dc4d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 7,...
module Prinz using ModelingToolkit using ..NeuronBuilder import ..get_parameters, ..get_states, ..default_params, ..default_states include("channels.jl") include("calc_dynamics.jl") export get_parameters, get_states, default_params, default_states end
{"hexsha": "adf87f9d20be01e6ca16daa9ee735efa4e6c193e", "size": 258, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/assets/Prinz/Prinz.jl", "max_stars_repo_name": "Dhruva2/NeuronBuilder.jl", "max_stars_repo_head_hexsha": "06ab50874d84c33ae25e120ca4b29d2b1ac293a9", "max_stars_repo_licenses": ["MIT"], "max_star...
//------------------------------------------------------------------------------ /// \file BinaryTrees_tests.cpp /// \date 20201023 03:44 //------------------------------------------------------------------------------ #include "DataStructures/BinaryTrees.h" #include <boost/test/unit_test.hpp> #include <string> #inclu...
{"hexsha": "fdef3fd2d83d39ae79ff4f1f73d122e21275c9c9", "size": 13990, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Voltron/Source/UnitTests/DataStructures/BinaryTrees_tests.cpp", "max_stars_repo_name": "ernestyalumni/HrdwCCppCUDA", "max_stars_repo_head_hexsha": "17ed937dea06431a4d5ca103f993ea69a6918734", "max_s...
import numpy as np import math import pandas as pd import sys import minimize as mini delta = 10e-4 if len(sys.argv) > 1: method = sys.argv[1] else: method = "newton" print('method:',method) # f(x, y) = 100(y-x²)² + (1-x)² def f(entry): x, y = entry[0], entry[1] return 100*(y-x**2)**2 + (1-x)**2 def...
{"hexsha": "cfeb1bc3716792c418317a5db577ff66e4d47927", "size": 824, "ext": "py", "lang": "Python", "max_stars_repo_path": "proj.py", "max_stars_repo_name": "gabriel-valle/minimizer", "max_stars_repo_head_hexsha": "eb3e42ca5fa4667c712ad2228a6c8af3bdb73185", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import os.path as osp import tempfile import mmcv from .builder import DATASETS from .custom import CustomDataset import numpy as np from PIL import Image @DATASETS.register_module() class PascalVOCDataset(CustomDataset): """Pascal VOC dataset. Args: split (str): Split txt file for Pascal VOC. ""...
{"hexsha": "2b670ebef044f6006075d9f38f82e6ada40e5c25", "size": 5015, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmseg/datasets/voc.py", "max_stars_repo_name": "aim-uofa/NRD_decoder", "max_stars_repo_head_hexsha": "275f0a1e74bb24cd8555fa8bcccb488d5bf1ed8c", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
[STATEMENT] lemma strongBisimWeakPsiCong: fixes \<Psi> :: 'b and P :: "('a, 'b, 'c) psi" and Q :: "('a, 'b, 'c) psi" assumes "\<Psi> \<rhd> P \<sim> Q" shows "\<Psi> \<rhd> P \<doteq> Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Psi> \<rhd> P \<doteq> Q [PROOF STEP] using assms [PROOF STATE] p...
{"llama_tokens": 2037, "file": "Psi_Calculi_Weak_Psi_Congruence", "length": 19}
''' Author: Shangjie Lyu GitHub: https://github.com/josephlyu The figures for the UK page, using data from Public Health Englend's COVID-19 UK API and Oxford University's GitHub repository. Link1: https://coronavirus.data.gov.uk/developers-guide Link2: https://github.com/OxCGRT/covid-policy-tracker ''' i...
{"hexsha": "3823ff308d4818e381654aed783a93fa728cc392", "size": 23831, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/figures_uk.py", "max_stars_repo_name": "josephlyu/Covid19-UK-Dashboard", "max_stars_repo_head_hexsha": "e6b0ac4c01d4a6426172589a4b8fe927aeed6901", "max_stars_repo_licenses": ["Apache-2.0"...
import numpy as np import keras import tensorflow as tf import keras.backend as K from keras.activations import tanh, softmax from keras.layers import LSTM, Dense, Layer, Lambda class PointerAttention(Layer): ''' https://www.tensorflow.org/text/tutorials/nmt_with_attention ''' def __init__(self, units...
{"hexsha": "4801103bc406477478cb444cf1e4d78737a626b9", "size": 3689, "ext": "py", "lang": "Python", "max_stars_repo_path": "pointer_lstm.py", "max_stars_repo_name": "hakeemta/pointer-networks", "max_stars_repo_head_hexsha": "8c0e80fd63d25c560a9b5f8eb0d4a0354fc32e6a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <boost/foreach.hpp> #include <iostream> #include <libnotify.h> #ifdef __clang__ # define COMPILER "clang++" #else # define COMPILER "g++" #endif using namespace std; struct coordinate_t { double x; double y; double...
{"hexsha": "4883ef5fb8101bb66e28f7ad82b34c3e2497c7e1", "size": 1812, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "json/test_boost_ptree.cpp", "max_stars_repo_name": "mkitto/benchmarks", "max_stars_repo_head_hexsha": "070e222ef648c23e645a8c3fafcb25fe2288d817", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
function RBMs.sample_h_from_v(rbm::CenteredRBM, v::AbstractArray; β::Real = true) inputs = RBMs.inputs_v_to_h(rbm, v) return RBMs.transfer_sample(hidden(rbm), inputs; β) end function RBMs.sample_v_from_h(rbm::CenteredRBM, h::AbstractArray; β::Real = true) inputs = RBMs.inputs_h_to_v(rbm, h) return RBMs...
{"hexsha": "7591dc54db1ddd3257a66c158eb00447499fd5f7", "size": 1293, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sampling.jl", "max_stars_repo_name": "cossio/CenteredRBMs.jl", "max_stars_repo_head_hexsha": "20076d5c4c5c1a95fbdf098e9616caa400b8d2f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
[STATEMENT] lemma omega_subid: "\<Omega> x (d y) \<le> d y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Omega> x (d y) \<le> d y [PROOF STEP] by (simp add: Omega_def local.a_subid_aux2)
{"llama_tokens": 91, "file": "KAD_Modal_Kleene_Algebra_Applications", "length": 1}
#ifndef TRIPS_HPP #define TRIPS_HPP #include <vector> #include <boost/unordered_set.hpp> //struct Trip { // // last attribute is the index // // So should be size + 1 // uint64_t * attributes; //}; //struct TripKey { // uint64_t * attributes; //}; typedef uint64_t Trip; typedef uint64_t TripKey; typedef std::vect...
{"hexsha": "508b1239dc328279868e7eed4ce058e4a6f09999", "size": 409, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/mongo/db/kdtree/Trip.hpp", "max_stars_repo_name": "harishd10/mongodb", "max_stars_repo_head_hexsha": "69dd944e2e7cac2a3f56c99f2a20d45651b8db24", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np from scipy.stats import kurtosis, skew class descriptor_stats(object): ''' A class containing standardized statistics to compute over each representation These statistics include: mean, standard deviation, kurtosis, and skewness Population covariance is also considered ...
{"hexsha": "03a1c41524b7d401567623489a4be3002f7906b3", "size": 7027, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyxtal_ml/descriptors/stats.py", "max_stars_repo_name": "qzhu2017/ML-DOS", "max_stars_repo_head_hexsha": "c58ebdfc77746175771af0862ed5737c4eaa3eec", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# inference with mxnet import mxnet as mx from tensorflow.keras.preprocessing import image import numpy as np from collections import namedtuple Batch = namedtuple('Batch', ['data']) ctx = mx.gpu() # load model sym, arg_params, aux_params = mx.model.load_checkpoint('models/retinaface-R50', 0) mod = mx.mod.Module(sy...
{"hexsha": "b5ae768d822ab300d8222f73c3c96d67d8f3c47e", "size": 988, "ext": "py", "lang": "Python", "max_stars_repo_path": "mxnet_inference.py", "max_stars_repo_name": "pmathewjacob/insightface-attendance", "max_stars_repo_head_hexsha": "447b669e3d176bb1c78a6108334d6470a8fb25a8", "max_stars_repo_licenses": ["MIT"], "max...
"""Deep Dreaming using Caffe and Google's Inception convolutional neural network.""" # pylint: disable=invalid-name, wrong-import-position from collections import namedtuple, OrderedDict import logging import multiprocessing as mp import os from pathlib import Path import queue import re import sys os.environ['GLOG_...
{"hexsha": "db6bc89eee48e160d7d46e5de3dc53e687ea8443", "size": 18584, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_dream/deep_dream.py", "max_stars_repo_name": "THinnerichs/deep_dream", "max_stars_repo_head_hexsha": "ae4dafb4128cbda4b4a8bbdcb4aa69c2d2cdf7f0", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: utf-8 -*- """ Created on Mon Mar 05 13:41:23 2018 @author: DanielM """ from neuron import h import numpy as np import net_globalrev from burst_generator_inhomogeneous_poisson import inhom_poiss import os import argparse import scipy.stats as stats # Parse command line inputs # Command line signature: #...
{"hexsha": "e63634bada9a69952abe5c892a56362210213224", "size": 2352, "ext": "py", "lang": "Python", "max_stars_repo_path": "rd/nw_testing.py", "max_stars_repo_name": "danielmk/pyDentateeLife2020", "max_stars_repo_head_hexsha": "b4a9f2beaa0c74dbc9583e2cf228856612596f8a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- """ Hosmer-Lemeshow test @author: Alex (stackoverflow) """ import pandas as pd import numpy as np from scipy.stats import chi2 def hosmer_lemeshow_test(pihat,real_label): # pihat=model.predict() pihatcat=pd.cut(pihat, np.percentile(pihat,[0,25,50,75,100]),labels=False,include_lowest=T...
{"hexsha": "7270b5a0c11d85091d6ef7a76f0cd6710fb00897", "size": 1713, "ext": "py", "lang": "Python", "max_stars_repo_path": "eslearn/statistical_analysis/el_hosmer_lemeshow_test.py", "max_stars_repo_name": "lichao312214129/easylearn", "max_stars_repo_head_hexsha": "e77b51b26e0c75b3a4d59dd5a71cf1b63ac4347d", "max_stars_r...
from classes.trainers.Trainer import Trainer from classes.cv.FeatureSelector import FeatureSelector from classes.factories.ClassifiersFactory import ClassifiersFactory from classes.handlers.ParamsHandler import ParamsHandler from classes.factories.DataSplitterFactory import DataSplitterFactory import numpy as np impor...
{"hexsha": "a51b81c354e7fb78730c380680aaac0f3d102923", "size": 9092, "ext": "py", "lang": "Python", "max_stars_repo_path": "classes/trainers/TaskFusionTrainer.py", "max_stars_repo_name": "canary-for-cognition/multimodal-ml-framework", "max_stars_repo_head_hexsha": "379963e2815165b28a28c983d32dd17656fba9a9", "max_stars_...
#!/usr/bin/env python3 from matplotlib import pyplot as plt from matplotlib.patches import Rectangle import numpy as np from mpl_tools.helpers import add_to_labeled_items, add_colorbar, savefig from matplotlib.colors import LinearSegmentedColormap import pickle import itertools as it dchi2 = r'$\Delta \chi^2$' colors...
{"hexsha": "31afb5d4d3485165777a032f401f19d70bc3a733", "size": 14368, "ext": "py", "lang": "Python", "max_stars_repo_path": "packages/junosens-v2/macro/plot-scanedges-v1.py", "max_stars_repo_name": "gnafit/gna", "max_stars_repo_head_hexsha": "c1a58dac11783342c97a2da1b19c97b85bce0394", "max_stars_repo_licenses": ["MIT"]...
module GraphKernels using Graphs using SimpleValueGraphs using SimpleValueGraphs: AbstractValGraph using LinearAlgebra: dot, diag using Statistics: mean, std using LIBSVM using Random: MersenneTwister, randperm using ThreadsX import LIBSVM: svmtrain, svmpredict using KernelFunctions: kernelmatrix, kernelmatrix_diag ...
{"hexsha": "e415f6fc2194b0e57adc72a5335b6241bfc79d6b", "size": 2588, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GraphKernels.jl", "max_stars_repo_name": "simonschoelly/GraphKernels.jl", "max_stars_repo_head_hexsha": "f04797de0b86a39172b6adbcfcee35ec4b39f91b", "max_stars_repo_licenses": ["MIT"], "max_star...
MODULE m_brzone use m_juDFT ! ! This subroutine finds the corner-points, the edges, and the ! faces of the irreducible wedge of the brillouin zone (IBZ). ! CONTAINS SUBROUTINE brzone( > rcmt,nsym,idrot,mface,nbsz,nv48, = cpoint, < ...
{"hexsha": "73dec495b2e1e9fb00d26c029f5f376c17b5f287", "size": 18291, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "kpoints/brzone.f", "max_stars_repo_name": "MRedies/FLEUR", "max_stars_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLCla...
{"hexsha": "d39b1292efffab60d87febd858743d52b35a7921", "size": 9707, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/tl_detector.py", "max_stars_repo_name": "roshea6/CarND-Capstone", "max_stars_repo_head_hexsha": "aec95e200dccad5488df269353b04fc067557890", "max_stars_repo_licenses": ["MIT"], ...
(* Title: Inductive definition of termination Author: Tobias Nipkow, 2001/2006 Maintainer: Tobias Nipkow *) theory PsTermi imports PsLang begin subsection\<open>Termination\<close> inductive termi :: "com \<Rightarrow> state \<Rightarrow> bool" (infixl "\<down>" 50) where Do[iff]: "f s \<not...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Abstract-Hoare-Logics/Procs/PsTermi.thy"}
### ============== ### ============== ### ## Behavioural Rules Model ## ## Martin Zumaya Hernandez ## ## EXAMPLE SIMULATION SCRIPT ## ### ============== ### ============== ### ### ============ INCLUDE PACKAGES ============ ### @everywhere using CollectiveDynamics.BehaviouralRules ##...
{"hexsha": "a6d92368e874818b38d3061801777ea7bc8c971f", "size": 3868, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/behavioural_rules_simulation.jl", "max_stars_repo_name": "carterian8/CollectiveDynamics.jl", "max_stars_repo_head_hexsha": "add9604e8132646da5a1f66a41239c8fa86c363a", "max_stars_repo_licen...
/** * @file descartes_tesseract_kinematics.h * @brief Implememntatino of a wrapper around tesseract kinematics for the descartes_light kinematics interface * * @author Matthew Powelson * @author Levi Armstrong * @date September 17, 2019 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2019, S...
{"hexsha": "1319790e02a0d2c88e593941b7b08020b12f0887", "size": 7802, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "tesseract/tesseract_planning/tesseract_motion_planners/include/tesseract_motion_planners/descartes/impl/descartes_tesseract_kinematics.hpp", "max_stars_repo_name": "steviedale/tesseract", "max_stars...
import sys import pytest import torch import torch.nn as nn import numpy as np from fmoe.gates import NaiveGate from fmoe.layers import FMoE from fmoe.linear import FMoELinear from fmoe.megatron.layers import _megatron_init_method def _assert_numerical(names, moe_out_list, raw_out_list, rank, precision=1e-3): f...
{"hexsha": "e040d5f9d0ad7469cf012a33f807596d3a329ecd", "size": 4999, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mimo.py", "max_stars_repo_name": "dumpmemory/fastmoe", "max_stars_repo_head_hexsha": "5083a7367f2defcf5e1022dcdce39022acf5ca11", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman 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": "797af98ffa6f52d8ffebe491800d36631d8ad4b6", "size": 2698, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/boost/fusion/support/category_of.hpp", "max_stars_repo_name": "sot...
[STATEMENT] lemma map_le_on_disj_right: "\<lbrakk> h' \<subseteq>\<^sub>m h ; h\<^sub>0 \<bottom> h\<^sub>1 ; h' = h\<^sub>1 ++ h\<^sub>0 \<rbrakk> \<Longrightarrow> h\<^sub>0 \<subseteq>\<^sub>m h" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>h' \<subseteq>\<^sub>m h; h\<^sub>0 \<bottom> h\<^sub>1; h' ...
{"llama_tokens": 200, "file": "Separation_Algebra_Map_Extra", "length": 1}
import os import random import sys sys.path.append('../') import pandas as pd import numpy as np import talib from pandas_datareader import data as pdr import fix_yahoo_finance as yf import xgboost as xgb import operator from sklearn.svm import SVC from sklearn.model_selection import GridSearchCV from sklearn.metrics...
{"hexsha": "3a9fc6280ba3fd4915c90e93a412191d5b7416d4", "size": 10600, "ext": "py", "lang": "Python", "max_stars_repo_path": "source_project/experiments/stock.py", "max_stars_repo_name": "leckie-chn/SemEval17-5", "max_stars_repo_head_hexsha": "5ca1e1f3972c58c32305f8614cfecc5e5de646cd", "max_stars_repo_licenses": ["Apach...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "C/C++ Unit Tests for ArangoDB" #include <boost/test/unit_test.hpp>
{"hexsha": "2abd9e17a4cf98f73ba8ee13d77bc1a1d7dba1f7", "size": 122, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "UnitTests/Basics/Runner.cpp", "max_stars_repo_name": "morsdatum/ArangoDB", "max_stars_repo_head_hexsha": "9cfc6d5cd50b8f451ebdedd77e2c5257fa72a573", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
// Copyright 2014 Jonathan Graehl-http://graehl.org/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
{"hexsha": "5a4cae2af58cb66e41974e9844e32ba04dd0091e", "size": 1508, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "graehl/shared/shell.hpp", "max_stars_repo_name": "graehl/carmel", "max_stars_repo_head_hexsha": "4a5d0990a17d0d853621348272b2f05a0dab3450", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
# -*- coding: utf-8 -*- import xgboost as xgb import pandas as pd import numpy as np from utils import * from os import path from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.preprocessing import StandardScaler project_path = path.join(path.dirname(__file__...
{"hexsha": "d9edecd16accdaff09cd33c7217bb67cc07ca504", "size": 1169, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/external/repositories/251229/kaggle-cooking-master/script/xgb.py", "max_stars_repo_name": "Keesiu/meta-kaggle", "max_stars_repo_head_hexsha": "87de739aba2399fd31072ee81b391f9b7a63f540", "max_...
import pygame import cmath import math as m from pygame import * from cmath import * import matplotlib as mat import numpy as np xmax = 20 ymax = 16 inter = 1 interx = 1 tmax = 10 intert = 10 j = sqrt(-1) WOUT_Last = [ 0, 0] def ln(x): try: return log(abs(x)) - j * ( atan( x.real / ( .0000001 + x.imag...
{"hexsha": "263e7e6620431ac3382f73e246249d2e79bea192", "size": 4831, "ext": "py", "lang": "Python", "max_stars_repo_path": "Test.py", "max_stars_repo_name": "HackersForHarambe/Python-Repository", "max_stars_repo_head_hexsha": "b8c36483e51fe8b48a134ec78e3d3f10eeb49cb9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
function csr_to_sparse_test() i = [1;2;3] j = [3;4;4] v = [8;9;10] (rp,ci,ai,m) = sparse_to_csr(i,j,v) (nzi,nzj,nzv) = csr_to_sparse(rp,ci,ai) A = sparse(nzi,nzj,nzv,length(rp)-1,maximum(ci)) # more tests added here # clique to sparse test rp = collect(1:5:26) ci = vec(resha...
{"hexsha": "1ca6750460e662ff3f2f4ee9f8cb95797d47c2a5", "size": 780, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/csr_to_sparse_test.jl", "max_stars_repo_name": "MeherChaitanya04/Julia", "max_stars_repo_head_hexsha": "644e96c3109f7210c6a71898fc61a777ba20d49b", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Copyright 2013 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
{"hexsha": "c4564b58af68e78bfb2a664c467fcd74d1fbe272", "size": 3210, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/atoms/affine/conv.py", "max_stars_repo_name": "jasondark/cvxpy", "max_stars_repo_head_hexsha": "56aaa01b0e9d98ae5a91a923708129a7b37a6f18", "max_stars_repo_licenses": ["ECL-2.0", "Apache-2.0"...
#!/usr/bin/env python # -*- coding: utf-8 -*- from Bio import SeqIO import re import numpy as np import os import random import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection class Region : def __init__(self, start, stop, id) : self.start ...
{"hexsha": "68ae03a14211d81fd918b62c634b865c80575506", "size": 9905, "ext": "py", "lang": "Python", "max_stars_repo_path": "Finder.py", "max_stars_repo_name": "AntoineHo/STRIP", "max_stars_repo_head_hexsha": "53a6e9197c0e079c2a1c686d1bf5b8710ced8525", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, ...
import chainer import chainer.functions as F from scipy.misc import imresize class Backprop: """ Backprop """ def __init__(self, model, target_layer="conv5_3", prob_layer="prob"): """ init """ self.model = model self.xp = self.model.xp self.target_layer = target_lay...
{"hexsha": "83b0c5632cd1d59beea159e4684305e289b5c8bf", "size": 6350, "ext": "py", "lang": "Python", "max_stars_repo_path": "grad-cam/backprop.py", "max_stars_repo_name": "daisuke-motoki/chainer-practice", "max_stars_repo_head_hexsha": "0e3b8924a61d2926e88e316961077eeac1c8a592", "max_stars_repo_licenses": ["MIT"], "max_...
import sys import re import numpy as np import torch infile='celeba_full_64x64_5bit.npy' img = torch.tensor(np.load(infile)) img = img.permute(0, 3, 1, 2) torch.save(img, re.sub('.npy$', '.pth', infile))
{"hexsha": "1c71b66f494868200f8dc2c6e6533b7efd6ec1a9", "size": 205, "ext": "py", "lang": "Python", "max_stars_repo_path": "Codes/Resflow_Procs/preprocessing/convert_to_pth.py", "max_stars_repo_name": "aahmadian-liu/ood-likefree-invertible", "max_stars_repo_head_hexsha": "977e70eccaa7f2eb09724b5bf6f28156f4940461", "max_...
import numpy as np import onnx from tests.utils.common import check_onnx_model from tests.utils.common import make_model_from_nodes def _test_gather( input_array: np.ndarray, indices: np.ndarray, opset_version: int, **kwargs, ) -> None: test_inputs = { 'x': input_array, ...
{"hexsha": "42afa36c405d1af2b4ea97d61f3b61b3d63c0ad3", "size": 1325, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/node_converters/gather_test.py", "max_stars_repo_name": "niobeus/onnx2torch", "max_stars_repo_head_hexsha": "d2dc0a0927ced3ac32d4a1dc925a5528874b5c0c", "max_stars_repo_licenses": ["Apache-2....
module Term import Data.Fin %logging 1 %logging declare.def 3 mutual data Bdr : (cut : Bool) -> (vars : Nat) -> Type where Lam : Bdr cut vars Pi : Chk cut vars -> Bdr cut vars -- Checkable terms (i.e. introduction forms) data Chk : (cut : Bool) -> (vars : Nat) -> Type where Bnd : Bdr cut vars ->...
{"hexsha": "481716c5e51382306284fa059bd5000081b46fd8", "size": 773, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "idris2/tests/idris2/basic044/Term.idr", "max_stars_repo_name": "Qqwy/Idris2-Erlang", "max_stars_repo_head_hexsha": "945f9c12d315d73bfda2d441bc5f9f20696b5066", "max_stars_repo_licenses": ["BSD-3-Cla...
# Created on: Jun 01, 2020 # Author: Marek Ryn # Imports from PIL import Image, ImageDraw, ImageFont import numpy as np import matplotlib.pyplot as plt class FontCompressor: @staticmethod def _getm(cc): m = 0 if cc > 10: m = 1 if cc > 92: m = 2 if cc > 174: m = 3 r...
{"hexsha": "965109cfbd4473a53d1490bdab2bdb9215996830", "size": 5472, "ext": "py", "lang": "Python", "max_stars_repo_path": "TFT Tools/fontcompressor.py", "max_stars_repo_name": "MarekRyn/ILI9341-Toolkit", "max_stars_repo_head_hexsha": "0d494db158d8cc1a328ed97fc5c4f7e5f11a74e0", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding: utf-8 -*- import logging import numpy as np from mit_d3m import load_dataset from mlblocks import MLPipeline from sklearn.model_selection import KFold, StratifiedKFold LOGGER = logging.getLogger(__name__) def get_split(X, y, indexes): if hasattr(X, 'iloc'): X = X.iloc[indexes] else: ...
{"hexsha": "fb08e3143afaf6a85985b4fb3ae008b0d7f1b953", "size": 2167, "ext": "py", "lang": "Python", "max_stars_repo_path": "piex/scoring.py", "max_stars_repo_name": "HDI-Project/PiEx", "max_stars_repo_head_hexsha": "fdc2167fe7b7007c178499a9062c2ff07fe7c31c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "ma...
import os import numpy from numpy import * import math from scipy import integrate, linalg from matplotlib import pyplot from pylab import * def build_freestream_rhs(panels, freestream): """ Builds the right-hand side of the system arising from the freestream contribution. Parameters ---...
{"hexsha": "5b28fb5f4321469e4b80d82e8268908451643240", "size": 1045, "ext": "py", "lang": "Python", "max_stars_repo_path": "steapy/build_rhs.py", "max_stars_repo_name": "Sparsh-Sharma/SteaPy", "max_stars_repo_head_hexsha": "d6f3bee7eb1385c83f65f345d466ef740db4ed3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#include <boost/compute/container/mapped_view.hpp>
{"hexsha": "7bfde59977bd0d60d0400aa0795532e726896a05", "size": 51, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_compute_container_mapped_view.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": [...
// ----------------------------------------------------------------------------- // Fern © Geoneric // // This file is part of Geoneric Fern which is available under the terms of // the GNU General Public License (GPL), version 2. If you do not want to // be bound by the terms of the GPL, you may purchase a proprietary...
{"hexsha": "f556055f0ee6e6c32589f6235d54b9d947b7939b", "size": 3723, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/fern/source/fern/io/netcdf/coards/test/read_test.cc", "max_stars_repo_name": "quanpands/wflow", "max_stars_repo_head_hexsha": "b454a55e4a63556eaac3fbabd9...
\title{SCOREC Fall 2015 URP Projects} \author{ Dan Zaide, Brian Granzow, Dan Ibanez, and Cameron Smith \\ } \date{\today} \documentclass[12pt]{article} \usepackage{hyperref} \usepackage{graphicx} \begin{document} \maketitle Let's begin with a little bit about meshes. We can look at the world around us. Everyt...
{"hexsha": "ae1d747ebd9224be124d267dcbebdf722e2a82c0", "size": 6718, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "projectsF15.tex", "max_stars_repo_name": "SCOREC/urp", "max_stars_repo_head_hexsha": "53a8a8469e46597b19448603ae6399d86cdcfa39", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 1, "m...
\section{Definitions, Families of Curves} \subsection{Definitions} \begin{definition}[Order] Order of a DE is the highest-ordered derivative appearing in it. So \begin{equation} \frac{d^2y}{dx^2}+2b(\frac{dy}{dx})^3+y=0 \end{equation} is a 2nd order DE. In general, \begin{equation} ...
{"hexsha": "3182a009152181a5e794461eea97c08aefc7d6ba", "size": 2887, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "differential-equations/tex/unit-1.tex", "max_stars_repo_name": "sidnb13/latex-notes", "max_stars_repo_head_hexsha": "bbd935b7ff9781169775c052625b1917a47d5dcc", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/python """ """ import numpy as np import time import h5py import sys import os from larch import Group def read_xrd_hdf5(fname, verbose=False, _larch=None): # Reads a HDF5 file created for XRD mapping h5file = h5py.File(fname, 'r') addr = 'entry/data/data' for section in ('entry/data/data...
{"hexsha": "d4a3368a56c34b95224bea0e93f142e19c0d9d15", "size": 877, "ext": "py", "lang": "Python", "max_stars_repo_path": "larch/io/xrd_hdf5.py", "max_stars_repo_name": "kbuc/xraylarch", "max_stars_repo_head_hexsha": "3abb0d6bdc65cf2747a03dd114d98df317c0ac9f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
function test_pull1412 % MEM 2gb % WALLTIME 00:10:00 % DEPENDENCY ft_heartrate cd(dccnpath('/home/common/matlab/fieldtrip/data/test/pull1412')); %% % this corresponds to the preprocessed dataset 006_3013065.02_rest1 from bug3433 load datappg cfg = []; cfg.channel = 'HR'; cfg.threshold = 0.7; cfg.method = 'findpeak...
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/test/test_pull1412.m"}
''' Created on 2020. 4. 16. @author: Inwoo Chung (gutomitai@gmail.com) ''' import numpy as np import pandas as pd import os from abc import ABC, abstractmethod import time import json import platform from tqdm import tqdm from tensorflow.keras.models import Model, load_model from tensorflow.keras.l...
{"hexsha": "41c19d040de711b5638b43ad37330fdcf1ed58d6", "size": 15504, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/style_based_gan/style_based_gan_trainer.py", "max_stars_repo_name": "tonandr/keras_unsupervised", "max_stars_repo_head_hexsha": "fd2a2494bca2eb745027178e220b42b5e5882f94", "max_stars_rep...
import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout import pandas as pd from ..utils import dict_to_repr class PSSTNetwork(object): def __init__(self, case, prog='sfdp'): self._case = case self.regenerate_network() self.recalculate_positions(prog=prog) @pro...
{"hexsha": "68fc911dd69ff503dcc80f5af8da6b204d40d2f8", "size": 6545, "ext": "py", "lang": "Python", "max_stars_repo_path": "psst/network/__init__.py", "max_stars_repo_name": "djinnome/psst", "max_stars_repo_head_hexsha": "f86019adaa0440fbfbadd1068eb7dac78e5640e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Ke Sun (sunk@mail.ustc.edu.cn) # ------------------------------------------------------------------------------ """ Modified by Myung-Joon Kwon mjkwon2021@gmail.com J...
{"hexsha": "4a9fb5974d7e2e20ccbd4e6c54aeb894feead54e", "size": 5882, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/core/function.py", "max_stars_repo_name": "mjkwon2021/CAT-Net", "max_stars_repo_head_hexsha": "d7054580e30f99bd6adc05f5c5e39feee9fd1fcb", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include <boost/test/unit_test.hpp> #include "ParserFlatbuffersSerializeFixture.hpp" #include "../Deserializer.hpp" #include <string> BOOST_AUTO_TEST_SUITE(Deserializer) struct PadFixture : public ParserFlatbuffersSerializeFixtu...
{"hexsha": "b18710a38162c02a56d6f2e836967fb532345f96", "size": 5429, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/armnnDeserializer/test/DeserializePad.cpp", "max_stars_repo_name": "VinayKarnam/armnn", "max_stars_repo_head_hexsha": "98525965c7cfecd9bf48297b433b2122cd1b4a1d", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma invertible_left_cancel [simp]: "\<lbrakk> invertible x; x \<in> M; y \<in> M; z \<in> M \<rbrakk> \<Longrightarrow> x \<cdot> y = x \<cdot> z \<longleftrightarrow> y = z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>invertible x; x \<in> M; y \<in> M; z \<in> M\<rbrakk> \<Longrightarro...
{"llama_tokens": 172, "file": "Jacobson_Basic_Algebra_Group_Theory", "length": 1}
Require Import Blech.Defaults. Require Import Coq.Setoids.Setoid. Require Import Coq.Classes.SetoidClass. Require Import Blech.Bishop. Require Import Blech.Proset. Require Import Blech.Proset.Heyting. Import ProsetNotations. Import HeytingNotations. (* Ostensibly, a first order system of logic is a free heyting alg...
{"author": "mstewartgallus", "repo": "category-fun", "sha": "436a90c0f9e8a729da6416a2c0e54611ca5e4575", "save_path": "github-repos/coq/mstewartgallus-category-fun", "path": "github-repos/coq/mstewartgallus-category-fun/category-fun-436a90c0f9e8a729da6416a2c0e54611ca5e4575/theories/Proset/Heyting/Free.v"}
function iterative_probabilistic_improvement(tuning_run::Run, reference::RemoteChannel; threshold::AbstractFloat = 2.) cost_calls = tuning_run.cost_evaluations iteration = 1 name = "Itera...
{"hexsha": "989104114941c5b35c8e83a0965ebb1f4d352e72", "size": 1224, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/search/techniques/iterative_probabilistic_improvement.jl", "max_stars_repo_name": "JuliaPackageMirrors/StochasticSearch.jl", "max_stars_repo_head_hexsha": "58e48c8812fb402e4a46ffff1d5bcb87...
DGTTRF Example Program Results Details of factorization Second superdiagonal of U -1.0000 1.9000 8.0000 First superdiagonal of U 2.3000 -5.0000 -0.9000 7.1000 Main diagonal of U 3.4000 3.6000 7.0000 -6.0000 -1.0154 Multipliers 0.8824 0.0196 0.1401 -0.0148 Vector of in...
{"hexsha": "baacf48cafbf6bc5344e514eaf0326f388dd21aa", "size": 378, "ext": "r", "lang": "R", "max_stars_repo_path": "examples/baseresults/dgttrf_example.r", "max_stars_repo_name": "numericalalgorithmsgroup/LAPACK_examples", "max_stars_repo_head_hexsha": "0dde05ae4817ce9698462bbca990c4225337f481", "max_stars_repo_licens...
C$Procedure ZZDIV ( Safer division ) DOUBLE PRECISION FUNCTION ZZDIV ( NUMR, DENOM ) C$ Abstract C C Safely calculate the value NUMR/DENOM, avoiding the possibility C of floating point exceptions (FPE), due to numeric underflow, C numeric overflow, or divide-by-zero. C C$ Disclaimer C C THIS SOF...
{"hexsha": "b3dc04249550d6480634393fa3486ef12dd9bc32", "size": 10994, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/zzdiv.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
{"hexsha": "40da78d8cf41cc3d9a6dc7957b58580b0dde21bf", "size": 8105, "ext": "py", "lang": "Python", "max_stars_repo_path": "imperative/python/megengine/functional/loss.py", "max_stars_repo_name": "chenbo123222/MegEngine", "max_stars_repo_head_hexsha": "8230ea2d0b16422136ad27b4073d523b524aa4e6", "max_stars_repo_licenses...
from collections import namedtuple import os from gym import spaces from typing import Callable, Dict, List, Optional import numpy as np from lanro.simulation import PyBulletSimulation from lanro.utils import RGBCOLORS DEBUG = int("DEBUG" in os.environ and os.environ["DEBUG"]) JointInfo = namedtuple('JointInfo', [ ...
{"hexsha": "f40688449d41149301c01e371b8340bf2aa38858", "size": 18829, "ext": "py", "lang": "Python", "max_stars_repo_path": "lanro/robots/pybrobot.py", "max_stars_repo_name": "knowledgetechnologyuhh/lannro-gym", "max_stars_repo_head_hexsha": "ac3afcf7d8ed854d75368135b023edf055644dd2", "max_stars_repo_licenses": ["MIT"]...
// Copyright 2015-2018 Hans Dembinski // // 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 BOOST_HISTOGRAM_AXIS_CATEGORY_HPP #define BOOST_HISTOGRAM_AXIS_CATEGORY_HPP #include <algorithm> #include <boost/...
{"hexsha": "f5d63a3b5819d3badabcf5a3be437ff423af9e3f", "size": 6925, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/histogram/axis/category.hpp", "max_stars_repo_name": "henryiii/histogram", "max_stars_repo_head_hexsha": "d9f000cb86a4b4ac5ebfcb395616fa9aaa28e06c", "max_stars_repo_licenses": ["BSL-1....
import numpy as np import cv2 import matplotlib.pyplot as plt import os import random import sys import tensorflow as tf from tensorflow import keras # BUILDING MODEL def down_conv_block(x, filters, kernel_size=(3, 3), padding='SAME', strides=1): c = keras.layers.Conv2D(filters, kernel_size=kernel_size, paddin...
{"hexsha": "7e55f7db77533b2acd256c109281181e4750d4ce", "size": 2044, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/model.py", "max_stars_repo_name": "RaghavPrabhakar66/Kaggle-Data-Science-Bowl-2018", "max_stars_repo_head_hexsha": "fd30fc30d438faaf22bf054da911e7b698fc8f41", "max_stars_repo_licenses": ["...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} -- This module proves the two "VotesOnce" proof obligations for our fake...
{"hexsha": "aa4fe33f6c3f2379b58ec9fcbb7d316955dc8d26", "size": 12674, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "LibraBFT/Impl/Properties/VotesOnce.agda", "max_stars_repo_name": "cwjnkins/bft-consensus-agda", "max_stars_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_stars_repo_licenses"...
SUBROUTINE STR_GET_ITEM & (item_number,string,item,first_character,last_character) c*********************************************************************** c subroutine str_get_item c*********************************************************************** c Program Source: ...
{"hexsha": "d4ff5abdc11cf081461b45e671211c3ab7ef17f6", "size": 2786, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "LWPCv21/lib/str_get_item.for", "max_stars_repo_name": "spinorkit/LWPC", "max_stars_repo_head_hexsha": "6144eac3b1ac1322d0ee363ec689bf8123bdeebd", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import os import json import pandas as pd import numpy as np import gensim.downloader as api from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--data", type=str, default="./train.csv", help="path to training data") parser.add_argument("--approach", type=int, default=1, choices=[1, 2, ...
{"hexsha": "3d58cc6a02ecbd28d35c4de1222a63152ddab1f6", "size": 3588, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment2/dataset.py", "max_stars_repo_name": "tezansahu/CS728_assignments", "max_stars_repo_head_hexsha": "98d8721b82ddab174b86647f1cd7c412d768b6b9", "max_stars_repo_licenses": ["Apache-2.0"], ...
import numpy as np import pandas as pd import pytest from pandas.testing import assert_index_equal from evalml.pipelines import RegressionPipeline def test_regression_init(): clf = RegressionPipeline( component_graph=["Imputer", "One Hot Encoder", "Random Forest Regressor"] ) assert clf.parameter...
{"hexsha": "d82c0f1c5c881435f3627fad48881539f7f6c582", "size": 3713, "ext": "py", "lang": "Python", "max_stars_repo_path": "evalml/tests/pipeline_tests/regression_pipeline_tests/test_regression.py", "max_stars_repo_name": "peterataylor/evalml", "max_stars_repo_head_hexsha": "917f07845c4a319bb08c7aaa8df9e09623df11c8", "...
#!/usr/bin/env python3 import cv2 import numpy as np from pathlib import Path import histogram from matplotlib import pyplot as plt import os import multiprocessing import argparse parser = argparse.ArgumentParser() parser.add_argument('clutter', help='directory containing clutter data') parser.add_argument('out', he...
{"hexsha": "da9341dcba6a3981bea85472085e7f3e0f050adb", "size": 5940, "ext": "py", "lang": "Python", "max_stars_repo_path": "solution_baseline/solution.py", "max_stars_repo_name": "NathanRVance/cv2", "max_stars_repo_head_hexsha": "fe3ddd56ec8a6010981b3f8861aea53541991028", "max_stars_repo_licenses": ["MIT"], "max_stars_...