text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc #import mshr from dolfin import * import sympy as sy import numpy as np import ExactSol import MatrixOperations as MO import CheckPetsc4py as CP from dolfin import __version__ import MaxwellPrecond as MP import StokesPrecond import time d...
{"hexsha": "7191a084f2395b027e0daee714615d9681b160bf", "size": 9266, "ext": "py", "lang": "Python", "max_stars_repo_path": "MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/SplitMatrix/ScottTest/Hartman2D/HartmanChannel.py", "max_stars_repo_name": "wathen/PhD", "max_stars_repo_head_hexsha": "35524f40028541a4d611d8c78574e...
function [Fao,Fso] = blockframepairaccel(Fa, Fs, Lb, varargin) %BLOCKFRAMEPAIRACCEL Precompute structures for block processing % Usage: F = blockframepairaccel(Fa,Fs,Lb); % % `[Fao,Fso]=blockframepairaccel(Fa,Fs,Lb)` works similar to % |blockframeaccel| with a pair of frames. The only difference from % calling...
{"author": "ltfat", "repo": "ltfat", "sha": "4496a06ad8dddb85cd2e007216b765dc996ef327", "save_path": "github-repos/MATLAB/ltfat-ltfat", "path": "github-repos/MATLAB/ltfat-ltfat/ltfat-4496a06ad8dddb85cd2e007216b765dc996ef327/blockproc/blockframepairaccel.m"}
[STATEMENT] lemma replicate_eq_append_conv: "(replicate n x = xs @ ys) = (\<exists>m\<le>n. xs = replicate m x \<and> ys = replicate (n-m) x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (replicate n x = xs @ ys) = (\<exists>m\<le>n. xs = replicate m x \<and> ys = replicate (n - m) x) [PROOF STEP] proof(induct...
{"llama_tokens": 4713, "file": "JinjaThreads_Basic_Auxiliary", "length": 40}
[STATEMENT] lemma (in category) cat_iso_functor_if_cf_lcomp_Hom_iso_functor: assumes "\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,-) \<...
{"llama_tokens": 5140, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Yoneda", "length": 31}
"""tools related to optimization such as more objective functions """ import torch import warnings import numpy as np from skimage import color import os.path as op import imageio from glob import glob def mse(synth_rep, ref_rep, **kwargs): r"""return the MSE between synth_rep and ref_rep For two tensors, :...
{"hexsha": "50220137c2bb794f392dbf398f2e1e91e5c3cc72", "size": 15038, "ext": "py", "lang": "Python", "max_stars_repo_path": "extra_packages/plenoptic_part/tools/optim.py", "max_stars_repo_name": "billbrod/foveated-metamers", "max_stars_repo_head_hexsha": "1b4e1c5423ba7915311cdcfe977b1c6a242bff52", "max_stars_repo_licen...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. @doc raw"""SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace IoK8sApiCoreV1SecretReference(; name=nothing,...
{"hexsha": "50a7cbef5c6361a90c0681b10926270f796a0984", "size": 2052, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ApiImpl/api/model_IoK8sApiCoreV1SecretReference.jl", "max_stars_repo_name": "memetics19/Kuber.jl", "max_stars_repo_head_hexsha": "0834cab05d2b5733cb365594000be16f54345ddb", "max_stars_repo_lice...
// Copyright (c) 2014, Sailing Lab // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions an...
{"hexsha": "bffbc3715909338928ff82d60879da2cdc4de366", "size": 20993, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/petuum_ps_common/util/stats.hpp", "max_stars_repo_name": "ForrestGan/public", "max_stars_repo_head_hexsha": "2cada36c4b523cf80f16a4f0d0fdc01166a69df1", "max_stars_repo_licenses": ["BSD-3-Clause...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import numpy as np import tvm import logging import sys, time, subprocess from tvm import autotvm import json import os def schedule(attrs): cfg, s, output = attrs.auto_config, attrs.scheduler, attrs.outputs[0] th_vals, rd_vals = [attrs.get...
{"hexsha": "4a5a7ca12c0f92dee9f6670d595266a6c2af7f47", "size": 2306, "ext": "py", "lang": "Python", "max_stars_repo_path": "platforms/c-rocm/schedule/standard/default_small.py", "max_stars_repo_name": "ghostplant/antares", "max_stars_repo_head_hexsha": "3e4d2b364f01cf326e1a427aaee866dbd31dd9ea", "max_stars_repo_license...
import numpy as np from os import path import matplotlib.pyplot as plt import sklearn from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error import torch import torch.nn as nn import torch.optim as optim from captum.attr import Laye...
{"hexsha": "863aa7a92842cc734b76b4031dfee42409f5956e", "size": 7105, "ext": "py", "lang": "Python", "max_stars_repo_path": "std/captum/16.py", "max_stars_repo_name": "quantapix/qnarre.com", "max_stars_repo_head_hexsha": "f51d5945c20ef8182c4aa11f1b407d064c190c70", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import pandas as pd import numpy as np from src.config import config if __name__ == '__main__': PATH = config.get_dir() country = config.get_country() data = pd.DataFrame(pd.read_csv(PATH+'/final/%s/master.csv' % country)) if country == 'civ': dhs = data[['Adm_1', 'Adm_2', 'Adm_3', 'Adm_4', ...
{"hexsha": "30f15d564138bcb6848dce2aea3d8b2bd003fb0a", "size": 2906, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/metrics/spatial_lag.py", "max_stars_repo_name": "ShipJ/GCRF", "max_stars_repo_head_hexsha": "3f0d9714ec6fba587dd680b4ebc2defff423bcaf", "max_stars_repo_licenses": ["FTL"], "max_stars_count": 1...
[STATEMENT] lemma child_of_parentD: "has_parent l i \<Longrightarrow> left (parent i) = i \<or> right (parent i) = i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. has_parent l i \<Longrightarrow> left (parent i) = i \<or> right (parent i) = i [PROOF STEP] unfolding parent_def left_def right_def valid_def [PR...
{"llama_tokens": 200, "file": "Refine_Imperative_HOL_IICF_Impl_Heaps_IICF_Abs_Heap", "length": 2}
''' Noise estimation. ''' import numpy as np def sigma_noise_spd_welch(y, fs, noise_range, method='expmeanlog'): ''' Estimating the noise level by a spectral power density (welch algorithm) approach. ARGUMENTS ````````` y : signal, [y] = N x T fs : sampling rate noise_range : noise ra...
{"hexsha": "15c53c2be4a5e275b85b31dfd1de8400dea40df3", "size": 1838, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuralyzer/cia/smff/noise.py", "max_stars_repo_name": "michigraber/neuralyzer", "max_stars_repo_head_hexsha": "6c9dfd2f1f918afc6904809c443bfe8e8865b2b7", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import pandas as pd from fit_super_simple import Fit import rational_model import sys par_1 = float(sys.argv[1]) par_2 = float(sys.argv[2]) in_dir = '../../modeling/' game = '0-1en01_simulation.csv' player = 1 bg_dir = '/home/pkrafft/couzin_copy/light-fields/' + game.split('_')[-2] + '/' d...
{"hexsha": "8ebe2c4a6e3cdc591d861c6c68271e09a570af22", "size": 552, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulations/old/player_model/single-super-simple-fit.py", "max_stars_repo_name": "hawkrobe/fish", "max_stars_repo_head_hexsha": "2000e46c397f7c95bba8ecb0c6afd26013929ff8", "max_stars_repo_licenses"...
''' Summary ======= Defines a penalized ML estimator for Gaussian Mixture Models, using Expectation-Maximization. Supports these API functions common to any sklearn-like GMM unsupervised learning model: * fit Resources ========= See COMP 136 CP3 assignment on course website for the complete problem description and a...
{"hexsha": "02886b6385b0d52ab1bdabf29114959ea0c42779", "size": 13194, "ext": "py", "lang": "Python", "max_stars_repo_path": "cp3/src/GMM_PenalizedMLEstimator_EM.py", "max_stars_repo_name": "tufts-ml-courses/comp136-spr-20s-assignments-", "max_stars_repo_head_hexsha": "c53cce8e376862eeef395aa0b55eca8b284a0115", "max_sta...
#!/usr/bin/env python # coding: utf-8 # In[1]: #libraries import numpy from keras.datasets import imdb from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from keras.layers.embeddings import Embedding from keras.preprocessing import sequence numpy.random.seed(7) # In[2]...
{"hexsha": "d5ee39f2f5b9cd80ebe34d0986a889a3509a52d1", "size": 1868, "ext": "py", "lang": "Python", "max_stars_repo_path": "imdb sentiment classification/IMDB Sentiment Classification.py", "max_stars_repo_name": "divyanshgarg97/IMDB-Sentiment-Classification", "max_stars_repo_head_hexsha": "3a6614cd52ff1b401aa99916d5db6...
import pytorch_lightning as pl import torch from torchmetrics import Accuracy from scheduler import WarmupCosineLR from torch.optim.lr_scheduler import StepLR import numpy as np import models def rand_bbox(size, lam): W = size[2] H = size[3] cut_rat = np.sqrt(1. - lam) cut_w = int(W * cut_rat) cut_...
{"hexsha": "d3c3483f2911453b522293c5a9a4bbd55c46b935", "size": 5739, "ext": "py", "lang": "Python", "max_stars_repo_path": "module.py", "max_stars_repo_name": "paulgavrikov/pytorch-pretrained-cnns", "max_stars_repo_head_hexsha": "f13bd151ad48bbe81d66cd3ad04465cc347c5db4", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- """17-35499-3 [Assignment-1].ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1gBZslsgZgEtGNCmcdUbZO8fNKFH393KN # **Unzip CIFAR-10-images-master.zip** """ import zipfile from google.colab import drive zip_ref = zipfile.Zi...
{"hexsha": "041971211d0baf7feed52dae44fef2f7db110699", "size": 7898, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment.py", "max_stars_repo_name": "AhsanulIslam/Manhattan_Distance-Euclidean_Distance_CIFAR-10", "max_stars_repo_head_hexsha": "d6806cfd6325ab0993e24e2489f2ee2688a288cd", "max_stars_repo_lice...
[STATEMENT] lemma fls_integral_of_nat: "fls_integral (of_nat n :: 'a::division_ring fls) = of_nat n * fls_X" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fls_integral (of_nat n) = of_nat n * fls_X [PROOF STEP] by (rule fls_integral_of_nat'[OF inverse_1])
{"llama_tokens": 124, "file": null, "length": 1}
[STATEMENT] lemma bij_fst_inv_inv_eq: "bij f \<Longrightarrow> fst (inv (%(x, u). inv f x) z) = f z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bij f \<Longrightarrow> fst (inv (\<lambda>(x, u). inv f x) z) = f z [PROOF STEP] apply (rule fst_inv_equalityI) [PROOF STATE] proof (prove) goal (2 subgoals): 1. bij f...
{"llama_tokens": 480, "file": null, "length": 5}
""" Module for core algorithms related to tracing slits/orders These should primarily be called by the TraceSlits class """ import inspect import copy from collections import Counter import numpy as np from scipy import ndimage from scipy.special import erf from scipy import signal from scipy import interpolate impo...
{"hexsha": "ed56f9031df8b029486c5d89c6da4fb70f3384b3", "size": 128919, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypeit/deprecated/trace_slits.py", "max_stars_repo_name": "ykwang1/PypeIt", "max_stars_repo_head_hexsha": "a96cff699f1284905ce7ef19d06a9027cd333c63", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import SimpleITK as sitk import numpy as np class LungSplitter: def __init__(self, split_thirds=False): self.split_thirds = split_thirds self.size_th = 0.05 self.coordinate_system = 'lps' # TODO: Chest conventions not available in Slicer. We hard coded the values for the l...
{"hexsha": "40ea8a7a2761e23b9e67243c54a577ba264f73f1", "size": 7792, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripted/CIP_/CIP/logic/lung_splitter.py", "max_stars_repo_name": "liu3xing3long/SlicerCIP", "max_stars_repo_head_hexsha": "d946c429cf0ec3fb05db77b10658393619df9b15", "max_stars_repo_licenses": ["...
import datetime import logging from pathlib import Path import cartopy.crs as ccrs import fiona import geopandas as gpd import matplotlib.image as mplimg import matplotlib.patches as mpatches import matplotlib.pyplot as plt import numpy as np import rasterio import rasterio as rio import shapely.geometry as sgeom from...
{"hexsha": "be0d9b4af32160245c770c0915e0e58bc5e9928c", "size": 17801, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plotters_lib/grafico_lst.py", "max_stars_repo_name": "OHMC/productos-satelitales", "max_stars_repo_head_hexsha": "635549bfb10e679587c4cf4831a493f232d75f5c", "max_stars_repo_licenses": ["Apach...
using GraphPlot using MetaGraphs using Plots using Compose using Colors using LightGraphs using Cairo using Fontconfig """ Splits the graph given symbol. Return a list with the group each vertex is in. Example: you split the graph by the :type property, so if it has 3 types ["a", "b", "c"] it will return a list of b...
{"hexsha": "2b801442a3ac5f614faabdacbd73b6d549ad672b", "size": 4197, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/plotting/plot.jl", "max_stars_repo_name": "valcarce01/Neo4j2Julia.jl", "max_stars_repo_head_hexsha": "15397b8dd9c08369abd5fbdbdb044ea7316dfd40", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import os import numpy as np from bert.tokenization.bert_tokenization import FullTokenizer ''' Prediction For prediction, we need to prepare the input text the same way as we did for training - tokenize, adding the special [CLS] and [SEP] token at begin and end of the token sequence, and pad to match the model input ...
{"hexsha": "48448aea757b2953f578f8d1070c3e2b35210756", "size": 1612, "ext": "py", "lang": "Python", "max_stars_repo_path": "egrader/predict.py", "max_stars_repo_name": "keemsunguk/EGrader", "max_stars_repo_head_hexsha": "8fe02099a28c5dae3e48b6c7df55eb703811f051", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
Riki Hayashi had lived in Davis from 1988 until 2010 when he moved to Virginia working in the field of his dreams Judging and writing for the DCI and Star City Games. While serving as the roadie for legendary Sacramento rock band Magnolia Thunderfinger, lead singer Skid Jones decided that Riki needed a cool nickname. R...
{"hexsha": "e20cb4c00be606b3e96517ce6fc5c5f1f9d6a4aa", "size": 6671, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Risky.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# Estimating text loss in The Old Norse fornaldarsögur This Python notebook is a derivative of the one which accompanies the following publication: > Mike Kestemont and Folgert Karsdorp, "Het Atlantis van de Middelnederlandse ridderepiek. Een schatting van het tekstverlies met methodes uit de ecodiversiteit". *Spiege...
{"hexsha": "2d90b5da312f3dcc0d75c5493993b5c345469e5e", "size": 189428, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "analysis.ipynb", "max_stars_repo_name": "ThorkellMoon/FASNL_loss", "max_stars_repo_head_hexsha": "7c31eda543f8bfe443480a3739128a9adc251d2c", "max_stars_repo_licenses": ["Apache-2.0"...
[STATEMENT] lemma msetext_dersh_irrefl_from_trans: assumes trans: "\<forall>z \<in> set xs. \<forall>y \<in> set xs. \<forall>x \<in> set xs. gt z y \<longrightarrow> gt y x \<longrightarrow> gt z x" and irrefl: "\<forall>x \<in> set xs. \<not> gt x x" shows "\<not> msetext_dersh gt xs xs" [PROOF STATE] pro...
{"llama_tokens": 4784, "file": "Lambda_Free_RPOs_Extension_Orders", "length": 38}
[STATEMENT] lemma path_verts: "path_entry (g_E G) p n \<Longrightarrow> n \<in> set (g_V G)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. path_entry (g_E G) p n \<Longrightarrow> n \<in> set (g_V G) [PROOF STEP] proof (cases "p = []") [PROOF STATE] proof (state) goal (2 subgoals): 1. \<lbrakk>path_entry (g_E G) p...
{"llama_tokens": 1548, "file": "Dominance_CHK_Cfg", "length": 17}
import datetime import os import uuid from pathlib import Path from addict import Dict as aDict import numpy as np import pandas as pd import pytest import xarray as xr from openghg.store.base import Datasource from openghg.standardise.surface import parse_crds from openghg.objectstore import get_local_bucket, get_ob...
{"hexsha": "7890ad746a1fe7349681ea539f5c946da8201888", "size": 16300, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/store/test_datasource.py", "max_stars_repo_name": "openghg/openghg", "max_stars_repo_head_hexsha": "9a05dd6fe3cee6123898b8f390cfaded08dbb408", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# !/usr/bin/python3 # -*- coding: utf-8 -*- import logging import time import numpy as np from pybpodapi.com.arcom import ArduinoTypes from pybpodapi.bpod_modules.bpod_modules import BpodModules from pybpodapi.bpod.bpod_com_protocol import BpodCOMProtocol from pybpodapi.com.protocol.send_msg_headers import SendMessag...
{"hexsha": "49e72c94efb907594c128c8fb1f2be03b39c07e0", "size": 6923, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybpodapi/bpod/bpod_com_protocol_modules.py", "max_stars_repo_name": "ckarageorgkaneen/pybpod-api", "max_stars_repo_head_hexsha": "ebccef800ae1abf3b6a643ff33166fab2096c780", "max_stars_repo_licens...
######## Stan diagnose example ########### using StanDiagnose bernoulli_model = " data { int<lower=0> N; int<lower=0,upper=1> y[N]; } parameters { real<lower=0,upper=1> theta; } model { theta ~ beta(1,1); y ~ bernoulli(theta); } " bernoulli_data = Dict("N" => 10, "y" => [0, 1, 0, 1, 0, 0, 0, 0, 0, 1]...
{"hexsha": "9a332746a36854cca23500acfccacc02e7900bf2", "size": 586, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Examples_Stan_Methods/Diagnose/bernoulli_diagnose.jl", "max_stars_repo_name": "Mechachleopteryx/Stan.jl", "max_stars_repo_head_hexsha": "a98b50009fac79d608c94fd2c91bdef9070acefc", "max_stars_repo_li...
%% Copyright (C) 2016-2022 Colin B. Macdonald %% %% This file is part of OctSymPy. %% %% OctSymPy is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published %% by the Free Software Foundation; either version 3 of the License, %% or (at your option) any l...
{"author": "cbm755", "repo": "octsympy", "sha": "c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd", "save_path": "github-repos/MATLAB/cbm755-octsympy", "path": "github-repos/MATLAB/cbm755-octsympy/octsympy-c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd/inst/@double/fresnels.m"}
import numpy as np from jbdl.rbdl.contact import calc_contact_jacobian_core from jbdl.rbdl.contact.calc_contact_jacobian import calc_contact_jacobian_extend_core import jax.numpy as jnp from jbdl.rbdl.utils import xyz2int # @partial(jit, static_argnums=(5, 6, 7, 8, 9, 10, 11, 12, 13)) def impulsive_dynamics_core( ...
{"hexsha": "4a7633b1dd021776381ff565319ddc1a45fc4bb5", "size": 2526, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/jbdl/experimental/contact/impulsive_dynamics.py", "max_stars_repo_name": "Wangxinhui-bot/jbdl", "max_stars_repo_head_hexsha": "4541fcbec9156c8a3dc496058230fdf2a3fa1bdf", "max_stars_repo_licens...
import pytest import numpy as np import os from pathlib import Path from scipy import signal import xarray as xr import filtering def velocity_series(nt, U0, f): """Construct a 1D velocity timeseries.""" t = np.arange(nt) + 1 t0 = nt // 2 + 1 # middle time index u = U0 + (U0 / 2) * np.sin(2 * np.p...
{"hexsha": "ea0199600072ac4edc2a8b2e6aafdb1acc71b213", "size": 11449, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_filtering.py", "max_stars_repo_name": "angus-g/lagrangian-filtering", "max_stars_repo_head_hexsha": "1b077af83b8c25db35e876ec3cba930833212e86", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma split_strip_while_append: fixes xs :: "'a list" obtains ys zs :: "'a list" where "strip_while P xs = ys" and "\<forall>x\<in>set zs. P x" and "xs = ys @ zs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>ys zs. \<lbrakk>strip_while P xs = ys; \<forall>x\<in>set zs. P x; xs = ys @ zs\<r...
{"llama_tokens": 1327, "file": null, "length": 11}
#ifndef STAN_MATH_PRIM_SCAL_FUN_ASINH_HPP #define STAN_MATH_PRIM_SCAL_FUN_ASINH_HPP #include <stan/math/prim/scal/fun/constants.hpp> #include <stan/math/prim/scal/fun/is_nan.hpp> #include <stan/math/prim/scal/meta/likely.hpp> #include <stan/math/prim/scal/fun/boost_policy.hpp> #include <boost/math/special_functions/as...
{"hexsha": "985bc1e28eb11dd6fe308523fa27f311c2398b73", "size": 1068, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cmdstan/stan/lib/stan_math/stan/math/prim/scal/fun/asinh.hpp", "max_stars_repo_name": "yizhang-cae/torsten", "max_stars_repo_head_hexsha": "dc82080ca032325040844cbabe81c9a2b5e046f9", "max_stars_repo...
subroutine qqb_dm_gg_Samps(p,i1,i2,i3,i4,i5,i6,msq1,msq2,msqsl) implicit none include 'dm_params.f' include 'constants.f' include 'zprods_decl.f' !----- vector amplitude for !----- q(i1)+g(i2)+g(i3)+qb(i4)+x(i5)+x(i6) double precision p(mxpart,4) !-----fills amplitude for q g...
{"hexsha": "349f701ca2e21cd90c173bac0f4c621b36ecc537", "size": 7296, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/DM/Scal_DM/qqb_dm_gg_Samps.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apac...
#Licensed under Apache 2.0 License. #© 2020 Battelle Energy Alliance, LLC #ALL RIGHTS RESERVED #. #Prepared by Battelle Energy Alliance, LLC #Under Contract No. DE-AC07-05ID14517 #With the U. S. Department of Energy #. #NOTICE: This computer software was prepared by Battelle Energy #Alliance, LLC, hereinafter the Cont...
{"hexsha": "e0a53ff6ea530318b030afacbc839f13d4619125", "size": 13080, "ext": "py", "lang": "Python", "max_stars_repo_path": "developer_tools/dymola_python_testing/ModelicaPy/buildingspy/tests/test_simulate_Simulator.py", "max_stars_repo_name": "wanghy-anl/HYBRID", "max_stars_repo_head_hexsha": "a6942b322dfe0ba98b19e687...
from app import Modeldb from app import Metricdb import pandas as pd import numpy as np import pickle import requests from sklearn import metrics from random import randint import os def output(modeltype,model1,dftrainpath,ytrainpath,dftestpath,ytestpath,db,num,alpha1=1,n_neighbors1=5,leaf_size1=30,max_depth1=50,...
{"hexsha": "661e95dc5040b9fe2263a62e772488641b90cec3", "size": 6067, "ext": "py", "lang": "Python", "max_stars_repo_path": "makemodel.py", "max_stars_repo_name": "Shubham2443/Hands_on_ML", "max_stars_repo_head_hexsha": "5b4bd6d4f4804673af8b6ea71955679685d04449", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
! <get_user_input.for - A component of the City-scale ! Chemistry Transport Model EPISODE-CityChem> !*****************************************************************************! !* !* EPISODE - An urban-scale air quality model !* ========================================== !* Copyright (C) 2018 NILU...
{"hexsha": "ca697518b664fe8d18d8518ee40e796bb2bb6321", "size": 58733, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "JPS_CITY_CHEM/citychem-1.3/preproc/mcwind/src/get_user_input.for", "max_stars_repo_name": "mdhillmancmcl/TheWorldAvatar-CMCL-Fork", "max_stars_repo_head_hexsha": "011aee78c016b76762eaf511c78fab...
/* * @copyright Copyright (c) 2017 CERN and the Allpix Squared authors. * This software is distributed under the terms of the MIT License, copied verbatim in the file "LICENSE.md". * In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an * Intergovern...
{"hexsha": "737704fccaae3101b96f1cc501a6f78d934c7916", "size": 17691, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/modules/CapacitiveTransfer/CapacitiveTransferModule.cpp", "max_stars_repo_name": "schmidtseb/allpix-squared", "max_stars_repo_head_hexsha": "f0e47c35a4db405d4d49887e4e8eaffe69176bfa", "max_star...
Take a 2-node neural network... $$N = \begin{bmatrix} d_{11} & d_{12} \\ d_{21} & d_{22} \end{bmatrix} \quad \quad \vec{n}_1 = \begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix} \quad \vec{n}_2 = \begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}$$ To find the properties of the delays and activation times for a 2-node networ...
{"hexsha": "13f9e143bf263b405a2425984ac9f97514167c2d", "size": 6594, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "neural_algebra/Neural Algebra.ipynb", "max_stars_repo_name": "mathnathan/notebooks", "max_stars_repo_head_hexsha": "63ae2f17fd8e1cd8d80fef8ee3b0d3d11d45cd28", "max_stars_repo_licenses...
/** * @file iqn_test.cpp * @author Marcus Edel * * Test file for IQN (incremental Quasi-Newton). * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see * ...
{"hexsha": "b8758af114c8f890eac524d828e812ba4d4fe8ed", "size": 2635, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mlpack/tests/iqn_test.cpp", "max_stars_repo_name": "chigur/mlpack", "max_stars_repo_head_hexsha": "aff1eda03b7c279acb6d3e660d5c5a6f697d3735", "max_stars_repo_licenses": ["BSD-3-Clause-No-Nuclear...
# coding=utf-8 # National Oceanic and Atmospheric Administration # Alaskan Fisheries Science Center # Resource Assessment and Conservation Engineering # Midwater Assessment and Conservation Engineering # THIS SOFTWARE AND ITS DOCUMENTATION ARE CONSIDERED TO BE IN THE PUBLIC DOMAIN # AND THUS ARE AVAILABLE...
{"hexsha": "074fbac6033711d5944b8df6b86fb754c8b414e6", "size": 105487, "ext": "py", "lang": "Python", "max_stars_repo_path": "ref_code/pyEcholab/EK60.py", "max_stars_repo_name": "cyrf0006/echopype", "max_stars_repo_head_hexsha": "54d385b896ef9d54f7daa1d107c6719ab1fa14c5", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# This file was generated, do not modify it. # hide controls = [ Step(1), # to increment iteration parameter (`pipe.nrounds`) NumberSinceBest(4), # main stopping criterion TimeLimit(2/3600), # never train more than 2 sec InvalidValue() # stop if NaN or ±Inf encountered ]
{"hexsha": "b53ba837500a0095d5da5da0b5c9bcee9d2d630c", "size": 312, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "__site/assets/end-to-end/telco/code/ex48.jl", "max_stars_repo_name": "alan-turing-institute/MLJTutorials", "max_stars_repo_head_hexsha": "f1613ac8968fceee0e4fe43d1fdb5b58c8a84bad", "max_stars_repo_l...
import torch import numpy as np import pickle from transformers import BertTokenizer, BertModel, BertForMaskedLM BOS_TOKEN = '[CLS]' EOS_TOKEN = '[SEP]' MASK_TOKEN = '[MASK]' class BertTok: def __init__(self, pretrained_model='bert-large-uncased'): self.tokenizer = BertTokenizer.from_pretrained(pretraine...
{"hexsha": "8a6cd772cee01981e747f19bbfa8f8972239bdfe", "size": 15029, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/BertModel.py", "max_stars_repo_name": "glicerico/wordcat_transformer", "max_stars_repo_head_hexsha": "f1b2f105c0878aeac5755003eafebd23edf49cad", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
{"hexsha": "62fe3f5b02df94b30db174cdbed67f56d74deca1", "size": 1872, "ext": "py", "lang": "Python", "max_stars_repo_path": "saccader/visual_attention/dram_test.py", "max_stars_repo_name": "deepneuralmachine/google-research", "max_stars_repo_head_hexsha": "d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231", "max_stars_repo_licen...
from datetime import datetime import matplotlib.pyplot as plt import scipy.stats as st import numpy import statistics times = [] with open("csv/Sep", "r") as f: for i,line in enumerate(f): if i != 0: parts = line.split(",") if "bigmem" in parts[-2]: elapsed_txt = ...
{"hexsha": "322d30392e1d4868f606935638ae867a5685150f", "size": 1920, "ext": "py", "lang": "Python", "max_stars_repo_path": "elapsed.py", "max_stars_repo_name": "mkualquiera/accsim-public", "max_stars_repo_head_hexsha": "0064433cdf8d4d6a67b8dde781756674ab0a42c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# -*- coding: utf-8 -*- """ Windows と Mac の両方で日本語フォントを指定して日本語メッセージを表示させる. @author: Hitoshi HABE (habe@kindai.ac.jp) """ import numpy as np import matplotlib.pyplot as pl import platform from matplotlib import font_manager # 日本語フォントの設定(はじまり) # Windows と Mac のどちらで動かしているのかを判断して日本語フォントに指定を切り替える systemname=platform.syst...
{"hexsha": "c765c5f2b58b36b680b54a3b1dc19491f9db8b9c", "size": 1168, "ext": "py", "lang": "Python", "max_stars_repo_path": "JPmessage.py", "max_stars_repo_name": "KindaiCVLAB/PythonSample", "max_stars_repo_head_hexsha": "e3b76259df8a1babd5ecb06deb815b177fc39ba0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python3 import cv2 import depthai as dai import numpy as np import argparse import time import shlex import subprocess as sp from time import monotonic from datetime import datetime, timedelta ''' Blob taken from the great PINTO zoo git clone git@github.com:PINTO0309/PINTO_model_zoo.git cd PINTO_mod...
{"hexsha": "727d25fedf717cb93e60df443c91e604082c202e", "size": 10244, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/custom-scripts/road-cracks-semantic-segmentation.py", "max_stars_repo_name": "aviogit/depthai-python", "max_stars_repo_head_hexsha": "ffeb646dff0819177b09f0dd8eb9720b154e7845", "max_star...
from __future__ import absolute_import, print_function import logging import os import numpy as np from stop_words import get_stop_words from topik.fileio import read_input from topik import tokenizers, vectorizers, models, visualizers from topik.visualizers.termite_plot import termite_html BASEDIR = os.path.abspath...
{"hexsha": "00b15e1815dff5338bdc3ae87c417212193b4dd6", "size": 3392, "ext": "py", "lang": "Python", "max_stars_repo_path": "topik/simple_run/run.py", "max_stars_repo_name": "ContinuumIO/topik", "max_stars_repo_head_hexsha": "3f943dce48fe8ca805868151c33f155a2d200a7c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
import math import random import time from typing import Tuple import numpy as np from sklearn.preprocessing import KBinsDiscretizer # USES Q LEARNING # import gym import gym env = gym.make('CartPole-v1') def policy(state: tuple): """Choosing action based on epsilon-greedy policy""" return np.argmax(Q_tabl...
{"hexsha": "e0c56486920725f7ab1c76b65d4fa1ef8a411f7d", "size": 2466, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deep Learning/FirstCartPole.py", "max_stars_repo_name": "GarrettMaury7921/OpenAI_Tutorials", "max_stars_repo_head_hexsha": "6db988c249565264c94efda65739b2e87007b87e", "max_stars_repo_licenses": ["...
# Copyright (c) 2012-2015. The Regents of the University of California (Regents) # and Richard Plevin. See the file COPYRIGHT.txt for details. import os import numpy as np from pygcam.matplotlibFix import plt import pandas as pd import seaborn as sns from six import iteritems from six.moves import xrange from pygcam....
{"hexsha": "816f3da1016afa19fb6d57b397b92edac4b96f70", "size": 45027, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygcam/mcs/analysis.py", "max_stars_repo_name": "JGCRI/pygcam", "max_stars_repo_head_hexsha": "e33042e7c9f33dfe471dc48e02965ecfb523bd83", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18...
import random import sys import numpy as np from matplotlib import pyplot as plt from matplotlib.colors import ListedColormap usage_doc = "Usage of script: script_nama <size_of_canvas:int>" choice = [0] * 100 + [1] * 10 random.shuffle(choice) def create_canvas(size): canvas = [[False for i in range(size)] for ...
{"hexsha": "ac153600763a3fcf9c79d7a96d39defdb303cc4f", "size": 2114, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellular_automata/game_of_life.py", "max_stars_repo_name": "slowy07/pythonApps", "max_stars_repo_head_hexsha": "22f9766291dbccd8185035745950c5ee4ebd6a3e", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import matplotlib.pyplot as plt import numba import time as tm import platform import os import sys cythonc = True try: import psearch_pyc except ImportError: cythonc = False # version information: from collections import namedtuple version_info = namedtuple('version_info','major minor mic...
{"hexsha": "020f3b30745c14095a71dbe2545c6932caebdc26", "size": 56730, "ext": "py", "lang": "Python", "max_stars_repo_path": "leavitt/psearch_py3.py", "max_stars_repo_name": "KyleLMatt/leavitt", "max_stars_repo_head_hexsha": "98b035b8e3b37623593e38cb82db6e945c272617", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import matplotlib.pyplot as plt import matplotlib.patches as patches from Utils import get_batch import numpy as np class CobamasVisualizer: @classmethod def plot_multi_plant_sample(cls, dataset, model, idx, v_scale=2, h_scale=3, save_path=None): converters = dataset.converter_names sensors = ...
{"hexsha": "87fcae391a9b7696de45f477be8289eef59cdba4", "size": 4021, "ext": "py", "lang": "Python", "max_stars_repo_path": "CobamasVisualizer.py", "max_stars_repo_name": "n-1-l-s/cobamas-sensor-od", "max_stars_repo_head_hexsha": "3781fdd24255b3e28ddb04d50de8395e3deaadd8", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import csv import glob import torch import numpy as np import pandas as pd from plantcelltype.graphnn.trainer import get_model from plantcelltype.utils import create_h5 from ctg_benchmark.utils.io import load_yaml from plantcelltype.utils.utils import load_paths from plantcelltype.graphnn.trainer import datasets from...
{"hexsha": "dc3f81538221358696d6bdbc4cb710cbd94d71fb", "size": 6671, "ext": "py", "lang": "Python", "max_stars_repo_path": "plantcelltype/graphnn/predict.py", "max_stars_repo_name": "hci-unihd/plant-celltype", "max_stars_repo_head_hexsha": "64e8fe2404bf224a94fbab99573365c1d1d5b3d9", "max_stars_repo_licenses": ["MIT"], ...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
{"hexsha": "a70e1f2e58dded5800f34eaf5a8cdf82a1aa4a5c", "size": 4116, "ext": "py", "lang": "Python", "max_stars_repo_path": "dimod/reference/samplers/exact_solver.py", "max_stars_repo_name": "joseppinilla/dimod", "max_stars_repo_head_hexsha": "e33ca5045e31ee2d9d58515f017fb6be5276cd8e", "max_stars_repo_licenses": ["Apach...
/* * SensorProcessorBase.cpp * * Created on: Jun 6, 2014 * Author: Péter Fankhauser, Hannes Keller * Institute: ETH Zurich, ANYbotics */ #include <elevation_mapping/sensor_processors/SensorProcessorBase.hpp> //PCL #include <pcl/io/pcd_io.h> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #inclu...
{"hexsha": "ca4b595f909f5694370a17f33163909c9fddd4d3", "size": 11960, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "elevation_mapping/elevation_mapping/src/sensor_processors/SensorProcessorBase.cpp", "max_stars_repo_name": "mcx/GEM", "max_stars_repo_head_hexsha": "e1245a59f44213edcc8c105f1e9aaa092ea97169", "max_...
import keras.engine.training import keras.callbacks import numpy as np from typing import List from typing import Tuple from typing import Optional from typing import Callable import os from datetime import datetime import json from DataIO import data_loader as dl from abc import ABC, abstractmethod from util.keras_ver...
{"hexsha": "0620fc3d19fecfecb517f97efd3d8cd89e969c7f", "size": 6730, "ext": "py", "lang": "Python", "max_stars_repo_path": "network_model/wrapper/abstract_model.py", "max_stars_repo_name": "yuga-n/ModelLearner", "max_stars_repo_head_hexsha": "3193efd5eb15172ba8231a34829942040fcb0fc5", "max_stars_repo_licenses": ["MIT"]...
# Random Signals and LTI-Systems *This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing. ## Introduction The response of a system $y[k] = \mathcal{H} \{ x[k] \}$ to a random input signal $x[k]$ is the foundation of statistical signal processing. I...
{"hexsha": "9fc1c1ab65ed565c5478553c967678b16003c728", "size": 75464, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Lectures_Advanced-DSP/random_signals_LTI_systems/introduction.ipynb", "max_stars_repo_name": "lev1khachatryan/ASDS_DSP", "max_stars_repo_head_hexsha": "9059d737f6934b81a740c79b33756f...
#include <Eigen/Dense> #include "partitionlist.hpp" using namespace Eigen; template <class uint> class AssemblyOp : public EigenBase< AssemblyOp<uint> > { private: const MatrixXd& A; const MatrixXd& B; const PartitionList<uint>& states; public: // eigen boilerplate typedef double Scalar; ...
{"hexsha": "48470bb31211f9110df72c231cdee6999a01f05e", "size": 12414, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "moment-solver/src/assemblyop.hpp", "max_stars_repo_name": "jasondark/dissertation", "max_stars_repo_head_hexsha": "3e1117ef0d14aa8d659f80df3edde1c266815856", "max_stars_repo_licenses": ["Unlicense"...
module MaybeFin import Data.Fin %default total %access public data MaybeFin : Nat -> Type where NoFin : MaybeFin Z SomeFin : Fin (S k) -> MaybeFin (S k) instance Cast (MaybeFin n) (Maybe (Fin n)) where cast NoFin = Nothing cast (SomeFin x) = Just x
{"hexsha": "2d3644182ef09b3ed7dbd3e3e5af36a08b598da4", "size": 275, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "src/MaybeFin.idr", "max_stars_repo_name": "PolyglotSymposium/void.idr", "max_stars_repo_head_hexsha": "bdea1aeea6758928d79c47cefc0ac94bb1a7de1e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
module ComradeSoss #Turn off precompilations because of GG bug https://github.com/cscherrer/Soss.jl/issues/267 __precompile__(false) using HypercubeTransform using Reexport @reexport using Soss @reexport using Comrade import Distributions const Dists = Distributions using MeasureTheory using NamedTupleTools using Nes...
{"hexsha": "603f654b9cdc7b280861b333f52a27fba3f09c42", "size": 1609, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ComradeSoss.jl", "max_stars_repo_name": "ptiede/ComradeSoss.jl", "max_stars_repo_head_hexsha": "15137764a1fc9e8cf6c9b9c3f88cb13accc18a19", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from os import listdir from os.path import isfile, join import glob from datetime import datetime from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error, r2_score from sklearn.ensemble import RandomForestRegressor from sklear...
{"hexsha": "8d200a13a58139567cfb9659cf7d4184b292430a", "size": 1167, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/model/model.py", "max_stars_repo_name": "stiag0/proyInt2inventoryAdvisor", "max_stars_repo_head_hexsha": "c7bc475890777f30a1b9f21094c479300b7386a6", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma [cong]: "syntax_nomatch x y = syntax_nomatch x y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. syntax_nomatch x y = syntax_nomatch x y [PROOF STEP] by simp
{"llama_tokens": 72, "file": "Van_Emde_Boas_Trees_Separation_Logic_Imperative_HOL_Tools_Syntax_Match", "length": 1}
\chapter{Production data}\label{appen:proddata} In this Appendix, the number of tokens with the different phonetic characteristics are listed separately for CR and NCR girls. The minimum pitch and the maximum pitch are identical for several tokens because tokens with a pitch more than two standard deviations from t...
{"hexsha": "8974f7ecc8a706b9ab696e9fe2d8d09b64c1804a", "size": 3002, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "original/chapters/appendix2.tex", "max_stars_repo_name": "langsci/Drager", "max_stars_repo_head_hexsha": "556ce56d71fd4a8d2e13ed5905f9517ddf8c5b84", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_st...
from __future__ import division, print_function import sys import os import glob import numpy as np import tensorflow as tf from tensorflow.keras.applications.vgg16 import preprocess_input from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image from flask import Flask,...
{"hexsha": "1e4d3a857a05a738ff2f59a7b27a1a1c6cae9c26", "size": 1308, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Tanx-123/BrainTumor-Detector", "max_stars_repo_head_hexsha": "dedad31784782e8656a25ae261674d55ce55971c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
from torchvision import datasets, transforms import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from argparse import ArgumentParser from tqdm import tqdm import time import numpy as np ########### # file imports / path issues import os import sys from pathlib i...
{"hexsha": "a796f163a4e93eaf6cb2bb07f5f6946ddb16f586", "size": 4459, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/attribution_calculation/kernelshap/iterate_divorce_kernelshap.py", "max_stars_repo_name": "anonymous29387491/iclr2022", "max_stars_repo_head_hexsha": "60c5727f8519e64610b632d074510587fb7ff69...
HANSARD REVISE * NUMERO 184 Le jeudi 18 fevrier 1999 REPONSE DU GOUVERNEMENT A DES PETITIONS LES COMITES DE LA CHAMBRE Defense nationale et anciens combattants M. Pat O'Brien L'expose budgetaire du ministre des Finances M. Dennis J. Mills LE DECES DU COMEDIEN YVON DUFOUR LE DECES DE KIRK MILLER LE CONSEIL POU...
{"hexsha": "8787b7b728710d6f545261234abbcace806c9c54", "size": 82110, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "data/Hansard/Training/hansard.36.1.house.debates.184.f", "max_stars_repo_name": "j1ai/Canadian_Hansards_Neural_Machine_Translation", "max_stars_repo_head_hexsha": "554666a89090fc1b1d1fb83601a2e9d...
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
{"hexsha": "dc0191ff2b160d67cb7ed2eb1495abf1641d0172", "size": 4773, "ext": "py", "lang": "Python", "max_stars_repo_path": "cirq-core/cirq/sim/act_on_args.py", "max_stars_repo_name": "stubbi/Cirq", "max_stars_repo_head_hexsha": "6d2cd16991bd7fde352010d31010f85d7eafc0ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import warnings from astropy import units as u from stdatamodels.validate import ValidationWarning from jwst.datamodels import ReferenceFileModel class WFC3GrismModel(ReferenceFileModel): """ A model for a reference file of type "specwcs" for HST IR grisms (G141 and G102). This reference file contains th...
{"hexsha": "b51e5d5027f9ff08c931be65d4d2b05e65d52fbf", "size": 3270, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrogrism/config/HST/reference_file_generators/wcs_ref_model.py", "max_stars_repo_name": "rosteen/astrogrism", "max_stars_repo_head_hexsha": "9e672c0ce80a322f2128cca4283c16a2afe6cda1", "max_stars...
import json import numpy as np with open("data/widgets/annotations/all.json") as f: all_annotations = json.load(f) samples_count = len(all_annotations["annotations"]) validation_ids = np.random.choice(samples_count, size=62, replace=False) valid_dict = all_annotations.copy() valid_dict["annotations"] = [valid_dic...
{"hexsha": "e46b6d4f213118cbb0cedafc903bc8e3f366461e", "size": 711, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/split_coco.py", "max_stars_repo_name": "ntoxeg/siamese-triplet", "max_stars_repo_head_hexsha": "e4cc6c04dd1b4596ffce6f9920862ae846e7840e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
# -*- coding: utf-8 -*- # @Time : 2020/9/7 9:41 # @Author : wlz # @Project : TextLevelGNN # @File : dataset.py # @Software: PyCharm # Dataset: https://github.com/yao8839836/text_gcn/tree/master/data import os import torch import numpy as np from utils.instance import Instance def load_data(data_path): a...
{"hexsha": "4bc542166e5e428cb3f8d588d6519a8e26c6e654", "size": 3370, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/dataset.py", "max_stars_repo_name": "LindgeW/TextLevelGNN", "max_stars_repo_head_hexsha": "e63c80a4be553c3f55c4810d736c46d7b98e7369", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} -- | -- Module : Data.Matrix.Generic.Mutable -- Copyright : Copyright (c) 2012 Aleksey Khudyakov <alexey.skladnoy@gmail.com> -- License : BSD3 -- Maintainer...
{"hexsha": "460f838bec6d5a5d721852ad9e1ab69910ecbc4d", "size": 7396, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "Data/Matrix/Generic/Mutable.hs", "max_stars_repo_name": "Shimuuar/blas-lapack", "max_stars_repo_head_hexsha": "1b1bd3d1a61c4068a295a92ca369bb807f5868fb", "max_stars_repo_licenses": ["BSD-3-Clause...
# -*- coding: utf-8 -*- """ This file contains the Kernel class. An object that returns a kernel function """ import numpy as np class Kernel(): def __init__(self, choice, param1=None, param2=None): self.kernel = set_kernel_by_choice(choice, param1, param2) self.choice = choice def get_...
{"hexsha": "3b742725371fbf704922d3962fe17cc04eab8c30", "size": 1128, "ext": "py", "lang": "Python", "max_stars_repo_path": "mySVM/kernel.py", "max_stars_repo_name": "sheeshee/mySVM", "max_stars_repo_head_hexsha": "fc52a76191cd0422278a8b53ecffa9796f2493e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Functions to deal with scatter of halo mass estimates.""" import numpy as np from scipy import interpolate from astropy.table import Table, join from . import utils __all__ = ['compare_model_dsigma', 'get_scatter_summary', 'get_chi2_curve', 'get_dsig_chi2'...
{"hexsha": "f05cb39c09ac9f827ea3f1710f1f65d6b56bd61c", "size": 7294, "ext": "py", "lang": "Python", "max_stars_repo_path": "jianbing/scatter.py", "max_stars_repo_name": "mattkwiecien/jianbing", "max_stars_repo_head_hexsha": "0fbf82c973c6761d892115281b52ad9964c731db", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" This contains Thiel analysis plots """ # TO DO: change all the data to the form dfsim.metric import px4tools import numpy as np import math import io import os import sys import errno #import thiel_analysis from bokeh.io import curdoc,output_file, show from bokeh.models.widgets import Div from bokeh.layouts im...
{"hexsha": "1634ce4759b281358769e56676743ca9a45c4a21", "size": 16613, "ext": "py", "lang": "Python", "max_stars_repo_path": "thiel_app/thiel_analysis_plots_old.py", "max_stars_repo_name": "zlite/PX4_flight_review", "max_stars_repo_head_hexsha": "66697465ac87a484af07fc310cbf9030bc15764e", "max_stars_repo_licenses": ["BS...
<p align="center"> </p> ## Data Science Basics in Python ### Bootstrap for Uncertainty Models #### Michael Pyrcz, Associate Professor, University of Texas at Austin ##### [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleSchol...
{"hexsha": "613f3453a78d38f22c80048214521324e17a2649", "size": 360715, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "PythonDataBasics_Bootstrap.ipynb", "max_stars_repo_name": "caf3676/PythonNumericalDemos", "max_stars_repo_head_hexsha": "206a3d876f79e137af88b85ba98aff171e8d8e06", "max_stars_repo_l...
"""Landlab component that generates a random fire event in time. This component generates a random fire event or fire time series from the Weibull statistical distribution. .. codeauthor:: Jordan Adams This component generates random numbers using the Weibull distribution (Weibull, 1951). No particular units must be...
{"hexsha": "e2f45fd2874076518f582a05c9fc9338633f6be3", "size": 4540, "ext": "py", "lang": "Python", "max_stars_repo_path": "landlab/components/fire_generator/generate_fire.py", "max_stars_repo_name": "SiccarPoint/landlab", "max_stars_repo_head_hexsha": "4150db083a0426b3647e31ffa80dfefb5faa5a60", "max_stars_repo_license...
/** * Copyright (c) 2017 Melown Technologies SE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the f...
{"hexsha": "28d562c91578ba6b112996fddca3582895309d98", "size": 26880, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tools/src/tools/slpk2vts.cpp", "max_stars_repo_name": "a180285/vts-tools", "max_stars_repo_head_hexsha": "114fe59b9dc46a7f1ab3204a977cf066115f018b", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma...
import random import numpy as np class EpsGreedyPolicy: def __init__(self, qtable, n_actions, epsilon=0.1): self.n_actions = n_actions self.epsilon = epsilon self.qtable = qtable def set_epsilon(self, epsilon): self.epsilon = epsilon def __call__(self, obs, return_...
{"hexsha": "bf3c7311eb8bd4e9ca4ea51cb09b6d777ae3b097", "size": 1480, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl_tabular/policy.py", "max_stars_repo_name": "michalgregor/rl_tabular", "max_stars_repo_head_hexsha": "a7c6b6141dd9e40b96a8c9079f8c18f2af039fd1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import cv2 as cv import numpy as np units = 120 img_e = units * 4 floor = cv.imread('tile_texture7.jpg') floor = cv.resize(floor, (units * 2, units * 2), interpolation=cv.INTER_CUBIC) wall = cv.imread('tile_texture9.jpg') wall_oh, wall_ow, _ = wall.shape wall_projective_mat = cv.getPerspectiveTransform( np.float3...
{"hexsha": "3a775dab3cfe15f3eaf3fde12ff39394168cdb88", "size": 906, "ext": "py", "lang": "Python", "max_stars_repo_path": "B4S1 - Computer Vision/Practice 05.py", "max_stars_repo_name": "abc1236762/UniversityHomework", "max_stars_repo_head_hexsha": "688f6fc45d610f84c0c24a6d5ab75ea70ea6a59f", "max_stars_repo_licenses": ...
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Import # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Import Standard Libraries import altair as alt import numpy as np import matplotlib.pyplot as plt import pandas as pd import streamlit as st import tensorflow as tf import time as t # Import User Libraries...
{"hexsha": "a30dfa8dac61008b1c393d44451cf013c14bf103", "size": 8179, "ext": "py", "lang": "Python", "max_stars_repo_path": "streamlit/components/imageClassifier.py", "max_stars_repo_name": "DCEN-tech/Mushroom_Py-cture_Recognition", "max_stars_repo_head_hexsha": "33a85ee401e0d812f53cab620c16466f2134a441", "max_stars_rep...
from __future__ import print_function, absolute_import import time import torch import numpy as np import torch.nn.functional as F from PIL import ImageFile from utils.meters import AverageMeter from .ranking import cmc, mean_ap from .cnn import extract_cnn_feature ImageFile.LOAD_TRUNCATED_IMAGES = True def extra...
{"hexsha": "09b22b108f8c8ec96525a7907070d98fb0506203", "size": 5267, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate/evaluators.py", "max_stars_repo_name": "YantaoShen/openBCT", "max_stars_repo_head_hexsha": "69e798c2dd6380572da7a88b68e0e9d31d9b08a4", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Deedy - One Page Two Column Resume % LaTeX Template % Version 1.1 (30/4/2014) % % Original author: % Debarghya Das (http://debarghyadas.com) % % Original repository: % https://github.com/deedydas/Deedy-Resume % % IMPORTANT: THIS TEMPLATE NEEDS TO BE COMPILED WITH XeLaTeX % % Th...
{"hexsha": "546eb18a5424bfa2a85864b75351b9e2d3472b5b", "size": 6881, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "resumeaug16.tex", "max_stars_repo_name": "annalorimer/annalorimer.github.io", "max_stars_repo_head_hexsha": "3f0bf64e53c69729c74e2c21720cb39e0bfe5212", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# Basic libraries import os import io import sys import numpy as np from os import walk from tokenizers import ByteLevelBPETokenizer # Parsing arguments import argparse parser = argparse.ArgumentParser() parser.add_argument("--labeled_data_folder", type=str, default = "labeled_data", help="Labeled data folder") parser...
{"hexsha": "d1330ca69bd44c7c55683a3db5ef87fc1a47bac8", "size": 2157, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_data_for_tokenization.py", "max_stars_repo_name": "pooki3bear/phishytics-machine-learning-for-phishing", "max_stars_repo_head_hexsha": "c6033e62638abf6ed590cfa54be8918e7050a5c9", "max_stars...
import numpy as np import cv2 import os def histEqulColor(img): ycrcb = cv2.cvtColor(img, cv2.COLOR_BGR2YCR_CB) channels = cv2.split(ycrcb) cv2.equalizeHist(channels[0], channels[0]) cv2.merge(channels, ycrcb) cv2.cvtColor(ycrcb, cv2.COLOR_YCR_CB2BGR, img) return img dir_path = os.path.dirna...
{"hexsha": "0ffae4a354aa52edb139b9dd9575b82e41c68af8", "size": 855, "ext": "py", "lang": "Python", "max_stars_repo_path": "histogram-equalization.py", "max_stars_repo_name": "11Skywalker11/dual-fisheye-video-stitching-in-Python3", "max_stars_repo_head_hexsha": "bb94db1597a643e7eda52de85e1e297888be0ccc", "max_stars_repo...
import gtfs_kit as gk import numpy as np import pandas as pd from syspy.spatial import spatial def build_stop_clusters( stops, distance_threshold=150, col='cluster_id', use_parent_station=False ): """ Apply agglomerative clustering algorithm to stops. Add a column cluster_id with the cluster id. I...
{"hexsha": "9d25fbbeeb84ead550c3c9ec9e048d96ef9ca6e7", "size": 3270, "ext": "py", "lang": "Python", "max_stars_repo_path": "quetzal/io/gtfs_reader/patterns.py", "max_stars_repo_name": "systragroup/quetzal", "max_stars_repo_head_hexsha": "bb7934bcae588cddf0f0da810d75114d1c64768f", "max_stars_repo_licenses": ["CECILL-B"]...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{"hexsha": "831559b3a72397320d4d20a463f448864f1bef39", "size": 1977, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_feather_eager.py", "max_stars_repo_name": "pshiko/io", "max_stars_repo_head_hexsha": "a1793e6b41ed7a8db572249aba15a8e513a348a5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
# # This file is part of the Actors.jl Julia package, # MIT license, part of https://github.com/JuliaActors # include("delays.jl") using Actors, Test, .Threads, .Delays import Actors: spawn, info, diag, newLink Base.:(==)(l1::Link, l2::Link) = hash(l1) == hash(l2) t1 = Ref{Task}() t2 = Ref{Task}() t3 = Ref{Task}()...
{"hexsha": "de64ad32c5ccf8f608a37a7e78d4eebe7994f65e", "size": 5649, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_errorhandling.jl", "max_stars_repo_name": "omus/Actors.jl", "max_stars_repo_head_hexsha": "3790b60580134ec3f5a83211b011b3159dee04d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
function kernel = create_kernel(kernel_type, pars, nMax, lb, ub, bound_pars) %% create convolution kernel %% inputs: % kernel_type: string, convolution kernel type. now support {'exp', % 'exp2', 'vector'} % pars: parameters for the selected kernel type % nMax: length of the kernel % lb: lower bound fo...
{"author": "zhoupc", "repo": "CNMF_E", "sha": "ccca6f9db7d1d15b7dd1266eb9b29e417f92e79f", "save_path": "github-repos/MATLAB/zhoupc-CNMF_E", "path": "github-repos/MATLAB/zhoupc-CNMF_E/CNMF_E-ccca6f9db7d1d15b7dd1266eb9b29e417f92e79f/OASIS_matlab/packages/oasis_kernel/create_kernel.m"}
from hyper_param import * from sklearn.metrics.pairwise import cosine_similarity from scipy.spatial.distance import jensenshannon from sklearn.feature_extraction.text import TfidfVectorizer from matplotlib import pyplot as plt TOP_K = 10 N_UNIQUE_QUESTIONS = 50 # Nedeed for time/memory reasons N_UNIQUE_CONT...
{"hexsha": "eb853aa748b3ae4fbdac17766cf5dbcbcebb891e", "size": 5939, "ext": "py", "lang": "Python", "max_stars_repo_path": "ir_module/src/tf_idf_ir.py", "max_stars_repo_name": "Online-Trio/projecide_squad", "max_stars_repo_head_hexsha": "58d8bcd64240d9d8d2b918564e4558ed6eee4ecd", "max_stars_repo_licenses": ["Apache-2.0...
import numpy as np import pandas as pd from skimage import io from scipy.misc import imread, imsave import os import imageio def get_masks(path_prediction): prediction = imageio.imread(path_prediction) # compute the axon mask axon_prediction = prediction > 200 # compute the myelin mask myelin_pr...
{"hexsha": "bffbf3b4ca4ca55baa08b1fea05c3e913b7929c3", "size": 1576, "ext": "py", "lang": "Python", "max_stars_repo_path": "AxonDeepSeg/visualization/get_masks.py", "max_stars_repo_name": "sagoyal2/edit_axondeepseg", "max_stars_repo_head_hexsha": "73ac9759fbe4887d87c0baa701828f9e24283b04", "max_stars_repo_licenses": ["...
#!/usr/bin/env python import shlex, subprocess import numpy as np import pandas as pd import math import os import shutil import re import sys import util import urllib from os import sys, path sys.path.insert(0, path.join(path.dirname(path.abspath(__file__)),'../')) from IPython.core.debugger import Tracer import...
{"hexsha": "0d2267ba6a145b5ee7d2038259132556c7ecaa8f", "size": 1258, "ext": "py", "lang": "Python", "max_stars_repo_path": "database/myutils.py", "max_stars_repo_name": "cozy9/Metascape", "max_stars_repo_head_hexsha": "261901657bef5e1060f1ae86a2a3913d1e4c87c4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
!Program which will exam if a x and y cord is inside or outside of a circle program read_circle implicit none real::x,y,x1,y1,h,k,r,s print*, 'Enter the value of x and y: ' read*,x,y print*, 'Enter the value of h and k: ' read*,h,k print*,'enter the value of x1,y1' read*,x1,y1 r=sqrt...
{"hexsha": "dca6f920a65d5a288b6f1053f627622d8c0d36ce", "size": 625, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "examine_the_point_x1_y1_lies_ioro_circle.f90", "max_stars_repo_name": "ArkAngeL43/tron95", "max_stars_repo_head_hexsha": "154d72613536ba35c9ef611006003c5fd529eb00", "max_stars_repo_licenses": ["M...
#include "bindings-math.h" #include "../luaapi/context.h" #include "../luaapi/types.h" #include "../luaapi/macros.h" #include "CVec.h" #include "util/angle.h" #include "util/math_func.h" #include "CodeAttributes.h" #include <cmath> #include <cstdio> #include <string> #include <iostream> using std::cerr; using std::...
{"hexsha": "dfdbad5527867cf544cb77032b362c44fce66237", "size": 4873, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/gusanos/lua/bindings-math.cpp", "max_stars_repo_name": "JiPRA/openlierox", "max_stars_repo_head_hexsha": "1d9a490cb3b214c7f6dad3a7d582b54373b5b9dc", "max_stars_repo_licenses": ["CECILL-B"], "max...
from typing import Union import numpy as np def uniform_dist(low: Union[float, int], high: Union[float, int]): """Random data generator for the uniform distribution. Args: low (Union[float, int]): The minimum value that can be generated high (Union[float, int]): The maximum value that can be g...
{"hexsha": "ea3aa00e927382c7869873b3bd12a8b43d62481d", "size": 1217, "ext": "py", "lang": "Python", "max_stars_repo_path": "implementacion/framework/generators.py", "max_stars_repo_name": "brodriguez059/TFG.Producto", "max_stars_repo_head_hexsha": "e7d2068930e574d29debdde84352af73cbbd5d59", "max_stars_repo_licenses": [...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 HTTP protocol scheme" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0...
{"hexsha": "21f5b5d8005ad76ebd8287e5eb2f7047ac699b17", "size": 13321, "ext": "r", "lang": "R", "max_stars_repo_path": "src/mezz/prot-http.r", "max_stars_repo_name": "BrianHawley/rebol", "max_stars_repo_head_hexsha": "25033f897b2bd466068d7663563cd3ff64740b94", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import numpy as np import scipy.stats as sps from simulations.toolbox import owner_position ## ## ## Simulation functions ## ## # # GMB simulation of asian option, possibility of choosing different distribution than normal # def asian_simulation_gbm_final(*,position_flag,initial_price, strike, simulations, ste...
{"hexsha": "586c59fedb81f5f20d1f64e359aceb79c5b84101", "size": 12047, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulations/simulations.py", "max_stars_repo_name": "sedlakp/exotic-options-simulations", "max_stars_repo_head_hexsha": "f50886374111b9c4afa93d2c94f746e5796f657c", "max_stars_repo_licenses": ["MI...