text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import sys sys.path.append('..') import os import glob from tqdm import tqdm import time import shutil import json import numpy as np from converter.nii_reader import Nii_Reader from converter.utils import save_as_hdf5 # Different samples are saved in different folder def nii_to_hdf5(input_path, save_path, annotatio...
{"hexsha": "c06a77801affadd6428b77e55122b87d17ba6344", "size": 1818, "ext": "py", "lang": "Python", "max_stars_repo_path": "converter/nii2npy.py", "max_stars_repo_name": "shijun18/Spine_Seg", "max_stars_repo_head_hexsha": "90c41d8ee08235c43bd3a5236da5a0ee7066fced", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\section{Program gto\char`_fasta\char`_rand\char`_extra\char`_chars} The \texttt{gto\char`_fasta\char`_rand\char`_extra\char`_chars} substitutes in the DNA sequence the outside ACGT chars by random ACGT symbols. It works both in FASTA and Multi-FASTA file formats.\\ For help type: \begin{lstlisting} ./gto_fasta_rand_ex...
{"hexsha": "47bad20f4fcd9b3e5191b270e3f7b513b3ce385f", "size": 3254, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/sections/FASTA_tools/FastaRandExtraChars.tex", "max_stars_repo_name": "olgafajarda/gto", "max_stars_repo_head_hexsha": "c0345c3f902eaab4811f5ceff6b24b569dbdd080", "max_stars_repo_licenses": [...
import scipy from py2scad import * class Capillary_Enclosure(Basic_Enclosure): def __init__(self,params): self.params = params self.add_sensor_cutout() self.add_capillary_holes() self.add_guide_tap_holes() self.add_led_tap_holes() self.add_led_cable_hole() ...
{"hexsha": "d77eab44ca521ea8a0675fccfd53eb25a8a9255e", "size": 18520, "ext": "py", "lang": "Python", "max_stars_repo_path": "capillary_enclosure.py", "max_stars_repo_name": "iorodeo/capillary_sensor_enclosure", "max_stars_repo_head_hexsha": "31eabacec098ab5600d79cbcdadc03ab42a044d1", "max_stars_repo_licenses": ["Apache...
[STATEMENT] lemma sub_inserted2:"\<lbrakk>Y \<subseteq> insert a X; \<not> Y \<subseteq> X\<rbrakk> \<Longrightarrow> Y = (Y - {a}) \<union> {a}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Y \<subseteq> insert a X; \<not> Y \<subseteq> X\<rbrakk> \<Longrightarrow> Y = Y - {a} \<union> {a} [PROOF STEP] b...
{"llama_tokens": 133, "file": "Group-Ring-Module_Algebra1", "length": 1}
#!/bin/python ''' script for compiling single CMX exposures into coadds and runnign them through redrock ''' import os import glob import h5py import fitsio import numpy as np #dir_redux = "/global/cfs/cdirs/desi/spectro/redux/daily" dir_redux = "/global/cfs/cdirs/desi/spectro/redux/andes" dir_output = "/global...
{"hexsha": "fe457c5b95a7bfdd4b5e57702aa4f31fe03c1241", "size": 7806, "ext": "py", "lang": "Python", "max_stars_repo_path": "run/cmx/cmx_exps.py", "max_stars_repo_name": "changhoonhahn/feasiBGS", "max_stars_repo_head_hexsha": "b5f535f12cf64babc9e25bcec75edd45d8668f74", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
/* hello world in r_egg */ write@syscall(4); exit@syscall(1); main@global(128) { .var0 = "hi!\n"; write(1,.var0, 4); exit(0); }
{"hexsha": "21d439f040f4fc1dcf9d21560315d4fdaf4634c4", "size": 132, "ext": "r", "lang": "R", "max_stars_repo_path": "standalone/pruntime/rizin/test/unit/legacy_unit/rz_gg/hi.r", "max_stars_repo_name": "ndkazu/guessNumber-vs-Bot", "max_stars_repo_head_hexsha": "6e756977ce849137c62edb0716df6926583da9b2", "max_stars_repo_...
""" File: pylinex/nonlinear/RankDecider.py Author: Keith Tauscher Date: 20 Apr 2018 Description: File containing a class which represents an IC-minimizer over a discrete grid defined by a set of basis vector groups. """ import numpy as np from distpy import Expression, KroneckerDeltaDistribution, Distribu...
{"hexsha": "3993f8fbf7deaaac0aa010e4415e278b016bc3c3", "size": 23147, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylinex/nonlinear/RankDecider.py", "max_stars_repo_name": "CU-NESS/pylinex", "max_stars_repo_head_hexsha": "b6f342595b6a154e129eb303782e5268088f34d5", "max_stars_repo_licenses": ["Apache-2.0"], "...
from lib.torch.constraints import apply_linear_constraint import numpy as np import torch from torch.autograd import Variable import pytest def test_apply_linear_constraint(): def lin(x): """sum(x) >= 0""" return x.sum(-1, keepdim=True) x = Variable(torch.ones(1, 10)) # test equality co...
{"hexsha": "c3ab156724ba3ad976816d935f4ef6f867d4297b", "size": 1484, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_constraints.py", "max_stars_repo_name": "nbren12/nn_atmos_param", "max_stars_repo_head_hexsha": "cb138f0b211fd5743e56ad659aec38c082d2b3ac", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma rev_slice: "n + k + LENGTH('a::len) = LENGTH('b::len) \<Longrightarrow> slice n (word_reverse (w::'b word)) = word_reverse (slice k w :: 'a word)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. n + k + LENGTH('a) = LENGTH('b) \<Longrightarrow> slice n (word_reverse w) = word_reverse (slice k ...
{"llama_tokens": 246, "file": null, "length": 2}
From Test Require Import tactic. Section FOFProblem. Variable Universe : Set. Variable UniverseElement : Universe. Variable wd_ : Universe -> Universe -> Prop. Variable col_ : Universe -> Universe -> Universe -> Prop. Variable col_swap1_1 : (forall A B C : Universe, (col_ A B C -> col_ B A C)). Variable col_swap2_...
{"author": "janicicpredrag", "repo": "Larus", "sha": "a095ca588fbb0e4a64a26d92946485bbf85e1e08", "save_path": "github-repos/coq/janicicpredrag-Larus", "path": "github-repos/coq/janicicpredrag-Larus/Larus-a095ca588fbb0e4a64a26d92946485bbf85e1e08/benchmarks/coq-problems/col-trans/col_trans_1281.v"}
import numpy as np from astropy.cosmology import FlatLambdaCDM from abc import ABC, abstractmethod class BaseCosmoBNNPrior(ABC): """Abstract base class for a cosmology-aware BNN prior """ def __init__(self, bnn_omega): self._check_cosmology_config_validity(bnn_omega) self._define_cosmology...
{"hexsha": "6d0c76f0219f399160746fc95c5ad73085530fd8", "size": 4021, "ext": "py", "lang": "Python", "max_stars_repo_path": "baobab/bnn_priors/base_cosmo_bnn_prior.py", "max_stars_repo_name": "jiwoncpark/baobab", "max_stars_repo_head_hexsha": "2a9a1b3eafbafef925bedab4b3137a3505a9b750", "max_stars_repo_licenses": ["MIT"]...
#include <string.h> #include <stdlib.h> #include <registryFunction.h> #include <aSubRecord.h> #include <menuFtype.h> #include <errlog.h> #include <epicsString.h> #include <epicsExport.h> #include "epicsTypes.h" #include <string> #include <iostream> #include <map> #include <iterator> #include <algorithm> #include "buf...
{"hexsha": "8087a066d4232000d3c699604630d48cb303f8af", "size": 2559, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Keithley2001Sup/src/buffer_parsing.cpp", "max_stars_repo_name": "ISISComputingGroup/EPICS-Keithley_2001", "max_stars_repo_head_hexsha": "5f8edf73001d6e8a4fba82683c282fa241ab34ee", "max_stars_repo_li...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os from math import ceil, floor import numpy as np from yaml import safe_load from maro.backends.frame import FrameBase, SnapshotList from maro.data_lib.cim import CimDataContainerWrapper, Order, Stop from maro.event_buffer import AtomE...
{"hexsha": "d3e9ed364f01ca9d15b3a19df892bc05cb919027", "size": 30184, "ext": "py", "lang": "Python", "max_stars_repo_path": "maro/simulator/scenarios/cim/business_engine.py", "max_stars_repo_name": "anukaal/maro", "max_stars_repo_head_hexsha": "21c88f4ef93729d51fc1a5b1a957150c51af2574", "max_stars_repo_licenses": ["MIT...
/*************************************************************************** * Copyright (C) 2008 by Mikhail Zaslavskiy * * mikhail.zaslavskiy@ensmp.fr * * * * This program is free software; you can redistribute it and/or modify * *...
{"hexsha": "e866f1779ad99a76531b02b271358ff9d3266df7", "size": 3326, "ext": "h", "lang": "C", "max_stars_repo_path": "code/clustered_setup/fgm-master/LSGMcode-master/algorithms/graphm-0.52/algorithm.h", "max_stars_repo_name": "mk2510/jointGraphMatchingAndClustering", "max_stars_repo_head_hexsha": "52f579a07d106cb241d21...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you m...
{"hexsha": "dddce8726fa95307c3d66c4b854eaf9f07afbcd2", "size": 4430, "ext": "py", "lang": "Python", "max_stars_repo_path": "kglib/kgcn/pipeline/encode.py", "max_stars_repo_name": "lolski/kglib", "max_stars_repo_head_hexsha": "2265009bc066454accb88cdaad8769b920d5df39", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import unittest import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.metrics import mean_absolute_error from sklearn.model_selection import KFold from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor from sklearn.neighbors im...
{"hexsha": "3570b65682ebb2ceada5322d64b6df226c37a769", "size": 10066, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter06/unittests/testActivity6_01.py", "max_stars_repo_name": "nijinjose/The-Supervised-Learning-Workshop", "max_stars_repo_head_hexsha": "33a2fec1e202dc1394116ed7a194bd8cabb61d49", "max_stars...
import numpy as np import random, itertools from torchio import Transform, DATA ''' Data augmentation on-the-fly For Brats data, use affine transformation. Ref: https://www.frontiersin.org/articles/10.3389/fncom.2019.00083/full Example code https://github.com/pytorch/vision/blob/master/torchvision/transforms/tr...
{"hexsha": "f69ce960c424fe660cd971000d0e288bccf0c122", "size": 3090, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/brats_transforms.py", "max_stars_repo_name": "weinajin/GloRe_brain", "max_stars_repo_head_hexsha": "ba291206504a4e754fa19811f73aee11d3734b16", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mixerNew.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtG...
{"hexsha": "80850b236c85d7c47f7800eac4f0d4e81d7b2138", "size": 15719, "ext": "py", "lang": "Python", "max_stars_repo_path": "FFT-ImageMixer/Part-A/mixer.py", "max_stars_repo_name": "Radwa-Saeed/Didital-Signal-Processing-PyQt-GUI", "max_stars_repo_head_hexsha": "8d97e2925a20dd6a74d4bc0613bfceea668f2731", "max_stars_repo...
# Imports import random import numpy as np # Snake classes class snake_obj: def __init__(self, head): self.head = head @property def length(self): length = 0 part = self.head while part: part = part.next length += 1 return length class snake...
{"hexsha": "b83bfffa1b22761232639df882f214d8b9f0b710", "size": 4668, "ext": "py", "lang": "Python", "max_stars_repo_path": "game.py", "max_stars_repo_name": "NoahBlack012/snake_game_ml", "max_stars_repo_head_hexsha": "0bc77f199e2759f9b43dd7c4bb07994dc121a521", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
// @@@LICENSE // // Copyright (c) 2009-2013 LG Electronics, 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 require...
{"hexsha": "ee4cc408f26513b43671e48e26d700fb5ff44f4b", "size": 7159, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "pop/src/commands/PopProtocolCommand.cpp", "max_stars_repo_name": "webOS-ports/mojomail", "max_stars_repo_head_hexsha": "49358ac2878e010f5c6e3bd962f047c476c11fc3", "max_stars_repo_licenses": ["Apache...
import numpy as np import sqlite3 from utils import image_ids_to_pair_id, pair_id_to_image_ids, blob_to_array, array_to_blob from database import COLMAPDatabase class MatchesList: def __init__(self, num_images, database=None): # `[[]] * N` create a list containing the same list object N times!!!...
{"hexsha": "a69e396120288ecde3d34a6fece99dbc64b68767", "size": 2656, "ext": "py", "lang": "Python", "max_stars_repo_path": "yan2017/matches_list.py", "max_stars_repo_name": "lxxue/colmap", "max_stars_repo_head_hexsha": "1e2cbf61160205fd53d9fe7a1a8df359b870cae3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
import numpy as np import numba as nb import mcmc.util as util import mcmc.util_2D as u2 spec = [ ('basis_number', nb.int64), ('extended_basis_number', nb.int64), ('t_end', nb.float64), ('t_start', nb.float64), ('dt', nb.float64), ('t'...
{"hexsha": "537a0e2b8d51e529fdf130c54fcc352a41f65c70", "size": 7043, "ext": "py", "lang": "Python", "max_stars_repo_path": "Legacy/mcmc/fourier.py", "max_stars_repo_name": "puat133/MCMC-MultiSPDE", "max_stars_repo_head_hexsha": "2beca39f32c0cdd7664baeacd495b193850d8e7d", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.decomposition import PCA data = pd.read_csv('201213177_data.csv', engine='python') # Remove the column named 'department' because it's not part of data analysis. data_var = data.drop(['municipio'], a...
{"hexsha": "31e060dadfbdbddaaae0cad157687dab55fa4bb4", "size": 2191, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/201213177.py", "max_stars_repo_name": "luisferliza/CoronavirusML", "max_stars_repo_head_hexsha": "5298b6f000ee5597de55f850a963fa15004b44d6", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
from scipy.stats import norm import numpy as np alpha = 0.05 z = norm().ppf( 1 - alpha / 2) p = 0.85 N = 100 Cn = (p - z * np.sqrt(p * (1 - p) / N), p + z * np.sqrt(p * (1 - p) / N)) _ = ["%0.4f" % x for x in Cn] print(_) # bootstrap X = np.zeros(N) X[:85] = 1 B = [] for _ in range(500): s = np.random.randint(...
{"hexsha": "a2e443cf2d8523d2e7f91a6b51c3a7436d3beda7", "size": 6305, "ext": "py", "lang": "Python", "max_stars_repo_path": "codigo/comparacion.py", "max_stars_repo_name": "INGEOTEC/AprendizajeComputacional", "max_stars_repo_head_hexsha": "96d2bab8911313d2655cfc05965393c01c4efac9", "max_stars_repo_licenses": ["Apache-2....
/** * @file stabrk3.cc * @brief NPDE homework StabRK3 code * @author Unknown, Oliver Rietmann, Philippe Peter * @date 13.04.2021 * @copyright Developed at ETH Zurich */ #include "stabrk3.h" #include <Eigen/Core> #include <cmath> #include <iomanip> #include <iostream> #include <vector> namespace StabRK3 { /* S...
{"hexsha": "df2df6fa1b8461e2346812fec719a43e30e4c25d", "size": 2525, "ext": "cc", "lang": "C++", "max_stars_repo_path": "developers/StabRK3/mastersolution/stabrk3.cc", "max_stars_repo_name": "yiluchen1066/NPDECODES", "max_stars_repo_head_hexsha": "f7b1d96555bace59aba2b65f3ef1e95fa7a9017c", "max_stars_repo_licenses": ["...
/* * Copyright (c) 2013-2014, Filippo Basso <bassofil@dei.unipd.it> * * 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 copyr...
{"hexsha": "06c1022e9387971e64673729580dc8e17f909e61", "size": 5724, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "calibration_pcl/include/impl/calibration_pcl/utilities/point_plane_extraction.hpp", "max_stars_repo_name": "pionex/calibration_toolkit", "max_stars_repo_head_hexsha": "ef9a6f7c6e83ac8c1a052f6f4f4887...
# Density Fitting Density fitting is an extremely useful tool to reduce the computational scaling of many quantum chemical methods. Density fitting works by approximating the four-index electron repulsion integral (ERI) tensors from Hartree-Fock theory, $g_{\mu\nu\lambda\sigma} = (\mu\nu|\lambda\sigma)$, by $$(\mu...
{"hexsha": "2ab4ddbd66c0090b79cec1d5dd8ba8a25d801103", "size": 16973, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Example/Psi4Numpy/03-HatreeFock/density-fitting.ipynb", "max_stars_repo_name": "yychuang/109-2-compchem-lite", "max_stars_repo_head_hexsha": "cbf17e542f9447e89fb48de1b28759419ffff956...
[STATEMENT] lemma suminf_eq_zero_iff: assumes "summable f" and pos: "\<And>n. 0 \<le> f n" shows "suminf f = 0 \<longleftrightarrow> (\<forall>n. f n = 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (suminf f = (0::'a)) = (\<forall>n. f n = (0::'a)) [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 sub...
{"llama_tokens": 1282, "file": null, "length": 13}
module PrivateMultiplicativeWeights using Distributions: Laplace, wsample using Printf, Hadamard, LinearAlgebra, Random, IterTools, Statistics, Distributed, export mwem, MWParameters, Tabular, Histogram, HistogramQueries, SeriesRangeQueries, RangeQueries, ...
{"hexsha": "1ffd4d572ceb94a14c4fea3de62809d707d77020", "size": 1091, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PrivateMultiplicativeWeights.jl", "max_stars_repo_name": "giladroyz/MWEM-project", "max_stars_repo_head_hexsha": "e587b6bae85a2bf47b09e33e12dfac0adfa7e2ca", "max_stars_repo_licenses": ["MIT"], ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[b5paper, 11pt, openany, titlepage]{book} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[pdftex]{graphicx,color} %\usepackage[T1,plmath]{polski} \usepackage[cp1250]{inputenc} \usepackage{indentfirst} \usepackage[numbers,sort&com...
{"hexsha": "7826d4cb98c69cb86136cada4863cdb085b9adb2", "size": 6577, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "reports/monograph/Ijjeh/ChapterTwo/monograph_template.tex", "max_stars_repo_name": "IFFM-PAS-MISD/aidd", "max_stars_repo_head_hexsha": "9fb0ad6d5e6d94531c34778a66127e5913a3830c", "max_stars_repo_lic...
import sys import os import cv2 import numpy as np from matplotlib import pyplot as plt from fhi_lib.geometry import Point class ImgCoord(): def __init__(self, info): self.mask = info[0].astype(np.uint8) self.roi = info[1] self.class_id= info[2] def draw_point_of_interest(self, img): img = cv2.circle(img,...
{"hexsha": "d68ccc40d7708621f78ee425dd8f36dad1145387", "size": 2565, "ext": "py", "lang": "Python", "max_stars_repo_path": "fhi_lib/img_coordinate.py", "max_stars_repo_name": "yhsueh/FHI_RCNN", "max_stars_repo_head_hexsha": "f12df17049d5c72d1a7cec89e3943013150177a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import pandas as pd import matplotlib.pyplot as plt COLORS = {'train': 'b', 'test': 'r'} def plot_validation_curve(train_scores, test_scores, train_sizes, expected_score=None, ax=None, stat_error=True): ax = _plot_generic_curve( train_scores=train_scores, test_scores=test_scor...
{"hexsha": "a4fabe54657fe1ca9150e2b004d354311f08fae8", "size": 3019, "ext": "py", "lang": "Python", "max_stars_repo_path": "SmallSampleClassification/my_lib/plotting.py", "max_stars_repo_name": "RaulRPrado/LearningDataScience", "max_stars_repo_head_hexsha": "0a7d6cfffadd7cdd657be0609b7f088a19f9deb5", "max_stars_repo_li...
# Copyright (c) 2021 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 app...
{"hexsha": "66f7b2ff23d1bef698e7da165ea39509a7262d1a", "size": 11435, "ext": "py", "lang": "Python", "max_stars_repo_path": "pahelix/model_zoo/light_gem_model.py", "max_stars_repo_name": "agave233/PaddleHelix", "max_stars_repo_head_hexsha": "e5578f72c2a203a27d9df7da111f1ced826c1429", "max_stars_repo_licenses": ["Apache...
import torch import tensorflow as tf import os import numpy as np import cv2 class EpisodeScalerSummary(object): """docstring for EpisodeScalerSummary.""" def __init__(self): self.episode_scalers = {} self.final_scalers = {} self.reset() def at_step(self, step_scalers={}): ...
{"hexsha": "2cf5c6e0373b1c2db8ac4b97b707450568aee7ae", "size": 3194, "ext": "py", "lang": "Python", "max_stars_repo_path": "assets/logger.py", "max_stars_repo_name": "YuhangSong/Arena-Baselines-Depreciated", "max_stars_repo_head_hexsha": "78c33994e67aede7565dda3f68f5cebe0d5ee6e6", "max_stars_repo_licenses": ["Apache-2....
from functools import cmp_to_key import numpy as np from matplotlib.ticker import FuncFormatter from scipy import signal from pydynamo_brain.files import TraceCache from pydynamo_brain.ui.baseMatplotlibCanvas import BaseMatplotlibCanvas from pydynamo_brain.ui.common import createAndShowInfo import pydynamo_brain.uti...
{"hexsha": "6dced6e6fe4966bade06b8a0be01dd040e71e2b8", "size": 3792, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydynamo_brain/pydynamo_brain/ui/traces/allTracesCanvas.py", "max_stars_repo_name": "ubcbraincircuits/pyDynamo", "max_stars_repo_head_hexsha": "006eb6edb5e54670574dbfdf7d249e9037f01ffc", "max_star...
# Copyright 2021 Huawei Technologies Co., Ltd.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 ap...
{"hexsha": "2b7e6badc80aeb6871af3228e2c624f47a4a53ff", "size": 6808, "ext": "py", "lang": "Python", "max_stars_repo_path": "ecosystem_tools/mindconverter/mindconverter/graph_based_converter/mapper/onnx/ops/select_mapper.py", "max_stars_repo_name": "mindspore-ai/mindinsight", "max_stars_repo_head_hexsha": "8c57fdd62eb7f...
#!/usr/bin/env python from __future__ import print_function import argparse import glob import numpy as np from cycler import cycler import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('runprefixes', type=str, nargs='+', help='Prefixes of the ordinate and time txt...
{"hexsha": "090e2bbb3b133a859e76c101e9469fa83f295552", "size": 2616, "ext": "py", "lang": "Python", "max_stars_repo_path": "unit_test/burn_cell/burn_cell_compare_ordinate.py", "max_stars_repo_name": "doreenfan/Microphysics", "max_stars_repo_head_hexsha": "bbfabaae0a98af32dbf353a7747a8ca787710ac6", "max_stars_repo_licen...
import os import time import playsound import speech_recognition as sr from gtts import gTTS import cv2 import numpy as np import webbrowser print("How can i help you") def speak(text): tts=gTTS(text=text,lang="en") filename="voice.mp3" tts.save(filename) playsound.playsound(filename) ...
{"hexsha": "d517b1a9bff0631f01bdd8fa4e1668440a88fd38", "size": 1049, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine Learning Projects/Speech To Text/code5.py", "max_stars_repo_name": "anshu1905/IoT-and-ML", "max_stars_repo_head_hexsha": "78e8fdb83201564867ac4f07beb922265f516237", "max_stars_repo_license...
import pandas as pd import numpy as np import pickle from sklearn.multioutput import MultiOutputClassifier, ClassifierChain from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split import os def load_data(difficulty): """Loads DataFrames saved in pickle files based o...
{"hexsha": "d8a03e56d77e1446b5a82247499abfd5a9aa061b", "size": 2672, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/RFClassifier.py", "max_stars_repo_name": "wvsharber/BeatMapSynthesizer", "max_stars_repo_head_hexsha": "9497ad8dcb0567eaab6b5102121c982dd0e74d54", "max_stars_repo_licenses": ["MIT"], "max_star...
# an example of a greta function # pull out the necessary internal functions from greta op <- .internals$nodes$constructors$op #' @importFrom stats var median quantile #' @import greta #' #' @title compute the Bayesian R square for a greta regression model #' @export #' #' @description Compute a Bayesian version o...
{"hexsha": "74bc225949f5e9ec8c73ab5232d15756e4290c02", "size": 2835, "ext": "r", "lang": "R", "max_stars_repo_path": "R/bayes_R2.r", "max_stars_repo_name": "lionel68/greta.checks", "max_stars_repo_head_hexsha": "bb5cb6b4fca11a79367f1370409a5d17d4a0ccac", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": 1, "ma...
# https://en.wikipedia.org/wiki/Tak_(function) module BenchTarai using BenchmarkTools module SeqTarai tarai(x, y, z) = if y < x tarai(tarai(x - 1, y, z), tarai(y - 1, z, x), tarai(z - 1, x, y)) else y end end # module SeqTarai module BaseTarai tarai(x, y, z) = if y < x a =...
{"hexsha": "a00a3bc9c0ddcee995834ebda34127fe7db72abd", "size": 1775, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/TapirSchedulersBenchmarks/src/bench_tarai.jl", "max_stars_repo_name": "cesmix-mit/TapirSchedulers.jl", "max_stars_repo_head_hexsha": "fd80ca0e78bfacacf6b337cae5f586f45994d945", "max_stars...
import sys import copy import math import numpy as np """This file contains various gradient optimisers""" # class for simple gradient descent class SimpleGradientDescent: def __init__(self, eta, layers, weight_decay=0.0): # learning rate self.eta = eta # number of layers self.lay...
{"hexsha": "566ff10ef3ddd4840a59ddade7269e5cb7c43026", "size": 16268, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment1/optimiser.py", "max_stars_repo_name": "utsavdey/Fundamentals_Of_Deep_Learning_Assignments", "max_stars_repo_head_hexsha": "c1b2fc49e929ab09760f083aa8b052845afad48f", "max_stars_repo_l...
using DirectDependents using Test @testset "DirectDependents.jl" begin @test !isempty(direct_dependents("RecipesBase")) end
{"hexsha": "46a16d337638b45283e00bfc2fd7f2101f519c95", "size": 129, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "daschw/DirectDependents.jl", "max_stars_repo_head_hexsha": "67b730f852488aedb3544cb461275ece8507ccb8", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
export PermutationLayer import Base: eltype @doc raw""" The permutation layer specifies an invertible mapping ``{\bf{y}} = g({\bf{x}}) = P{\bf{x}}`` where ``P`` is a permutation matrix. """ struct PermutationLayer{ T } <: AbstractLayer dim :: Int P :: PermutationMatrix{T} end function PermutationLayer(dim:...
{"hexsha": "90c79acafbec2feea5f8dd231278bb41dc945b37", "size": 6094, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/nodes/flow/layers/permutation_layer.jl", "max_stars_repo_name": "HoangMHNguyen/ReactiveMP.jl", "max_stars_repo_head_hexsha": "f3e848ab171e0786e3d8eb6a0843dbf6dacc7415", "max_stars_repo_licenses...
# coding=utf-8 # Copyright 2022 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": "634b0fccab27c3552b1794373b64b0eabd3f0b1b", "size": 17621, "ext": "py", "lang": "Python", "max_stars_repo_path": "rrlfd/residual/train.py", "max_stars_repo_name": "shaun95/google-research", "max_stars_repo_head_hexsha": "d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# -*- coding: utf-8 -*- """ Created on Wed Jan 24 2018 @author: Fei Yan """ import numpy as np from scipy.linalg import eig from qutip import * import logging log = logging.getLogger('LabberDriver') # import scipy.constants as const # #Constants. # h = const.h #planck constant # h_bar = const.hbar #h_bar # e = cons...
{"hexsha": "0f1e97534f28b86287ed219219c037154981ae7f", "size": 9426, "ext": "py", "lang": "Python", "max_stars_repo_path": "QSolver/QSolver_ForDriver.py", "max_stars_repo_name": "roniwinik/Drivers", "max_stars_repo_head_hexsha": "ba473bc21d1b5321da1e6caadec5b4d624282edc", "max_stars_repo_licenses": ["MIT"], "max_stars_...
\clearpage \subsection{C Parameter Declaration (with Arrays)} % (fold) \label{sub:c_parameter_declaration_with_arrays_} \csyntax{csynt:type-decl-parameter-decl}{Parameter Declarations (with Arrays)}{type-decl/parameter-decl-with-types} % subsection c_parameter_declaration_with_arrays_ (end)
{"hexsha": "6e70c1c82ede0c8756a786106c3f19b35a4d29ab", "size": 293, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "topics/type-decl/pascal/pas-parameter-decl-with-types.tex", "max_stars_repo_name": "thoth-tech/programming-arcana", "max_stars_repo_head_hexsha": "bb5c0d45355bf710eff01947e67b666122901b07", "max_star...
%%Ex. 8 Extracting an individual element of an array a = [3 6 7]; b = [1 9 4 5]; c = a(2) + b(4) %Output: c = 11
{"author": "TheAlgorithms", "repo": "MATLAB-Octave", "sha": "e150b77ad256de46c1ce3815c3d7945ac4fc28dc", "save_path": "github-repos/MATLAB/TheAlgorithms-MATLAB-Octave", "path": "github-repos/MATLAB/TheAlgorithms-MATLAB-Octave/MATLAB-Octave-e150b77ad256de46c1ce3815c3d7945ac4fc28dc/matlab_for_beginners/part_1(learn_basic_...
# Using Android IP Webcam video .jpg stream (tested) in Python2 OpenCV3 import urllib import cv2 import numpy as np import time import subprocess import urllib import cam_find import socket import bluetooth # Replace the URL with your own IPwebcam shot.jpg IP:port url='http://192.168.43.1:8080/shot.jpg' ...
{"hexsha": "5e5d9fc4f65093a894acd291aad83ef0e23730b9", "size": 2038, "ext": "py", "lang": "Python", "max_stars_repo_path": "programs-pi/rd.py", "max_stars_repo_name": "AshwinRaikar88/rhok", "max_stars_repo_head_hexsha": "5be70c78605e81e1af191a006460fa48e849c62b", "max_stars_repo_licenses": ["Unlicense"], "max_stars_cou...
"""Routines and classes related to RPyC package""" from . import module as module_utils, net, py3, strpack import numpy as np import importlib rpyc=importlib.import_module("rpyc") # Python 2 compatibility (importing module from a module with the same name) import pickle import warnings import socket _default_packe...
{"hexsha": "62706294c183137aa3216da43365aed110ce0467", "size": 8140, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylablib/core/utils/rpyc.py", "max_stars_repo_name": "AlexShkarin/pyLabLib-v0", "max_stars_repo_head_hexsha": "1c3c59d4bcbea4a16eee916033972ee13a7d1af6", "max_stars_repo_licenses": ["MIT"], "max_s...
# %% import warnings from functools import partial from itertools import product import numpy as np import pandas as pd from graspologic.utils import symmetrize from hyppo.ksample import KSample from joblib import Parallel, delayed from scipy.stats import ks_2samp, mannwhitneyu, ttest_ind from tqdm import tqdm from s...
{"hexsha": "022b923393737a486b3b0c5d2751f2cce924981c", "size": 3930, "ext": "py", "lang": "Python", "max_stars_repo_path": "supplement/S1-edge-simulation/edge_simulation_changing_means.py", "max_stars_repo_name": "neurodata/MCC", "max_stars_repo_head_hexsha": "42c6b5fab09edf10bce2143c2366199531b2626b", "max_stars_repo_...
using MarketData facts("Data quality checks") do cl_incomplete = TimeArray(cl.timestamp[1:5], [cl.values[1:4]; NaN], cl.colnames) context("Determine uniformity of observations") do @fact cl[1:5] --> is_equally_spaced @fact cl[1:10] --> not(is_eq...
{"hexsha": "2cc38c6f0c370901a36d28bb174fb79322d4eaad", "size": 1143, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/data_quality.jl", "max_stars_repo_name": "GordStephen/TimeSeriesTools.jl", "max_stars_repo_head_hexsha": "3b10959392a723e570b99ce4053134781a4d3556", "max_stars_repo_licenses": ["MIT"], "max_st...
// Copyright 2018-2019 Henry Schreiner and Hans Dembinski // // Distributed under the 3-Clause BSD License. See accompanying // file LICENSE or https://github.com/scikit-hep/boost-histogram for details. #include <bh_python/pybind11.hpp> #include <bh_python/axis.hpp> #include <bh_python/kwargs.hpp> #include <bh_pytho...
{"hexsha": "3268708741b771890a960d1686e07ac210ff10ee", "size": 3274, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/register_axis.cpp", "max_stars_repo_name": "andrzejnovak/boost-histogram", "max_stars_repo_head_hexsha": "cdbfabb1c22f5545bf3900be01f2025411e699f1", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
#pdm.py # #Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. #The Universal Permissive License (UPL), Version 1.0 # #by Joe Hahn, joe.hahn@oracle.come, 11 September 2018 #this executes the pdm demo #get commandline argument try: import sys inputs_path = sys.argv[1] except: inputs_path...
{"hexsha": "826e91a9d867446b45a60317a4f82496e748fac3", "size": 5115, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdm.py", "max_stars_repo_name": "JosephSe/predictive-maintenance-sim", "max_stars_repo_head_hexsha": "49c28f75b30fe7c7668f94388fc48acf247e5f4e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
#!/usr/bin/python3 # number of output figures = 129 import multiprocessing import matplotlib.patches import numpy as np import helper.basis from helper.figure import Figure import helper.plot def drawImage(imageNumber): fig = Figure.create(figsize=(5, 5 * aspect), scale=0.5) ax = fig.gca() xUnits = imageNu...
{"hexsha": "42039adad89ca0335f4ab29072579b31da888a1f", "size": 2556, "ext": "py", "lang": "Python", "max_stars_repo_path": "gfx/py/flipBookBSpline.py", "max_stars_repo_name": "valentjn/thesis", "max_stars_repo_head_hexsha": "65a0eb7d5f7488aac93882959e81ac6b115a9ea8", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_c...
! RUN: %S/test_errors.sh %s %t %flang_fc1 ! REQUIRES: shell ! Error tests for recursive use of derived types. ! C744 If neither the POINTER nor the ALLOCATABLE attribute is specified, the ! declaration-type-spec in the component-def-stmt shall specify an intrinsic ! type or a previously defined derived type. program m...
{"hexsha": "34c4d815cbcdff1bf8942e9c8074744a04d967da", "size": 2192, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Semantics/resolve44.f90", "max_stars_repo_name": "acidburn0zzz/llvm-project", "max_stars_repo_head_hexsha": "7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9", "max_stars_repo_licenses": ["Ap...
#!/usr/bin/env python """ Calculates numbers for use in writeup. """ from collections import defaultdict, Counter import csv import json from math import log import os import pathlib import random import sys import matplotlib.pyplot as plt import requests from scipy import stats from statsmodels.stats.proportion impo...
{"hexsha": "193ad37d15be8b8e5e40694cffa0c7cb9869e5e3", "size": 3139, "ext": "py", "lang": "Python", "max_stars_repo_path": "elo/calculations.py", "max_stars_repo_name": "porcpine1967/aoe2_comparisons", "max_stars_repo_head_hexsha": "7c5e5e5223127325269b558d59ea4bdb5949345e", "max_stars_repo_licenses": ["CC0-1.0"], "max...
import os.path as osp import os import numpy as np import json def get_index_by_label(used_labels, label): return list(used_labels.keys())[list(used_labels.values()).index(label)] def cache_label_name(labels_dict, label_name): cached_keys = sorted(list(labels_dict.keys())) if len(cached_keys) == 0: ...
{"hexsha": "154818c7049c0865d87a5ec8135c5b1e5ab3a4b1", "size": 2883, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gen_labels.py", "max_stars_repo_name": "supervisely-ecosystem/FairMOT", "max_stars_repo_head_hexsha": "493aa8b626e0eac1a71d27af8eefb680210b8a11", "max_stars_repo_licenses": ["MIT"], "max_stars...
export opt_linear_fit! """ opt_linear_fit!( graph, objfun, discr, linear_cref; input = :A, errtype = :abserr, linlsqr = :backslash, droptol = 0, ) Linear fitting of a `graph` of the form c_1 g_1(x) + c_2 g_2(x) + … + c_n g_n(x) to the value...
{"hexsha": "c2e836f88842f92ac841388ed6998eafb4e317e5", "size": 1398, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/optimization/linear_fit.jl", "max_stars_repo_name": "matrixfunctions/GraphMatFun.jl", "max_stars_repo_head_hexsha": "1fac14aa849e7f050ae5281bf6414b4356807199", "max_stars_repo_licenses": ["MIT"...
# Truncated and folded distributions This tutorial will cover how to work with truncated and folded distributions in NumPyro. It is assumed that you're already familiar with the basics of NumPyro. To get the most out of this tutorial you'll need some background in probability. ### Table of contents * [0. Setup](#0)...
{"hexsha": "27cc248fb1a13d61d8c9cb619f6ee8619447d493", "size": 162336, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/source/truncated_distributions.ipynb", "max_stars_repo_name": "karm-patel/numpyro", "max_stars_repo_head_hexsha": "34e0cdf4fa0ab9a0300a0d894d6758419fb46f40", "max_stars_re...
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import sys import networkx as nx import numpy as np reload(sys) sys.setdefaultencoding('utf8') path4 = '/Users/amy/Desktop/rls_14/0729/' nodes = np.loadtxt(path4 + 'rls14_nodes0729.csv', skiprows=1, delimiter=",", dtype=str) edges = np.loadt...
{"hexsha": "8391cd40867b9bffd1340c7e466f61795a1a7db6", "size": 910, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/form_gexf_data.py", "max_stars_repo_name": "yuxia-zhang/company_collaboration_in_OSS", "max_stars_repo_head_hexsha": "2106d45df75d89873c0364eb70fded8541c157b6", "max_stars_repo_licenses": ["Ap...
# single coil reconstruction class import numpy as np import tensorflow as tf import dnnlib import dnnlib.tflib as tflib from training import misc class Reconstructor: def __init__(self): # inference settings self.num_steps = 1000 # number of optimization / infer...
{"hexsha": "e57e046a70235128910704cebf19fb722e4b4469", "size": 11465, "ext": "py", "lang": "Python", "max_stars_repo_path": "reconstruction_single_coil.py", "max_stars_repo_name": "icon-lab/SLATER", "max_stars_repo_head_hexsha": "4ec15a16f9cc204150c2cc48c4c3e60de2b7cbfb", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import time from pathlib import Path from collections import deque from typing import Optional import numpy as np from lib.opengl.core.base import * from lib.opengl import * from lib.opengl.postproc import PostProcNode from lib.gen.automaton import ClassicAutomaton ASSET_PATH = Path(__file__).resolve().parent.parent...
{"hexsha": "196dfe73051a92968f5d3394c4ee2d5dacc655cd", "size": 8105, "ext": "py", "lang": "Python", "max_stars_repo_path": "sketches/graphs/tiled.py", "max_stars_repo_name": "defgsus/thegame", "max_stars_repo_head_hexsha": "38a627d9108f1418b94b08831fd640dd87fbba83", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from numpy.random import uniform, seed from sys import argv, stdout, stderr # Process arguments if len(argv) < 3: stderr.write("Usage: {} Q_LOW Q_HIGH [SEED_FILE]\n" "Sample from a uniform distribution with " "lower bound Q_LOW and upper bound Q_HIGH\n" "If given SEED_FILE, read...
{"hexsha": "5595ac75a65cf3fda17be80a3ecd79206f599ce3", "size": 1022, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/seed/stateful-prior-sampler.py", "max_stars_repo_name": "ThomasPak/pakman", "max_stars_repo_head_hexsha": "8d74f3b7162d04a1c72fbda9517ed19063f1a246", "max_stars_repo_licenses": ["BSD-3-Claus...
''' Module with functions for converting audio files across several formats ''' # imports of built-in packages import os import sys import csv import re # imports from package modules from .common_file_ops import path_splitter, run_exec, img_fmt_converter from .config import read_config ## get paths to required execu...
{"hexsha": "100e1fffa9f80482d02d912a4ceaa7e259bf9d1b", "size": 42286, "ext": "py", "lang": "Python", "max_stars_repo_path": "file_manipulators/audio_conv_ops.py", "max_stars_repo_name": "Retr0Metal98/file_manipulators", "max_stars_repo_head_hexsha": "fb9992c5e34910a3ddbb97ea88c3fe2e86477818", "max_stars_repo_licenses":...
""" Integration operations. union_poi_bank, union_poi_bus_station, union_poi_bar_restaurant, union_poi_parks, union_poi_police, join_collective_areas, join_with_pois, join_with_pois_by_category, join_with_events, join_with_event_by_dist_and_time, join_with_home_by_id, merge_home_with_poi """ from __future__ import an...
{"hexsha": "90e240765c74d31b1b1f00293fc8c190218314c0", "size": 54509, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymove/utils/integration.py", "max_stars_repo_name": "JuniorNunes15/PyMove", "max_stars_repo_head_hexsha": "ee5b68282502bfcb9cf38b52dcdefed5bd927a90", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # /**************************************************************************** # * Copyright (c) 2019 Parker Lusk and Jesus Tordesillas Torres. All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the ...
{"hexsha": "fd617c56f88f56202f0ae0b6808f14eb8da889f7", "size": 9708, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/flipper.py", "max_stars_repo_name": "jtorde/uav_trajectory_optimizer_gurobi", "max_stars_repo_head_hexsha": "ed50a357ee6e6bea40d6e54656f8c223fb551b3c", "max_stars_repo_licenses": ["BSD-3-C...
import numpy as np def stoi(reference, estimation, sample_rate): """Wrapper to allow independent axis for STOI. Args: reference: Shape [..., num_samples] estimation: Shape [..., num_samples] sample_rate: Returns: """ from pystoi.stoi import stoi as pystoi_stoi estim...
{"hexsha": "ca6126cd4d7deb25bf6297fa7cb373aadc866499", "size": 651, "ext": "py", "lang": "Python", "max_stars_repo_path": "pb_bss/evaluation/module_stoi.py", "max_stars_repo_name": "mdeegen/pb_bss", "max_stars_repo_head_hexsha": "e8c380e27d82707e8d2b2d83c5c918d47ea5d89f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np """ This script was used to check whether every word from the gold standard is in the ukwac_100m corpus. The check was successful. """ wacfile = "../ukwac_100m/ukwac_100m_oneline.txt" menfile = "data/MEN_dataset_natural_form_full" wordlist_WAC = [] checklist = [] unshared_words = [] with open(wa...
{"hexsha": "41f92766b1f1c3ce16204bbf31a819ec27ab870e", "size": 1147, "ext": "py", "lang": "Python", "max_stars_repo_path": "checker.py", "max_stars_repo_name": "SimonPreissner/fruitfly", "max_stars_repo_head_hexsha": "99dffa7c1ed31da39513eda1ddacc4f9b968a6df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "...
import argparse import sys import torch import yaml import numpy as np import wandb from train import load_model from text import text_to_sequence # Needed to unpickle waveglow model sys.path.append("./waveglow/") # Needed to avoid warnings torch.nn.Module.dump_patches = True with open("hparams.yaml") as yamlfile...
{"hexsha": "520ded8782057bccb26df1887102bb7a18dddc3d", "size": 3644, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference.py", "max_stars_repo_name": "bcsherma/tacotron2", "max_stars_repo_head_hexsha": "827e4d59c14da3d41cabd54864bc08fd71eef3fa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import math import numpy as np import numpy.random as random import torch import torch.nn as nn import copy import torch.nn.functional as F import torch.optim as optim from scipy.stats import levy_stable # This script is only for propagating randomly initializaed networks with square connectivity matrices (NOT FOR ...
{"hexsha": "78cd7198785d4a0dfaa74846b8335d2d7440295d", "size": 7443, "ext": "py", "lang": "Python", "max_stars_repo_path": "nporch/Randnet.py", "max_stars_repo_name": "CKQu1/extended-criticality-dnn", "max_stars_repo_head_hexsha": "e19efd34f84dc684b31b3ba0b1e41432dfc1bb59", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 ################################################################################### # Copyright 2021 National Technology & Engineering Solutions of Sandia, # # LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the # # U.S. Government retains certain rights in t...
{"hexsha": "9e4e4bb414aad9b43d098730b765b1b99c84c4d4", "size": 8448, "ext": "py", "lang": "Python", "max_stars_repo_path": "drivers/runNonlocal.py", "max_stars_repo_name": "sandialabs/PyNucleus", "max_stars_repo_head_hexsha": "98b87cf779c2c1853ce16d47998b692f594a55a4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. from typing import Callable import numpy as np class Signature: def __init__(self, args, ret): self.args = args self.ret = ret class OpRegistry: signatures = {} def __init__(self): pass ...
{"hexsha": "0a8df0f82580d9c09e6be0ed40eb65a2aa97c017", "size": 553, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/pyis-onnx/pyis/onnx/transpiler/ops/op_registry.py", "max_stars_repo_name": "microsoft/python-inference-script", "max_stars_repo_head_hexsha": "cbbbe9d16be0839e4df357b1bd9e8274ca44f1f7", "max_sta...
import numpy as np def simulation(data, params): ''' Cema-Neige snow model Input: 1. Data - pandas dataframe with correspondent timeseries: 'Temp'- mean daily temperature (Celsium degrees) 'Prec'- mean daily precipitation (mm/day) 2. Params - list of model parameters: 'CTG'...
{"hexsha": "ce58ad875e450f01b3d4d15762f6449550bfff43", "size": 2836, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cema_neige.py", "max_stars_repo_name": "hydrogo/2018_VinoRead_wrkshp", "max_stars_repo_head_hexsha": "1ebcaacedc9eb96e0ed749ae93225b8cf3246d2b", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy from audionmf.transforms.nmf import NMF def nmf_matrix(matrix, max_iter=100, rank=30): # increment the matrix to make sure it's positive matrix_inc, min_val = increment_by_min(matrix) # TODO save # use Kullback-Leibler divergence # nmf = nimfa.Nmf(matrix_inc, max_iter=max_iter, rank...
{"hexsha": "c4e884d6a217216411210ac48f2cb0f0b305fe63", "size": 873, "ext": "py", "lang": "Python", "max_stars_repo_path": "audionmf/util/nmf_util.py", "max_stars_repo_name": "argoneuscze/AudioNMF", "max_stars_repo_head_hexsha": "04f360653bb0df3d5ed19bf2eb1459bff16a944c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import os import torch import elf import numpy as np import wandb from elf.segmentation.features import compute_rag from torch.nn import functional as F from torch.optim.lr_scheduler import ReduceLROnPlateau from torch.utils.data import DataLoader from collections import namedtuple import matplotlib.pyplot as plt from ...
{"hexsha": "035be3535f18b8a922684f7a01e6917e86723756", "size": 20020, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents/sac_obj_lvl_rew.py", "max_stars_repo_name": "edosedgar/RLForSeg", "max_stars_repo_head_hexsha": "fc748d8e7d2f2a1e7ac0dddb3f268ec3025d40ca", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# This file is part of spot_motion_monitor. # # Developed for LSST System Integration, Test and Commissioning. # # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICE...
{"hexsha": "a6169d9bc4002058b12328278a319c47f7906338", "size": 8516, "ext": "py", "lang": "Python", "max_stars_repo_path": "spot_motion_monitor/camera/gaussian_camera.py", "max_stars_repo_name": "lsst-sitcom/spot_motion_monitor", "max_stars_repo_head_hexsha": "3d0242276198126240667ba13e95b7bdf901d053", "max_stars_repo_...
/** * Testival.cpp * * Test interval class * * Created by Yinan Li on July 20, 2016. * * Hybrid Systems Group, University of Waterloo. */ #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE IntervalClass #include <boost/test/unit_test.hpp> //#include <boost/test/unit_test_log.hpp> #include <cmath> #in...
{"hexsha": "ff739ed4ee3dbb8c35893b5436b63aa07b5b465b", "size": 10436, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/testIval.cpp", "max_stars_repo_name": "yinanl/rocs", "max_stars_repo_head_hexsha": "bf2483903e39f4c0ea254a9ef56720a1259955ad", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": n...
using Test td = pwd() for dir in ["basic","hamiltonian_zoo"] print("Including Test Dir:",dir,"\n") for file in readdir(td*"/"*dir,join=true) print("\tIncluding Test File:",file,"\n") include(file) end end
{"hexsha": "90e79db04e7200dc9e6414a8c792a730cc54b9cd", "size": 233, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "qiyang-ustc/EasyHamiltonian.jl", "max_stars_repo_head_hexsha": "2a56e7de20d93714848ed90ae0e0cb6287070df8", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class AtariNetwork(nn.Module): n_features = 512 def __init__(self, input_shape, _, n_actions_per_head, use_cuda, n_games, features, dropout): super().__init__() self._n_input = input_shape...
{"hexsha": "57de75decc2524ccfcf879c9b0e7cfcbd68a761b", "size": 7684, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/shared/dqn/networks.py", "max_stars_repo_name": "MushroomRL/mushroom-rl-meta", "max_stars_repo_head_hexsha": "08c13bd8115c81aba083ec62672956026e7ddd8a", "max_stars_repo_licenses": ["MIT"]...
# Author: Andrey Boytsov <andrey.boytsov@uni.lu> <andrey.m.boytsov@gmail.com> # License: BSD 3 clause (C) 2017 # Fitting iris dataset (from sklearn) Embedding the same data using transform function, see how close new Ys are # to original data. Feel free to play with transformation parameters. # Transformation is done ...
{"hexsha": "8ee6af5a35d593660fa434c8604e47641d60fc17", "size": 1749, "ext": "py", "lang": "Python", "max_stars_repo_path": "Experiments/TransformationLightweight/iris_double_transform.py", "max_stars_repo_name": "andreyboytsov/DynamicTSNE", "max_stars_repo_head_hexsha": "9ccd18d80c7a0bae31defde2f2336f9ea3d1965a", "max_...
#include <Access/DiskAccessStorage.h> #include <IO/WriteHelpers.h> #include <IO/ReadHelpers.h> #include <IO/ReadBufferFromFile.h> #include <IO/WriteBufferFromFile.h> #include <IO/ReadBufferFromString.h> #include <Access/User.h> #include <Access/Role.h> #include <Access/RowPolicy.h> #include <Access/Quota.h> #include <A...
{"hexsha": "8b249813f7cfac6945257d9b194a3bdd05533c0e", "size": 27404, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Access/DiskAccessStorage.cpp", "max_stars_repo_name": "chengy8934/ClickHouse", "max_stars_repo_head_hexsha": "c1d2d2d7f759536cdac991077110ea40023030c2", "max_stars_repo_licenses": ["Apache-2.0"...
import argparse import logging import imageio import numpy as np import yaml from IPython import embed from common import get_image_array, get_probability_for_class, get_perturbed_images from differential_evolution import init_population, gen_children from models.base import get_model_from_name CONFIG = None logging...
{"hexsha": "cddf82db8bc8bedf25a1d7e7867a9c1d25e29c23", "size": 3829, "ext": "py", "lang": "Python", "max_stars_repo_path": "targeted.py", "max_stars_repo_name": "StefanieStoppel/one-pixel-attack", "max_stars_repo_head_hexsha": "e1a984b508453f6a20adbdb2e522b4b33cc6ed90", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import pandas as pd import numpy as np import talib as tb from indicators.indicator_utils import * def reg_envelopes(rates, price = 'Close', deviation = 0.008, reg_window=250, reg_mean=75): rates["new_pol"] = (rates["Close"].rolling(reg_window).apply(regression(rates,price), raw=False)).rolling(reg_mean).mean() ...
{"hexsha": "df9d95d159fb721a8ed922e2fcecc82d29eea520", "size": 2703, "ext": "py", "lang": "Python", "max_stars_repo_path": "indicators/custom_indicators.py", "max_stars_repo_name": "zqngetsu96/PyForex", "max_stars_repo_head_hexsha": "09783c7c9bc4bf0cfefea1ebca8c0328a58b176c", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import tqdm import pickle from tfc.utils import MakePlot from matplotlib.ticker import PercentFormatter ## TEST PARAMETERS: *************************************************** tfc = pickle.load(open('data/EOL_TFC.pickle','rb')) spe = pickle.load(open('data/EOL_Spec.pickle','rb')) ## Plot: *****...
{"hexsha": "c6be9fa9aed366640725d0369ddac3418c14042a", "size": 3259, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Hunter_Johnston_Dissertation/Chapter_6/Example_6_2/plotData.py", "max_stars_repo_name": "leakec/tfc", "max_stars_repo_head_hexsha": "f814be4643270498a68bb0859720191ff7216012", "max_stars_...
[STATEMENT] lemma inf_co_total: "co_total x \<Longrightarrow> co_total y \<Longrightarrow> co_total (x \<sqinter> y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>co_total x; co_total y\<rbrakk> \<Longrightarrow> co_total (x \<sqinter> y) [PROOF STEP] by (metis co_total_def order.antisym bot_least mult_...
{"llama_tokens": 136, "file": "Correctness_Algebras_Lattice_Ordered_Semirings", "length": 1}
import sys import os import multiprocessing import subprocess import scipy.stats as sci from scipy.stats.mstats import mquantiles from methylpy.utilities import print_checkpoint, print_error, print_warning from methylpy.utilities import split_fastq_file from methylpy.utilities import split_fastq_file_pbat from methylpy...
{"hexsha": "931d5c095069d59518016ff5526efeb7c5415a33", "size": 105768, "ext": "py", "lang": "Python", "max_stars_repo_path": "methylpy/call_mc_se.py", "max_stars_repo_name": "yupenghe/methylpy", "max_stars_repo_head_hexsha": "0dbf4ef30d6c4d1b98f4a53c3b08b721114c9aaa", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import data.nat.prime import data.list -- import data.bool -- set_option trace.simplify true set_option trace.simplify.rewrite true set_option trace.simplify.failure false set_option trace.simplify.rewrite_failure false namespace first constants a b : ℤ constant f : ℤ → ℤ constant g : ℤ → ℤ → ℤ #check λ x : ℤ, g (f ...
{"author": "mathprocessing", "repo": "lean_mathlib_examples", "sha": "743c6456c0a3219dd1722efdd31ee6f3a113818a", "save_path": "github-repos/lean/mathprocessing-lean_mathlib_examples", "path": "github-repos/lean/mathprocessing-lean_mathlib_examples/lean_mathlib_examples-743c6456c0a3219dd1722efdd31ee6f3a113818a/src/hitch...
// (C) Copyright 2005 Matthias Troyer and Dave Abrahams // Copyright (c) 2015 Anton Bikineev // Copyright (c) 2015 Andreas Schaefer // Copyright (c) 2022 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt o...
{"hexsha": "d5f30829a9c6dbe17895dd0ed57d476bb7c92a1f", "size": 5886, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/core/serialization/include/hpx/serialization/array.hpp", "max_stars_repo_name": "bhumitattarde/hpx", "max_stars_repo_head_hexsha": "5b34d8d77b1664fa552445d44cd98e51dc69a74a", "max_stars_repo_li...
# This file is a part of Julia. License is MIT: https://julialang.org/license """ message(c::GitCommit, raw::Bool=false) Return the commit message describing the changes made in commit `c`. If `raw` is `false`, return a slightly "cleaned up" message (which has any leading newlines removed). If `raw` is `true`, th...
{"hexsha": "0cf8ca641076d53949a7de238b6cbb5968326325", "size": 4056, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "base/libgit2/commit.jl", "max_stars_repo_name": "Mikewl/julia", "max_stars_repo_head_hexsha": "4c5cc04156ba074a8baa028c2a8a41b9e70d56ee", "max_stars_repo_licenses": ["Zlib"], "max_stars_count": 3, ...
from metrics.metric import Metric from metrics.minutely_returns import MinutelyReturns from scipy.stats import kurtosis import numpy as np class ReturnsVolatilityCorrelation(Metric): def __init__(self, intervals=4): self.mr = MinutelyReturns() def compute(self, df): returns = np.array(self.mr...
{"hexsha": "6796b38f03373e8f2be3961f695dd26a4d3c2f13", "size": 621, "ext": "py", "lang": "Python", "max_stars_repo_path": "realism/metrics/returns_volatility_correlation.py", "max_stars_repo_name": "chris-jh-cho/abides", "max_stars_repo_head_hexsha": "0917e099b901a864751233b19eecf50a451085df", "max_stars_repo_licenses"...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TorrentofShame Resume % LuaLaTeX Template % Version 1.0.0 (1/3/2021) % % Authors: % Simon Weizman (contact@simon.weizman.us) % % License: % MIT License (see included LICENSE file) % % !TEX encoding = utf8 % !TEX program = lualatex % NOTE: This template mu...
{"hexsha": "d8ac0cb57f889a0b2dadb70a8af4c2da15f35050", "size": 2990, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "simonweizman.tex", "max_stars_repo_name": "TorrentofShame/resume", "max_stars_repo_head_hexsha": "3b86e4af0603557a33e80f32cd51f32cdb112e82", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
\chapter{hjgad} \begin{abox} Problem set-1 \end{abox} \begin{enumerate}[label=\color{ocre}\textbf{\arabic*.}] \item Consider the matrix $M=\left(\begin{array}{lll}1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1\end{array}\right)$\\ \textbf{A.} The eigenvalues of $M$ are {\exyear{NET/JRF(JUNE-2011)}} \begin{tasks}(4) \task[\...
{"hexsha": "bd318aade5e56de9b7311765187ab3ec90f4e98c", "size": 32623, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "CSIR- Mathematical Physics/chapter/Matrix Problem set Solutions.tex", "max_stars_repo_name": "archives-futuring/CSIR-Physics-Study-Material", "max_stars_repo_head_hexsha": "689cff91895fec36b4bb0add...
""" Generate synthetic resistivity models randomly. References ---------- https://stackoverflow.com/questions/44865023/circular-masking-an-image-in-python-using-numpy-arrays https://docs.scipy.org/doc/numpy-1.16.0/reference/routines.random.html https://numpy.org/doc/1.18/reference/random/index.html https://doc...
{"hexsha": "369c43541b0752a58b3316ee7ac329755b902421", "size": 15845, "ext": "py", "lang": "Python", "max_stars_repo_path": "erinn/simpeg_extended/random_model.py", "max_stars_repo_name": "ravisha229/elec", "max_stars_repo_head_hexsha": "8297db51f63d5ef961672ae7ccb01c5ef18c70a3", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LogNorm # import sys, os sys.path.append('./utils/') import tools import datatools as dtools from time import time os.environ["CUDA_VISIBLE_DEVICES"]="0" # import tensorflow as tf import tensorflow_hub as hub #########################...
{"hexsha": "69a76af11f0d745da6a152a2a97e769b34410ee2", "size": 3536, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/samplenet.py", "max_stars_repo_name": "modichirag/cosmic-rim", "max_stars_repo_head_hexsha": "3b621e676fe9aaa6cdc84adc92bb9b9d8bbe5f25", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
@testset "Laplace" begin test_interface(LaplaceLikelihood(3.0), Laplace) @test LaplaceLikelihood().β == 1 test_auglik(LaplaceLikelihood(1.0); rng=MersenneTwister(42)) # Test the custom kl divergence λ = rand() μ = rand() @test kldivergence(InverseGaussian(μ, 2λ), InverseGamma(1//2, λ)) ≈ ...
{"hexsha": "67af19eb45c2521548ab9ef24e843bbc2c4ae531", "size": 395, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/likelihoods/laplace.jl", "max_stars_repo_name": "simsurace/AugmentedGPLikelihoods.jl", "max_stars_repo_head_hexsha": "79cde8aa87f4c3791b1d3b02a5ae048928bc6fd1", "max_stars_repo_licenses": ["MIT...
import numpy as np import io from gensim.models import KeyedVectors from gensim.test.utils import datapath, get_tmpfile from gensim.scripts.glove2word2vec import glove2word2vec class WordEmbeddingsModel: def __init__(self, embeddings_file_name, embeddings_dimensions): self.embeddings_file = embeddings_file...
{"hexsha": "49ba5efbb74481d58a91e6579c8babdaf01aa790", "size": 4045, "ext": "py", "lang": "Python", "max_stars_repo_path": "8_graph_embeddings/modelUtils/LanguageModels.py", "max_stars_repo_name": "ravikiran0606/Game-and-Requirements-KG", "max_stars_repo_head_hexsha": "ede2c176c83e33b401b879461a9312660049cf10", "max_st...
GUI=1;
{"author": "european-central-bank", "repo": "BEAR-toolbox", "sha": "f33aae80c40f7a2e78a54de99b2ce3663f59aa75", "save_path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox", "path": "github-repos/MATLAB/european-central-bank-BEAR-toolbox/BEAR-toolbox-f33aae80c40f7a2e78a54de99b2ce3663f59aa75/tbx/bear/unreachable...
@doc raw""" `PODE`: Partitioned Ordinary Differential Equation Defines a partitioned initial value problem ```math \begin{align*} \dot{q} (t) &= v(t, q(t), p(t)) , & q(t_{0}) &= q_{0} , \\ \dot{p} (t) &= f(t, q(t), p(t)) , & p(t_{0}) &= p_{0} , \end{align*} ``` with vector fields ``v`` and ``f``, initial conditions ``...
{"hexsha": "a4cb151b114dda873620929f11a64c314b9f72d6", "size": 3682, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/equations/pode.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/GeometricIntegrators.jl-dcce2d33-59f6-5b8d-9047-0defad88ae06", "max_stars_repo_head_hexsha": "5ffdd27e87719a998492287d...
[STATEMENT] lemma onl_invariant_sterms: assumes wf: "wellformed \<Gamma>" and il: "A \<TTurnstile> (I \<rightarrow>) onl \<Gamma> P" and rp: "(\<xi>, p) \<in> reachable A I" and "p'\<in>sterms \<Gamma> p" and "l\<in>labels \<Gamma> p'" shows "P (\<xi>, l)" [PROOF STATE] proof (prove) goal ...
{"llama_tokens": 649, "file": "AWN_AWN_Invariants", "length": 8}