text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
"""This test module verifies all circuit operation, gate, and circuit methods.""" from __future__ import annotations import numpy as np import pytest from hypothesis import given from bqskit.ir.circuit import Circuit from bqskit.ir.gate import Gate from bqskit.ir.gates import CNOTGate from bqskit.ir.gates import Cons...
{"hexsha": "530f60877c1187e365901f57c99067cae5d58b89", "size": 22840, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ir/circuit/test_op_gate_circ_methods.py", "max_stars_repo_name": "jkalloor3/bqskit", "max_stars_repo_head_hexsha": "ad34a6eae3c0e62d2bd960cd4cd841ba8e845811", "max_stars_repo_licenses": ["B...
import torch from sklearn.metrics import confusion_matrix from sklearn.metrics import f1_score from sklearn.metrics import recall_score import numpy as np def torch_to_numpy(y): if torch.cuda.is_available(): return y.detach().cpu().numpy() return y.detach().numpy() def cont_to_binary(y): return [1 if x >= 0.5 e...
{"hexsha": "d9f05f217bd5db29ba806d6fc952d8d43e6fe958", "size": 1550, "ext": "py", "lang": "Python", "max_stars_repo_path": "calc.py", "max_stars_repo_name": "josharnoldjosh/visdom-plot", "max_stars_repo_head_hexsha": "fde386a4c0dc6b842de4eb59487866b0ebf46706", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
# Based on https://colab.research.google.com/github/reiinakano/neural-painters/blob/master/notebooks/generate_stroke_examples.ipynb from lib import surface, tiledsurface, brush import torch import numpy as np from PIL import Image def point_on_curve_1(t, cx, cy, sx, sy, x1, y1, x2, y2): ratio = t / 100.0 x3...
{"hexsha": "0a6eb0aa97bb599028187806421d967b0b35d7f0", "size": 7085, "ext": "py", "lang": "Python", "max_stars_repo_path": "gan_stroke_generator/mypaint_images_data_loader.py", "max_stars_repo_name": "mxpoliakov/PaintTransformerGAN", "max_stars_repo_head_hexsha": "be845607ad1d839319ab9d11b9c6de3f7c11ded0", "max_stars_r...
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Simulation/OP.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/OP """ from os import linesep from sys import getsizeof from ...
{"hexsha": "7b25b9f195638c9ec6fda5e889bbd21e50a01ac7", "size": 14008, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyleecan/Classes/OP.py", "max_stars_repo_name": "Eomys/Pyleecan", "max_stars_repo_head_hexsha": "4d7f0cbabf0311006963e7a2f435db2ecd901118", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import random from itertools import product from collections import namedtuple import numpy as np import tensorflow as tf from neupy import layers from neupy.utils import asfloat, shape_to_tuple from neupy.layers.convolutions import conv_output_shape, deconv_output_shape from neupy.exceptions import LayerConnectionEr...
{"hexsha": "31228390ffd504c6e9eabf6f98d46fa2f607a7d2", "size": 16048, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/layers/test_convolution.py", "max_stars_repo_name": "FrostByte266/neupy", "max_stars_repo_head_hexsha": "4b7127e5e4178b0cce023ba36542f5ad3f1d798c", "max_stars_repo_licenses": ["MIT"], "max_...
function SphereGenerator() return SphereGenerator(()) end function ball_on_support(obj::SphereGenerator, arg0::List) return jcall(obj, "ballOnSupport", EnclosingBall, (List,), arg0) end
{"hexsha": "07139665f09eaa3b3283e1f18e79b8c05de75337", "size": 196, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/GeometryWrapper/EuclideanWrapper/ThreedWrapper/sphere_generator.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c7...
from collections import deque from importlib import reload import ddpg_agents from ddpg_agents import Agent import torch import matplotlib.pyplot as plt from unityagents import UnityEnvironment import numpy as np import pandas as pd import datetime #env = UnityEnvironment(file_name='./Reacher_single/Reacher_Linux_NoV...
{"hexsha": "e9eaa0b6e7aa7a0421dfced4417e5dc77f210090", "size": 3824, "ext": "py", "lang": "Python", "max_stars_repo_path": "p2_continuous-control/run_single.py", "max_stars_repo_name": "thanakijwanavit/deep-reinforcement-learning", "max_stars_repo_head_hexsha": "af057d72c6262faa9bd8426082b1f70ea00c7b9c", "max_stars_rep...
from napari_apr_viewer import napari_get_reader, napari_get_writer, napari_write_image import pyapr import numpy as np import os # tmp_path is a pytest fixture def test_writer(tmp_path): """Test writer plugin.""" file_dir = os.path.dirname(os.path.abspath(__file__)) my_test_file = os.path.join(file_dir, '...
{"hexsha": "74470c24d308ec96ff6152ae00d50a24cd38b797", "size": 2035, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/napari_apr_viewer/_tests/test_writer.py", "max_stars_repo_name": "AdaptiveParticles/napari-apr-viewer", "max_stars_repo_head_hexsha": "cc7089bc418dd5ff08f74dce7024920d387fd6c6", "max_stars_rep...
from __future__ import absolute_import, division, print_function import logging import os import json import numpy as np from collections import OrderedDict import torch from inference.models.vgg import VGGRatioEstimator from inference.models.resnet import ResNetRatioEstimator from inference.trainer import RatioTrain...
{"hexsha": "965bd7b66514a35aa02d9dd569447155e63bf799", "size": 22307, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference/estimator.py", "max_stars_repo_name": "matthewfeickert/mining-for-substructure-lens", "max_stars_repo_head_hexsha": "9360e678aac78b6b260dab55ce264bfddea0c206", "max_stars_repo_licenses"...
!------------------------------------------------------------------------------------------------------------- ! !> \file CompExcessGibbsEnergyIDWZ.f90 !> \brief Compute the partial molar 'excess' Gibbs energy of solution phase constituents in an IDWZ !! solution phase. !> ...
{"hexsha": "81ba5338bfb47ece816586cd203f5cee384352d6", "size": 3760, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/CompExcessGibbsEnergyIDWZ.f90", "max_stars_repo_name": "parikshitbajpai/thermochimica", "max_stars_repo_head_hexsha": "34a3f3e8a92e9e93f8fc7a739d0c6c00bcddca12", "max_stars_repo_licenses": [...
import numpy as np import trax #from trax import layers as tl #from trax.fastmath import numpy as fastnp #from trax.supervised import training # UNIT TEST for UNQ_C1 def test_get_conversation(target): data = {'file1.json': {'log':[{'text': 'hi'}, {'text': 'hello'}, ...
{"hexsha": "f72ce252a89798bc51b81ba3b3a05a173b92e02c", "size": 8096, "ext": "py", "lang": "Python", "max_stars_repo_path": "Natural Language Processing with Attention Models/Week 4 - Chatbot/w4_unittest.py", "max_stars_repo_name": "meet-seth/Coursera-Deep-Learning", "max_stars_repo_head_hexsha": "6fbf9d406468c825ffa1ff...
[STATEMENT] lemma singleDSourceEmpty_Acc: assumes "DAcc i C = {S}" and "isNotDSource i S" shows "Acc i C = {S}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Acc i C = {S} [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. Acc i C = {S} [PROOF STEP] have AccC:"(Acc i C) = (DAcc i...
{"llama_tokens": 678, "file": "ComponentDependencies_DataDependencies", "length": 10}
**==effn.spg processed by SPAG 4.50J at 14:50 on 30 Jun 1995 FUNCTION EFFN(I,Zeff,T) IMPLICIT NONE C*** Start of declarations inserted by SPAG REAL EFFN , eye , f1 , f2 , f3 , T , t3 , xx , Zeff INTEGER I , no C*** End of declarations inserted by SPAG t3 = T/(Zeff*Zeff*1000.0) xx =...
{"hexsha": "49b4c15fec074630557a01b5cd9623c2954a4b47", "size": 2281, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "xspec/tools/raysmith/effn.f", "max_stars_repo_name": "DougBurke/xspeclmodels", "max_stars_repo_head_hexsha": "4e9caf971af51ab88eb0f8cf678a11f014710013", "max_stars_repo_licenses": ["CC0-1.0"], "ma...
!========================================================================== elemental function gsw_entropy_part (sa, t, p) !========================================================================== ! ! entropy minus the terms that are a function of only SA ! ! sa : Absolute Salinity [...
{"hexsha": "0160db551fd26a0d06aaedf74883922235f4f710", "size": 2980, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "MOM6-interface/MOM6/src/equation_of_state/TEOS10/gsw_entropy_part.f90", "max_stars_repo_name": "minsukji/ci-debug", "max_stars_repo_head_hexsha": "3e8bbbe6652b702b61d2896612f6aa8e4aa6c803", "max...
Require Import Lia Setoid Program.Basics. From hahn Require Import Hahn. From PromisingLib Require Import Basic Language. From imm Require Import Events Prog Execution ProgToExecution. Require Import AuxDef. Require Import AuxRel. Require Import EventStructure. Require Import LblStep. Require Import ProgLoc. Require Im...
{"author": "weakmemory", "repo": "weakestmoToImm", "sha": "7061b6279887aa5777f13b5c5ed6a10fae6740a5", "save_path": "github-repos/coq/weakmemory-weakestmoToImm", "path": "github-repos/coq/weakmemory-weakestmoToImm/weakestmoToImm-7061b6279887aa5777f13b5c5ed6a10fae6740a5/src/construction/ProgES.v"}
#!/bin/python3 import sys sys.path.append(".") from adder_graph import adder_graph from adder_graph import adder_node as node import networkx as nx import pydot g = adder_graph(4) g.add_node(node(0,0,'buffer_node'),style='invis') g.add_node(node(1,0,'buffer_node')) g.add_node(node(0,1,'black')) g.add_node(node(1,1,...
{"hexsha": "803ccf79d51b88ad6d95276c0596a6dc5a69863e", "size": 1635, "ext": "py", "lang": "Python", "max_stars_repo_path": "unit_tests/graph_test.py", "max_stars_repo_name": "tdene/synth_opt_adders", "max_stars_repo_head_hexsha": "c94ba6e61468e8867f7a3f8d5af252b0e42664a0", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import nltk from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity import string import numpy as np f = open('nltk.txt','r',errors='ignore') t = f.read() t = t.replace('\n','').lower() f.close() st = nltk.sent_tokenize(t) wt = nltk.word_tokeniz...
{"hexsha": "456a49fc26497b78dc236e864f90e09125ba4454", "size": 1095, "ext": "py", "lang": "Python", "max_stars_repo_path": "nltkTest.py", "max_stars_repo_name": "pranjal-joshi/Florence", "max_stars_repo_head_hexsha": "ffc022f0c0b4625b4236d78b42bf551c64690cfc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns color = sns.color_palette('colorblind', n_colors=4) # dist - acc dist_grouped = pd.read_csv('figures/wiki_dist_correctness_after.csv') conditions = [ (dist_grouped['locality'] == 0), (dist_grouped['locality'] == 1), ...
{"hexsha": "2229cd515f05f8388592d6c8f8ec0b2d47d9d0a7", "size": 1697, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_wiki_after.py", "max_stars_repo_name": "frankxu2004/knnlm", "max_stars_repo_head_hexsha": "7a668a916b08a0e82072c8f49eef4a10ad4a8505", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,...
""" match two list of stars, provided by ra/dec degree """ import numpy as np import scipy.stats as ss def star_match ( list_a, list_b, a_ra, a_dec, b_ra, b_dec, a_mag=-1, b_mag=-1, dis_limit=0.002, mag_limit=-3, allow_dup=False ) : """match two list :param list_a: list a of stars, each ...
{"hexsha": "f3baf89b5e3a23bbcab31cc7bc8a937811784be8", "size": 4203, "ext": "py", "lang": "Python", "max_stars_repo_path": "star_match.py", "max_stars_repo_name": "RapidLzj/201603", "max_stars_repo_head_hexsha": "dbcefad4a833a936f469186a7eb7106da9a91e74", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu...
[STATEMENT] lemma mult_mono_nonpos_nonpos: "a * b \<le> c * d" if "a \<ge> c" "a \<le> 0" "b \<ge> d" "d \<le> 0" for a b c d::real [PROOF STATE] proof (prove) goal (1 subgoal): 1. a * b \<le> c * d [PROOF STEP] by (meson dual_order.trans mult_left_mono_neg mult_right_mono_neg that)
{"llama_tokens": 138, "file": null, "length": 1}
export name, email, time, time_offset typealias MaybeSignature Union(Void, Signature) #TODO: better date / time integration when this becomes available in Base Signature(name::AbstractString, email::AbstractString) = begin sig_ptr = Ptr{SignatureStruct}[0] @check ccall((:git_signature_now, libgit2), Cint, ...
{"hexsha": "ec9d6f1a53b41d243112511168dcdc6010f05f4b", "size": 1892, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/signature.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/LibGit2.jl-76f85450-5226-5b5a-8eaa-529ad045b433", "max_stars_repo_head_hexsha": "5e0adc9e9b9b1bb1963169f7a8e59fb72b79a73f",...
(* Title: HOL/Word/WordBitwise.thy Authors: Thomas Sewell, NICTA and Sascha Boehme, TU Muenchen *) theory WordBitwise imports Word begin text \<open>Helper constants used in defining addition\<close> definition xor3 :: "bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool" where "xor3 a b...
{"author": "SEL4PROJ", "repo": "jormungand", "sha": "bad97f9817b4034cd705cd295a1f86af880a7631", "save_path": "github-repos/isabelle/SEL4PROJ-jormungand", "path": "github-repos/isabelle/SEL4PROJ-jormungand/jormungand-bad97f9817b4034cd705cd295a1f86af880a7631/case_study/isabelle/src/HOL/Word/WordBitwise.thy"}
# basic libs import numpy as np import json import os import random from scipy import signal # pytorch import torch from torch.utils.data import Dataset np.random.seed(42) class Dataset_train(Dataset): def __init__(self, patients,aug): self.patients = patients self.aug = aug def __len__(...
{"hexsha": "9f26b1d0b181eeb219c726b796c6a784cee9d5c5", "size": 10724, "ext": "py", "lang": "Python", "max_stars_repo_path": "kardioml/models/deepecg/train/data_generator_pytorch.py", "max_stars_repo_name": "Seb-Good/physionet-challenge-2020", "max_stars_repo_head_hexsha": "c6f1648a148335babc0a26d8a589120616327548", "ma...
from collections import defaultdict from typing import Any, Dict, List, Optional, Type, Tuple, Mapping, Iterable import math from functools import total_ordering import numpy as np import yaml import shapely.geometry import shapely.ops import conveyor_msgs.msg Range = Tuple[float, float] Position = Tuple[float, floa...
{"hexsha": "c8bec67319ad9f1fe2e6533a6f9200362f264920", "size": 9258, "ext": "py", "lang": "Python", "max_stars_repo_path": "docker/pointing-user-interface/code/conveyor_utils/conveyor_utils/utils.py", "max_stars_repo_name": "Gabry993/pointing-user-interface-hri", "max_stars_repo_head_hexsha": "187b1db496a30edcf606b4c0a...
#!/usr/bin/env python # Deborah Pelacani Cruz # https://github.com/dekape import context import fullwaveqc.inversion as inv import numpy as np import os def test_thisfunction(): assert 1 def test_functional(): dir_path = os.path.abspath(os.path.dirname(__file__)) job_path = os.path.join(dir_path, "test_...
{"hexsha": "e1a7dd49468c628ac375ac4d970374d8798d6ebf", "size": 1125, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_inversion.py", "max_stars_repo_name": "msc-acse/acse-9-independent-research-project-dekape", "max_stars_repo_head_hexsha": "d3d2236e47e8604803850c7cacceb826c7649bcb", "max_stars_repo_li...
[STATEMENT] lemma real_sqrt_sum_squares_less: "\<bar>x\<bar> < u / sqrt 2 \<Longrightarrow> \<bar>y\<bar> < u / sqrt 2 \<Longrightarrow> sqrt (x\<^sup>2 + y\<^sup>2) < u" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>\<bar>x\<bar> < u / sqrt 2; \<bar>y\<bar> < u / sqrt 2\<rbrakk> \<Longrightarrow> sqrt (x\...
{"llama_tokens": 1058, "file": null, "length": 8}
# # bias_experiment.py # # Experiment in Paper's Section 3.1.1 # import collections import json import os import shutil import tempfile from copy import deepcopy import click import numpy as np import pandas as pd import torch from ceem import logger, utils from ceem.dynamics import * from ceem.learner import * fro...
{"hexsha": "77a0afb9a2b36a5df87a213bb9a692803a03eac8", "size": 5963, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/lorenz/bias_experiment.py", "max_stars_repo_name": "sisl/CEEM", "max_stars_repo_head_hexsha": "6154587fe3cdb92e8b7f70eedb1262caa1553cc8", "max_stars_repo_licenses": ["MIT"], "max_stars...
(* Title: HOL/Analysis/Gamma_Function.thy Author: Manuel Eberl, TU München *) section \<open>The Gamma Function\<close> theory Gamma_Function imports Equivalence_Lebesgue_Henstock_Integration Summation_Tests Harmonic_Numbers "HOL-Library.Nonpos_Ints" "HOL-Library.Periodic_Fun" begin text \<open...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Analysis/Gamma_Function.thy"}
# Re-exported imports import pandas as pd from numpy import nan, where from re import sub # Hidden imports import builtins as _builtins from inspect import stack as _stack from keyword import iskeyword as _iskeyword from pkg_resources import get_distribution as _get_distribution from sys import stderr as _lo...
{"hexsha": "aed82bdb6d5e7bb1e53b6985e46629517a63277f", "size": 7699, "ext": "py", "lang": "Python", "max_stars_repo_path": "unitable/__init__.py", "max_stars_repo_name": "mhowison/unitable", "max_stars_repo_head_hexsha": "d0841c907b897ea5c77f488cd01b54c57b39f0b2", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
\documentclass[a4paper]{article} \usepackage[left = .85in, right = .5in, top = 1in, bottom = 1in]{geometry} \usepackage{listings} \title{\Huge Assignment 8 \\ \Large Implementation of DLL Flow Control \\ Stop and Wait Protocol Using Java} \begin{document} \section{Abstract} \subsection{} \section{Algorithm} \subs...
{"hexsha": "16436f08c3567fc220e7fc462c6e840c9e5005ba", "size": 1224, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Networking/assignment8/assignment8.tex", "max_stars_repo_name": "ANSEduGroup/6th-sem-labs", "max_stars_repo_head_hexsha": "705f3041190fba4fdb49a7dc18f1f1d8e10c1dbe", "max_stars_repo_licenses": ["MIT...
! @@name: fort_sp_common.4f ! @@type: F-fixed ! @@compilable: no ! @@linkable: no ! @@expect: failure SUBROUTINE COMMON_WRONG() COMMON /C/ X,Y ! Incorrect because X is a constituent element of C !$OMP PARALLEL PRIVATE(/C/), SHARED(X) ! { error "PGF90-S-0155-x is used in multiple data sharing clauses" } ...
{"hexsha": "de2d0186a2774ee057f0983abbbb332b442a6097", "size": 400, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test/openmp_examples/sources/Example_fort_sp_common.4f.f", "max_stars_repo_name": "kammerdienerb/flang", "max_stars_repo_head_hexsha": "8cc4a02b94713750f09fe6b756d33daced0b4a74", "max_stars_repo_li...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorflow as tf import cv2 import numpy as np from libs.label_name_dict.label_dict import NAME_LABEL_MAP from libs.configs import cfgs def max_length_limitation(length, length...
{"hexsha": "863c17d66d3cacc5f614095e275b6c16c59da6ee", "size": 9345, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/io/image_preprocess_multi_gpu.py", "max_stars_repo_name": "RomStriker/R3Det_Tensorflow", "max_stars_repo_head_hexsha": "34bad1a99d4472281f2653448cdd43378f06f753", "max_stars_repo_licenses": [...
#ifndef TYPELIB_IOPLUGINS_HH #define TYPELIB_IOPLUGINS_HH #include <boost/type_traits/is_base_and_derived.hpp> #include <boost/mpl/if.hpp> namespace Typelib { class ExportPlugin; class ImportPlugin; class Exporter; class Importer; template<typename Type> struct plugin_traits { typ...
{"hexsha": "0ff481cb0bf4992123da31753c49408d80016d96", "size": 1584, "ext": "hh", "lang": "C++", "max_stars_repo_path": "typelib/plugins.hh", "max_stars_repo_name": "maltewi/tools-typelib", "max_stars_repo_head_hexsha": "c0a28415b6cea4d5500a00d6e7003554d684748e", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_coun...
using TiledIteration: TileIterator using FFTW: fft, dct function upsample(x::AbstractArray{T,D}, factor::NTuple{D}, offset::NTuple{D} = (fill(0,D)...,)) where {T,D} @assert all(0 .<= offset .< factor) "offset is out of range" szout = size(x) .* factor setindex!(zeros(T, szout), x, StepRange.(offset .+ 1, f...
{"hexsha": "a9893e5670fea416f40bbf6ecbcff7ccdb912996", "size": 8522, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/polyphaseMatrices.jl", "max_stars_repo_name": "nixir/MDCDL", "max_stars_repo_head_hexsha": "db176ca1f9adb775168cab3a6c7eeafa0757124c", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co...
''' This script holds general meta data & configuration paths required for pipeline operation ''' import os import numpy as np # comment out the next line to use in an experiment #assert False, 'you are importing the template config.py file, import your local experiment specific file' ##############################...
{"hexsha": "80fc4173756463158815a1f71a051e3232bebcf1", "size": 4475, "ext": "py", "lang": "Python", "max_stars_repo_path": "workflow/libs/_config.py", "max_stars_repo_name": "nathanieljevans/cyclicIF_registration", "max_stars_repo_head_hexsha": "0483b8354d0e2b666ca1b47848dca3222c5ddb69", "max_stars_repo_licenses": ["MI...
import numpy as np import scipy, os from scipy.signal import butter,lfilter from scipy.ndimage.filters import gaussian_filter1d import matplotlib.pyplot as plt from matplotlib.pyplot import mlab import xml.etree.ElementTree samplingRate=30000. #===========================================================================...
{"hexsha": "54bf33623288a303f516cf288873cfa29717e9e6", "size": 18401, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/continuous_traces.py", "max_stars_repo_name": "danieljdenman/neuropixels_invitro", "max_stars_repo_head_hexsha": "22ba9f0c7ce9cd562e6e351bf96a312b757df1b4", "max_stars_repo_licenses": ["MIT...
# Copyright 2021 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
{"hexsha": "50c4720ca1f44d616f06d6810259cd68d6738bb3", "size": 5370, "ext": "py", "lang": "Python", "max_stars_repo_path": "cirq-core/cirq/ops/pauli_sum_exponential_test.py", "max_stars_repo_name": "Nexuscompute/Cirq", "max_stars_repo_head_hexsha": "640ef8f82d6a56ec95361388ce7976e096cca906", "max_stars_repo_licenses": ...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "715006771878795674d9391b926be40d2ed27bc1", "size": 7338, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/ir/inference/trt_layer_auto_scan_test.py", "max_stars_repo_name": "shiyutang/Paddle", "max_stars_repo_head_hexsha": "5c27c2c00bdb69619fa2bf715f6a0e0708579569", ...
# coding: utf-8 # 2021/3/23 @ tongshiwei import logging import numpy as np import torch from tqdm import tqdm from torch import nn from EduCDM import CDM from sklearn.metrics import roc_auc_score, accuracy_score class MFNet(nn.Module): """Matrix Factorization Network""" def __init__(self, user_num, item_num...
{"hexsha": "4233812bc509df9fef7c9a1ef10c37d25915b5dd", "size": 3211, "ext": "py", "lang": "Python", "max_stars_repo_path": "EduCDM/MCD/MCD.py", "max_stars_repo_name": "24miaoge/EduCDM", "max_stars_repo_head_hexsha": "49f7cc28dcef748624fbd7cc7a524826abc5f37e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
from sklearn.decomposition import PCA import load_data import numpy as np """Using PCA(principle component analisys) to reduce the dimensions of data""" #loading mnist data x_scaled, y = load_data.fetch_data() #separating training and testing datas train_x = x_scaled[:60000, :] train_y = y[:60000] test_x = x_scale...
{"hexsha": "9e31031190f5f704d254e0a67fcc980d394c2a62", "size": 713, "ext": "py", "lang": "Python", "max_stars_repo_path": "pca.py", "max_stars_repo_name": "ShafeekSaleem/MNIST", "max_stars_repo_head_hexsha": "f738ce3f43483bdba93d120b0684f53e300718f6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, ...
MODULE mecih_I INTERFACE !...Generated by Pacific-Sierra Research 77to90 4.4G 10:47:25 03/09/06 SUBROUTINE mecih (DIAG, CIMAT, NMOS, LAB, XY) USE vast_kind_param,ONLY: DOUBLE REAL(DOUBLE), DIMENSION(*), INTENT(IN) :: DIAG REAL(DOUBLE), DIMENSION(*), INTENT(out) :: c...
{"hexsha": "6ed0fe2359f1aec46a3fb25e0100b9ab93dd0aee", "size": 479, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "2006_MOPAC7.1/src_interfaces/mecih_I.f90", "max_stars_repo_name": "openmopac/MOPAC-archive", "max_stars_repo_head_hexsha": "01510e44246de34a991529297a10bcf831336038", "max_stars_repo_licenses": [...
import numpy as np import pandas as pd from bs4 import BeautifulSoup import pickle import re from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import TfidfVectorizer import nltk nltk.download('stopwords') from nltk.corpus import stopwords def process_text(review): # Extract t...
{"hexsha": "46aae082f26230ef84e66583b4868e42ff0ea6b8", "size": 1743, "ext": "py", "lang": "Python", "max_stars_repo_path": "5_deployment/streamlit_deploy_example/model.py", "max_stars_repo_name": "DukeAIPI/AIPI540-Deep-Learning-Applications", "max_stars_repo_head_hexsha": "1f8786ef45dd0405608a8782d15e2498153e67a1", "ma...
# -*- coding: utf-8 -*- """ Created on Wed Aug 25 16:26:32 2021 @author: kibong """ # In[] from AAA import Wav2Vec2Tokenizer, Wav2Vec2ForCTC from datasets import load_dataset import soundfile as sf import sounddevice as sd import torch import numpy as np # load model and tokenizer tokenizer = Wav2V...
{"hexsha": "eea706ca676425299c07f5fd5c4faf98ec462d66", "size": 2438, "ext": "py", "lang": "Python", "max_stars_repo_path": "wav2vec2_libribase_example.py", "max_stars_repo_name": "kkb131/radar2txt", "max_stars_repo_head_hexsha": "4deb26db596c314233299c40684c4f84876dfd6d", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import numpy as np import matplotlib.pyplot as plt #---------------------Import coordinate file-------------------------# f_x = 'simple_bulk/img/subdataset1_geometry/x.txt' f_l = 'simple_bulk/img/subdataset1_geometry/l.txt' x = np.loadtxt(f_x, dtype = int) l = np.loadtxt(f_l, dtype = int) #---------------...
{"hexsha": "813004577d0875d8992c9b8d236857fe6cfa7fdc", "size": 1069, "ext": "py", "lang": "Python", "max_stars_repo_path": "Domain/subdataset1_domain/subdataset1_img.py", "max_stars_repo_name": "pprachas/ABC_dataset", "max_stars_repo_head_hexsha": "61c915853c0229295e728f869b11b113ee59f098", "max_stars_repo_licenses": [...
# -*- coding: utf-8 -*- """ Created on Mon Feb 17 00:42:53 2020 @author: kai """ import time start = time.time() import numpy as np import os import sys import tensorflow as tf import cv2 from PIL import Image import pandas as pd #if tf.__version__ < '1.4.0': # raise ImportError('Please ...
{"hexsha": "762f0ba328927034542b6b12e4e6f00fb49ee8f0", "size": 5960, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/object_detection/testing.py", "max_stars_repo_name": "kailliang/Object_Detection", "max_stars_repo_head_hexsha": "34a6592980c09d021994f51e297556bc98e1461a", "max_stars_repo_licenses": ["A...
! DESCRIPTION: ! use procedure pointer to invok different subprograms possesing indentical interfaces ! compare it with function pointer in C. module Calc_mod implicit none private public :: Calc_debug, Calc_normal, Calc_proc interface function Calc_proc(real_arg, opt_format) result (ret_val) ...
{"hexsha": "ec5dac217d85ab73b804921824873e7d6821b470", "size": 1778, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "modern_fotran/NewAttribute/procedure_pointer.f90", "max_stars_repo_name": "ComplicatedPhenomenon/Fortran_Takeoff", "max_stars_repo_head_hexsha": "a13180050367e59a91973af96ab680c2b76097be", "max_...
# -------------- #Header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #path of the data file- path data = pd.read_csv(path, sep=',', delimiter=None) data['Gender'].replace(to_replace="-", value="Agender", inplace=True) #print(data) gender_count = data['Gender'].value_counts()...
{"hexsha": "fc06d3f0921a2f7b6b47cc36398dccc74985fd90", "size": 1750, "ext": "py", "lang": "Python", "max_stars_repo_path": "Statistics/code.py", "max_stars_repo_name": "hn1201/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "c42656551e930d13df98f6631bb63fe179035ed8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
//================================================================================================== /*! @file @copyright 2015 NumScale SAS @copyright 2015 J.T. Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ...
{"hexsha": "88aef82445affc87262c9f6ba98f5767eabd5e03", "size": 1184, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/arch/common/generic/function/rec.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_li...
using DataFrames using Gadfly using Colors include("theory.jl") include("transitions.jl") tr_chains_d1(θ, N_H, N_E, p_H, p_E) = tr_chains(θ, N_H, N_E, p_H, p_E, 1) tr_chains_d2(θ, N_H, N_E, p_H, p_E) = tr_chains(θ, N_H, N_E, p_H, p_E, 2) tr_chains_d10(θ, N_H, N_E, p_H, p_E) = tr_chains(θ, N_H, N_E, p_H, p_E, 10) tr_c...
{"hexsha": "7edc7746ced57591c4886cf3946c60ca6e05a620", "size": 3086, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/run_sim.jl", "max_stars_repo_name": "mburq/matching_thickness", "max_stars_repo_head_hexsha": "7f0c17e9d97be80d4af242e81d4f78b0aac930db", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
string_1 = abcd efg string_2 = abc" $\?M string_3 = \?\\'"
{"hexsha": "9ea0b3236e6c43a8f01324a98fc05c68498b2908", "size": 62, "ext": "r", "lang": "R", "max_stars_repo_path": "test/unittest/types/tst.stringconstants.r", "max_stars_repo_name": "alan-maguire/dtrace-utils", "max_stars_repo_head_hexsha": "53b33a89ef7eaeba5ce06d50a4c73fe91c1fa99e", "max_stars_repo_licenses": ["UPL-1...
""" usage: kfold_partition_dataset.py [-h] [-i IMAGEDIR] [-o OUTPUTDIR] [-k KFOLDS] [-x] [-s SEED] Partition dataset of images into training and testing sets optional arguments: -h, --help show this help message and exit -i IMAGEDIR, --imageDir IMAGEDIR Path to the folder where ...
{"hexsha": "2877f1f9f56dfe1998bf4c5990a19c38a3966486", "size": 5034, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/preprocessing/kfold_partition_dataset.py", "max_stars_repo_name": "kallentu/chowdr", "max_stars_repo_head_hexsha": "47efd86025836e04c251c06f86c32d5519b2e0a7", "max_stars_repo_licenses": ["...
# Authors: Soledad Galli <solegalli@protonmail.com> # License: BSD 3 clause import numpy as np import pandas as pd from feature_engine.outliers import Winsorizer class OutlierTrimmer(Winsorizer): """The OutlierTrimmer() removes observations with outliers from the dataset. The OutlierTrimmer() first calcula...
{"hexsha": "0719241ff61a300d8a928a61ae9664764ba7b856", "size": 5332, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_engine/outliers/trimmer.py", "max_stars_repo_name": "david-cortes/feature_engine", "max_stars_repo_head_hexsha": "702328d1a072d0911441e10b4eb98b3bfbf19215", "max_stars_repo_licenses": ["BS...
##################################################### ## librealsense T265 streams test ## ##################################################### # This assumes .so file is found on the same directory import pyrealsense2 as rs # Prettier prints for reverse-engineering from pprint import pprint import n...
{"hexsha": "6e84ae94c14ebfb605193bbe24901c111acf28e5", "size": 2293, "ext": "py", "lang": "Python", "max_stars_repo_path": "robot/src/vision_to_mavros/scripts/t265_test_streams.py", "max_stars_repo_name": "mikobski/Robot-Inspekcyjny", "max_stars_repo_head_hexsha": "925491fc43b71bdaa54dccf60d38da59d244181d", "max_stars_...
from gym_torcs import TorcsEnv import numpy as np img_dim = [64,64,3] action_dim = 1 steps = 1000 batch_size = 32 nb_epoch = 100 def get_teacher_action(ob): steer = ob.angle*10/np.pi steer -= ob.trackPos*0.10 return np.array([steer]) def img_reshape(input_img): _img = np.transpose(input_img, (1, 2, 0...
{"hexsha": "5828ceda2b923cfac53fd92f6d112a5caa0246d0", "size": 3599, "ext": "py", "lang": "Python", "max_stars_repo_path": "dagger.py", "max_stars_repo_name": "havefun28/imitation-dagger", "max_stars_repo_head_hexsha": "6460b53ae3bdfc9801c5ea621ccc1da4e575c9c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 67...
SUBROUTINE TG_QRNG ( gdatim, rngtyp, gtype, iret ) C************************************************************************ C* TG_QRNG * C* * C* This subroutine determines whether a GDATIM is a singular time, * C* multiple times based on forecast hour, or multiple times based on * C* cycles. * ...
{"hexsha": "02687df18c665e4e1c17033f9f1a160e2b39a70e", "size": 3714, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gemlib/tg/tgqrng.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
from __future__ import division from __future__ import print_function import os import time import math import numpy as np import pyopencl as cl class CLWrapper: "class holds information about OpenCL state" def __init__(self, batchSize, maxT, maxC, kernelVariant=1, enableGPUDebug=False): "specify size: number of...
{"hexsha": "8a3e200e8fa4ee6120626e660d715562af57377f", "size": 4768, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctc_decoder/BestPathCL.py", "max_stars_repo_name": "markschoene/CTCDecoder", "max_stars_repo_head_hexsha": "fbb21853c0b38b6d9a7ba5f86401547f8f655b4c", "max_stars_repo_licenses": ["MIT"], "max_star...
\subsubsection{FX Option} The \lstinline!FXOptionData! node is the trade data container for the \emph{FxOption} trade type. FX options with exercise styles \emph{European} or \emph{American} are supported. The \lstinline!FXOptionData! node includes one and only one \lstinline!OptionData! trade component sub-node plus...
{"hexsha": "9c6012e11c31d57fc1e0a0ebedc51fcfeb364f16", "size": 2692, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Docs/UserGuide/tradedata/fxoption.tex", "max_stars_repo_name": "nvolfango/Engine", "max_stars_repo_head_hexsha": "a5ee0fc09d5a50ab36e50d55893b6e484d6e7004", "max_stars_repo_licenses": ["BSD-3-Clause...
"""Data transformations supporting using Prophet on bounded data.""" import abc import numpy as np import pandas as pd from scipy import special class Transform(abc.ABC): """Abstract interface to data transformation used to help Prophet forecast in bounded domains. Converts bounded real data to and from Pro...
{"hexsha": "851343e80e2aaef3bffddd9738b7e9a9c296c56e", "size": 4063, "ext": "py", "lang": "Python", "max_stars_repo_path": "prophet_utils/transforms.py", "max_stars_repo_name": "WilliamHo1999/prophet-utils", "max_stars_repo_head_hexsha": "13a165d50ec3280215aefc980c60d60859cc9b05", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd import scipy as sp from sklearn.preprocessing import MinMaxScaler def _neutralize(df, columns, by, proportion=1.0): scores = df[columns] exposures = df[by].values scores = scores - proportion * \ exposures.dot(np.linalg.p...
{"hexsha": "2cc2ed5f7b2427d7bc96cb72b5365ca0d63a3a33", "size": 60370, "ext": "py", "lang": "Python", "max_stars_repo_path": "allornothing.py", "max_stars_repo_name": "scirpus/numer", "max_stars_repo_head_hexsha": "05c46b6f267c5b7651b79fa009dfe74194a7a0e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_...
// rocks_sorted_data_impl_test.cpp /** * Copyright (C) 2014 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * * This program is distributed i...
{"hexsha": "78628a668cc7847ed1ca20253a891a7312135503", "size": 36081, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp", "max_stars_repo_name": "cyxddgithub/mongo", "max_stars_repo_head_hexsha": "6eb296a66e1f71f12d5483b7144f96d506b055a3", "max_stars_repo_li...
function output = calc_traversal_dist(ai) % This function will generate position coordinates of chain code (ai). Number of % harmonic elements (n), and number of points for reconstruction (m) must be % specified. x_ = 0; y_ = 0; for i = 1 : size(ai, 2) x_ = x_ + sign(6 - ai(i)) * ...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/32800-elliptic-fourier-for-shape-analysis/ca...
/* Copyright (c) 2021, the adamantine authors. * * This file is subject to the Modified BSD License and may not be distributed * without copyright and license information. Please refer to the file LICENSE * for the text and further information on this license. */ #define BOOST_TEST_MODULE DataAssimilator #includ...
{"hexsha": "9e68687847ee7bab0d68841e312fadb6259e7944", "size": 19040, "ext": "cc", "lang": "C++", "max_stars_repo_path": "tests/test_data_assimilator.cc", "max_stars_repo_name": "Rombur/adamantine", "max_stars_repo_head_hexsha": "45dd37397680fad1eaa64dbb311724c4f727a675", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
# -*- coding: utf-8 -*- """ Created on Tue Aug 9 10:54:14 2016 @author: yaric """ import numpy as np import pandas as pd from sklearn import decomposition import utils # the input file prefix of data sets input_file_prefix = '../../data/training-' # '../../data/training-small-' output_file_prefix = '../../data/tr...
{"hexsha": "0cccf7d70575a20bc9b3c90adb7f7f33b358ae05", "size": 2309, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/offline_preprocessor.py", "max_stars_repo_name": "yaricom/timeserieslearning", "max_stars_repo_head_hexsha": "6c6c5dc253b47bd6a22a2a97030adba5c5e7512a", "max_stars_repo_licenses": ["MIT"...
import numpy as np from ase.dft import kpoints import pyglib.gutz.ginput as ginput import pyglib.model.tbASE as tb # The following is a simple test for the 1-d Hubbard model. a = tb.AtomsTB("N", [(0, 0, 0)], cell=(1, 1, 1)) a.set_orbitals_spindeg() aTB = tb.TB(a) aTB.set_hop([ ((1, 0, 0), 0, 0, -1), ((-1, 0, ...
{"hexsha": "27bd915d00fef66f697707a37d10b3d46379110d", "size": 1067, "ext": "py", "lang": "Python", "max_stars_repo_path": "ComRISB/pyglib/pyglib/model/test/test_1band_model/REF/test_tb.py", "max_stars_repo_name": "comscope/comsuite", "max_stars_repo_head_hexsha": "d51c43cad0d15dc3b4d1f45e7df777cdddaa9d6c", "max_stars_...
import matplotlib.pyplot as plt import numpy as np import pandas as pd import math from matplotlib import gridspec from scipy.optimize import curve_fit from sklearn.metrics import mean_absolute_error from sklearn.metrics import mean_squared_error from sklearn.metrics import explained_variance_score from sklearn.metric...
{"hexsha": "9605fef62c277fb8f992db78d056b0d9b7124675", "size": 9842, "ext": "py", "lang": "Python", "max_stars_repo_path": "auxiliary/scipy_implementation.py", "max_stars_repo_name": "ArbiKodraj/ML-Approximation", "max_stars_repo_head_hexsha": "e8696fe13e1e8e63f9eb27c68a77b81d578c1a27", "max_stars_repo_licenses": ["MIT...
import math import numpy as np import numpy.polynomial as poly from .errors import ColorIndexError, ParamRangeError, MissingParamError def get_BC(**kwargs): """Get bolometric correction (BC) using a variety of calibration relations. Available calibration relations: * `Alonso1995`: returns *BC* in *V...
{"hexsha": "c9610e8a2058a27d94f96d404fe796f7479bb0dd", "size": 9379, "ext": "py", "lang": "Python", "max_stars_repo_path": "stellarlab/parameter/bc.py", "max_stars_repo_name": "wangleon/stella", "max_stars_repo_head_hexsha": "3942f8e687065bb96760140596747cbbe6dad04b", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import warnings from typing import Tuple, Any, Dict import numpy import openslide import wx from PIL import Image from antilles.utils.io import DAO def get_screen_size() -> Tuple[int, int]: app = wx.App(False) size = wx.GetDisplaySize() del app return size screen_size = get_screen_size() def ge...
{"hexsha": "e2eb243d968cff80d80b0382dbb4c5a426363cbe", "size": 1896, "ext": "py", "lang": "Python", "max_stars_repo_path": "antilles/utils/image.py", "max_stars_repo_name": "biomicrodev/antilles", "max_stars_repo_head_hexsha": "38f1d16494fae750b95d4e9a654038b9aba8e248", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
Require Import ZArith. Definition pow2_p p := Zpos (iter_pos positive xO xH p). Definition mersenne p := (pow2_p p - 1)%Z. Definition next_s mp s := (((s*s) - 2) mod mp)%Z. Definition lucas_residue p := let mp := mersenne p in let pm2 := (p-2)%positive in iter_pos Z (next_s mp) 4%Z pm2. Definition lucas_test...
{"author": "maximedenes", "repo": "native-compute-bench", "sha": "ac7891508239f9cc1f7ba0190b1814fb152d2126", "save_path": "github-repos/coq/maximedenes-native-compute-bench", "path": "github-repos/coq/maximedenes-native-compute-bench/native-compute-bench-ac7891508239f9cc1f7ba0190b1814fb152d2126/src/Lucas.v"}
[STATEMENT] lemma finite_Update: "finite TS \<Longrightarrow> finite ((\<lambda> F. (Rep_pupdate F) (Value ST)) ` (PUpdate (Label TS)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite TS \<Longrightarrow> finite ((\<lambda>F. Rep_pupdate F (Value ST)) ` Expr.PUpdate (Label TS)) [PROOF STEP] by (rule finite_i...
{"llama_tokens": 124, "file": "Statecharts_HASem", "length": 1}
import matplotlib import matplotlib.pyplot as plt matplotlib.use('TKAgg') import numpy as np import time, random, math size=11 #array = random.sample((range(1, size + 1)), size) array = list(xrange(size, 0, -1)) def bubble_sort(arr, rects): sorted = True for x in range(0, size - 1): update_plot(arr, '#000000', x-...
{"hexsha": "e5ef937a7364aa6fad9938559bf46e279126a130", "size": 1373, "ext": "py", "lang": "Python", "max_stars_repo_path": "57/bubblesort.py", "max_stars_repo_name": "Chutzpah7/Challenges", "max_stars_repo_head_hexsha": "7481eaf49dca9e8f68b8efa58cde778aa20449a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import math import importlib import functools def generate_inputs(size): import numpy as np np.random.seed(17) shape = ( math.ceil(2 * size ** (1/3)), math.ceil(2 * size ** (1/3)), math.ceil(0.25 * size ** (1/3)), ) # masks maskT, maskU, maskV, maskW = ((np.random.ran...
{"hexsha": "c6a56b7377d1abe6a5f7f13caf169f6a21612220", "size": 1714, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/isoneutral_mixing/__init__.py", "max_stars_repo_name": "mdanatg/pyhpc-benchmarks", "max_stars_repo_head_hexsha": "710d0ab484cae28beab99ddd1167d33574c83b53", "max_stars_repo_licenses": [...
(* Title: Extension Orders Author: Heiko Becker <heikobecker92@gmail.com>, 2016 Author: Jasmin Blanchette <jasmin.blanchette at inria.fr>, 2016 Author: Dmitriy Traytel <traytel@inf.ethz.ch>, 2014 Maintainer: Jasmin Blanchette <jasmin.blanchette at inria.fr> *) section \<open>Exte...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Lambda_Free_RPOs/Extension_Orders.thy"}
import numpy as np def iou_metric(y_true_in, y_pred_in): labels = y_true_in y_pred = y_pred_in temp1 = np.histogram2d(labels.flatten(), y_pred.flatten(), bins=([0,0.5,1], [0,0.5, 1])) intersection = temp1[0] area_true = np.histogram(labels,bins=[0,0.5,1])[0] area_pred = np.histogr...
{"hexsha": "233375fc49d41fffd61d9a1802d0c40cd3587f79", "size": 1496, "ext": "py", "lang": "Python", "max_stars_repo_path": "scores_comp.py", "max_stars_repo_name": "DevikalyanDas/NucleiSegnet-Paper-with-Code", "max_stars_repo_head_hexsha": "d8fbf9cc13160e21166fff905688c93d4900bdd2", "max_stars_repo_licenses": ["Apache-...
module BoehmBerarducci %default total NatQ : Type NatQ = (A : Type) -> (A -> A) -> A -> A unNatQ : {A : Type} -> (A -> A) -> A -> NatQ -> A unNatQ f a q = q _ f a succQ : NatQ -> NatQ succQ q = \_, f, a => f (q _ f a) zeroQ : NatQ zeroQ = \_, f, a => a fromNatQ : NatQ -> Nat fromNatQ q = unNatQ S Z q toNatQ : N...
{"hexsha": "278477ce2148da6d965dc4290414ac975bb485b9", "size": 1377, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "idris-explicit/BoehmBerarducci.idr", "max_stars_repo_name": "mietek/scott-encoding", "max_stars_repo_head_hexsha": "14e819383dd8730e1c3cbd9c2ce53335bd95188b", "max_stars_repo_licenses": ["X11", "M...
#include <algorithm> #include <fstream> #include <boost/assert.hpp> #include "nlohmann/json.hpp" #include "utility/type/XY.hpp" #include "utility/type/RowColumn.hpp" #include "utility/wrapper/sfVector2.hpp" #include "utility/wrapper/sfMakeColor.hpp" #include "Menu.hpp" namespace nemo { //////////////////////////////...
{"hexsha": "84a52b96ef5e4034f03838adec5525fa272c2515", "size": 23075, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/menu/Menu.cpp", "max_stars_repo_name": "zhec9/nemo", "max_stars_repo_head_hexsha": "b719b89933ce722a14355e7ed825a76dea680501", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
# Electro I. Pregunta bono 2: Análisis en DC gráfico. # Autor : Rafael Moreno # Fecha : 24/01/20 # Prof : Anibal Carpio from matplotlib import pyplot as plt import pandas as pd import numpy as np # Open file filename = 'Grafica Diodo 1-n4004 GP.csv' data = pd.read_csv(filename) # Diode I-V characteristics Vd = data...
{"hexsha": "c277c7554670717fe7570f08d58e4bbfa1da4997", "size": 1177, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pregunta bono 2.py", "max_stars_repo_name": "ImArcangel/Q-Point-Diode", "max_stars_repo_head_hexsha": "b8c8825493ffe7f286c07a9e212ac5b18ec3bcb6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
section "Invariant Context Simplifications" theory invContext_simps imports repliss_sem begin text "Here we prove various simplifications for the invariant contexts." lemma invContext_unchanged_happensBefore: assumes "co c \<triangleq> t" and "ts t \<triangleq> Uncommitted" shows "invContextH co to ts (hbOld \<...
{"author": "peterzeller", "repo": "repliss-isabelle", "sha": "f43744678cc9c5a4684e8bd0e9c83510bae1d9a4", "save_path": "github-repos/isabelle/peterzeller-repliss-isabelle", "path": "github-repos/isabelle/peterzeller-repliss-isabelle/repliss-isabelle-f43744678cc9c5a4684e8bd0e9c83510bae1d9a4/invContext_simps.thy"}
from controlSBML.control_sbml import ControlSBML from controlSBML import control_sbml import helpers import numpy as np import pandas as pd import os import unittest import tellurium as te IGNORE_TEST = False IS_PLOT = False TEST_DIR = os.path.dirname(os.path.abspath(__file__)) ANTIMONY_FILE = os.path.join(TEST_DIR...
{"hexsha": "ccae3a660c1f6642e6914411c9b26ebd9748a502", "size": 1114, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_control_sbml.py", "max_stars_repo_name": "ModelEngineering/controlSBML", "max_stars_repo_head_hexsha": "64587a7b22961a52aaf2b4e4a04fd1a0e3bc7a6b", "max_stars_repo_licenses": ["MIT"], "m...
from dataclasses import dataclass from typing import List, Literal from numpy import positive from xarray_dataclasses import Attr from datetime import datetime from toolz import curry @dataclass class VariableAttrs: standard_name: str long_name: str units: str @dataclass class AltitudeAttrs: standa...
{"hexsha": "38f02f9a484bdbd012a489716faa48ac6761e589", "size": 2638, "ext": "py", "lang": "Python", "max_stars_repo_path": "hello-xarray/cfxarray/attributes.py", "max_stars_repo_name": "NIVANorge/s-enda-playground", "max_stars_repo_head_hexsha": "56ae0a8978f0ba8a5546330786c882c31e17757a", "max_stars_repo_licenses": ["A...
from screeninfo import get_monitors import pygame from pygame.locals import * import os import sys from flick import Flick import time from record_data import RecordData from live_recorder import LiveRecorder from sklearn.externals import joblib import numpy as np from preprocess import preprocess_recordings from subpr...
{"hexsha": "b31eb948baa84b8041cdc6ef2c36f2f6296ef6ac", "size": 8231, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ssvep/utils.py", "max_stars_repo_name": "gumpy-hybridBCI/gumpy-Realtime", "max_stars_repo_head_hexsha": "163f72ff4d8734cbfd13848e21ce7d4cafc6e8e9", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma dbm_entry_dbm_min3: assumes "dbm_entry_val u (Some c) None (min a b)" shows "dbm_entry_val u (Some c) None b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dbm_entry_val u (Some c) None b [PROOF STEP] using dbm_entry_val_mono_3[folded less_eq, OF assms] [PROOF STATE] proof (prove) using this: ...
{"llama_tokens": 206, "file": "Timed_Automata_DBM_Operations", "length": 2}
[STATEMENT] lemma additive_wp_PC: "\<lbrakk> additive (wp a); additive (wp b) \<rbrakk> \<Longrightarrow> additive (wp (a \<^bsub>P\<^esub>\<oplus> b))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Transformers.additive (wp a); Transformers.additive (wp b)\<rbrakk> \<Longrightarrow> Transformers.additiv...
{"llama_tokens": 171, "file": "pGCL_Determinism", "length": 1}
#!/usr/bin/env python import sys,os,string from numpy import * from scipy.interpolate import * from myplotlib import PanelPlot from matplotlib import pyplot import pickle tck_file0 = 'tck.pickle' tck_file1 = 'bs_tck.pickle' f = open(tck_file0) all_tck0 = pickle.load(f) f.close() f = open(tck_file1) all_tcks = pickl...
{"hexsha": "264f452106edc5a2b7227625d5f9aebc95b80ce9", "size": 1852, "ext": "py", "lang": "Python", "max_stars_repo_path": "snpy/CSPtemp/plot_bs_disps.py", "max_stars_repo_name": "emirkmo/snpy", "max_stars_repo_head_hexsha": "2a0153c84477ba8a30310d7dbca3d5a8f24de3c6", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
% Author: Cristian Gonzales % Created for Physical Time, 2018 \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[document]{ragged2e} \newcommand\tab[1][1cm]{\hspace*{#1}} \begin{document} \Large{\textbf{Sprint 2 Plan}}\\ \Large{\text...
{"hexsha": "e03746de59a2c7daec0c21962bdf10963c3203c6", "size": 2713, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "scrum/sprint2/PTSprint2Plan.tex", "max_stars_repo_name": "Physical-TIme/Physical-Time", "max_stars_repo_head_hexsha": "3563c21d0c34503dcb4e82975e20c82621f9efef", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import math from scipy import signal, fft, interpolate def lpfilter_sos(data, dt, cutoff, zero_phase=True): """" Low-pass filter using the second-order representation Butterworth implementation Inputs: data - 2D numpy array, of shape [channels,samples] dt - sampling interval ...
{"hexsha": "bf1ea0a82e2f7bf6a9a9788f9bcf6167f94cf14d", "size": 7308, "ext": "py", "lang": "Python", "max_stars_repo_path": "signal_processing.py", "max_stars_repo_name": "DAS-RCN/continuous_data_handling", "max_stars_repo_head_hexsha": "cf1f2140c33bbd3c9f164c5c9fb1ff1d1573700e", "max_stars_repo_licenses": ["MIT"], "max...
#pragma once #include <boost/predef.h> #if BOOST_ARCH_X86 #include <emmintrin.h> #endif namespace emr { namespace detail { struct no_backoff { void operator()() {} }; class exponential_backoff { public: void operator()() { for (unsigned i = 0; i < count; ++i) do_backoff(); ...
{"hexsha": "c9c8c4805cb1b1c90eb246cc46adf87ff57251a7", "size": 550, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/emr/detail/backoff.hpp", "max_stars_repo_name": "mpoeter/emr", "max_stars_repo_head_hexsha": "390ee0c3b92b8ad0adb897177202e1dd2c53a1b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
C LAST UPDATE 16/03/89 C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C SUBROUTINE GETHDR (ITERM,IPRINT,IUNIT,HFNAM,ISPEC,LSPEC,INCR,MEM, & IFFR,ILFR,IFINC,IHFMAX,IFRMAX,NCHAN,IRC) IMPLICIT NONE C C Purpose: Get header file information C INTEGER ISP...
{"hexsha": "e22b63acfe96ef12c061db926157643373a5e8a2", "size": 2563, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "software/libs/otoko/gethdr.f", "max_stars_repo_name": "scattering-central/CCP13", "max_stars_repo_head_hexsha": "e78440d34d0ac80d2294b131ca17dddcf7505b01", "max_stars_repo_licenses": ["BSD-3-Claus...
# Deep Learning - Assignment 1 ## Outline (15 points) #### In this assignment, you will learn: * How to generate random data using python. * Building linear models for simple regression problem on the generated data. * Training the linear models with gradient descent algorithm. * How to alleviate over-fitting for y...
{"hexsha": "c743873b7adbb013929f34af0bef140df85e4044", "size": 268557, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "assignment1/Assignment1_v2_answer.ipynb", "max_stars_repo_name": "Haoban/Deep-Learning-Lectures-Exercises-Slides", "max_stars_repo_head_hexsha": "da9141fb9da9fde25d1d3edd4efa13f3f85...
import numpy as np import cv2 import os.path # File Searching folders = r"C:\Users\심재윤\PycharmProjects\RGB detection" ### Change Directory with your choice filename = os.listdir(folders) for names in filename : if (names == "makejpg.py") : continue file = folders + "\\" + names a = np.loadtxt(file, dty...
{"hexsha": "74bda2082ac139cdd4523db51169ef77204dd37c", "size": 572, "ext": "py", "lang": "Python", "max_stars_repo_path": "Detector_1/makejpg.py", "max_stars_repo_name": "JaeyoonSSim/Design-Project", "max_stars_repo_head_hexsha": "8a0037bec50b44b3f5d92da5254e79964fdaf9cf", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma joule_alt_def: "joule \<cong>\<^sub>Q newton \<^bold>\<cdot> metre" [PROOF STATE] proof (prove) goal (1 subgoal): 1. joule \<cong>\<^sub>Q newton \<^bold>\<cdot> metre [PROOF STEP] by si_calc
{"llama_tokens": 88, "file": "Physical_Quantities_SI_Derived", "length": 1}
import pytest numpy = pytest.importorskip('numpy') npt = pytest.importorskip('numpy.testing') scipy = pytest.importorskip('scipy') import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestBetheHessian(object): @classmethod def setup_class(cls): deg = [3, 2, 2, 1,...
{"hexsha": "2dccae492f2b11d37bcd1b975772a0b4e666bb70", "size": 1309, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/linalg/tests/test_bethehessian.py", "max_stars_repo_name": "jmmcd/networkx", "max_stars_repo_head_hexsha": "207ff7d1e9bfaff013ac77c8d6bb79619892c994", "max_stars_repo_licenses": ["BSD-3-C...
# !/usr/bin/env python import random import sys import os import rospkg import networkx as nx from cbm_pop_lib.common.chromosome import Chromosome from copy import deepcopy def init_result(tasks, mdvrp, prec, params): result = Chromosome(tasks, mdvrp.max_vehicle_load, prec, mdvrp.sliding...
{"hexsha": "f3981695594ab3c3b99b667195ed37574d0ef363", "size": 3003, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cbm_pop_lib/operators/generational_functions.py", "max_stars_repo_name": "barbara0811/cbm_pop_mdvrp_optimization", "max_stars_repo_head_hexsha": "10bfc55a21f48f93ed87ec4c48f07e315795efcd", "ma...
""" compute_laplace_eig(mesh, matrices, pde, eiglim, neig_max) Compute the Laplace eigenvalues, eigenfunctions and first order moments of products of pairs of eigenfunctions. """ function compute_laplace_eig(model, matrices, eiglim = Inf, neig_max = Inf) # Measure function evaluation time starttime = Base...
{"hexsha": "15f373c9ca0ee7c791c3220a618f6a9e9b7976f7", "size": 1946, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/matrix_formalism/compute_laplace_eig.jl", "max_stars_repo_name": "tapudodo/SpinDoctor.jl", "max_stars_repo_head_hexsha": "11ebc8095f988e52f14e89a2c0bef9fc0c4e63c0", "max_stars_repo_licenses": [...
import numpy as np import odrive import random import time ''' Random controller for physical pendulum ''' cpr = 8192 p0 = 0 t_run = 5 c_max = 3.0 v_max = 3 * cpr dt = 0.05 def p2r(p): return 2 * np.pi * (p/cpr) def v2rs(v): return p2r(v) # copied from gym env for model continuity # it handles wrap, turning pi i...
{"hexsha": "34636f9859aa64011dcb4ed4f5ad22c640ab4bb5", "size": 1049, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple/real_pendulum_simple.py", "max_stars_repo_name": "rravenel/furuta_pendulum", "max_stars_repo_head_hexsha": "b2f2a3bb8c6f2676671a24c6f9ea4d8e6479835f", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from logging import getLogger from tensorflow.keras.datasets import fashion_mnist from tensorflow.keras.utils import to_categorical from typing import Tuple logger = getLogger(__name__) def get_fasion_mnist() -> ( Tuple[np.ndarray, np.ndarray, np.ndarray], Tuple[np.ndarray, np.ndarray], )...
{"hexsha": "e75905f591f611248b156a35c60c100006ed76bc", "size": 2388, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning/tf_doc/dataset.py", "max_stars_repo_name": "iimuz/til", "max_stars_repo_head_hexsha": "b100438e8ce2f369331b3be215a4b9cdce9ffda5", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# This file takes in the C-sin-10-shot and converst it into the ball bouncing state data. import pickle import numpy as np filename = "C-sin_10-shot_legit_2.p" #filename = "bounce-states_100-shot_2.p" new_file = "C-sin_10-shot_legit_stateform.p" tasks = pickle.load(open(filename, "rb")) #Now convert it def rest...
{"hexsha": "0fdaf648e82a502f6ee87dbccd6ac35b8d26d1b3", "size": 1815, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/duplicateData.py", "max_stars_repo_name": "iguanaus/maml-auto", "max_stars_repo_head_hexsha": "833ae74f821279c0eddfcaff2ff2ede3c9fc6dc6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import pandas as pd import numpy as np from sklearn.impute import KNNImputer from sklearn.preprocessing import LabelEncoder import pickle from imblearn.over_sampling import RandomOverSampler class Preprocessor: """ This class shall be used to clean and transform the data before training. """ ...
{"hexsha": "c73382e2f1e9999f3a6030517181db37b8df667b", "size": 12757, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_preprocessing/preprocessing.py", "max_stars_repo_name": "dipesg/Thyroid-Classification", "max_stars_repo_head_hexsha": "b5f1a7ef1b8a6c3af6bf188529ed16471e82d8dd", "max_stars_repo_licenses": ...
# MIT License # # Copyright (c) 2021 Aditya Shridhar Hegde # # 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, modif...
{"hexsha": "feccc4c6f08e978045883da79a18c472701adf10", "size": 3234, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/he_meanshift_evaluate.py", "max_stars_repo_name": "encryptogroup/SoK_ppClustering", "max_stars_repo_head_hexsha": "6b008a09bfe3f3b8074e24059ac3e2aa6b87f227", "max_stars_repo_licenses": ["MIT...
## License: Apache 2.0. See LICENSE file in root directory. ## Copyright(c) 2015-2017 Intel Corporation. All Rights Reserved. #import pyrealsense2 as rs #import numpy as np from classes.realsense import RealSense from classes.objloader import * import copy import numpy as np import cv2 import os #import screeninfo CV...
{"hexsha": "6de7124dc9c738da55dacea4a39b68aceb1aa12e", "size": 7112, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/testSquares.py", "max_stars_repo_name": "snavas/PyMote", "max_stars_repo_head_hexsha": "9ac51251abbc943fcd36fbb58ff5c3031d375c14", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "...
C Copyright(C) 1999-2020 National Technology & Engineering Solutions C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with C NTESS, the U.S. Government retains certain rights in this software. C C See packages/seacas/LICENSE for details SUBROUTINE CLOSEG (MSNAP, SNAPDX, NSNAP, X, Y...
{"hexsha": "40cb450277526fcf6258dfdefcdfa8619363a29e", "size": 1780, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/fastq/closeg.f", "max_stars_repo_name": "jschueller/seacas", "max_stars_repo_head_hexsha": "14c34ae08b757cba43a3a03ec0f129c8a168a9d3", "max_stars_repo_licenses": ["Pyt...