text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
from __future__ import absolute_import import os import glob import numpy as np from clawpack.pyclaw import Solution from clawpack.pyclaw.util import check_solutions_are_same import six class IOTest(): @property def solution(self): return Solution() @property def file_formats(self): re...
{"hexsha": "10e21d93f13ebb00d527b0f84658d1939b8b3f9c", "size": 4375, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyclaw/tests/test_io.py", "max_stars_repo_name": "gyanz/pyclaw", "max_stars_repo_head_hexsha": "15bbd970dd84ba69337e2cee2b0b1522811b0af5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
[STATEMENT] lemma A_authenticates_B: "\<lbrakk> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK(A,B)) (Nonce Nb)\<rbrace> \<in> set evs; \<not>illegalUse(Card B); evs \<in> sr \<rbrakk> \<Longrightarrow> \<exists> Na. Outpts (Card B) B \<lbrace>Nonce Nb, Key K, ...
{"llama_tokens": 430, "file": null, "length": 2}
#! encoding:utf-8 import time import numpy as np import tensorflow as tf from nlpgnn.datas import Planetoid from nlpgnn.models import GAAELayer from sklearn.linear_model import LogisticRegression from sklearn.metrics import classification_report from nlpgnn.callbacks import EarlyStoppingScale hidden_dim = 300 drop_rat...
{"hexsha": "253ab8bf424f808207c21a676d22da96eae112e1", "size": 3846, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/GNN/auto_encoder/GAAE.py", "max_stars_repo_name": "ojipadeson/NLPGNN", "max_stars_repo_head_hexsha": "7c43d2f0cb2b16c046c930037fd505c5c4f36db4", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma nonneg_\<P>\<^sub>U: "nonneg_blinfun (\<P>\<^sub>U d)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nonneg_blinfun (\<P>\<^sub>U d) [PROOF STEP] unfolding \<P>\<^sub>U_def Finite_Cartesian_Product.less_eq_vec_def blinfun_to_matrix_inv P_upper_def P_dec_elem [PROOF STATE] proof (prove) goal (1 sub...
{"llama_tokens": 209, "file": "MDP-Algorithms_Splitting_Methods", "length": 2}
[STATEMENT] lemma preserved_code [code]: "preserved f h h' = (((h \<turnstile> ok f) \<and> (h' \<turnstile> ok f) \<and> |h \<turnstile> f|\<^sub>r = |h' \<turnstile> f|\<^sub>r) \<or> ((\<not>h \<turnstile> ok f) \<and> (\<not>h' \<turnstile> ok f)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. preserved f h ...
{"llama_tokens": 473, "file": "Core_SC_DOM_common_preliminaries_Heap_Error_Monad", "length": 3}
# -*- coding: utf-8 -*- from astropy.io import fits import numpy as np import math import os from PIL import Image from datetime import datetime import psycopg2 import time import traceback import logging import scipy.ndimage #nohup python getOTImgsAll.py > /dev/null 2>&1 & class QueryData: ...
{"hexsha": "4cd10b9710a0e55752d701874ad42c0ae1359bbf", "size": 7828, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/batchGetJpegImage.py", "max_stars_repo_name": "archord/wata", "max_stars_repo_head_hexsha": "98ee5252372b9274769fdc18468a93ca4a70adb2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
\documentclass[11pt]{article} \usepackage[breakable]{tcolorbox} \usepackage{parskip} % Stop auto-indenting (to mimic markdown behaviour) \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage{mathpazo} \else \usepackage{fontspec} \fi % Basic figure setup, for...
{"hexsha": "dbc62716e88a02e5e74ccc7b4423910ab39abbac", "size": 67282, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "HW3/Stabilizers.tex", "max_stars_repo_name": "apcarrik/quantum_error_correction", "max_stars_repo_head_hexsha": "e64381104926dfb04ffb8250c3c9f2e239b39380", "max_stars_repo_licenses": ["MIT"], "max_...
from datamallet.tabular.preprocess import (ColumnDropper, ColumnRename) import pandas as pd import numpy as np df = pd.DataFrame({'A':[1,2,3,4,5], 'B':[2,4,6,8,10], 'C':['dog','cat', 'sheep','dog','cat'], 'D':['male','m...
{"hexsha": "27fdad39f7a54e1f61c4e1df1d95dd60e070dc3d", "size": 1847, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tabular/test_preprocess.py", "max_stars_repo_name": "bodealamu/datamallet", "max_stars_repo_head_hexsha": "d736c5624014f6e186211099b6196c4b0aa544cd", "max_stars_repo_licenses": ["MIT"],...
// (C) Copyright Jonathan Turkanis 2005. // 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.) // See http://www.boost.org/libs/iostreams for documentation. #ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED #define BOOST...
{"hexsha": "e1399d8ca868650957a2b01870e0233c4e61f7fd", "size": 5595, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/iostreams/tee.hpp", "max_stars_repo_name": "dstrigl/mcotf", "max_stars_repo_head_hexsha": "92a9caf6173b1241a2f9ed45cd379469762b7178", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars...
# -*- coding: utf-8 -*- # 版权所有 2021 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”), # 您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时...
{"hexsha": "4d70d659a5b855ceefbedc650e3b8ccac3e1cb65", "size": 2910, "ext": "py", "lang": "Python", "max_stars_repo_path": "rqalpha/mod/rqalpha_mod_sys_analyser/plot/utils.py", "max_stars_repo_name": "tranzwalle/rqalphax", "max_stars_repo_head_hexsha": "5a85d5c8c9df988ace26b68852c9ec39ad2de6df", "max_stars_repo_license...
\documentclass[11pt]{article} \usepackage{mathtools,hyperref,booktabs,fullpage, txfonts} \usepackage[amssymb,cdot]{SIunits} \usepackage[utopia]{mathdesign} \usepackage[table]{xcolor} \usepackage{amsmath} \usepackage{hyperref} \usepackage{longtable} \usepackage{fullpage} \definecolor{lightgray}{gray}{0.93} \pag...
{"hexsha": "4e57e551733559e0a708447969c5741d6bd2079e", "size": 2216, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "statement.tex", "max_stars_repo_name": "CameronAmos/homework-2-danmracnichols", "max_stars_repo_head_hexsha": "77aff8b28f1d8c9f9fbc8c4f72ffff5f1fdcba94", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "8f919d7fa5026e17d25409a4d4a67254c8a6b964", "size": 2356, "ext": "py", "lang": "Python", "max_stars_repo_path": "official/projects/basnet/modeling/basnet_model_test.py", "max_stars_repo_name": "NasTul/models", "max_stars_repo_head_hexsha": "4fabd84c5c5e2b34a1b95431788f7801de036421", "max_stars_repo_licenses"...
import pickle import json import load_graph import utils import numpy as np import networkx as nx from scipy.sparse.csgraph import laplacian from sklearn.cluster import KMeans from sklearn.metrics import normalized_mutual_info_score task_lookup = { 'graph': 'debias the input graph', 'model': 'debias the min...
{"hexsha": "b9036a98ce86fe06391d5e675ceec1b405e57f80", "size": 4738, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate/sc.py", "max_stars_repo_name": "jiank2/inform", "max_stars_repo_head_hexsha": "311b5e55b360f37a98583e230ba082c3f1ba4281", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_st...
import copy import numpy as np import note_seq import h5py import torch class ImprovDataset(torch.utils.data.Dataset): def __init__(self, fn_h5, encoder, batch_size): self.encoder = encoder self.batch_size = batch_size self.hdf = h5py.File(fn_h5, "r") def __getitem__(self, index): ...
{"hexsha": "e4e10a1159d13f7dcf610c49d86cc50fbdf3dde9", "size": 7097, "ext": "py", "lang": "Python", "max_stars_repo_path": "improv_rnn/data.py", "max_stars_repo_name": "DerWaldi/improv-rnn-torch", "max_stars_repo_head_hexsha": "1d4db0a4cca1a1dd4762237f56e341a463784aae", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
! Copyright (c) 2005, NVIDIA CORPORATION. All rights reserved. ! ! Licensed under the Apache License, Version 2.0 (the "License"); ! you may not use this file except in compliance with the License. ! You may obtain a copy of the License at ! ! http://www.apache.org/licenses/LICENSE-2.0 ! ! Unless required by appli...
{"hexsha": "6724e2a173b5b7d21d4f8e16a0e993909ec0be04", "size": 1385, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/f90_correct/src/ip36.f90", "max_stars_repo_name": "kammerdienerb/flang", "max_stars_repo_head_hexsha": "8cc4a02b94713750f09fe6b756d33daced0b4a74", "max_stars_repo_licenses": ["Apache-2.0"],...
import numpy as np from .safe import * def frob_loss(x, lf): """Return the Frobenius norm ||x - LF||_F This implementation supports masked arrays. """ return np.square(x - lf).mean() def i_loss(x, lf): """Return the I-divergence sum(X log X - X log(LF) - X + LF) If we constrain sum(A) = sum(LF) = 1, ...
{"hexsha": "e8c42904117022fb33531d235ab6588ce37a20ae", "size": 1929, "ext": "py", "lang": "Python", "max_stars_repo_path": "wlra/nmf.py", "max_stars_repo_name": "aksarkar/wlra", "max_stars_repo_head_hexsha": "15b1f2d100bdff396de3446d8a04dab692486ead", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_stars...
\documentclass[a4paper]{article} % Nice way to display code \usepackage{minted} % Import images \usepackage{graphicx} \usepackage{amsmath} \usepackage{multicol} \title{Understanding the connection between ranking the internet and eigen vectors} \author{Vince Knight} \date{} \begin{document} \maketitle \sec...
{"hexsha": "649a0d9dfd7523bee4a6e82f0e71c9d3901904e8", "size": 5821, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "assets/rsc/page-rank/main.tex", "max_stars_repo_name": "geraintpalmer/cfm", "max_stars_repo_head_hexsha": "fa3f98cf45b225015f28be461e8ae661fa966b61", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#------------------------------------------------------------------------------ #' Abstraction layer for model functions/objects #' #' This class encapsulates differences in specifications of #' statistical/machine learning functions and model objects to provide a #' standardized way to access data and common methods o...
{"hexsha": "be449449b4991bcf9e77d3337b21be5c965e2b2f", "size": 18814, "ext": "r", "lang": "R", "max_stars_repo_path": "R/model.adapter.r", "max_stars_repo_name": "Marchen/model.adapter", "max_stars_repo_head_hexsha": "ace7f78abee9e2ce2b1ee5e09cc8ac59cea66c3e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2013-2018 Regents of the University of California. * * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). * * ndn-cxx library is free software: you can redistribute it and/or modify it under the ...
{"hexsha": "9c1999ca05fdb1eb623bb35b6c84daab80fb0f59", "size": 3737, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/unit/mgmt/nfd/cs-info.t.cpp", "max_stars_repo_name": "KITE-2018/kite-ndn-cxx", "max_stars_repo_head_hexsha": "2a674e2bab42a39d0731b0a30c4d49369b084c1c", "max_stars_repo_licenses": ["OpenSSL"],...
# -*- coding: utf-8 -*- """ Created on Thu Jul 13 19:14:48 2017 """ import os os.environ["KERAS_BACKEND"] = "tensorflow" import numpy as np from keras import backend as K from keras.engine import InputSpec, Layer from keras import initializers, regularizers, constraints from keras.utils.generic_utils import get_cus...
{"hexsha": "ebf2e5fb3f0cb9d6a8f189f5442fbcf40da0cfe8", "size": 12196, "ext": "py", "lang": "Python", "max_stars_repo_path": "Anime-Face-GAN-Keras-master/misc_layers.py", "max_stars_repo_name": "MengYan0711/AnimeFaces", "max_stars_repo_head_hexsha": "163be3cd052497af37a3ba2f360eb5bb3722bb71", "max_stars_repo_licenses": ...
import numpy as np from np import linalg import math # With help from orthonormal sets pseudocode written by David Eberly # https://www.geometrictools.com/Documentation/OrthonormalSets.pdf # limiting to 3-D case for right now # TODO configurable eigenvalues? (until then, we can just set eigenvalues to 0 and stack...)...
{"hexsha": "0f7ff6da0f994cb6fa952737f3c3416edcf45f79", "size": 847, "ext": "py", "lang": "Python", "max_stars_repo_path": "SocialModel/util.py", "max_stars_repo_name": "Zwami/yacm", "max_stars_repo_head_hexsha": "db7cc6693fb37178f81f741c0f6ebebf525d146d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import geopandas as gpd import json import pandas as pd import io import numpy as np def calc_zoom(min_lat, max_lat, min_lng, max_lng): # Based off https://stackoverflow.com/a/55146034/922745 width_y = abs(max_lat - min_lat) width_x = abs(max_lng - min_lng) zoom_y = -1.446 * np.log(width_y) + 8 z...
{"hexsha": "f612b5e13bb6fcb57a4dc7e34975d12401d7e3e5", "size": 2018, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_shapes.py", "max_stars_repo_name": "sjtrny/toomanyguns", "max_stars_repo_head_hexsha": "2acf48f3dfef3550000a8a560c9c5af7986eda28", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import pickle import numpy as np from experiments import args_parser from simulator.n_player_graphon_simulator import UniformGraphonNPlayerSimulator from solver.policy.finite_policy import QSoftMaxPolicy, QMaxPolicy from solver.policy.graphon_policy import DiscretizedGraphonFeedbackPolicy def run_once(simulator, fi...
{"hexsha": "6bec5d8fce7e128a662fa555dae5968444ceb76e", "size": 4626, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/run_once_nagent_compare.py", "max_stars_repo_name": "tudkcui/gmfg-learning", "max_stars_repo_head_hexsha": "1b7a27376d882179432abb8d9ea6d0f45a176005", "max_stars_repo_licenses": ["MIT"...
import numpy as np import pandas as pd from . import movingwindow as ts #import pyximport; pyximport.install() from . import kolmogorov_complexity from . import entropy def get_ews(x,windowsize, ac_lag, se = True, kc = True, method="old", mv_method="uniform"): ''' Calculate early-warning signals from time ser...
{"hexsha": "d22cd307ff23e8923c2785965bc61f0f6b45479d", "size": 4170, "ext": "py", "lang": "Python", "max_stars_repo_path": "ews/ews.py", "max_stars_repo_name": "tsbrett/py_earlywarning", "max_stars_repo_head_hexsha": "443ecca93a8c8ca0f5fb6763653aa39e03055f23", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
#!/usr/bin/python ''' Created on Oct 15, 2014 @author: jason ''' import numpy as np np.set_printoptions(suppress=True, formatter={'all':lambda x: str(x) + ','}, linewidth=9999) import matplotlib.pyplot as plt import glob, time import sys import os import math import operator from smote import * import subprocess impor...
{"hexsha": "e40ceef49364a56d8c074f13d1c072ed7d098d70", "size": 7880, "ext": "py", "lang": "Python", "max_stars_repo_path": "createModel.py", "max_stars_repo_name": "jasonzliang/kick_classifier", "max_stars_repo_head_hexsha": "adcea01983434f57e3e3c8d847a0dd8868c28480", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time import faiss import numpy as np def do_partition(n, qin, maxval=65536, seed=123, id_type='int64'): print( f"n={n} qin...
{"hexsha": "ce48ffe9acfa0970b91d4fb09a72b492755d7ff7", "size": 2226, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchs/bench_partition.py", "max_stars_repo_name": "ScriptBox99/facebook-faiss", "max_stars_repo_head_hexsha": "04d31fac53c609b6487a4cd6ead1c8b4ad926b0c", "max_stars_repo_licenses": ["MIT"], "max_...
import os import random import cv2 import numpy as np import tensorflow as tf import imgaug as ia from imgaug import augmenters as iaa import networks.yolov2.params as params import networks.yolov2.region_layer as region_layer # binary data type def _bytes_feature(value): return tf.train.Feature(bytes_list=tf.t...
{"hexsha": "58fa65cd169379bab68938224395f6d94d90c14f", "size": 7759, "ext": "py", "lang": "Python", "max_stars_repo_path": "networks/yolov2/data.py", "max_stars_repo_name": "liumusicforever/tf_models_develop_framework", "max_stars_repo_head_hexsha": "3ce5f02ca61547c1daac8cdacf459411e26cd81b", "max_stars_repo_licenses":...
from fractions import Fraction from math import gcd import numpy as np """ Convert the style of gambling odds to Function Name (Decimal, American, Fractional). TO DO: Fix edge case related to Fraction module that causes weird rounding / slightly off output """ def american_odds(odds): """ :param odds: ...
{"hexsha": "5471ef5e2041074700733cd254f4357bec345d93", "size": 3289, "ext": "py", "lang": "Python", "max_stars_repo_path": "WagerBrain/odds.py", "max_stars_repo_name": "sedemmler/WagerBrain", "max_stars_repo_head_hexsha": "b1cc33f5eb7a6130106bf8251b554718e2d22172", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from tomso import adipls, fgong import numpy as np import unittest tmpfile = 'data/tmpfile' EPS = np.finfo(float).eps class TestADIPLSFunctions(unittest.TestCase): def test_load_mesa_amdl(self): D, A, nmod = adipls.load_amdl('data/mesa.amdl', return_nmod=True) self.assertEqual(nmod, 1) se...
{"hexsha": "d43acf389f7448cf9911620f34d27b9308e60db1", "size": 5419, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_adipls.py", "max_stars_repo_name": "waltervrossem/tomso", "max_stars_repo_head_hexsha": "6502bfda598d2b8d13e8e06249c4687fe2bb5f37", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import os import argparse import pickle as pk import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn from stgcn import STGCN from GaussianCopula import CopulaLoss from utils import generate_dataset, load_metr_la_data, get_normalized_adj use_gpu = True num_timesteps_input = 12 num_times...
{"hexsha": "072891cec44932f4bbf3ab24a8d1d29338315ef8", "size": 6434, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Mars-tin/STGCN-PyTorch", "max_stars_repo_head_hexsha": "caa799d7d48f1a45ecfad26eb3c0899be74be91a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
[STATEMENT] lemma Union_quotient_restricted: assumes "equiv A r" assumes "P respects r" shows "\<Union>({x \<in> A. P x} // r) = {x \<in> A. P x}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Union> ({x \<in> A. P x} // r) = {x \<in> A. P x} [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals):...
{"llama_tokens": 3741, "file": "Twelvefold_Way_Preliminaries", "length": 42}
from torch.optim.lr_scheduler import _LRScheduler import numpy as np class OneCycleLR(_LRScheduler): """Sets the learning rate and momentum according to https://arxiv.org/abs/1803.09820 Args: optimizer (Optimizer): Wrapped optimizer. lrs (tuple): (start, middle, end) moms (tupl...
{"hexsha": "f3731a0c3030b8a409ea851ce5aa34b40918bd3d", "size": 2113, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/lr_scheduler_ext.py", "max_stars_repo_name": "VickyChing/ICASSP19", "max_stars_repo_head_hexsha": "247b0b9d738679f5472dd74f52bd1933b871e87f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
function overlayMapsSameSession(view); % overlayMapsSameSession(view); % % Take two maps (co, amp, ph, or map) from the current % view, and superimpose them in different color channels, % with an interface for adjusting the thresholds of each/ % moving across slices if necessary. % % % 06/04 ras: wrote it. % dialog ...
{"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrBOLD/Plots/overlayMapsSameSession.m"}
import numpy as np import random import torch as T from torch import nn, optim, autograd from common_functions import bucket_and_batch, pretty_print from models.BVAE import BVAE, ELBO, nll_fn, penalty_fn, ER_penalty_fn, mean_accuracy import argparse random.seed(101) val_size = 5000 batch_size = 128 display_step = 100 ...
{"hexsha": "13e7c80c4ec2173dc52ec8bb850ad7178347a306", "size": 5940, "ext": "py", "lang": "Python", "max_stars_repo_path": "MNIST_2/train.py", "max_stars_repo_name": "JRC1995/Causal-Inference", "max_stars_repo_head_hexsha": "911631c555af5217992cd5312659698da4aa9c47", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import h5py from pathlib import Path import argparse from PIL import Image import numpy as np def produceImages(h5file, outputpath, index): if not outputpath.exists(): outputpath.mkdir() hf = h5py.File(h5file, "r") data = hf['reconstruction'][()] indexes = [index] if index > 0 e...
{"hexsha": "ef23154fecadbab63389088c400e2c6f423f0e32", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "createImageFromH5.py", "max_stars_repo_name": "sbelenki/run_pretrained", "max_stars_repo_head_hexsha": "53cefd5c686cfae2a0af529fdee0182162e9ba6a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
"""Isosurface and isoline analysis functions.""" import warnings from typing import List, Tuple, Union import numpy as np from ifermi.defaults import KTOL __all__ = [ "isosurface_area", "isosurface_dimensionality", "connected_subsurfaces", "average_properties", "line_orientation", "plane_ori...
{"hexsha": "2bc2f4737a412e81d1e71ef81e3fc24835c198ed", "size": 17491, "ext": "py", "lang": "Python", "max_stars_repo_path": "ifermi/analysis.py", "max_stars_repo_name": "whzhangg/IFermi", "max_stars_repo_head_hexsha": "511c69acd1e5ac849f073d435210a25a603d5bcb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 32,...
[STATEMENT] lemma map_proj_id[simp]: assumes "list_all2 intT \<sigma>l al" shows "map2 proj \<sigma>l al = al" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map2 proj \<sigma>l al = al [PROOF STEP] apply(rule nth_equalityI) [PROOF STATE] proof (prove) goal (2 subgoals): 1. length (map2 proj \<sigma>l al) = length ...
{"llama_tokens": 442, "file": "Sort_Encodings_Mcalc2C", "length": 4}
import math import random import numpy as np from data_parser import parse_input def sign(num): return 1 if num > 0 else -1 def validate(w, xn, yn): result = w.getT().dot(xn)[0][0] return sign(result) == yn def count_weight_error(W, X, Y): err_count = 0 for i in range(len(X)): xn = X[i...
{"hexsha": "e44c2f05f0c2cb44db22d0661db27c330813e96f", "size": 1545, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw1/pla.py", "max_stars_repo_name": "Rhadow/machine-learning-foundations-homework", "max_stars_repo_head_hexsha": "656c606cadbe1d0bc57b1a89c81103908ac6538c", "max_stars_repo_licenses": ["MIT"], "m...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file # in the project root for full license information. import yaml, logging, os, sys import torch import numpy as np from nsvqa.train.trainer import VQATrainer class ExperimentBase(object): def build_neural_module...
{"hexsha": "120a9e9475b91bcb2ed4cdcd0e1dda0757e3d82a", "size": 6110, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nsvqa/base_experiment.py", "max_stars_repo_name": "drewhayward/DFOL-VQA", "max_stars_repo_head_hexsha": "8c7d403bac560588ab3ac45774a3e4f71fbe9c90", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: CYY """ import os import glob import argparse import nibabel as nib import numpy as np from scipy.ndimage import gaussian_filter, distance_transform_cdt def generation_fuzzy_dist(file): img = nib.load(file) imdata = img.get_fdata().astype(float) ...
{"hexsha": "05fa5011fde02e7379f4b48747f2b191006251de", "size": 3775, "ext": "py", "lang": "Python", "max_stars_repo_path": "deformity_analysis/registration.py", "max_stars_repo_name": "rousseau/dynMRI", "max_stars_repo_head_hexsha": "f06930d10369cb78d19c5f42a7c00b80d0d20c8a", "max_stars_repo_licenses": ["CECILL-B"], "m...
import skil import numpy as np skil_server = skil.Skil() work_space = skil.WorkSpace(skil_server) experiment = skil.Experiment(work_space) transform = skil.Transform(transform='iris_tp.json', experiment=experiment) deployment = skil.Deployment(skil_server) service = transform.deploy(deployment) with open('iris.data'...
{"hexsha": "3af5ede038ac50236fbfede44eba85f7fabd7cb2", "size": 398, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/keras-iris-pipeline/run_transform.py", "max_stars_repo_name": "pcrete/skil-python", "max_stars_repo_head_hexsha": "672a1aa9e8af020c960ab9ee280cbb6b194afc3f", "max_stars_repo_licenses": ["A...
# Steam reforming with water-gas shift ## Known coversion and temperature in steam reforming Given temperature and conversion of steam reforming (DR), assume exit composition is in equilibrium with respect to water-gas shift (WGS), and determine WGS-conversion $X_{H_2O,WGS}$. Parameters: * $X_{CH_4}=0.2$ * $T_{DR}...
{"hexsha": "c0dedc838980e5534ea24f14e8f2d1fc345ea3e5", "size": 95968, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "DR_WGS.ipynb", "max_stars_repo_name": "santiago-salas-v/walas", "max_stars_repo_head_hexsha": "65c1a86f9f2aaf6757d139aa6ce658ab1c750f0d", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma subsets_smash_property_R: fixes subsets1 subsets2 :: "(nat list*nat list) list" fixes n:: "nat" shows "\<forall> (elem :: nat list*nat list). (List.member (subsets_smash_R n subsets1 subsets2) elem) \<longrightarrow> (\<exists> (elem1::nat list*nat list). \<exists> (elem2::nat list*nat list...
{"llama_tokens": 3320, "file": "BenOr_Kozen_Reif_Renegar_Proofs", "length": 16}
[STATEMENT] lemma list_all_eq_const_replicate_lhs[intro]: "list_all (\<lambda>x. y = x) (replicate n y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. list_all ((=) y) (replicate n y) [PROOF STEP] by (simp add: list_all_length)
{"llama_tokens": 101, "file": "Interpreter_Optimizations_List_util", "length": 1}
#!/usr/bin/env python from collections.abc import Mapping, Callable import os import numpy as np import pandas as pd import pytest import openmc.data @pytest.fixture(scope='module') def elements_endf(): """Dictionary of element ENDF data indexed by atomic symbol.""" endf_data = os.environ['OPENMC_ENDF_DATA'...
{"hexsha": "c767d19e6cbbda06bd67e0f0ab1b79d6c2564fd5", "size": 4885, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit_tests/test_data_photon.py", "max_stars_repo_name": "janmalec/openmc", "max_stars_repo_head_hexsha": "4a4ac4c351d41fe153ca3341820cc507e484ce50", "max_stars_repo_licenses": ["MIT"], "max_...
(* Title: HOL/Auth/n_germanSymIndex_lemma_on_inv__47.thy Author: Yongjian Li and Kaiqiang Duan, State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences Copyright 2016 State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences *) header{*The ...
{"author": "lyj238Gmail", "repo": "newParaVerifier", "sha": "5c2d49bf8e6c46c60efa53c98b0ba5c577d59618", "save_path": "github-repos/isabelle/lyj238Gmail-newParaVerifier", "path": "github-repos/isabelle/lyj238Gmail-newParaVerifier/newParaVerifier-5c2d49bf8e6c46c60efa53c98b0ba5c577d59618/examples/n_germanSymIndex/n_german...
export RockPaperScissorsEnv """ RockPaperScissorsEnv() [Rock Paper Scissors](https://en.wikipedia.org/wiki/Rock_paper_scissors) is a simultaneous, zero sum game. """ Base.@kwdef mutable struct RockPaperScissorsEnv <: AbstractEnv reward::Tuple{Int,Int} = (0, 0) is_done::Bool = false end RLBase.players(::R...
{"hexsha": "db70f25437824cc29c7124aa857154e32bcae85e", "size": 2464, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ReinforcementLearningEnvironments/src/environments/examples/RockPaperScissorsEnv.jl", "max_stars_repo_name": "HenriDeh/ReinforcementLearning.jl", "max_stars_repo_head_hexsha": "fc74394b4552d09d...
# -*- coding: utf-8 -*- """ Created on Wed Oct 27 15:43:40 2021 @author: Bing Computing multidimensional Gaussian integral with Gaussian-Hermite quadrature """ from scipy.special import roots_hermite import numpy as np from math import sqrt, pi import itertools class Quadrature(): def __init__(self): ...
{"hexsha": "9609b288afe099298f4f3aa6778285f66171b3ef", "size": 2644, "ext": "py", "lang": "Python", "max_stars_repo_path": "lime/quadrature.py", "max_stars_repo_name": "binggu56/lime", "max_stars_repo_head_hexsha": "07f60c5105f0bedb11ac389fd671f4f1737a71fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "ma...
#! /usr/bin/env python3 # coding=utf-8 import datetime import os import re #import matplotlib #matplotlib.use('Agg') #import numpy as np #import matplotlib.pyplot as plt import argparse #import sys, os import peakTree import peakTree.helpers as h import logging log = logging.getLogger('peakTree') log.setLevel(loggin...
{"hexsha": "ab6bbc78e0f8dd78ec5d52fd45a310198f6239ad", "size": 2299, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_conversion_batch.py", "max_stars_repo_name": "martin-rdz/peakTree", "max_stars_repo_head_hexsha": "f37764b80faa5ead14835c2d03fda46c64b94e4d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import os from torchvision.transforms.transforms import ToTensor from haco.DIDrive_core.demo.cict_demo.post import Sensor, params import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import grad import torchvision.transforms as transforms import cv2 from haco.DIDrive_core.demo.cict_de...
{"hexsha": "5ddfaacec71a3603af14d3135f5ec18a80d11a16", "size": 13697, "ext": "py", "lang": "Python", "max_stars_repo_path": "haco/DIDrive_core/demo/cict/cict_model.py", "max_stars_repo_name": "decisionforce/HACO", "max_stars_repo_head_hexsha": "ebd1dc49598e6ae2704e58c053cc35f2d9e28429", "max_stars_repo_licenses": ["Apa...
#!/usr/bin/env python2 from __future__ import print_function import heart import logging import datetime import thread import time import json import numpy as np from BaseHTTPServer import HTTPServer from BaseHTTPServer import BaseHTTPRequestHandler class HttpServerHandler(BaseHTTPRequestHandler): def do_GET(self...
{"hexsha": "2650c5f7ad4e02ccea4afb73d91d5283050053de", "size": 2973, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-heart/examples/feedback_server/feedback_server.py", "max_stars_repo_name": "joegle/hrv-biofeedback", "max_stars_repo_head_hexsha": "08152889798d41bd9246c4550174377bf3eaa8f1", "max_stars_rep...
# MIT License # # Copyright (C) IBM Corporation 2019 # # 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...
{"hexsha": "5ede8a155a9f284a36399b91ed01848e074421f8", "size": 3792, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/wrappers/test_output_add_random_noise.py", "max_stars_repo_name": "dohmatob/adversarial-robustness-toolbox", "max_stars_repo_head_hexsha": "7d3ba7d2d6690be69c08754fbc632947c2d10a97", "max_st...
import os_clf as clf import numpy as np from sklearn.linear_model import SGDClassifier # SGD img_dim = 230400 class pool: def __init__(self): self.classifiers = {} self.errors = {} self.occurrences = {} def add_classifier(self, new_class, index): #self.classif...
{"hexsha": "f7e02d4fd8dd268218538dab47c65b6a26646be8", "size": 1859, "ext": "py", "lang": "Python", "max_stars_repo_path": "os_clf_pool.py", "max_stars_repo_name": "CopperWasp/CNNField", "max_stars_repo_head_hexsha": "41d0af17c8be6c0dcb3c701926ebdd6221584e05", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import CombinedNetworkGenerator as CNG import KeyboardOutput as KeyOut import Trainer import R3Utilities as R3U import numpy as np import time import matplotlib.pyplot as plt import random import ctypes import math def testRewardFunction(rawInputs, index): raw = rawInputs[index] prevRaw = rawInputs[index - 1]...
{"hexsha": "290d2e43e0fd1bcc4e81f3676ee2bc376b1a2f2a", "size": 8341, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tester.py", "max_stars_repo_name": "kevprakash/R3", "max_stars_repo_head_hexsha": "1e897bc03bad0da0aa10c9c0d193d9740ed1504a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
import io import os import subprocess import sys import pytest import numpy as np from conftest import here is_py2 = sys.version_info[0] == 2 try: import nbformat jupyter_installed = True except ImportError: jupyter_installed = False ene_path = os.path.join(here, '..', 'tutorial', 'Austrian_energy_syst...
{"hexsha": "2de3d63534000dd5f07cc6cf20fdf419b55383a7", "size": 5941, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tutorials.py", "max_stars_repo_name": "JulianHunt4/message_ix", "max_stars_repo_head_hexsha": "a08c575e5bff97ed43a24a7793393d1c8889acbe", "max_stars_repo_licenses": ["Apache-2.0", "CC-B...
import pandas as pd import pickle import numpy as np import optparse import os import h5py from pathlib import Path from collections import OrderedDict from typing import Union, Tuple, Dict, Optional, List from functools import partial from sklearn.model_selection import train_test_split, StratifiedKFold, KFold from s...
{"hexsha": "f9628b43ffeb45968c0e6614ff2157bc2e4d1c44", "size": 12074, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/data_import.py", "max_stars_repo_name": "GilesStrong/HiggsML_Lumin", "max_stars_repo_head_hexsha": "d40bb756e077942f16388ad1386b0b23d48fc350", "max_stars_repo_licenses": ["Apache-2.0"], "...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "6a9bd8cfaaf9a760b5c96f73fcd73d8b5dccfef7", "size": 14733, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/tools/infer/utility.py", "max_stars_repo_name": "latot/video-subtitle-extractor", "max_stars_repo_head_hexsha": "a45b6f384a2e2b754cd7ed0252e45cbc0bf2dca4", "max_stars_repo_licenses": ["Ap...
\documentclass[12pt,letterpaper]{article} \usepackage{fullpage} \usepackage[top=2cm, bottom=4.5cm, left=2.5cm, right=2.5cm]{geometry} \usepackage{amsmath,amsthm,amsfonts,amssymb,amscd} % \usepackage{lastpage} \usepackage{enumerate} \usepackage{fancyhdr} % \usepackage{mathrsfs} \usepackage{xcolor} \usepackage{graphicx} ...
{"hexsha": "e4d6d50a00865e3c6ebd1cbbf40fd967e38f37c3", "size": 7085, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "hw7/hw7.tex", "max_stars_repo_name": "jibanCat/ISM_homework", "max_stars_repo_head_hexsha": "1cd1a1d6e24356f0f1a94a2780598fdb9620c020", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# 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": "0abd96b06d0bb93d613fd8bd373a7afafd58392b", "size": 5836, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/internal/backend/numpy/v2.py", "max_stars_repo_name": "chrism0dwk/probability", "max_stars_repo_head_hexsha": "ab260f15cae94c6802c2f2769fb448ad213b79cd", "max_stars_r...
#!/usr/bin/python3 ''' Analyses: tmhmm phobius signalp effectors merops dbcan pfam iprscan antismash ''' import os, re, sys, shutil, argparse, subprocess, itertools, random, textwrap, csv, warnings import numpy as np import pandas as pd import scipy.stats as stats import matplotlib.pyplot as plt import matplotlib.pat...
{"hexsha": "efa8ba79b398c1eecced7e3941ce020084cea284", "size": 91115, "ext": "py", "lang": "Python", "max_stars_repo_path": "FunFinder_Pangenome.py", "max_stars_repo_name": "PlantDr430/FunFinder_Pangenome", "max_stars_repo_head_hexsha": "98187b32fadd76cb61496e7e22f05d0218dd4a1c", "max_stars_repo_licenses": ["MIT"], "ma...
#include "SDBlock.h" #include <boost/endian/buffers.hpp> namespace mdf { #pragma pack(push, 1) struct SDBlockData { boost::endian::little_uint8_buf_t type; boost::endian::little_uint8_buf_t bus_type; boost::endian::little_uint8_buf_t flags; boost::endian::little_uint8_buf_t reserved[5]; }; #pragm...
{"hexsha": "fc6be0d5ce5a2ed1e834338770e1152f922b52c6", "size": 511, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Library/Source/Blocks/SDBlock.cpp", "max_stars_repo_name": "AutomotiveDevOps/mdf4-converters", "max_stars_repo_head_hexsha": "5c6624ca0a56317ce296233cb3fc80362b07a175", "max_stars_repo_licenses": ["M...
import json import numpy as np import os from time import gmtime, strftime from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from copy import deepcopy from itertools import product from __init__ import project_root from shutil import rmtree def make_base_config(): data_config = { "datas...
{"hexsha": "4d3bf06fda3c0e82656cc35f065a45b8586f4d06", "size": 26722, "ext": "py", "lang": "Python", "max_stars_repo_path": "make_configs.py", "max_stars_repo_name": "hanseungwook/tre_code", "max_stars_repo_head_hexsha": "80924d1e2c012fa77f5bd86eb8f723fdffcc9e65", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python """Script to analyze/plot data reported in the DOJO_REPORT section.""" import sys import os import glob import argparse import numpy as np from pprint import pprint from tabulate import tabulate #from pandas import DataFrame, concat from monty.os.path import find_exts from monty.functools import ...
{"hexsha": "b86f2558e4229a2f8dad080f8e31645b15bd1f54", "size": 33657, "ext": "py", "lang": "Python", "max_stars_repo_path": "pseudo_dojo/scripts/dojodata.py", "max_stars_repo_name": "fnaccarato/pseudo_dojo", "max_stars_repo_head_hexsha": "5a887c13d617b533ab3aab23af2c9466728d2f75", "max_stars_repo_licenses": ["CC-BY-4.0...
import numpy as np class Softmax: # A standard fully-connected layer with softmax activation. def __init__(self, input_len, nodes): # We divide by input_len to reduce the variance of our initial values self.weights = np.random.randn(input_len, nodes) / input_len self.biases = np.zeros(nodes) def f...
{"hexsha": "076ccabfd780fabe2a988b36759cecc5ea652dca", "size": 743, "ext": "py", "lang": "Python", "max_stars_repo_path": "softmax.py", "max_stars_repo_name": "vulture990/mini-OCR", "max_stars_repo_head_hexsha": "e558d7b4bc4a4c12759ad28ed873745404b99ae0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
"Parameters for right-hand side function of variational partitioned Runge-Kutta methods." mutable struct ParametersVPRKpInternal{DT, TT, ET <: IODE{DT,TT}, D, S} <: AbstractParametersVPRK{DT,TT,ET,D,S} equ::ET tab::TableauVPRK{TT} Δt::TT t::TT q::Vector{DT} p::Vector{DT} end function Paramete...
{"hexsha": "5cb9add8a3264adb8f46cda1e10f1172ffdb834c", "size": 9265, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/integrators/vprk/integrators_vprk_pinternal.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/GeometricIntegrators.jl-dcce2d33-59f6-5b8d-9047-0defad88ae06", "max_stars_repo_head_hexsh...
import opensim import math import numpy as np import os import random import string from itertools import chain from .osim import OsimEnv def flatten(listOfLists): "Flatten one level of nesting" return chain.from_iterable(listOfLists) class RunEnv(OsimEnv): STATE_PELVIS_X = 1 STATE_PELVIS_Y = 2 MU...
{"hexsha": "d80e5f53c632aa453570f27041cc36a17f348692", "size": 12966, "ext": "py", "lang": "Python", "max_stars_repo_path": "osim/env/run.py", "max_stars_repo_name": "agarwal-akash/osim-rl", "max_stars_repo_head_hexsha": "f831277c7c156575ef947886c6d34f40c67acfc1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from __future__ import division from bayene.bayesian_network import cussensILPBN from bayene.utils import cussens_files from bayene.ilp_model.cussens.solution_controller import convert_to_graph import matplotlib.pyplot as plt import networkx as nx import timeit with open('test_datasets/parent_3/1000/insurance_1000_...
{"hexsha": "dbbd6fcc5ad4111bfce0a4d26cddaf7329a8c38e", "size": 1597, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample_script.py", "max_stars_repo_name": "bwseoh/Bayene", "max_stars_repo_head_hexsha": "96763df02736ee2798d66d84cf99c217cd05ebbc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
import tensorrt as trt import numpy as np import os import os.path as osp from .globals import dir_path import ctypes ctypes.CDLL(osp.join(dir_path, "libamirstan_plugin.so")) def create_nms_plugin(layer_name, iou_threshold): creator = trt.get_plugin_registry().get_plugin_cre...
{"hexsha": "5f7e4758f335ec2be2c3ce7107e20ece32c575c6", "size": 643, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch2trt/plugins/create_nms_plugin.py", "max_stars_repo_name": "huliang2016/torch2trt_dynamic", "max_stars_repo_head_hexsha": "aa55f354a742d26272eae93934d0cff7cd946cbf", "max_stars_repo_licenses":...
[STATEMENT] lemma polymul_properties: assumes "SORT_CONSTRAINT('a::field_char_0)" and np: "isnpolyh p n0" and nq: "isnpolyh q n1" and m: "m \<le> min n0 n1" shows "isnpolyh (p *\<^sub>p q) (min n0 n1)" and "p *\<^sub>p q = 0\<^sub>p \<longleftrightarrow> p = 0\<^sub>p \<or> q = 0\<^sub>p" and "d...
{"llama_tokens": 336096, "file": null, "length": 174}
""" MIT License Copyright (c) 2021 Hyeonki Hong <hhk7734@gmail.com> 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, modi...
{"hexsha": "e883d69e0e1bc03be56501608311161d8b84d187", "size": 7237, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_src/yolov4/common/parser.py", "max_stars_repo_name": "zhangddac/tensorflow-yolov4", "max_stars_repo_head_hexsha": "df94d496d1e831425ce1496eb56f5865e89248cb", "max_stars_repo_licenses": ["MIT"],...
using Mimi using MimiDICE2016R2 DICE = MimiDICE2016R2.get_model() run(DICE) explore(DICE)
{"hexsha": "a98bb07440411e6a7b7079b57221f5737b915b22", "size": 92, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/main.jl", "max_stars_repo_name": "anthofflab/MimiDICE2016R2.jl", "max_stars_repo_head_hexsha": "3d48bb075455542e61622b78444d927b7557c992", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Distributed under the MIT License. # See LICENSE.txt for details. import spectre.PointwiseFunctions.AnalyticSolutions.GeneralRelativity \ as spectre_gr_solutions import spectre.PointwiseFunctions.Hydro.EquationsOfState as spectre_eos import unittest import numpy as np import numpy.testing as npt class TestTov...
{"hexsha": "1e74b2420d62648472d1bbabf6a0789bd8d334be", "size": 1787, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/Unit/PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Python/Test_Tov.py", "max_stars_repo_name": "macedo22/spectre", "max_stars_repo_head_hexsha": "97b2b7ae356cf86830258cb5f689f1191fd...
export BostonHousing """ Boston Housing Dataset. Sources: (a) Origin: This dataset was taken from the StatLib library which is maintained at Carnegie Mellon University. (b) Creator: Harrison, D. and Rubinfeld, D.L. 'Hedonic prices and the demand for clean air', J. Environ. Ec...
{"hexsha": "4441556ecfc4c91bb2b03399b24919c7c07757c3", "size": 3573, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BostonHousing/BostonHousing.jl", "max_stars_repo_name": "CTUAvastLab/MLDatasets.jl", "max_stars_repo_head_hexsha": "e517f756754a8abc42adffba295e8899c72da621", "max_stars_repo_licenses": ["MIT"]...
# Nexss PROGRAMMER 2.x - Julia # Default template for JSON Data # STDIN NexssStdin = readline(); try import JSON catch import Pkg Pkg.add("JSON") import JSON end # Modify Data parsedJson = JSON.parse(NexssStdin); # parsedJson["juliaOutput"] = "Hello from Julia! $VERSION"; parsedJson["test"] = "t...
{"hexsha": "e4050d944208baa791b5b39d04348ca3c54b7203", "size": 400, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "templates/default.jl", "max_stars_repo_name": "nexssp/language_julia", "max_stars_repo_head_hexsha": "963a1cbefdd2eb309a664a0fbded6edaa01a8db6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
__author__ = 'Federico Vaggi' from abc import ABCMeta, abstractmethod import numpy as np class MeasurementABC(object): __metaclass__ = ABCMeta @abstractmethod def __init__(self, variable_name, measurement_value, measurement_std=None): if measurement_std is None: measurement_std = np...
{"hexsha": "9c1ad56a43914a629dc18e41885d078cdaf048f2", "size": 758, "ext": "py", "lang": "Python", "max_stars_repo_path": "measurement/abstract_measurement.py", "max_stars_repo_name": "FedericoV/SysBio_Modeling", "max_stars_repo_head_hexsha": "f56c9ee3e361e88dbdb3e71f833ed3d433213309", "max_stars_repo_licenses": ["MIT"...
from numpy.testing._private.utils import HAS_LAPACK64 import traci import numpy as np import matplotlib.pyplot as plt import random import timeit import os from f_function_arrival_rate import f_function from quadratic_reward_divided import g_function # from quadratic_reward import g_function from quadratic_reward_last...
{"hexsha": "553ecedae8dd394c78e1d18a0f01c3bc44459653", "size": 33550, "ext": "py", "lang": "Python", "max_stars_repo_path": "TLCS/training_simulation.py", "max_stars_repo_name": "BridgeQZH/Deep-QLearning-Agent-for-Traffic-Signal-Control", "max_stars_repo_head_hexsha": "194924e51d816daa992faa4bd8cdbfd22dc7b3e8", "max_st...
# Copyright (c) 2017, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause """ The primary file for converting Scikit-learn models. """ from ...models import _feature_managemen...
{"hexsha": "6b1c837950249be104242cf0c0d1f1e682459608", "size": 13050, "ext": "py", "lang": "Python", "max_stars_repo_path": "coremltools/converters/sklearn/_converter_internal.py", "max_stars_repo_name": "Gerzer/coremltools", "max_stars_repo_head_hexsha": "47e2010a68668bd1960dca040f5f87c0e66a0cbd", "max_stars_repo_lice...
import numpy as np import netCDF4 as nc from scipy import interpolate from pandas import to_timedelta from datetime import datetime, timedelta from module_sw_mpas import mpas_sw_module as mpsw from mpas_namelist import namelist def read_configs(nml): nlatm = nml.nlatm mpsw.config_test_case = nlatm['sw_model...
{"hexsha": "c71fdae344e516da7c6d95b6d4b1808271b25f71", "size": 13868, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mpas_sw_driver.py", "max_stars_repo_name": "xtian15/MPAS-SW-TL-AD", "max_stars_repo_head_hexsha": "d6ac1597ac4a6c1ee3339e8384dd6bef42eccbfc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import torch from torch import nn import numpy as np import pytorch_lightning as pl from pytorch_lightning.metrics.functional import accuracy import pretrainedmodels import torchmetrics import timm class Model(pl.LightningModule): def __init__(self, model_type, num_classes, confmat, classes_weigts, learning_r...
{"hexsha": "c2f9ca34d8c818eec9e6d3039eebde3ed859c306", "size": 7026, "ext": "py", "lang": "Python", "max_stars_repo_path": "denred0_src/model.py", "max_stars_repo_name": "denred0/mediapipe", "max_stars_repo_head_hexsha": "e9f4c7b54e68ccd8ea3bca100420d21b2ae6bbe1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
using ThesisTools using Test @testset "ThesisTools.jl" begin # Write your own tests here. end
{"hexsha": "ab4176b7a383e1468d9d51bbad4cdb577deb8f2e", "size": 99, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "baggepinnen/ThesisTools.jl", "max_stars_repo_head_hexsha": "272172af1d5b60a36121a55538bb7a847a4eb229", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/* * events_EntityChangedSubscriptionParams.cpp */ #include <string> #include <ostream> #include <sstream> #include <algorithm> #include <boost/foreach.hpp> #include "events/events_EntityChangedSubscriptionParams.h" #include "dbtypes/dbtype_Id.h" #include "dbtypes/dbtype_Entity.h" #include "dbtypes/dbtype_EntityT...
{"hexsha": "f0d09dcb59cfb206e882bd0e0df72b2667ba9e85", "size": 15770, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/events/events_EntityChangedSubscriptionParams.cpp", "max_stars_repo_name": "hyena/mutgos_server", "max_stars_repo_head_hexsha": "855c154be840f70c3b878fabde23d2148ad028b3", "max_stars_repo_licen...
import os import numpy as np # import PyParSVD as base class for ParSVD_Parallel from pyparsvd.parsvd_base import ParSVD_Base # Current, parent and file paths CWD = os.getcwd() # Fix random seed for reproducibility np.random.seed(10) class ParSVD_Serial(ParSVD_Base): """ PyParSVD serial class. :param int K:...
{"hexsha": "26ac3f799e8c24745bda0cb766c700fc680e51c5", "size": 2441, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyparsvd/parsvd_serial.py", "max_stars_repo_name": "mengaldo/PyParSVD", "max_stars_repo_head_hexsha": "773e885355076375d596083ee3ab52c2779eef01", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
module PolytopesTests using Test using LinearAlgebra using Gridap.Helpers using Gridap.TensorValues using Gridap.Arrays using Gridap.Fields using Gridap.ReferenceFEs import Gridap.ReferenceFEs: Polytope import Gridap.ReferenceFEs: get_faces import Gridap.ReferenceFEs: get_dimranges import Gridap.ReferenceFEs: get_ver...
{"hexsha": "5a4b73e08a1f35434dcdc9658c26fb8719401b12", "size": 3087, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ReferenceFEsTests/PolytopesTests.jl", "max_stars_repo_name": "barche/Gridap.jl", "max_stars_repo_head_hexsha": "70325414653cf0b9822770b150fb082d1a0a5f78", "max_stars_repo_licenses": ["MIT"], "...
<h1 align="center"><b>Introducción al estudio del Método de los Elementos Finitos</b></h1> <h1 align="center"><b>Una aproximación al análisis estático lineal</b></h1> <h1 align="center"><b>Problemas 2D - Ecuación de Poisson</b></h1> <table> <tr align=left><td> <td>Text provided under a Creative Commons Attribution...
{"hexsha": "dd0f2286d67c713c3510571e7ebe957e8fbfc137", "size": 51671, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Sesion10_Problemas2D.ipynb", "max_stars_repo_name": "carlosalvarezh/FEM", "max_stars_repo_head_hexsha": "831152face6dac3abb4a5dea85f04ad0467e1816", "max_stars_repo_licenses": ["CC0-1...
import compute_descriptors_kayla import csv import sys import modeller import os import importlib import numpy as np # numerical tools from copy import deepcopy # deepcopy copies a data structure without any implicit references from timeit import default_timer as timer # tim...
{"hexsha": "74f76fa417ff2a6dd33e31e111aab020f49e620d", "size": 30214, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mixture_printAll_test.py", "max_stars_repo_name": "vanouk/Affinity-Maturation-Sequence-Level", "max_stars_repo_head_hexsha": "229cede1182dc5f17ba7ce79d41253d4cd571165", "max_stars_repo_licenses":...
#!/usr/bin/env python """ The classifier delivers predictions on whether an URL is malicious or benign. The prediction is based on the best performing machine learning model trained throughout the experimentation phase of this project. """ import argparse import csv import pickle import time import numpy as np import ...
{"hexsha": "32cb79462f86e3a5734e58908982ef7c473f6f66", "size": 1509, "ext": "py", "lang": "Python", "max_stars_repo_path": "artefact/classifier/classifier.py", "max_stars_repo_name": "abutnaru/dissertation", "max_stars_repo_head_hexsha": "a995f105dec7007fda3bcecfaae676e959f9ad25", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma module_pair_on_with_transfer[transfer_rule]: includes lifting_syntax assumes [transfer_rule]: "right_total A" "bi_unique A" "right_total C" "bi_unique C" shows "(rel_set A ===> rel_set C ===> (A ===> A ===> A) ===> (A ===> A ===> A) ===> (A ===> A) ===> A ===> ((=) ===> A ===> A) ===> ...
{"llama_tokens": 628, "file": null, "length": 2}
import numpy as np from numpy.linalg import multi_dot # discrete xkp1=fk(xk,uk,w,L) def fk(x,u,w,L): fk_out=np.array([x[2], x[3], (2*x[2]*x[3]*np.sin(x[1]) - w*np.sin(x[0]) + (u[1]*np.cos(x[0]))/L)/np.cos(x[1]), - np.cos(x[1])*np.sin(x[1])*np.square(x[...
{"hexsha": "f887b7cbbf4d37adadb560a14455901c51bc04be", "size": 3365, "ext": "py", "lang": "Python", "max_stars_repo_path": "crane_vision/src/crane_vision/ekf.py", "max_stars_repo_name": "tingelst/crane", "max_stars_repo_head_hexsha": "e14bca2bd4e2397dce09180029223832aad9b070", "max_stars_repo_licenses": ["MIT"], "max_s...
# NLP written by GAMS Convert at 04/21/18 13:55:19 # # Equation counts # Total E G L N X C B # 136 63 18 55 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
{"hexsha": "4204d5faa2f1af427fa4fcf8d20172c75006a586", "size": 23841, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/waterund22.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["MIT"], ...
#include <ctime> #include <string> #include <iostream> #include <boost/array.hpp> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> #include <boost/asio.hpp> using boost::asio::ip::tcp; using boost::asio::ip::udp; std::string make_daytime_string() { using namesp...
{"hexsha": "fe4f5251b33d925862571928cca3aea3fd3d8a84", "size": 3189, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Concurrent_programming/asio/socket/TCP_UDP/two_server.cpp", "max_stars_repo_name": "ai-chen2050/Boot_chenLearning", "max_stars_repo_head_hexsha": "4543080e2c2173a498a4836e3176524ed26ecb29", "max_sta...
[STATEMENT] lemma cat_ordinal_is_arrD[dest]: assumes "f : a \<mapsto>\<^bsub>cat_ordinal A\<^esub> b" shows "a \<in>\<^sub>\<circ> A" and "b \<in>\<^sub>\<circ> A" and "a \<le> b" and "f = [a, b]\<^sub>\<circ>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (a \<in>\<^sub>\<circ> A &&& b \<in>\<^sub>\<circ> A) &...
{"llama_tokens": 2221, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Ordinal", "length": 17}
import copy import numpy as np import paddle import pytest import scipy.sparse as sp import tensorflow as tf import torch from scipy.sparse import csr_matrix, bsr_matrix, coo_matrix, csc_matrix from scipy.spatial.distance import cdist as scipy_cdist from docarray import Document, DocumentArray @pytest.fixture() def...
{"hexsha": "86a2b0ceae63467932c531c905800fec7d52f5cc", "size": 16045, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/array/mixins/test_match.py", "max_stars_repo_name": "abduhbm/docarray", "max_stars_repo_head_hexsha": "e02246329dab3c0baed42a43167a9cc7507fead8", "max_stars_repo_licenses": ["Apache-2....
import unittest import numpy as np import tensorflow as tf import torch import fastestimator as fe from fastestimator.test.unittest_util import is_equal, one_layer_tf_model, OneLayerTorchModel def get_model_weight_tf(model): weight = [] for layer in model.layers: weight.append(layer.get_weights()) ...
{"hexsha": "17a74eeba4f14a566544cbc3716261df1f323464", "size": 1882, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/PR_test/integration_test/backend/test_save_model_load_model.py", "max_stars_repo_name": "hanskrupakar/fastestimator", "max_stars_repo_head_hexsha": "1c3fe89ad8b012991b524a6c48f328b2a80dc9f6",...
# USAGE # python detect_faces.py --image rooster.jpg --prototxt deploy.prototxt.txt --model res10_300x300_ssd_iter_140000.caffemodel # import the necessary packages import numpy as np import argparse import cv2 prototxt = './src/models/deploy.prototxt.txt' model = './src/models/res10_300x300_ssd_iter_140000.caffemod...
{"hexsha": "67f007c13bc6e5bd434570fd731a6c1c4f58a5fa", "size": 903, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/detect_face_cnn.py", "max_stars_repo_name": "giau-nm/facenet", "max_stars_repo_head_hexsha": "ab30cae623972d62cf2a9f116365331acf4abd33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\chapter{Evaluation} Experiments of the performance of our system is evaluated here. We evaluate our event detection and scene recognition system respectively. For both event and scene evaluation, we have a evaluation on self model tuning, and another evaluation for system comparison. \section{Event Detection Evalu...
{"hexsha": "93ec6025f16491cf0dd159391b4a760a8d970e4e", "size": 14401, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/evaluation.tex", "max_stars_repo_name": "findslowly/thesis", "max_stars_repo_head_hexsha": "177115f287b00d81434a13b00dd449ed9944607d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import mxnet as mx import numpy as np import io import cv2 import os import urllib import argparse from collections import namedtuple Batch = namedtuple('Batch', ['data']) class ImagenetModel: #Loads a pre-trained model locally or from an external URL #and returns an MXNet graph that is ready for prediction ...
{"hexsha": "87c8365a300d312502dc6a96ac06b207b74e1394", "size": 2616, "ext": "py", "lang": "Python", "max_stars_repo_path": "accelerators/machine_learning_inference/cfn/lambda_functions/s3_models/inference_runtime/mxnet/load_model.py", "max_stars_repo_name": "antara678/aws-iot-greengrass-accelerators", "max_stars_repo_h...
""" Tests for the polytope functionality """ import unittest from types import GeneratorType import numpy as np from hypothesis import given from hypothesis.extra.numpy import arrays from hypothesis.strategies import integers from nashpy.polytope.polytope import ( build_halfspaces, find_feasible_point, la...
{"hexsha": "7d35670bd12d5e74286f6ffe9ae9b255b334433d", "size": 6907, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_polytope.py", "max_stars_repo_name": "katiemcgoldrick/Nashpy", "max_stars_repo_head_hexsha": "352747a8970e24a1dcc27f16c68f3eedf62f28fa", "max_stars_repo_licenses": ["MIT"], "max_st...
import matplotlib.pyplot as plot import matplotlib.dates as md from matplotlib.dates import date2num import datetime # from pylab import * from numpy import polyfit import numpy as np f = open("deviations.csv") values = [] timestamps = [] for (i, line) in enumerate(f): if i >= 1: lineArray = line.split(",...
{"hexsha": "0b166977697a50b8b973f408ecd8c891246ce69d", "size": 1077, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/long term monobit test/graph_results/graph_results.py", "max_stars_repo_name": "robseward/Ziffer", "max_stars_repo_head_hexsha": "4113bf7a92fa550195c5cef76fc9f20c46f183ff", "max_stars_repo...
# Regression neural network for predicting octanol-water partition coefficient from sklearn.neural_network import MLPRegressor from sklearn.model_selection import train_test_split, GridSearchCV from sklearn import preprocessing import numpy as np import pickle from rdkit import Chem from rdkit.Chem import rdMolDescript...
{"hexsha": "5f73e03a483cb9084de0c37f1e372b4714da3dc0", "size": 1410, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/octanol_water_partition_coefficient/regression.py", "max_stars_repo_name": "Zerwer/Chemistry", "max_stars_repo_head_hexsha": "7f8f9618553bbad458b193e030e6c18e981c7d66", "max_stars_repo_lice...
from maix import nn from PIL import Image, ImageDraw from maix import camera, display import numpy as np import time model = { "param": "/models/sobel_int8.param", "bin": "/models/sobel_int8.bin" } input_size = (224, 224, 3) output_size = (222, 222, 3) camera.config(size=input_size[:2]) options = { "mode...
{"hexsha": "84c2c8d69474800ba9e043295930399c079d4123", "size": 1049, "ext": "py", "lang": "Python", "max_stars_repo_path": "ext_modules/_maix_nn/example/test_load_forward_sobel_edge.py", "max_stars_repo_name": "znstj/MaixPy3", "max_stars_repo_head_hexsha": "f672b2049b668a5a72ad249933cf9a009760799e", "max_stars_repo_lic...