text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import madmom import numpy as np class SpectrogramProcessor(madmom.processors.SequentialProcessor): SAMPLE_RATE_HZ = 44100 FRAMES_PER_SECOND = 100 def __init__(self, window_size_ms, formatted=False, fps=FRAMES_PER_SECOND, sample_rate=SAMPLE_RATE_HZ, context_frames=7): win_size_s...
{"hexsha": "5107afdbae60d0c0de90bcfb49b6dbaca054e112", "size": 2254, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/common/audio_preprocessor.py", "max_stars_repo_name": "Killy85/saber-maker", "max_stars_repo_head_hexsha": "da409691a511e2e8233c56b14c57a60df5e97040", "max_stars_repo_licenses": ["MIT"], "max_...
#include <cstddef> #include <iostream> #include <iomanip> #include <eigen-checks/gtest.h> #include <gtest/gtest.h> #include <Eigen/Core> #include <Eigen/Dense> #include <cholmod.h> #include <SuiteSparseQR.hpp> #include "truncated-svd-solver/tsvd-solver.h" #include "truncated-svd-solver/linear-algebra-helpers.h" #in...
{"hexsha": "5540c59baf6a09db299a237a525552da53ea86ef", "size": 9266, "ext": "cc", "lang": "C++", "max_stars_repo_path": "truncated_svd_solver/test/test-tsvd-solver.cc", "max_stars_repo_name": "ethz-asl/truncated_svd_solver", "max_stars_repo_head_hexsha": "12772b2e3a0282e77022f12f67497401ca020f57", "max_stars_repo_licen...
import abc from asyncio.queues import QueueEmpty import json import os import threading import time import numpy as np from sentence_transformers import SentenceTransformer from onnx_sentence_transformers import ONNXSentenceTransformer import simpleaudio as sa import speech_recognition as sr import yaml from ibm_cloud...
{"hexsha": "0ad118cfa3a05de34b424002e148a18cf5fdb6d4", "size": 4206, "ext": "py", "lang": "Python", "max_stars_repo_path": "listen_user.py", "max_stars_repo_name": "xiong-jie-y/tsukuyomichan-ai", "max_stars_repo_head_hexsha": "e51763974bb3aa5306bcecba4832bc81c7501a5b", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_...
[STATEMENT] lemma E_inf_lfp: fixes g defines "l \<equiv> \<lambda>f \<omega>. g (shd \<omega>) (f (stl \<omega>))" assumes measurable_g[measurable]: "case_prod g \<in> borel_measurable (count_space UNIV \<Otimes>\<^sub>M borel)" assumes cont_g: "\<And>s. sup_continuous (g s)" assumes int_g: "\<And>f cfg. f \<...
{"llama_tokens": 22685, "file": "Markov_Models_Markov_Decision_Process", "length": 123}
import rospy from hybrid_control_api.srv import * import numpy as np from std_msgs.msg import String import threading from topicCartesianState import * from std_msgs.msg import Float64 from std_srvs.srv import Empty from keras.models import load_model from keras.models import Model import csv from runOnThormang import ...
{"hexsha": "4e3ff9030677a16b0a882658ba711af30b8da421", "size": 24975, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/myHybridControl.py", "max_stars_repo_name": "ricardoGrando/hybrid_control_api", "max_stars_repo_head_hexsha": "837a0a268a49c5088259f89e8c83adb7638a44b8", "max_stars_repo_licenses": ["BSD-...
# Using ctrl,shift,C to create Comments # //step 1.Downloaded Marketing data from Github// # reading r file marketing.rda for Analysis setwd("/home/carol/Desktop/R-Code/Practice/marketing.rda") load("/home/carol/Desktop/R-Code/Practice/marketing.rda") # view data for analysis View(marketing) # transform data into a dat...
{"hexsha": "049faf2e7c284198dacf5933368d61bf6a40793e", "size": 2803, "ext": "r", "lang": "R", "max_stars_repo_path": "code.r", "max_stars_repo_name": "Carolkinyua-hub/R-Practical", "max_stars_repo_head_hexsha": "59826d523b56d1f6e20d0d46dc548a40b285e1bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
using Test, GameOfLife using SharedArrays using DistributedArrays: distribute interior(grid) = @view grid[2:end-1,2:end-1] function generate(world, s=Serial()) m, n = size(world) grid = BitArray(undef, m+2, n+2) interior(grid) .= world grid end function generate(world, ::ProcParallel) m, n = size...
{"hexsha": "65f3eb9b3c617312a18d0c82ff8e5ec70ca14517", "size": 2516, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "jonas-schulze/GameOfLife.jl", "max_stars_repo_head_hexsha": "6d81b0486feba5f16b04fad42842dee9b9c8ecdc", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ author: sanja7s --------------- plot the distribution """ import os import datetime as dt import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib from collections import defaultdict from matplotlib import colors from mpl_toolkits.axes...
{"hexsha": "7c7f203a4aad419a8f776bf814ec1932c9d2454d", "size": 3676, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/distributions/job_steps_distribution.py", "max_stars_repo_name": "sanja7s/EEDC", "max_stars_repo_head_hexsha": "6a9aabf61bc857ad9b54d07b256610e766a0d88d", "max_stars_repo_licenses": ["Apache-2...
""" Solution for Project Euler's problem #1 """ import os import time from datetime import timedelta import jax.numpy as jnp from jax import jit from gante_project_euler.math.prime import is_multiple @jit def get_solution(): """ Solves the problem and returns the answer. """ integers = jnp.arange(1000)...
{"hexsha": "773b25dd73bdd4df76b579be838ed9a6a874b34a", "size": 1071, "ext": "py", "lang": "Python", "max_stars_repo_path": "gante_project_euler/solutions/problem_001.py", "max_stars_repo_name": "gante/project_euler", "max_stars_repo_head_hexsha": "9b5e780259e28d4f4d66cb4c954623f81aeaa5af", "max_stars_repo_licenses": ["...
#include <iostream> #include <string> #include <vector> #include <atomic> #include <condition_variable> #include <deque> #include <mutex> #include <thread> #include <unordered_map> #include <unordered_set> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <networking/s...
{"hexsha": "2dbaa31b6893672104f5183f431281a0b614c9f2", "size": 4019, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "server/server/src/server.cpp", "max_stars_repo_name": "dzagar/AndroidMessenger", "max_stars_repo_head_hexsha": "2a43c2144145b02496c5cab9e59c6827a3d43ec5", "max_stars_repo_licenses": ["MIT"], "max_st...
#== # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Description # # Tests related to TLE parser. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ==# # Macros tle_str and tlenc_str # ============================ @testset "Macros tle_str and tlenc_str" beg...
{"hexsha": "3dca5047590a6fb2cab76cdeeab1aeb62fc48cf7", "size": 4703, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/submodules/SatelliteToolboxTLE/tle.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SatelliteToolbox.jl-6ac157d9-b43d-51bb-8fab-48bf53814f4a", "max_stars_repo_head_hexsha": "7337476...
#!/usr/bin/env python # # featdesign.py - The FEATFSFDesign class, and a few other things. # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # """This module provides the :class:`FEATFSFDesign` class, which encapsulates a FEAT design matrix. The :class:`FEATFSFDesign` class is intended to be used to access the desi...
{"hexsha": "ce5b41f592609b5dbd6bc8b987e04016567a761c", "size": 25901, "ext": "py", "lang": "Python", "max_stars_repo_path": "fsl/data/featdesign.py", "max_stars_repo_name": "physimals/fslpy", "max_stars_repo_head_hexsha": "10dd3f996c79d402c65cf0af724b8b00082d5176", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import sys import yaml import math import time import random import traceback import xarray as xr import numpy as np import pandas as pd from datetime import datetime import matplotlib.pyplot as plt import scipy.sparse from scipy.ndimage import gaussian_filter from tqdm.auto import tqdm import numpy.fft as FFT from...
{"hexsha": "b7cce1083e20fa136bd5ea1396ec3a8af9dfef6a", "size": 7493, "ext": "py", "lang": "Python", "max_stars_repo_path": "echo/examples/keras/model.py", "max_stars_repo_name": "NCAR/echo-opt", "max_stars_repo_head_hexsha": "a5bd69cce36da90fec7eed4fe3b240243fcf53b0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
module Day22 export get_inputs, get_solution1, get_solution2 ## Input getting function get_inputs() test_input1 = test_input2 = read_input(joinpath(@__DIR__, "test_input1.txt")) test_output1 = 306 test_output2 = 291 data = read_input(joinpath(@__DIR__, "input.txt")) return (; test_input1, test_in...
{"hexsha": "4df3c36c4eb10ecdbc60b1d930320122c57675d9", "size": 1670, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/Day22/code.jl", "max_stars_repo_name": "jonniedie/Advent2020", "max_stars_repo_head_hexsha": "3af73d728f6f9827fa5a1124354ebebc77eec69d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#module mido for working with midi files from mido import MidiFile, Message import os import numpy as np from tensorflow.keras.models import load_model from tensorflow.keras.layers import * #load midi file data = [] pattern = MidiFile("musics/Hot N Cold - Chorus.mid") a = [] #get all messages from pattern...
{"hexsha": "65ccadce9e283f874d6349b4c76cb51f923a923e", "size": 2176, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate.py", "max_stars_repo_name": "durman53/tensorflow-keras-music-generation", "max_stars_repo_head_hexsha": "02086a2f5afdde32c2a271b60a55ffef2f393061", "max_stars_repo_licenses": ["MIT"], "ma...
if nprocs() < 2 id_me = myid() id_other = addprocs(1)[1] using MessageUtils using Base.Test end c = channel() put!(c, 1; timeout=10.0) put!(c, "Hello") put!(c, 5.0) @test isready(c) == true @test fetch(c) == 1 @test fetch(c) == 1 # Should not have been popped previously @test take!(c) == 1 @test...
{"hexsha": "381675c9b3e12f55c68d239a298fcf487eb3516a", "size": 1115, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_channel.jl", "max_stars_repo_name": "JuliaPackageMirrors/MessageUtils.jl", "max_stars_repo_head_hexsha": "dbe01a3578b25ed348ee8c36bc393ce86be2016b", "max_stars_repo_licenses": ["MIT"], "m...
# # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """Tests for joining two models together.""" # pylint: disable=invalid-name import pytest import numpy as np import tbmodels @pytest.fixture def model_dense(sample): """Fixture for a dense tight-binding m...
{"hexsha": "ab56d882433f712422d55f1c55d56fbabd934f7a", "size": 2662, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_join_models.py", "max_stars_repo_name": "Z2PackDev/TBModels", "max_stars_repo_head_hexsha": "1b0f07aa16000d3436ec30cc9e8132637fbfa4e6", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
#!/usr/bin/env ipython import os from pylab import * from numpy import * import matplotlib.patches as patches import matplotlib.transforms as transforms import console_colors as ccl import numpy as np class gral: def __init__(self): self.name='name' def makefig(mc, sh, TEXT, YLIMS, YLAB, fname_fig, ftex...
{"hexsha": "c55684bfc6b69183581ef99d1594335f06435e64", "size": 8405, "ext": "py", "lang": "Python", "max_stars_repo_path": "mixed.icmes/src/mix_funcs.py", "max_stars_repo_name": "jimsrc/seatos", "max_stars_repo_head_hexsha": "e775dba1a2a96ff44b837cf8d85101ccfef302b1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# -*- coding: utf-8 -*- """ Created on Wed Mar 28 15:34:18 2012 Author: Josef Perktold """ from statsmodels.compatnp.py3k import BytesIO, asbytes import numpy as np from numpy.testing import assert_almost_equal, assert_equal from statsmodels.stats.libqsturng import qsturng ss = '''\ 43.9 1 1 39.0 1 2 4...
{"hexsha": "133ae06beaecb774e2090211a6aa886ea9129411", "size": 8684, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/stats/tests/test_pairwise.py", "max_stars_repo_name": "toobaz/statsmodels", "max_stars_repo_head_hexsha": "5286dd713a809b0630232508bf9ad5104aae1980", "max_stars_repo_licenses": ["BSD-3...
import pytest import numpy as np import pandas as pd import sys sys.path.insert(0, '../') from mut.io import scrape_frontmatter def test_scrape_frontmatter(): accept_dict = {'status': 'accept', 'reason': 'test reason'} reject_dict = {'status': 'reject', 'reason': 'test reason'} questionable_dict = {'statu...
{"hexsha": "63912330c217f17c357db7d2bae7216fd99ae2b6", "size": 1051, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_io.py", "max_stars_repo_name": "RPGroup-PBoC/mwc_mutants", "max_stars_repo_head_hexsha": "35581602c35793fc8ec42c8aff37b8305c5e54e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python3 import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.patches import Wedge import cv2 import numpy as np from utils import helpers class Render(object): """ """ def __init__(self, fig_size=(7, 7)): fig = plt.figure(figsize=fig_size) self.plt_ax ...
{"hexsha": "eeb7254b7d609e265324acc5ac6fff42f36ac686", "size": 4961, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/old_code_feb_12/utils/display.py", "max_stars_repo_name": "suresh-guttikonda/sim-environment", "max_stars_repo_head_hexsha": "cc8faec17714d58c0e1f0227c8b7d4cf8817a136", "max_stars_repo_license...
[STATEMENT] lemma merge_G_simps [simp]: "merge_G (G\<^sub>m x) (G\<^sub>m y) = map_option G\<^sub>m (merge_F (root_hash_T rha) (merge_T rha ma) rhb mb x y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. local.merge_G (G\<^sub>m x) (G\<^sub>m y) = map_option G\<^sub>m (merge_F (root_hash_T rha) (merge_T rha ma) rh...
{"llama_tokens": 169, "file": "ADS_Functor_Generic_ADS_Construction", "length": 1}
import numpy as np import unittest from fpmlib.projections import HalfSpace, Box, Ball from fpmlib.nonexpansive import * class TestIntersection(unittest.TestCase): def test_1d(self): # p := [-1, 1] p = Intersection([HalfSpace(np.array([1]), 1), HalfSpace(np.array([-1]), 1)]) self.assertFal...
{"hexsha": "552c062b91880157feae8dcc371b4998f4913933", "size": 3946, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_nonexpansive.py", "max_stars_repo_name": "kazh98/fpmlib", "max_stars_repo_head_hexsha": "49533953ea3305f5db7b3afe978c323ddf4ede2a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division from future.utils import viewitems import os import numpy as np import matplotlib matplotlib.use('Agg') # Run in headless mode import matplotlib.pyplot as plt from ..api.model import Model _srcdir = os.path.dirname(__file__) _outdir = os.path....
{"hexsha": "9dc9131733a5bd7c941302eb00f3983ae8ad31ee", "size": 4819, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_plots.py", "max_stars_repo_name": "JLTastet/scalar_portal", "max_stars_repo_head_hexsha": "8d444d72e4c5d31b237a59621935757790c5a0e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Particular class of small traffic network @author: Tianshu Chu """ import os, sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import configparser import logging import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import t...
{"hexsha": "543cf8708cc9768db68bde9107bc2611236e071f", "size": 4462, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/test_grid_env.py", "max_stars_repo_name": "Taek111/deeprl_signal_control", "max_stars_repo_head_hexsha": "24ee6d31c1600adb040a2e872e9200937bbdacf6", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma lists_not_empty: "lists A \<noteq> {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lists A \<noteq> {} [PROOF STEP] using Nil_in_lists [PROOF STATE] proof (prove) using this: [] \<in> lists ?A goal (1 subgoal): 1. lists A \<noteq> {} [PROOF STEP] by blast
{"llama_tokens": 123, "file": null, "length": 2}
import pytest import numpy as np from Animate.Movie import Movie from Animate.Animation import Animation import matplotlib as mpl def test_ratio_2(): m = Movie(dt=1.0/14, height_ratio=2) img = np.arange(100).reshape(4, 5, 5) m.add_image(img, style='dark_img') a = Animation(m) a._init_draw() as...
{"hexsha": "cecab4b3ea21cbc33cbe1e2bce5082320952ff13", "size": 5382, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_Animation_init.py", "max_stars_repo_name": "toddrme2178/AnimateImages", "max_stars_repo_head_hexsha": "d7a944f04d008d7ce652cfa4e6dc29cbf950b5dd", "max_stars_repo_licenses": ["MIT"], "max...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import abc import numpy as np __all__ = ['MissingDataAssociationException', 'IncompatibleUncertaintiesException', 'NDUncertainty', 'StdDevUncertain...
{"hexsha": "1f1288898c2368794013eb1a52f39e089a72a464", "size": 11388, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/nddata/nduncertainty.py", "max_stars_repo_name": "xiaomi1122/astropy", "max_stars_repo_head_hexsha": "8876e902f5efa02a3fc27d82fe15c16001d4df5e", "max_stars_repo_licenses": ["BSD-3-Clause"...
INTEGER FUNCTION ICBFMS ( STR, LSTR ) C$$$ SUBPROGRAM DOCUMENTATION BLOCK C C SUBPROGRAM: ICBFMS C PRGMMR: J. ATOR ORG: NP12 DATE: 2012-06-07 C C ABSTRACT: THIS FUNCTION TESTS WHETHER THE INPUT CHARACTER STRING C IS "MISSING" BY CHECKING IF ALL OF THE EQUIVALENT BITS ARE SET TO 1. C IT IS SIM...
{"hexsha": "9fef9c658ea26d011515657a601697de13e004c9", "size": 2023, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "extlibs/ncepBUFR/v10.2.3/icbfms.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import numpy as np from gym import spaces from gym_cellular_automata import Operator from gym_cellular_automata.forest_fire.utils.neighbors import neighborhood_at class ForestFire(Operator): grid_dependant = True action_dependant = False context_dependant = True deterministic = False def __ini...
{"hexsha": "caf0f8bd1a7f8812095fd3d6d5b9c282b21f68a0", "size": 1859, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_cellular_automata/forest_fire/operators/ca_DrosselSchwabl.py", "max_stars_repo_name": "elbecerrasoto/gym-automata", "max_stars_repo_head_hexsha": "145e9549029fe8effa827979b3f90016a681fffa", "m...
import os os.environ["CUDA_VISIBLE_DEVICES"] = "-1" from tensorflow.keras.models import load_model import numpy as np import LowLevel_NeuralNet as llnn import numpy_reference import time import csv if __name__ == "__main__": layers = [ llnn.Conv2d("c1", 1, 8, 3), llnn.ReLU(), llnn.Conv2d(...
{"hexsha": "3e83e26b921a7e1ecd182c62b39e5bfd17819c7b", "size": 2200, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/speed.py", "max_stars_repo_name": "ArthurFDLR/LowLevel_NeuralNet", "max_stars_repo_head_hexsha": "90610d521bc0b4e6623b14784e4a00d9ba4a109f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#! /usr/bin/env python2.7 #Socket client example in python from __future__ import print_function import socket #for sockets import sys #for exit import numpy as np import struct #host = '10.0.1.3'; host = '127.0.0.1'; # IP address or host name port = 5001; bufsize = 1000000 # from https://stackoverflow.com/q...
{"hexsha": "da13d915040c09fc1d67686a84145c72ce5ad73e", "size": 3432, "ext": "py", "lang": "Python", "max_stars_repo_path": "VizServer/PythonVizServer/tango-sound-viz-testclient.py", "max_stars_repo_name": "drscotthawley/SoundFieldsForever", "max_stars_repo_head_hexsha": "1b3d28d38bd0eedfe422349f11da39ce597f484d", "max_...
(* File: Moebius_Mu.thy Author: Manuel Eberl, TU München *) section \<open>The M\"{o}bius $\mu$ function\<close> theory Moebius_Mu imports Main "HOL-Number_Theory.Number_Theory" "HOL-Computational_Algebra.Squarefree" Dirichlet_Series Dirichlet_Misc begin definition moebius_mu :: "nat \<Righta...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Dirichlet_Ser...
#define WIN32_LEAN_AND_MEAN #include "client.h" #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include <boost/beast/version.hpp> #include <boost/asio/connect.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/ssl/stream.hpp> #include <boost/asio/ssl.hpp> #include <regex> #include <cstdlib> #i...
{"hexsha": "796b93b344b1b52eef7da36f6bbaa3f538e3f3b0", "size": 8518, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "httpserver/client.cpp", "max_stars_repo_name": "d3roch4/httpserver", "max_stars_repo_head_hexsha": "74c76a7decd56e1e7f9b081aab9031251eea8683", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import scipy.io import h5py import numpy as np from datetime import date from scripts.processes.CreateLonLat import CreateLonLat from scripts.processes.PsFiles import PsFiles from scripts.utils.ArrayUtils import ArrayUtils from tests.MetaTestCase import MetaTestCase class TestPsFiles(MetaTestCase): @cl...
{"hexsha": "023b76f3b5a81ba6a36630b922efb57890bc8111", "size": 6387, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/scripts/processes/test_psFiles.py", "max_stars_repo_name": "Vants/stampsreplacer", "max_stars_repo_head_hexsha": "a61d5174e1ee1d840a327ce6ec059a3a9f84a13b", "max_stars_repo_licenses": ["MIT"...
// Copyright Oliver Kowalke 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TASKS_DETAIL_WORKER_H #define BOOST_TASKS_DETAIL_WORKER_H #include <cstddef> #include <utili...
{"hexsha": "a0814c7dd8adbf2290be6eac3dda7b62de98e379", "size": 5114, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/boost.task/boost/task/detail/worker.hpp", "max_stars_repo_name": "ghisguth/tasks", "max_stars_repo_head_hexsha": "ce04926dbee2ab1204ed34e50dbce53f0303bde1", "max_stars_repo_licenses": ["MIT"], ...
\section{Data Samples} %\label{sec:datasample} % uncomment if label used. In this analysis, the full data collected at $\sqrt{s} = 13$ TeV with the ATLAS Detector in 2015 and 2018 are used, corresponding to an integrated luminosity of 139 ~\ifb. All datasets have been produced using Athena release 21. \begin{itemiz...
{"hexsha": "1765115d60027328c8785eca7d096db66863e50a", "size": 4798, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "include/datasamples.tex", "max_stars_repo_name": "krybacki/IntNote2", "max_stars_repo_head_hexsha": "45b1a7d88ca7b15f19ec25270b6fbbebd839fa0b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import os import rnnSMAP from rnnSMAP import runTrainLSTM import matplotlib.pyplot as plt import numpy as np import imp imp.reload(rnnSMAP) rnnSMAP.reload() ################################################# # intervals temporal test doOpt = [] # doOpt.append('train') doOpt.append('test') # doOpt.append('plotMap') # d...
{"hexsha": "83bcddf6e0b1308b40eaa8b7bf1a5db402f0130f", "size": 4528, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/sigma/int_spatial.py", "max_stars_repo_name": "fkwai/geolearn", "max_stars_repo_head_hexsha": "30cb4353d22af5020a48100d07ab04f465a315b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
The Veterans Affairs Office is for veterans, reservists or dependents of a disabled or deceased veteran. They will help qualified veterans apply and receive their Montgomery G.I. Bill benefits. Students must have copies of their DD240 ready to begin the process. Beginning 2009/2010 academic year, veterans can decid...
{"hexsha": "ca6d9e139aa29c7b03d7d5e338ffdb4de08b3fc5", "size": 1268, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Veterans_Affairs_Office.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_...
// 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 may...
{"hexsha": "332bf69e0733ce94cace06e27721db430a5ee088", "size": 96145, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "be/src/olap/olap_table.cpp", "max_stars_repo_name": "crazyleeyang/incubator-doris", "max_stars_repo_head_hexsha": "85b4619d54ca109a6c6d49dd10541d660ad8058c", "max_stars_repo_licenses": ["Apache-2.0...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 13 18:06:50 2021 @author: romainloirs """ # ---------------------------- ML ----------------------------------- def mean_closest(stop,road_id, adj_mat, n=5): idx = list(adj_mat.index).index(stop) l = list(adj_mat.iloc[idx,:]) ...
{"hexsha": "b2a862cffa04a709306b83152cb19aa701e1ee76", "size": 6558, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ML.py", "max_stars_repo_name": "Rathea0286/routiiens-app", "max_stars_repo_head_hexsha": "46e9f7f14ddbf5d15743673064591aae27b26a22", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
\chapter*{Acknowledgements} \markboth{Acknowledgements}{Acknowledgements} \addcontentsline{toc}{chapter}{Acknowledgements} \bigskip % put your text here \paragraph{} First and foremost, I would like to address my wholehearted thanks to Professor Stephan Morgenthaler who accepted to be the supervisor of my master thesi...
{"hexsha": "d5c915d2f7a1f35a90ccf12bdc8d20c2855d154f", "size": 1624, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/head/acknowledgements.tex", "max_stars_repo_name": "CillianMH/pdmExtremeValueTheory", "max_stars_repo_head_hexsha": "f7a7504c2eca0c6be665bcfc3d98dfee6c02de41", "max_stars_repo_licenses": ["MI...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% calculation of the 'epsgg' matrix for circular holes using %%% analytical expression; the matrix is symmetric, i.e E'=E %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/22808-eigenmodes-in-a-2d-photonic-crystal/ep...
from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Generator import numpy as np class DataSetElement(ABC): @abstractmethod def get_image(self) -> np.ndarray: pass @abstractmethod def get_image_path(self) -> str: pass @abstractmethod def...
{"hexsha": "174c96798cd23a008814537df195437a050e039f", "size": 585, "ext": "py", "lang": "Python", "max_stars_repo_path": "onemetric/cv/loaders/base.py", "max_stars_repo_name": "SkalskiP/onemetric", "max_stars_repo_head_hexsha": "7beb04b1372adc93723ccc8ecaeb0fdf556a2261", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np import pytest from eddington import FittingDataError, linear, random_data A = np.array([1, 2]) def test_residuals_data_columns_names(): data = random_data(linear, a=A) residuals_data = data.residuals(fit_func=linear, a=A) assert ( data.x_column == residuals_data.x_column )...
{"hexsha": "e66e939ab514fc1cc1c6b1b7284ac78d0fb5c1c1", "size": 3170, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/fitting_data/test_residuals_fitting_data.py", "max_stars_repo_name": "EddLabs/eddington_core", "max_stars_repo_head_hexsha": "0923fc7fdf1240181554b2612a97d5708d6244bf", "max_stars_repo_licen...
import numpy as np from Get_global_value import num_q from Get_global_value import J_type from Get_global_value import Ez from Get_global_value import BB from Get_global_value import m0 from Get_global_value import m from Get_global_value import mass from Get_global_value import inertia0 from Get_global_value import in...
{"hexsha": "04eca9f1de693f58ca06a2bb173be421c8a059fb", "size": 2335, "ext": "py", "lang": "Python", "max_stars_repo_path": "calc_vel.py", "max_stars_repo_name": "lirun-sat/spacerobot_dynamics", "max_stars_repo_head_hexsha": "aaefb578cff122c2bfdf506d6a999ded26a48aae", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import os from tensorflow.keras.layers import Dense, Input from tensorflow.keras.models import Model import tensorflow as tf from spektral.layers.pooling import global_pool from spektral.transforms.normalize_adj import NormalizeAdj from spektral.layers import ECCConv class PhaseModel(Model): d...
{"hexsha": "8b2976cf4d1ca5e4431fca3e5ea5460d99acabe8", "size": 4196, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Top2Phase/model.py", "max_stars_repo_name": "moradza/Top2Phase", "max_stars_repo_head_hexsha": "faab7a91bd2fc3b2c03a7b25280c4f1a0b285109", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# -*- coding: utf-8 -*- # coding=utf-8 # Copyright 2019 The SGNMT 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 requir...
{"hexsha": "d9a4591fea4b335fde755e6b2804c36f6e097ec7", "size": 17492, "ext": "py", "lang": "Python", "max_stars_repo_path": "cam/sgnmt/output.py", "max_stars_repo_name": "cmeister747/sgnmt", "max_stars_repo_head_hexsha": "322e217ad0d3538bf2dde12d76ea2651e85352d3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
''' ========================= modelr.SeismicModel.py ========================= Container for handling seismic models. ''' from modelr.constants import WAVELETS, wavelet_duration,\ REFLECTION_MODELS import numpy as np from modelr.web.urlargparse import SendHelp, ArgumentError, \ URLArgumentParser from agileg...
{"hexsha": "8f0ca681048b5939e00669544ddd6b2fdcb7f027", "size": 3275, "ext": "py", "lang": "Python", "max_stars_repo_path": "modelr/SeismicModel.py", "max_stars_repo_name": "ben-bougher/modelr", "max_stars_repo_head_hexsha": "2a3ad38285bad24f5aa05f3ecc4e976dd3147da9", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# -*- coding: utf-8 -*- # BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules # Copyright (C) 2020-2021, Yoel Cortes-Pena <yoelcortes@gmail.com> # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt # for license details...
{"hexsha": "d5edbbd09afbf08597032a138c9ff2edfbeb5c5a", "size": 16583, "ext": "py", "lang": "Python", "max_stars_repo_path": "biosteam/evaluation/_state.py", "max_stars_repo_name": "BioSTEAMDevelopmentGroup/biosteam", "max_stars_repo_head_hexsha": "cc34afdb3b1f57c615c661a642f8f953dbeef744", "max_stars_repo_licenses": ["...
import nevergrad as ng import numpy as np def optimize_params(optim_name, loss_func, num_params, init_values, max_iters, num_workers=1, bounds=None, popsize=None): parametrization = ng.p.Array(init=init_values) if bounds is not None: parametrization.set_bounds(lower=bounds[:, 0], upper=bounds[:, 1]) ...
{"hexsha": "2ae186babad5522c71d67cea4e7cbc8f97f2e99a", "size": 1428, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/grad_free_util.py", "max_stars_repo_name": "eanswer/DiffHand", "max_stars_repo_head_hexsha": "d7b9c068b7fa364935f3dc9d964d63e1e3a774c8", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from flask import Flask, render_template, url_for, flash, redirect from form import RegistrationForm, LoginForm, BookForm, UploadBook, Contact, DeleteBook from recomm import recom from flask_sqlalchemy import SQLAlchemy from PIL import Image import os import pandas as pd import numpy as np from flask_table impo...
{"hexsha": "e36686e40bbc42d7213b5dd43cf50d25b18da7df", "size": 4569, "ext": "py", "lang": "Python", "max_stars_repo_path": "fl/main.py", "max_stars_repo_name": "SahilkK/Book_Recommender_System", "max_stars_repo_head_hexsha": "0471a43ca86d59b3cd373426b570172ddacd9a79", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import matplotlib.pyplot as plt from pynwb.ophys import RoiResponseSeries, DfOverF, PlaneSegmentation, TwoPhotonSeries, ImageSegmentation from pynwb.base import NWBDataInterface from ndx_grayscalevolume import GrayscaleVolume from .utils.cmaps import linear_transfer_function from .utils.dynamictable ...
{"hexsha": "336a3d47ac1c65113f008cf4ff4ab40a0acf0995", "size": 7206, "ext": "py", "lang": "Python", "max_stars_repo_path": "nwbwidgets/ophys.py", "max_stars_repo_name": "d-sot/nwb-jupyter-widgets", "max_stars_repo_head_hexsha": "f9bf5c036c39f29e26b3cdb78198cccfa1b13cef", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"]...
include 'fac.f' c program test c c Exercise A, section 11. c Main program to test factorial function. c integer n, fac 10 continue write(*,*) 'Give n: ' read (*,*) n if (n.gt.0) then write(*,*) n, ' factorial is', fac(n) goto 10 endif c End of ...
{"hexsha": "b920b3473804f81d0f7d9afd3ea243e33d94dc0a", "size": 347, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test_fac.f", "max_stars_repo_name": "JONGHOKim-Raphael/fff", "max_stars_repo_head_hexsha": "bd0c3df4e7a5bcf072b5a28cb7ed46052b2dddd1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# The following contains just abstract types regarding models and "virtual" method #The most basic type, needed in order to support DifferentialEquations.jl abstract type BaseProcess{T <: Number} end # There will inherit from this type just processes, i.e. models that know what is a zeroCurve and a divided abstract t...
{"hexsha": "592e27c9776fa4cae4a5f1cc21e9fcfc0249d520", "size": 3502, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/base_models.jl", "max_stars_repo_name": "rcalxrc08/FinancialMonteCarlo.jl", "max_stars_repo_head_hexsha": "3c7444414ea3a449d3aeb48c182d4c05b37c31b4", "max_stars_repo_licenses": ["MIT"], ...
```python from sympy import * import numpy as np from matplotlib import pyplot as plt x = Symbol('x') # Function y = x**2 # First derivative with respect to x yprime = y.diff(x) # Initial sequence theta = 2 theta2 = 0 # Initiale the step size alpha = .001 iterations = 0 check = 0 precision = 1/100000 iterationsMa...
{"hexsha": "0361b23a28d37973896a1d899b465b06865f3814", "size": 16402, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "NotesAndTutorials/Gradient_univ.ipynb", "max_stars_repo_name": "ChristopherDaigle/ConvexOptimizationWithPython", "max_stars_repo_head_hexsha": "b7a1b5126b076d06ec03e906b19930bf324272...
import warnings import numpy as np import nengo from nengo.dists import Choice, Uniform from nengo.networks.ensemblearray import EnsembleArray from nengo.solvers import NnlsL2nz from nengo.utils.stdlib import nested # connection weights from (Gurney, Prescott, & Redgrave, 2001) class Weights(object): mm = 1 ...
{"hexsha": "0faadeb78d306c6e44410490ce8734d7a44a3b9a", "size": 6950, "ext": "py", "lang": "Python", "max_stars_repo_path": "nengo/networks/actionselection.py", "max_stars_repo_name": "hunse/nengo", "max_stars_repo_head_hexsha": "5fcd7b18aa9496e5c47c38c6408430cd9f68a720", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma...
import keras import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from keras import initializers from keras.datasets import mnist from utils import ( compile_model, create_mlp_model, get_activations, grid_axes_it, ) seed = 10 # Number of points to plot n_train...
{"hexsha": "4ee71209fba925be373c8ae508bb1c0432d8dda5", "size": 2444, "ext": "py", "lang": "Python", "max_stars_repo_path": "articles/neural-network-initialization/plot-activation-layers.py", "max_stars_repo_name": "sangaline/intoli-article-materials", "max_stars_repo_head_hexsha": "b01010ddc769ac20ce492bce478ee49c859c5...
[STATEMENT] lemma execlass_leq_code: "class_leq (set cs) c1 c2 = execlass_leq cs c1 c2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. class_leq (set cs) c1 c2 = execlass_leq cs c1 c2 [PROOF STEP] by (simp add: class_leq_def class_les_def member_def)
{"llama_tokens": 109, "file": "Metalogic_ProofChecker_CheckerExe", "length": 1}
# coding: utf-8 import numpy as np import pandas as pd # import matplotlib.pyplot as plt ## user # 读取user -> feature选择 -> 缺失值填充 -> 对性别编码 -> 归一化 users = pd.read_csv('data/users.csv', sep=',') user_features = ["RESPID","GENDER","AGE","Q1","Q2","Q3","Q4","Q5","Q6","Q7","Q8","Q9","Q10","Q11","Q12","Q13","Q14","Q15","Q16",...
{"hexsha": "9bffef5fe1703099d08485bf7b347861e75940a1", "size": 3552, "ext": "py", "lang": "Python", "max_stars_repo_path": "kaggle/EMI_music/main.py", "max_stars_repo_name": "JayMiao/MLAction", "max_stars_repo_head_hexsha": "fec1c08fa33ed1f5d9b0befecc6dac551cc02302", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# Copyright (c) 2018 Pablo Moreno-Munoz # Universidad Carlos III de Madrid and University of Sheffield import sys import numpy as np import GPy from GPy.inference.latent_function_inference import LatentFunctionInference from GPy.inference.latent_function_inference.posterior import Posterior from GPy.util import choles...
{"hexsha": "c5a1693228c6510b23ef3d6f2c2a790e36385c86", "size": 10160, "ext": "py", "lang": "Python", "max_stars_repo_path": "hetmogp/svmogp_inf.py", "max_stars_repo_name": "skitimoon/HetMOGP", "max_stars_repo_head_hexsha": "85307629a54b70026fbbbccd66c54c9d739173b4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import numpy as np from numpy.testing import * import skimage.graph.mcp as mcp a = np.ones((8, 8), dtype=np.float32) a[1:-1, 1] = 0 a[1, 1:-1] = 0 ## array([[ 1., 1., 1., 1., 1., 1., 1., 1.], ## [ 1., 0., 0., 0., 0., 0., 0., 1.], ## [ 1., 0., 1., 1., 1., 1., 1., 1.], ## [ 1....
{"hexsha": "e3fd45a0aef1a565bc105927a122e123a2a524fc", "size": 5853, "ext": "py", "lang": "Python", "max_stars_repo_path": "skimage/graph/tests/test_mcp.py", "max_stars_repo_name": "RKDSOne/scikit-image", "max_stars_repo_head_hexsha": "baa67eafcace9cde1b94ad2d467e2f2e0468e759", "max_stars_repo_licenses": ["BSD-3-Clause...
// ==================================================================================== // Copyright (c) 2012, ioriiod0@gmail.com All rights reserved. // File : timer.hpp // Author : ioriiod0@gmail.com // Last Change : 11/19/2012 04:15 PM // Description : // ============================================...
{"hexsha": "5968c518004144489df613fc9c4daf95c38c8cd8", "size": 1904, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "orchid/asio/timer.hpp", "max_stars_repo_name": "ioriiod0/orchid", "max_stars_repo_head_hexsha": "347cec6a2b882b8b9c34b83fda360db9dd60bc11", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 68....
/* * Copyright (c) 2017 Cryptonomex, Inc., and contributors. * * The MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
{"hexsha": "8b0f0c591b14373a6be73ab2cceb43ce94c81ff3", "size": 97456, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libraries/app/database_api.cpp", "max_stars_repo_name": "citshares/citshares", "max_stars_repo_head_hexsha": "5fa121d9c6b582158cc043fda93862440515c925", "max_stars_repo_licenses": ["MIT"], "max_sta...
#include <iostream> #include <vector> #include <map> #include <numeric> #include <Eigen/Dense> using HouseProperties = std::map<std::string, double>; struct House { double price; HouseProperties properties; }; struct Model { double constant; std::map<std::string, double> coefs; Model() : const...
{"hexsha": "4d74bad09e29651950e1fe62cbc95c02385396c3", "size": 8990, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "LinearRegression/main.cpp", "max_stars_repo_name": "alxbilger/machinelearningeducation", "max_stars_repo_head_hexsha": "38107124a77506ef5232f054660b1249795807d0", "max_stars_repo_licenses": ["MIT"],...
from pathlib import Path, PurePosixPath import networkx import pytest from fsspec.implementations.http import HTTPFileSystem from fsspec.implementations.local import LocalFileSystem from gcsfs import GCSFileSystem from s3fs.core import S3FileSystem from kedro.extras.datasets.networkx import GraphMLDataSet from kedro....
{"hexsha": "226f92f4f11c8fe7869026ff51b08bcfca5492bf", "size": 7369, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/extras/datasets/networkx/test_graphml_dataset.py", "max_stars_repo_name": "Mu-L/kedro", "max_stars_repo_head_hexsha": "a925fd59187a642e124527f0f1097e92ea8d1819", "max_stars_repo_licenses": [...
import os, re import numpy as np import pandas as pd from metrics import MetricsAccumulator class Disaggregator(): def __init__(self, EVALUATION_DATA_PATH, TARGET_APPLIANCE, ON_POWER_THRESHOLD, MAX_TARGET_POWER, disagg_func, ...
{"hexsha": "6a80c1c1c9555e5a9357ed150ab777c987d053e7", "size": 10194, "ext": "py", "lang": "Python", "max_stars_repo_path": "disaggregator.py", "max_stars_repo_name": "KaibinBao/neuralnilm-pytorch", "max_stars_repo_head_hexsha": "017b85fc921f0638f93a0e16f615028f60b7d279", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# generate toy events # generate 1D gaussians for input features # we also test event number functionality needed for ATLAS reweighting import csv import numpy as np def make_sample(mu=0.,sigma=1.,nevents=1000,start_eventnumber=1): s = np.random.normal(mu, sigma, nevents) # toy event index: enum = np.aran...
{"hexsha": "79b9c8015165a67a9347c92d4d15ffc6151ab22f", "size": 1405, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/inputs/generate_inputs.py", "max_stars_repo_name": "lmijovic/carl-torch", "max_stars_repo_head_hexsha": "bd4e483b3c6a3685a874ba9c33d4dd5be524627d", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np from icdar21_mapseg_eval.point_detection import eval_pt_detect radius_limit = 118 ground_truth = np.float32([ [5710, 1170], # A [8080, 1170], # B [3330, 3530], # C [5710, 3550], # D [8085, 3540], # E [3327, 5922], # F [5715, 5940], # G [8085, 5942]]) # H pre...
{"hexsha": "7938d82847077878d032fd158efb67a9258cdf3a", "size": 3230, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_point_detection.py", "max_stars_repo_name": "soduco/icdar21-mapseg-eval", "max_stars_repo_head_hexsha": "4186395828b5cf16a136f2cea2f946984d062791", "max_stars_repo_licenses": ["MIT"], "...
import os import numpy as np import mujoco_py import matplotlib as mpl mpl.use('Qt4Agg') import matplotlib.pyplot as plt model_path = os.path.join('..','gym_kuka_mujoco','envs','assets', 'full_kuka_mesh_collision.xml') model = mujoco_py.load_model_from_path(model_path) # model.integrator = 0 sim = mujoco_py.MjSim(mode...
{"hexsha": "d6a0ae43b0ee02a9bf6d9d1ecb06054302917331", "size": 2405, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/attic/kuka_model_pd_controller.py", "max_stars_repo_name": "leonmkim/gym-kuka-mujoco", "max_stars_repo_head_hexsha": "ed45ae74d10e69f4e51439de2d1d0c0811623b6b", "max_stars_repo_licenses":...
export Freeflyer # Parameters from: # asl_free_flyer/free_flyer_node/param/robots/enterprise.yaml # asl_free_flyer/free_flyer_control/src/waypoint_py_controller/parameters.py # tribal knowledge mutable struct Freeflyer{T<:AbstractFloat} <: Robot mass_ff_min::T mass_ff_max::T mass_ff::T J_ff::T J_ff_inv::T ...
{"hexsha": "cc617e4e1a3d6502774dbf636dba297bb0edf6b1", "size": 1927, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/robot/freeflyer.jl", "max_stars_repo_name": "schoelst/GuSTO.jl", "max_stars_repo_head_hexsha": "b5753959c2e232c4e91be3e73ec4a81470c703b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
using Pkg Pkg.add("StatsBase") Pkg.add("HDF5") Pkg.add("DataStructures") Pkg.add("NearestNeighbors") Pkg.add("JSON") Pkg.add("Serialization") Pkg.add("CSV") Pkg.add("DataFrames")
{"hexsha": "1711964215d4d066751f977bd11048dc1dfc5639", "size": 180, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "traj_er/t2vec_experience/pkg-install.jl", "max_stars_repo_name": "lzzppp/DERT", "max_stars_repo_head_hexsha": "e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6", "max_stars_repo_licenses": ["MIT"], "max_sta...
# fig_ggn_hyperpolarization.py --- # Author: Subhasis Ray # Created: Tue Feb 12 14:53:34 2019 (-0500) # Last-Updated: Tue Feb 12 15:37:32 2019 (-0500) # By: Subhasis Ray # Version: $Id$ # Code: """Supplementary figures showing GGN hyperpolarization when PN->KC connection is not clustered""" from __futur...
{"hexsha": "2912310c29d7b17be3b5efa38a4c2837ab1ebdf2", "size": 2237, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/fig_ggn_hyperpolarization.py", "max_stars_repo_name": "subhacom/mbnet", "max_stars_repo_head_hexsha": "b0ab55079ed31614f923ee15ed65defae156332b", "max_stars_repo_licenses": ["Unlicense"],...
# This file is a part of BAT.jl, licensed under the MIT License (MIT). # TODO: add plot without Int for overview? function plothistogram(h::StatsBase.Histogram, swap::Bool) if swap return h.weights, h.edges[1][1:end-1] else return h.edges[1][1:end-1], h.weights end end @recipe function f...
{"hexsha": "1a0c4820cee016cc364806d4ed45a6918f86574b", "size": 3906, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/plotting/recipes_MarginalDist_1D.jl", "max_stars_repo_name": "Micki-D/BAT.jl", "max_stars_repo_head_hexsha": "15e470654de300eb99f5b9f5a864764f59ac74db", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from optimizer import Optimizer class Dfp(Optimizer): """ Davidon–Fletcher–Powell algorithm. See https://arxiv.org/pdf/2004.14866.pdf for a convergence proof and see https://en.wikipedia.org/wiki/Davidon-Fletcher-Powell_formula for a general description. Ar...
{"hexsha": "275b21590b0c98385da8fc77a380cbdf95eb8a6d", "size": 2063, "ext": "py", "lang": "Python", "max_stars_repo_path": "quasi_newton/dfp.py", "max_stars_repo_name": "konstmish/opt_methods", "max_stars_repo_head_hexsha": "ae73d9bd89ae5c463e70328d73cbd190175df98c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from math import log10 from time import time import networkx as nx from config import DATA_PATH from util import dump_json, read_json def make_edge_trace(): edge_trace = { "x": [], "y": [], ...
{"hexsha": "05334acf9a2f63cc22121fac477481e000fb9a55", "size": 3758, "ext": "py", "lang": "Python", "max_stars_repo_path": "genre_dag/plot.py", "max_stars_repo_name": "ribbas/music-genre-nw", "max_stars_repo_head_hexsha": "fb6aea2d8cff59d32525b2b4434caf77b6b60079", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# by Lazaro Alonso using CairoMakie let x = 0:0.05:4π fig = Figure(resolution = (600,400), font = "CMU Serif") # probably you need to install this font in your system ax = Axis(fig, xlabel = L"x", ylabel = L"f (x)", ylabelsize = 22, xlabelsize= 22, xgridstyle=:dash, ygridstyle=:dash, xtickalign =...
{"hexsha": "eec0b43463372a02c6a4d0b1dc924cff93170d3a", "size": 909, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "_assets/scripts/latexSample/latexSample.jl", "max_stars_repo_name": "MisterBiggs/BeautifulMakie", "max_stars_repo_head_hexsha": "5e43819d1f2af8b80bf45895bc117cd55197d972", "max_stars_repo_licenses":...
[STATEMENT] lemma rel_spmf_eqI [simp]: "rel_spmf (=) x x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rel_spmf (=) x x [PROOF STEP] by(simp add: option.rel_eq)
{"llama_tokens": 81, "file": "CryptHOL_Misc_CryptHOL", "length": 1}
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Oliver Nash -/ import data.finset.basic /-! # Finsets in product types This file defines finset constructions on the product type `α × β`. Bewa...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/data/finset/prod.lean"}
[STATEMENT] lemma NE_intT_forget: "NE (intT \<sigma>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<exists>a. intT \<sigma> a [PROOF STEP] proof- [PROOF STATE] proof (state) goal (1 subgoal): 1. \<exists>a. intT \<sigma> a [PROOF STEP] obtain b where b: "eintT \<sigma> b" [PROOF STATE] proof (prove) goal (1 sub...
{"llama_tokens": 6418, "file": "Sort_Encodings_T", "length": 76}
## Conversion """ Convert a domain object to a domain object with the given element type `T`. """ convert_domain(::Type{T}, d::Domain{T}) where {T} = d convert_domain(::Type{T}, d::Domain{S}) where {S,T} = convert(Domain{T}, d) convert_domain(::Type{T}, d) where {T} = _convert_domain(T, d, eltype(d)) _convert_domain...
{"hexsha": "5575e7fe497a4f3747a36084aff7c5c5695a5d9e", "size": 1360, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/generic/promotion.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/DomainSets.jl-5b8099bc-c8ec-5219-889f-1d9e522a28bf", "max_stars_repo_head_hexsha": "8caa1870145e15e07abeda96ffe8408...
""" Source: https://github.com/JBlumstein/NYCParking/blob/master/NYC_Parking_Violations_Mapping_Example.ipynb NYC parking ticket violations Usage: mpiexec -n [cores] python nyc-parking.py Data for 2016 and 2017 is in S3 bucket (s3://bodo-examples-data/nyc-parking-tickets) or you can get data from https://www.k...
{"hexsha": "8f432f656684d4dd82b36b737471d84aeec65606", "size": 6153, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/nyc-parking/nyc-parking.py", "max_stars_repo_name": "prutskov/Bodo-examples", "max_stars_repo_head_hexsha": "7c96e89f3ac9062eb598b99da2729718007b8e4d", "max_stars_repo_licenses": ["Apache...
"""Utilities for BERT trainer.""" import functools from typing import Any, Dict, Tuple, Optional, Mapping, Union, List from absl import logging from clu import metric_writers import flax from flax import jax_utils import flax.linen as nn import jax import jax.numpy as jnp import jax.profiler import ml_collections imp...
{"hexsha": "7ffccb9ba5dc2de61cd0dab29d8b8be83d2195b5", "size": 13605, "ext": "py", "lang": "Python", "max_stars_repo_path": "scenic/projects/baselines/bert/train_utils.py", "max_stars_repo_name": "techthiyanes/scenic", "max_stars_repo_head_hexsha": "05585b1189364e29d82413b9d4a50ffa8c246f0c", "max_stars_repo_licenses": ...
\section{Evalutation} This final sections acts as an evaluation of the success of the Taxicoin project, both as a protocol and an implementation. \subsection{Completeness of Requirements} While Taxicoin does have defined behaviour for all perceived \enquote{normal} behaviours of drivers and riders, it is difficult t...
{"hexsha": "adf3381315534d01e1c228a7b16d6782351f8de5", "size": 7767, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/tex/evaluation.tex", "max_stars_repo_name": "sprusr/taxicoin", "max_stars_repo_head_hexsha": "3f0fd26841992aa47d5e4f6fce56de4b56452f30", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Detection Training Script. This scripts reads a given config file and runs the training or evaluation. It is an entry point that is made to train standard models in detectron2. In order to let one script support training of many models, this s...
{"hexsha": "dee7a9ba203c3650d26b4671873fedc246ae734a", "size": 35651, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/train_net.py", "max_stars_repo_name": "quangvy2703/ABCNet-ESRGAN-SRTEXT", "max_stars_repo_head_hexsha": "952c3c3b4df9f974ddc09ec6d613c302d66a3a57", "max_stars_repo_licenses": ["BSD-2-Clause...
record R : Set₁ where field ⟨_+_⟩ : Set open R -- Name parts coming from projections can not be used as part of -- variables. F : Set → Set F + = +
{"hexsha": "6b5d74906bf1525e78827d4e05267f9309f25f5f", "size": 157, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/Issue3400-3.agda", "max_stars_repo_name": "cruhland/agda", "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" This is a script to convert the predictions to regions ------------------------------------- Author: Sushanth Kathirvelu """ import json import matplotlib.pyplot as plt from numpy import array, zeros import numpy as np from scipy.misc import imread, imsave from PIL import Image mask = Image.open('../../training_ma...
{"hexsha": "e4450edfc9b1370d383981f5201879e14eefe613", "size": 685, "ext": "py", "lang": "Python", "max_stars_repo_path": "exploration/regions.py", "max_stars_repo_name": "dsp-uga/team-coombs", "max_stars_repo_head_hexsha": "bcf875e03b2b8986a6361cb9606059e75af3df51", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Python code for rank aggregation, for both full and partial lists. For methods/algorithms I have followed the paper "Rank aggregation methods for the web" (2001) C. Dwork, R. Kumar, M. Naor, D. Sivakumar. Proceedings of the 10th international conference on World Wide Web. Created May 22, 2015 @author: Kevin S. ...
{"hexsha": "36ace85d3d41b200a1274c63f01915d0638e1b32", "size": 24386, "ext": "py", "lang": "Python", "max_stars_repo_path": "rankagg.py", "max_stars_repo_name": "thelahunginjeet/pyrankagg", "max_stars_repo_head_hexsha": "8eb68eda46059c3ae1780e5672d198731889c547", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
import csv import os.path import numpy as np import pandas as pd COLUMNS = { 'txNomeParlamentar': 'congressperson_name', 'ideCadastro': 'congressperson_id', 'nuCarteiraParlamentar': 'congressperson_document', 'nuLegislatura': 'term', 'sgUF': 'state', 'sgPartido': 'party', 'codLegislatura'...
{"hexsha": "4eae6d504385c22917a5dd630396d7e12b7f5d00", "size": 5324, "ext": "py", "lang": "Python", "max_stars_repo_path": "serenata_toolbox/chamber_of_deputies/reimbursements_cleaner.py", "max_stars_repo_name": "luizfzs/serenata-toolbox", "max_stars_repo_head_hexsha": "73efa9401cb562be2b8f7df74b49aee25727e181", "max_s...
/* * FieldManagerLIst.cpp * * Created on: Oct 26, 2012 * Author: "James C. Sutherland" * * Copyright (c) 2012-2017 The University of Utah * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in ...
{"hexsha": "8e48676e5ef6028aaed036cda96596035910f8a1", "size": 4538, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "expression/FieldManagerList.cpp", "max_stars_repo_name": "MaxZZG/ExprLib", "max_stars_repo_head_hexsha": "c35e361ef6af365e7cd6afca6548595693bd149a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using Combinatorics # Part 1 # Load input expenses = open("day01_input.txt") do f [parse(Int32, line) for line in eachline(f)] end # See which pair sum to 2020 and multiply them for (value1, value2) in combinations(expenses, 2) if value1 + value2 == 2020 println("Product of $value1 and $value2: $(valu...
{"hexsha": "d86f8f89acc869659f57bedc47afea10847f3a5b", "size": 529, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2020/day01.jl", "max_stars_repo_name": "ericgreveson/adventofcode", "max_stars_repo_head_hexsha": "6671ef8c16a837f697bb3fb91004d1bd892814ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
import logging import multiprocessing import pickle import warnings from abc import ABCMeta, abstractmethod from concurrent.futures.process import ProcessPoolExecutor from dataclasses import asdict, dataclass, is_dataclass from itertools import chain from math import isclose from pathlib import Path from typing import ...
{"hexsha": "e03eb4476f08f0c0c1fa69c10bb6b4ef700aaadb", "size": 30871, "ext": "py", "lang": "Python", "max_stars_repo_path": "lhotse/features/base.py", "max_stars_repo_name": "jtrmal/lhotse", "max_stars_repo_head_hexsha": "db9f42bd9171616f92c41f4d9a56b29998c9dedf", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
[STATEMENT] lemma path_connected_Iio[simp]: "path_connected {..<a}" for a :: real [PROOF STATE] proof (prove) goal (1 subgoal): 1. path_connected {..<a} [PROOF STEP] by (simp add: convex_imp_path_connected)
{"llama_tokens": 82, "file": null, "length": 1}
module trigd implicit none contains function sind(x) real*4 sind, x, pi180_sp pi180_sp=2.0e0 * asin(1.0e0) / 180.0e0 sind = sin(pi180_sp * x) end function sind function dsind(x) real*8 dsind, x, pi180_dp pi180_dp=2.0d0 * asin(1.0d0) / 180....
{"hexsha": "6bc3f16b51619653673d7175dbd41b22376049ef", "size": 1472, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "bin/db/dbmoment/DREGERS_MTPACKAGE/mtmanip_module.f", "max_stars_repo_name": "jreyes1108/antelope_contrib", "max_stars_repo_head_hexsha": "be2354605d8463d6067029eb16464a0bf432a41b", "max_stars_repo...
[STATEMENT] lemma (in Module) gen_mHom_eq:"\<lbrakk>R module N; generator R M H; f \<in> mHom R M N; g \<in> mHom R M N; \<forall>h\<in>H. f h = g h \<rbrakk> \<Longrightarrow> f = g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>R module N; generator R M H; f \<in> mHom R M N; g \<in> mHom R M N; \...
{"llama_tokens": 9110, "file": "Group-Ring-Module_Algebra8", "length": 22}
from cdlib import BiNodeClustering import networkx as nx from cdlib.utils import convert_graph_formats __all__ = ['bimlpa'] def bimlpa(g, theta=0.3, lambd=7): """ BiMLPA is designed to detect the many-to-many correspondence community in bipartite networks using multi-label propagation algorithm. :para...
{"hexsha": "c18728b590cc4429d58b1d764269cc2385b21294", "size": 1310, "ext": "py", "lang": "Python", "max_stars_repo_path": "cdlib/algorithms/biparitte_clustering.py", "max_stars_repo_name": "deklanw/cdlib", "max_stars_repo_head_hexsha": "cc2d5da032842882e530ac1b9038db07d1293526", "max_stars_repo_licenses": ["BSD-2-Clau...
import re import torch from torch import nn import os from .ELMoForManyLangs import elmo from .postprocessing import _run_word_segmentation_with_dictionary, construct_dictionary import numpy as np import math import json def sort_list(li, piv=2,unsort_ind=None): ind = [] if unsort_ind == None: ...
{"hexsha": "261bc6faf444146641834446828696e9c4ed232d", "size": 11559, "ext": "py", "lang": "Python", "max_stars_repo_path": "pywordseg/pywordseg.py", "max_stars_repo_name": "berzi/pywordseg", "max_stars_repo_head_hexsha": "df8e0dc76ddfcca46ce416ae377009a95df9c27f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import torch from scipy.integrate import quad from scipy.stats import norm, lognorm from abc import ABC, abstractmethod def bs_binary_aon(spot, strike, expiry, r, sigma): """Computes the true value of a binary asset-or-nothing option under Black-Scholes assumptions :param spot: float ...
{"hexsha": "5226c6c4a211ecbdcf7360a1fee7bb9e40128bfd", "size": 7188, "ext": "py", "lang": "Python", "max_stars_repo_path": "sde_mc/options.py", "max_stars_repo_name": "Piers14/sde_mc", "max_stars_repo_head_hexsha": "0bdab1fe39667b36516d5543d0d7099466ba90b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
from __future__ import print_function from __future__ import division import numpy as np from matplotlib import pyplot as plt def vote_peaks(signal, filter_size=1,passes=2,threshold=.8): """ Input: signal : dictionary, contains two_theta, d_spacings, and input_vector arrays p...
{"hexsha": "980004880a73b14320d0b904c2fb328ff2eec44b", "size": 3839, "ext": "py", "lang": "Python", "max_stars_repo_path": "PeakFinding.py", "max_stars_repo_name": "MatthewGong/DiffractionClassification", "max_stars_repo_head_hexsha": "68be6cf3960f09388253c79bab13cbd9dc07edbb", "max_stars_repo_licenses": ["MIT"], "max_...
! ! Copyright (C) 2013, Northwestern University and Argonne National Laboratory ! See COPYRIGHT notice in top-level directory. ! ! This is part of the PnetCDF package. ! ! $Id: f90tst_parallel3.f90 2512 2016-09-29 01:29:37Z wkliao $ ! This program tests PnetCDF parallel I/O from ! fortran. It creates...
{"hexsha": "8d622a69e67eefac933eb48be9484714ab02bee5", "size": 7295, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/libs/pnetcdf/tests/f90tst_parallel3.f90", "max_stars_repo_name": "utdsimmons/ohpc", "max_stars_repo_head_hexsha": "70dc728926a835ba049ddd3f4627ef08db7c95a0", "max_stars_repo_licenses": ["A...