text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import unittest import numpy as np from pydrake.autodiffutils import (InitializeAutoDiff, AutoDiffXd, ExtractGradient) from .normalization_derivatives import calc_normalization_derivatives class TestNormalizationDerivatives(unittest.TestCase): def test_normalization_derivative...
{"hexsha": "6f44b9010e5ed69f76152799ed9bf74fae2ef77f", "size": 635, "ext": "py", "lang": "Python", "max_stars_repo_path": "qsim/test_normalization_derivatives.py", "max_stars_repo_name": "pangtao22/quasistatic_simulator", "max_stars_repo_head_hexsha": "7c6f99cc7237dd922f6eb0b54c580303e86b5223", "max_stars_repo_licenses...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "d99bee58b99bbe350ee8d7e516301f4750753537", "size": 9932, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/python/relay/test_pass_gradient.py", "max_stars_repo_name": "ttyang1018/tvm", "max_stars_repo_head_hexsha": "ade26cacd0767cf14dc053ac4d7778859f83a32c", "max_stars_repo_licenses": ["Apache-2....
import arviz as az import numpy as np import os import pystan import matplotlib.pyplot as plt from lib.stan_utils import compile_model, get_pickle_filename, get_model_code from lib.drug_classes import DRUG_CLASSES from prepare_data import get_formatted_data, add_rank_column, aggregate_treatment_arms, get_variability_ef...
{"hexsha": "a14eedae83a38337c5f84825e067d50ff4ad9f4f", "size": 3532, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/subgroup_analysis.py", "max_stars_repo_name": "volkale/advr", "max_stars_repo_head_hexsha": "f817ce31c50a5bb976eb29bffe9832e2aeb6f7c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# This solution was build using python 2.7 # Author: Tomas F. Venegas Bernal tf.venegas10@uniandes.edu.co import random import numpy as np # This is a simple class that builds the Board that will be shown to the user. class Board: def __init__(self, height, width): self.matrix = np.chararray((height, wid...
{"hexsha": "6534e0a1ec1c980ecdeb1ef9cd4ce1220f48ae03", "size": 7932, "ext": "py", "lang": "Python", "max_stars_repo_path": "Minesweeper.py", "max_stars_repo_name": "tf-venegas10/Minesweeper", "max_stars_repo_head_hexsha": "dfb41284f5bb2469d101c4b05abe5d6897bf69f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
using GeometricAlgebra using DataStructures using MacroTools: postwalk, prewalk, @capture import BenchmarkTools import Grassmann include("printing.jl") include("utils.jl") function run_benchmark(name, expr::Expr, level) indent_level = level * 2 result = @eval @localbenchmark $expr replprint(string(minimum...
{"hexsha": "faa76f1b0c10718dfcf6849b923cedcd18137440", "size": 2149, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmarks/benchmarks.jl", "max_stars_repo_name": "serenity4/ConformalGeometry.jl", "max_stars_repo_head_hexsha": "70ec88954d0d0acfb9d480e17a45593305333c04", "max_stars_repo_licenses": ["MIT"], "ma...
{-# OPTIONS --no-universe-polymorphism #-} open import Data.Product hiding (map) open import Relation.Binary.Core open import Function open import Data.List open import Data.Unit using (⊤) open import Data.Empty open import Equivalence module BagEquality where infixr 5 _⊕_ data _⊕_ (A B : Set) : Set where ...
{"hexsha": "33b53bfd9c67ca6d5dd50499a1915729c52c1e81", "size": 12091, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "BagEquality.agda", "max_stars_repo_name": "NAMEhzj/Divide-and-Conquer-in-Agda", "max_stars_repo_head_hexsha": "99bd3a5e772563153d78f61c1bbca48d7809ff48", "max_stars_repo_licenses": ["MIT"], "max_...
"""Lekhnitskii solutions to homogeneous anisotropic plates with loaded and unloaded holes Notes ----- This module uses the following acronyms * CLPT: Classical Laminated Plate Theory References ---------- .. [1] Esp, B. (2007). *Stress distribution and strength prediction of composite laminates with multiple holes...
{"hexsha": "86d1f038438f52414722894dd3c43ec5092b044d", "size": 36019, "ext": "py", "lang": "Python", "max_stars_repo_path": "bjsfm/lekhnitskii.py", "max_stars_repo_name": "BenjaminETaylor/bjsfm", "max_stars_repo_head_hexsha": "a952183f5acca8139a1dd8ab2191c8dd3dc14710", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors from mpl_toolkits.axes_grid1 import make_axes_locatable import os # dictionary useful in indexing # of loaded numpy arrays as each # column in each of these numpy # array represents a class c={1:0,2:1,4:2,5:3,6:4,8:5,13:6} # crea...
{"hexsha": "0ea65948174ebd6bbe21e49c3c8d668c0492ac0e", "size": 16784, "ext": "py", "lang": "Python", "max_stars_repo_path": "periodic variable classification/code/experiments/cnn/blanking_experiments/average_blanking_exp_subplots.py", "max_stars_repo_name": "MeetGandhi/MeetGandhi-Post-hoc-Explainability-of-Deep-Learnin...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Monoidal.Construction.Minus2 where -- Any -2-Category is Monoidal. Of course, One is Monoidal, but -- we don't need to shrink to do this, it can be done directly. -- The assumptions in the construction of a -2-Category are all -- needed to make things wor...
{"hexsha": "5c8d655828961c270eeeb76b4d5291097b569bf0", "size": 1228, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Categories/Category/Monoidal/Construction/Minus2.agda", "max_stars_repo_name": "Trebor-Huang/agda-categories", "max_stars_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_st...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask, render_template, request, redirect,Response from flask_socketio import SocketIO, emit,send import flask_socketio from threading import Lock import torch from torch import nn import os import itertools import glob import math import sys import numpy ...
{"hexsha": "a0d762488c013ddba2b2f63483df46797db059ac", "size": 2631, "ext": "py", "lang": "Python", "max_stars_repo_path": "etc/individual modules/Voice_Activity_Detection/performance_test/whole process/app.py", "max_stars_repo_name": "yuzhouhe2000/video-conference-enhancer", "max_stars_repo_head_hexsha": "46aa130c0b7f...
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2019 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # """ Module for ...
{"hexsha": "1733eceb33f31b8807ab32c01cbe6c93b604d9dc", "size": 7733, "ext": "py", "lang": "Python", "max_stars_repo_path": "bapsflib/_hdf/maps/controls/nixyz.py", "max_stars_repo_name": "BaPSF/bapsflib", "max_stars_repo_head_hexsha": "999c88f813d3a7c5c244a77873850c5c5a4042b8", "max_stars_repo_licenses": ["BSD-3-Clause"...
import matplotlib.pyplot as plt import numpy as np model, explain, faith = [],[],[] model.extend([0,0.07]) explain.extend([0,0.073]) for i in range(10): model.append(0.073) explain.append(0.073+(i+1)*0.001) faith.append(np.corrcoef(model, explain)[0, 1]) print("model ", model) print("explain", explain) pr...
{"hexsha": "ceeff486cb2060eadbae6cd72c4acb03becfabbe", "size": 643, "ext": "py", "lang": "Python", "max_stars_repo_path": "faithfulness test.py", "max_stars_repo_name": "marnixm/lime_experiments", "max_stars_repo_head_hexsha": "0b6b2acddff3f55c022c7a5eb28a150ab9e4c846", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
########################################################## # # #This IFMR comes from Raithel et al. 2017 #https://arxiv.org/pdf/1712.00021.pdf # # ######################################################### import numpy as np class IFMR(object): """ The IFMR base class. The IFMR is a combination of the WD...
{"hexsha": "90265cd9d440643ae2ee89f166aed949469744e0", "size": 8989, "ext": "py", "lang": "Python", "max_stars_repo_path": "popstar/ifmr.py", "max_stars_repo_name": "samrose30/PyPopStar", "max_stars_repo_head_hexsha": "de32db0662c61dbb1141d3acedb7cc2be06bb1dd", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
#!/usr/bin/env python3 # MHD linear modes convergence plots import os,sys import numpy as np import matplotlib.pyplot as plt import pyHARM from pyHARM.parameters import parse_parthenon_dat RES = [int(x) for x in sys.argv[1].split(",")] BASE = "../../" LONG = sys.argv[2] SHORT = sys.argv[3] NVAR = 8 VARS = ['rho', '...
{"hexsha": "3b59dea05acf5d2c0585c062db2add8d11001533", "size": 3223, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/convergence/plot_convergence_modes.py", "max_stars_repo_name": "vedantdhruv96/kharma", "max_stars_repo_head_hexsha": "1159aa53d060087e1723166ceb922bd634c14a97", "max_stars_repo_licenses": ["...
////////////////////////////////////////////////////////////////// // // FreeLing - Open Source Language Analyzers // // Copyright (C) 2004 TALP Research Center // Universitat Politecnica de Catalunya // // This library is free software; you can redistribute it and/or // modify it ...
{"hexsha": "46a5b7f6dadf1cd85d33ec557a173d6c8da8ff45", "size": 16334, "ext": "cc", "lang": "C++", "max_stars_repo_path": "FreeLingModules/deprecated/squoia_server_analyzer.cc", "max_stars_repo_name": "ariosquoia/squoia", "max_stars_repo_head_hexsha": "3f3c3c253bdb2d891889e0427790e6c972870f08", "max_stars_repo_licenses"...
struct AggressivenessBeliefMDP <: MDP{AggressivenessBelief, MLAction} up::AggressivenessUpdater end function generate_sr(p::AggressivenessBeliefMDP, b_old::AggressivenessBelief, a::MLAction, rng::AbstractRNG) up = p.up pomdp = get(up.problem) s = rand(rng, b_old) sp = generate_s(pomdp, s, a, rng) ...
{"hexsha": "26cf50b76e4d4581bd6ea4125b487afabca2da73", "size": 3539, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/aggressiveness_belief_mdp.jl", "max_stars_repo_name": "zsunberg/Multilane.jl", "max_stars_repo_head_hexsha": "2f19dd2a60a0786e6bbcf6a150a173d35be068a3", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import os,sys import numpy as np import json sys.path.append('/opt/render') from tools import mysql from tools import bash from colorama import * init(autoreset=True) from tools.decorators import * ####################################################################...
{"hexsha": "b89331c197cea079a1417c1dbbb8058482bcf74d", "size": 2567, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "bashgu/NetVidSeg", "max_stars_repo_head_hexsha": "93d5549713497f77806f1589032270ff42c61327", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_...
(* seplog (c) AIST 2005-2013. R. Affeldt, N. Marti, et al. GNU GPLv3. *) (* seplog (c) AIST 2014-2018. R. Affeldt et al. GNU GPLv3. *) Require Import Div2 Even. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice. From mathcomp Require Import tuple. Require Import ssrZ ZArith_ext String_ext s...
{"author": "affeldt-aist", "repo": "seplog", "sha": "b08516d34f5dedd0aafbe77d8ef270fa838e8f85", "save_path": "github-repos/coq/affeldt-aist-seplog", "path": "github-repos/coq/affeldt-aist-seplog/seplog-b08516d34f5dedd0aafbe77d8ef270fa838e8f85/seplogC/POLAR_parse_client_hello_triple4.v"}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 10 15:02:51 2020 @author: parsotak """ import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset from mpl_toolkits.basemap import Basemap #Define input file infile = '/wx/storage/halpea17/wx272/20170909_erai.nc' #Read in the...
{"hexsha": "be8dcdd5e6052a8c94cb931f9827b3e7c2fdc5e3", "size": 1874, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_grib_2_10_20.py", "max_stars_repo_name": "Kyl67899/python-labs", "max_stars_repo_head_hexsha": "aafc6fc94837ee43c9ef2e1b103d86f80dfc9814", "max_stars_repo_licenses": ["FSFAP"], "max_stars_...
# Copyright 2019 D-Wave Systems Inc. # # 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 wri...
{"hexsha": "b305cde76e4f814cd51622fd34eaf9ee146ba063", "size": 4739, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_search.py", "max_stars_repo_name": "zeta1999/dwave-tabu", "max_stars_repo_head_hexsha": "2a6393c4e7444c0c60d9718840160c83eadb7c31", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
[STATEMENT] lemma SMP_subterms_subset: "subterms\<^sub>s\<^sub>e\<^sub>t M \<subseteq> SMP M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subterms\<^sub>s\<^sub>e\<^sub>t M \<subseteq> SMP M [PROOF STEP] proof [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>x. x \<sqsubseteq>\<^sub>s\<^sub>e\<^sub>t M \<L...
{"llama_tokens": 851, "file": "Stateful_Protocol_Composition_and_Typing_Typed_Model", "length": 10}
import numpy as np from sensors.msg import RawMeasurement from sensors.msg import ProcessedMeasurement def C_to_F(cel): return cel * 9/5 + 32 def F_to_C(far): return (far - 32) * 5/9 def process_measurement(measurement): proc_measurement = ProcessedMeasurement() proc_measurement.day = measurement.d...
{"hexsha": "df696beadf4d1bf544cf98ce2028276aad85f84c", "size": 987, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sensors/scripts/utils/analysis.py", "max_stars_repo_name": "IvanovicM/ros", "max_stars_repo_head_hexsha": "ef9f4b0661459f3911f5a937af74d18ac7170173", "max_stars_repo_licenses": ["MIT"], "max_st...
section \<open>Cones\<close> text \<open>We define the notions like cone, polyhedral cone, etc. and prove some basic facts about them.\<close> theory Cone imports Basis_Extension Missing_VS_Connect Integral_Bounded_Vectors begin context gram_schmidt begin definition "nonneg_lincomb c Vs b = (lincomb c...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Linear_Inequalities/Cone.thy"}
import math import numpy as np """ This function calculates the roots of the quadratic inequality for the Rh reuse factor. Parameters: lx - list of input sizes of the lstms. The size of this list is equal to the number of layers. lh - list of input sizes of the hidden layers. The size of this ...
{"hexsha": "8fbadd797079a59bb7c16b5b056dc3c3435e7089", "size": 1390, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/reuse_factors_examples.py", "max_stars_repo_name": "walkieq/LSTM-HLS", "max_stars_repo_head_hexsha": "f90bc769153e667eb8a30c7c4147bd53620f02bb", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The base image interface. """ import numpy as np from scipy import ndimage # Local imports from .image import Image from ..transforms.affines import to_matrix_vector from ..reference.coordinate_system...
{"hexsha": "96e358ba5b0d984090a93647829bb204053bc846", "size": 15070, "ext": "py", "lang": "Python", "max_stars_repo_path": "nipy/core/image/affine_image.py", "max_stars_repo_name": "neurospin/nipy", "max_stars_repo_head_hexsha": "cc54600a0dca1e003ad393bc05c46f91eef30a68", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# Copyright (c) 2018, Curious AI Ltd. All rights reserved. # # This work is licensed under the Creative Commons Attribution-NonCommercial # 4.0 International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to # Creative Commons, PO Box 1866, Mountain View...
{"hexsha": "f11dbac353b5cda43a1097feb2726b11f781ea2d", "size": 7325, "ext": "py", "lang": "Python", "max_stars_repo_path": "MT-CNV/mean_teacher/data.py", "max_stars_repo_name": "Wangzheaos/DARD-Net", "max_stars_repo_head_hexsha": "4b0dc7e87c82c7f6f5892c257fd397d7217fd7f1", "max_stars_repo_licenses": ["Unlicense"], "max...
[STATEMENT] lemma i0_less[simp]: "(0::enat) < n \<longleftrightarrow> n \<noteq> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (0 < n) = (n \<noteq> 0) [PROOF STEP] by (rule zero_less_iff_neq_zero)
{"llama_tokens": 95, "file": null, "length": 1}
[STATEMENT] lemma mreq_end2: "applied_rule_rev C x b = applied_rule_rev C x c \<Longrightarrow> applied_rule_rev C x (a#b) = applied_rule_rev C x (a#c)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. applied_rule_rev C x b = applied_rule_rev C x c \<Longrightarrow> applied_rule_rev C x (a # b) = applied_rule_r...
{"llama_tokens": 382, "file": "UPF_Normalisation", "length": 3}
# 1 "./libxc_master.F90" # 1 "<built-in>" # 1 "<command-line>" # 1 "./libxc_master.F90" !! Copyright (C) 2003-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch !! !! This program is free software; you can redistribute it and/or modify !! it under the terms of the GNU Lesser General Public License as published by !! the ...
{"hexsha": "30cefb7279f6fe574ec2a20f301d91056dd4148b", "size": 19638, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "libxc-2.2.0/src/libxc.f90", "max_stars_repo_name": "rdietric/lsms", "max_stars_repo_head_hexsha": "8d0d5f01186abf9a1cc54db3f97f9934b422cf92", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
# © 2021 Nokia # # Licensed under the BSD 3 Clause license # SPDX-License-Identifier: BSD-3-Clause import subprocess import numpy as np def gpuCount(): query = [ 'nvidia-smi', '--list-gpus' ] res = subprocess.run(query, stdout=subprocess.PIPE).stdout.decode('ascii')[0:-1] # Count ...
{"hexsha": "d1278720a9b2cf7634d0e16c7e1abcc4240843e4", "size": 1695, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/utils/gpu.py", "max_stars_repo_name": "nokia/integratedimputation", "max_stars_repo_head_hexsha": "ca72bda54cb66e99d79ff0b174cf8f99ccb554ba", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
""" varN(B::LogBinner[, lvl]) Calculates the variance/N of a given level in the Binning Analysis. """ function varN(B::LogBinner, lvl::Integer = _reliable_level(B)) n = B.count[lvl] var(B, lvl) / n end """ var(B::LogBinner[, lvl]) Calculates the variance of a given level in the Binning Analysis. """...
{"hexsha": "05b20af320f553d5a0d6594928488da6d487df5a", "size": 5231, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/log/statistics.jl", "max_stars_repo_name": "UnofficialJuliaMirror/BinningAnalysis.jl-b7192094-8e58-5052-a244-180a858778ee", "max_stars_repo_head_hexsha": "9eb6cf6ae6e623d76a778cc72311fb058cc751...
module Sessions using DataFrames, NaturalSort, DataStructures, HDF5 export PROCESSED_DATA_DIR, REGIONS, REGION_LABELS, Session, ClusterMetadata, sessionnames, readsession, patient, siteregion const RAW_DATA_DIR = joinpath(dirname(@__FILE__), "..", "raw") const PROCESSED_DATA_DIR = joinpath(dirname(@__FILE__), "..", "...
{"hexsha": "88f8523031e449051baab996f4969161f720cab0", "size": 3540, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Sessions.jl", "max_stars_repo_name": "simonster/Persistent-Single-Neuron-Activity-during-Working-Memory-in-the-Human-Medial-Temporal-Lobe", "max_stars_repo_head_hexsha": "4b46fef287b3d849695ec9...
import matplotlib.pyplot as plt from scipy.optimize import minimize from horsetailmatching import UncertainParameter, HorsetailMatching from horsetailmatching import UniformParameter, IntervalParameter from horsetailmatching.demoproblems import TP2 def main(): u1 = IntervalParameter(lower_bound=-1, upper_bound=1...
{"hexsha": "dca083cb9d6ec48804deec1ec7a114f49c649012", "size": 1378, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/mixed_uncertainties.py", "max_stars_repo_name": "lwcook/horsetail-matching", "max_stars_repo_head_hexsha": "f3d5f8d01249debbca978f412ce4eae017458119", "max_stars_repo_licenses": ["MIT"], ...
import pydevd pydevd.settrace('localhost', port=51234, stdoutToServer=True, stderrToServer=True) import os import sys import plyvel import numpy import matplotlib.pyplot as plt import numpy as np import leveldb # First compile the Datum, protobuf so that we can load using protobuf # This will create datum_pb2.py os.s...
{"hexsha": "c6c6928b89f50b1d25ae9956a3d6b9dd91b20a72", "size": 2343, "ext": "py", "lang": "Python", "max_stars_repo_path": "distanceMetricLearning/leveldbToNP.py", "max_stars_repo_name": "KareemYousrii/2015-DL-TIWafer", "max_stars_repo_head_hexsha": "5aa7d2ecfcfd3da95811a0a49c855ba1bcb3f034", "max_stars_repo_licenses":...
""" File name: extracted_features_gridsearch.py Author: Esra Zihni Date created: 29.04.2019 """ import numpy as np import sys import os import yaml import pickle import pandas as pd import pandas.core.indexes sys.modules['pandas.indexes'] = pandas.core.indexes import json import time import keras import tensorflow ...
{"hexsha": "994c12e38f2a4f62bbd27c7c76592e6520b353ab", "size": 7656, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/extracted_features_gridsearch.py", "max_stars_repo_name": "prediction2020/multimodal-classification", "max_stars_repo_head_hexsha": "0805d5b48b640e89ab942c5e44be22e2315a8079", "max_stars_repo...
""" Author: michealowen Last edited: 2019.9.20,Friday DBSCAN聚类,使用sklearn生成数据集 """ #encoding=UTF-8 import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.cluster import DBSCAN from queue import Queue from time import time from scipy.spatial import KDTree def genData(): ''' ...
{"hexsha": "6d7a021de2377ab8a53d3346c043e79afacab500", "size": 6468, "ext": "py", "lang": "Python", "max_stars_repo_path": "cluster/density/DBSCAN.py", "max_stars_repo_name": "michealowen/MachingLearning", "max_stars_repo_head_hexsha": "9dcc908f2d3e468390e5abb7f051b449b0ecb455", "max_stars_repo_licenses": ["Apache-2.0"...
/* * Copyright (C) 2019 LEIDOS. * * 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 w...
{"hexsha": "e0f6fa957c1c3b25cbd1bdd4f4cb9c4709a89a7e", "size": 32173, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "carma_wm/src/CARMAWorldModel.cpp", "max_stars_repo_name": "harderthan/carma-platform", "max_stars_repo_head_hexsha": "29921896a761a866db9cfee473f02a481d8bb9c9", "max_stars_repo_licenses": ["Apache-...
\documentclass[letterpaper]{article} \usepackage{common/ohpc-doc} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} % Include git variables \input{vc.tex} % Define Base OS and other local macros \newcommand{\baseOS}{CentOS8.4} \newcommand{\OSRepo}{CentOS\_8.4} \newcommand{\OSTree}{CentOS\_8} \newcommand{\OSTag}{el...
{"hexsha": "21cfca89cd5cb661964125cc18b1876a7feb5325", "size": 11277, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/recipes/install/rocky8/x86_64/xcat_stateful/slurm/steps.tex", "max_stars_repo_name": "viniciusferrao/ohpc", "max_stars_repo_head_hexsha": "edae86737aeeeee1a9d0c1e6a1ac7139d5fce971", "max_stars...
import os os.chdir('seqFISH_AllenVISp/') import numpy as np import pandas as pd import pickle import matplotlib matplotlib.use('qt5agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 import matplotlib.pyplot as plt #from matplotlib import cm import scipy.stats as st with open ('dat...
{"hexsha": "76d7f42aadff293229047298824135aa97f40b4b", "size": 5040, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/seqFISH_AllenVISp/Performance_evaluation.py", "max_stars_repo_name": "tabdelaal/SpaGE", "max_stars_repo_head_hexsha": "7533cbf2275c3049561e8a17b9f7866e0e324743", "max_stars_repo_licenses...
[STATEMENT] lemma wf\<^sub>s\<^sub>s\<^sub>t_prefix[dest]: "wf'\<^sub>s\<^sub>s\<^sub>t V (S@S') \<Longrightarrow> wf'\<^sub>s\<^sub>s\<^sub>t V S" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wf'\<^sub>s\<^sub>s\<^sub>t V (S @ S') \<Longrightarrow> wf'\<^sub>s\<^sub>s\<^sub>t V S [PROOF STEP] by (induct S rule: w...
{"llama_tokens": 169, "file": "Stateful_Protocol_Composition_and_Typing_Stateful_Strands", "length": 1}
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import cv2 import time EXP_ID = '2021-09-10 16:48:03.161207' # Load odometry data odom_addr = f'train/odometry/odometry_log_{EXP_ID}.csv' odom_data_df = pd.read_csv(odom_addr, delimiter=',') # Setup odometry as a image map_res = 10 min_...
{"hexsha": "9ca691fe1ba68201ccb13bdc8d57f7ee2b07a3c5", "size": 2879, "ext": "py", "lang": "Python", "max_stars_repo_path": "kairos_minerl/src/kairos_minerl/viz_odometry.py", "max_stars_repo_name": "viniciusguigo/kairos_minerl_basalt", "max_stars_repo_head_hexsha": "8f76e1d293dbcf62653ed3f7f326bd090a0af6f0", "max_stars_...
[STATEMENT] lemma vlrestriction_VLambda: "(\<lambda>a\<in>\<^sub>\<circ>A. f a) \<restriction>\<^sup>l\<^sub>\<circ> B = (\<lambda>a\<in>\<^sub>\<circ>A \<inter>\<^sub>\<circ> B. f a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. VLambda A f \<restriction>\<^sup>l\<^sub>\<circ> B = VLambda (A \<inter>\<^sub>\<circ...
{"llama_tokens": 136, "file": "CZH_Foundations_czh_sets_CZH_Sets_BRelations", "length": 1}
import tensorflow as tf from tensorflow.python.ops import variable_scope as vs import numpy as np import pickle import os,json from samples import read_clips from laplace_temporal_net import create_r3d os.environ['CUDA_VISIBLE_DEVICES'] = "0" gpus=[0] video_json_path = 'three_samples.json' data_root = '/home/pr606/P...
{"hexsha": "6a17d806ac31c4144395144b5f8e1b1ef7c3944d", "size": 6815, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/fetch_gpa_feat.py", "max_stars_repo_name": "shenqiang-Yuan/GPA", "max_stars_repo_head_hexsha": "ad8bb4540ef4126c817c5fe007dad93a5a7ddc2a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/** * Copyright 2015 Christian Dreher (dreher@charlydelta.org) * * 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 ...
{"hexsha": "648ac5077e3428d4520c74a82540ffdc37a39c43", "size": 11872, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Main.cpp", "max_stars_repo_name": "crgdreher/nddlgen-cli", "max_stars_repo_head_hexsha": "3efbde7ee95bd51f76ba3a067725bc0f5f3d010c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
#! /usr/bin/python # -*- coding: utf-8 -*- u""" Fast Nearest Neighbor Search on python using kd-tree author Atsushi Sakai usage: see test codes as below license: MIT """ import numpy as np import scipy.spatial class NNS: def __init__(self, data): # store kd-tree self.tree = scipy.spatial.cKDTr...
{"hexsha": "fa979d99d943c91e162afdc3a7ed34e0d14ca7ae", "size": 2121, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyfastnns.py", "max_stars_repo_name": "AtsushiSakai/pyfastnns", "max_stars_repo_head_hexsha": "d3baabba8d2639c6b065bcfcf756adc93b4e8326", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
import numpy as np from numba import jit from ..constants import Constants as c from .universal_propagate import propagateUniversal __all__ = [ "addLightTime", "addStellarAberration" ] MU = c.MU C = c.C @jit(["Tuple((f8[:,:], f8[:]))(f8[:,:], f8[:], f8[:,:], f8, f8, i8, f8)"], nopython=True, cache=True) def...
{"hexsha": "0636601bfcc2b9dabe271b7798b5b2c06b755633", "size": 4256, "ext": "py", "lang": "Python", "max_stars_repo_path": "thor/orbits/aberrations.py", "max_stars_repo_name": "KatKiker/thor", "max_stars_repo_head_hexsha": "ffc8ab3fbaa8af046f531e8111907a891998d14b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
using Knet # sample usage: # m128 = MLP([3644,128,1]) # mlprun(data; model=m128, epochs=20) # define a model type with weights and optimization params so we can # use the Adam optimizer which works faster than SGD: type MLP weights oparams function MLP(sizes; optimizer=Adam, winit=0.1, atype=Array{Float3...
{"hexsha": "bfc2c854f5151e76927d0327db8a52a4e98b2298", "size": 2455, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "mlp.jl", "max_stars_repo_name": "JuliaTagBot/melseg", "max_stars_repo_head_hexsha": "8f63c00516624be8625244fc64dcbfb26d5d5851", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_...
import argparse import numpy as np def quantize(data,pred,error_bound): radius=32768 diff = data - pred quant_index = (int) (abs(diff)/ error_bound) + 1 #print(quant_index) if (quant_index < radius * 2) : quant_index =quant_index>> 1 half_index = quant_index quant_index...
{"hexsha": "fc0880df6f1e2ecce1b350f11b3fbf397fb28950", "size": 2263, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantize.py", "max_stars_repo_name": "Meso272/PyTorch-VAE", "max_stars_repo_head_hexsha": "08c44bdcb30ba8795a7c0da5597af80c8c42e9f0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
[STATEMENT] lemma constant_function_eq': assumes "a \<in> carrier R" assumes "b \<notin> carrier R" shows "\<cc>\<^bsub>a\<^esub> b = undefined" [PROOF STATE] proof (prove) goal (1 subgoal): 1. constant_function (carrier R) a b = undefined [PROOF STEP] by (simp add: constant_function_closed assms(1) assms(2) fun...
{"llama_tokens": 127, "file": "Padic_Ints_Function_Ring", "length": 1}
# wczytanie zestawu danych import numpy as np dataset = 'australian' dataset = np.genfromtxt("%s.csv" % (dataset), delimiter=",") X = dataset[:, :-1] y = dataset[:, -1].astype(int) # zdefiniowanie klasyfikatorów from sklearn.naive_bayes import GaussianNB from sklearn.neighbors import KNeighborsClassifier from sklearn...
{"hexsha": "3a04c28800d08731619b6a9e8d1d97f298fcc5b9", "size": 3150, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/kod4.py", "max_stars_repo_name": "metsi/metsi.github.io", "max_stars_repo_head_hexsha": "4a195236d73ea90b46be1662c45ab473c893af29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/* * This file is part of the Sequoia MSO Solver. * * Copyright 2012 Alexander Langer, Theoretical Computer Science, * RWTH Aachen University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. *...
{"hexsha": "a1ae32591427d51ac3cfc805d328c18ce0e8eea9", "size": 2020, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/leaf_game_factory.hpp", "max_stars_repo_name": "sequoia-mso/sequoia-core", "max_stars_repo_head_hexsha": "d2a6a461ffbe38dc8abb005b2c8f1f3bc1dc2bbe", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#!/usr/bin/env python # # This software is distributed under BSD 3-clause license (see LICENSE file). # # Authors: Sergey Lisitsyn from numpy import * from numpy.random import randn # generate some overlapping training vectors num_vectors=100 vec_distance=1 traindat=concatenate((randn(2,num_vectors)-vec_distance, ra...
{"hexsha": "e0c311e74457a139b8e119abaae4c8964d777752", "size": 2821, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/undocumented/python/modelselection_random_search_liblinear.py", "max_stars_repo_name": "shiyi001/shogun", "max_stars_repo_head_hexsha": "287f02d11d5914ded2d410ab9c6f38712e11ca2b", "max_st...
using Fn using MacroTools using Test @testset "Fn.jl" begin @testset "no _ creates 0-argument function" begin @test @capture(Fn.fn(:(exp(5 * √π))), function () exp(5 * √π) end) end @testset "_ creates single argument function" begin @test @capture(Fn.fn(:(5 + _)), function (x_) 5 + x_ end...
{"hexsha": "75fb2bd64bb6242217876115bc38623db6bff6ac", "size": 1692, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "cqql/Fn.jl", "max_stars_repo_head_hexsha": "b6784f1b5b8a9592e56decaea3d68d8a0f942944", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['mathtext.fontset'] = 'cm' colors = plt.rcParams['axes.prop_cycle'].by_key()['color'] cm = plt.get_cmap('Set1') deficits_nice = ['Gait speed', 'Dom grip str', 'Ndom grip str', 'ADL score','IADL score', '5 Chai...
{"hexsha": "e3ac5175a6226bbcc5b1b766fa48af6c07c5a9ca", "size": 6013, "ext": "py", "lang": "Python", "max_stars_repo_path": "Plotting_code/plot_ELSA_missing.py", "max_stars_repo_name": "Spencerfar/djin-aging", "max_stars_repo_head_hexsha": "f6513226e879e6061996d819b4de0e2873860fbc", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np @np.vectorize def vectorized_get(dictionary, key): """ Helper vectorized function to get keys from a dictionary. """ return dictionary.get(key, -1) def is_iter(something): """ Helper vectorized function to test if something is an iterable other than a str. ...
{"hexsha": "1171bd9deec381480e4c6fafcbc2ec974f7a239d", "size": 1332, "ext": "py", "lang": "Python", "max_stars_repo_path": "mapsbr/helpers/utils.py", "max_stars_repo_name": "phelipetls/mapsbr", "max_stars_repo_head_hexsha": "36e2637c612d333a327199fd0687dbba09e964ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python # vim: fdm=indent ''' author: Fabio Zanini date: 05/08/13 content: Correct the allele frequencies comparing read types and write to file. ''' # Modules import subprocess as sp import argparse from operator import itemgetter import numpy as np from hivwholeseq.sequencing.samples impor...
{"hexsha": "2f37e663a317d2d653f74ae96ded391cbd9bca32", "size": 4179, "ext": "py", "lang": "Python", "max_stars_repo_path": "hivwholeseq/sequencing/filter_allele_frequencies.py", "max_stars_repo_name": "neherlab/hivwholeseq", "max_stars_repo_head_hexsha": "978ce4060362e4973f92b122ed5340a5314d7844", "max_stars_repo_licen...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct AccountSasParameters <: SwaggerModel signedServices::Any # spec type: Union{ Nothing, String } # spec name: signedServices signedResourceTypes::Any # spec ...
{"hexsha": "91bb4d90d497e89b11748be1396cb19fad10ea00", "size": 4798, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Storage/StorageManagementClient/model_AccountSasParameters.jl", "max_stars_repo_name": "JuliaComputing/Azure.jl", "max_stars_repo_head_hexsha": "0e2b55e7602352d86bdf3579e547a74a9b5f44f8", "max_...
from collections import Counter import numpy as np import sklearn from imblearn.base import BaseSampler class GlobalCS(BaseSampler): """ Global CS is an algorithm that equalizes number of samples in each class. It duplicates all samples equally for each class to achieve majority class size """ d...
{"hexsha": "8991e0b22c105cedfbdcffdda36902103e6b31aa", "size": 2296, "ext": "py", "lang": "Python", "max_stars_repo_path": "multi_imbalance/resampling/global_cs.py", "max_stars_repo_name": "NaIwo/multi-imbalance", "max_stars_repo_head_hexsha": "237c5842b27a58edfdfb88073faa0021eb243348", "max_stars_repo_licenses": ["MIT...
import numpy import theano from theano import scalar, gof from theano.tests.unittest_tools import SkipTest, assert_allclose from theano.tensor.tests import test_elemwise from .config import mode_with_gpu, test_ctx_name from .test_basic_ops import rand_gpuarray from ..elemwise import (GpuElemwise, GpuDimShuffle, ...
{"hexsha": "1c9a2b1fb969c88a2e7c12fae35a4f466207db68", "size": 9912, "ext": "py", "lang": "Python", "max_stars_repo_path": "theano/sandbox/gpuarray/tests/test_elemwise.py", "max_stars_repo_name": "oplatek/Theano", "max_stars_repo_head_hexsha": "09605e7cae876e15c5502c4edaba6a9644c50c11", "max_stars_repo_licenses": ["BSD...
import csv import nltk import pandas as pd import numpy as np import spacy from nltk.tokenize import word_tokenize import string def load_book(book_path, lower=False): ''' Reads in a novel from a .txt file, and returns it in (optionally lowercased) string form Parameters ---------- book_path ...
{"hexsha": "4330fe6a853c314c59d81009c80518c0e93ffaf9", "size": 9222, "ext": "py", "lang": "Python", "max_stars_repo_path": "bookworm/build_network.py", "max_stars_repo_name": "harrisonpim/bookworm", "max_stars_repo_head_hexsha": "d5fffe9630079236a64708f767186aa0748de4cf", "max_stars_repo_licenses": ["MIT"], "max_stars_...
module mod_output use mod_error use mod_graph implicit none save private ! public procedures public :: write_input_graph, & write_graph_paths ! private variables integer, parameter :: fout_numb = 700 character(*), parameter :: fout_name = "graph.out" contains !!! Public !!!!!!...
{"hexsha": "167dc95c954a68bdc0753cbbe70e39db7fb1e867", "size": 2363, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mod_output.f90", "max_stars_repo_name": "marberti/pathgen", "max_stars_repo_head_hexsha": "9ba8df5c1577492d49ea8423516f477bb8dfbfb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python # coding: utf-8 # # Problem 3 - Purchasing Paint # In[98]: from tqdm import tqdm import numpy as np import os # Sometimes an assertion fails. Just shuffle the seed again when that happens. #ostrich rng = np.random.default_rng(42838858382) # In[99]: class Case: def __init__(self, name,...
{"hexsha": "96b463f5749d3ae6cd36250207a5aa5bc57d2908", "size": 5355, "ext": "py", "lang": "Python", "max_stars_repo_path": "paint/data/generator.py", "max_stars_repo_name": "acio-olympiad/ACIO2022Contest2", "max_stars_repo_head_hexsha": "53c7ced66ae916b118cfab8c72e4531dd08defd2", "max_stars_repo_licenses": ["MIT"], "ma...
import math from dataclasses import dataclass from typing import Dict import numpy as np import jax.numpy as jnp from jax import random, ops import nltk from transformers.tokenization_utils_base import PreTrainedTokenizerBase from data_collator import DataCollatorForTextInfilling, SentenceTokenize, DataCollatorForSen...
{"hexsha": "50c154d549f4bde8d2749167f7a9d2e0871006ce", "size": 981, "ext": "py", "lang": "Python", "max_stars_repo_path": "sentence_permutation.py", "max_stars_repo_name": "patrickvonplaten/rotobart", "max_stars_repo_head_hexsha": "eb1482677889b6de3f1708621ad8d2da263afadb", "max_stars_repo_licenses": ["MIT"], "max_star...
#! /opt/anaconda3/envs/align/bin/python # -*- coding: utf-8 -*- # Copyright 2021 The align-experiment 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 # # ht...
{"hexsha": "c134f0ac889bbcca03c8fa629b1fd2015e4e019e", "size": 5847, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/processing/process_utils.py", "max_stars_repo_name": "kaarinaaho/learning_alignment", "max_stars_repo_head_hexsha": "605f730834b7ef2d57b01eb519a10bf60c93f7bc", "max_stars_repo_licenses": ["MI...
\section{Analysis of soft matter scattering} The use of neutron and X-ray scattering experiments for the study of soft matter is well developed, with early research into the structure of phospholipid monolayers by reflectometry methods being conducted in the late 1970s by Albrecht \emph{et al.}\autocite{albrecht_polymo...
{"hexsha": "32f447900e6636e9c079048b45e641ad91e49165", "size": 4458, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "reports/chapters/introduction/scattering.tex", "max_stars_repo_name": "arm61/thesis", "max_stars_repo_head_hexsha": "4c76e837b1041472a5522427de0069a5a28d40c9", "max_stars_repo_licenses": ["CC-BY-4.0...
{-# OPTIONS --sized-types #-} module SList.Order {A : Set}(_≤_ : A → A → Set) where open import List.Sorted _≤_ open import Size open import SList data _*≤_ : {ι : Size} → A → SList A {ι} → Set where genx : {ι : Size}{b : A} → (_*≤_) {↑ ι} b snil gecx : {ι : Size}{b x : A}{xs : SList A {ι}} ...
{"hexsha": "f1aab2fd78ddcd60d189b7079ad13e2aa3dac2f9", "size": 678, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda/SList/Order.agda", "max_stars_repo_name": "bgbianchi/sorting", "max_stars_repo_head_hexsha": "b8d428bccbdd1b13613e8f6ead6c81a8f9298399", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
% $Id$ % % ObitSingle dish and OTF/GBT Tables class definitions % %\def\section #1.#2.{\medskip\leftline{\bf #1. #2.}\smallskip} %\def\bfitem #1#2{{{\bf (#1)}}{\it #2}} \def\bfi #1#2{{\bf #1:}{ #2}\par} \def\extname #1#2{ {\bf 1} Extension Name {\it #2}\smallskip} %\def\tabname #1#2{\bfitem 1{#1 Table Name #2}} \def\...
{"hexsha": "735e5888d8ce5b1d0cb2f5da1a6d12e534b7530d", "size": 65928, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ObitSystem/ObitSD/doc/ObitSD.tex", "max_stars_repo_name": "sarrvesh/Obit", "max_stars_repo_head_hexsha": "e4ce6029e9beb2a8c0316ee81ea710b66b2b7986", "max_stars_repo_licenses": ["Linux-OpenIB"], "ma...
import mujoco as mj import numpy as np from mujoco.glfw import glfw from mujoco_base import MuJoCoBase # Define states for the finite state machine FSM_HOLD = 0 FSM_SWING1 = 1 FSM_SWING2 = 2 FSM_STOP = 3 class LegSwing(MuJoCoBase): def __init__(self, xml_path): super().__init__(xml_path) self.si...
{"hexsha": "cb9bd05abed9219f6269694466b643224693d646", "size": 4828, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_leg_swing.py", "max_stars_repo_name": "BolunDai0216/PyMuJoCoBase", "max_stars_repo_head_hexsha": "3d9250feacd6129e44d99342663616aaf06c5d43", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import pygame from src.pgassets import pgObject class pgSlider(pgObject): def __init__(self, pos, size): pgObject.__init__(self, pos, size) self.slider_rect = pygame.Rect(pos, (size[0] * 0.8, 4)) self.slider_rect.center = self.rect.center self.slider_button = se...
{"hexsha": "d8f21b8da3c790ee3e72d31ddcbc78ba5837a507", "size": 1135, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pgassets/common/pgSlider.py", "max_stars_repo_name": "Blackdevil132/machineLearning", "max_stars_repo_head_hexsha": "de048bb1473994052f8ed1afb11a15b7833b506d", "max_stars_repo_licenses": ["MIT...
from functools import partial import jax import jax.numpy as jnp from e3nn_jax import IrrepsData, index_add from e3nn_jax.util import prod from jax import lax @partial(jax.jit, static_argnums=(1, 2, 3, 4)) def lowpass_filter(input, scale, strides, transposed=False, steps=(1, 1, 1)): r"""Lowpass filter for 3D fie...
{"hexsha": "77c3311ba025cb0ae67c1a2970b4c6c9f8480f95", "size": 6488, "ext": "py", "lang": "Python", "max_stars_repo_path": "e3nn_jax/experimental/voxel_pooling.py", "max_stars_repo_name": "yilunliao/e3nn-jax", "max_stars_repo_head_hexsha": "dfe472eb3dcc58abb07ae91eedc39f6fa6926bc8", "max_stars_repo_licenses": ["Apache-...
import packages.mdp.gridworld as gw import numpy as np def test_mapcreation_booleanWalls(): walls = np.array([[0, 1, 0], [0, 0, 0], [0, 0, 1]]) walls = walls.astype('bool') world = gw.Gridworld(walls) desired = np.array([[0, np.nan, 1], [2, 3, 4], [5, 6, np.nan]]) assert np.allclose(world.map, des...
{"hexsha": "fbde81ddcbafc76549391e85dad56c1db85f9514", "size": 763, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_gridworld.py", "max_stars_repo_name": "bastianalt/correlation_priors_for_rl", "max_stars_repo_head_hexsha": "9a98f345ac10e9767d854cd7a9681057a50a9737", "max_stars_repo_licenses": ["MIT"],...
import torch import numpy as np import pytest import deepspeed from deepspeed.ops.adagrad import DeepSpeedCPUAdagrad from deepspeed.ops.op_builder import CPUAdagradBuilder if not deepspeed.ops.__compatible_ops__[CPUAdagradBuilder.NAME]: pytest.skip("cpu-adagrad is not compatible") def check_equal(fi...
{"hexsha": "b8a025fe02a8145c1f4295728e8b1d4453c89275", "size": 4861, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_cpu_adagrad.py", "max_stars_repo_name": "Seong-yeop/DeepSpeed", "max_stars_repo_head_hexsha": "76f2b5e51d8cf68d1966dceaf1a562a6f02d73fb", "max_stars_repo_licenses": ["MIT"], "max_s...
# libraries import argparse import logging from google.cloud import storage import joblib import numpy as np import pandas as pd import pickle from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import GridSearchCV from sklearn.model_selection import KFold def run(argv=None): # downlo...
{"hexsha": "3fb3372f93717899061ede3b655307d8c458bf35", "size": 1953, "ext": "py", "lang": "Python", "max_stars_repo_path": "pitch-predictor/answers/components/trainRF/train_rf.py", "max_stars_repo_name": "data-describe/awesome-data-science-models", "max_stars_repo_head_hexsha": "aa9b3aa8137a30b47fa044c7b4db46568c0d6316...
import multiprocessing as mp import random import numpy as np import nltk from nltk.corpus import stopwords import csv import gzip import pandas as pd from nltk.corpus import wordnet as wn from nltk.util import ngrams from flashtext import KeywordProcessor from seqeval.metrics import accuracy_score, classification_repo...
{"hexsha": "1871ac557871c8a015232888b9113bbab6a3ad0f", "size": 1059, "ext": "py", "lang": "Python", "max_stars_repo_path": "leaqi/src/oracles.py", "max_stars_repo_name": "xkianteb/leaqi", "max_stars_repo_head_hexsha": "924435590e74421ed16488429056f26747c99421", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12,...
import pandas as pd import numpy as np import math from tensorflow.keras.models import load_model from agents.agent import Agent from agents.meter import Meter from agents.prediction_market_adapter import NUM_PREDICTIONS, ACCOUNT_0 class LstmMultiAgent(Agent): """Agent that uses multivariate LSTM with private a...
{"hexsha": "d3c5696945946171234c8e3fba9de0d67a5dfbca", "size": 2759, "ext": "py", "lang": "Python", "max_stars_repo_path": "agent/agents/lstm_multi_agent.py", "max_stars_repo_name": "rampopat/charje", "max_stars_repo_head_hexsha": "3af178bd72800e339c45637356440780c3b0563a", "max_stars_repo_licenses": ["MIT"], "max_star...
The Peoples Vanguard of Davis (http://davisvanguard.org/ link) is a political blogs blog that was launched in July 2006. It is dedicated to exposing what it calls the dark underbelly of the Peoples Republic of Davis by writing about things that arent completely reported in the Davis Enterprise mainstream press. Its ...
{"hexsha": "cf6db6bbea706d55673a7747af120a5f47d45a64", "size": 31439, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/The_People%27s_Vanguard_of_Davis.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MI...
function t = isascii(c) %ISASCII True for decimal digits. % % For a string C, ISASCII(C) is 1 for any ASCII character code between 0 % and 127, inclusive, and 0 otherwise. % % See also: ISALNUM, ISALPHA, ISDIGIT, ISLOWER, ISPRTCHR, ISUPPER, % ISXDIGIT. % Author: Peter J. Acklam % Time-stamp: 2002-03-...
{"author": "CovertLab", "repo": "WholeCell", "sha": "6cdee6b355aa0f5ff2953b1ab356eea049108e07", "save_path": "github-repos/MATLAB/CovertLab-WholeCell", "path": "github-repos/MATLAB/CovertLab-WholeCell/WholeCell-6cdee6b355aa0f5ff2953b1ab356eea049108e07/lib/util/matutil/isascii.m"}
! ################################################################### ! Copyright (c) 2013-2019, Marc De Graef Research Group/Carnegie Mellon University ! All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are...
{"hexsha": "5f2c5477b39a13b6b4491e3b048eac4687c85d86", "size": 4630, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/Utilities/EMmkxtal.f90", "max_stars_repo_name": "ZachClayburn/EMsoft", "max_stars_repo_head_hexsha": "5852e630fd0ce6c9538d7c0b7b1653dda28d0f1f", "max_stars_repo_licenses": ["Unlicense"], ...
/* vim:set ts=3 sw=3 sts=3 et: */ /** * Copyright © 2008-2013 Last.fm Limited * * This file is part of libmoost. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, ...
{"hexsha": "ad3bd424b05bb0771c3ccb8d77e43202e90971af", "size": 3966, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/moost/io/detail/helper_win32.hpp", "max_stars_repo_name": "lastfm/libmoost", "max_stars_repo_head_hexsha": "895db7cc5468626f520971648741488c373c5cff", "max_stars_repo_licenses": ["MIT"], "ma...
import os import pickle import jieba import operator import statistics import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager as font_manager from datetime import datetime from collections import Counter from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator from...
{"hexsha": "3e529828b07347ebe33d57409b34a62103117a24", "size": 8757, "ext": "py", "lang": "Python", "max_stars_repo_path": "final_demo/modules.py", "max_stars_repo_name": "A2Zntu/HW0_Political_News_Analysis", "max_stars_repo_head_hexsha": "898c593ee2ed514a0052edd672a44ec3c68bb9fd", "max_stars_repo_licenses": ["MIT"], "...
import os import sys from pathlib import Path _package_path = Path(__file__).parent.absolute() _package_search_path = _package_path.parent sys.path.append(str(_package_search_path)) import json import numpy as np import h5py from data.vsum_tool import generate_summary, evaluate_summary # example usage: python compu...
{"hexsha": "56529ea8c314e61a4bacc7fb46b55c04c44a2764", "size": 2543, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/compute_fscores.py", "max_stars_repo_name": "jongwookyi/AC-SUM-GAN", "max_stars_repo_head_hexsha": "2408d231f316be1265cda2abf231a21a2a1f5399", "max_stars_repo_licenses": ["FSFAP"], "max...
[STATEMENT] lemma const_res_subseq_prop_1: assumes "s \<in> closed_seqs Zp" shows "(\<forall>m.(const_res_subseq k s) m k = (const_res k s) )" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>m. const_res_subseq k s m k = const_res k s [PROOF STEP] using const_res_subseq_prop_0[of s] const_res_def[of k s...
{"llama_tokens": 349, "file": "Padic_Ints_Zp_Compact", "length": 2}
import numpy as np class Method: def __call__(self, x): raise NotImplementedError() def disable(self, index, x): raise NotImplementedError def __repr__(self): raise NotImplementedError class Max(Method): def __call__(self, x): return x.argmax() def disable(self...
{"hexsha": "8e6112ccc4d5760092e699a7f8dd640290964132", "size": 1298, "ext": "py", "lang": "Python", "max_stars_repo_path": "griffig/infer/selection.py", "max_stars_repo_name": "pantor/griffig", "max_stars_repo_head_hexsha": "0b10ef5d69902b14a4d648a809a51933a8f5fe8a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import matplotlib.pyplot as plt import pandas as pd from keras.models import Sequential from keras.layers import Dense import pickle from sklearn.model_selection import KFold from sklearn.model_selection import train_test_split from keras.layers import Dropout from sklearn.preprocessing import MinMax...
{"hexsha": "7ff1c1bbe7f9c7e18674f2e9a439193de6c243a8", "size": 6602, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/hyperparameter_search.py", "max_stars_repo_name": "jbae11/depletion_rom", "max_stars_repo_head_hexsha": "06d68465e81be13de5b6d6c8c8030a8ae9315b1b", "max_stars_repo_licenses": ["BSD-3-Clause...
import struct import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation import numpy as np import pyaudio plt.rcParams['toolbar'] = 'None' class LiveViewer(object): def __init__(self, approx_fps, border_color): self.pause_time = 1 / approx_fps self.fig = plt.figure() ...
{"hexsha": "1f49796f67a87277d01e1a137aa78e3ff9112d4c", "size": 4047, "ext": "py", "lang": "Python", "max_stars_repo_path": "synethesia/network/io/live_viewer.py", "max_stars_repo_name": "RunOrVeith/SyNEThesia", "max_stars_repo_head_hexsha": "0ef5de759b4bf74cb318fc5e6e9be64520b8faf5", "max_stars_repo_licenses": ["MIT"],...
import os import cv2 from pathlib import Path import numpy as np from PIL import Image import torch from torch.utils.data import Dataset, DataLoader, random_split from torchvision import transforms, datasets import torchvision.transforms.functional as tf from albumentations import (Compose, RandomCrop, Resize, Horizont...
{"hexsha": "d2e4278a34917a669221a32f1061736a62744c1f", "size": 3639, "ext": "py", "lang": "Python", "max_stars_repo_path": "RGB_Segmentation/data/Carvana_Dataset/ValDS.py", "max_stars_repo_name": "JonnyD1117/RGB-D-Plant-Segmentation", "max_stars_repo_head_hexsha": "b98eb0f32c27205abc9801eca4b2ad3f61ad80d8", "max_stars_...
#!/usr/bin/env python # _*_ coding:utf-8 _*_ from __future__ import division import os import numpy as np import argparse from glob import glob from pose_evaluation_utils import * import sys parser = argparse.ArgumentParser() parser.add_argument("--gtruth_dir", type=str, help='Path to the directory with ground-trut...
{"hexsha": "184ce84f652a9e02c5db0e134297d16f17b8c077", "size": 1413, "ext": "py", "lang": "Python", "max_stars_repo_path": "kitti_eval/eval_pose_all.py", "max_stars_repo_name": "xuyufan936831611/vo_imu", "max_stars_repo_head_hexsha": "8a5753384b4a5c08dc83edf718d76a2ac308a298", "max_stars_repo_licenses": ["MIT"], "max_s...
// Copyright Carl Philipp Reh 2009 - 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef FCPPT_CONTAINER_GRID_POS_ITERATOR_DECL_HPP_INCLUDED #define FCPPT_CONTAINER_GRID_POS_ITERA...
{"hexsha": "3dcc752f29617ed49f0b814406a3235893816c9b", "size": 2171, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/fcppt/container/grid/pos_iterator_decl.hpp", "max_stars_repo_name": "vinzenz/fcppt", "max_stars_repo_head_hexsha": "3f8cc5babdee178a9bbd06ca3ce7ad405d19aa6a", "max_stars_repo_licenses": ["BS...
""" This module evaluates the results from multiple runs and generates plots. """ import csv import os from itertools import product from pprint import pprint import matplotlib.pyplot as plt import numpy as np import pandas as pd from matplotlib import cycler from data import read_compas class Evaluation(object): ...
{"hexsha": "b2958b0a35cb2f64879e5aeba35a7be9e5a42cc9", "size": 19394, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/src/evaluation.py", "max_stars_repo_name": "nikikilbertus/blind-justice", "max_stars_repo_head_hexsha": "2344609e55a2af20396ec042627ffed368e01e56", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python # -*- coding: utf-8 -*- # License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised)) # Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia # Copyright (c) 2022, QuatroPe # All rights reserved. # ============================================================================= # D...
{"hexsha": "d3410a8d49cb4643fe3aff9c3851c453a0fb4f06", "size": 2962, "ext": "py", "lang": "Python", "max_stars_repo_path": "skcriteria/preprocessing/increment.py", "max_stars_repo_name": "leliel12/scikitcriteria", "max_stars_repo_head_hexsha": "f13a75b5a39cd2d3db30a37b69e61a2814a5cea4", "max_stars_repo_licenses": ["BSD...
# imports import matplotlib from matplotlib import pyplot as plt import numpy as np from datetime import datetime import urllib.request # the module we'll need import shutil # 1. DOWNLOAD DATA from the web url = 'http://cdn.knmi.nl/knmi/map/page/seismologie/all_induced.csv' # the url ...
{"hexsha": "47e79c42c249a91117d8f070255794830d60cabf", "size": 3568, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_visualisation/scatter_plot.py", "max_stars_repo_name": "ddempsey/python_for_geoscientists", "max_stars_repo_head_hexsha": "ac3e3e9951b530ecd5f0ed3128083edd4f55b2c0", "max_stars_repo_licenses": [...
import unittest import numpy as np from coremltools.models import datatypes, MLModel from coremltools.models.neural_network import NeuralNetworkBuilder class BasicNumericCorrectnessTest(unittest.TestCase): def test_undefined_shape_single_output(self): W = np.ones((3,3)) input_features ...
{"hexsha": "56968be924239642c19de139f36c77d9f7112c97", "size": 1097, "ext": "py", "lang": "Python", "max_stars_repo_path": "coremltools/test/test_nn_builder.py", "max_stars_repo_name": "Vijayrajsinh/Core-ML", "max_stars_repo_head_hexsha": "b103f513cfd42cdf5b60f6261448d1ce667f590b", "max_stars_repo_licenses": ["BSD-3-Cl...
import os import csv import cv2 import numpy as np # for np.array() np.append() from datetime import datetime # print timestamps # for loss history visualization image import matplotlib; matplotlib.use('agg') import matplotlib.pyplot as plt from scipy import ndimage # to convert to RBG due to np.imread reading in BG...
{"hexsha": "848d408ebe7d89625baf89d47b03ff7ca1de3dd1", "size": 7168, "ext": "py", "lang": "Python", "max_stars_repo_path": "commonFunctions_v14.py", "max_stars_repo_name": "remichartier/014_selfDrivingCarND_BehavioralCloningProject", "max_stars_repo_head_hexsha": "1dcaa7c5a937929d4481e5efbf7ccc856c04c4ff", "max_stars_r...
from phylo._core.phylogenytree import * import networkx as nx import pytest as pt def dummy_graph(): G = nx.DiGraph() G.add_node('0', label = 'sabbia') G.add_node('1', label = 'pollo,boh') G.add_node('2', label = 'sBin') G.add_edge('0', '1') G.add_edge('0', '2') return G def dummy_tree(): ...
{"hexsha": "6457e6de343a068d85fc9162f0b439bb24b9ed25", "size": 2838, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_phylogenytree.py", "max_stars_repo_name": "plastic-phy/plastic", "max_stars_repo_head_hexsha": "101dcfd2c4e32be432d46d89ab151f48e34d6458", "max_stars_repo_licenses": ["MIT"], "max_...
from copy import copy import numpy as np class IndicatorBase(object): def __init__(self, marketevent): self.instrument = None self.preload_bar_list = [] self.instrument = marketevent.instrument self.iteral_buffer = marketevent.feed.iteral_buffer self.bar_list = copy(marke...
{"hexsha": "d4ae48090d025328df9db7655269ca599daed187", "size": 859, "ext": "py", "lang": "Python", "max_stars_repo_path": "OnePy/indicators/indicatorbase.py", "max_stars_repo_name": "sibuzu/OnePy", "max_stars_repo_head_hexsha": "464fca1c68a10f90ad128da3bfb03f05d2fc24bc", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
##################################################### ## Read bag from file ## ##################################################### import pyrealsense2 as rs import numpy as np import cv2 import argparse import os import shutil from mmcv import ProgressBar def parse_args(): # Create...
{"hexsha": "28524cd2aade959f02baa7c193badd93a4b9ad15", "size": 7544, "ext": "py", "lang": "Python", "max_stars_repo_path": "gradslam/utils/convert_bagfile.py", "max_stars_repo_name": "chuong98/gradslam", "max_stars_repo_head_hexsha": "4f744c54605980aa6e5a5ef3e3b6a04db0fe6597", "max_stars_repo_licenses": ["MIT"], "max_s...
using SimpleCTF using Test @testset "SimpleCTF.jl" begin # Write your tests here. @test isapprox(SimpleCTF.wavelength_from_voltage(200), 2.5079, atol=1e-4) @test isapprox(SimpleCTF.wavelength_from_voltage(300), 1.9687, atol=1e-4) end
{"hexsha": "6dcb7e7c7b4240ddffc22e0786cd0c21fd2c37a2", "size": 248, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "alberttxu/SimpleCTF.jl", "max_stars_repo_head_hexsha": "e5052ef99274ffd09952c240fd86598f07a5ce54", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
[STATEMENT] lemma fls_X_conv_shift_1: "fls_X = fls_shift (-1) 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fls_X = fls_shift (- 1) 1 [PROOF STEP] by (intro fls_eqI) simp
{"llama_tokens": 91, "file": null, "length": 1}
#encoding=utf-8 import argparse from distutils.dir_util import copy_tree import os def is_valid_file(parser, arg): if not os.path.exists(arg): parser.error("The file %s does not exist!" % arg) else: return arg parser = argparse.ArgumentParser(description="Easy trainable text generation RNN mo...
{"hexsha": "15cee439caedbe704ac7a68f38db94b80987d70d", "size": 13740, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "artificialis-ai/rnn-training", "max_stars_repo_head_hexsha": "0e38be1fce7e7c76e8653306fff1dced8565f48e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
""" Point collocation method, or regression based polynomial chaos expansion builds open the idea of fitting a polynomial chaos expansion to a set of generated samples and evaluations. The experiment can be done as follows: - Select a :ref:`distributions`:: >>> distribution = chaospy.Iid(chaospy.Normal(0, 1), 2) ...
{"hexsha": "94fa1a73f1b145ed7131d08922c5dd14dafa7c5f", "size": 4917, "ext": "py", "lang": "Python", "max_stars_repo_path": "chaospy/regression.py", "max_stars_repo_name": "lblonk/chaospy", "max_stars_repo_head_hexsha": "1759a4307c6134b74ce63ff44973195f1e185f94", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...