text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
/** * @copyright Copyright 2018 The J-PET Framework 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 find a copy of the License in the LICENCE file. * * Unless required by applicable la...
{"hexsha": "e6fa8f62642c8aa877b67caf1692073b7558e2f9", "size": 4227, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/MC/JPetMCHit/JPetMCHitTest.cpp", "max_stars_repo_name": "BlurredChoise/j-pet-framework", "max_stars_repo_head_hexsha": "f6728e027fae2b6ac0bdf274141254689894aa08", "max_stars_repo_licenses": ["...
import numpy as np import logging logger = logging.getLogger('Solve it like a human') class SolveItLikeAHuman: """ The idea behind this algorithm is to emulate how would a human being solve a sudoku """ def __is_number_valid_in_grid(self, number, grid, row_position, column_position): grid_ro...
{"hexsha": "14ebbd3e7615f2a51b9b5ebe86adf05e1010b2e8", "size": 3061, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/base_solver/solve_it_like_a_human.py", "max_stars_repo_name": "Mai13/sudoku", "max_stars_repo_head_hexsha": "1e9c1da612a78476ef60dad0f9943c8760e631ed", "max_stars_repo_licenses": ["CC0-1.0"], ...
using Test using FlightMechanicsSimulator using FlightMechanicsUtils # Stevens, B. L., Lewis, F. L., & Johnson, E. N. (2015). Aircraft control # and simulation: dynamics, controls design, and autonomous systems. John Wiley # & Sons. (page 193 table 3.6-2) trim_test_data = [ # TAS thtl AOA DE thtl_...
{"hexsha": "1169eee0c3ee874d8318c7eec929466f971aa300", "size": 8616, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/f16/trimmer.jl", "max_stars_repo_name": "jonniedie/FlightMechanicsSimulator.jl", "max_stars_repo_head_hexsha": "2097237a5ffb814fcaf81830c5dd419c322a5389", "max_stars_repo_licenses": ["MIT"], "...
""" Module for image processing core methods .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ from IPython import embed import numpy as np from scipy import signal, ndimage from scipy.optimize import curve_fit from pypeit import msgs from pypeit import util...
{"hexsha": "386436341792000b5b9e87d515d858711f91f334", "size": 49017, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypeit/core/procimg.py", "max_stars_repo_name": "brackham/PypeIt", "max_stars_repo_head_hexsha": "8769f06ae8e8f18d3a55d12b01dd3dde50b98040", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
import numpy as np def measure_correlation(snapshots, correlation_threshold): correlated_inputs = get_list_of_correlated_inputs( snapshots, correlation_threshold) if len(correlated_inputs) > 0: print(("Caution!\nCorrelation between input data can affect the " + "reliability of th...
{"hexsha": "414877ad1c4d3dfc00a21e9e7bb74a4deb3ff7c4", "size": 1439, "ext": "py", "lang": "Python", "max_stars_repo_path": "NucleationModel/correlation_measure.py", "max_stars_repo_name": "MFrassek/CommittorEAE", "max_stars_repo_head_hexsha": "88a467e4500bc9ab69834209f4eaec9f2d0d7a61", "max_stars_repo_licenses": ["MIT"...
%Protein processing II process test case % % Author: Jared Jacobs, jmjacobs@stanford.edu % Author: Jonathan Karr, jkarr@stanford.edu % Affilitation: Covert Lab, Department of Bioengineering, Stanford University % Last updated: 8/9/2010 classdef ProteinProcessingII_Test < edu.stanford.covert.cell.sim.ProcessTestCase ...
{"author": "CovertLab", "repo": "WholeCell", "sha": "6cdee6b355aa0f5ff2953b1ab356eea049108e07", "save_path": "github-repos/MATLAB/CovertLab-WholeCell", "path": "github-repos/MATLAB/CovertLab-WholeCell/WholeCell-6cdee6b355aa0f5ff2953b1ab356eea049108e07/src_test/+edu/+stanford/+covert/+cell/+sim/+process/ProteinProcessin...
[STATEMENT] lemma linorder_rank_set_sorted_wrt: assumes "linorder_on B R" "set xs \<subseteq> B" "sorted_wrt R xs" "x \<in> set xs" "distinct xs" shows "linorder_rank R (set xs) x = index xs x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. linorder_rank R (set xs) x = index xs x [PROOF STEP] proof - [PROOF ST...
{"llama_tokens": 3662, "file": "Comparison_Sort_Lower_Bound_Linorder_Relations", "length": 38}
/* integration/qk.c * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Brian Gough * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) a...
{"hexsha": "4b62a17365495ca9a189a3863dd0ad1fefc79d74", "size": 3172, "ext": "c", "lang": "C", "max_stars_repo_path": "code/em/treba/gsl-1.0/integration/qk.c", "max_stars_repo_name": "ICML14MoMCompare/spectral-learn", "max_stars_repo_head_hexsha": "91e70bc88726ee680ec6e8cbc609977db3fdcff9", "max_stars_repo_licenses": ["...
""" 2021 Simon Bing, ETHZ, MPI IS """ import numpy as np from absl import flags class BaseProcessor(object): def __init__(self): self.name = None def transform(self, x): raise NotImplementedError
{"hexsha": "630b8bdc1ca9842989623aa8a26806eb73524765", "size": 221, "ext": "py", "lang": "Python", "max_stars_repo_path": "healthgen/data_access/preprocessing/base_processor.py", "max_stars_repo_name": "simonbing/HealthGen", "max_stars_repo_head_hexsha": "d5886a5a41dc36c6a70dece3dba3c60a90bf1fdd", "max_stars_repo_licen...
/** * Copyright (c) 2017 Melown Technologies SE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the f...
{"hexsha": "fdf9805304abc1419a308eb51dc34ea5ecd20eb5", "size": 33211, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "mapproxy/src/generatevrtwo/generatevrtwo.cpp", "max_stars_repo_name": "melowntech/vts-mapproxy", "max_stars_repo_head_hexsha": "241ba43c1f7dcc226ec0f2089d47e11c699c2587", "max_stars_repo_licenses":...
// kv_dictionary_test_harness.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 distribut...
{"hexsha": "b94383cda60b97134dce5190f9f7e23e0971907e", "size": 15925, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mongo/db/storage/kv/dictionary/kv_dictionary_test_harness.cpp", "max_stars_repo_name": "leifwalsh/mongo", "max_stars_repo_head_hexsha": "4cf51324255f76a110246f6d1646dc8cda570141", "max_stars_re...
"""Functions for specific to timelapse datasets.""" import numpy as np from skimage.util import img_as_ubyte from skimage.exposure import rescale_intensity from .tissue import epithelium_watershed, largest_object_mask, segment_hemijunctions from ..utils import validate_mask def segment_epithelium_timelapse( ims_...
{"hexsha": "67ead659c27864df64a853a12b2ad9272b98f00d", "size": 3701, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/functions/segment/timelapse.py", "max_stars_repo_name": "a9w/Fat2_polarizes_WAVE", "max_stars_repo_head_hexsha": "be39ba21245a9b532a70954a38139976a2355a7d", "max_stars_repo_licenses": ["MIT"]...
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
{"hexsha": "960a45c3b295eee79eae1ec7ab5bfcc60af20dfa", "size": 6959, "ext": "py", "lang": "Python", "max_stars_repo_path": "beta/tests/tensorflow/sparsity/magnitude/test_algorithm.py", "max_stars_repo_name": "xiao1228/nncf", "max_stars_repo_head_hexsha": "307262119ee3f50eec2fa4022b2ef96693fd8448", "max_stars_repo_licen...
from numpy import array, full, sqrt, sin, abs from benchmarks.benchmark import Benchmark class Schwefel(Benchmark): """dim: n""" def __init__(self, lower=-500, upper=500, dimension=2): super(Schwefel, self).__init__(lower, upper, dimension) def get_optimum(self): return array([full(self.d...
{"hexsha": "155a2877445ffda9d227bd667a746820a27bc86b", "size": 537, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/schwefel.py", "max_stars_repo_name": "buctlab/NIO", "max_stars_repo_head_hexsha": "094e688dd1cd3def7f31cd16ff927d4324651422", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
using Decomp using Base.Test a = zeros(3,3) for i=1:100 a[1,1] = rand(-2.:10e-8:2.) a[2,2] = rand(-2.:10e-8:2.) a[3,3] = rand(-2.:10e-8:2.) a[1,2] = rand(-2.:10e-8:2.) a[1,3] = rand(-2.:10e-8:2.) a[2,3] = rand(-2.:10e-8:2.) a[2,1] = a[1,2] a[3,1] = a[1,3] a[3,2] = a[2,3] eigv,eigvec1,eigvec2,eigvec...
{"hexsha": "d957f38cb89cf46918a69e09b190e5d7770adf68", "size": 507, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "favba/Decomp.jl", "max_stars_repo_head_hexsha": "edc0df4cb2964334a5c02fcb2af60bc027b09c67", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
#!/usr/bin/python ''' Program: This is a program for doing photometry on observation data table. Usage: photometry.py [option file] The input table should follow the form in TAT_env.obs_data_titles Editor: Jacob975 20181029 ################################# update log 20181029 version alpha 1: ...
{"hexsha": "e7d18330ac1afb829c3e44bcf6d0a45e6b0b802a", "size": 11181, "ext": "py", "lang": "Python", "max_stars_repo_path": "photometry.py", "max_stars_repo_name": "jacob975/TATIRP", "max_stars_repo_head_hexsha": "2d81fa280e039aa931c6f8456632a23ef123282a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import numpy as np import codecs import os def init(root_training, root_emb): global emb_dir, train_dir emb_dir = root_emb train_dir = root_training def get_embeddings(what='expression'): uri_file = '%s/%s.emb.u' % (emb_dir, what) vector_file = '%s/%s.emb.v' % (emb_dir, what) header_file = '...
{"hexsha": "a49fa3cb1476c524a2f4948b255d465496237649", "size": 2168, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/doremus_data.py", "max_stars_repo_name": "DOREMUS-ANR/recommender", "max_stars_repo_head_hexsha": "027e0dcb3639f03204c67777e2e10aac8505a70a", "max_stars_repo_licenses": ["MIT"], "max_star...
module rsdft_allgather_module implicit none private public :: d_rsdft_allgatherv_div integer :: nblock_default=4 integer :: n_opt, n_opt_h contains subroutine d_rsdft_allgatherv_div( n, a, ir, id, comm, nblk_in ) implicit none integer,intent(in) :: n real(8),intent(inout) :: a(n) intege...
{"hexsha": "4a202b833421672dbeda9f95e9ef12f8170f0c31", "size": 4620, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/rsdft_allgather_module.f90", "max_stars_repo_name": "j-iwata/RSDFT_DEVELOP", "max_stars_repo_head_hexsha": "14e79a4d78a19e5e5c6fd7b3d2f2f0986f2ff6df", "max_stars_repo_licenses": ["Apache-2.0...
# ADG with two real variables and Covariance inequality **author:Alessio Benavoli** <a href="http://www.alessiobenavoli.com"> alessiobenavoli.com </a> We will learn how to build a PyRational **ADG (Almost Desirable Gambles)** belief model on the outcome of an experiment whose space of possibility is $\mathbb{R}^2$. ...
{"hexsha": "95f13e53350607ac6333ea540a3c5138a6ea6bdb", "size": 15607, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/Two_Real_Variables_and_Covariance_Inequality.ipynb", "max_stars_repo_name": "PyRational/PyRational", "max_stars_repo_head_hexsha": "dad982bbd7a0b1f9a27f87e0c1d069a922384450...
module SE using DataFrames using Random using XLSX using StructArrays using StatsBase using CSV using Main.JOH using JuMP using JSON """ create a variety of SSIT methods. Accept a parameter to multiply each time limit by. """ function make_SSIT_methods(m=60; n_threads=6) [ JOH.Matheur.SSIT.make_SSIT_metho...
{"hexsha": "f500b1f0d074bc805bed95247b1346a5a8578237", "size": 6304, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "experiments/SSIT.jl", "max_stars_repo_name": "Dibillilia/JuliaOptHeuristics", "max_stars_repo_head_hexsha": "e7acc803d8037969b98534cccba87b99028a0f5b", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import itertools sys.path.append('/home/shunan/Code/CNN_Doc2Vec/imdb') sys.path.append('/home/shunan/Code/CNN_Doc2Vec/Amazon_Doc2Vec') import imdb_experiments import amazon_experiments import os import cPickle import subprocess import numpy as np from training import train from training import tools from sci...
{"hexsha": "cc33fd32bb8b4230f2d820a057aa9dfc30297dbd", "size": 9972, "ext": "py", "lang": "Python", "max_stars_repo_path": "skip_thought_grid_search.py", "max_stars_repo_name": "zashuna/skip-thoughts", "max_stars_repo_head_hexsha": "dec2c97f47d2ad139f5ae8602faca40c81ac096b", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] lemma new\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t_get\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t [simp]: assumes "new\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t h = (new_element_ptr, h')" shows "get\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o...
{"llama_tokens": 389, "file": "Shadow_DOM_classes_ShadowRootClass", "length": 2}
import numpy as np def scale_convert(self,list_to_convert): """Takes a list of values and scales using NumPy log10() and rounds two decimal places. Arguments: list_to_convert {list} -- List of values int or float Returns: list -- List of float values two decimal pl...
{"hexsha": "033bf7829f7b8326672ab91dd96765723e7d96a2", "size": 1229, "ext": "py", "lang": "Python", "max_stars_repo_path": "HelperFunctions.py", "max_stars_repo_name": "brianRingler/EDA-Tools-", "max_stars_repo_head_hexsha": "1870e786f1cd009f03a51243177e5b22a98bb921", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import datetime import datetime from osgeo import gdal, gdalnumeric, ogr, osr from datetime import timedelta import numpy as np from PIL import ImageDraw def convert_time(time_since_1900): d = datetime.datetime(1900, 1, 1) return (str(d+timedelta(hours=time_since_1900))) def convert_time_reverse(...
{"hexsha": "8298fda8a840d8a0dc91798780555a634a79ee52", "size": 12382, "ext": "py", "lang": "Python", "max_stars_repo_path": "auxiliary_classes.py", "max_stars_repo_name": "JiriVales/agroclimatic-factors", "max_stars_repo_head_hexsha": "36e2924a0a19f16f6be151d457df9c465bb39a44", "max_stars_repo_licenses": ["BSD-3-Clause...
/* * BSD 2-Clause License * * Copyright (c) 2021, Christoph Neuhauser * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright ...
{"hexsha": "ec5ebbca02ad9130f2affe292b2a8813aa946ea6", "size": 20928, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Graphics/Vulkan/Shader/ShaderManager.cpp", "max_stars_repo_name": "chrismile/sgl", "max_stars_repo_head_hexsha": "03748cadbd1661285081c47775213091b665cb86", "max_stars_repo_licenses": ["MIT", "...
from torch.utils.tensorboard import SummaryWriter from PIL import Image import numpy as np """ TensorBoard主要用来对训练过程中的参数等数据做可视化,比如你可以看到训练过程中loss、梯度等数据的变化。 1、使用之前先安装TensorBoard包: conda install TensorBoard 2、编写代码,展示需要可视化的数据: 3、使用命令启动TensorBoard页面; tensorboard --logdir=Pytorch/2-Tensor...
{"hexsha": "f46286efb17ec3a2b0373c7d119958b96a04711a", "size": 801, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pytorch/2-TensorBoard/2_add_img_tensorboard.py", "max_stars_repo_name": "pengchenyu111/PaperCodeReplication", "max_stars_repo_head_hexsha": "7b8681654e25b7d707f4b4d7ebcfb85ffc0fd52a", "max_stars_re...
import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg # implement the default mpl key bindings from matplotlib.backend_bases import key_press_handler from matplotlib.figure import Figure from tkinter ...
{"hexsha": "ef646fe33eb9c250b8e4cf8290858ed2555b0733", "size": 19843, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Caroline/client_side/GUI.py", "max_stars_repo_name": "smalbadger/TradeBot", "max_stars_repo_head_hexsha": "a6d4b443a6584af3e91b2d9bf0162db2b4c362e5", "max_stars_repo_licenses": ["Apache-2.0"]...
module tcai2 use adj_mod use tcai1 implicit none integer private nx contains subroutine tcai2_init aa nx_in integer nx_in real dimension pointer aa nx nx_in call tcai1_init aa end subroutine function tcai2_lop adj add x r result stat integer stat logical intent in adj add real dimension x r call adjnull adj add x r cal...
{"hexsha": "634b37141065faff3332bcdb267ce17e5c84ef00", "size": 569, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "pa1-skeleton/pa1-data/5/sepwww.stanford.edu_sep_prof_geelib_tcai2.f90", "max_stars_repo_name": "yzhong94/cs276-spring-2019", "max_stars_repo_head_hexsha": "a4780a9f88b8c535146040fe11bb513c91c5693...
from functools import cache from typing import Optional, Union import numpy as np import torch from mtutils.mtutils import BatchedLinear, BatchedSequential, broadcast_xwb from torch.nn import Module, MSELoss, Tanh from torch.nn.parameter import Parameter from torch.nn.utils.clip_grad import clip_grad_norm_ from torch....
{"hexsha": "2080d2991ac45128808d5e002c8f6b894ed3c4fc", "size": 5997, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mtmlp/mtmlp.py", "max_stars_repo_name": "michaelvolpp/mtbnn_pyro", "max_stars_repo_head_hexsha": "225360d62cdebeb800833ae8fba1364e4a8601c5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# SVR(Support Vector Regression) # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Position_Salaries.csv') X = dataset.iloc[:, 1:2].values y = dataset.iloc[:, 2].values # The StandardScaler class expects the input in a cert...
{"hexsha": "f4b3af1ca491a65c8ee0b8747ec1db97caa5abce", "size": 5061, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/Python/Machine_Learning_Project/Regression/svr.py", "max_stars_repo_name": "kshivam654/hacktoberfest2020", "max_stars_repo_head_hexsha": "41632803eff3f6cf5a1684fe5ab98f17e59cb765", "max_s...
import numpy as np def sigmoid(x): return 1/(1+np.exp(-x)) def relu(x): return np.maximum(0, x) def relu_deriv(x): return np.where(x < 0, 0, 1) x = np.array([[0,0,1], [0,1,1], [1,0,1], [1,1,1]]) y = np.array([[0], [1], [1], ...
{"hexsha": "b66042bfbfe66cd23153d76f7f9349e93da8a72d", "size": 745, "ext": "py", "lang": "Python", "max_stars_repo_path": "2nn3.py", "max_stars_repo_name": "kimtg/neural-network-test", "max_stars_repo_head_hexsha": "4072347d785e4e9b6624c45f8341181c18c9f5d3", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": ...
############################################################################## ## ## Gensys solver adapted from phactsolver.m ## ############################################################################## function gensys(Γ0, Γ1, c, Ψ, Π; clean = true, continuous = true, check_existence = true, check_uniqueness = tr...
{"hexsha": "570b102b509527ffdc8f010519b59550aa0f6dab", "size": 2107, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/aiyagari/gensys.jl", "max_stars_repo_name": "sglyon/HJBFiniteDifference.jl", "max_stars_repo_head_hexsha": "f678d57731bcadee0e770493418b86a55fac9197", "max_stars_repo_licenses": ["MIT"], "max_s...
\documentclass[10pt, a4paper, twoside]{basestyle} \usepackage[backend=biber,firstinits=true,maxnames=100,style=alphabetic,maxalphanames=4,doi=true,isbn=false,url=false,eprint=true]{biblatex} \bibliography{bibliography} \usepackage{tikz} \usetikzlibrary{cd} \usepackage[Mathematics]{semtex} \usepackage{chngcntr} \count...
{"hexsha": "e62c1cc761233ddb8d89eb0e3a2d7da49f14fe3b", "size": 31024, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documentation/Celledoni.tex", "max_stars_repo_name": "erplsf/Principia", "max_stars_repo_head_hexsha": "1f2a1fc53f8a73c1bc67f12213169e6969c8488f", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} -- | -- Module : Statistics.Distribution.Poisson -- Copyright : (c) 2009, 2011 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- The Poisson di...
{"hexsha": "e07a7b45982bfe5588af271e71068d6fd7feae18", "size": 3223, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "Statistics/Distribution/Poisson.hs", "max_stars_repo_name": "vmchale/statistics", "max_stars_repo_head_hexsha": "7f19ba0569ff34891c3ec18293a23ffb7eac8edf", "max_stars_repo_licenses": ["BSD-2-Clau...
import unittest import pandas as pd import numpy as np from src.models.QuantumSLIM.Aggregators.AggregatorFirst import AggregatorFirst from src.models.QuantumSLIM.Aggregators.AggregatorUnion import AggregatorUnion class MyTestCase(unittest.TestCase): def setUp(self) -> None: data1 = [[0, 1, 0, -20, 1],...
{"hexsha": "df42c1b7f4f77719453b94307a32a326395dc184", "size": 1745, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/models/QuantumSLIM/aggregators_test.py", "max_stars_repo_name": "tangtang95/qslim-recommender", "max_stars_repo_head_hexsha": "31b3825a171f3010890491f1b9675072a37252aa", "max_stars_repo_licen...
# -*- coding: utf-8 -*- import itertools from copy import deepcopy import networkx as nx from networkx import MultiGraph from bg.edge import BGEdge, BGEdge_JSON_SCHEMA_JSON_KEY from bg.genome import BGGenome, BGGenome_JSON_SCHEMA_JSON_KEY from bg.kbreak import KBreak from bg.multicolor import Multicolor from bg.utils...
{"hexsha": "846bcd8a094780bc3ab9d22a4268afca9f21f2a2", "size": 78102, "ext": "py", "lang": "Python", "max_stars_repo_path": "bg/breakpoint_graph.py", "max_stars_repo_name": "sergey-aganezov-jr/bg", "max_stars_repo_head_hexsha": "1ec758193441e49e7b34e0da09571480f4c24455", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import matplotlib.pyplot as plt import pandas as pd from utils import zscore_normalize import boss_utils np.random.seed(0) def encode_dna(s): if s=='A': return 0 if s=='C': return 1 if s=='G': return 2 if s=='T': return 3 def encode_data(S): # S is an N-list of L-stri...
{"hexsha": "195d146eb13e02046c17a38961e43e357948bc83", "size": 3133, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Old/boss_8mer.py", "max_stars_repo_name": "always-newbie161/pyprobml", "max_stars_repo_head_hexsha": "eb70c84f9618d68235ef9ba7da147c009b2e4a80", "max_stars_repo_licenses": ["MIT"], "max_st...
from scipy import stats def test_scaling_exponent_estimation(desired_alpha, result, size=0.01): """ Test whether the desired alpha lies within some specified confidence interval of the estimated scaling exponent. """ critical_value = stats.norm.ppf(size / 2) # this is negative! alpha_hat, al...
{"hexsha": "f0819af56302cfb55289c9415960e23c451fcea9", "size": 528, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyreto/tests/utilities.py", "max_stars_repo_name": "davidrpugh/Pyreto", "max_stars_repo_head_hexsha": "7a9ca92ea1204c89f0dbffb08d3f08b344a8d7dd", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) Facebook, Inc. and its affiliates. import os, sys, shutil import os.path as osp import cv2 from collections import OrderedDict import mocap_utils.general_utils as gnu import numpy as np import json import subprocess as sp def setup_render_out(out_dir): if out_dir is not None: gnu.build_di...
{"hexsha": "96a032bb87aae09809eff0dc3ea5659fbb19a5ff", "size": 11781, "ext": "py", "lang": "Python", "max_stars_repo_path": "mocap_utils/demo_utils.py", "max_stars_repo_name": "Zhora1337/umnik", "max_stars_repo_head_hexsha": "12a0b18d542c46625bd627d7b6a14958eb16c503", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np import time #import rtlsdr import kid_readout.equipment.rtlkid import kid_readout.equipment.agilent_33220 import kid_readout.equipment.lockin_controller lockin = kid_readout.equipment.lockin_controller.lockinController() print lockin.get_idn() fg = kid_readout.equipment.agilent_33220.FunctionGene...
{"hexsha": "09cb7f5b07469b83b275c4ed98d1c0f5dbf1591d", "size": 3140, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/data_taking_scripts/old_scripts/rtl_time_constant_with_pin_atten.py", "max_stars_repo_name": "danielflanigan/kid_readout", "max_stars_repo_head_hexsha": "07202090d468669200cab78297122880c1c03...
from typing import List, Dict, Iterable import hypothesis import numpy as np from gl0learn import fit from hypothesis.strategies import composite def is_mosek_installed() -> bool: try: import mosek except ModuleNotFoundError: return False else: return True def is_scipy_installed...
{"hexsha": "47f6b97a1513efa263edb6ecf87fcc80f755abfd", "size": 3845, "ext": "py", "lang": "Python", "max_stars_repo_path": "pypkg/tests/helper/utils.py", "max_stars_repo_name": "TNonet/gL0Learn", "max_stars_repo_head_hexsha": "cfa94ffd83b294faf94c8c7820f195d6b93c620b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using MLStyle using DataFrames include("MQuery.ConstantNames.jl") include("MQuery.DynamicInfer.jl") include("MQuery.Interfaces.jl") include("MQuery.MacroProcessor.jl") include("MQuery.Impl.jl") using Base.Enums @enum TypeChecking Dynamic Static df = DataFrame( Symbol("Type checking") => [ Dynamic...
{"hexsha": "78e03aa8f9836a8520ba05422a2f1706d246a43b", "size": 793, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "MQuery/MQuery.jl", "max_stars_repo_name": "thautwarm/MLStyle-Playground", "max_stars_repo_head_hexsha": "89095cab786e40476bc6c8f5e7b028ea02b8c4ff", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#ifndef OPENGM_PYTHON_INTERFACE #define OPENGM_PYTHON_INTERFACE 1 #endif #include <stdexcept> #include <stddef.h> #include <string> #include <boost/python.hpp> #include <opengm/graphicalmodel/graphicalmodel.hxx> #include <opengm/inference/inference.hxx> #include <opengm/inference/lazyflipper.hxx> #include "../export_t...
{"hexsha": "ea488bd1f5f2a8384dabb055670da41cf5153aef", "size": 1682, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "src/interfaces/python/opengm/inference/pyLazyflipper.cxx", "max_stars_repo_name": "amueller/opengm", "max_stars_repo_head_hexsha": "bf2d0c611ade9bbf1d2ae537fee0df4cb6553777", "max_stars_repo_license...
! ! LBLRTM_Fhdr_netCDF_IO ! ! Module containing routine to read and write LBLRTM Fhdr objects as ! groups to a netCDF format file. ! ! ! CREATION HISTORY: ! Written by: Paul van Delst, 19-Feb-2014 ! paul.vandelst@noaa.gov ! MODULE LBLRTM_Fhdr_netCDF_IO ! ----------------- ! Environ...
{"hexsha": "5d510dccc3bc2ee988b9919d135478408d96ea67", "size": 24785, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/TauProd/LBL/lblrtm/io/netcdf/fhdr/LBLRTM_Fhdr_netCDF_IO.f90", "max_stars_repo_name": "hsbadr/crtm", "max_stars_repo_head_hexsha": "bfeb9955637f361fc69fa0b7af0e8d92d40718b1", "max_stars_repo...
# Import Dependencies import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify import datetime as dt ################################################# # Database Setup #########...
{"hexsha": "39d30314d3ff0ba746f6696aabb862f06a7a3119", "size": 4174, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "tylerlvaughn/SQLAlchemy-Challenge", "max_stars_repo_head_hexsha": "0d09acb421f48fc1167602ee62e18867c5f06089", "max_stars_repo_licenses": ["ADSL"], "max_stars_count...
[STATEMENT] lemma remove_term_keys: shows "keys (mapping_of p) - {m} = keys (mapping_of (remove_term m p))" (is "?A = ?B") [PROOF STATE] proof (prove) goal (1 subgoal): 1. keys (mapping_of p) - {m} = keys (mapping_of (remove_term m p)) [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals): 1. keys (mapping...
{"llama_tokens": 1378, "file": "Polynomials_More_MPoly_Type", "length": 18}
setwd("/home/yuanhao/github_repositories/DISC/reproducibility") utilities_path = "./source/utilities.r" source(utilities_path) #### STEP 1 #Here, we use BONE_MARROW dataset. The detail information of this dataset can be seen at https://raw.githack.com/iyhaoo/DISC/master/reproducibility/data_preparation_and_imputation/d...
{"hexsha": "a9016efee5c23b1c4c5fc86842fff26ea055f908", "size": 14211, "ext": "r", "lang": "R", "max_stars_repo_path": "reproducibility/Down-stream Analysis Improvement/raw_scripts/pseudotemporal_analysis_source.r", "max_stars_repo_name": "iyhaoo/DISC", "max_stars_repo_head_hexsha": "42bcb570bc76ac28bba1681e905efc5189c1...
""" # @Time : 2021/7/3 8:04 上午 # @Author : hezhiqiang01 # @Email : hezhiqiang01@baidu.com # @File : naiveAC.py """ import argparse import torch import gym import numpy as np import collections import torch.nn as nn from torch.distributions import Categorical import torch.nn.functional as F Experience = coll...
{"hexsha": "10e2c2bdc9c606da02f65559c3db306ce8004cf7", "size": 5210, "ext": "py", "lang": "Python", "max_stars_repo_path": "chap05 Actor Critic/naiveAC.py", "max_stars_repo_name": "18279406017/awesome-reinforcement-learning", "max_stars_repo_head_hexsha": "88644e65f6c18ad74a84eb87e7ce433fa65530bf", "max_stars_repo_lice...
import preprocessing import unittest import numpy as np class PreprocessingTest(unittest.TestCase): def setUp(self): self.raw_small_image = np.random.uniform(0, 255, (16,17,3)).astype(int) self.char2ind = {'a': 0, 'b': 1, 'c': 2} self.ind2c...
{"hexsha": "ecc7fa963fc641e0f40e5795b51bc2de95d327cc", "size": 937, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_preprocessing.py", "max_stars_repo_name": "denkuzin/captcha_solver", "max_stars_repo_head_hexsha": "cea3a3673df2d9c9529811d0ed4ee0a2244166d3", "max_stars_repo_licenses": ["Unlicense"], "...
#!/usr/bin/env python """ Author: Yixin Li Email: liyixin@mit.edu """ import numpy as np from of.utils import * from of.gpu.KernelThinWrapper import KernelThinWrapper from .gpu import dirname_of_cuda_files cuda_filename = os.path.join(dirname_of_cuda_files,'rgb_to_lab.cu') FilesDirs.raise_if_file_does_not_exist(cuda_f...
{"hexsha": "549e223c9731a5fe38116a869eebafd1b0fe1732", "size": 1282, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/superpixels/rgb_to_lab.py", "max_stars_repo_name": "BGU-CS-VIL/fastScsp", "max_stars_repo_head_hexsha": "32e36d2ee2a6636303bd4cbf8b7cc91190af2202", "max_stars_repo_licenses": ["MIT"], "max_...
import time import math import numpy as np from pykeops.numpy import LazyTensor, ComplexLazyTensor M, N, D = 1000, 1000, 3 dtype = "float32" do_warmup = False x = np.random.rand(M, 1, D).astype(dtype) + 1j * np.random.rand(M, 1, D).astype(dtype) y = np.random.rand(1, N, D).astype(dtype) + 1j * np.random.rand(1, N,...
{"hexsha": "4220802187b671e101890e5f1116f7f24d4873c1", "size": 1426, "ext": "py", "lang": "Python", "max_stars_repo_path": "pykeops/sandbox/test_complex_numpy.py", "max_stars_repo_name": "mdiazmel/keops", "max_stars_repo_head_hexsha": "52a3d2ee80a720639f52898305f85399b7b45a63", "max_stars_repo_licenses": ["MIT"], "max_...
from flask import Flask, Response from flask_socketio import SocketIO, send, emit from queue import Queue import base64 import cv2 import numpy as np from PIL import Image import io d = dirname(dirname(abspath(__file__))) app = Flask(__name__) app.queue = Queue() socketio = SocketIO(app) @socketio.on('connect', names...
{"hexsha": "b0c8862e6df6caae2f0853b66dcfd9234c8fded0", "size": 833, "ext": "py", "lang": "Python", "max_stars_repo_path": "server.py", "max_stars_repo_name": "DevconX/Tello-Python", "max_stars_repo_head_hexsha": "0e7ef8375e6904a536ff274ec7c868388424327e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, "max_...
/*============================================================================= Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at htt...
{"hexsha": "9c03b4268adcb094447a74edb42e9de5a2b47552", "size": 3707, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/fusion/test/sequence/map_construction.cpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b444494140676da98e2", "ma...
""" ImageSpace: image matrix, inc dimensions, voxel size, vox2world matrix and inverse, of an image. Used for resampling operations between different spaces and also for saving images into said space (eg, save PV estimates into the space of an image) """ import copy from textwrap import dedent import nibabel impor...
{"hexsha": "35d83ecfedaae803957903dd9a4536d98a6ec81e", "size": 11652, "ext": "py", "lang": "Python", "max_stars_repo_path": "regtricks/image_space.py", "max_stars_repo_name": "tomfrankkirk/regtools", "max_stars_repo_head_hexsha": "844fb1f108aa7dd02e8b9d36a2975022bce2c98d", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
! MODULE: params_obs ! ! This module contains all of the necessary parameters related to the ! observations, and observation operators. ! ! Author: Prof. Stephen G. Penny ! University of Maryland, College Park ! Department of Atmospheric and Oceanic Science ! ! 2016.4.7 MODULE params_obs USE common, ...
{"hexsha": "28e12617717fe0c7b2d9937292dc78106f7a60b8", "size": 7727, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/obs/params_obs.f90", "max_stars_repo_name": "GEOS-ESM/Ocean-LETKF", "max_stars_repo_head_hexsha": "a7c4bbf86cdbff078212914dcc059d0b1450accf", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# # colormaps.jl -- # # Implements management of colors and colormaps for using with the PGPlot # library. # module Colormaps export RGBVec, palette using Colors using PGPlot.Bindings import PGPlot.Bindings: pgqcr, pgscr const DATA_DIR = normpath(joinpath(@__DIR__, "..", "data")) """ `RGBVec{T}(r,g,b)` re...
{"hexsha": "84f64f9e021b12536a359ebf55585daef9ddb9aa", "size": 12804, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/colormaps.jl", "max_stars_repo_name": "emmt/PGPlot.jl", "max_stars_repo_head_hexsha": "884ddc3624c071e081a804e0d55ae371204c6549", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
import os import h5py import numpy as np from sklearn.model_selection import train_test_split from utilsTrain import generator, ensureDir from modelLib import makeModel from keras.models import load_model from keras.callbacks import ModelCheckpoint, EarlyStopping, CSVLogger, ReduceLROnPlateau import tensorflow as tf ...
{"hexsha": "80a3fedad662ac9111726e2d07390abf54b45044", "size": 2408, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/train.py", "max_stars_repo_name": "suhailnajeeb/tcga-cancer-predict", "max_stars_repo_head_hexsha": "60e7061311f36f722abeae0ad26ed34c44095843", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import re import itertools as it import numpy as np import pandas as pd from string import punctuation import unicodedata from sklearn.feature_extraction.text import CountVectorizer import nltk from nltk.tokenize import TweetTokenizer # import tweepy import matplotlib.pyplot as plt from matplotlib.ticker import Func...
{"hexsha": "8f57ee4ba3e4a1b7a8441d6ae2adf2985d30c6d5", "size": 12227, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/timeseries_utils.py", "max_stars_repo_name": "mehdimansouri/pictet", "max_stars_repo_head_hexsha": "449378dd3df2e54968e31de13635b509b1f4572b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import inspect import tubular.testing.helpers as h import tubular import pandas as pd import numpy as np from unittest import mock from _pytest.mark.structures import ParameterSet def test_arguments(): """Test arguments for arguments of tubular.testing.helpers.index_preserved_params.""" expected_arguments = ...
{"hexsha": "fadd0f638192b360a9791e9fb5688c6a03ccce21", "size": 4322, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/testing/helpers/test_index_preserved_params.py", "max_stars_repo_name": "munichpavel/tubular", "max_stars_repo_head_hexsha": "53e277dea2cc869702f2ed49f2b495bf79b92355", "max_stars_repo_licen...
/// @file TwitterSpark.cpp /// @brief TwitterSpark class implementation. #include "TwitterSpark.h" #include <algorithm> #include <boost/tokenizer.hpp> /* LOG4CPLUS Headers */ #include <log4cplus/logger.h> #include <log4cplus/fileappender.h> #include <log4cplus/layout.h> #include <log4cplus/ndc.h> #include <log4cplus/...
{"hexsha": "a515a408d2eea65955c6a6ea921f24ec54826d3a", "size": 11076, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "SPARKS/TwitterSpark/TwitterSpark.cpp", "max_stars_repo_name": "adele-robots/fiona", "max_stars_repo_head_hexsha": "1ef1fb18e620e18b2187e79e4cca31d66d3f1fd2", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from attention import MHSATransformerPos def xy2uv(xyz, eps = 0.001): x, y, z = torch.unbind(xyz, dim=2) x = x+eps y = y+eps z = z+eps u = torch.atan2(x, -y) ...
{"hexsha": "cf1da77af59c11b885b755c6467620f94b6d6f39", "size": 3279, "ext": "py", "lang": "Python", "max_stars_repo_path": "gaf.py", "max_stars_repo_name": "crs4/Deep3DLayout", "max_stars_repo_head_hexsha": "881a66cfeac52b043f0aaffef40e3a2aea5c22ec", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 6, "m...
# just a example # use it in each script import numpy as np import keras.backend as K from keras import Model from keras.layers import Dense, Input def get_model(num_class): input = Input([5,])() print(base_model.summary()) x = base_model.get_layer("bn").output # x = base_model.get_layer("block5_pool"...
{"hexsha": "20579af9102f3c3203e49d460cf3aabe0b83304f", "size": 1080, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict_with_uncertainty.py", "max_stars_repo_name": "OsciiArt/Cookpad", "max_stars_repo_head_hexsha": "b2245f84db0650d6282c97c98600de825c6ed6e0", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Torn numbers in cpmpy. From http://www.comp.nus.edu.sg/~henz/projects/puzzles/digits/torn.html?19 --- The Torn Number from 'Amusements in Mathematics', Dudeney, number 113 I had the other day in my possession a label bearing the number 3025 in large figures. This got accidentally torn in half, so that 30 was ...
{"hexsha": "a2284201b3d7516ec84eccba8fafb21193935aed", "size": 1642, "ext": "py", "lang": "Python", "max_stars_repo_path": "cpmpy/torn_numbers.py", "max_stars_repo_name": "hakank/hakank", "max_stars_repo_head_hexsha": "313e5c0552569863047f6ce9ae48ea0f6ec0c32b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 279...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Oct 4 16:27:43 2020 @author: bernardo """ import matplotlib.pyplot as plt import numpy as np import csv import sys from datetime import datetime, timezone ts = [] p = [] tmp = [] iaq = [] iaqAcq = [] gRes = [] hum = [] cO2 = [] voc = [] staticIaq = [...
{"hexsha": "5647988ac60264a56cfff6929b48f3e2f13dd1b4", "size": 1378, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_bme680_iaq_csv.py", "max_stars_repo_name": "bernardocarvalho/esp32-bme680", "max_stars_repo_head_hexsha": "83d143aab831ab6444f157c9f170433f384371c0", "max_stars_repo_licenses": ["MIT"], "max_...
Jo Hatcher is a licensed marriage and family Counselors and Therapists Therapist (license: MFC #33486). It is easy to get swept away in the busyness of life and drift from that which is truly meaningful and important to us. When stress and unplanned events happen, we sometimes lose our balance. In my work with wome...
{"hexsha": "6083cc2881ee563cf1453daa3e1b49df169b8d04", "size": 603, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Jo_Hatcher%2C_LMFT.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_...
\clearpage \section{Kidney Droplet} \subsection{All Cells, labeled by \emph{Cell Ontology Class}} \subsubsection{Table of cell counts in All Cells, per \emph{Cell Ontology Class}}\begin{table}[h] \centering \label{my-label} \begin{tabular}{@{}ll@{}} \toprule \emph{Cell Ontology Class}& Number of cells \\ \midrule kid...
{"hexsha": "a04d7ee652a407d8e419729a64775814b2968810", "size": 10316, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "31_tissue_supplement_tex/Kidney_droplet_auto_generated.tex", "max_stars_repo_name": "mjoppich/tabula-muris", "max_stars_repo_head_hexsha": "c1a7b7854b7b9a191141c6f2c4d89179ec41603b", "max_stars_rep...
# import the necessary packages # coding:utf-8 import json import os import cv2 as cv import keras.backend as K import numpy as np from keras.applications.inception_resnet_v2 import preprocess_input from tqdm import tqdm from config import train_data, test_a_image_folder, img_height, img_width from model import build...
{"hexsha": "2bd848af5710a7e3865286131861067dc3c874a1", "size": 1572, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval.py", "max_stars_repo_name": "foamliu/Crop-Disease-Detection", "max_stars_repo_head_hexsha": "fca9baefca48ad2fbdbc62075580fa27e5ed3531", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np from bpdb import set_trace from scipy.constants import c from sympy import Matrix, symbols from sympy.utilities.lambdify import lambdify class Sensors: def __init__(self, env): self.env = env self.define_measurement_models() def define_measurement_models(self): sel...
{"hexsha": "70472caae5474c58c5ec0250390eb31b09901712", "size": 2907, "ext": "py", "lang": "Python", "max_stars_repo_path": "pntddf/sensors.py", "max_stars_repo_name": "COHRINT/pnt-ddf", "max_stars_repo_head_hexsha": "5ea00957e74452ab41a34b00a60b9e4001144280", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
[STATEMENT] lemma f_make_mono_less: "\<forall>n. f n < oLimit f \<Longrightarrow> f (make_mono f n) < f (make_mono f (Suc n))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>n. f n < oLimit f \<Longrightarrow> f (make_mono f n) < f (make_mono f (Suc n)) [PROOF STEP] apply (drule_tac x="make_mono f n" in spe...
{"llama_tokens": 348, "file": "Ordinal_OrdinalInduct", "length": 4}
import numpy as np import matplotlib.pyplot as plt plt.imshow(np.zeros((100, 100))) plt.show()
{"hexsha": "6264e8c1e70682f46f6dfb3471f2ac8af48a8990", "size": 95, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/plt.py", "max_stars_repo_name": "f-sky/DeepV2D", "max_stars_repo_head_hexsha": "5c1c6f58ee359d045a7efd5161445ea87d83bdbe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 1, "m...
"""Tests for SIR model in this repo * Compares conserved quantities * Compares model against Penn CHIME w/wo social policies * Checks logistic policies in extreme limit """ from typing import Tuple from datetime import date from pytest import fixture from numpy import zeros from pandas import DataFrame, Series from p...
{"hexsha": "0f6923a9170d6828a2358f14f60bddc04ec10c6e", "size": 5871, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/sir_test.py", "max_stars_repo_name": "ckoerber/covid-19-analysis", "max_stars_repo_head_hexsha": "d6b3324cdac37b20aebc18932ffd9077e9d1b969", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os from pathlib import Path import csv import tensorflow as tf import sqlite3 import numpy as np DATA_PATH = Path(__file__).resolve().parents[3] / "parsed_data" DB_PATH = Path(__file__).resolve().parents[3] / "webserver" / "app.db" RATING_TRAIN_FILENAME = "ratings_train.csv" RATING_TEST_FILENAME = "ratings_test...
{"hexsha": "e0248eff98feace23f859ba58717df7adc41fb0f", "size": 3252, "ext": "py", "lang": "Python", "max_stars_repo_path": "recommenders/recommenders/datasets/dataset.py", "max_stars_repo_name": "hojinYang/tfrs-movierec-serving", "max_stars_repo_head_hexsha": "bef4f19a8be99cde510d761082de7602151a7d99", "max_stars_repo_...
import argparse import os from plyfile import PlyData, PlyElement import numpy as np from sklearn.decomposition import PCA parser = argparse.ArgumentParser() parser.add_argument("--rootdir", type=str, required=True) parser.add_argument("--destdir", type=str, required=True) parser.add_argument("--test", action="store_t...
{"hexsha": "852051c3217a4dfda6f958bbc4424d607e1d203b", "size": 2818, "ext": "py", "lang": "Python", "max_stars_repo_path": "legacy_examples/npm3d/prepare_data.py", "max_stars_repo_name": "StructuralNeurobiologyLab/LightConvPoint", "max_stars_repo_head_hexsha": "3f353f45e9e910fa390a74520dfd478e3e88f104", "max_stars_repo...
abstract type AbstractGrid{T, N} <: AbstractArray{T, N} end """ struct Grid{T, N, S <: AbstractCoordinateSystem, AT} <: AbstractGrid{T, N} Collection of `N` axes that define the dimensions of the grid needed to calculate [`ElectricPotential`](@ref), [`ElectricField`](@ref) or [`WeightingPotential`](@ref). ...
{"hexsha": "9b9012ea0f415ab77eb29d7f9c00ea9678647822", "size": 9849, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Grids/Grids.jl", "max_stars_repo_name": "hervasa2/SolidStateDetectors.jl", "max_stars_repo_head_hexsha": "c640fc84c617fb5dc360aba43550c86e959e47a1", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Copyright 2020 The TensorFlow 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 applica...
{"hexsha": "81e9b299ebaa4bb3e254ecc2c19253154d85278d", "size": 3139, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/ipu/tests/iteration_counter_test.py", "max_stars_repo_name": "chenzhengda/tensorflow", "max_stars_repo_head_hexsha": "8debb698097670458b5f21d728bc6f734a7b5a53", "max_stars_repo_l...
// All content Copyright (C) 2018 Genomics plc #ifndef WECALL_REDUCE_HPP #define WECALL_REDUCE_HPP #include <iomanip> #include <boost/program_options.hpp> #include <boost/asio/io_service.hpp> #include <boost/bind.hpp> #include <boost/thread/thread.hpp> #include <boost/algorithm/string.hpp> #include <boost/filesystem/...
{"hexsha": "09b6c682f706b8ca945a037786e4adc6ec97f8b3", "size": 651, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cpp/src/weCallReduce.hpp", "max_stars_repo_name": "dylex/wecall", "max_stars_repo_head_hexsha": "35d24cefa4fba549e737cd99329ae1b17dd0156b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8.0,...
# Anthony Krivonos # Nov 9th, 2018 # src/models/price.py # Imports import sys import json # Pandas import pandas as pd # NumPy import numpy as np # SciPy import scipy.optimize as optimize # Enums from enums import * # Math from math import exp # PriceModel from models.price import * # QuoteModel from models.qu...
{"hexsha": "7da6f80d5902c184da615060b8a1a409555eee32", "size": 15611, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/portfolio.py", "max_stars_repo_name": "derricksmith/Quantico", "max_stars_repo_head_hexsha": "e8ff3da3813e0373b67ec489c8b78d70b5565034", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python try: from tensorflow.compat.v1 import ConfigProto from tensorflow.compat.v1 import InteractiveSession config = ConfigProto() config.gpu_options.allow_growth = True session = InteractiveSession(config=config) except Exception as e: print(e) print("Not possible to set gpu allow growt...
{"hexsha": "d96362a477fbb0703ce5e057bfd123d215ef4345", "size": 5391, "ext": "py", "lang": "Python", "max_stars_repo_path": "tunings/run_tuning.py", "max_stars_repo_name": "natmourajr/CERN-ATLAS-Qualify", "max_stars_repo_head_hexsha": "9b40106df97df5f75ba09a7acbbc763a9fdbb8b9", "max_stars_repo_licenses": ["MIT"], "max_s...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Foundations.Structure open import Cubical.Fou...
{"hexsha": "e02ddc0e7f46d17ba799a046defa42d5c6f48558", "size": 17635, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Algebra/CommAlgebra/FreeCommAlgebra/Properties.agda", "max_stars_repo_name": "howsiyu/cubical", "max_stars_repo_head_hexsha": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "max_stars_repo_l...
source("utils/rtools.r"); list.packages = c("stats", "utils", "Rcpp", "stringr", "jsonlite") install_missing(list.packages) sourceCpp('utils/parseParams.cpp') params <- list( wantedCol="x_OfSpectra", pthreshold=0.05 ); params$twoStats <- list( # stats comparing 2 test groups "wilcoxon"=function(x,y) tryCatch(wil...
{"hexsha": "db322fc66b957b37b5ce6302bd207c1e51b38595", "size": 5076, "ext": "r", "lang": "R", "max_stars_repo_path": "statTests.r", "max_stars_repo_name": "UnsignedByte/MassSpec-Data-Visualizer", "max_stars_repo_head_hexsha": "c75d242768d99aa61d87e2bc01462389c83a7028", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import re import json from typing import Dict import numpy as np import sklearn from gensim.utils import tokenize from gensim.models import KeyedVectors from sklearn.cluster import AgglomerativeClustering from models.models_tools import filter_data class BaselineWord2Vec: def __init__(self, filepath: str, path...
{"hexsha": "6bf2ae6ebbca0ba689f56a3c9a810893e9f2fae1", "size": 5648, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/baseline/baseline_Word2Vec.py", "max_stars_repo_name": "datactivist/dataoutai", "max_stars_repo_head_hexsha": "a1db230a31e78d17cd1c79daa8c13a508d493f9f", "max_stars_repo_licenses": ["MIT"],...
SUBROUTINE PS_USTB ( datain, nparm, plev, outdat, iret ) C************************************************************************ C* PS_USTB * C* * C* This subroutine finds the most unstable level of a sounding from * C* surface up to PLEV. The most unstable level is defined as the level * C* which ha...
{"hexsha": "75d8add6e8e96b0b67b41a40d39b9da23550ba7a", "size": 2433, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/prmcnvlib/ps/psustb.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import logging from functools import lru_cache from typing import Optional, Tuple, Any import numpy as np from opensfm import features as ft from opensfm.dataset import DataSetBase logger = logging.getLogger(__name__) class FeatureLoader(object): def clear_cache(self): self.load_mask.cache_clear() ...
{"hexsha": "4993359dc58e0ac1040addc00bc6515325e654c3", "size": 3983, "ext": "py", "lang": "Python", "max_stars_repo_path": "opensfm/feature_loading.py", "max_stars_repo_name": "whuaegeanse/OpenSfM", "max_stars_repo_head_hexsha": "1c261fbd1330f9a4483597ceb5cb1098fcdbd97f", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
#!/bin/env python import numpy as np # controls printing array corners # np.set_printoptions(threshold='nan') zero = np.zeros(10) one = np.ones(20) print zero print one # read file into a numpy array data = np.loadtxt('../data/strlist10k.txt', dtype='string') print data
{"hexsha": "dc825129c647abc8738e151719b952e42eb507e6", "size": 277, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/arrayops.py", "max_stars_repo_name": "ketancmaheshwari/hello-goog", "max_stars_repo_head_hexsha": "fc479ea0017edfc96f3b109eff336fb9954e1f3e", "max_stars_repo_licenses": ["Apache-2.0"], "...
""" =============================================== Creating a timeline with lines, dates, and text =============================================== How to create a simple timeline using Matplotlib release dates. Timelines can be created with a collection of dates and text. In this example, we show how to create a sim...
{"hexsha": "087e7320f6b84f1fbc1c695596b5e045a3c012bf", "size": 4243, "ext": "py", "lang": "Python", "max_stars_repo_path": "matplotlib-3.4.3/matplotlib-3.4.3/examples/lines_bars_and_markers/timeline.py", "max_stars_repo_name": "JohnLauFoo/clc_packages_Yu", "max_stars_repo_head_hexsha": "259f01d9b5c02154ce258734d519ae89...
""" This is the implementation of the User MAD ranking metric. It proceeds from a user-wise computation, and average the values over the users. """ __version__ = '0.3.1' __author__ = 'Vito Walter Anelli, Claudio Pomo' __email__ = 'vitowalter.anelli@poliba.it, claudio.pomo@poliba.it' import math import typing as t im...
{"hexsha": "584827fa8272a47f0228a439163ded9c05dc74fb", "size": 5384, "ext": "py", "lang": "Python", "max_stars_repo_path": "elliot/evaluation/metrics/fairness/MAD/UserMADranking.py", "max_stars_repo_name": "gategill/elliot", "max_stars_repo_head_hexsha": "113763ba6d595976e14ead2e3d460d9705cd882e", "max_stars_repo_licen...
# stdlib imports from datetime import timedelta, datetime import tempfile import os.path import io import urllib import ftplib import logging import shutil # third party imports import pytz import numpy as np import requests from openquake.hazardlib.geo.geodetic import geodetic_distance from obspy.core.utcdatetime imp...
{"hexsha": "dcb5feb0b34ccdbb9f9fba66c0528c86bae80f76", "size": 10978, "ext": "py", "lang": "Python", "max_stars_repo_path": "gmprocess/io/geonet/geonet_fetcher.py", "max_stars_repo_name": "smithj382/groundmotion-processing", "max_stars_repo_head_hexsha": "b6c8284dc945deb868e90c6e674b1743a424b4f9", "max_stars_repo_licen...
#!/usr/bin/env python # coding:utf-8 import torch.nn as nn from models.structure_model.graphcnn import HierarchyGCN from models.structure_model.tree import Tree import json import os import numpy as np from helper.utils import get_hierarchy_relations from models.structure_model.weighted_tree_lstm import WeightedHierar...
{"hexsha": "4c510a231d9ce1d45c010b8bbb4997e37efea665", "size": 3403, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/structure_model/structure_encoder.py", "max_stars_repo_name": "TownShaw/HiAGM", "max_stars_repo_head_hexsha": "26c20362467ab703cde4eb0352809de622deddf0", "max_stars_repo_licenses": ["MIT"],...
Agricultural and Environmental Education (AEE) is a major offered by the College of Agricultural and Environmental Sciences as of 2010. This major prepares students to enter a teacher credential program in either science or agricultural and environmental education. Students in AEE take classes on a variety of subjects ...
{"hexsha": "2f10bac2328a702547755103e203a5f6ed22f5c1", "size": 1030, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Agricultural_and_Environmental_Education.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses...
(* *********************************************************************) (* *) (* The CertiKOS Certified Kit Operating System *) (* *) (* The...
{"author": "npe9", "repo": "certikos", "sha": "dd2631a096523a29a2e8a3101d8a224b754ea56a", "save_path": "github-repos/coq/npe9-certikos", "path": "github-repos/coq/npe9-certikos/certikos-dd2631a096523a29a2e8a3101d8a224b754ea56a/mcertikos/trap/TTrapArgCode2.v"}
#Outlier Detection # WARNING : DATA SET USED FOR OUTLIER DETECTION MUST BE ENTIERLY FILLING IN (NO MISSING VALUES) # HERE WE USED THE MEAN METHOD TO FILLING MISSING VALUES, REPLACE "MEAN" BY "MEDIAN" or "KNN" TO USE ANOTHER METHOD ######################################## PERCENTILE ###################################...
{"hexsha": "170ef4386e73ff75c74096f73d6409e16f4832b8", "size": 6873, "ext": "r", "lang": "R", "max_stars_repo_path": "outlier_detection.r", "max_stars_repo_name": "AugusteLef/MRI", "max_stars_repo_head_hexsha": "58e48e9e7026dd3a9e043a5d5f912202bf5a2b3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
#!/usr/bin/env python import os import os.path as osp import numpy as np import skimage.io import instance_occlsegm_lib def main(): root_dir = osp.expanduser('~/.ros/instance_occlsegm') for save_dir in sorted(os.listdir(root_dir)): save_dir = osp.join(root_dir, save_dir) print('-' * 79) ...
{"hexsha": "397d0ab92b9d1c2cbe467312a91e7b0a5a8141fd", "size": 1196, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/instance_occlsegm/ros/instance_occlsegm/scripts/view_collected_data.py", "max_stars_repo_name": "pazeshun/jsk_apc", "max_stars_repo_head_hexsha": "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core from hypothesis import assume, given, settings import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import n...
{"hexsha": "98e9d61b5bd02820fbc4aa4bac41f460cc484745", "size": 4483, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch-frontend/caffe2/python/operator_test/im2col_col2im_test.py", "max_stars_repo_name": "AndreasKaratzas/stonne", "max_stars_repo_head_hexsha": "2915fcc46cc94196303d81abbd1d79a56d6dd4a9", "max...
from nanograd.tensor import Tensor from nanograd.device import Device import nanograd.nn.module as nnn import nanograd.optim.optimizer as optim import torch import torch.nn.functional as F import torch.optim import numpy as np import unittest x_init = np.random.randn(1, 3).astype(np.float32) W_init = np.random.ran...
{"hexsha": "f0fcee3735978d2c8428e5f2e7da396ccb74652f", "size": 2904, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_step.py", "max_stars_repo_name": "PABannier/nanograd", "max_stars_repo_head_hexsha": "5acd355c638885cbfc0fd0f1c4903964e7fb7de9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
const GR_SUPPORTED_TYPES = Union{ MIME"image/svg", MIME"image/svg+xml", MIME"image/png", MIME"image/jpeg", MIME"image/tiff", MIME"image/bmp", MIME"application/pdf", MIME"application/postscript", MIME"application/x-tex" } backend_showable(::GRBackend, ::GR_SUPPORTED_TYPES, scene::SceneLike) = true functio...
{"hexsha": "c24a3ae16b260d08e5a64e1687327f587ea0e403", "size": 2393, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/saving.jl", "max_stars_repo_name": "JuliaPlots/GRMakie.jl", "max_stars_repo_head_hexsha": "a027c79236de47bda98cf7d6592bc83f340c9f08", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "...
[STATEMENT] lemma inv_is_iD [elim]: fixes ip rt assumes "ip\<in>kD(rt)" and "the (flag rt ip) = inv" shows "ip\<in>iD(rt)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ip \<in> iD rt [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: ip \<in> kD rt the (flag rt ip) = Aodv_Basic.inv g...
{"llama_tokens": 271, "file": "AODV_variants_e_all_abcd_E_Aodv_Data", "length": 3}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Routines to import atmospheric data from text files. Created on Thu Nov 17 09:57:08 2016 @author: maxwell """ __all__ = ['readprof'] import numpy as np def readprof(fname): return readprof_full(fname) def readprof_full(fname): """ Read ASCII table o...
{"hexsha": "9549c5aae2e64f7905a132b477aaebd58107b91b", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "atmosphere/readprof.py", "max_stars_repo_name": "msmithsm/rce", "max_stars_repo_head_hexsha": "91e6fd2ee93b64a471aa7e0ca62bb4649c1b3b19", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np from menpo.transform.piecewiseaffine.base import barycentric_vectors from menpo.image import BooleanImage, MaskedImage def _pixels_to_check_python(start, end, _): pixel_locations = [] tri_indices = [] for i, ((s_x, s_y), (e_x, e_y)) in enumerate(zip(start, end)): for x in range...
{"hexsha": "beefb9549763ebeceaa3f6e7066d824d5ca8191e", "size": 5314, "ext": "py", "lang": "Python", "max_stars_repo_path": "menpo3d/rasterize/cpu.py", "max_stars_repo_name": "nontas/menpo3d", "max_stars_repo_head_hexsha": "f29324b12a147f5b716ae5c3048d2c6b7a298752", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
import sightlines as los import numpy as np def test_halfway(): short_z_r_list = [(0,0,1), (1,0,10)] seg_dict = los.compute_len_in_each_cell(short_z_r_list) assert(len(seg_dict)==2) assert(seg_dict[1]==0.5) assert(seg_dict[10]==0.5) def test_equal_10(): nice_z_r_list = [(0,1,10), (1,1,11), (2,...
{"hexsha": "3ca1a93d6763ce4e88eac78040b4017075531d31", "size": 2677, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_segment_lister.py", "max_stars_repo_name": "astrobenji/sightlines", "max_stars_repo_head_hexsha": "e81464a672dae7105d2507d1753d415a51f5a512", "max_stars_repo_licenses": ["MIT"], "max_st...
# python 2/3 compatibility from __future__ import division, print_function # global imports import numpy import pandas import json class InfoMatrices(object): """ Class holding information on the compartments in the model. Attributes ---------- Reaction_Reaction : pandas.DataFrame ...
{"hexsha": "2a164f979eeda7291f33c90b6a0ebd9d14ff3237", "size": 6826, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulator/static/python/rbatools/infoMatrices.py", "max_stars_repo_name": "tlubitz/rba", "max_stars_repo_head_hexsha": "073b591ff6047ee8df00288ecfe45094e2b7d195", "max_stars_repo_licenses": ["MIT"...