text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
__doc__ = \ """ Calibrate multiple Intel RealSense D4XX cameras to a single global coordinate system using a defined checkerboard Distributed as a module of DynaMo: https://github.com/anderson-cu-bioastronautics/dynamo_realsense-capture """ #############################################################################...
{"hexsha": "0f9cd90fdd904b62f2a4cb7ca3b2624833ac73c6", "size": 15911, "ext": "py", "lang": "Python", "max_stars_repo_path": "dynamo/calibration.py", "max_stars_repo_name": "anderson-cu-bioastronautics/dynamo_realsense-capture", "max_stars_repo_head_hexsha": "48f39afa41dfc18f444fe3b16ca451ab59ace62c", "max_stars_repo_li...
""".""" import time as _time import numpy as np from siriuspy.epics import PV from siriuspy.devices import DCCT, SOFB from ..optimization import PSO, SimulAnneal class Septum: """.""" def __init__(self): """.""" self.sp = 'TB-04:PM-InjSept:Kick-SP' self.rb = 'TB-04:PM-InjSept:Kick-...
{"hexsha": "5687e7577d0c01ab7522b6d64391df3a4be95d3f", "size": 7967, "ext": "py", "lang": "Python", "max_stars_repo_path": "apsuite/commisslib/posang_injbo_opt.py", "max_stars_repo_name": "carneirofc/apsuite", "max_stars_repo_head_hexsha": "1bbaa44ec6b89f50201790d6fab05c32729db6e1", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import wget import logging import requests from bs4 import BeautifulSoup from urllib import parse from recolo import list_files_in_folder import os import pathlib cwd = pathlib.Path(__file__).parent.resolve() """" This module provides data from an impact hammer experiment where the hammer was knoc...
{"hexsha": "8c45c01e537a093ab4a725407bd8dc7ae84b4a57", "size": 4815, "ext": "py", "lang": "Python", "max_stars_repo_path": "recolo/demoData/dataverseData.py", "max_stars_repo_name": "PolymerGuy/recon", "max_stars_repo_head_hexsha": "14d66e3d5cb5fcc4868df326b045952daf139291", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import pandas as pd from pathlib import Path import json root_dir = Path('__file__').resolve().parent data_dir = root_dir / "data" / "preprocessed" data_name = "data.csv" train_name = "train.csv" test_name = "test.csv" domain_name = "domain.json" config_name = "config.json" def write_data(config,...
{"hexsha": "c0c8a1ef58cecfdb2e6f04413e4f441a62b7b223", "size": 17886, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/script/generate_synthetic_data.py", "max_stars_repo_name": "FumiyukiKato/HDPView", "max_stars_repo_head_hexsha": "9e70ec567086375764fb4adf7ecd879947a48b1b", "max_stars_repo_licenses": ["Apach...
import numpy as np fish = np.genfromtxt("../input/day6.txt", delimiter=",") fish = np.array([np.sum(fish == n) for n in range(0, 9)]) for n in [80, 256 - 80]: for _ in range(n): fish = np.roll(fish, -1) fish[6] += fish[8] print(np.sum(fish))
{"hexsha": "0f949cf70417f831dafaa4e58cfc1d039b6e874d", "size": 269, "ext": "py", "lang": "Python", "max_stars_repo_path": "fifty-six/day6/day6.py", "max_stars_repo_name": "BasedJellyfish11/Advent-of-Code-2021", "max_stars_repo_head_hexsha": "9ed84902958c99c341ec2444d5db561c84348911", "max_stars_repo_licenses": ["MIT"],...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to 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) #ifnd...
{"hexsha": "a365ccf90a00600c1d6950f1916444f17202aa88", "size": 1756, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "CranApp/R-Portable/App/R-Portable/library/BH/include/boost/geometry/algorithms/detail/overlay/calculate_distance_policy.hpp", "max_stars_repo_name": "singhmanish979/Trend-Analytics", "max_stars_repo...
import argparse import multiprocessing import os import subprocess import tempfile from functools import partial from pathlib import Path from typing import Tuple import matplotlib.pyplot as plt import numpy from mlxtk import plot, units from mlxtk.cwd import WorkingDir from mlxtk.inout.dmat2 import read_dmat2_gridre...
{"hexsha": "0136a00c3ee31e409550d55a631697f774948e5d", "size": 2920, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlxtk/scripts/dmat2_gridrep_video.py", "max_stars_repo_name": "f-koehler/mlxtk", "max_stars_repo_head_hexsha": "373aed06ab23ab9b70cd99e160228c50b87e939a", "max_stars_repo_licenses": ["MIT"], "max_...
/* * 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) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2013-2018, 2020-2021 Andrey Semashev */ /*! * \file atomic/detail...
{"hexsha": "c5387f461a459be4507c59b00dad4be7859b0c34", "size": 5638, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "lib/boost_1.78.0/boost/atomic/detail/bitwise_cast.hpp", "max_stars_repo_name": "LaudateCorpus1/math", "max_stars_repo_head_hexsha": "990a66b3cccd27a5fd48626360bb91093a48278b", "max_stars_repo_licens...
import math import os import random import shutil import time from datetime import datetime from logging import warning import numpy as np import pandas as pd # spark_location = '/Users/Leo/spark-2.4.3-bin-hadoop2.7' # Set your own # java8_location = '/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/...
{"hexsha": "0fd03ddf12a6e48f76fc917e317042d806e96e56", "size": 31275, "ext": "py", "lang": "Python", "max_stars_repo_path": "brainex/experiments/harvest_setup.py", "max_stars_repo_name": "ebuntel/BrainExTemp", "max_stars_repo_head_hexsha": "991038155a6e9289af90da3d800210841ef23ff1", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import argparse import cv2 from paddle.inference import Config from paddle.inference import create_predictor from paddle.inference import PrecisionType # this is a simple resnet block for dynamci test. def init_predictor(args): config = Config('./model') config.enable_memory_optim() co...
{"hexsha": "3766fd5256a7e797c54c1bc4e778fd29c41f3157", "size": 3428, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle_trt/infer_trt_ernie.py", "max_stars_repo_name": "wangjiawei04/Paddle-Inference-Demo", "max_stars_repo_head_hexsha": "b00529f076ae628a8e0c95b10d9ce10259df1103", "max_stars_repo_licens...
# Copyright (c) 2021 Oleg Polakow. All rights reserved. # This code is licensed under Apache 2.0 with Commons Clause license (see LICENSE.md for details) """Base plotting functions. Provides functions for visualizing data in an efficient and convenient way. Each creates a figure widget that is compatible with ipywidg...
{"hexsha": "71d86ab4c588644f41e08be92337ca8f57a289c8", "size": 34072, "ext": "py", "lang": "Python", "max_stars_repo_path": "vectorbt/generic/plotting.py", "max_stars_repo_name": "lmservas/vectorbt", "max_stars_repo_head_hexsha": "be3ac88b7ed50834db599b3fd53a8421dfa480ed", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import os, sys import time BASE_DIR = os.path.dirname(o...
{"hexsha": "e4782ef67700d7ead54b633ce4ee1b5d157c40e2", "size": 13183, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cad_proposal_module.py", "max_stars_repo_name": "jeonghyunkeem/cs492h", "max_stars_repo_head_hexsha": "6fc550cf9e907e38d768315ea7ffbf239a215565", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- """ Created on Tue Apr 4 22:02:20 2017 @author: cvpr Sort and save weighted patches """ import cv2 import numpy as np import os prewitt_img_path = '../data/Imageset/prewitt_images/' #path to gradient image saliency_img_path = '../data/Imageset/saliency_images/' #path to salien...
{"hexsha": "f4d15ef7d982cb568812a30e9cb8204fcca5d2ef", "size": 1720, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/choose_patches.py", "max_stars_repo_name": "JayMarx/VSBIQA", "max_stars_repo_head_hexsha": "9dc949038163b9d584253312df54f9b667b995d1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import unittest import numpy as np import tensorflow as tf from segelectri.data_loader.utils.manipulate_img_op import generate_crop_boxes, get_available_stuff, split_img_op class TestManipulateImgOp(unittest.TestCase): def test_get_available_stuff(self): self.assertEqual([1], get_available_stuff(1024, 1...
{"hexsha": "5d504dedf480c40f649e44636a75a2b6b7d44a43", "size": 1707, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_data_loader/test_utils/test_manipulate_img_op.py", "max_stars_repo_name": "imabackstabber/segment-with-nn", "max_stars_repo_head_hexsha": "0c45561be3d19fe37321716f526cf706f81ec42f", "max...
import torch import numpy as np import torch.nn as nn import pickle import os from sample_generator import sample_generator from iterative_classifier import iterative_classifier # Parameters NR = 64 NT_list = np.arange(16, 33) NT_prob = NT_list/NT_list.sum() mod_n = 16 d_transmitter_encoding = NR d_model = 512 n_head...
{"hexsha": "58af41aadf88f077cce417254a01801ba6689ce1", "size": 6989, "ext": "py", "lang": "Python", "max_stars_repo_path": "iid_channels/qam_16/re-mimo/train_classifier.py", "max_stars_repo_name": "dannis999/RE-MIMO", "max_stars_repo_head_hexsha": "199ddec7f142ba5bd87e76e0b5f7790c64e69b0c", "max_stars_repo_licenses": [...
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "56e3b7bbba14fa94f4d029794c68ee3746c022bb", "size": 3793, "ext": "py", "lang": "Python", "max_stars_repo_path": "paddlevideo/loader/dataset/ms_tcn_dataset.py", "max_stars_repo_name": "Simon-liusheng/PaddleVideo", "max_stars_repo_head_hexsha": "6c35b68bc745c659813d6517eecade9c9508a628", "max_stars_repo_licens...
[STATEMENT] lemma JHS_Tr1_6:" \<lbrakk>Group G; 0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r * s - Suc 0; Suc (rtos r s i) < r * s\<rbrakk> \<Longrightarrow> ((Gp G (cmp_rfn G r f s g i)) / (cmp_rfn G r f s g (Suc i))) \<cong> ((Gp G (g (Suc (rtos r s i div r)) \<diamondop>\<^bsub>G\<^esub> (...
{"llama_tokens": 48341, "file": "Group-Ring-Module_Algebra3", "length": 71}
#include <boost/local_function/aux_/add_pointed_const.hpp>
{"hexsha": "47584a114af94a1a811e2b88ad3660355856d066", "size": 59, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_local_function_aux__add_pointed_const.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_lice...
import gtable as gt import numpy as np import pandas as pd class TimeSuite: def setup(self): self.df1_s = pd.DataFrame({'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B1', 'B2', 'B3'], 'C': ['C0', 'C1', 'C2', 'C3'], ...
{"hexsha": "263450ef31c532db1772467c4723505220692303", "size": 4179, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/benchmark_outer_join.py", "max_stars_repo_name": "guillemborrell/gtable", "max_stars_repo_head_hexsha": "f03d9b208916c566e8033f7d8535dbc527b8dc38", "max_stars_repo_licenses": ["BSD-3-Cl...
from __future__ import print_function, division import numpy as np import sounddevice as sd import samplerate as sr from fifo import FIFO class OutputProcessor(object): """Basic output processor. Passes samples through by multiplying with `input_gain` and `output_volume`. """ def __init__(self, in...
{"hexsha": "a369448579b26a1563911a34e7c15b65a978822e", "size": 4628, "ext": "py", "lang": "Python", "max_stars_repo_path": "soundbridge.py", "max_stars_repo_name": "tuxu/soundbridge", "max_stars_repo_head_hexsha": "31b4381e3d86b0bbe5d603a576cc1581a7fe8320", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#!/usr/bin/env python __author__ = "Benjamin Quici, Ross J. Turner" __date__ = "25/02/2021" """ Helper functions and classes for synchrofit's core modules. """ import logging import numpy as np logging.basicConfig(format="%(levelname)s (%(funcName)s): %(message)s") logger = logging.getLogger(__name__) logger.setLev...
{"hexsha": "6750cf1ab8619f2e21413d6e592129607b473037", "size": 15965, "ext": "py", "lang": "Python", "max_stars_repo_path": "sf/helpers.py", "max_stars_repo_name": "synchrofit/synchrofit", "max_stars_repo_head_hexsha": "9c60117b4753b9b599709c5bba4f38e992d15f20", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12...
#!/usr/bin/python import os import sys import glob import numpy as np from Bio import SeqIO from collections import defaultdict from Bio.SeqUtils.ProtParam import ProteinAnalysis as PA def Mut2ID(Mut, WTseq, residues): ID = '' for residue, aa in zip(residues, WTseq): if str(residue) in Mut: ID += Mut.rsplit(st...
{"hexsha": "e12cd4f8cc203f7145b95a322aba6280351d89af", "size": 3896, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/compile_fit_result.py", "max_stars_repo_name": "Wangyiquan95/NA_EPI", "max_stars_repo_head_hexsha": "140b3f1f6675717560c486830b9c099f22c300d6", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: utf-8 -*- from functools import reduce from itertools import zip_longest from math import ceil from math import floor from math import log from scipy import ndimage import numpy as np def morton_array(shape): """ Return array with Morton numbers. Inspired by: https://graphics.stanford...
{"hexsha": "e8570108c2af23f6389ee50dbc72cfa39f54cc83", "size": 5403, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/threedidepth/morton.py", "max_stars_repo_name": "nens/threedidepth", "max_stars_repo_head_hexsha": "dbe38acc745202f39741b607000f3d3b1611d434", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import random import numpy as np import tensorflow as tf class ReplayMemory: def __init__(self, capacity, transition_length): self.size = capacity self.memory = np.zeros((capacity, transition_length), dtype=np.float32) self.pointer = 0 def remember(self, state, action, reward, next_...
{"hexsha": "8baee0c25d4dff03abbc987bebd0f809356db968", "size": 4576, "ext": "py", "lang": "Python", "max_stars_repo_path": "dqn/tic_tac_toe/agent.py", "max_stars_repo_name": "ViacheslavBobrov/ReinforcementLearning", "max_stars_repo_head_hexsha": "4e64231fb22d92b7bb8210be02a48cb4330ae65d", "max_stars_repo_licenses": ["M...
""" Implement Logistic regression/perceptron algorithm for classification. The implementation, should have a fit method that accepts a list of lists of features, and a list of corresponding targets each a 1-hot encoded list for the correct class. The trained model should have a predict method that accepts a single set...
{"hexsha": "0a5958eece8b68fa55abfb3344a2a897af4637b4", "size": 5406, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/logistic_regression.py", "max_stars_repo_name": "mohamedabdelbary/algo-exercises", "max_stars_repo_head_hexsha": "3b2b700453c010f61c0d4099762727e988e2b124", "max_stars_repo_licenses": ["MIT...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Astronomical and physics constants in SI units. See :mod:`astropy.constants` for a complete listing of constants defined in Astropy. """ import numpy as np from .constant import Constant, EMConstant # PHYSICAL CONSTANTS class CODATA2014(Constant)...
{"hexsha": "f4604df2256b9280f0b86ade9b3a12aa1245b723", "size": 3680, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/constants/codata2014.py", "max_stars_repo_name": "b1quint/astropy", "max_stars_repo_head_hexsha": "a170a74739e4356c169429a42e554f9777b53f4d", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
#%% import imp import numpy as np import pandas as pd import matplotlib.pyplot as plt import anthro.viz import anthro.tessellation as tess import shapely import scipy.spatial from shapely.geometry import LineString, MultiLineString, MultiPoint, Point from shapely.geometry import Polygon, box, MultiPolygon from shapel...
{"hexsha": "20edeaf3dda02dddeb555ab9e8097c8edb029c98", "size": 2220, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/exploratory/voronoi_treemap.py", "max_stars_repo_name": "ilopezgp/human_impacts", "max_stars_repo_head_hexsha": "b2758245edac0946080a647f1dbfd1098c0f0b27", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma distinct_list_of_dlist: "distinct (list_of_dlist (dxs :: 'a set_dlist))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. distinct (list_of_dlist dxs) [PROOF STEP] using list_of_dlist[of dxs] equal.equal_eq[OF equal_ceq] [PROOF STATE] proof (prove) using this: list_of_dlist dxs \<in> {xs. equal_bas...
{"llama_tokens": 216, "file": "Containers_DList_Set", "length": 2}
import DataFrames import PredictMD import Test x = Union{Missing, String}["foo", "bar", "foo", missing, "bar"] Test.@test( length(PredictMD.get_unique_values(x; skip_missings = true)) == 2 ) Test.@test( length(PredictMD.get_unique_values(x; skip_missings = false)) == 3 ) Test.@test( length(Predict...
{"hexsha": "13592b2756c2a509fb27f75da785714b9c33feff", "size": 1055, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/unit/toplevel/utils/constant_columns.jl", "max_stars_repo_name": "bcbi/PredictMD.jl", "max_stars_repo_head_hexsha": "7a68061b6e67ddbc217622c5432e73145c4a9392", "max_stars_repo_licenses": ["MIT...
import numpy as np import pytest import numpy.testing as npt from pulse2percept.implants.base import ProsthesisSystem from pulse2percept.implants.bvt import BVT24, BVT44 @pytest.mark.parametrize('x', (-100, 200)) @pytest.mark.parametrize('y', (-200, 400)) @pytest.mark.parametrize('rot', (-45, 60)) @pytest.mark.parame...
{"hexsha": "7ff7c14537d7307104d73144f766863f44faec22", "size": 5324, "ext": "py", "lang": "Python", "max_stars_repo_path": "pulse2percept/implants/tests/test_bvt.py", "max_stars_repo_name": "narenberg/pulse2percept", "max_stars_repo_head_hexsha": "ca3aaf66672ccf3c9ee6a9a9d924184cdc6f031d", "max_stars_repo_licenses": ["...
from __future__ import division from simulate_queue import simulate_queue from parameter_inference import param_inference import numpy as np import matplotlib.pyplot as plt import pdb import scipy.io from adaptive_breakpoint_placement import adaptive_breakpoint_placement from interp1 import interp1 from unique_last imp...
{"hexsha": "83c71fd30aa64ed5f253de23f7db4c0e6a39205d", "size": 2917, "ext": "py", "lang": "Python", "max_stars_repo_path": "occupant/occupancy/queueing/test_functions.py", "max_stars_repo_name": "YangyangFu/MPCPy", "max_stars_repo_head_hexsha": "c9980cbfe7b5ea21b003c2c0bab800099dccf3f1", "max_stars_repo_licenses": ["BS...
import numpy as np from scipy import stats import matplotlib matplotlib.use("PDF") import matplotlib.pyplot as plt if __name__ == "__main__": timesteps = np.array([0.1, 0.05, 0.025, 0.01, 0.005, ...
{"hexsha": "a3a5c1374561c8570674ecf511affbc26cf45cf1", "size": 5520, "ext": "py", "lang": "Python", "max_stars_repo_path": "order_estimation.py", "max_stars_repo_name": "rnowling/integrator-experiments", "max_stars_repo_head_hexsha": "e8131f21f29ac2cec2cf28504634b49b2c20be98", "max_stars_repo_licenses": ["Apache-2.0"],...
# 2017.12.16 by xiaohang import sys from caffenet import * import numpy as np import argparse import torch.nn as nn from torch.autograd import Variable from torch.nn.parameter import Parameter import time def load_image(imgfile): image = caffe.io.load_image(imgfile) transformer = caffe.io.Transformer({'data': ...
{"hexsha": "02699dec068783e5ad42155542c00f64bd3f96e3", "size": 6507, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/caffe_to_pytorch/convertor_tool/pytorch_caffe/verify_deploy.py", "max_stars_repo_name": "best-of-acrv/unsupervised_depth_estimation", "max_stars_repo_head_hexsha": "4d28cd531988560b93ba7b499...
% PURPOSE: Loads current ERP structure (if any) from de the workspace. % Otherwise, load ALLERP(CURRENTERP); Otherwise ERP = []; % % To avoid clearing an already filled ERP structure after an interrupted % process (for instance, after an error) % % *** This function is part of ERPLAB Toolbox ...
{"author": "ucdavis", "repo": "erplab", "sha": "e4f66f7a512c4dee2f7596982318e44bb1b72644", "save_path": "github-repos/MATLAB/ucdavis-erplab", "path": "github-repos/MATLAB/ucdavis-erplab/erplab-dd2f60aa41b01c866fcec342efafc48323523cc2/functions/preloadALLERP.m"}
[STATEMENT] lemma ad_fun_as2 [simp]: "kad (f \<circ>\<^sub>K g) \<squnion> kad (f \<circ>\<^sub>K kad (kad g)) = kad (f \<circ>\<^sub>K kad (kad g))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. kad (f \<circ>\<^sub>K g) \<squnion> kad (f \<circ>\<^sub>K kad (kad g)) = kad (f \<circ>\<^sub>K kad (kad g)) [PROOF ST...
{"llama_tokens": 173, "file": "Transformer_Semantics_Kleisli_Quantaloid", "length": 1}
from __future__ import unicode_literals from StringIO import StringIO import numpy from pandas import DataFrame, pandas from qcache.qframe.common import unquote, MalformedQueryException from qcache.qframe.context import set_current_qframe from qcache.qframe.query import query from qcache.qframe.update import update_...
{"hexsha": "7a80f5db643232f51aba536c0ce8c57533ba2a03", "size": 3076, "ext": "py", "lang": "Python", "max_stars_repo_path": "qcache/qframe/__init__.py", "max_stars_repo_name": "tobgu/qcache", "max_stars_repo_head_hexsha": "331cd23f69a44824f86e0912f796cbc54e03b037", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# This file is sometimes included as a standalone script, but we need some of # the values from bundlepaths.jl if !(@isdefined BUNDLES_PATH) include("./bundlepaths.jl") end # Avoid namespace pollution with let let package_dir = dirname(@__DIR__) # NodeJS isn't a hard requirement of WebIO, but is needed to...
{"hexsha": "9fd2a6de4fd114f0077de4b239d8c083d1acda08", "size": 2821, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deps/_bundlejs.jl", "max_stars_repo_name": "UnofficialJuliaMirror/WebIO.jl-0f1e0344-ec1d-5b48-a673-e5cf874b6c29", "max_stars_repo_head_hexsha": "289ac08b2d64e0f4dd3d6fc33beabf63c3ce43a5", "max_star...
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from matplotlib2tikz import save as tikz_save from enum import Enum class PlotterType(Enum): MATRIX = 1 SCATTER = 2 HISTOGRAM = 3 TRACE = 4 PLOT = 5 MULTITRACE = 6 BAR = 7 class Plotter: def __init__(self, t...
{"hexsha": "ada3349a0b8d561beb71457fae0e01d77192754b", "size": 8497, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotter/plotter.py", "max_stars_repo_name": "davidelbaze/plotter", "max_stars_repo_head_hexsha": "79871d87b6d1d35ce72159e664dd4e09eef559b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
\documentclass{article} \usepackage{amssymb} \usepackage{courier} \usepackage{fancyhdr} \usepackage{fancyvrb} \usepackage[T1]{fontenc} \usepackage[top=.75in, bottom=.75in, left=.75in,right=.75in]{geometry} \usepackage{graphicx} \usepackage{lastpage} \usepackage{listings} \lstset{basicstyle=\small\ttfamily} \usepackage{...
{"hexsha": "947f3ac211a0a0622e492e9e917c85cafaf9735b", "size": 6047, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "static/w18/advanced/c4cs-wk7-advanced.tex", "max_stars_repo_name": "yuqijin/c4cs-2.github.io", "max_stars_repo_head_hexsha": "b7921a0f480d2e0f7747eea1662b24bd90fde500", "max_stars_repo_licenses": ["...
from torchvision import transforms from torch.utils.data import Dataset from .data_utils import get_onehot from .augmentation.randaugment import RandAugment import torchvision from PIL import Image import numpy as np import copy class BasicDataset(Dataset): """ BasicDataset returns a pair of image and labels...
{"hexsha": "8a6ec7955077249cc985dc817997675359089741", "size": 7892, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/dataset.py", "max_stars_repo_name": "JacobGump/TorchSSL", "max_stars_repo_head_hexsha": "bb6978d6e67940eb3d28d99c45d0f2960355b972", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# NLP written by GAMS Convert at 04/21/18 13:52:28 # # Equation counts # Total E G L N X C B # 801 801 0 0 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
{"hexsha": "ecd8ead66f88d429cd0b546ecfaa76f28106bcd8", "size": 137585, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/minlplib/lnts200.py", "max_stars_repo_name": "ouyang-w-19/decogo", "max_stars_repo_head_hexsha": "52546480e49776251d4d27856e18a46f40c824a1", "max_stars_repo_licenses": ["MIT"], "m...
import os import argparse import numpy as np import torch from torch.utils.data import Dataset class SmallSynthData(Dataset): def __init__(self, data_path, mode, params): self.mode = mode self.data_path = data_path if self.mode == 'train': path = os.path.join(data_path, 'train...
{"hexsha": "86653dcbaba5e85426bbf64d0d9e979eb384b20e", "size": 7347, "ext": "py", "lang": "Python", "max_stars_repo_path": "locs/datasets/small_synth_data.py", "max_stars_repo_name": "mkofinas/locs", "max_stars_repo_head_hexsha": "4cb0ab9e989ebfee42d1d2850bdf3360336b5c1c", "max_stars_repo_licenses": ["MIT"], "max_stars...
# 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 not u...
{"hexsha": "12edbdac5f23dfe4182a3c396f98b9a834c34fc9", "size": 5661, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/relay/benchmarking/benchmark_vm.py", "max_stars_repo_name": "XiaoSong9905/tvm", "max_stars_repo_head_hexsha": "48940f697e15d5b50fa1f032003e6c700ae1e423", "max_stars_repo_licenses": ["...
import unittest import numpy import nlcpy as vp from nlcpy import testing nan_dtypes = ( numpy.float32, numpy.float64, numpy.complex64, numpy.complex128, ) shapes = ( (10,), ) @testing.parameterize(*( testing.product({ 'shape': shapes, }) )) class TestCorr(unittest.TestCase): ...
{"hexsha": "ab5eef7a80435f4ef544b0b127815c526ab71479", "size": 1007, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pytest/statistics_tests/test_correlate.py", "max_stars_repo_name": "SX-Aurora/nlcpy", "max_stars_repo_head_hexsha": "0a53eec8778073bc48b12687b7ce37ab2bf2b7e0", "max_stars_repo_licenses": ["B...
#gup_zmat_mini.py import numpy as np import pyopencl as cl import pyopencl.array as cl_array import pyopencl.clrandom as clrand import pyopencl.tools as cltools from pyopencl.scan import GenericScanKernel import matplotlib.pyplot as plt import time def sim_health_index(n_runs): # Set up OpenCL context and command qu...
{"hexsha": "f525f72485b4788c713b2a223ab1c0438eb51ce0", "size": 3292, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment1/gpu_zmat_mini.py", "max_stars_repo_name": "cindychu/LargeScaleComputing_S20", "max_stars_repo_head_hexsha": "913b0155f47914c258b503df677067a510dd23f5", "max_stars_repo_licenses": ["MIT...
#------------------------------------------------------------------------------# # This script prints out info on the specified model. # Can give you: # a) Input output dimensions # b) Sample Computation times for various input dimensions on your GPU # c) FLOPS for the computation # # Author : Manohar Ku...
{"hexsha": "515862231ae95716ca1b5d2ff29b083c8f2fa3e6", "size": 3888, "ext": "py", "lang": "Python", "max_stars_repo_path": "util_kerasmodel_info.py", "max_stars_repo_name": "galsh17/cartwheel_train", "max_stars_repo_head_hexsha": "a50abe18cfe8c1f0f24267c3efa8537ecf211e72", "max_stars_repo_licenses": ["MIT"], "max_stars...
module Multinomials export +, *, -, ^ include("structures.jl") include("algorithms.jl") end
{"hexsha": "029d60046e5b9289218d0b86c30a36ffd1cfe775", "size": 99, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Multinomials.jl", "max_stars_repo_name": "WilCrofter/Multinomials.jl", "max_stars_repo_head_hexsha": "f5904d2b47e631ea2f9bf3a21222fe0bdf440c0a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import cv2 import torch import numpy as np import albumentations as albu from albumentations.pytorch import ToTensorV2 def get_transform(image_size: int = 512): transform = albu.Compose([ albu.LongestMaxSize(max_size=image_size), albu.PadIfNeeded(min_height=image_size, min_width=image_size, value=...
{"hexsha": "b523ddfe6764c87dba8352a0830477fc5d67d299", "size": 697, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/transforms.py", "max_stars_repo_name": "Inkln/StyleTransferWithCatalyst", "max_stars_repo_head_hexsha": "c3181ecdfd32160907efc2d9d917a55925c25c11", "max_stars_repo_licenses": ["Apache-2.0"], "m...
\subsection{Temporal difference learning}
{"hexsha": "3f68a4e3589337a4a39d2f2d085cd7a1230b3dea", "size": 45, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/ai/reinforcement/02-01-temporalDifference.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_re...
""" Some signal functions implemented using mpmath. """ from __future__ import division try: import mpmath except ImportError: mpmath = None def _prod(seq): """Returns the product of the elements in the sequence `seq`.""" p = 1 for elem in seq: p *= elem return p def _relative_degr...
{"hexsha": "49cc2e3532820312ea27df1ad3bb24763fc4a8db", "size": 3341, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/signal/tests/mpsig.py", "max_stars_repo_name": "magnusja/scipy", "max_stars_repo_head_hexsha": "c4a5a1f984e28840010f20a7e41caa21b8f41979", "max_stars_repo_licenses": ["FSFAP"], "max_stars_co...
import torch as tr import torch.nn as nn import pandas as pd import numpy as np import os from torch.utils.data import Subset, DataLoader from src.dataset import DDataset from src.sampler import DSampler from src.model import Model from src.augmentator import Augmentator batch_size = 24 n_classes = 16 ids = list(ran...
{"hexsha": "46e2b44335359657f78632e21e65604829be2d14", "size": 1483, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval_test.py", "max_stars_repo_name": "cyones/ECI2019-Competencia_Despegar", "max_stars_repo_head_hexsha": "42328ffcacf7eb31ffb99d80ebbdd4f51ed71333", "max_stars_repo_licenses": ["MIT"], "max_star...
#############GET CHESSBOARD CORNERS AND CALIBRATE/UNDISTORT CAMERA################### #Recommended to use at least 20 images to obtain a reliable calibration #Use glob API to read in all images of .jpg format #We know the chessboard corners should appear rectangularly i.e. on a lattice. #Currently there is a deviatio...
{"hexsha": "b2348a389ed6e4817211ad7b3aca3a680646e99d", "size": 3105, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera_cal.py", "max_stars_repo_name": "davecerr/advanced-lane-detection", "max_stars_repo_head_hexsha": "cb30de13613167bffe259aa7813a92f5f311b84a", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#------------------------------------------------------------------------------ # Libraries #------------------------------------------------------------------------------ # Standard from sklearnex import patch_sklearn patch_sklearn() from abc import ABC, abstractmethod import numpy as np import pandas as pd from sklea...
{"hexsha": "0509bd56664f84f1ff5ef72c23cfd23309d20c3d", "size": 14962, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mlregression/base/base_mlreg.py", "max_stars_repo_name": "muhlbach/ml-regression", "max_stars_repo_head_hexsha": "59dfa5acc9841729d632030492e029bb329ce3ed", "max_stars_repo_licenses": ["MIT"]...
# ------------- Lifetime utility """ $(SIGNATURES) Lifetime utility as a function of lifetime income (earnings + assets). NOT counting retirement income. Gives minimum consumption to make negative incomes feasible. """ function lifetime_utility(w :: Worker, workStartAge :: Integer, ltIncome) T = cons_periods(...
{"hexsha": "33672bc67bf4bd23b827b94ea49aad606761e929", "size": 5740, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/lifetime_utility.jl", "max_stars_repo_name": "hendri54/CollegeStratWorker", "max_stars_repo_head_hexsha": "93e95ab73118ec31080fc072953381f09be27029", "max_stars_repo_licenses": ["MIT"], "max_st...
import sys from itertools import combinations import numpy as np from scipy.sparse import csr_matrix from scipy.sparse.csgraph import floyd_warshall I = np.array(sys.stdin.read().split(), dtype=np.int64) n, m, R = I[:3] r = I[3 : 3 + R] - 1 a, b, c = I[3 + R :].reshape(-1, 3).T a -= 1 b -= 1 graph = csr_...
{"hexsha": "27d03883f6c73606043558c92afc44452535fc03", "size": 618, "ext": "py", "lang": "Python", "max_stars_repo_path": "jp.atcoder/abc073/abc073_d/9106590.py", "max_stars_repo_name": "kagemeka/atcoder-submissions", "max_stars_repo_head_hexsha": "91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e", "max_stars_repo_licenses": [...
[STATEMENT] theorem integral_substitution: assumes integrable: "set_integrable lborel {g a..g b} f" assumes derivg: "\<And>x. x \<in> {a..b} \<Longrightarrow> (g has_real_derivative g' x) (at x)" assumes contg': "continuous_on {a..b} g'" assumes derivg_nonneg: "\<And>x. x \<in> {a..b} \<Longrightarrow> g' x \<g...
{"llama_tokens": 11319, "file": null, "length": 64}
#!/usr/bin/env python # coding: utf-8 # ## Process the results of tests # In[1]: import matplotlib import numpy as np import os, sys, getopt, math import pandas as pd import matplotlib.pyplot as plt from ipywidgets import interact, interactive, fixed, interact_manual # In[2]: class Analysis: def __init__(s...
{"hexsha": "3f9cc6052401f3791420f09dacc69f64a4612b0e", "size": 6593, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/statsAnalysis.py", "max_stars_repo_name": "dcs-chalmers/pilisco", "max_stars_repo_head_hexsha": "da59496dd4204a3bf5b379d292b0ad93eee79421", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
from __future__ import print_function from __future__ import division import time import sys import numpy as np from numpy import * from scipy.ndimage.filters import gaussian_filter1d #import config import functionLib as lib def getNotesToKeyMatrix(noteList, weights): matrix = np.zeros([12, len(noteList)]) fo...
{"hexsha": "167f56c6dc630a6b77b9e49ecf84ffd91f9f700b", "size": 5605, "ext": "py", "lang": "Python", "max_stars_repo_path": "ar/music.py", "max_stars_repo_name": "dgole/audioReactiveFadeCandy", "max_stars_repo_head_hexsha": "aa54325052efb6b1a09741ea4d26b824a1183c5e", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#ifndef PROTOC_SERIALIZATION_SERIALIZATION_HPP #define PROTOC_SERIALIZATION_SERIALIZATION_HPP /////////////////////////////////////////////////////////////////////////////// // // http://protoc.sourceforge.net/ // // Copyright (C) 2013 Bjorn Reese <breese@users.sourceforge.net> // // Permission to use, copy, modify, a...
{"hexsha": "f5875dd926c63347864737a6ea5d003259990281", "size": 2403, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/protoc/serialization/serialization.hpp", "max_stars_repo_name": "skyformat99/protoc", "max_stars_repo_head_hexsha": "f0a72275c92bedc8492524cb98cc24c5821c4f11", "max_stars_repo_licenses": ["B...
import numpy as np print(np.__version__) n = int(input()) Z = np.zeros(n) print(Z) params = input().split() t = 'float64' if params[-1].isdigit() else params.pop() Z = np.zeros(tuple(map(int, params)), dtype=t) print(Z) Z = np.zeros((10,10)) print(Z.size * Z.itemsize) np.info(np.add) np.info(np.array) Z = n...
{"hexsha": "2bc18cc8a656956ed34332fc3293dacf2cf723db", "size": 746, "ext": "py", "lang": "Python", "max_stars_repo_path": "math and python workshop/6/6-3.py", "max_stars_repo_name": "DzmitrySakalenka/stepik_courses", "max_stars_repo_head_hexsha": "7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21", "max_stars_repo_licenses": ["...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <boost/program_options.hpp> #include <sandesh/sandesh.h> #include "base/logging.h" #include "cmn/agent_cmn.h" #include "init/agent_param.h" #include "discovery_agent.h" #include "controller/controller_init.h" #include "cmn/agent_cmn.h" ...
{"hexsha": "f6ba18e143118df1f1e9fe8e2ba7e7a4ad1f9067", "size": 6880, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/vnsw/agent/cfg/discovery_agent.cc", "max_stars_repo_name": "amitkg29/contrail-controller", "max_stars_repo_head_hexsha": "be71b50f185a68338ea54d6f8088623ab88c2bf6", "max_stars_repo_licenses": ["A...
import gc import os import time import boto3 import dask import fsspec import joblib import numpy as np import pandas as pd import rasterio as rio import rioxarray import utm import xarray as xr import xgboost as xgb from pyproj import CRS from rasterio.session import AWSSession from s3fs import S3FileSystem import c...
{"hexsha": "ec42621735accbc14b3e699a45655c0437f85255", "size": 9928, "ext": "py", "lang": "Python", "max_stars_repo_path": "carbonplan_trace/v1/inference.py", "max_stars_repo_name": "carbonplan/trace", "max_stars_repo_head_hexsha": "5cf113891bdefa29c2afd4478dff099e0458c82c", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # Written by Greg Ver Steeg # See readme.pdf for documentation # Or go to http://www.isi.edu/~gregv/npeet.html import scipy.spatial as ss from scipy.special import digamma from math import log import numpy.random as nr import numpy as np import random # CONTINUOUS ESTIMATORS def entropy(x, k=...
{"hexsha": "139198b01e8c955789ac072d23a319600d0cc1f1", "size": 10494, "ext": "py", "lang": "Python", "max_stars_repo_path": "lm_pretrain/analysis/entropy_estimators.py", "max_stars_repo_name": "dillondaudert/pssp_lstm", "max_stars_repo_head_hexsha": "d5e00a9a99b912ed6d9e33966077ce1d782a8dfb", "max_stars_repo_licenses":...
from deepquantum.circuit import Circuit from deepquantum.utils import dag import torch import torch.nn as nn import numpy as np class QuPoolXYZ(nn.Module): """Quantum Pool layer. 放置4个量子门,2个参数。 """ def __init__(self, n_qubits, gain=2 ** 0.5, use_wscale=True, lrmul=1): super().__init__() ...
{"hexsha": "cdbce3fd8eff5726f37554c2bd0b66944c68ba34", "size": 2380, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepquantum/nn/qupool.py", "max_stars_repo_name": "TuringQ/VisualQ", "max_stars_repo_head_hexsha": "42793d364a8838bfb32128e165048c7bb0b6ea5d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import itertools as it import operator as op from functools import reduce, wraps from typing import Callable, Iterable, Optional, Tuple import moderngl import numpy as np from ... import config from ...constants import * from ...mobject.opengl_mobject import OpenGLMobject, OpenGLPoint from ...utils.bezier import ( ...
{"hexsha": "6ab3d7c34b9f63cd31419412d0756b4f6c1163b1", "size": 43546, "ext": "py", "lang": "Python", "max_stars_repo_path": "manim/mobject/types/opengl_vectorized_mobject.py", "max_stars_repo_name": "fj/manim", "max_stars_repo_head_hexsha": "ba786fa02c9280d3fb02270ce324549de595ccc7", "max_stars_repo_licenses": ["MIT"],...
#!/usr/bin/env python ############################################################################### # binning.py - A binning algorithm spinning off of the methodology of # Lorikeet ############################################################################### # ...
{"hexsha": "d5b2c07585aaabacbcda2ac5841078fea2c655c9", "size": 49236, "ext": "py", "lang": "Python", "max_stars_repo_path": "flight/rosella/validating.py", "max_stars_repo_name": "rhysnewell/flock", "max_stars_repo_head_hexsha": "269555b850382b64041e3f131b6e63059c4425b3", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# Generate sample bounding boxes. # matlab code: # https://github.com/hellbell/ADNet/blob/master/utils/gen_samples.m from options.general import opts import numpy as np import numpy.matlib from utils.my_math import normal_round as round def gen_samples(type, bb, n, opts, trans_f, scale_f): # type => sampling met...
{"hexsha": "6a0eaa300fa05a30fec7e96c186b16adb30d5002", "size": 4801, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/adnet/utils/gen_samples.py", "max_stars_repo_name": "hizb-resume/LTD-local-track-to-detect-for-VID", "max_stars_repo_head_hexsha": "7147ac7c6cd4b22a956aaaabaa151e5ed5410c68", "max_stars_r...
from os.path import join from topology import load_persistence_diagram_dipha, load_persistence_diagram_json from utilities import parse_filename, get_patient_ids_and_times import numpy as np from glob import glob import seaborn as sns from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from tqdm im...
{"hexsha": "a16b4e93caac6dc7e0058b181a8a565bb8115770", "size": 3711, "ext": "py", "lang": "Python", "max_stars_repo_path": "ephemeral/plot_persistence_diagrams.py", "max_stars_repo_name": "BorgwardtLab/fMRI_Cubical_Persistence", "max_stars_repo_head_hexsha": "5a4773333a33f86c17bbd0604cc48a361fc9a35f", "max_stars_repo_l...
subroutine test_RTS_Main (ifltab1, messageUnit, status) ! ! ! Purpose: Calls all test functions for regular interval time series data ! implicit none ! integer messageUnit, status ! ! integer(8) ifltab1(600) common /lchk/ lcheck logical lcheck ! test_RTS_Basic ...
{"hexsha": "c0355111d5afad769a6d9bb2930f839cd21cc16a", "size": 7029, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/Fortran/source/test_RTS_Main.f90", "max_stars_repo_name": "HydrologicEngineeringCenter/heclib", "max_stars_repo_head_hexsha": "dd3111ee2a8d0c80b88d21bd529991f154fec40a", "max_stars_repo_lic...
[STATEMENT] lemma vid_on_vdoubleton[simp]: "vid_on (set {a, b}) = set {\<langle>a, a\<rangle>, \<langle>b, b\<rangle>}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. vid_on (set {a, b}) = set {\<langle>a, a\<rangle>, \<langle>b, b\<rangle>} [PROOF STEP] by (auto simp: vinsert_set_insert_eq)
{"llama_tokens": 128, "file": "CZH_Foundations_czh_sets_CZH_Sets_BRelations", "length": 1}
#!/Users/tkirke/anaconda/bin/python # -*- coding: utf-8 -*- import re,sys,os,codecs from time import sleep from math import sqrt,log,pi,sin,atan2 import cmath from scipy import signal,fft import numpy, matplotlib from lame import * matplotlib.use('qt4agg') import matplotlib.pyplot as plt from tone_est import * show_p...
{"hexsha": "b12ef2c4d8ea9c5879b4209b92fc3d4608200d7c", "size": 3764, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_notch.py", "max_stars_repo_name": "amikey/audio_scripts", "max_stars_repo_head_hexsha": "3c6adc3c4e2a338590bb69e2a13c954bfd8cec46", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "...
\section{Results and Conclusions} \subsection{Re-evaluation of the design} \subsubsection{Reliability} \begin{itemize} \item The message sent by network devices are receivable to the receivers. \item Our system might have packet loss. This might be occurred in the first route or ping because the network need to fil...
{"hexsha": "4e48d11ba403728c7382d3fa26d443e5a5d935a0", "size": 3457, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/step6.tex", "max_stars_repo_name": "Smithienious/CO3094-asg2", "max_stars_repo_head_hexsha": "8c301fcbcbe2a7deceeb50105ed5d6624e6ad413", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from scipy import spatial def calculate_cosine_similarity(v1, v2): try: cosine = 1 - spatial.distance.cosine(v1, v2) except ValueError: cosine = 0 finally: pass return cosine
{"hexsha": "1fee06e0d0559395b26454c1c2c0ba67f969a0e2", "size": 217, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/shared/functions.py", "max_stars_repo_name": "matifq/eve", "max_stars_repo_head_hexsha": "3a7e7ad3270cfe4f771c6480cc36b536f37d7bbc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "m...
import numpy as np from NN3_tf import NN3_tf from sklearn.model_selection import train_test_split from nn_utils import crossover, Type, sort_by_fittest, read_dataset X, Y = read_dataset(180, 500) train_x, test_x, train_y, test_y = train_test_split( X, Y, test_size=0.3, random_state=1) X, Y = read_dataset(180, 5...
{"hexsha": "cb7d2a1e81d6afc89d1b23a6bfa078facb0d862d", "size": 1469, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GDNN3_tf.py", "max_stars_repo_name": "gmaggiotti/genetic_deep_learning", "max_stars_repo_head_hexsha": "3bade857fa7a1564d2c6ef9519bcd37cfcd2d1a4", "max_stars_repo_licenses": ["MIT"], "max_star...
import datetime import warnings import numpy as np import matplotlib from hapiclient.plot.datetick import datetick def timeseries(t, y, **kwargs): '''Plot a time series ''' opts = { 'logging': False, 'title': '', 'xlabel': '', 'ylabel': ''...
{"hexsha": "2bcbae6818c1b75e834c8f5aa158479e54a78594", "size": 4534, "ext": "py", "lang": "Python", "max_stars_repo_path": "hapiclient/plot/timeseries.py", "max_stars_repo_name": "lkilcommons/client-python", "max_stars_repo_head_hexsha": "7f8f895bd6b43aa12c4531e4498d1bab91c30691", "max_stars_repo_licenses": ["BSD-3-Cla...
''' Created with love by Sigmoid @Author - Stojoc Vladimir - vladimir.stojoc@gmail.com ''' import numpy as np import pandas as pd import random import sys from random import randrange import math from .erorrs import NotBinaryData, NoSuchColumn def warn(*args, **kwargs): pass import warnings warnin...
{"hexsha": "3acf705f0ee63514df2165d01acd4087ef1bb157", "size": 8569, "ext": "py", "lang": "Python", "max_stars_repo_path": "crucio/SLS.py", "max_stars_repo_name": "SigmoidAI/crucio", "max_stars_repo_head_hexsha": "fd646a2e3be9e79572dd8a24f6a41dbb7267e028", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# flake8: noqa ### USAGE: # conda activate ve-AICO # python print_system.py ### Terminal log: # Platform: Linux-5.11.0-36-generic-x86_64-with-glibc2.17 # PyTorch: 1.9.1 # NumPy: 1.20.3 # Python: 3.8.11 (default, Aug 3 2021, 15:09:35) # ...
{"hexsha": "6f171c2aaf0eb82e4e82e515f37704ef3c8e4b77", "size": 544, "ext": "py", "lang": "Python", "max_stars_repo_path": ".github/print_system.py", "max_stars_repo_name": "gomezalberto/pretus", "max_stars_repo_head_hexsha": "63b05419f70ecf8b28ccbb6191eab79637c051ac", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
The combination of several tools can significantly contribute to contribute to addressing this issue in developing and underdeveloped countries. developing countries. One tool would be satellite imagery such as Synthetic Aperture Radar. \subsection{Flood mapping} The flood map was obtained by processing Sentinel-1 GRD...
{"hexsha": "e8dcd2ede25b5fedcdab3705626fb387d0c76fde", "size": 8789, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "IAC2021/content/remote_sensing.tex", "max_stars_repo_name": "mudesire/stea_igcp", "max_stars_repo_head_hexsha": "8496597dfcb5cddafe9c581f65a3c8a1b0fd3d8a", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np def t(): list=[1,2,3,4,5] list=np.array(list) list2=[2,3] print(list[list2]) if __name__ == '__main__': t()
{"hexsha": "80faffcc2e22ae56301f0177535ed8f857b1a55a", "size": 147, "ext": "py", "lang": "Python", "max_stars_repo_path": "ava/teat.py", "max_stars_repo_name": "Achuttarsing/Slow-Fast-pytorch-implementation", "max_stars_repo_head_hexsha": "4c47c8dce3096ec6a274bdd1d20d1e4fba789e48", "max_stars_repo_licenses": ["Apache-2...
import pandas as pd import math import numpy as np import cv2 import os def make_datalist(arg, data, ch): s_size = int(arg.train_batch_size / 1.5) d_size = arg.train_batch_size - s_size train_a = data.sample(frac=1).reset_index(drop=True) train_ad = train_a.iloc[int(len(data) * s_size / a...
{"hexsha": "72677ccae2ecb1a30398c03b878c0c374e4e4382", "size": 5417, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/util/Make_random_pairs.py", "max_stars_repo_name": "changsukim-ku/order-learning", "max_stars_repo_head_hexsha": "9878b0376d04edae74ea8f3df97a9bd79f5a906b", "max_stars_repo_licenses": ["MIT"...
function bubble_sort(seq::Vector{Int64})::Vector{Int64} l = length(seq) for _ = 0:l-1 for n = 1:l-1 if seq[n+1] < seq[n] seq[n], seq[n+1] = (seq[n+1], seq[n]) end end end return seq end if abspath(PROGRAM_FILE) == @__FILE__ unsorted = [14, 11...
{"hexsha": "04d17960bb38f14c18cf8bf420fbad8e40ca47af", "size": 475, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tests/expected/julia/bubble_sort.jl", "max_stars_repo_name": "MiguelMarcelino/py2many", "max_stars_repo_head_hexsha": "9b040b2a157e265df9c053eaf3e5cd644d3e30d0", "max_stars_repo_licenses": ["MIT"], ...
# The Process Not everytime is there a situation where $Ax = b$ has exact solutions , such is the case when we are trying to find a best fit line for a given set of datapoints , there is no direct solution for it , instead we are in search for the best possible solution.So instead of finding solutions for $Ax = b$ , w...
{"hexsha": "5aefb101235bd1f06d103563648bdc0e8a72945d", "size": 18907, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Linearreg.ipynb", "max_stars_repo_name": "B20204/Professorpy", "max_stars_repo_head_hexsha": "572c735c360c19c55f7554245c65975505e5e237", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import random import logging import numpy as np import tensorflow as tf import utils import data_loader from model import NLR_model from hyper_params import HyperParams def evaluate(sess, model, users, hist_items, scores, labels, user_2_id, item_2_id, test_ratio=0.5, topk=5): count = 0 ...
{"hexsha": "c74d6e09b598f7a02cea26a030ef1227c16f2c2f", "size": 6836, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "Scagin/NeuralLogicReasoning", "max_stars_repo_head_hexsha": "2128352ebc98bea60f640e7420d80f276b07bb94", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 21...
```python # 3x + 2y = 1jj0 # x + 3y = 8 import sympy as sm sm.Matrix([[3,2],[1,3]]).inv()*sm.Matrix([10,8]) ``` $\displaystyle \left[\begin{matrix}2\\2\end{matrix}\right]$ --- # $\color{red}{\text{differential coefficiant}}$ is the $\color{magenta}{\text {cause effect}}$ > ### wrt (with respect to) > ### $1x =: ...
{"hexsha": "c820059b15407d0c98abe6f3178489289a9de55c", "size": 9241, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "python/GeometryAG/01-intro.ipynb", "max_stars_repo_name": "karng87/nasm_game", "max_stars_repo_head_hexsha": "a97fdb09459efffc561d2122058c348c93f1dc87", "max_stars_repo_licenses": ["M...
__author__ = 'Maria Khodorchenko' from pathos.multiprocessing import ProcessPool as Pool import numpy as np import random from qparallel.helpers import ( split_data ) """ Graph should be passed as list of weighted edges in the form [node1, node2, weight] Nodes numbering should begin from 0 """ class Graph: ...
{"hexsha": "a85c3b806dceddbea8814b160d7923fc99bb7650", "size": 3707, "ext": "py", "lang": "Python", "max_stars_repo_path": "qparallel/graph/graphalgs.py", "max_stars_repo_name": "KirovVerst/qclustering", "max_stars_repo_head_hexsha": "4fc1265819f7db31ce63320dbaead6ca4e7798ba", "max_stars_repo_licenses": ["MIT"], "max_s...
(* -*- coding: utf-8; mode:coq -*- * Auto-generated - Do not edit or overwrite! *) Require Import Arith. (* ouvre droit, notamment, à 'auto with arith' *) Section exo2. Parameter a b : nat. (* Programme annoté : { (x = a and y = b) } Auto0:t <- x Auto1:x <- y Auto2:y <- t { (x = b a...
{"author": "adud", "repo": "prog-l3", "sha": "cca449d82f22c714e3703984aed39307ee0c3657", "save_path": "github-repos/coq/adud-prog-l3", "path": "github-repos/coq/adud-prog-l3/prog-l3-cca449d82f22c714e3703984aed39307ee0c3657/tp6/exo2.v"}
import numpy as np path = './seg_train_dat/train_0000.dat' fp = open(path,'rb') a = np.fromfile(fp, np.uint8, -1) fp.close() a = a.reshape((1216, 1936, 1)) print(a.shape) import cv2 resize_size_x = 512 resize_size_y = 256 img = cv2.resize(a), (resize_size_x, resize_size_y), interpolation=cv2.INTER_NEAREST) print(img....
{"hexsha": "55c76ded6729913ef99b822c71d7b9c0288facfb", "size": 787, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/gen_signate_dat/script/verify_dat.py", "max_stars_repo_name": "Vertical-Beach/ai-edge-contest4", "max_stars_repo_head_hexsha": "4b5211a9adb383756acade42c8a8b104f6fd7363", "max_stars_repo_lice...
using StaticArrays if PLOT == :winston using Winston import Winston: plot, oplot function plot(Y::SamplePath{SVector{2,Float64}}, args...; keyargs...) yy = Bridge.mat(Y.yy) plot(yy[1,:], yy[2,:], args...; keyargs...) end function plot(Y::SamplePath{SVector{1,Float64}}, args...; keyargs...) yy = Brid...
{"hexsha": "4fcdc6be42499c5c0a6c3d6a1893a1d5fd7126f0", "size": 1605, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/plot.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Bridge.jl-2d3116d5-4b8f-5680-861c-71f149790274", "max_stars_repo_head_hexsha": "e0a387537c4761c95bc91c29a9656dfb5265fe53", "max_stars...
#%% #importing some useful packages import numpy as np import cv2 #import math #%matplotlib inline #%% def grayscale(img): """Applies the Grayscale transform This will return an img with only one color channel but NOTE: to see the returned img as grayscale you should call plt.imshow(gray, cma...
{"hexsha": "1b17788066d1796437291d8615713c9761f7d807", "size": 7529, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lane_Lines_Finding.py", "max_stars_repo_name": "tahir1069/Finding-Lane-Lines-SDVND", "max_stars_repo_head_hexsha": "f96d9440f27e05979c561465a224850a2aad13a4", "max_stars_repo_licenses": ["BSD-3-Cl...
from spearmint.models.gp import GP from spearmint.acquisition_functions.predictive_entropy_search_multiobjective import sample_gp_with_random_features from spearmint.utils.parsing import parse_config_file from spearmint.tasks.input_space import InputSpace from spearmint.tasks.input_space import param...
{"hexsha": "b870332e4370fc4af49698c3fe13e2ca417c2c79", "size": 2956, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/mooc_synthetic_6d_noisy/random/synthetic_problem.py", "max_stars_repo_name": "fernandezdaniel/Spearmint", "max_stars_repo_head_hexsha": "3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84", "max_st...
# -*- coding: utf-8 -*- from __future__ import print_function import sys import numpy as np from qsrlib_io.world_qsr_trace import World_QSR_Trace def apply_median_filter(qsr_world, params): """ Function to apply a median filter to the QSRLib World Trace ..seealso:: For further details about Filters, refer...
{"hexsha": "2147d13f98020c006546dffaddeb24f6aa539bd2", "size": 5201, "ext": "py", "lang": "Python", "max_stars_repo_path": "qsrlib/src/qsrlib_utils/filters.py", "max_stars_repo_name": "alexiatoumpa/QSR_Detector", "max_stars_repo_head_hexsha": "ff92a128dddb613690a49a7b4130afeac0dd4381", "max_stars_repo_licenses": ["MIT"...
import io import random import os import seaborn as sns import matplotlib.pyplot as plt import pandas as pd import numpy as np from itertools import product from tensorflow.python.keras.preprocessing.image import load_img, img_to_array from sklearn.metrics import recall_score, f1_score, precision_score, accuracy_score...
{"hexsha": "1abc4cc56d12b4e0626c2f54976e23d97f6a381d", "size": 37392, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data_viz/visualizacion_resultados.py", "max_stars_repo_name": "jbustospelegri/breast_cancer_diagnosis", "max_stars_repo_head_hexsha": "38eb990ef716912c6acabb443e6eb5c21d9b4e0d", "max_stars_re...
/******************************************************************************* Copyright 2021 by Greg Landrum and the Shape-it contributors This file is part of Shape-it. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"...
{"hexsha": "981615a93dc698220e91117f3c27f838cbaf3a99", "size": 2143, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Wrap/cpyshapeit.cpp", "max_stars_repo_name": "silicos-it/shape-it", "max_stars_repo_head_hexsha": "d9850ce7b0d3d5f2e0c928501ea5a86b9d2eb421", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import tensorflow as tf import numpy as np import cv2 import time from train_config import config as cfg from lib.core.model.facebox.net import FaceBoxes class FaceDetector: def __init__(self, model_path): """ Arguments: model_path: a string, path to the model params file. """ ...
{"hexsha": "b64d685291cc6b9e7e602cb83ae4237050a3b83e", "size": 3965, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/core/api/face_detector.py", "max_stars_repo_name": "610265158/faceboxes-tensorflow", "max_stars_repo_head_hexsha": "700714ec77c4bc23cb478b3e4fa9230e1559417a", "max_stars_repo_licenses": ["Apac...
#!/usr/bin/env python3 import networkx as nx import os, os.path import statistics import sys import utils from argparse import ArgumentParser # Prints a CSV table of the nodes in common amongst the provided GraphML files, # based on a given property class Options: def __init__(self): self._init_parser()...
{"hexsha": "b396a64dc07e973642b3ae8c2713e229b9e1563c", "size": 4228, "ext": "py", "lang": "Python", "max_stars_repo_path": "nodes_in_common.py", "max_stars_repo_name": "weberdc/find_hccs", "max_stars_repo_head_hexsha": "43fcb151901f48765ea8e4ccf0b82dbb726762a3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import argparse import re import numpy as np import pandas as pd from tools.text import clean_text def parse_arguments(parser): parser.add_argument('--test_file', type=str, default=None) parser.add_argument('--train_file', type=str, default=None) parser.add_argument('--output_dir', type=str, default=Non...
{"hexsha": "5696376463b8b1ce091e0559017d6595773c0fa9", "size": 2980, "ext": "py", "lang": "Python", "max_stars_repo_path": "1-rayvanve/code/src/preprocessing.py", "max_stars_repo_name": "NASA-Tournament-Lab/CDC-NLP-Occ-Injury-Coding", "max_stars_repo_head_hexsha": "7012b6726c9178ba4914b3de25578a75ad7d3e87", "max_stars_...
# The MIT License (MIT) # # Copyright (c) 2018 PyBER # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
{"hexsha": "e86ba59b27e6dbeb36683496cd7cae2e5abddfb2", "size": 14356, "ext": "py", "lang": "Python", "max_stars_repo_path": "fileExplorer.py", "max_stars_repo_name": "aff3ct/PyBER", "max_stars_repo_head_hexsha": "c84e1f63c193c5661ab8917a97264e4b899b7be0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "max_...
# syntax: proto3 using ProtoBuf import ProtoBuf.meta const APIVersion = (;[ Symbol("APIVERSION_UNSPECIFIED") => Int32(0), Symbol("V1") => Int32(1), ]...) export APIVersion
{"hexsha": "a95114976ce2f855522a47f7a3ced47b9fd097a7", "size": 182, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/proto/src/generated/service_invocation/apiversion_pb.jl", "max_stars_repo_name": "oolong-dev/Dapr.jl", "max_stars_repo_head_hexsha": "133460f4ccf7c86313089c65e1efa7155afa4c91", "max_stars_repo_l...
\documentclass[12pt]{article} \input{./ref/structure.tex} \title{Introductory Backtesting Notes \\ for Quantitative Trading Strategies \\[2ex] \large Useful Metrics and Common Pitfalls} \author{Leo Wong (QFIN \& COSC, HKUST)} \date{December, 2019} \begin{document} \begin{titlingpage} \maketitle \...
{"hexsha": "08fce7801607901d85ce917339e74426eb55e87a", "size": 17146, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/backtest.tex", "max_stars_repo_name": "exnight/COMP4971C", "max_stars_repo_head_hexsha": "a0c7fbce8af44f785ffbdfc0e41f63cd94e1b2a2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
using Base.Broadcast: BroadcastFunction, broadcasted, materialize ChainRulesCore.@non_differentiable Base.getindex(m::AbstractAttenMask, I::Integer...) ChainRulesCore.@non_differentiable Base.getindex(m::MaskIndexer, I::Integer...) ChainRulesCore.@non_differentiable Base.getindex(m::AbstractAttenMask, I::Tuple) ChainR...
{"hexsha": "2436cfb85872b2e006c14be64d9ab0bb8bfe0efc", "size": 2538, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mask/grad.jl", "max_stars_repo_name": "chengchingwen/NeuralAttentionlib.jl", "max_stars_repo_head_hexsha": "e8f5adbb52902d148fb87f1e5c5f8a67727ab3cb", "max_stars_repo_licenses": ["MIT"], "max_s...