text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Author: Ritchie Lee, ritchie.lee@sv.cmu.edu # Date: 11/21/2014 #ACASX implementation: based on interfacing to the the Julia ADD module ACASX_ADD_Impl export addObserver, ACASX_ADD, ACASXInput, ACASXOutput, initialize, update import Compat.ASCIIString using AbstractCollisionAvoidanceSyste...
{"hexsha": "5075a7779de7483fd58a083b9ed8e1919be8279b", "size": 1781, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CollisionAvoidanceSystem/ACASX_ADD_Impl/ACASX_ADD_Impl.jl", "max_stars_repo_name": "weirdindiankid/cs542", "max_stars_repo_head_hexsha": "67e5e71fdd368c9e212dc847185dcec9733a78ae", "max_stars_r...
""" readSRF(fname::AbstractString) Import surface data in the BESA loc format fname = location and name of file to import verbose = should the function output user feedback surface = readSRF(verbose=false) """ function readSRF(fname::AbstractString = Pkg.dir("Private", "test", "data", "Default50Brain.srf"); ve...
{"hexsha": "00968e852793bd0c4570f17985107ec987676c83", "size": 2196, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/read_write/srf.jl", "max_stars_repo_name": "HanneDeprez1/codeRob", "max_stars_repo_head_hexsha": "120b8497bca885f15992b4a85bd1b37fa3273629", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include <iostream> #include <bustache/model.hpp> #include <boost/iostreams/device/mapped_file.hpp> int main() { using bustache::object; using bustache::array; using namespace bustache::literals; boost::unordered_map<std::string, bustache::format> context { {"href", "href=\"{{url}}\""_fmt}...
{"hexsha": "4a7aea662675c097bb7cd63d39a836ccbe7b0b72", "size": 2062, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "thirdparty/bustache/example/main.cpp", "max_stars_repo_name": "travelping/nifi-minifi-cpp", "max_stars_repo_head_hexsha": "5ad6154607ce6a6cda2d97e402d1e767fc0c6971", "max_stars_repo_licenses": ["Apa...
import numpy as np from lib.LinUCB import * import math from scipy.sparse.csgraph import connected_components from scipy.sparse import csr_matrix from lib.BaseAlg import BaseAlg class CLUBUserStruct(LinUCBUserStruct): def __init__(self, featureDimension, lambda_, userID): LinUCBUserStruct.__init__( ...
{"hexsha": "6ac531096481ffc08eb9ab017349276799a618db", "size": 5161, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/CLUB.py", "max_stars_repo_name": "yilingjia/BanditLib", "max_stars_repo_head_hexsha": "aab74f65d576f964e233a685e98bc6c1fd940686", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""Read c3d files. """ __author__ = "Marcos Duarte, https://github.com/demotu/" __version__ = "0.0.1" __license__ = "MIT" import os import copy import pprint import numpy as np import matplotlib.pyplot as plt import xarray as xr import ezc3d xr.set_options(keep_attrs=True) def read_c3d(fname,...
{"hexsha": "9cd78c75cdfcea5cb08d6c096be0b8c411a7af7e", "size": 22024, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions/read_c3d_xr.py", "max_stars_repo_name": "lucassantanasilva/bmc", "max_stars_repo_head_hexsha": "8e828ea4110e35689657529db89ef6cd81313412", "max_stars_repo_licenses": ["MIT"], "max_stars...
import pathlib import numpy as np import pandas as pd import xarray as xr import pybedtools import dask import subprocess from collections import defaultdict from ALLCools.mcds import RegionDS import pyBigWig import warnings from concurrent.futures import ProcessPoolExecutor, as_completed from sklearn.model_selection i...
{"hexsha": "c8677977acf6d471fefd3736f84b76225f78389f", "size": 28601, "ext": "py", "lang": "Python", "max_stars_repo_path": "ALLCools/reptile/reptile.py", "max_stars_repo_name": "jksr/ALLCools", "max_stars_repo_head_hexsha": "0788ce4405c25361b45701ffe5b03a962c154d25", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import argparse import pickle import numpy as np import warnings import os import sys warnings.simplefilter(action='ignore', category=FutureWarning) def get_arguments(): parser = argparse.ArgumentParser(description='scenario') parser.add_argument('--cwd', type=str, default='./', help='...
{"hexsha": "8c8c578100b20c435106fb975e9ff56633e28571", "size": 3875, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark_launch_scripts/paper/Experiment_6-2-1.py", "max_stars_repo_name": "jboilard1994/disentanglement_lib", "max_stars_repo_head_hexsha": "9cb6bdbafeb0247864f94d5c5c0853a310c86b9e", "max_stars...
#Copyright (c) 2015 Rex Computing and Isaac Yonemoto #see LICENSE.txt #this work was supported in part by DARPA Contract D15PC00135 #unum-bitwalk.jl #implements a "bitwalking" functional. Said functional takes a ulp that isn't #at maximal fraction length and then breaks it into two ulps that has one extra #bit of len...
{"hexsha": "aa58527c569729887e994c24938914943107070d", "size": 1964, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/methods/unum_bitwalk.jl", "max_stars_repo_name": "REX-Computing/unumjl", "max_stars_repo_head_hexsha": "5441eecd983943dcc5f2ad737b3f2144b3ed12e6", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Copyright (c) 2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
{"hexsha": "4434268d72f7cb33dcf33e7a7cc1660f853de308", "size": 4692, "ext": "py", "lang": "Python", "max_stars_repo_path": "nncf/common/batchnorm_adaptation.py", "max_stars_repo_name": "xiao1228/nncf", "max_stars_repo_head_hexsha": "307262119ee3f50eec2fa4022b2ef96693fd8448", "max_stars_repo_licenses": ["Apache-2.0"], "...
#include <array> #include <algorithm> //#include <iterator> #include <iostream> #include <thread> #include <mutex> #include <vector> #include <deque> #include <boost/asio.hpp> #include <boost/function.hpp> #include <boost/bind.hpp> //#include <boost/thread.hpp> #include <boost/program_options.hpp> #include <stdint.h> ...
{"hexsha": "865aaa6495b23a2e2b740aafb74b821368022965", "size": 23513, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "main.cpp", "max_stars_repo_name": "jeanleflambeur/wifibidicast", "max_stars_repo_head_hexsha": "2a30f300f08a5cf5ff2f51e4b7d4f2cfe9be5d3f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import os import sys from collections import OrderedDict from matplotlib import pyplot as plt from PIL import Image import numpy as np class History(): def __init__(self): self.epoch_log = [] self.batch_log = {} def update_epoch_log(self, log): if type(log) not in [OrderedDict]: ...
{"hexsha": "f0936ef9d85a161efdee9f0a37562832c584ff84", "size": 3233, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchfit/utils.py", "max_stars_repo_name": "amaiya/torchfit", "max_stars_repo_head_hexsha": "29819e27ba9b8703dc792a56b5bb49f8e9a4dc9c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m...
C @(#)loaddc.f 20.3 2/13/96 subroutine loaddc (iver,histin,rcflag,jtape,ldflow,stab) integer iver, histin, jtape logical stab, rcflag, ldflow * this is a dummy routine called from RDDTAI.FOR for EPRI dc logical done done = .true. if (done) stop 'LOADDC FOR EPRI' ...
{"hexsha": "4b3684690fbe1abf400f9cdff98317289150c865", "size": 339, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/loaddc.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "m...
""" mbs_experiment.py --- Source code for figure: bar_mbs_avg20runs_eta15.png --- This program runs an experiment using the neural network. Several values of mini batch size are tested, for each value the number of epochs needed to correctly classify 80% of the validation data is found. As well as the percentage of cor...
{"hexsha": "1139fc8ebb82df60f3fc1e78f1f1b5b3e32dd8f1", "size": 4090, "ext": "py", "lang": "Python", "max_stars_repo_path": "mbs_experiment.py", "max_stars_repo_name": "brullenbakken/Neural-Network-PJ-2", "max_stars_repo_head_hexsha": "eef5707ceb215aa490fda9fffade64407b9f5a2c", "max_stars_repo_licenses": ["MIT"], "max_s...
# Armijo线搜索准则 def armijo(funcs, args, x_0, d, gamma=0.5, c=0.1): ''' Parameters ---------- funcs : sympy.matrices.dense.MutableDenseMatrix 当前目标方程 args : sympy.matrices.dense.MutableDenseMatrix 参数列表 x_0 : list 初始迭代点列表 d : numpy.array ...
{"hexsha": "4f04ecdba2f18d22c8cad49c8bd381f6ba1fd27c", "size": 6697, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimtool/functions/linear_search.py", "max_stars_repo_name": "linjing-lab/optimtool", "max_stars_repo_head_hexsha": "9ca298b91ba755b4dab4028879af2c5a06c2e6d6", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- """ Created on Tue Sep 02 21:17:50 2014 @author: Andreas """ import numpy as np import gdal #from osgeo import gdal_array class NDEM(): def __init__(self, model_dem, model_dom,outFile, noData): self.model_dem = str(model_dem) self.model_dom = str(model_dom) ...
{"hexsha": "7d9eef4189ae94123bdfa3ec4338d692e395f836", "size": 2882, "ext": "py", "lang": "Python", "max_stars_repo_path": "modul/module_ndem.py", "max_stars_repo_name": "AndyLoewe/CityEX", "max_stars_repo_head_hexsha": "9df0fe9df721bab4c5341b411fa69a180993ce41", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# This import below is needed to run TensorFlow on top of the he-transformer. import subprocess import time import ngraph_bridge import numpy as np import tensorflow as tf from consts import out_server_name, out_final_name, argmax_times_name, \ inference_no_network_times_name # Add parent directory to path from m...
{"hexsha": "9b3646d9071fc7e2884bb438b7c3b4719bae707f", "size": 7131, "ext": "py", "lang": "Python", "max_stars_repo_path": "server_client.py", "max_stars_repo_name": "cleverhans-lab/capc-iclr", "max_stars_repo_head_hexsha": "bc4c47fcd178a5da4950c84222bc232d64ea4f83", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma is_contraction_\<L>: "is_contraction \<L>\<^sub>b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. is_contraction \<L>\<^sub>b [PROOF STEP] using contraction_\<L> zero_le_disc disc_lt_one [PROOF STATE] proof (prove) using this: dist (\<L>\<^sub>b ?v) (\<L>\<^sub>b ?u) \<le> l * dist ?v ?u 0 \<le> l ...
{"llama_tokens": 315, "file": "MDP-Rewards_MDP_reward", "length": 3}
import gzip import os import subprocess import xml.etree.ElementTree as ET import graphviz import networkx as nx import tex2pix from particle import latex_to_html_name from particle.converters.bimap import DirectionalMaps from pylhe._version import version as __version__ from pylhe.awkward import register_awkward, to...
{"hexsha": "a3ab03a446707a58f3da54d1f0836c59561fae25", "size": 11906, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pylhe/__init__.py", "max_stars_repo_name": "lukasheinrich/pylhe", "max_stars_repo_head_hexsha": "8beb29cca38762b1b1a50af0221c3ea7a23f187d", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# Not working with Aiida 1.0 from aiida.common.exceptions import InputValidationError from aiida.orm import ArrayData, Dict from aiida_phonopy.common.raw_parsers import ( get_force_constants, get_FORCE_SETS_txt, get_poscar_txt, ) import numpy as np from aiida_lammps.calculations.lammps import BaseLammpsCa...
{"hexsha": "089cd22ae40081ef5e985211f7c000ef9b6a6f75", "size": 7263, "ext": "py", "lang": "Python", "max_stars_repo_path": "aiida_lammps/calculations/lammps/combinate.py", "max_stars_repo_name": "JPchico/aiida-lammps", "max_stars_repo_head_hexsha": "8f618541784bbd6360efc653350570cf76398e83", "max_stars_repo_licenses": ...
import os import numpy as np import torch import pandas as pd from experiment_interface.logger import get_train_logger, get_test_logger class Evaluator(): def __init__(self, net, test_dataset, batch_size, predict_module, metric, num_workers, result_dir=None,...
{"hexsha": "6d1b7e95e565743850f68d46625c51f764d8dded", "size": 4973, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment_interface/evaluator/core.py", "max_stars_repo_name": "dnnspark/trainer", "max_stars_repo_head_hexsha": "cdf28eaf22e4b97e11b08d4d04274e2e178f20e3", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma connected_Int_frontier: "\<lbrakk>connected s; s \<inter> t \<noteq> {}; s - t \<noteq> {}\<rbrakk> \<Longrightarrow> (s \<inter> frontier t \<noteq> {})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>connected s; s \<inter> t \<noteq> {}; s - t \<noteq> {}\<rbrakk> \<Longrightarrow>...
{"llama_tokens": 1007, "file": null, "length": 5}
import cdat_info import cdms2 import unittest import numpy import os class TestCDMSAutobounds(unittest.TestCase): def createFile(self, minLon, maxLon, offset): # Create a test netCDF file and load it with one grid of data. # testFile = cdms2.open('testFile.nc', 'w') latitudes = nu...
{"hexsha": "8039eaf99c817bdbd6e8db80e97c05757542bd8f", "size": 4044, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_CDMSBounds.py", "max_stars_repo_name": "jasonb5/cdms", "max_stars_repo_head_hexsha": "dd41a8dd3b5bac10a4bfdf6e56f6465e11efc51d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
from genericpath import exists from logging import raiseExceptions from numpy import cumsum from .sphere import sphere_2D,sphere_3D import random import math from matplotlib import pyplot as plt import numpy as np class shot_stream: """A class that describes the shot stream Attributes: number_of_sphere...
{"hexsha": "ee5695424b86fb041426fc1bda64890994060c66", "size": 10855, "ext": "py", "lang": "Python", "max_stars_repo_path": "sphere_generator/shot_stream_generator.py", "max_stars_repo_name": "aalamprou/sFEre", "max_stars_repo_head_hexsha": "3001d88961e434e01800a995e1742b04d5e36110", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma Prop3: "Op A \<longleftrightarrow> \<bullet>\<^bold>\<midarrow>A \<^bold>\<approx> \<^bold>\<bottom>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. [\<^bold>\<turnstile> \<lambda>w. \<I> A w = A w] = [\<^bold>\<turnstile> \<lambda>w. op_det\<^sup>c (\<^bold>\<midarrow>A) w = \<^bold>\<bottom> w] [...
{"llama_tokens": 149, "file": "Topological_Semantics_ex_LFUs", "length": 1}
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{"hexsha": "3a77c55384f1417a75ed62b736411813ae6680f8", "size": 13197, "ext": "py", "lang": "Python", "max_stars_repo_path": "OpenRoboRL/envs/quadruped_robot/quadruped_gym_env.py", "max_stars_repo_name": "Derek-TH-Wang/OpenRoboRL", "max_stars_repo_head_hexsha": "b81333f034acff7252322322b8d499cd2c3c49e9", "max_stars_repo...
import os import numpy as np import json import random from PIL import Image from PIL import ImageDraw import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms as transforms class DatasetBase(Dataset): """Base dataset for VITON-GAN. """ def __init__(self, opt, mode, data_...
{"hexsha": "151cc6b641c8c997c552df4739b9b9a462d319cf", "size": 8083, "ext": "py", "lang": "Python", "max_stars_repo_path": "viton_gan/dataset.py", "max_stars_repo_name": "gkeng/viton-gan", "max_stars_repo_head_hexsha": "ea16b39c84e7b8a8a8ccd928165a144a3f13be57", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 97...
# from keras.models import Sequential # from keras.layers import Dense import keras import numpy as np from classifier.prepareData import Classifier_dataset class MusicClassifier: """ This class is used for applying the exist model to the project It has to be loaded from a existing model (file or keras mod...
{"hexsha": "342cd399dbfe4f20d7eb782308a26a3d7722bafe", "size": 2811, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "Anne-Fern/shazam-air", "max_stars_repo_head_hexsha": "e51f9a11b896410599e9574417509646b962f86e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19, "max_...
# -*- coding: utf-8 -*- ## # @file func_plot_app.py # @brief Contain a GUI for plotting functions # @author Gabriel H Riqueti # @email gabrielhriqueti@gmail.com # @date 28/04/2021 # from PySide2 import QtWidgets from PySide2.QtWidgets import QApplication import sys import numpy as np from matplotlib.backe...
{"hexsha": "a3569ca4ec41b064cd0f1eed572d65acb59d34e5", "size": 5580, "ext": "py", "lang": "Python", "max_stars_repo_path": "biomedical_signal_processing/tools/func_plot_app.py", "max_stars_repo_name": "gabrielriqu3ti/biomedical_signal_processing", "max_stars_repo_head_hexsha": "84cdc5e5b65facba70c6945d62b18bcf0e5dc3e2"...
// Copyright 2010 Dean Michael Berris. // 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) #define BOOST_TEST_MODULE HTTP 1.0 Get Test #include <boost/network/include/http/client.hpp> #include <boost/test/unit_test...
{"hexsha": "1a2b558b163a8600cdefce3b4bda24b95916e345", "size": 1612, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/network/test/http/client_get_test.cpp", "max_stars_repo_name": "antoinelefloch/cpp-netlib", "max_stars_repo_head_hexsha": "5eb9b5550a10d06f064ee9883c7d942d3426f31b", "max_stars_repo_licenses": ...
\documentclass[twoside]{article} \setlength{\oddsidemargin}{0.25 in} \setlength{\evensidemargin}{-0.25 in} \setlength{\topmargin}{-0.6 in} \setlength{\textwidth}{6.5 in} \setlength{\textheight}{8.5 in} \setlength{\headsep}{0.75 in} \setlength{\parindent}{0 in} \setlength{\parskip}{0.1 in} % % ADD PACKAGES here: % \us...
{"hexsha": "7e4370078b18dddb574d7a67fd9e5a5a49a6771f", "size": 170744, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "MATH2923/exam-notes.tex", "max_stars_repo_name": "chrishyland/uni-notes", "max_stars_repo_head_hexsha": "c19b260657f4c3e4a0c2a3a1248cc0baf23d3e55", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma mono_Par_ref: "\<lbrakk>P \<sqsubseteq> P'; Q \<sqsubseteq> Q'\<rbrakk> \<Longrightarrow> (P || Q) \<sqsubseteq> (P' || Q')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>P \<sqsubseteq> P'; Q \<sqsubseteq> Q'\<rbrakk> \<Longrightarrow> (P||Q) \<sqsubseteq> (P'||Q') [PROOF STEP] by (rule ...
{"llama_tokens": 141, "file": "HOL-CSP_CSP", "length": 1}
#!/usr/bin/env python3 # Imports # Standard lib import unittest import pathlib # 3rd party import numpy as np from PIL import Image # Our own imports from deep_hipsc_tracking.model import preproc from deep_hipsc_tracking.model._preproc import composite_mask from .. import helpers # Helper Classes class FakeDet...
{"hexsha": "10645e09f7ed08fc24a4719d2ab24dbcb4d5b6f4", "size": 53613, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/model/test_preproc.py", "max_stars_repo_name": "JackToppen/deep-hipsc-tracking", "max_stars_repo_head_hexsha": "9d7e07814f26e3f76603bba1a945ae05e88733db", "max_stars_repo_licenses": ["BSD-3...
#encoding=utf-8 import numpy as np import cv2 as cv import os import tensorflow as tf def getTrianList(): root_dir = "/Users/zhuxiaoxiansheng/Desktop/doc/SICA_data/YaleB" with open('/Users/zhuxiaoxiansheng/Desktop'+"/Yaledata.txt","w") as f: for file in os.listdir(root_dir): if len(file) =...
{"hexsha": "fb6df07e69b634022822f8e30d102e1aed0f9e2d", "size": 2363, "ext": "py", "lang": "Python", "max_stars_repo_path": "Batch Geneator.py", "max_stars_repo_name": "LiangjunFeng/Create-dataset-for-Tensorflow", "max_stars_repo_head_hexsha": "1533dea183e77a1bdaa0327926b0ee9c02590252", "max_stars_repo_licenses": ["MIT"...
import numpy as np import os import pandas as pd from xml.etree.cElementTree import iterparse import logging logger = logging.getLogger('parse_database') def mf_from_inchi(inchi): return inchi.split('/')[1] class MolecularDatabase(): def __init__(self, filename): self.database = {} self._requ...
{"hexsha": "66232a92df9c0bc5b198ca7d4924e80b6e164f6b", "size": 6010, "ext": "py", "lang": "Python", "max_stars_repo_path": "parsedatabases/io.py", "max_stars_repo_name": "METASPACE2020/parsedatabases", "max_stars_repo_head_hexsha": "2beb82d672b814c3c0393ce004edc342d3133d10", "max_stars_repo_licenses": ["Apache-2.0"], "...
from numpy import clip, inf class NaivePredictor(object): def __init__(self, data_in, num_prediction_periods): self.__history = data_in self.__num_prediction_periods = num_prediction_periods @property def configuration(self): return "" def predict_counts(self): y_lis...
{"hexsha": "20d30e90acaa6df6727b219ad68520267561d763", "size": 412, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/algorithms/naive_predictor.py", "max_stars_repo_name": "ExesiosPB/libm", "max_stars_repo_head_hexsha": "09c2638d895a4ba69e0d7f4f0e353f27d4b7911f", "max_stars_repo_licenses": ["MIT"], "max_s...
# Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
{"hexsha": "3837ba400c03f433c492e83801a84ef2d589b3fd", "size": 10991, "ext": "py", "lang": "Python", "max_stars_repo_path": "assistant/functions/intent_slot/preprocessor/preprocess.py", "max_stars_repo_name": "SunLemuria/JointBERT-Tensorflow1", "max_stars_repo_head_hexsha": "92a30f9274f8c75035e7c39e0a7b77c3a1343a87", "...
import sys sys.path.append('/media/nox/OS/Linux/Documents/Masterarbeit/shared/dlabb/') sys.path.append('/home/dladmin/Documents/arthurma/shared/dlabb') import csv import datetime as dt import math import os import random import time import pandas as pd import numpy as np import tensorflow as tf slim = tf.contrib.sl...
{"hexsha": "9ad224ca3e6be7572ae02719defa91fbbde16d99", "size": 39450, "ext": "py", "lang": "Python", "max_stars_repo_path": "abb_supervised_networks/regression/nn_regression_prediction_low_memory.py", "max_stars_repo_name": "habichta/ETHZDeepReinforcementLearning", "max_stars_repo_head_hexsha": "e1ae22159753724290f2006...
import numpy as np import tensorflow as tf from tf_model_base import TfModelBase import warnings __author__ = 'Chris Potts' # Ignore the TensorFlow warning # Converting sparse IndexedSlices to a dense Tensor of unknown shape. # This may consume a large amount of memory. warnings.filterwarnings("ignore", category=...
{"hexsha": "9f862f55af9be4e3c8b71b78eee8b46f889a54b4", "size": 9827, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_rnn_classifier.py", "max_stars_repo_name": "andrewquirk/cs191w", "max_stars_repo_head_hexsha": "0fc0c8996e7e8eb570a7e347ff7ead6f8b5bd4ce", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "max...
import queue from threading import Thread import numpy as np import cv2 as cv2 import torch class InferenceEngine(Thread): def __init__(self, net, use_gpu=False): Thread.__init__(self) self.net = net self.use_gpu = use_gpu if use_gpu: self.net.cuda() self._que...
{"hexsha": "62a7de0d1e5febc7e48bcb39eb526c20d7645b1b", "size": 4886, "ext": "py", "lang": "Python", "max_stars_repo_path": "realtimenet/engine.py", "max_stars_repo_name": "doguaraci/20bn-realtimenet", "max_stars_repo_head_hexsha": "007e342e81c605feaa35abdd34960eb3011d6661", "max_stars_repo_licenses": ["MIT"], "max_star...
testOnAllBackends("Vector Algos") do af println("\twhere") afArr = array(af, [0.0, 0.1, 0.0, 0.3, 0.0, 0.5, 0.0, 0.7, 0.8, 0.0]) result = where(afArr) @test host(result) == [0x00000001,0x00000003,0x00000005,0x00000007,0x00000008] end
{"hexsha": "73251d9161b5916faac924869c9ad109ba8a1fa1", "size": 238, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "ArrayFire/test/vectorAlgos.jl", "max_stars_repo_name": "unbornchikken/julia-ml-proto", "max_stars_repo_head_hexsha": "ade4dbe78890be9f81ddc9e03f4f6fc2cfe31825", "max_stars_repo_licenses": ["Apache-2...
theory MinimalHEAPLemmas imports MinimalHEAP1 begin text {* First we start with just one function symbol (foreground; even if with more in background). Next, we add some side conditiosn that are "obvious" (inferrable/knownable from context). Finally, we have some lemmas that don't have trivial conditio...
{"author": "leouk", "repo": "VDM_Toolkit", "sha": "791013909961d45949fcd96d937ae18f0174c7ec", "save_path": "github-repos/isabelle/leouk-VDM_Toolkit", "path": "github-repos/isabelle/leouk-VDM_Toolkit/VDM_Toolkit-791013909961d45949fcd96d937ae18f0174c7ec/experiments/vdm/Heap/isa/MinimalHEAPLemmas.thy"}
#Exercícios Numpy-07 #******************* import numpy as np arr=np.arange(10,50) print('arr=',arr)
{"hexsha": "867c0851d118454920efbb1cc937589466372de7", "size": 103, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ex.07-Numpy.py", "max_stars_repo_name": "aguinaldolorandi/100-exercicios-Numpy", "max_stars_repo_head_hexsha": "276c721bd8b161153223b353168a1c15936edbd1", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python3 import os from copy import deepcopy import matplotlib.pyplot as plt import numpy as np import sys from adaptiveumbrella.wham2d import WHAM2DRunner sys.path.append('..') class MyUmbrellaRunner(WHAM2DRunner): def __init__(self): WHAM2DRunner.__init__(self) cum_frames = [0...
{"hexsha": "c96fbe43d78f2df5f4c1ab70a660319232707db4", "size": 2719, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example.py", "max_stars_repo_name": "danijoo/adaptiveumbrella", "max_stars_repo_head_hexsha": "9bae718c02fddfe43f9f65ae43028de6bc803132", "max_stars_repo_licenses": ["CC0-1.0"], "max_star...
import json from os.path import dirname, join import numpy as np import pandas as pd from sklearn.preprocessing import KBinsDiscretizer def _discretize(vector, **kwargs): """Discretizes vector with sklearn.preprocessing.KBinsDiscretizer. Parameters ---------- vector : np.array kwargs Arg...
{"hexsha": "cbd2b90768dd2029f101128def224673fb162645", "size": 4938, "ext": "py", "lang": "Python", "max_stars_repo_path": "bcselector/datasets.py", "max_stars_repo_name": "Kaketo/bc-selector", "max_stars_repo_head_hexsha": "c7acd1033bee741530735fb601f9e464c3ccc26f", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Contains code for defining the dropout layer (currently unused). """ import theano.tensor as tensor def dropout_layer(state_before, use_noise, trng): proj = tensor.switch(use_noise, (state_before * trng.binomial(state_before.shape, ...
{"hexsha": "b085c69a28f7cca695a31aa16a6a22cdcd334530", "size": 480, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn_dropout.py", "max_stars_repo_name": "Sentimentron/Dracula", "max_stars_repo_head_hexsha": "878f81c1c56a8ac12cf02d8f15bd93c544e29611", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
# Copyright 2021 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
{"hexsha": "64144f7d65e37fc9a098cc70f14568ccd7b90b4d", "size": 6331, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorforce/core/layers/attention.py", "max_stars_repo_name": "DLPerf/tensorforce", "max_stars_repo_head_hexsha": "33a2d84fa850e8842dfe2cef3901de32cf7cd221", "max_stars_repo_licenses": ["Apache-2....
### FieldTuple types # FieldTuple is a thin wrapper around a Tuple or NamedTuple holding some Fields # and behaving like a Field itself struct FieldTuple{B<:Basis,FS<:Union{Tuple,NamedTuple},T} <: Field{B,Spin,Pix,T} fs::FS # the constructor for FieldTuples is a bit complex because there's alot of # diff...
{"hexsha": "1f643bd3b01425325f3d6cb8389ebe06402285e3", "size": 8586, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/field_tuples.jl", "max_stars_repo_name": "JuliaTagBot/CMBLensing.jl", "max_stars_repo_head_hexsha": "59913ff7a889587e706f3cf634c1e6b379bc1574", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import matplotlib.pyplot as plt import numpy as np import dynpy bn = dynpy.bn.BooleanNetwork(rules=dynpy.sample_nets.budding_yeast_bn) initState = np.zeros(bn.num_vars, 'uint8') initState[ [1,3,6] ] = 1 plt.spy(bn.get_trajectory(start_state=initState, max_time=15)) plt.xlabel('Node') plt.ylabel('Time')
{"hexsha": "bfd3d2f1a294eea42d2a23c7c6f18a267eb372fb", "size": 306, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/test_pyplots/bn_trajectory.py", "max_stars_repo_name": "artemyk/dynpy", "max_stars_repo_head_hexsha": "c2914ac315083ad76707a7fcb2c8800a2ec52944", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
from __future__ import print_function, division import numpy as np from scipy.linalg import inv import matplotlib.pyplot as plt n = 20 s = 2.0 m = 2 * (n + 1) M = np.empty((m, n)) for i in range(m): for j in range(n): M[i, j] = np.exp(-2*(i / s - j)**2) M = M.dot(inv((M.T).dot(M))).dot(M.T) xM = np.arang...
{"hexsha": "9828aca61deb18c4bcd1a36e5942a46a221b8c81", "size": 625, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/transform_methods/basex-vert.py", "max_stars_repo_name": "beverlyru/PyAbel", "max_stars_repo_head_hexsha": "8f8d7e864475ae823837b0925a88eaac7b3ffdc7", "max_stars_repo_licenses": ["MIT"], "max_s...
import re, sys import os, json CURRENT_FOLDER = os.path.dirname(os.path.abspath(__file__)) import numpy as np import random UNKNOWN_TOKEN = '<unnown>' PADDING_TOKEN = '<paddingword>' def extract_text_from_line_numb(line): match = re.search('\d+ your persona:', line) if match is None: match = re.search(...
{"hexsha": "4037a226ebca751e656705720ef8d6ec67784a68", "size": 10198, "ext": "py", "lang": "Python", "max_stars_repo_path": "parlai/agents/mai_model/data_reader.py", "max_stars_repo_name": "khaimaitien/Mai_convai2", "max_stars_repo_head_hexsha": "83bf99ba09d678455aad49239f3daefc5a7b8fc9", "max_stars_repo_licenses": ["B...
import numpy as np import yaml import pickle from os import listdir from os.path import join import faiss import main.utils as utils # load global config yaml yaml_path = './config.yaml' cont = None with open(yaml_path, 'r', encoding='utf-8') as f: cont = f.read() arg = yaml.load(cont) arg_dataset = arg['dataset'...
{"hexsha": "67edc72c9911cb3aab039cce58682345acd26f1e", "size": 1569, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/eval_desc.py", "max_stars_repo_name": "Rick0514/VPR_SMCN", "max_stars_repo_head_hexsha": "7a00dc8e4de0c21438474c05a4a7be18d05367fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import math import argparse import pickle import numpy as np from numpy.core.umath_tests import inner1d import scipy import scipy.sparse as sp import MDAnalysis.analysis.distances import MDAnalysis as md from tqdm import tqdm import boo def pbc(ref_pos_mat, pos_mat, box): box = box[:3] pbc_pos_mat = np.cop...
{"hexsha": "2041993d2cde2859311745d91d3245788e9e2fa0", "size": 5555, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepare/prepare.py", "max_stars_repo_name": "QHwan/GCIceNet", "max_stars_repo_head_hexsha": "5792f5fa7bd2989b54eddeae5c9f8fca3f004bb5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
""" Copyright (C) <2010> Autin L. TSRI This file git_upy/autodesk3dsmax/v2015/maxHelper.py is part of upy. upy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the Li...
{"hexsha": "ea9bf40e3163c4b54f8ff19bec5d534e8e6c8be7", "size": 13745, "ext": "py", "lang": "Python", "max_stars_repo_path": "cellpack/mgl_tools/upy/autodesk3dsmax/v2016/maxHelper.py", "max_stars_repo_name": "mesoscope/cellpack", "max_stars_repo_head_hexsha": "ec6b736fc706c1fae16392befa814b5337a3a692", "max_stars_repo_l...
[STATEMENT] lemma rel_interior_injective_linear_image: fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space" assumes "bounded_linear f" and "inj f" shows "rel_interior (f ` S) = f ` (rel_interior S)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rel_interior (f ` S) = f ` rel_interior S [PROO...
{"llama_tokens": 316, "file": null, "length": 2}
# -*- coding: utf-8 -*- """ BrainProp implementation. Usage: python main.py <dataset> <architecture> <algorithm> Use the optional argument -s to save training outputs or -l to load weights (specify then the file name) """ from __future__ import absolute_import, division, print_function, unicode_literals import sys, o...
{"hexsha": "5828d20c594495a3e1f736db7acce8cb5ffdbf66", "size": 9531, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "isapome/BrainProp", "max_stars_repo_head_hexsha": "ae4d60186c9cd2cba06008d0dbe97538f81149fe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max_star...
#find row based on the code, to improve this function # and the find_column could do a hi_lo funtion # and then call that for both find_row and find_column function find_row(code) row_code = code[1:7] lo_n = 0 hi_n = 127 count = 1 for i in row_code #find the bounds of the range depending if we can ...
{"hexsha": "4f58e45f9bb204aad559040f51de06ce761a65a5", "size": 1906, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Lupe/day5_part2.jl", "max_stars_repo_name": "efacks68/codingjuntos_advent2020", "max_stars_repo_head_hexsha": "1d7ef6278616716ad62a5f3af3fa0419173b6dc1", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma wp3charn[rule_format]: assumes domAllow: "dom (C (AllowPortFromTo a b po)) \<noteq> {}" and wp3: "wellformed_policy3 (xs @ [DenyAllFromTo a b])" shows "AllowPortFromTo a b po \<notin> set xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. AllowPortFromTo a b po \<noti...
{"llama_tokens": 1697, "file": "UPF_Firewall_FWNormalisation_NormalisationIntegerPortProof", "length": 11}
# Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source ...
{"hexsha": "cb71b0cf28136f54d56447175749e6ba5aaac14e", "size": 7555, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pyrado/pyrado/environments/quanser/quanser_qube.py", "max_stars_repo_name": "theogruner/SimuRLacra", "max_stars_repo_head_hexsha": "4893514ccdeb10a736c55de9aa7753fd51c5afec", "max_stars_repo_licen...
[STATEMENT] lemma mset_lt_single_right_iff[simp]: "M < {#y#} \<longleftrightarrow> (\<forall>x \<in># M. x < y)" for y :: "'a::linorder" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (M < {#y#}) = (\<forall>x\<in>#M. x < y) [PROOF STEP] proof (rule iffI) [PROOF STATE] proof (state) goal (2 subgoals): 1. M < {#y#} ...
{"llama_tokens": 1898, "file": null, "length": 24}
import sys sys.path.append('../HubCCD') import ham import numpy as np import CCD import CCSD import UCCSD from ast import literal_eval import cGCCSD from scf import twoe_MO_tran fle = '16x1_complex_ghf' #This function reads complex_GHF MOs and data from Kitou's Fortran output files def read_K(fle,slow="False"): #Get...
{"hexsha": "7f9b455deb1eb25506190b5756a5ff525e244c4d", "size": 2121, "ext": "py", "lang": "Python", "max_stars_repo_path": "read_K.py", "max_stars_repo_name": "jag20/HubCCD", "max_stars_repo_head_hexsha": "674ecbc3689f57672eb1b760cfccf444e838ac35", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
[STATEMENT] lemma abc_list_crsp_simp3[simp]: "\<lbrakk>abc_list_crsp lma lmb; \<not> m < length lma; m < length lmb\<rbrakk> \<Longrightarrow> abc_list_crsp (lma @ 0 \<up> (m - length lma) @ [n]) (lmb[m := n])" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>abc_list_crsp lma lmb; \<not> m < length lma;...
{"llama_tokens": 944, "file": "Universal_Turing_Machine_Recursive", "length": 6}
SUBROUTINE CEDREAD(id,nid,iun,panel) C C THIS SUBROUTINE READS IN A CEDRIC FORMAT DISK VOLUME AND C RETURNS ID HEADER INFORMATION ABOUT THE VOLUME AS WELL AS C THE DATA FOR THE VARIOUS FIELDS AND LEVELS IN THE VOLUME. C C ID - 510 WORD ID HEADER FOR VOLUME C ITEM - INTEGER SCRATCH ARRA...
{"hexsha": "3d5e30c46bc7036b2bcfdf5bd0b45a7d87e10d23", "size": 4184, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "zipfile/CEDREAD.f", "max_stars_repo_name": "NCAR/lrose-grid2ps", "max_stars_repo_head_hexsha": "fb7d368a7f96adcbe4f78b488f323cff35799cc9", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
import sys import numpy as np with np.load('uhat_dataset.npz') as data: train_data = data['x_chars_train'] test_data = data['x_chars_test'] train_labels = data['y_chars_train'] test_labels = data['y_chars_test'] # reshape to flatten and normalize image data train_data = train_data.reshape(len(train_da...
{"hexsha": "edb62318fa3a27061399e938336fe06d1d4a8ee0", "size": 3046, "ext": "py", "lang": "Python", "max_stars_repo_path": "uhat_model.py", "max_stars_repo_name": "curt-mitch/uhat_deep_nn", "max_stars_repo_head_hexsha": "4152dbd46687b9778272aa0e800a3e888e9fe15b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import typing from IPython.core.display import JSON import ibis from numpy.lib.function_base import disp import opentracing import IPython.display __all__ = [ "_expr_map", "DATA_NAME_PREFIX", "get_fallback", "set_fallback", "get_active_span", "set_active_span", "enable_debug", "disable_...
{"hexsha": "2425256c3831f369ae5d8668874a498732ecfd8c", "size": 1439, "ext": "py", "lang": "Python", "max_stars_repo_path": "ibis_vega_transform/globals.py", "max_stars_repo_name": "xmnlab/ibis-vega-transform", "max_stars_repo_head_hexsha": "75b4c5e4a8452dbeb5a81e19eae817b4d9c64999", "max_stars_repo_licenses": ["Apache-...
from __future__ import print_function import numpy as np import tensorflow as tf from image_reader import ImageReader from tools import decode_labels, prepare_label from mobilenet import MobileNet import time import os slim = tf.contrib.slim #Directory Paths tf.app.flags.DEFINE_string( 'data_dir', '/home/n1703...
{"hexsha": "8b0ac11403bce03f766adb71d9a29bd9cd4e6012", "size": 9835, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "ayshrv/mobilenet_psp", "max_stars_repo_head_hexsha": "08d376e322f0985a36f29a23fa6cd9cf180bcdd4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_s...
% !TEX encoding = UTF-8 %Koma article \documentclass[fontsize=12pt,paper=letter,twoside]{scrartcl} \usepackage{float} \usepackage{listings} %Standard Pre-amble \input{sty/defns.tex} %Useful definitions %\newcommand{\mv}[1]{\textit{m\_#1}} %\newcommand{\cv}[1]{\textit{c\_#1}} %\newcommand{\degree}[1]{^{\circ}\mathrm{#1...
{"hexsha": "44c6cbe81593fc1b4014d937a40a4282a4c94bf4", "size": 27005, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/users-manual/admin/Latex/admin-manual.tex", "max_stars_repo_name": "ssh24/eecs-gradapps", "max_stars_repo_head_hexsha": "7642f021ca963049abccc7b828b40a6513e17d1f", "max_stars_repo_licenses": ["...
from sklearn.metrics.pairwise import cosine_similarity from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import TfidfTransformer import numpy as np import nltk import string import random # getting my hands dirty :p file = open('./chatbot.txt', 'r', errors='ign...
{"hexsha": "670613e9660243075ce66be59078da02d841c6ba", "size": 2701, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "RohanPunjani/DEVER-chatbot", "max_stars_repo_head_hexsha": "9a972fcdb9b3112a8231553c7af2fc820ee72085", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "...
import os import sys import pandas as pd import numpy as np import h5py import matplotlib; matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import alt_splice_heatmap_hl as hmhelp import alt_splice_embeddings as ebhelp BASEDIR = os.path.dirname(os.path.dirname(__file__)) sys.path.append(BAS...
{"hexsha": "3abe2ad35862d33ff1b5c036fcb6946bccb24957", "size": 13903, "ext": "py", "lang": "Python", "max_stars_repo_path": "sqtl/sqtl.py", "max_stars_repo_name": "yjzhang2013/pancanatlas_code_public", "max_stars_repo_head_hexsha": "cd095a7ac1f9e8124a6849be5aa9a4ccf932c31b", "max_stars_repo_licenses": ["MIT"], "max_sta...
import warnings import logging from openff.evaluator.utils import setup_timestamp_logging from openff.evaluator.datasets import PhysicalPropertyDataSet from openff.evaluator.forcefield import SmirnoffForceFieldSource from openff.evaluator.properties import Density, EnthalpyOfMixing from openff.evaluator.client import R...
{"hexsha": "fa7d99fa5b9b8826db555404d15923380c5f7f48", "size": 6734, "ext": "py", "lang": "Python", "max_stars_repo_path": "LJ_surrogates/run_simulations.py", "max_stars_repo_name": "ocmadin/LJ_surrogates", "max_stars_repo_head_hexsha": "5e3873c521d90dc93d90e41c434a89b74d609d3d", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import sys from scipy.interpolate import interp1d startIndex=14 endIndex=64 computerStreamNums=[8,4,4] streamNum=np.sum(computerStreamNums) scriptFiles=[] for i in range(len(computerStreamNums)): runnerFile=open('./scripts2/XXL_runner_'+str(i)+'.sh', 'w') for j in range(computerStreamNu...
{"hexsha": "ee15b126fe2bb0163af4d8a454cd3e5ab2c17b3f", "size": 2313, "ext": "py", "lang": "Python", "max_stars_repo_path": "runner_LC_MXXL_lin.py", "max_stars_repo_name": "beckrob/AvERA_ISW", "max_stars_repo_head_hexsha": "2eb3fe6d0346513e1b50bbfdbfa1714c6353a35d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Functions in this files will ONLY use NumPy, and are therefore candidates for speed up with Numba. """ import numpy as np from numba import jit @jit(nopython=True) def distance_matrix(test: np.ndarray, ref: np.ndarray, weight_matrix: np.ndarray): # TODO: allow user to specify `band`. The code below assumes t...
{"hexsha": "b6675a04e9a5125899f556cbf5345b12178f4fc5", "size": 2632, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_improve/batch/alignment_helpers.py", "max_stars_repo_name": "kgdunn/process-improve", "max_stars_repo_head_hexsha": "ceb9657344fda085450dcc6818fcd438c893dd0c", "max_stars_repo_licenses": [...
""" Deep Learning and Neural Networks Advanced Research Seminar I/III Graduate School of Information Science Nara Institute of Science and Technology January 2014 Instructor: Kevin Duh, IS Building Room A-705 Office hours: after class, or appointment by email (x@is.naist.jp where x=kevinduh) http://cl.naist.jp/~kevin...
{"hexsha": "66d0ebc19d3a773cb83573957fbe27e8ee370849", "size": 1205, "ext": "py", "lang": "Python", "max_stars_repo_path": "lecture1_code00.py", "max_stars_repo_name": "autodrive/NAIST_DeepLearning", "max_stars_repo_head_hexsha": "ac2c0512c43f71ea7df68567c5e24e689ac18aea", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import torch import math import matplotlib.pyplot as plt import numpy as np import torch import math import matplotlib.pyplot as plt import numpy as np class Torch_SOM(torch.nn.Module): ''' A Torch implementation of a Self Oranizing Map (SOM). Method: forward(input): Forward pass ...
{"hexsha": "dbbea3803b730b6d41f4af4ec96e01ad149e35c9", "size": 5532, "ext": "py", "lang": "Python", "max_stars_repo_path": "kohenen/models/kohenen_torch.py", "max_stars_repo_name": "BDJohnston/py_som", "max_stars_repo_head_hexsha": "450e4d3a158fbbb4f4a5ce241e2a63a05dd741fb", "max_stars_repo_licenses": ["MIT"], "max_sta...
#ifndef PCL_SIMULATION_IO_ #define PCL_SIMULATION_IO_ #include <boost/shared_ptr.hpp> #include <GL/glew.h> #include <pcl/pcl_config.h> #ifdef OPENGL_IS_A_FRAMEWORK # include <OpenGL/gl.h> # include <OpenGL/glu.h> #else # include <GL/gl.h> # include <GL/glu.h> #endif #ifdef GLUT_IS_A_FRAMEWORK # include <GLUT/glut.h>...
{"hexsha": "9607d14b83398ea271e81cb4501e2c0632d119f9", "size": 2080, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "kinect_sim/include/kinect_sim/simulation_io.hpp", "max_stars_repo_name": "Tacha-S/perception", "max_stars_repo_head_hexsha": "aefbb5612c84b46a745c7db4fe860a2456d6e7ef", "max_stars_repo_licenses": ["...
module InfiniteOpt # Import and export JuMP import Reexport Reexport.@reexport using JuMP # Import the necessary packages. import MathOptInterface import Distributions import DataStructures import FastGaussQuadrature # Make useful aliases (note we get MOI and MOIU from JuMP) const JuMPC = JuMP.Containers const MOI...
{"hexsha": "3386aa59bbea85c14dd3472e83c8c7289e568fb4", "size": 6097, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/InfiniteOpt.jl", "max_stars_repo_name": "azev77/InfiniteOpt.jl", "max_stars_repo_head_hexsha": "db734856e6d89fd105f7bdb4fb5b8e16a72bd7fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
module partition using Random using Plots using Statistics const MAX_GEN = 500 const NBANDITS = 10 const POP_SIZE = 500 const NELITES = 50 const GENS_PER_FRAME = 50 #mutation probabilities const SWAP_PROB = 0.5 const BALANCE_PROB = 0.5 const CROSS_PROB = 0.1 const NEXPERIMENTS = 1; const EXPERIMENT_NAME = "eas...
{"hexsha": "7f40989396c73dcc4571f0a1b6f5b8aa1b856714", "size": 7342, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/partition.jl", "max_stars_repo_name": "OndrejKincl/evaTeaching-python", "max_stars_repo_head_hexsha": "76e33e7928bfd3c1e336ea3d3f3a9f6487c7bdfd", "max_stars_repo_licenses": ["MIT"], "max_star...
spd = matrixdepot("symmetric", "pos-def") data = matrixdepot("data")
{"hexsha": "84786a23296ff6eb3ac531a968b053f7a495930c", "size": 71, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/property.jl", "max_stars_repo_name": "JuliaPackageMirrors/MatrixDepot.jl", "max_stars_repo_head_hexsha": "86b9c9ce3ad7bf0ea8f282624696c9174c157bcc", "max_stars_repo_licenses": ["MIT"], "max_star...
\documentclass[../main.tex]{subfiles} \begin{document} \chapter{Iteration and Recursion} \label{chapter_iteration_recursion} \begin{chapquote} {Niklaus Wirth, \textit{Algorithms + Data Structures = Programs, 1976}} ``The power of recursion evidently lies in the possibility of defining an infinite set of objects by a fi...
{"hexsha": "790fd8c946f4d7f136d27e9687d8c4a6090f95f6", "size": 19989, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Easy-Book/chapters/chapter_3_iteration_recursion.tex", "max_stars_repo_name": "stungkit/Algorithms-and-Coding-Interviews", "max_stars_repo_head_hexsha": "131199fea0b082d92c0f272a495c7a56a3242b71", ...
""" Plots metrics that assess quality of single units. Some functions here generate plots for the output of functions in the brainbox `single_units.py` module. Run the following to set-up the workspace to run the docstring examples: >>> from brainbox import processing >>> import alf.io as aio >>> import numpy as np >>...
{"hexsha": "e6a18fd7dff4e745fe6cc254eabfaf1fb9de9929", "size": 33854, "ext": "py", "lang": "Python", "max_stars_repo_path": "brainbox/plot.py", "max_stars_repo_name": "nbonacchi/ibllib", "max_stars_repo_head_hexsha": "9066c00a8e9a65a1d209144a2ac54d0b87bec0b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import os import argparse import numpy as np from six.moves import cPickle import hickle import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib as mpl mpl.rcParams['figure.figsize'] = [8.0, 6.0] mpl.rcParams['font.size'] = 20 mpl.rcParams['xtick.labelsize'] = 16 mp...
{"hexsha": "2d1ac2207e913f114a7d34ed5d559b94994c8ad9", "size": 4217, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_prediction.py", "max_stars_repo_name": "ukky17/prednet", "max_stars_repo_head_hexsha": "962f278b14c3e66f8583e33e6ad116ebbcd8bb40", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Isa Restrepo # @Date: 2014-05-01 16:00:07 # @Last Modified by: Isa Restrepo # @Last Modified time: 2015-03-14 22:40:14 import numpy as np from scipy.signal import butter, lfilter from scipy import interpolate, fftpack # from sklearn import preprocessing ...
{"hexsha": "55391b2aa7c61f8f3dde949e99216a3c181068db", "size": 13266, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/signal_process_util.py", "max_stars_repo_name": "brown-ccv/pulsedetector", "max_stars_repo_head_hexsha": "37a23ea932e0846886e433e11a79a01836b7a7cc", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma dg_1_is_arrD: assumes "f : a \<mapsto>\<^bsub>dg_1 \<aa> \<ff>\<^esub> b" shows "a = \<aa>" and "b = \<aa>" and "f = \<ff>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a = \<aa> &&& b = \<aa> &&& f = \<ff> [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: f : a \<mapsto>\<^bsu...
{"llama_tokens": 227, "file": "CZH_Foundations_czh_digraphs_CZH_DG_Simple", "length": 2}
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // Name : // Author : Avi // Revision : $Revision: #29 $ // // Copyright 2009- ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/license...
{"hexsha": "6af5623524702eda24097ee2657b559e7513b128", "size": 12357, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Base/src/cts/GroupCTSCmd.cpp", "max_stars_repo_name": "mpartio/ecflow", "max_stars_repo_head_hexsha": "ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
from keras.datasets import mnist import os os.chdir("d:/data") from keras import models # model unit from keras import layers # layer from keras.utils import to_categorical # one-hot encoder import numpy as np (train_images, train_labels), (test_images, test_labels) = mnist.load_data() network = models.Sequential() #...
{"hexsha": "a2e89f3008bbe255f6b67d49196b82f1db549311", "size": 1167, "ext": "py", "lang": "Python", "max_stars_repo_path": "lec2-1.py", "max_stars_repo_name": "cutz-j/keras", "max_stars_repo_head_hexsha": "a2a567861fd52c4c21522151d45af2bb2ee21893", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
import numpy as np from trainLinearReg import trainLinearReg from linearRegCost import linearRegCostFunction # TODO # Input: training set (X, y) & Validation set (Xval, yval) # Output: Lambda set corresponding with train and validation error def validation_curve(X, y, Xvali, yvali): # Selected set of lam...
{"hexsha": "f569b77116bf019a116657d13656a68051820171", "size": 975, "ext": "py", "lang": "Python", "max_stars_repo_path": "(Ex5)_Upgrade_Neural_network_model/validationCurve.py", "max_stars_repo_name": "HarryPham0123/Coursera_Machine_learning_AndrewNg", "max_stars_repo_head_hexsha": "ae1fa34969fa0dafd44aa6606f6749c09b4...
using QuantumWalk using LightGraphs importall QuantumWalk ## abstract type AbstractStochastic <: QWModelDiscr end struct UniformStochastic{G<:SimpleGraph} <: AbstractStochastic graph::G end UniformScaling(digraph::G) where G= UniformStochastic{G}(digraph) function check_qwdynamics(::Type{QWSearch}, ...
{"hexsha": "74b86fba3e169e0bc35b3a207c6cb902d5f6a2a9", "size": 2247, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/example_code/qwsearch_example.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/QuantumWalk.jl-715ab00d-497d-5f5e-92b0-16e551a8d81b", "max_stars_repo_head_hexsha": "710e18f04bf55fe10...
import sys, os import subprocess repo_dir = subprocess.Popen(['git', 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE).communicate()[0].rstrip() #base = os.path.join(repo_dir, "comp_astro_evan", "refactored") #libs = os.path.join(repo_dir, base, "libs") base = os.path.join(repo_dir) libs = os.path.join(repo_di...
{"hexsha": "515141db592719060418db79fb90b86262355627", "size": 2603, "ext": "py", "lang": "Python", "max_stars_repo_path": "input_data.py", "max_stars_repo_name": "FSUcilab/Compartmental_model_astrocytes", "max_stars_repo_head_hexsha": "b97139eea2570594269b08cf6033f135c42fdc94", "max_stars_repo_licenses": ["MIT"], "max...
from vector_calculus.containers import Tensor from sympy import symbols, S from numpy import eye, array import unittest class TestTensor(unittest.TestCase): '''UnitTest of Tensor class.''' def test_len(self): for i in range(2, 4): self.assertEqual(len(Tensor(eye(i))), i) def test_add...
{"hexsha": "f80c8e46e5fcf274324b34645364270ed78cb423", "size": 1425, "ext": "py", "lang": "Python", "max_stars_repo_path": "vector_calculus/tests/test_tensor.py", "max_stars_repo_name": "MiroK/vector_calculus", "max_stars_repo_head_hexsha": "29351b22da84e629fd03aa7bec4e74c726bf963a", "max_stars_repo_licenses": ["MIT"],...
# Turbojet_Super.py # # Created: May 2015, Tim MacDonald # Modified: # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- # suave imports import SUAVE # package imports import numpy as np import scipy as sp im...
{"hexsha": "6a2023517e634a46a40a92fa1915242e0d51a91a", "size": 14259, "ext": "py", "lang": "Python", "max_stars_repo_path": "References/Geovana Neves/TCC_Geovana_Neves_GitHub/SUAVE_modifications/SUAVE-feature-constant_throttle_EAS/trunk/SUAVE/Components/Energy/Networks/Turbojet_Super.py", "max_stars_repo_name": "Vinici...
import numpy as np import functools as ft from collections import Counter with open("input6.txt") as f: lines = f.read().replace("\n","") lines=np.fromstring(lines,dtype="int",sep=",") lines=dict(Counter(lines)) def add_zero(dic): dic2={} for i in range(0,9): if i not in dic: dic2[i]=0 else: di...
{"hexsha": "107ea6b9bb9a4cbbed19bd635bb9fe8948f97472", "size": 533, "ext": "py", "lang": "Python", "max_stars_repo_path": "d6.py", "max_stars_repo_name": "Prithiviksit/adcentofcode2021", "max_stars_repo_head_hexsha": "40f17dade63196f80407703131a8d1f0b924ad3a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import matplotlib.pyplot as plt import sympy # def plot_one_digit_freqs(f1): """ Plot one digit frequency counts using matplotlib. """ ax = plt.plot(f1,'bo-') plt.title('Single digit counts in pi') plt.xlabel('Digit') plt.ylabel('Count') return ax # def one_digit_freqs(digits, normalize=...
{"hexsha": "04399a8d878244bf4417412adc99abf0a8f3187f", "size": 749, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter12/c12_12_pi_01.py", "max_stars_repo_name": "andrewjcoxon/Hands-On-Data-Science-with-Anaconda", "max_stars_repo_head_hexsha": "82504a059ecd284b3599fa9af2b3eb6bbd6e28f3", "max_stars_repo_lice...
import pandas as pd import numpy as np from trading_gym.envs.portfolio_gym.portfolio_gym import PortfolioTradingGym np.random.seed(64) def create_mock_data(order_book_ids, start_date="2019-01-01", end_date="2022-01-02", number_feature=3): trading_dates = pd.date_range(start=start_date, end=end_date, freq="D") ...
{"hexsha": "9d75d7cbf830fdc41f985cb0e6f327e5e0b3e4b2", "size": 2357, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_envs/test_mul_realnumber.py", "max_stars_repo_name": "zhaoshiying97/trading_gym", "max_stars_repo_head_hexsha": "d4af8d724efa17420e6ebb430f6f9d4f08c6f83a", "max_stars_repo_licenses": ["A...
''' Created on Dec 3, 2017 @author: halil ''' ''' see: http://www.astroml.org/book_figures/chapter3/fig_bivariate_gaussian.html ''' import numpy as np from matplotlib import pyplot as plt from matplotlib.patches import Ellipse from astroML.stats.random import bivariate_normal from astroML.plotting import setup_tex...
{"hexsha": "b96fc34eacc99e639f3d2eba81f2f006ca42c50d", "size": 2366, "ext": "py", "lang": "Python", "max_stars_repo_path": "second-round-intreview/parcoord-brushing/backend/src/paper2declutter/MultivariateNormalPlot.py", "max_stars_repo_name": "halilagin/parcoord-brushing", "max_stars_repo_head_hexsha": "71dde2d9b24038...
""" Astropy coordinate class for the Palomar 5 stream coordinate system """ # Third-party import numpy as np import astropy.units as u import astropy.coordinates as coord from astropy.coordinates import frame_transform_graph from astropy.coordinates.matrix_utilities import matrix_transpose __all__ = ["Pal5PriceWhela...
{"hexsha": "c131faad5f0ff8f6c3523b9db1991ed411dedd53", "size": 4737, "ext": "py", "lang": "Python", "max_stars_repo_path": "gala/coordinates/pal5.py", "max_stars_repo_name": "zilishen/gala", "max_stars_repo_head_hexsha": "f7184e6b09fbc42a349f6b5a2bca6242f1e9936e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import sys from argparse import ArgumentParser from sympy import diff, dsolve, integrate, solve, var # TODO: fix it sys.path.append("./") from calculus_of_variations.abstract_problem import AbstractSolver from calculus_of_variations.utils import ( # noqa: F401 sympy_eval, t, x, x_diff, x_diff_2, ...
{"hexsha": "219508b58daf585444e8cec9be3844e72af9313e", "size": 6009, "ext": "py", "lang": "Python", "max_stars_repo_path": "calculus_of_variations/higher_derivatives_problem.py", "max_stars_repo_name": "dayyass/calculus_of_variations", "max_stars_repo_head_hexsha": "d016c4824bfb5595569b156fd38f2a841c92d3ec", "max_stars...
#!usr/bin/env python import matplotlib.animation import matplotlib.pyplot as plt import numpy as np import sys if len(sys.argv) < 2 or sys.argv[1] not in ('python', 'matlab'): print("Usage: python %s ( python | matlab ) [savename.gif] " % sys.argv[0]) sys.exit(1) order_type = sys.argv[1] fig, axes = plt.subp...
{"hexsha": "afbc2b7ced03559bd14a975bf999f1a4101246a2", "size": 1608, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/index_order.py", "max_stars_repo_name": "scottstanie/scottstanie.github.io", "max_stars_repo_head_hexsha": "69863e119e996cf939b420a973d5153e0baf3b7a", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- """ Created on Sun Mar 10 18:05:33 2019 @author: RGB """ import numpy as np import keras from keras.layers import Dense, Dropout, Flatten from keras.applications import VGG16 from keras.preprocessing.image import ImageDataGenerator from keras.models import Model, load_model from k...
{"hexsha": "dfe6767cdd0050de64e29c29c6498a9a4cd8fbd3", "size": 5353, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "dhruvin88/Masters_Project", "max_stars_repo_head_hexsha": "802a66cd4bb9f5a62e96f3698987fe9af88798fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
# Copyright (c) 2017-2020 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{"hexsha": "044cf68de32fc09cfb79ddfd4755bd118ace19cf", "size": 5140, "ext": "py", "lang": "Python", "max_stars_repo_path": "shape-reconstruction/implicit-geometric-regularization/visualize.py", "max_stars_repo_name": "shikisawamura/nnabla-examples", "max_stars_repo_head_hexsha": "baf4e4cc620dedbf4368683325c0fb868676850...
#include <stdio.h> #include <bitset> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <iostream> #include <net/if.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <linux/can.h> #include <linux/can/raw.h> #include <boost/asio.hpp> #include <boost/bind.hpp> #includ...
{"hexsha": "a0fd61cccc4ee8e1f78fceb5aa1a9257da005bae", "size": 3851, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_moteus_query.cpp", "max_stars_repo_name": "slovak194/pibot", "max_stars_repo_head_hexsha": "a58ce60f0bfcfbb0fdd66c95ed8ffdaa5549318a", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import threading import random import numpy as np import time import argparse from skimage.transform import resize from skimage.color import rgb2gray from collections import deque import matplotlib.pyplot as ...
{"hexsha": "234ad07602d4f7df7af3cb5b0ffa8cc4eb086919", "size": 12504, "ext": "py", "lang": "Python", "max_stars_repo_path": "drqn/eval.py", "max_stars_repo_name": "neale/A4C", "max_stars_repo_head_hexsha": "acbbb3cf14e31a19c12f27306971b4db4feafe09", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_r...