text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright (c) Hikvision Research Institute. All rights reserved. import os import numpy as np from mmdet.datasets.pipelines import LoadAnnotations as MMDetLoadAnnotations from ..builder import PIPELINES @PIPELINES.register_module() class LoadAnnotations(MMDetLoadAnnotations): """Load multiple types of annotat...
{"hexsha": "b5c7eed87d252e9caf34b725b78c89bdddb61801", "size": 2610, "ext": "py", "lang": "Python", "max_stars_repo_path": "opera/datasets/pipelines/loading.py", "max_stars_repo_name": "hikvisionresearch/opera", "max_stars_repo_head_hexsha": "0fb345a7ad0046c6fd674959c0ae19a65adeeacf", "max_stars_repo_licenses": ["Apach...
using PackageCompiler tutorials_file = joinpath("..", "12_n_site.jl") PackageCompiler.create_sysimage( ["ITensors", "ITensorUnicodePlots", "ITensorGLMakie", "Zygote"]; sysimage_path="ITensor.so", precompile_execution_file=tutorials_file, ) # Then make an alias like: # # alias julia-itensor='julia -J/home/mfishm...
{"hexsha": "066d5b05e61b4bd4e641607cead5b297e6b042eb", "size": 418, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tutorials/package_compile/package_compile.jl", "max_stars_repo_name": "mtfishman/ITensorTutorials.jl", "max_stars_repo_head_hexsha": "dcbc1988299e6a7f3b612faeb31563da38ece3be", "max_stars_repo_licen...
module RetryRequest import ..HTTP using ..Sockets using ..IOExtras using ..MessageRequest using ..Messages import ..@debug, ..DEBUG_LEVEL, ..sprintcompact export retrylayer """ retrylayer(req) -> HTTP.Response Retry the request if it throws a recoverable exception. `Base.retry` and `Base.ExponentialBackOff` im...
{"hexsha": "1c495e6350ec20c3ee8b80418676ef9ec81ff6b1", "size": 2596, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RetryRequest.jl", "max_stars_repo_name": "NHDaly/HTTP.jl", "max_stars_repo_head_hexsha": "4b3c6336de1f7f4f55dc172e6bf247dd530611a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import pandas as pd import numpy as np import matplotlib.pyplot as plt # load data file='data_sheet.xlsx' data= pd.ExcelFile(file) print(data.sheet_names) # create data frame from data df_col = data.parse('RD0557_ARC6_404_R3C4@lam940nm') df_diffuser = data.parse('Diffuser_(RD0479_Jul20_OB6@940') df_fanout = data.par...
{"hexsha": "a4ed9718d0672ff0d83b10c83457ba40ec00853d", "size": 1364, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyis_plot.py", "max_stars_repo_name": "aki2020/DataAnalysis", "max_stars_repo_head_hexsha": "079c3bd8c2efadff26faf126d09d7b90d3d96a5b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
from numpy import exp, sqrt, zeros, maximum, log, abs import matplotlib.pyplot as plt from scipy.stats import norm class BinomalTree(object): """ Class that computes the Cox, Ross & Rubinstein (CRR) binomial tree model. """ implemented_types = ['european', 'binary', 'american'] def __init__(self...
{"hexsha": "093368487ac8f10bd3da36dac89e6665ff45055c", "size": 10374, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantfin/options/pricing.py", "max_stars_repo_name": "gusamarante/QuantFin", "max_stars_repo_head_hexsha": "ba8ae75095692b3e6a922220ef8cefc1bea7c35e", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # coding: utf-8 # # Exploring factors that influence educational outcomes with hypertools # ### Load in libraries needed for the project # In[1]: import pandas as pd import numpy as np import hypertools as hyp import seaborn as sns sns.set(style="darkgrid") get_ipython().run_line_magic('matp...
{"hexsha": "bb7567afba34abb57e508ac7ae4fb53ab181d82d", "size": 3253, "ext": "py", "lang": "Python", "max_stars_repo_path": "myexample/education.py", "max_stars_repo_name": "johnson7788/hypertools", "max_stars_repo_head_hexsha": "17e737ceabd97f63d30a294615e12395ed096910", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
SUBROUTINE SPHBES(N,X,FJ) IMPLICIT REAL*8(A-H,O-Z) DIMENSION FJ(*) DATA XLIM/1.D0/,HF/.5D0/,ZERO/0.D0/,ONE/1.D0/,TNHF/1.05D1/, & FFT/1.5D1/,T25/1.D18/,TN25/1.D-18/,TN50/1.D-36/,two/2.D0/ IF(N.EQ.0) THEN IF(X.EQ.0.D0) THEN FJ(1)=1.D0 RETURN END IF FJ(1)=D...
{"hexsha": "3459d619e10babf8f66a28621456e9705abd99b8", "size": 2380, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/dftso/sphbes.f90", "max_stars_repo_name": "chanul13/EDMFTF", "max_stars_repo_head_hexsha": "967d85d898924991b31861b4e1f45129e3eff180", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import numpy as np import pandas as pd import pygmo import xarray as xr from .constants import DESIGN_ID def xr_value_dims(name, value): """ Returns the value and dimensions/coordinates in the way we like 'em. >>> import xarray as xr >>> name = "foo" >>> value = np.array([1, 2, 3]) >>> xr_va...
{"hexsha": "c0685601799ca0be5b09fe9f42a1cbfd3ab6107b", "size": 7381, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/scop/processing.py", "max_stars_repo_name": "ovidner/openmdao-scop", "max_stars_repo_head_hexsha": "040ed417f69a216ee3e1e69fb6b87feaf7c6cd17", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using FIGlet using Test @testset "FIGlet.jl" begin iob = IOBuffer(b"flf2a", read=true); @test FIGlet.readmagic(iob) == UInt8['f', 'l', 'f', '2', 'a'] @test FIGlet.FIGletHeader('$', 6, 5, 16, 15, 11) == FIGlet.FIGletHeader('$', 6, 5, 16, 15, 11, 0, 2, 0) @test FIGlet.availablefonts() |> length == 680 ...
{"hexsha": "ea035042eb5e09fe2c8a3dc4473c1b6638671934", "size": 1049, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "wookay/FIGlet.jl", "max_stars_repo_head_hexsha": "040fdc50742f7cb8906aa22815fab60b870abcfc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
\chapter{Hyperbolic functions} \section{Definitions} \section{Differentiation and integration} \section{Inverse hyperbolic functions}
{"hexsha": "77252677aade36aac96eb40e9ad99b789ca653c6", "size": 133, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "corpus/a-level-notes/furthermath/content/pure_core/hyperbolic.tex", "max_stars_repo_name": "aDotInTheVoid/ltxmk", "max_stars_repo_head_hexsha": "ee461679e51e92a0e4b121f28ae5fe17d5e5319e", "max_stars_...
# LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE import numpy as np from sklearn import neighbors from scipy import sparse from .cyflann.index import Index as CyIndex from .utils import RegisterSubclasses try: import pyflann as pyf PYFLANN_LOADED = True except ImportError: PY...
{"hexsha": "b2bc474b82732151e51dc78926237c253256e283", "size": 5737, "ext": "py", "lang": "Python", "max_stars_repo_path": "megaman/geometry/adjacency.py", "max_stars_repo_name": "jakevdp/Mmani", "max_stars_repo_head_hexsha": "681b6cdbd358b207e8b6c4a482262c84bea15bd7", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
import copy import json import os import random import numpy as np from typing import Tuple import torch from PIL import Image from torch.utils.data import Subset from torchvision import transforms from matplotlib import pyplot as plt from .datasets import ConceptDataset from data import CUB200, MNIST def get_tran...
{"hexsha": "beb1df0e76c02f5125443806460703fa8fbcc4cc", "size": 9729, "ext": "py", "lang": "Python", "max_stars_repo_path": "lens/utils/data.py", "max_stars_repo_name": "pietrobarbiero/logic_explained_networks", "max_stars_repo_head_hexsha": "238f2a220ae8fc4f31ab0cf12649603aba0285d5", "max_stars_repo_licenses": ["Apache...
import numpy as np print("######") print("AND 1") def AND_origianl(x1, x2): w1, w2, theta = 0.5, 0.5, 0.7 tmp = x1*w1 + x2*w2 if tmp <= theta: return 0 else: return 1 print(AND_origianl(0,0)) print(AND_origianl(1,0)) print(AND_origianl(0,1)) print(AND_origianl(1,1)) print("######") p...
{"hexsha": "fe2857b3e2d9e9bbbd95ae583f9e5bef691f5521", "size": 1352, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/deep-learning-from-scratch/chapter2.py", "max_stars_repo_name": "tomothumb/sandbox", "max_stars_repo_head_hexsha": "0bca792ea1e97ee045accdc7cd6b4fa0c424785b", "max_stars_repo_licenses": ["M...
''' ANKIT KHANDELWAL 15863 Exercise 8 ''' from math import exp import matplotlib.pyplot as plt import numpy as np import pandas as pd blur = pd.read_csv("blur.txt", sep=' ', header=None) def G(x, y): return exp(-(x ** 2 + y ** 2) / (2 * 25 ** 2)) gauss = np.ones((1024, 1024)) for i in range(1024): for j ...
{"hexsha": "d2c136426aaa87e04e7421345bd139faebe01a70", "size": 1218, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ankit Khandelwal_HW4/Exercise 8/exercise 8.py", "max_stars_repo_name": "ankit27kh/Computational-Physics-PH354", "max_stars_repo_head_hexsha": "d37c93e430a0f282251a814456890acb4a2961fe", "max_stars...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 23 17:09:02 2020 @author: minjie """ import globalvar as gl import os.path as osp from config import cfg from tqdm import tqdm import torchvision import torch import numpy as np from collections import Counter from data.transforms.build import g...
{"hexsha": "becc364b125e8bcf6b65c89f326a62db28bf8885", "size": 7617, "ext": "py", "lang": "Python", "max_stars_repo_path": "proc_hawaii_flower_feat.py", "max_stars_repo_name": "zyxwvu321/Classifer_SSL_Longtail", "max_stars_repo_head_hexsha": "e6c09414c49e695b0f4221a3c6245ae3929a1788", "max_stars_repo_licenses": ["MIT"]...
import numpy as np class Annuity: def __init__(self, annuity, rate, year, period=12): self.annuity = annuity self.rate = rate / 100 self.year = year self.period = period def get_fv(self): pass def get_pv_ordinary_annuity(self): item_1_numerator = 1 - (1 / ...
{"hexsha": "83143cb8dcfb375e7ca3b6129f492e9ad993211c", "size": 780, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Annuity.py", "max_stars_repo_name": "lancejchen/FM-Python-Caculator", "max_stars_repo_head_hexsha": "f64b9c717fe458c2854c84cca4157a53ef871632", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/*************************************************************************** * * Copyright (c) 2013 Baidu.com, Inc. All Rights Reserved * **************************************************************************/ /** * @file ThriftTracker.cpp * * @author liuming03 * @date 2013-9-12 * @brief */ #incl...
{"hexsha": "b04408963ed3aa3df194e18aee40cf4ea7972885", "size": 7837, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "gko-src/src/ThriftTracker.cpp", "max_stars_repo_name": "JohnnyFang0515/gingko", "max_stars_repo_head_hexsha": "33f289b36d6d8176fa7be67275dda93d40efbfd7", "max_stars_repo_licenses": ["BSD-2-Clause"],...
""" AbstractEstimationMethod Abstract type for defining statistical estimation methods. """ abstract type AbstractEstimationMethod end """ GradientDescentEstimation <: AbstractEstimationMethod Method for estimation using gradient descent. """ struct GradientDescentEstimation <: AbstractEstimationMethod end ...
{"hexsha": "e20166e2a7e2b509d7da466ff9b051d619d17db1", "size": 39263, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/statistics.jl", "max_stars_repo_name": "r-dornig/Manifolds.jl", "max_stars_repo_head_hexsha": "c40e31ddc5507caff2e9346ac889d8f741740100", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from matplotlib import pyplot as plt from matplotlib import mlab as mlab import matplotlib.animation as animation from rtlsdr import RtlSdr #import numpy as np import time sdr = RtlSdr() # configure device sdr.sample_rate = 2.4e6 # min is 1e6 // max is 3.2e6 // std is 2.4e6 (Hz) sdr.center_freq = 94.7e6 ...
{"hexsha": "a00310051764afe9a44b303b422bfc6c99953ffa", "size": 1576, "ext": "py", "lang": "Python", "max_stars_repo_path": "spektrum_live_speedtest.py", "max_stars_repo_name": "MxFxM/DIY_SDR", "max_stars_repo_head_hexsha": "6c60da87ca62049073afba0e0e85bef6bc606b6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
Require Import SpecDeps. Require Import RData. Require Import EventReplay. Require Import MoverTypes. Require Import Constants. Require Import CommonLib. Require Import AbsAccessor.Spec. Local Open Scope Z_scope. Section SpecLow. Definition find_lock_rec_spec0 (g_rd: Pointer) (rec_list: Pointer) (rec_idx: Z64) (ad...
{"author": "columbia", "repo": "osdi-paper196-ae", "sha": "6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496", "save_path": "github-repos/coq/columbia-osdi-paper196-ae", "path": "github-repos/coq/columbia-osdi-paper196-ae/osdi-paper196-ae-6df8f9e5b7b1e508a22327fd4a8c0c9be6c56496/proof/PSCIAux/LowSpecs/find_lock_rec.v"}
import numpy as np import bokeh.plotting as bkp data = np.load('prices2018.npy') data = data[np.argsort(data[:, 2]), :] p = 3 c = ((np.log(data[:,2]) - np.log(data[:,2]).min()) / (np.log(data[:,2]).max() - np.log(data[:,2]).min()))**p #c = np.linspace(0, 1, data.shape[0]) colors = ['#%02x%02x%02x' % ...
{"hexsha": "904d8df34bb11bfa660534b01bb4000341f291fe", "size": 531, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/data/plot_housing_prices.py", "max_stars_repo_name": "tinnguyen96/bayesian-coresets", "max_stars_repo_head_hexsha": "1d9930f58dbf6464f2a1ecb18267c04d865ea258", "max_stars_repo_licenses": [...
[STATEMENT] lemma tm_weak_copy_correct13: "\<lbrace>\<lambda>tap. tap = ([], [Bk,Bk]@r) \<rbrace> tm_weak_copy \<lbrace>\<lambda>tap. tap = ([Bk,Bk], r) \<rbrace>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrace>\<lambda>tap. tap = ([], [Bk, Bk] @ r)\<rbrace> tm_weak_copy \<lbrace>\<lambda>tap. tap = ([Bk,...
{"llama_tokens": 849, "file": "Universal_Turing_Machine_WeakCopyTM", "length": 7}
# -*- coding: utf-8 -*- """ Created on Thu Mar 02 17:26:23 2017 @author: lansford """ """Vibrational modes.""" from ase.data import covalent_radii as CR from ase.io import read import numpy as np def get_geometric_data(CONTCAR, cutoff=1.25, crystal_type='fcc'): """ Obtain important geometric data for all atoms ...
{"hexsha": "9399002f766d8f6d83f2816ca02bc9a9fcda7f54", "size": 7516, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdos_overlap/coordination.py", "max_stars_repo_name": "JLans/pdos_overlap", "max_stars_repo_head_hexsha": "575b3f7aeb8d329dc2b5d07755aa167bc71b2c77", "max_stars_repo_licenses": ["MIT"], "max_stars...
import pytest import numpy as np import loupe def test_zernike_rho_theta(): with pytest.raises(ValueError): loupe.zernike(mask=1, index=1, normalize=True, rho=1, theta=None) def test_zernike_positive(): with pytest.raises(ValueError): loupe.zernike(mask=1, index=-1) def test_zernike_basis(...
{"hexsha": "03bd0ae2c6fc76795498bd05e2a06c3e0b8757c9", "size": 1186, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_zernike.py", "max_stars_repo_name": "andykee/loupe", "max_stars_repo_head_hexsha": "8b10781598973aac7c129e190209acad7e5a9559", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
/- Copyright (c) 2019 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import algebra.category.CommRing.basic import topology.category.Top.basic import topology.algebra.ring /-! # Category of topological commutative rings We introduce ...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/topology/category/TopCommRing.lean"}
#!/usr/bin/env python3.6 # -*- Coding: UTF-8 -*- """ Block Matching Algorithm. ------------------------ According to [cuevs2013]_ in a block matching (BM) approach: '...image frames in a video sequence are divided into blocks. For each block in the current frame, the best matching block is identified inside a ...
{"hexsha": "08c2e237f9be30f51f065b2a0a21b78e092f47c1", "size": 12088, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/blockmatching/blockmatching.py", "max_stars_repo_name": "duducosmos/blockmatching", "max_stars_repo_head_hexsha": "c37949cce79b58ae658d5814ba3cff906dc4ab4e", "max_stars_repo_licenses": ["Apac...
#!/usr/bin/env python ''' Calculates the total number of character occurances at each position within the set of sequences passed. ''' from __future__ import division import argparse import numpy as np import sys import pandas as pd import mpathic.qc as qc import mpathic.io as io from mpathic import SortSeqError def m...
{"hexsha": "45bf3a73b6ba7244802a660eb52c0305608f7fef", "size": 4082, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/profile_ct.py", "max_stars_repo_name": "irelandb/mpathic_for_cluster", "max_stars_repo_head_hexsha": "bacdbf4d9227a8035cd4de2b4d19aeefe82093c6", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
#coding=utf8 from __future__ import print_function, division import os,time,datetime import numpy as np import datetime from math import ceil import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from utils.utils import LossRecord import pdb def dt(): return datet...
{"hexsha": "811ffe9cd2a1ee7193e6865492ed8fed2904695e", "size": 3027, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/eval_model.py", "max_stars_repo_name": "leowangzi/DCL", "max_stars_repo_head_hexsha": "85f27ed29f5cda461b3dce0f2bbb3f11844ed7bc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import algebra.module.basic import algebra.gcd_monoid.basic import algebra.group_ring_action import group_theory.group_action.defs /-! # Instances on punit This file collect...
{"author": "nick-kuhn", "repo": "leantools", "sha": "567a98c031fffe3f270b7b8dea48389bc70d7abb", "save_path": "github-repos/lean/nick-kuhn-leantools", "path": "github-repos/lean/nick-kuhn-leantools/leantools-567a98c031fffe3f270b7b8dea48389bc70d7abb/src/algebra/punit_instances.lean"}
from glob import glob import sys #can be used to perform sys.exit() import cv2 import numpy as np import os import yaml import logging import tensorflow as tf import pandas as pd from facenet.src import facenet from facenet.src.align import detect_face from logging.handlers import TimedRotatingFileHandler i...
{"hexsha": "fcdb923d784ee178e4c187a09edac8aa54e1b4e6", "size": 5060, "ext": "py", "lang": "Python", "max_stars_repo_path": "face_localize_feature_extract.py", "max_stars_repo_name": "Nikhil-Jain-2002/Final_PSI_Project", "max_stars_repo_head_hexsha": "f7ca109201e9bc6bc537382df9134ea63a2bdabd", "max_stars_repo_licenses":...
[STATEMENT] lemma (in start_context) semi: "semilat (A, r, f)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. semilat (A, r, f) [PROOF STEP] apply (insert semilat_JVM[OF wf]) [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>mxs mxl. semilat (JVM_SemiType.sl P mxs mxl)) \<Longrightarrow> semilat (A, r, f) [PR...
{"llama_tokens": 346, "file": "Jinja_BV_TF_JVM", "length": 4}
MODULE coilsnamin USE modular_coils USE saddle_coils USE saddle_surface USE vf_coils USE tf_coils USE bcoils_mod USE bnorm_mod USE control_mod USE Vcoilpts IMPLICIT NONE NAMELIST /coilsin/ nmod_coils_per_period, nf_phi, nf_rho, epsfcn, 1 lv...
{"hexsha": "2f984775bf0b710caead9342da5f9821e16f0f61", "size": 9329, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/LIBSTELL/Sources/Modules/coilsnamin.f", "max_stars_repo_name": "jonathanschilling/VMEC_8_49", "max_stars_repo_head_hexsha": "9f1954d83b2db13f4f4b58676badda4425caeeee", "max_stars_repo_licenses...
function variance = bradford_variance ( a, b, c ) %*****************************************************************************80 % %% BRADFORD_VARIANCE returns the variance of the Bradford PDF. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 03 September 2004 % % A...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/prob/bradford_variance.m"}
#TODO merge into StatsBase.jl & potentially make types there abstract using Random using StatsBase: make_alias_table! struct OneToInf <: AbstractVector{Int} end Base.size(::OneToInf) = (typemax(Int),) Base.getindex(::OneToInf, x::Integer) = x Base.iterate(::OneToInf, state=1) = (state, state+1) Base.eltype(::Type{One...
{"hexsha": "a8f99b8e64228e7c4c8ca39c450808ded6787bae", "size": 2948, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/alias_table.jl", "max_stars_repo_name": "LilithHafner/FBD", "max_stars_repo_head_hexsha": "422c7743ad94348fe10d5495915ed33da06fc433", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
# -*- coding: utf-8 -*- """ Created on Tue Aug 18 12:58:11 2020 @author: Ashish """ import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 20,1000) y = np.sin(x)+.2*x plt.plot(x,y) plt.xlabel("input") plt.ylabel("output") plt.title("my plot") plt.show() # Scatterplt X = np.random...
{"hexsha": "18704c6d52c2808ec92fa37d6ab0adec709d34c5", "size": 703, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/fundamentals/matplotlib_basic_plots.py", "max_stars_repo_name": "duttashi/learnpy", "max_stars_repo_head_hexsha": "c08b76b173b06d66187e51a6939d55d5dd12cb5a", "max_stars_repo_licenses": ["MI...
Require Export List. Export ListNotations. Require Import ZArith. Local Open Scope Z_scope. Require Import VST.floyd.sublist. Fixpoint repeat_op_nat{T: Type}(n: nat)(start: T)(op: T -> T): T := match n with | O => start | S m => op (repeat_op_nat m start op) end. Definition repeat_op{T: Type}(n: Z)(start: T)(op: T ->...
{"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq_projects/VST/aes/list_utils.v"}
#!/usr/bin/env python # coding: utf-8 # In[61]: from datetime import datetime from sklearn.preprocessing import RobustScaler from sklearn.model_selection import KFold, cross_val_score from sklearn.metrics import mean_squared_error , make_scorer, mean_absolute_error from sklearn.linear_model import ElasticNetCV, Lass...
{"hexsha": "88a88997bb409c0487778d1be55147685892b6f7", "size": 5220, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ml_module/model_regression.py", "max_stars_repo_name": "gprasanthkumar/ML_Pipeline_Example", "max_stars_repo_head_hexsha": "be866cfe9c1981452d490c8f2fc4ddb7a4f985f4", "max_stars_repo_licenses"...
import cv2 import numpy as np import time # A required callback method that goes into the trackbar function. def nothing(x): pass # Initializing the webcam feed. cap = cv2.VideoCapture(0) cap.set(3, 1280) cap.set(4, 720) # Create a window named trackbars. cv2.namedWindow("Trackbars") # Now create 6 trackbars ...
{"hexsha": "7932b9304272cf76074f30b3518e61c38c4a0315", "size": 2863, "ext": "py", "lang": "Python", "max_stars_repo_path": "pensetup.py", "max_stars_repo_name": "dipghoshraj/virtual-pen", "max_stars_repo_head_hexsha": "ffc63af834ec3b495d98ba0de85b125580b2f025", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, ...
//----------------------------------------------------------------------------- // Copyright (c) 2017-2018 Benjamin Buch // // https://github.com/bebuch/disposer // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) /...
{"hexsha": "bb4622bbf8964bd55e08b4316c5151c9625d6c9c", "size": 3217, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/disposer/core/component_ref.hpp", "max_stars_repo_name": "bebuch/disposer", "max_stars_repo_head_hexsha": "8d065cb5cdcbeaecdbe457f5e4e60ff1ecc84105", "max_stars_repo_licenses": ["BSL-1.0"], ...
''' Implements a linear soft-constrait MPC controller with stability guarantees. Supports ellipsoidal termina sets only. Uses Casadi with Opti stack ''' from sys import path path.append(r"./casadi-py27-v3.5.5") from casadi import * import numpy as np from scipy.linalg import fractional_matrix_power import mat...
{"hexsha": "1dc4d0ca33dacf76a6a9016c95e3d5c07df8478d", "size": 12506, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/core/StabilizingController.py", "max_stars_repo_name": "ziyadsheeba/soft-safety-filter", "max_stars_repo_head_hexsha": "700f6e43eb1bae6e1f022aee6a4ca3b8b68de661", "max_stars_repo_licenses": [...
[STATEMENT] lemma bit_nat_iff [bit_simps]: \<open>bit (nat k) n \<longleftrightarrow> k \<ge> 0 \<and> bit k n\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. bit (nat k) n = (0 \<le> k \<and> bit k n) [PROOF STEP] proof (cases \<open>k \<ge> 0\<close>) [PROOF STATE] proof (state) goal (2 subgoals): 1. 0 \...
{"llama_tokens": 1275, "file": null, "length": 16}
#!/usr/bin/env python3 import os import sys sys.path.append( '..' ) import MotifTable import pickle import distributions import GenomeBindingTable as gbt import FragExtract as Frag import ChipSeq import PCR import numpy as np import pandas as pd import scipy import matplotlib.pyplot as plt cbcolors = {'sky blue': (8...
{"hexsha": "b89188184e3bf3eaba15dae396d4560b6b19b261", "size": 23418, "ext": "py", "lang": "Python", "max_stars_repo_path": "paper/chip_scratch.py", "max_stars_repo_name": "vishakad/animate", "max_stars_repo_head_hexsha": "0da18be596bf7e462d47bef86aff4c71fc9cffbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np from nilabels.tools.aux_methods.utils_nib import set_new_data def cut_4d_volume_with_a_1_slice_mask(data_4d, data_mask): """ Fist slice maks is applied to all the timepoints of the volume. :param data_4d: :param data_mask: :return: """ assert data_4d.shape[:3] == data_m...
{"hexsha": "496f6fb9ee2c7e006966d33b35e6fe6a7a2c001a", "size": 2263, "ext": "py", "lang": "Python", "max_stars_repo_path": "nilabels/tools/image_colors_manipulations/cutter.py", "max_stars_repo_name": "nipy/nilabels", "max_stars_repo_head_hexsha": "b065febc611eef638785651b4642d53bb61f1321", "max_stars_repo_licenses": [...
# Gaussian mixture model suign PyMC3 # Based on https://github.com/aloctavodia/BAP/blob/master/code/Chp6/06_mixture_models.ipynb import pymc3 as pm import numpy as np import scipy.stats as stats import pandas as pd import theano.tensor as tt import matplotlib.pyplot as plt import arviz as az np.random.seed(42) #url...
{"hexsha": "53ae951a1fd4c47b938d74e6bef08c9979e83c7c", "size": 2084, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/gmm_identifiability_pymc3.py", "max_stars_repo_name": "always-newbie161/pyprobml", "max_stars_repo_head_hexsha": "eb70c84f9618d68235ef9ba7da147c009b2e4a80", "max_stars_repo_licenses": ["MI...
""" tests desispec.sky """ import unittest import numpy as np from desispec.sky import compute_sky, subtract_sky from desispec.resolution import Resolution from desispec.frame import Frame import desispec.io import desispec.scripts.sky as skyscript class TestSky(unittest.TestCase): #- Create unique test f...
{"hexsha": "506384f8132f0dc2d9aecc5a4d0a5c9ab8d0a3c6", "size": 4590, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/desispec/test/test_sky.py", "max_stars_repo_name": "echaussidon/desispec", "max_stars_repo_head_hexsha": "8a8bd59653861509dd630ffc8e1cd6c67f6cdd51", "max_stars_repo_licenses": ["BSD-3-Clause"],...
from __future__ import absolute_import, division, print_function, unicode_literals import os import cv2 import copy import numpy as np import scipy.io as sio from utils.common_utils import interp, BFconsistCheck, \ FBconsistCheck, consistCheck, get_KeySourceFrame_flowNN_gradient def get_flowNN_gradient(args, ...
{"hexsha": "5d34327fd0c9559f8b4de384278e57c483a073cd", "size": 26056, "ext": "py", "lang": "Python", "max_stars_repo_path": "tool/get_flowNN_gradient_test.py", "max_stars_repo_name": "co-develop-drv/FGVC", "max_stars_repo_head_hexsha": "60d91f85ee48d757dd070e66984ea57d7e60f668", "max_stars_repo_licenses": ["MIT"], "max...
/* ---------------------------------------------------------------- Copyright (c) Coding Nerd Licensed under the Apache License, Version 2.0 See LICENSE in the project root for license information. ---------------------------------------------------------------- */ #pragma once #include <boost/property_...
{"hexsha": "21dd036e5e9bad423446858f4b2ff4639a2fc79c", "size": 1012, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "common/inc/property_manager.hpp", "max_stars_repo_name": "c6supper/unify-nmon", "max_stars_repo_head_hexsha": "8570f70de640ccb2ea502585883aefa5a93849b9", "max_stars_repo_licenses": ["Apache-2.0"], "...
Require Import compcert.common.Memory. Require Import VST.msl.Coqlib2. Require Import VST.msl.eq_dec. Require Import VST.msl.seplog. Require Import VST.msl.ageable. Require Import VST.msl.age_to. Require Import VST.veric.coqlib4. Require Import VST.veric.juicy_mem. Require Import VST.veric.compcert_rmaps. Require Impor...
{"author": "ildyria", "repo": "coq-verif-tweetnacl", "sha": "8181ab4406cefd03ab0bd53d4063eb1644a2673d", "save_path": "github-repos/coq/ildyria-coq-verif-tweetnacl", "path": "github-repos/coq/ildyria-coq-verif-tweetnacl/coq-verif-tweetnacl-8181ab4406cefd03ab0bd53d4063eb1644a2673d/packages/coq-vst/coq-vst.2.0/veric/aging...
import collections import logging import numpy as np import platform import random from typing import List, Dict # Import ray before psutil will make sure we use psutil's bundled version import ray # noqa F401 import psutil # noqa E402 from ray.rllib.execution.segment_tree import SumSegmentTree, MinSegmentTree from...
{"hexsha": "07c46e97a6b2b25f8a807ab2291d68aa44eb51bf", "size": 18294, "ext": "py", "lang": "Python", "max_stars_repo_path": "rllib/execution/replay_buffer.py", "max_stars_repo_name": "77loopin/ray", "max_stars_repo_head_hexsha": "9322f6aab53f4ca5baf5a3573e1ffde12feae519", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# https://www.kaggle.com/sreevishnudamodaran/tpu-hubmap-double-u-net-model-augmentation import os import glob import tensorflow as tf from tqdm import tqdm import numpy as np import pandas as pd import matplotlib.pyplot as plt from patho.cfg.config import path_cfg,img_proc_cfg from patho.utils.utils import read_singl...
{"hexsha": "12f30821cfae4bfe32ecd1218e08f65f8d0e4dc2", "size": 3942, "ext": "py", "lang": "Python", "max_stars_repo_path": "patho/api/datasets/gen_tfrecords.py", "max_stars_repo_name": "vankhoa21991/patho_toolbox", "max_stars_repo_head_hexsha": "11489e958500505d501bcd11ea5c944d7629ea0f", "max_stars_repo_licenses": ["MI...
import torch import numpy as np import argparse import pickle import time import torch.nn as nn # Device configuration device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') from transformers import BertModel, BertTokenizer MAX_LEN = 100 class BERTClassifier(nn.Module): def __init__(self, trg_voc...
{"hexsha": "4c526987ce4468254ec5d6a3098bff82c98023f5", "size": 3300, "ext": "py", "lang": "Python", "max_stars_repo_path": "ext_feats/infer_bert/text_bert_tweet.py", "max_stars_repo_name": "yuewang-cuhk/CMKP", "max_stars_repo_head_hexsha": "4e8348283fad9a2a4c605959c79bc2922171b753", "max_stars_repo_licenses": ["MIT"], ...
/******************************************************************************* * * MIT License * * Copyright (c) 2017-2022 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
{"hexsha": "14c89f44739b0b2dcc7011d3ab4e12d6d447de46", "size": 25179, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/modules/hip/handlehip.cpp", "max_stars_repo_name": "shobana-mcw/rpp", "max_stars_repo_head_hexsha": "e4a5eb622b9abd0a5a936bf7174a84a5e2470b59", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from tictactoe_env import TicTacToe import pdb import numpy as np import matplotlib.pyplot as plt import itertools import random if __name__ == "__main__": env = TicTacToe() num_episodes = 1000 learning_rate = 0.6 epsilon = 0.2 number_of_actions = 9 ...
{"hexsha": "3231ecc63824f56c5ed41ff9b73276e17bfd0cf2", "size": 4238, "ext": "py", "lang": "Python", "max_stars_repo_path": "Q-learning/Tic-tac-toe/training.py", "max_stars_repo_name": "nipunbhanot/Q-Learning", "max_stars_repo_head_hexsha": "50102cd4fd904105f2a246f74a9fffb0eadd39df", "max_stars_repo_licenses": ["MIT"], ...
import warnings from typing import Dict, Optional, Tuple, Union import numpy as np import pandas as pd from autotabular.pipeline.base import DATASET_PROPERTIES_TYPE, PIPELINE_DATA_DTYPE from autotabular.pipeline.components.base import AutotabularPreprocessingAlgorithm from autotabular.pipeline.constants import DENSE, ...
{"hexsha": "35f624b303e5c1a22a27d16557166dcd8a800d77", "size": 3263, "ext": "py", "lang": "Python", "max_stars_repo_path": "autotabular/pipeline/components/data_preprocessing/exclude_miss_target/exclude_missing_target.py", "max_stars_repo_name": "jianzhnie/AutoTabular", "max_stars_repo_head_hexsha": "fb407300adf97532a2...
from galearn import settings from sklearn.model_selection import cross_val_score import numpy as np # having this here allows some functions to be called directly outside of simulate rng = settings.rng fitness_function = settings.fitness_function estimator = settings.estimator gene_pool = settings.gene_pool gnp_window...
{"hexsha": "1255390ae59fa819bfa92aeb7bff98fe5f0eb3c2", "size": 13960, "ext": "py", "lang": "Python", "max_stars_repo_path": "galearn/galearn.py", "max_stars_repo_name": "aegonwolf/galearn", "max_stars_repo_head_hexsha": "1e069c90e49d151066d199333e25fb80e745f635", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
from spada.bio.switch import IsoformSwitch, LiteSwitch from spada.io import io from spada.network.network import Network import abc import numpy as np import operator import random class GeneNetwork(Network): """docstring for GeneNetwork GeneNetwork contains a network of genes. Node information: id(str) G...
{"hexsha": "89ca7cca37cfa073df042d5517d72f390b6ce94d", "size": 6783, "ext": "py", "lang": "Python", "max_stars_repo_path": "spada/network/gene_network.py", "max_stars_repo_name": "hclimente/spada", "max_stars_repo_head_hexsha": "c9584df9e25a597c70b67a6a0b7ce63283a11839", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -------------------------------------------------- # Anvil Uplink Server # -------------------------------------------------- # Author : Tom Eleff # Version : 1_0 # Date : 23JAN22 # -------------------------------------------------- import schedule import time import os import sys import json import d...
{"hexsha": "42c3509fe19df087207eafeffca69f225e8841a8", "size": 17622, "ext": "py", "lang": "Python", "max_stars_repo_path": "server_code/AnvilServer.py", "max_stars_repo_name": "thomaseleff/Crypto-Price-Estimator", "max_stars_repo_head_hexsha": "92dea0122f86f024f7cd324039a7d9d093382b59", "max_stars_repo_licenses": ["MI...
import pandas as pd import pandas as pd import numpy as np from nltk.stem import PorterStemmer ps = PorterStemmer() import nltk import string from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import CountVectorizer from sklearn.metri...
{"hexsha": "46cb1b293ef61ea820165c06aad1fd06ceb5b5a3", "size": 1262, "ext": "py", "lang": "Python", "max_stars_repo_path": "The_Django_Website/RedditFlair/webapp/modd/pls_work.py", "max_stars_repo_name": "basketcase03/The_Reddit_Flair_Detection", "max_stars_repo_head_hexsha": "b735924ce1eafc767382ff60482881d4eab1a498",...
import data.padics import for_mathlib.ideal_operations import for_mathlib.normed_spaces import for_mathlib.nnreal import for_mathlib.padics import adic_space /-! # The p-adics form a Huber ring In this file we show that ℤ_[p] and ℚ_[p] are Huber rings. They are the fundamental examples of Huber rings. We also show...
{"author": "leanprover-community", "repo": "lean-perfectoid-spaces", "sha": "95a6520ce578b30a80b4c36e36ab2d559a842690", "save_path": "github-repos/lean/leanprover-community-lean-perfectoid-spaces", "path": "github-repos/lean/leanprover-community-lean-perfectoid-spaces/lean-perfectoid-spaces-95a6520ce578b30a80b4c36e36ab...
# Copyright 2020, The TensorFlow 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 applicable law or agreed t...
{"hexsha": "4c80f49a9fdb6f75150da9773fbf96853b7052e7", "size": 7840, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack_test.py", "max_stars_repo_name": "jagielski/privacy", "max_stars_repo_head_hexsha": "e468af41dd11176f3f04eabc42cf...
import numpy as np import matplotlib.pyplot as plt import os from deeperwin.dispatch import load_from_file import re import pandas as pd _REFERENCE_ENERGIES = {'He': -2.90372, 'Li': -7.478067, 'Be': -14.66733, 'B': -24.65371, 'C': -37.84471, 'N': -54.58882, 'O': -75.06655, 'F': -99.7329, 'Ne': -...
{"hexsha": "113074bbbf22b44c836f3f5ad22ec7c171f5f23a", "size": 2575, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/analysis/analyze_ferminet.py", "max_stars_repo_name": "deepqmc/deeperwin", "max_stars_repo_head_hexsha": "1c514c972ee1df3cc5c8c3ecaf9408befd157341", "max_stars_repo_licenses": ["MIT"], "max_st...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import math from ..utils import one_hot from model.models import GeneralizedFewShotModel class ScaledDotProductAttention(nn.Module): ''' Scaled Dot-Product Attention ''' def __init__(self, temperature, attn_dropout=0.1): ...
{"hexsha": "78fdbd959a611a4b8b52bf088b13c6dc73aedc88", "size": 7654, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/models/acastle.py", "max_stars_repo_name": "Sha-Lab/CASTLE", "max_stars_repo_head_hexsha": "212cb7aaad1bfae7041c90143220286bde24db33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# %% markdown # # run_importance_sampler # sets up the data matrix (number of samples x 6 columns) and the 'analysis_settings' struct with algorithm parameters # # **USAGE**: # - Specify parameters within this script and then execute `run_importance_sampler()` # # **INPUTS**: # - None # # **OUTPUTS**: # - None # %% fr...
{"hexsha": "de949b134e644217dc8288842521775e756f2c12", "size": 10141, "ext": "py", "lang": "Python", "max_stars_repo_path": "toreorganize/run_importance_sampler.py", "max_stars_repo_name": "githubpsyche/PCITpy", "max_stars_repo_head_hexsha": "be1b68fcfdb2eaaf653eabd94ba6d893d0be1fb8", "max_stars_repo_licenses": ["Apach...
# -*- coding: utf-8 -*- """ Created on Mon May 7 22:15:54 2018 @author: Steven """ import numpy as np def variance(q, AS, f): """ Determines the variance of the number of counts in each channel i for the qth iteration, where: -q is the iteration number -AS is either the estimated activit...
{"hexsha": "c6e24954d12ce0478e0dbe1055cccc0dda3b5f7d", "size": 1023, "ext": "py", "lang": "Python", "max_stars_repo_path": "radioxenon_ml/solve/variance.py", "max_stars_repo_name": "manninosi/radioxenon_ml", "max_stars_repo_head_hexsha": "e901a2465bcbe491184cefc58db021a9321b9555", "max_stars_repo_licenses": ["MIT"], "m...
from __future__ import absolute_import, division, print_function import math import random from collections import deque from os.path import exists, join import cv2 import numpy as np import torch import re from PIL import Image, ImageOps, ImageEnhance, ImageDraw from torchvision.transforms import (ColorJitter, Compos...
{"hexsha": "fbf623ac113de0c8316c4dae27b64da2f8b09fda", "size": 54029, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchreid/data/transforms.py", "max_stars_repo_name": "daniil-lyakhov/deep-object-reid", "max_stars_repo_head_hexsha": "b0f7d6a2d4cff8c417a66d82c09d16788d81ec67", "max_stars_repo_licenses": ["Apa...
# %% import os import subprocess import json import numpy as np import pdal from osgeo import gdal from osgeo_utils.auxiliary.util import GetOutputDriverFor import pandas as pd import geopandas as gpd import folium import dask.dataframe as dd from dask import delayed, compute from dask.diagnostics import ProgressBar ...
{"hexsha": "b6a0c39b36a9b42bb4c20478baf5e5374718bae5", "size": 2772, "ext": "py", "lang": "Python", "max_stars_repo_path": "metrics_raster.py", "max_stars_repo_name": "kulpojke/powerline", "max_stars_repo_head_hexsha": "d380d4a53039bb21b4cf0d3d3d1c81be179476aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright(c) 2018 Senscape Corporation. # License: Apache 2.0 import os os.chdir(os.path.dirname(os.path.realpath(__file__))) import sys sys.path.append('../SungemSDK-Python') import hsapi as hs # pylint: disable=E0401 import cv2 import numpy import time import RPi.GP...
{"hexsha": "841d5b9fbd2839df0ba6397d32d47a76c4f534ef", "size": 3794, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/rpi-car/main.py", "max_stars_repo_name": "HornedSungem/SungemAppZoo", "max_stars_repo_head_hexsha": "4f04d27e1c5e7bd36d73c3830985e9f3cdb1ebc2", "max_stars_repo_licenses": ["Apache-2.0"], "m...
"""Pd2dBackground class.""" import numpy import scipy import scipy.interpolate from typing import NoReturn, Union from cryspy.B_parent_classes.cl_1_item import ItemN def inversed_hessian_to_correlation(inv_hessian): """Calculate correlation matrix and sigmas for inversed hessian matrix.""" np_sigma_sq = numpy...
{"hexsha": "fc6b62042d2e0bd0e01b1aa97aa3b77d4a926c6c", "size": 8204, "ext": "py", "lang": "Python", "max_stars_repo_path": "cryspy/C_item_loop_classes/cl_1_inversed_hessian.py", "max_stars_repo_name": "ikibalin/rhochi", "max_stars_repo_head_hexsha": "1ca03f18dc72006322a101ed877cdbba33ed61e7", "max_stars_repo_licenses":...
""" test_callbacks ---------------- """ import numpy as np from numpy.testing import assert_allclose import pytest from elastica.wrappers import CallBacks from elastica.wrappers.callbacks import _CallBack class TestCallBacks: @pytest.fixture(scope="function") def load_callback(self, request): return ...
{"hexsha": "7cb05565f585d0f32e4b5a990f1e8523e3ef2052", "size": 6394, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_wrappers/test_callbacks.py", "max_stars_repo_name": "merozlab/PyElastica", "max_stars_repo_head_hexsha": "1d8c354a25846f63073809e3a809f27a150c3b9c", "max_stars_repo_licenses": ["MIT"], ...
from scipy import sparse as sps from sklearn.linear_model import ElasticNet from ..definitions import InteractionMatrix from .base import BaseSimilarityRecommender def slim_weight(X: InteractionMatrix, alpha: float, l1_ratio: float) -> sps.csr_matrix: model = ElasticNet( fit_intercept=False, posi...
{"hexsha": "f09003d8f8014adc6d596042539d7cf5ec84c700", "size": 1476, "ext": "py", "lang": "Python", "max_stars_repo_path": "irspack/recommenders/slim.py", "max_stars_repo_name": "wararaki/irspack", "max_stars_repo_head_hexsha": "650cc012924d46b3ecb87f1a6f806aee735a9559", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import torch from torch import nn import torch.nn.functional as F #with open('C:/Users/Admin/Chh/chembl_smiles.txt ', 'r') as f: with open('C:/Users/Admin/CharRNN/chembl_smiles.txt','r') as f: text = f.read() # Showing the first 100 characters text[:100] # encoding the text and map each charact...
{"hexsha": "c11c32de70ebe4df55c5c5874ceae8782a3432d6", "size": 2562, "ext": "py", "lang": "Python", "max_stars_repo_path": "charRNN/dataloader.py", "max_stars_repo_name": "Sunitach10/CHARRNN", "max_stars_repo_head_hexsha": "edb6fa53712b6f3e7ad6820eb1e1491167f61927", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
__name__ = "fastpdb" __author__ = "Patrick Kunzmann" __all__ = ["PDBFile"] __version__ = "1.0.1" import numpy as np import biotite import biotite.structure as struc import biotite.structure.io.pdb as pdb from .fastpdb import PDBFile as RustPDBFile class PDBFile(biotite.TextFile): r""" This class represents a...
{"hexsha": "2c32809e4969cb7f831d0181282c839576affea9", "size": 16199, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-src/fastpdb/__init__.py", "max_stars_repo_name": "padix-key/fastpdb", "max_stars_repo_head_hexsha": "016c0211743fcbf4366fdaf6fb5579ff073c6274", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import argparse from pathlib import Path from typing import List import numpy as np import pandas as pd def categorize_by_label_distribution(group: pd.DataFrame, label: str, dif_threshold: float = 0.1, top_...
{"hexsha": "ffe28a109d074834ea105180163b0662b5c8ed3d", "size": 7792, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/categorize_target_by_template_quality.py", "max_stars_repo_name": "yutake27/HMDM", "max_stars_repo_head_hexsha": "a16c6e77cae9509ccf49140171797680068709aa", "max_stars_repo_licenses": ["MIT"],...
import argparse import logging import matplotlib.pyplot as plt import numpy as np from sklearn.decomposition import PCA def find_k_nearest(source, vectors, k): norm1 = np.linalg.norm(source) norm2 = np.linalg.norm(vectors, axis=1) cosine_similarity = np.sum(source * vectors, axis=1) / norm1 / norm2 r...
{"hexsha": "41a42095da61ab98352acf2bbc7c40d687077910", "size": 3535, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_sl.py", "max_stars_repo_name": "seamusl/word_embedding", "max_stars_repo_head_hexsha": "1f1da2e135c7459e402b08fae52b51e59388353d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
"""Utility functions.""" import math import os import sys import warnings import weakref from pathlib import Path from time import perf_counter as clock import numpy as np from .flavor import array_of_flavor # The map between byteorders in NumPy and PyTables byteorders = { '>': 'big', '<': 'little', '='...
{"hexsha": "78df25af6dff26277253c73426d9c76096a9df84", "size": 13717, "ext": "py", "lang": "Python", "max_stars_repo_path": "tables/utils.py", "max_stars_repo_name": "xmatthias/PyTables", "max_stars_repo_head_hexsha": "da01cf8908c2d8c2b07e8a35685f0811807453f6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
''' Linear Layer in a deep learning network. three key things: - backprop - forward - drivative matrix of thetas(weights) ''' from typechecker import accept from numpy.matlib import rand, matrix from numpy import ndarray class LinearLayer(): @accept(LinearLayer, int, int) def __init__(self, nInputs, nOutputs...
{"hexsha": "0ccf75cca52766b4d09aada2b948da96f0aaddcf", "size": 2974, "ext": "py", "lang": "Python", "max_stars_repo_path": "proto/LinearLayer.py", "max_stars_repo_name": "cjackie/JensorFlow", "max_stars_repo_head_hexsha": "6b928ba2d0c64325cbdbf46ae4ced12821260843", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
module num_parthd contains function num_parthds() integer :: num_parthds ! use omp_lib !!$omp parallel ! num_parthds = omp_get_num_threads() num_parthds = 8 ! num_parthds = 6 ! num_parthds = 4 !!$omp end parallel return end function end module num_parthd
{"hexsha": "0ba731ff96e69f0864f7bd5d8303bda6067133d3", "size": 302, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "GMAO_stoch/num_parthd.f90", "max_stars_repo_name": "GEOS-ESM/GMAO_Shared", "max_stars_repo_head_hexsha": "022af23abbc7883891006b57379be96d9a50df23", "max_stars_repo_licenses": ["NASA-1.3", "ECL-2...
from . import utils from . import anchor_base from . import anchor_explanation import numpy as np import json import os import string import sys from io import open # Python3 hack try: UNICODE_EXISTS = bool(type(unicode)) except NameError: def unicode(s): return s def id_generator(size=15): """He...
{"hexsha": "0fa57a44ed1805bdb5b6fd8b0f14a4727b6bb2b2", "size": 6909, "ext": "py", "lang": "Python", "max_stars_repo_path": "anchor/anchor_text.py", "max_stars_repo_name": "JannisBush/anchor", "max_stars_repo_head_hexsha": "e4f758e99cb5eb1f14e51948e7b0d4c6efe48b6f", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
''' Created on Sep 30, 2013 modified on Mars 3, 2020 @author: J. Akeret, S. Birrer ''' from __future__ import print_function, division, absolute_import, unicode_literals from copy import copy from math import floor import math import multiprocessing import numpy class ParticleSwarmOptimizer(object): ''' Opt...
{"hexsha": "73bf074e876a14810acdb33e44e9635b36df42da", "size": 8848, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpipso/pso.py", "max_stars_repo_name": "ajshajib/mpipso", "max_stars_repo_head_hexsha": "4433f9c213795c39a6b1f43e6284d952dfcd5c1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
"""Core module for stacking related operations""" from sklearn.base import BaseEstimator, TransformerMixin, RegressorMixin, clone from sklearn.model_selection import KFold import numpy as np import pickle import os class StackingAveragedModels(BaseEstimator, RegressorMixin, TransformerMixin): def __init__(self, ...
{"hexsha": "1c1e5d36ae30841719a250ee0a96e0895fba7347", "size": 2849, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/stacking.py", "max_stars_repo_name": "matheushent/clfs-models", "max_stars_repo_head_hexsha": "e2f95064cc036289c203080e75718964873a5d8a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from collections import OrderedDict import unittest import numpy as np from mock import Mock from annotypes import Serializable from malcolm.core import BlockModel, StringMeta, Alarm, \ AlarmSeverity, AlarmStatus, TimeStamp, VMeta, TableMeta, StringArrayMeta, \ NumberMeta, NumberArrayMeta, MethodModel, Choice...
{"hexsha": "5d3e361ac660a5c9175721fc4a8b66d5c81a6b64", "size": 23743, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_core/test_models.py", "max_stars_repo_name": "dinojugosloven/pymalcolm", "max_stars_repo_head_hexsha": "0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a", "max_stars_repo_licenses": ["Apache-2...
% RGBTOGRAY.m % ------------------------------------------------------------------- % % Date: 27/04/2013 % Last modified: 27/04/2013 % ------------------------------------------------------------------- function gray = RGBTOGRAY(img) if size(img, 3) ~= 3, error('The input should be RGB'); end ...
{"author": "thfylsty", "repo": "Classic-and-state-of-the-art-image-fusion-methods", "sha": "5d9457df396f1ea6921e1b9b3703995205940862", "save_path": "github-repos/MATLAB/thfylsty-Classic-and-state-of-the-art-image-fusion-methods", "path": "github-repos/MATLAB/thfylsty-Classic-and-state-of-the-art-image-fusion-methods/Cl...
import tensorflow as tf import numpy as np import os import sys import urllib import tarfile from utils.generic_utils import split_apply_concat tfgan = tf.contrib.gan MODEL_DIR = './inception/' INCEPTION_GRAPH_NAME = 'inceptionv1_for_inception_score.pb' INCEPTION_INPUT = 'Mul:0' INCEPTION_OUTPUT = 'logits:0' INCEPTIO...
{"hexsha": "801538d56c4a48129e113578d457a35b3234e3b5", "size": 7440, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/inception.py", "max_stars_repo_name": "kshmelkov/gan_evaluation", "max_stars_repo_head_hexsha": "8583837a8fa796ae8ec4bb503a159a9e0a40cbf7", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
from SimpleCV import Image, ImageSet, Camera, VirtualCamera, ROI, Color, LineScan import numpy as np import scipy.signal as sps import warnings import time as time class TemporalColorTracker: """ **SUMMARY** The temporal color tracker attempts to find and periodic color signal in an roi or arbitrary fu...
{"hexsha": "4f5f5326a630dc74e94100fc23070a4c257110a8", "size": 15935, "ext": "py", "lang": "Python", "max_stars_repo_path": "SimpleCV/MachineLearning/TemporalColorTracker.py", "max_stars_repo_name": "M93Pragya/SimpleCV", "max_stars_repo_head_hexsha": "6c4d61b6d1d9d856b471910107cad0838954d2b2", "max_stars_repo_licenses"...
#!/usr/bin/env python from __future__ import division import rospy import tf import scipy.linalg as la import numpy as np from math import * import mavros_msgs.srv from mavros_msgs.msg import AttitudeTarget from nav_msgs.msg import Odometry from std_msgs.msg import * from geometry_msgs.msg import * from mavros_msgs.msg...
{"hexsha": "f44f574c6ab130bf97c7cbd3a5d6950d5dc79bfa", "size": 19404, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadcopter/script/single_UAV.py", "max_stars_repo_name": "Bibbidi-Babbidi-Boo/SDRE-based-Cooperative-UAV-Landing-on-High-speed-targets", "max_stars_repo_head_hexsha": "515fb38120990cb707521da1a58...
import pandas as pd import numpy as np #***********************From dict of Series or dicts******************** #dictionary takes key:value dict = {"Name":pd.Series(["Nahid", "Rafi", "Meem"]), "Age":pd.Series([21,22,21]), "Weight":pd.Series([48,75,76]), "Height":pd.Series([5.3, 5.8, 5.6])} df =...
{"hexsha": "70f34f045d8586ab11d1b82d5117d99c5cbf5089", "size": 5131, "ext": "py", "lang": "Python", "max_stars_repo_path": "python3/pandas/Pandas_DataFrameDS.py", "max_stars_repo_name": "Nahid-Hassan/code-snippets", "max_stars_repo_head_hexsha": "24bd4b81564887822a0801a696001fcbeb6a7a75", "max_stars_repo_licenses": ["M...
# -*- coding: utf-8 -*- """ Created on Thu Apr 19 14:59:39 2018 @author: yiyuezhuo """ # The data is from Battle of Gettysburg, HPS import numpy as np Confederate = np.array( [[24, 48], [29, 10], [33, 1], [35, 28], [36, 37], [50, 42], [60, 39], [72, 45]]) Un...
{"hexsha": "6b1cdbb70a3c464bec64d3969b596d0d66d258f8", "size": 1468, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayestorch/data/gettysburg.py", "max_stars_repo_name": "yiyuezhuo/bayes-torch", "max_stars_repo_head_hexsha": "eba1e7bbff7e4c15560b3dc7e83bb6c5784c1bee", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import matplotlib.pyplot as plt def partition(arr, start, end): i = start - 1 pivot = arr[end] for j in range(start, end): if arr[j] <= pivot: i += 1 arr[i], arr[j] = arr[j], arr[i] arr[i + 1], arr[end] = arr[end], arr[i + 1] return i + 1 def ...
{"hexsha": "315cdbbea44c4956115c49ff018010f51d4bb30b", "size": 792, "ext": "py", "lang": "Python", "max_stars_repo_path": "Sorting/algos/quick.py", "max_stars_repo_name": "CandleStein/VAlg", "max_stars_repo_head_hexsha": "43aecdd351954d316f132793cf069b70bf2e5cc2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
@testset "Test freecf $mat, $obj" for mat in ["her", "rec"], obj in ["kurt", "ent"] # test for the hermitian matrices if mat == "her" for idx = 1: 5 # set up N = 300 G1, G2 = randn(N, N), randn(N, 2N); X1, X2 = (G1 + G1') / sqrt(2*N), (G2 * G2') / (2*N) ...
{"hexsha": "4e52b686aa2208954aecfbde9567471046fcdc5b", "size": 2815, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/fcf.jl", "max_stars_repo_name": "UnofficialJuliaMirror/FCA.jl-9ac0d1d1-ab1e-5a44-888c-d389b307372d", "max_stars_repo_head_hexsha": "47ed4f7e1ac9b764b2753bef0138f8961b6559ee", "max_stars_repo_l...
[STATEMENT] theorem no_type_error: fixes \<sigma> :: jvm_state assumes welltyped: "wf_jvm_prog\<^bsub>\<Phi>\<^esub> P" and conforms: "P,\<Phi> \<turnstile> \<sigma> \<surd>" shows "exec_d P \<sigma> \<noteq> TypeError" [PROOF STATE] proof (prove) goal (1 subgoal): 1. exec_d P \<sigma> \<noteq> TypeError [PROOF ...
{"llama_tokens": 144416, "file": "JinjaDCI_BV_BVNoTypeError", "length": 202}
[STATEMENT] lemma ws_update_foreach_refine[refine]: assumes FIN: "finite (E``{u})" assumes WSS: "dom ws \<subseteq> V" assumes ID: "(E',E)\<in>Id" "(u',u)\<in>Id" "(p',p)\<in>Id" "(V',V)\<in>Id" "(ws',ws)\<in>Id" shows "ws_update_foreach E' u' p' V' ws' \<le> \<Down>Id (ws_update E u p V ws)" [PROOF STA...
{"llama_tokens": 3772, "file": "Gabow_SCC_Find_Path_Impl", "length": 6}
// (C) Copyright Mac Murrett 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. #ifndef BOOST_REMOTE_CALLS_MJM012...
{"hexsha": "8619f2aa7d70e346103877b157a9381d3c67470e", "size": 6891, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Framewave/sdk/boost_1_34_0/libs/thread/src/mac/remote_calls.hpp", "max_stars_repo_name": "dbremner/framewave", "max_stars_repo_head_hexsha": "94babe445689538e6c3b44b1575cca27893b9bb4", "max_stars_re...
[STATEMENT] lemma leadsETo_cancel1: "[| F \<in> A leadsTo[CC] (B Un A'); F \<in> B leadsTo[CC] B' |] ==> F \<in> A leadsTo[CC] (B' Un A')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>F \<in> A leadsTo[CC] (B \<union> A'); F \<in> B leadsTo[CC] B'\<rbrakk> \<Longrightarrow> F \<in> A leadsTo[CC...
{"llama_tokens": 309, "file": null, "length": 3}
import random import cv2 import numpy as np from fly_class import Fly class SmartFlies: def __init__(self, n_flies=50, n_obstacles=1, n_generations=10, mate_rate=0.25, mutate_rate=0.05, lifespan=500, course_dims=(400, 600)): self.target = (np.random.randint(5, course_dims[0] - 5), ...
{"hexsha": "5df47521902ad7da1fd29bf270e6fdbaf76cbe26", "size": 4422, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_smart_flies/smart_fly_class.py", "max_stars_repo_name": "AdamSpannbauer/misc_code_fun", "max_stars_repo_head_hexsha": "782b6aa1c6c3b5e881a4745564ca1faeca53d5fd", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 25 07:35:47 2017 @author: davidpvilaca """ import matplotlib.pyplot as plt import numpy as np import cv2 def intersection(L1, L2): D = L1[0] * L2[1] - L1[1] * L2[0] Dx = L1[2] * L2[1] - L1[1] * L2[2] Dy = L1[0] * L2[2] - L1[2] * L2[0] ...
{"hexsha": "908cad4ab3be5ef30aaa324eede5c8f8a78c46fd", "size": 4720, "ext": "py", "lang": "Python", "max_stars_repo_path": "aula5/bordas.py", "max_stars_repo_name": "davidpvilaca/TEP", "max_stars_repo_head_hexsha": "decbf61a96863d76e1b84dc097aa37b12038aa75", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
# Python _for fun and profit_ ###### Juan Luis Cano Rodríguez ###### Madrid, 2016-05-13 @ ETS Asset Management Factory ## Outline * Introduction * Python for Data Science * Python for IT * General advice * Conclusions ## Outline * Introduction * Python for Data Science * Interactive computation with Jupyter ...
{"hexsha": "be60b18c903c897f42af4824fe7e88ed52053399", "size": 769437, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Python for fun and profit.ipynb", "max_stars_repo_name": "Juanlu001/python-fun-and-profit", "max_stars_repo_head_hexsha": "ac9be81e9a151024be7d3123901f031665d9e766", "max_stars_repo...
""" Make figure 6, which includes 1. A plot of the centerpoints of all states 2. A plot of the top three latent state maps 3. A plot of the true and reconstructed locations """ import os import cPickle import gzip from collections import namedtuple import numpy as np from scipy.io import loadmat import matplotlib im...
{"hexsha": "2e1f5821a53faad0836928e0b1392654fc4818db", "size": 7402, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/make_figure5.py", "max_stars_repo_name": "slinderman/pyhsmm-spiketrains", "max_stars_repo_head_hexsha": "462d8d2c59bd2e7c39d20d624bd8b289a31baaa2", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma except_keys_Int [simp]: "except p (keys p \<inter> U) = except p U" [PROOF STATE] proof (prove) goal (1 subgoal): 1. except p (keys p \<inter> U) = except p U [PROOF STEP] by (rule poly_mapping_eqI) (simp add: in_keys_iff lookup_except)
{"llama_tokens": 100, "file": "Polynomials_Power_Products", "length": 1}
CHAPTER 2 Data Structure Access The following functions allow one to create and manipu- late the various types of lisp data structures. Refer to 1.2 for details of the data structures known to FRANZ LISP. 2.1. Lists The following func...
{"hexsha": "a005b85a18e939c9ea8543225884af3538b69e30", "size": 62791, "ext": "r", "lang": "R", "max_stars_repo_path": "lisplib/manual/ch2.r", "max_stars_repo_name": "omasanori/franz-lisp", "max_stars_repo_head_hexsha": "64e037d26cd382c0b88e0a5dc261bd2c29191af8", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_star...
#!/usr/bin/env python import pydot import networkx as nx import libsystemflowgraph as sys_fg import copy def build_dot_graph(flow_graph, cluster_system=False): dot_graph = pydot.Dot(graph_type='digraph') dot_subgraph = pydot.Cluster(graph_name='system_server') node_dic = {} for node in flow_graph.nodes(): node_...
{"hexsha": "af2200c6d83612d8989ecc4224454d0e1894a29c", "size": 1651, "ext": "py", "lang": "Python", "max_stars_repo_path": "grodddroid/AnalyseAndroBlareTools/logparser/graphtodot.py", "max_stars_repo_name": "demirdagemir/thesis", "max_stars_repo_head_hexsha": "4a48bddf815c91729e27484548bb7bbf7ddeda64", "max_stars_repo_...