text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
""" Created on 28 December 2020 @author: Peter Corke """ import numpy.testing as nt import roboticstoolbox as rtb import numpy as np import spatialmath.base as sm import unittest from roboticstoolbox import Bug2, DXform, loadmat from roboticstoolbox.mobile.bug2 import edgelist from roboticstoolbox.mobile.landmarkmap...
{"hexsha": "b2ca5514c200ba98e3dc2de55a1d9ea658a0a118", "size": 14217, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mobile.py", "max_stars_repo_name": "LabRobPL/robotics-toolbox-python", "max_stars_repo_head_hexsha": "4fe4d8a23bda77f5fde39c5d7b53dc953c2a07dd", "max_stars_repo_licenses": ["MIT"], "ma...
Require Import Rupicola.Lib.Api. Section Gallina. Definition linkedlist A : Type := list A. Definition ll_hd {A} : A -> linkedlist A -> A := hd. Definition ll_next {A} : linkedlist A -> linkedlist A := tl. End Gallina. Section Separation. Context {width: Z} {BW: Bitwidth width} {word: word.word width} {mem:...
{"author": "mit-plv", "repo": "rupicola", "sha": "3f59b3d2404ce425ddf4fd55ad2314996a573dc3", "save_path": "github-repos/coq/mit-plv-rupicola", "path": "github-repos/coq/mit-plv-rupicola/rupicola-3f59b3d2404ce425ddf4fd55ad2314996a573dc3/src/Rupicola/Examples/LinkedList/LinkedList.v"}
! ! AtmProfile_to_LBLinput ! ! Program to convert AtmProfile data into LBL input files. ! ! ! CREATION HISTORY: ! Written by: Paul van Delst, 09-Jul-2010 ! paul.vandelst@noaa.gov ! PROGRAM AtmProfile_to_LBLinput ! ------------------ ! Environment set up ! ------------------ ! M...
{"hexsha": "3e6f60e3f9edb48473ceffe73fe2df9abb9d0010", "size": 2872, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/TauProd/LBL/input/AtmProfile_to_LBLinput/AtmProfile_to_LBLinput.f90", "max_stars_repo_name": "hsbadr/crtm", "max_stars_repo_head_hexsha": "bfeb9955637f361fc69fa0b7af0e8d92d40718b1", "max_sta...
\documentclass{article} \usepackage{enumerate} \usepackage{amsmath, amsthm, amssymb} \usepackage[margin=1in]{geometry} \usepackage[parfill]{parskip} \DeclareMathOperator*{\argmax}{arg\,max} \title{Econ C103 Problem Set 5} \author{Sahil Chinoy} \date{February 28, 2017} \begin{document} \maketitle{} \subsection*{Exerc...
{"hexsha": "fdd5864228cc169be8a783fe22f4e53afb664dc4", "size": 3390, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "hw5/hw5.tex", "max_stars_repo_name": "sahilchinoy/econ103", "max_stars_repo_head_hexsha": "ab2ecbb759eb811e953157e7f04f5a003066a62c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
import tclab import numpy as np import time import matplotlib.pyplot as plt from scipy.optimize import minimize import random # Second order model of TCLab # initial parameter guesses Kp = 0.2 taus = 50.0 zeta = 1.2 # magnitude of step M = 80 # overdamped 2nd order step response def model(y0,t,M,Kp,...
{"hexsha": "e7468305579cbd7acdb6ac65a0025d268d04193c", "size": 5010, "ext": "py", "lang": "Python", "max_stars_repo_path": "0_Test_Device/Python/test_Second_Order.py", "max_stars_repo_name": "APMonitor/arduino", "max_stars_repo_head_hexsha": "f36e65a70dd7122d1829883899e40e56bf6c4279", "max_stars_repo_licenses": ["Apach...
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage[letterpaper, margin=1in]{geometry} \usepackage{amsmath} \usepackage{amssymb } \title{CS5820 HW9} \author{Renhao Lu, NetID: rl839} \begin{document} \maketitle \section{NP-Complete proof sketches} \subsection{UNSAT} The approach is not...
{"hexsha": "6b9eafc6577806b746b1258803ab8201d477c02c", "size": 9399, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "CS5820 HW-9.tex", "max_stars_repo_name": "lurenhaothu/CS4820", "max_stars_repo_head_hexsha": "a656d336e60e2f6b4416574cc518486945f1c93f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 17 11:33:55 2020 @author: nmei """ import os from glob import glob import pandas as pd import numpy as np import seaborn as sns from matplotlib import pyplot as plt working_dir = '../confidence_results' figure_dir = '../figures' if not os.path.ex...
{"hexsha": "c2ad747d505a29c989e29cd196554964509fbb45", "size": 2046, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/4.2.plot_confidence.py", "max_stars_repo_name": "nmningmei/agent_models", "max_stars_repo_head_hexsha": "8380f1203e6d5a18f18f9adeb6bd36b23b2ae61b", "max_stars_repo_licenses": ["MIT"], "max...
/*============================================================================= Copyright (c) 2001-2009 Joel de Guzman Copyright (c) 2001-2009 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at h...
{"hexsha": "13b36962d3d790db660978fdefa4bc15d39eff0d", "size": 2064, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/lib/boost/spirit/home/support/detail/sign.hpp", "max_stars_repo_name": "EricBoittier/vina-carb-docker", "max_stars_repo_head_hexsha": "e8730d1ef90395e3d7ed3ad00264702313b0766a", "max_stars_repo_...
[STATEMENT] lemma wf_wcode_double_case_le[intro]: "wf wcode_double_case_le" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wf wcode_double_case_le [PROOF STEP] by(auto simp: wcode_double_case_le_def )
{"llama_tokens": 92, "file": "Universal_Turing_Machine_UTM", "length": 1}
# Library Imports import numpy as np from matplotlib import pyplot from tensorflow import zeros from numpy.random import randn def generate_latent_points(latent_dim, no_of_samples): # generate points in the latent space latent = randn(latent_dim * no_of_samples) # reshape into a batch of inputs ...
{"hexsha": "db7fc4863937738e510571cbfc08e430156036cd", "size": 1561, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/fake_samples.py", "max_stars_repo_name": "platonic-realm/UM-PDD", "max_stars_repo_head_hexsha": "747171ec3d87e54fb70a2cf4472b8da9fbd2f67b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#################################################################### import tensorflow as tf from tensorflow.keras.datasets import cifar10 import sys sys.path.append('./') #################################################################### batch_size = 256 num_classes = 10 epochs = 30 image_shape = (32, 32, 3) (x...
{"hexsha": "9c7f37d2e38a9076a216e186ee1e65ddb04fc30e", "size": 2559, "ext": "py", "lang": "Python", "max_stars_repo_path": "train-node/train-cifar-10.py", "max_stars_repo_name": "xAlpharax/NeuralODE-Notes-Projects", "max_stars_repo_head_hexsha": "4353e2aa800c1dded5388950b0cc338f41cae63c", "max_stars_repo_licenses": ["M...
def calculate_taxonomic_resolution(TaXon_table_xlsx, path_to_outdirs, x_tax_res, y_tax_res, figure_type, template, theme, font_size, clustering_unit): import glob import PySimpleGUI as sg import pandas as pd from pandas import DataFrame import numpy as np import plotly.graph_objects as go f...
{"hexsha": "d24393a26dfeda9363ce8e026cf4afd98df6de84", "size": 4736, "ext": "py", "lang": "Python", "max_stars_repo_path": "taxontabletools/calculate_taxonomic_resolution.py", "max_stars_repo_name": "TillMacher/TaxonTableTools", "max_stars_repo_head_hexsha": "9b5c6356acd9890465d39f16b671eb346ceec25a", "max_stars_repo_l...
from scipy.io import loadmat from numpy import transpose import skimage.io as sio from utils import visualize import numpy as np import os import argparse def main(args): detection = loadmat('/home/tju/pytorch-pose/evaluation/data/detections.mat') det_idxs = detection['RELEASE_img_index'] debug = 1 thr...
{"hexsha": "5c13ce59918b7883d20faaf08d00c830578a06fc", "size": 3954, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualization/plot_mpii-1.py", "max_stars_repo_name": "mobeixiaoxin/deep-high-resolution-net.pytorch", "max_stars_repo_head_hexsha": "081dea8b60726cc0db45ef907f49b4748ac7bba2", "max_stars_repo_lic...
import unittest from ..utils import stft, get_samplerate from ..nodes.nonstat import * from golem import DataSet from scipy import signal import matplotlib.pyplot as plt class TestSlowSphere(unittest.TestCase): def setUp(self): np.random.seed(0) def test_slowsphere(self): ''' When the input is sta...
{"hexsha": "6b1ff2a8bf1fe2b9af6d2cf9a628ca9431be7cf7", "size": 1850, "ext": "py", "lang": "Python", "max_stars_repo_path": "psychic/tests/testnonstat.py", "max_stars_repo_name": "breuderink/psychic", "max_stars_repo_head_hexsha": "a89dd821b801e315df785f633e88689f4f5a93bf", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
[STATEMENT] lemma prime_exp: "prime (p ^ n) \<longleftrightarrow> n = 1 \<and> prime p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. prime (p ^ n) = (n = 1 \<and> prime p) [PROOF STEP] by auto2
{"llama_tokens": 86, "file": "Auto2_HOL_HOL_Primes_Ex", "length": 1}
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-np.pi,np.pi,300) plt.axes([.1,.1,0.8,0.8]) plt.plot(x,np.sin(x), color='r') plt.axes([.3,.15,0.4,0.3]) plt.plot(x,np.cos(x), color='g') plt.show()
{"hexsha": "5aef3c2519578de589fd346bdce3df6895a7e939", "size": 217, "ext": "py", "lang": "Python", "max_stars_repo_path": "Week4/12. axes.py", "max_stars_repo_name": "HawkingLaugh/Data-Processing-Using-Python", "max_stars_repo_head_hexsha": "6c4d7e09317aee41684731d5611f2f0dab217b2b", "max_stars_repo_licenses": ["MIT"],...
"""Functions to perform registration between all hybridizations. register_final_images(folder, gene='Nuclei', sub_pic_frac=0.2, use_MPI=False, apply_to_corners=True, apply_warping = True) -- Register stitched images an in all HDF5 file in the folder find_reg_final_i...
{"hexsha": "a267fd0b5eb6fa653d610e9a0790d9f6cc60df2f", "size": 38007, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysmFISH/stitching_package/hybregistration.py", "max_stars_repo_name": "ambrosejcarr/pysmFISH", "max_stars_repo_head_hexsha": "0eb24355f70c0d5c9013a9407fd56f2e1e9ee3cb", "max_stars_repo_licenses"...
import re from copy import deepcopy from shutil import copyfileobj import f90nml import numpy as np import pandas as pd from f90nml.namelist import Namelist from six import StringIO from pymagicc.definitions import ( DATA_HIERARCHY_SEPARATOR, convert_magicc6_to_magicc7_variables, convert_magicc7_to_opensc...
{"hexsha": "b005c8f55c53e86e7c7f3e21dceb31fd96c8f3cb", "size": 28180, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymagicc/io/base.py", "max_stars_repo_name": "gabriel-abrahao/pymagicc", "max_stars_repo_head_hexsha": "c9bdd610f97aa832dd879796aa6b9bfe11fa0f07", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
section\<open>Guard-Based Encodings\<close> theory G imports T_G_Prelim Mcalc2C begin subsection\<open>The guard translation\<close> text\<open>The extension of the function symbols with type witnesses:\<close> datatype ('fsym,'tp) efsym = Oldf 'fsym | Wit 'tp text\<open>The extension of the predicate symbols with...
{"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/Sort_Encodings/G.thy"}
import numpy as np from scipy.ndimage.interpolation import rotate as scipyrotate import torch from torch.utils.data import Dataset import torch.nn.functional as F from torchvision import transforms, datasets def get_dataset(dataset, data_path): if dataset == 'MNIST': channel = 1 im_size = (28, 28)...
{"hexsha": "a65fdad6988dd07a0a2e7924592e3d70b2a66e8d", "size": 6627, "ext": "py", "lang": "Python", "max_stars_repo_path": "data.py", "max_stars_repo_name": "dhkim2810/MaskedDatasetCondensation", "max_stars_repo_head_hexsha": "f52144e9cd68e46b4ebdbcaf96829edb732b79ae", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import torch import numpy as np import torch.utils.data as data class Subset(data.Dataset): def __init__(self, dataset, indices=None): """ Subset of dataset given by indices. """ super(Subset, self).__init__() self.dataset = dataset self.indices = indices i...
{"hexsha": "281cba6842977a0192d221f346105fcac415da6b", "size": 1925, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/data/utils.py", "max_stars_repo_name": "moeraza/ali-g", "max_stars_repo_head_hexsha": "342e24e139fc1e75f4bf576d0784ed886f305cf8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import os import numpy as np from kcsd import csd_profile as CSD from kcsd import KCSD2D from scipy.integrate import simps from scipy.interpolate import griddata from figure_properties import * import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.gridspec as gridspec def fetch_folder(csd_type='...
{"hexsha": "903f92a92454061ee54c317672e0c78ef5d349c7", "size": 7108, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/kCSD_properties/tutorial_broken_electrodes.py", "max_stars_repo_name": "rdarie/kCSD-python", "max_stars_repo_head_hexsha": "5b9e1b1dce2ff95c0d981c2c4015b7a75199de9a", "max_stars_repo_licen...
# # Copyright (c) 2017 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...
{"hexsha": "a3b701427a6b11ee1550d2ecceb5bf6996bbf924", "size": 8473, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl_coach/agents/dnec_agent.py", "max_stars_repo_name": "dnishio/NEC-RP", "max_stars_repo_head_hexsha": "3e1a5601f559f7ad0abe3b28ad341e6cda278383", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
include(joinpath(pwd(), "src/constraints/contact.jl")) # include(joinpath(pwd(), "src/constraints/contact_no_slip.jl")) # Simulate contact model one step function step_contact(model::Model{<: Integration, FixedTime}, x1, u1, w1, h; tol_c = 1.0e-5, tol_opt = 1.0e-5, tol_s = 1.0e-4, nlp = :ipopt) # Horizon ...
{"hexsha": "c03cb9588a957e7315c4bb3583d504b63d0325f7", "size": 1510, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/contact_simulator/simulator.jl", "max_stars_repo_name": "jmichaux/motion_planning", "max_stars_repo_head_hexsha": "9a36f394261ff11ca8325d8a5e9d8a79f18b2744", "max_stars_repo_licenses": ["MIT"],...
# ========================== # Computing a facet integral # ========================== # # In this demo, we look at how Basix can be used to compute the integral # of the normal derivative of a basis function over a triangular facet # of a tetrahedral cell. # # As an example, we integrate the normal derivative of the f...
{"hexsha": "82cdf7f106d5f1ee168f80e1cb07d3f6dbed15d1", "size": 3254, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/demo_facet_integral.py", "max_stars_repo_name": "FEniCS/basix", "max_stars_repo_head_hexsha": "da150e039a5188ac0edd31c8d126e4c8ee4fce6d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma oprod_minus_Id2: "r' \<le> Id \<Longrightarrow> r *o r' - Id \<le> {((x1,y), (x2,y)). (x1, x2) \<in> (r - Id) \<and> y \<in> Field r'}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. r' \<subseteq> Id \<Longrightarrow> r *o r' - Id \<subseteq> {((x1, y), x2, y). (x1, x2) \<in> r - Id \<and> y \<i...
{"llama_tokens": 336, "file": null, "length": 2}
module attribute_value_pair_m implicit none private type, public :: attribute_value_pair_t character(len=80) :: the_attribute character(len=80) :: the_value end type attribute_value_pair_t contains end module attribute_value_pair_m
{"hexsha": "e766a4d5eb217775ab447c9f786b4b9988c8f1f9", "size": 267, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "attribute_value_pair_m.f90", "max_stars_repo_name": "bceverly/FABS", "max_stars_repo_head_hexsha": "97d2db030eb4cdcc14da6e50f22fbef140c10091", "max_stars_repo_licenses": ["BSD-3-Clause-No-Nuclear...
from model import Model # from view import View # import pygame import numpy as np import time _LOSE_ = -9999999 mapper = np.array([\ [64 ,16 ,2 ,1], [16 ,2 ,1 ,-2], [2 ,1 ,-2 ,-16], [1 ,-2 ,-16 ,-64] ]) class Node: def __init__(self, move, grid): self.score = 0 self....
{"hexsha": "5551ffe8e82419a270240e1d3fc84f58e5c6504b", "size": 2478, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/minimax.py", "max_stars_repo_name": "sihrc/2048-Python-ML", "max_stars_repo_head_hexsha": "c61a85deb9dcb3a4183c59fb33ef5ca9c9b5a824", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
SUBROUTINE XGRAT C C ------------------------------------------------ C ROUTINE NO. ( 219) VERSION (A8.6) 24:NOV:86 C ------------------------------------------------ C C THIS DRAWS AN X-GRATICULE WITH NO ANNOTATION, C SETTING THE AXIS INTERVALS AUTOMATICALLY. C C...
{"hexsha": "f4c2ce78f778f407642533635fdad6b6c550a423", "size": 1646, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/xgrat.f", "max_stars_repo_name": "ZedThree/GHOST", "max_stars_repo_head_hexsha": "cba30b43bdcc73fb87cff0724337a7d3a1bd7812", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
## # \file binary_mask_from_mask_srr_estimator.py # \brief Class to estimate binary mask from mask SRR stack # # \author Michael Ebner (michael.ebner.14@ucl.ac.uk) # \date January 2019 # import os import re import numpy as np import SimpleITK as sitk import pysitk.simple_itk_helper as sitkh import ni...
{"hexsha": "8f69bdedd7b03fdb5d03747a959c36ecd1f94cea", "size": 1751, "ext": "py", "lang": "Python", "max_stars_repo_path": "niftymic/utilities/binary_mask_from_mask_srr_estimator.py", "max_stars_repo_name": "martaranzini/NiftyMIC", "max_stars_repo_head_hexsha": "6bd3c914dad8f2983e84ef009b944c429e1fafb3", "max_stars_rep...
%============================================================== %\newpage \chapter{Implementation}\label{implementationdet} The implementation consists of two separate parts. The first contains the feature extraction and preparation of data from the audio files. The results are stored into feature files. In the second...
{"hexsha": "bf3c64780cbf4863973da7d84cb6b76c0d6935c5", "size": 21533, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "CH5.tex", "max_stars_repo_name": "oObqpdOo/MusicSimilarity", "max_stars_repo_head_hexsha": "223ea464015608ce23c9e856963b4a3702617f73", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": n...
import torch import numpy as np from dltranz.trx_encoder import PaddedBatch from dltranz.seq_encoder.rnn_encoder import RnnSeqEncoderDistributionTarget def get_data(): payload = {'amount': torch.arange(4*10).view(4, 10).float(), 'event_time': torch.arange(4*10).view(4, 10).float(), ...
{"hexsha": "ba92ad9f2cab4d6b2e1673c168ef13f07a8e3a35", "size": 1998, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/dltranz_tests/test_seq_encoder/test_rnn_seq_distribution_targets_encoder.py", "max_stars_repo_name": "KirillVladimirov/pytorch-lifestream", "max_stars_repo_head_hexsha": "83005b950d41de8afc1...
""" $(SIGNATURES) Check a scalar: should be real, finite, not nan, in optional bounds. Real is implied by being `AbstractFloat`. """ function check_float(x :: T1; lb = nothing, ub = nothing) where T1 <: AbstractFloat isValid = true; if !isfinite(x) isValid = false; @warn "Not finite" e...
{"hexsha": "36f83c50f69cb565615398ad94ed0e32867aca5f", "size": 2559, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/check.jl", "max_stars_repo_name": "hendri54/CommonLH", "max_stars_repo_head_hexsha": "aba46201434da0c3fec6476b66de750eb1f7e493", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
#include <boost/graph/make_maximal_planar.hpp>
{"hexsha": "74bf7a788a3096740d4cbf55c9f54c5a93e820be", "size": 47, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_graph_make_maximal_planar.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL...
[STATEMENT] lemma fst_in_eclose [simp]: "x \<^bold>\<in> eclose \<langle>x, y\<rangle>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<^bold>\<in> eclose \<langle>x, y\<rangle> [PROOF STEP] by (metis eclose_hinsert hmem_hinsert hpair_def hunion_iff)
{"llama_tokens": 109, "file": "HereditarilyFinite_Rank", "length": 1}
[STATEMENT] lemma hd_lq_conv_nth: assumes "u <p v" shows "hd(u\<inverse>\<^sup>>v) = v!\<^bold>|u\<^bold>|" [PROOF STATE] proof (prove) goal (1 subgoal): 1. hd (u\<inverse>\<^sup>>v) = v ! \<^bold>|u\<^bold>| [PROOF STEP] using prefix_length_less[OF assms, THEN hd_drop_conv_nth] [PROOF STATE] proof (prove) using this:...
{"llama_tokens": 335, "file": "Combinatorics_Words_CoWBasic", "length": 3}
Require Import Semantics_ConvAppl. Require Import ReferencesImpl. Require Import CapabilitiesAppl. Require Import IndicesImpl. Require Import ObjectsAppl. Require Import SystemStateAppl. Require Import SemanticsDefinitionsAppl. Require Import SemanticsAppl. Require Import ExecutionAppl. Require Import AccessEdgeAppl. R...
{"author": "doerrie", "repo": "confinement-proof", "sha": "db7bfb3522990d0820de64f13baa97b67e694c44", "save_path": "github-repos/coq/doerrie-confinement-proof", "path": "github-repos/coq/doerrie-confinement-proof/confinement-proof-db7bfb3522990d0820de64f13baa97b67e694c44/AccessExecutionAppl.v"}
from utilscc import* from time import* import numpy as np from qpsolvers import * def build_initial_graph(Y, m): # if well understood create the m nearest neighboor directed graph n = Y.shape[0] A = np.zeros([n, n]) E = pairwise_matrix_rownorm(Y) for i in np.arange(0, n): sorted_index = np....
{"hexsha": "7c82d9421c0d73a8306d9b2c98ab89e336c9d669", "size": 2577, "ext": "py", "lang": "Python", "max_stars_repo_path": "constrLaplacianRank.py", "max_stars_repo_name": "cmiras/spectralGraphTopology", "max_stars_repo_head_hexsha": "ecf8ef089fd5fc6f746e25a89e0fbcd3dd4efb19", "max_stars_repo_licenses": ["MIT"], "max_s...
''' remove salt and pepper noise from an image by applying median filter of size 3x3 and 5x5 ''' import cv2 import numpy as np img = cv2.imread('sap.png',0) new_img = cv2.imread('sap.png', 0) prop = img.shape #we take a window and find the median of intensity values #in that window and assigned it to the curren...
{"hexsha": "f67923a53624671e76feb08b8674ebdfe01f1b77", "size": 1109, "ext": "py", "lang": "Python", "max_stars_repo_path": "Day6/salt_pepper_noise.py", "max_stars_repo_name": "susantabiswas/Digital-Image-Processing", "max_stars_repo_head_hexsha": "4808e6ddb42c82acafb5eb5d58b41f9fd495483f", "max_stars_repo_licenses": ["...
\documentclass[12pt, a4paper]{article} \usepackage[dutch]{babel} \usepackage{graphicx} \usepackage{fullpage} \usepackage{fancyhdr} \usepackage{setspace} \usepackage{color} \usepackage{float} \usepackage[parfill]{parskip} \usepackage{epstopdf} \usepackage{tabularx} \usepackage{ctable} \doublespacing \pagestyle{fancyplai...
{"hexsha": "52d1faa3511bfe084d2f888cbfe77806f0e48ceb", "size": 11030, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "programmeertalen-project/Report.tex", "max_stars_repo_name": "FlashYoshi/UGentProjects", "max_stars_repo_head_hexsha": "5561ce3bb73d5bc5bf31bcda2be7e038514c7072", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python3 import numpy as np from collections import Counter from collections import defaultdict import sys import pickle import re if (len(sys.argv) < 2): print("Usage: generate.py [filename] [n]") exit() n = int(sys.argv[2]) if len(sys.argv) >= 3 else 20 file = open(sys.argv[1]) text = file.r...
{"hexsha": "4624cb741fb7a0b4a862f5dc8fcc97830ddcb317", "size": 1765, "ext": "py", "lang": "Python", "max_stars_repo_path": "charles-university/2017-npfl092/hw02/generate.py", "max_stars_repo_name": "Hyperparticle/lct-master", "max_stars_repo_head_hexsha": "8acb0ca8fe14bb86305f235e3fec0a595acae2de", "max_stars_repo_lice...
import json from os.path import join as _join import numpy as np from wepppy.nodb import Ron, Wepp def get_wd(runid): return _join('/geodata/weppcloud_runs', runid) def combined_watershed_viewer_generator(runids, title, units=None, varopts=None, varname=None, asjson=False): if units is None: units...
{"hexsha": "ae9c608843dfde8769913541263eefb51b5f3211", "size": 3455, "ext": "py", "lang": "Python", "max_stars_repo_path": "wepppy/weppcloud/combined_watershed_viewer_generator.py", "max_stars_repo_name": "hwbeeson/wepppy", "max_stars_repo_head_hexsha": "6358552df99853c75be8911e7ef943108ae6923e", "max_stars_repo_licens...
import argparse import time import cv2 import numpy as np import tensorflow as tf import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * from models import vnect_model as vnect_model import utils.utils as utils parser = argparse.ArgumentParser() parser.add_argument('--device', def...
{"hexsha": "ed05e8ab32f5c803ac45bfe8e40c7b11e5685416", "size": 9907, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_tf_gl.py", "max_stars_repo_name": "rrbarioni/VNect-tensorflow", "max_stars_repo_head_hexsha": "2137172dd61df5f83ce3fbe0cf972950b3cb23f7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */ /* * Implementation for rpc connection class. * * Copyright (c) 2015 Cisco 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 th...
{"hexsha": "328c30fbff582a78e42cf69b3cc920748ee46675", "size": 8421, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/rpc_connection.cpp", "max_stars_repo_name": "readams/throng", "max_stars_repo_head_hexsha": "b87742707eb13dc6103cf7dda3b1a91f1bd96034", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import pandas as pd import numpy as np from collections import defaultdict, Counter import json # ---------------------------------------------------------------------------------------- # Load data result_final=pd.read_csv("/Users/chiarasemenzin/Desktop/LSCP/SLT/result_final_lisa.csv") #file with segment info and l...
{"hexsha": "29b5c125f57b409249d5e30b6e4076c16224e2af", "size": 3566, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_analyses/code/write_seg_data.py", "max_stars_repo_name": "LAAC-LSCP/zoo-babble-validation", "max_stars_repo_head_hexsha": "efcc26cc994293b8fabf553a60833962b3cdc0f7", "max_stars_repo_licenses"...
from nose.tools import assert_equal, assert_true, assert_false from numpy.testing import assert_array_equal from pbcore import data from StringIO import StringIO from pbcore.io.FastqIO import * # Test QV <-> string conversion routines class TestQvConversion(object): def setup(self): self.ascii = \ ...
{"hexsha": "2ce3a480c0b9344bfebd1f1d597b57e0b9ea5619", "size": 7182, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pbcore_io_FastqIO.py", "max_stars_repo_name": "yoshihikosuzuki/pbcore", "max_stars_repo_head_hexsha": "956c45dea8868b5cf7d9b8e9ce98ac8fe8a60150", "max_stars_repo_licenses": ["BSD-3-Clau...
import cv2 as cv import numpy as np #边缘保留滤波(EPF) #高斯双边模糊(磨皮) def bi_demo(image): dest = cv.bilateralFilter(image,0,100,15) cv.imshow("bi_demo",dest) #均值迁移(边缘过度模糊)油画 def shfit_demo(image): dest = cv.pyrMeanShiftFiltering(image,0,10,50) cv.imshow("shfit_demo",dest) src = cv.imread("C:/1/1.jpg") cv.n...
{"hexsha": "327ac5e85624c783f8164ec5c46517cc1bf84009", "size": 451, "ext": "py", "lang": "Python", "max_stars_repo_path": "8_Filter.py", "max_stars_repo_name": "Sanduoo/OpenCV-Python", "max_stars_repo_head_hexsha": "8356782f65918a5193b0d2d2618d0bcb32e831d2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
[STATEMENT] lemma inv_end5_loop_Oc_Oc_drop[elim]: "\<lbrakk>0 < x; inv_end5_loop x (b, Oc # list); b \<noteq> []; hd b = Oc\<rbrakk> \<Longrightarrow> inv_end5_loop x (tl b, Oc # Oc # list)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>0 < x; inv_end5_loop x (b, Oc # list); b \<noteq> []; hd b = Oc\<...
{"llama_tokens": 1141, "file": "Universal_Turing_Machine_WeakCopyTM", "length": 6}
import numpy as np import tensorflow as tf __author__ = 'Otilia Stretcu' def print_metrics_dict(metrics): for name, val in metrics.items(): print('--------------', name, '--------------') if isinstance(val, tf.Tensor): val = val.numpy() if name == 'confusion': prin...
{"hexsha": "22285fbb0c12c3b2de59f3b37eb85aa074061176", "size": 410, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/printing.py", "max_stars_repo_name": "otiliastr/coarse-to-fine-curriculum", "max_stars_repo_head_hexsha": "00fe0ad58dd2a5871958307f7791d93003b6310b", "max_stars_repo_licenses": ["Apache-2...
[STATEMENT] lemma Standard_of_int [simp]: "of_int z \<in> Standard" [PROOF STATE] proof (prove) goal (1 subgoal): 1. of_int z \<in> Standard [PROOF STEP] by (simp add: star_of_int_def)
{"llama_tokens": 78, "file": null, "length": 1}
import random import numpy as np from src.utils.articulation_points import articulationPoints from src.connectivity import can_lose from src.districts import district_populations, is_frontier def fix_pop_equality(state, partition, n_districts, tolerance=.10, max_iters=10000): assert 0 < tolerance < 1.0 ideal_...
{"hexsha": "2e42567435ea898d3de03e0ebf1a0b1419908f61", "size": 3600, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimize/src/constraints.py", "max_stars_repo_name": "joel-simon/Antimander", "max_stars_repo_head_hexsha": "ec2058a76f172e0941d5e4558776831050a00c2a", "max_stars_repo_licenses": ["BSD-3-Clause"],...
/- Copyright (c) 2022 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Patrick Massot -/ import topology.basic /-! # Neighborhoods of a set In this file we define the filter `𝓝ˢ s` or `nhds_set s` consisting of all neighborhoods of a...
{"author": "Mel-TunaRoll", "repo": "Lean-Mordell-Weil-Mel-Branch", "sha": "4db36f86423976aacd2c2968c4e45787fcd86b97", "save_path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch", "path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch/Lean-Mordell-Weil-Mel-Branch-4db36f86423976aacd2c2968c4e4...
import tactic.slim_check import .mk_slim_check_test example : true := begin have : ∀ i j : ℕ, i < j → j < i, success_if_fail_with_msg { slim_check { random_seed := some 257 } } " =================== Found problems! i := 0 j := 1 guard: 0 < 1 (by construction) issue: 1 < 0 does not hold (0 shrinks) -----------...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/test/slim_check.lean"}
import numpy num_datasets = 0 #Number of Datasets num_parameters = 6 #Number of Parameters projects = [] #Names of the projects parameters = { ...
{"hexsha": "c3f08da6da026ef43e6fecd5dd834a4d9be45b63", "size": 3159, "ext": "py", "lang": "Python", "max_stars_repo_path": "ridge_analyze/ridge-firebase-python/Rank.py", "max_stars_repo_name": "vsthakur101/DevCommunity_MAJOR", "max_stars_repo_head_hexsha": "164f2444d7cfa7330513a226fd14429c9e4c0dad", "max_stars_repo_lic...
import numpy as np from copy import deepcopy from express import settings from express.properties.utils import eigenvalues from express.properties.non_scalar import NonScalarProperty class BandGaps(NonScalarProperty): """ The minimum energy difference between the highest occupied (valence) band and the lowes...
{"hexsha": "cf4f956fc4392386eb83fe34ee10cbb17b56c481", "size": 6505, "ext": "py", "lang": "Python", "max_stars_repo_path": "express/properties/non_scalar/bandgaps.py", "max_stars_repo_name": "Exabyte-io/exabyte-express", "max_stars_repo_head_hexsha": "579cc1ad3666352848e0ac8eeec84cb410a9a9c7", "max_stars_repo_licenses"...
```python j ``` ```python import sympy as sp import numpy as np import altair as alt ``` # Solving steady state expression for λ ```python # Define the efficiencies gamma_max = sp.Symbol('{{\gamma^{(max)}}}') nu_max = sp.Symbol(r'{{\nu^{(max)}}}') phi_R = sp.Symbol('{{\phi_R}}') Kd = sp.Symbol('{{K_D^{(c_{AA})...
{"hexsha": "4934a1044b8989f4995627f70a7569f0ad2b008a", "size": 34807, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "code/analysis/symbolics.ipynb", "max_stars_repo_name": "gchure/modelling_growth", "max_stars_repo_head_hexsha": "764d7aee4d0d562cd5e1b6e21b534ab465d1d672", "max_stars_repo_licenses":...
"""Reference path extraction """ import math from typing import Optional, List, Tuple from dataclasses import dataclass from itertools import product import matplotlib as mpl from matplotlib.axes import Axes import matplotlib.pyplot as plt import geopandas as gpd import numpy as np from shapely import geometry, ops f...
{"hexsha": "0cdf3c8dad869ae81881ccac56b288f567a0a2a9", "size": 3522, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/path_extraction.py", "max_stars_repo_name": "kopytjuk/opendd-analysis", "max_stars_repo_head_hexsha": "72c94a39e5fef6dc1af4e0bcf62768229d165296", "max_stars_repo_licenses": ["MIT"], "max_stars...
/- Copyright (c) 2021 Eric Weiser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser ! This file was ported from Lean 3 source module algebra.algebra.subalgebra.pointwise ! leanprover-community/mathlib commit b2c707cd190a58ea0565c86695a19e99ccecc215 ! Please ...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/Algebra/Algebra/Subalgebra/Pointwis...
# -*- coding: utf-8 -*- ''' test.py ''' import os import logging from chainer import Variable import numpy as np import pandas as pd import sklearn.metrics def test_network(test, model, output_path='', batch_size=100, device_id=-1): ''' Test. Args: dataset (chainer.dataset): Dataset mode...
{"hexsha": "9f6f6b6e2d781120026c9613945aacc8a1cda8e9", "size": 1036, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/run/test.py", "max_stars_repo_name": "yizumi1012xxx/cookpad", "max_stars_repo_head_hexsha": "48bafd2e5dc7d99fc79df43d95ae46a7cb08bb14", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
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 ################################################# # Database Setup ################################################# eng...
{"hexsha": "3f14c1e51d7afeb8044d1e27560dc5643d7b6fcc", "size": 4549, "ext": "py", "lang": "Python", "max_stars_repo_path": "hawaiiApp.py", "max_stars_repo_name": "rfindlater/sqlalchemy-challenge", "max_stars_repo_head_hexsha": "7fae34b9df31bd1415471fc662b852e7b6b5b508", "max_stars_repo_licenses": ["ADSL"], "max_stars_c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import Any __author__ = "Christian Heider Nielsen" import numpy __all__ = ["sample"] def sample(iter_set: iter) -> Any: """ @param iter_set: @type iter_set: @return: @rtype: """ a = list(iter_set) if len(a): idx = n...
{"hexsha": "1b7e2c4c936e9025920ffcb03453da9102b4949c", "size": 373, "ext": "py", "lang": "Python", "max_stars_repo_path": "neodroidagent/utilities/exploration/sampling/set_sampling.py", "max_stars_repo_name": "gitter-badger/agent", "max_stars_repo_head_hexsha": "3f53eaa7ebdee3ab423c7b58785d584fe1a6ae11", "max_stars_rep...
[STATEMENT] lemma dgrad_max_0: "d 0 \<le> dgrad_max d" [PROOF STATE] proof (prove) goal (1 subgoal): 1. d (0::'a) \<le> dgrad_max d [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. d (0::'a) \<le> dgrad_max d [PROOF STEP] from finite_Keys [PROOF STATE] proof (chain) picking this: finite ?A \<Long...
{"llama_tokens": 899, "file": "Signature_Groebner_Signature_Groebner", "length": 12}
""" SpectralNeuralOperator{F,L,F1,F2,P} A type representing a Neural Operator whose forward pass is of the form y(t) = σ((B*x)(t) - λ(t)*(B*x)(t) + b(t)) where `x`, `λ` and `b` are functions, and `B` is a linear operator. By default, `y` is projected in the Chebyshev polynomial basis before outputing. Thi...
{"hexsha": "530499e9c90bbace08d299b82c7150c2eaf522fb", "size": 3207, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/neural_operators/spectral_neural_operator.jl", "max_stars_repo_name": "csimal/SpectralLearning.jl", "max_stars_repo_head_hexsha": "4999657700a0d84dfff470a52ddb3e3b37a44aae", "max_stars_repo_lic...
from showml.deep_learning.layers import Activation import numpy as np class Sigmoid(Activation): """A layer which applies the Sigmoid operation to an input. """ def forward(self, X: np.ndarray) -> np.ndarray: return 1 / (1 + np.exp(-X)) def backward(self, X: np.ndarray) -> np.ndarray: ...
{"hexsha": "f000ee48db8cbe86fcd0f21c9a1a2ab552c8f5f9", "size": 1012, "ext": "py", "lang": "Python", "max_stars_repo_path": "showml/deep_learning/activations.py", "max_stars_repo_name": "shubhomoy/ShowML", "max_stars_repo_head_hexsha": "9fbc366941ad910f1fbd7d91da823616c34fd400", "max_stars_repo_licenses": ["MIT"], "max_...
str = """Hello, world. """ print(str)
{"hexsha": "5ad1a4c74fdad704b3f52409cd58d9dcb40a8368", "size": 56, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "lang/Julia/literals-string-4.jl", "max_stars_repo_name": "ethansaxenian/RosettaDecode", "max_stars_repo_head_hexsha": "8ea1a42a5f792280b50193ad47545d14ee371fb7", "max_stars_repo_licenses": ["MIT"], "...
""" Combine two linguistic terms. a and b are functions of two sets of the same domain. Since these combinators are used directly in the Set class to implement logic operations, the most obvious use of this module is when subclassing Set to make use of specific combinators for special circumstances. Most functions...
{"hexsha": "86959711192b60e8792e05af0d6a88c8fbb81040", "size": 4990, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/fuzzylogic/combinators.py", "max_stars_repo_name": "katerss1/fuzzylogic", "max_stars_repo_head_hexsha": "e5bfe90d706ae8f5981a0aaf13542ee751b84abd", "max_stars_repo_licenses": ["MIT"], "max_sta...
/- Copyright (c) 2022 Jannis Limperg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jannis Limperg -/ import Aesop example {n m k : Nat} (h : n < m) (h₂ : m < k) : n < k := by apply Nat.lt_trans <;> aesop
{"author": "JLimperg", "repo": "aesop", "sha": "c68fb1d5a9172498230d81d95c61f6461bea6722", "save_path": "github-repos/lean/JLimperg-aesop", "path": "github-repos/lean/JLimperg-aesop/aesop-c68fb1d5a9172498230d81d95c61f6461bea6722/tests/run/MVarsInInitialGoal.lean"}
""" Multiple Brain classes that extend sb.Brain to enable attacks. """ import logging import time import warnings import importlib import os from shutil import which from xml.dom import NotFoundErr import speechbrain as sb import torch from speechbrain.dataio.dataloader import LoopedLoader from speechb...
{"hexsha": "8ee547216b64b15bf6a2aade682e7eb3ef8d2a94", "size": 42084, "ext": "py", "lang": "Python", "max_stars_repo_path": "robust_speech/adversarial/brain.py", "max_stars_repo_name": "RaphaelOlivier/robust_speech", "max_stars_repo_head_hexsha": "f02e16408c1ba9926749eafc3cbf45c74828f756", "max_stars_repo_licenses": ["...
import numpy as np import tensorflow.compat.v1 as tf from t3f.tensor_train import TensorTrain from t3f.tensor_train_batch import TensorTrainBatch from t3f import ops from t3f import shapes from t3f import initializers class _TTTensorTest(): def testFullTensor2d(self): np.random.seed(1) for rank in [1, 2]:...
{"hexsha": "6f5a458ac30d1686a6cc21fa7f8a12838f1d6b4a", "size": 44285, "ext": "py", "lang": "Python", "max_stars_repo_path": "t3f/ops_test.py", "max_stars_repo_name": "aiboyko/t3f", "max_stars_repo_head_hexsha": "0361b80f36a06eb5aa5d536650eef9e006289139", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is part of pyunicorn. # Copyright (C) 2008--2017 Jonathan F. Donges and pyunicorn authors # URL: <http://www.pik-potsdam.de/members/donges/software> # License: BSD (3-clause) """ Provides classes for analyzing spatially embedded complex networks, handling multiva...
{"hexsha": "f7ade3f1b9e165f5e51ea75adedb068e559b9a93", "size": 203147, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyunicorn/core/network.py", "max_stars_repo_name": "etzinis/pyunicorn", "max_stars_repo_head_hexsha": "151e1640c3ae71549c96c461b1377642743dbf01", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import numpy as np from scipy.linalg import solve_banded from randomvars import Cont, Disc import randomvars._utils as utils # %% Functions def y_from_xp(x, p, coeff): dx = np.diff(x) dx_lead = np.concatenate([dx, [0]]) dx_lag = np.concatenate([[0], dx]) banded_matrix = 0.5 * np.array( [dx_la...
{"hexsha": "001e5559c008b980e7c232286b94ced138eab336", "size": 6049, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/retype.py", "max_stars_repo_name": "echasnovski/randomvars", "max_stars_repo_head_hexsha": "15417b0e3ecd27f185b70471102c158f60d51c28", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.core.arrays import FloatingArray @pytest.mark.parametrize("ufunc", [np.abs, np.sign]) # np.sign emits a warning with nans, <https://github.com/numpy/numpy/issues/15127> @pytest.mark.filterwarnings("ignore:invalid value enco...
{"hexsha": "6f53b447769007d4278da443249b1df2bca062a4", "size": 6365, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/tests/arrays/integer/test_function.py", "max_stars_repo_name": "RakhithJK/pandas", "max_stars_repo_head_hexsha": "0eeda645212c240d6cbdef8e3ba4834c3763553b", "max_stars_repo_licenses": ["PSF...
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 def test(): record = ak._v2.with_name(ak._v2.Record({"x": 10.0}), "X") assert ak._v2.parameters(record) == {"__record__": "X"...
{"hexsha": "0bad83e47ba93da79bf839431ae2868e9341f71d", "size": 322, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/v2/test_1400-with_name-record.py", "max_stars_repo_name": "douglasdavis/awkward-1.0", "max_stars_repo_head_hexsha": "f00775803a5568efb0a8e2dae3b1a4f23228fa40", "max_stars_repo_licenses": ["BS...
#!/usr/bin/env python3 import argparse from collections import OrderedDict import numpy as np def build_vocab(train_paths, output_path): """ Builds the vocabulary. Compatible with Nematus build_dict function, but does not output frequencies and special symbols. :param train_paths: ...
{"hexsha": "b2a11b224aa957fefddbe411561bdd4918d9c028", "size": 2098, "ext": "py", "lang": "Python", "max_stars_repo_path": "github/joeynmt/scripts/build_vocab.py", "max_stars_repo_name": "shania3322/joeynmt", "max_stars_repo_head_hexsha": "5afe9d00930f19949b2078141771bf4621f6e9ae", "max_stars_repo_licenses": ["Apache-2...
import numpy as np from tabulate import tabulate class TruncatedDisplay(object): """ Performs similar functionality as less command in unix OS where stdout is chunked up into a set number of lines and user needs to provide input to continue displaying lines """ def __init__(self, num_lines=10): ...
{"hexsha": "3cf1468487a7a1548626ba234552ae4f6965c509", "size": 2990, "ext": "py", "lang": "Python", "max_stars_repo_path": "coronacli/display.py", "max_stars_repo_name": "adaros92/coronacli", "max_stars_repo_head_hexsha": "a760933f3d8f009ab7b414c30d9a93db19baaf0b", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy import os def make_pattern(sprites): """Convert an array of sprites to PPU pattern data. The input should have shape (n,8,8) or (n,16,8) and type uint8. """ if sprites.dtype != numpy.uint8: raise TypeError('bad sprite type: {}'.format(sprites.dtype)) n, h, w = sprites.shape ...
{"hexsha": "ecb84c983439cdef6438a2140c113999dc3c6443", "size": 3442, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/nes.py", "max_stars_repo_name": "depp/ctnes", "max_stars_repo_head_hexsha": "bc313db4333c87ce94adc20a44cb02439a9925ee", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_stars_r...
from tempfile import TemporaryDirectory from typing import Any, Dict import datasets import flair import numpy as np import pytest import torch from flair.data import Corpus from embeddings.data.data_loader import HuggingFaceDataLoader from embeddings.data.dataset import HuggingFaceDataset from embeddings.pipeline.ev...
{"hexsha": "3052650a86cb3f62d1fd40ed4ff645be173e59d5", "size": 3392, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_no_dev_training.py", "max_stars_repo_name": "CLARIN-PL/embeddings", "max_stars_repo_head_hexsha": "49fb59b796475ca92bc262ec2bc6def1d89a10e0", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import os import tensorflow as tf import keras.backend as K import pickle config = tf.ConfigProto() config.gpu_options.allow_growth = True session = tf.Session(config=config) from keras.models import Model from keras.layers import Input, Lambda from keras.optimizers import RMSprop from test_getinpu...
{"hexsha": "1fd64432c3726e52aff3205eca89e1f9383fc37d", "size": 1305, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "gustavomiguelsa/VGGVox-Verif-Keras-V2", "max_stars_repo_head_hexsha": "26f3d2e093716088952766a425e7d9ba20850908", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import skimage from skimage import data from skimage import exposure # squeeze image intensities to lower image contrast test_img = data.camera() / 5 + 100 def test_equalize_ubyte(): img_eq = exposure.equalize(test_img) cdf, bin_edges = exposure.cumulative_distribution(img_eq) check...
{"hexsha": "22339de7540b38133ba66c3e3aa5d129978b5b06", "size": 857, "ext": "py", "lang": "Python", "max_stars_repo_path": "skimage/exposure/tests/test_exposure.py", "max_stars_repo_name": "ogrisel/scikits-image", "max_stars_repo_head_hexsha": "cfc1dfa16b1e94dba42f2f5766a41cbbede03f7d", "max_stars_repo_licenses": ["BSD-...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
{"hexsha": "1c06352d2a1365dab6a45e559c004e5847785fd1", "size": 12936, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/models_extra/power_generation/costing/tests/test_NGCC_costing.py", "max_stars_repo_name": "OOAmusat/idaes-pse", "max_stars_repo_head_hexsha": "ae7d3bb8e372bc32822dcdcb75e9fd96b78da539", "ma...
\chapter{Code Information and Access} \label{app:code} The code for Conlangtionary is available at \url{https://github.com/whereswaldon/conlangtionary}. Conlangtionary contains an estimated 8,709 lines of original code on top of the Laravel framework.
{"hexsha": "778c5ca5e584c973cfd37b995d2b245fd24f5f21", "size": 252, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "0a_appendix_platforms.tex", "max_stars_repo_name": "whereswaldon/conlangtionary-thesis", "max_stars_repo_head_hexsha": "e011b07e654746581380cf5f76549706a368009c", "max_stars_repo_licenses": ["MIT"], ...
import unittest import numpy as np import scipy.stats as ss import calibration.sample as sample class TestSamples(unittest.TestCase): def test_consistent_targets(self): N = 10000 # number of target samples batch_size = 100 # batch size # for probability vectors of different sizes ...
{"hexsha": "45a65fe888783bad9e8cb66639e59aff9ed38fb7", "size": 3122, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_samples.py", "max_stars_repo_name": "uu-sml/calibration", "max_stars_repo_head_hexsha": "7bd1a2407f96f87e37d81eadaea7efeb14bb8a83", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np from legume.backend import backend as bd import legume.utils as utils from .shapes import Shape, Circle, Poly, Square class Layer(object): """ Class for a single layer in the potentially multi-layer PhC. """ def __init__(self, lattice, z_min: float=0, z_max: float=0): """Init...
{"hexsha": "4c2d602f449be2e346b9e04968074ceb6a845de7", "size": 8465, "ext": "py", "lang": "Python", "max_stars_repo_path": "legume/phc/layer.py", "max_stars_repo_name": "ENPH-2113-Silicon-Photonics/legume", "max_stars_repo_head_hexsha": "45c64b78f09b7d8779f7a4e12f204f5778b08b0b", "max_stars_repo_licenses": ["MIT"], "ma...
# Copyright (c) Puyuan Liu # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import numpy as np from decoding_algorithms.ctc_decoder_base import CTCDecoderBase class CTCScopeSearchLengthControlDecoder(CTCDecoderBase): """ ...
{"hexsha": "bb9dc4cedcd1d478d7430f82aa4a2baaa31e87e0", "size": 21602, "ext": "py", "lang": "Python", "max_stars_repo_path": "decoding_algorithms/ctc_scope_search_length_control.py", "max_stars_repo_name": "MANGA-UOFA/NAUS", "max_stars_repo_head_hexsha": "8c0c0815a280d0661adf588302848c7f1ecc56da", "max_stars_repo_licens...
#!/usr/bin/env python # This file is part of the pyMOR project (https://www.pymor.org). # Copyright pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) """Burgers demo with different applications of Dynamic Mode Decomposition.""" impor...
{"hexsha": "3bf972c7af3036ef81668c7e86bc57d4e12289c9", "size": 3346, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pymordemos/burgers_dmd.py", "max_stars_repo_name": "kinnala/pymor", "max_stars_repo_head_hexsha": "9d2a8ee5f7a71482e62952257332d269d50678e9", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
from dash import dcc, html, Input, Output, callback import pandas as pd from plotly.subplots import make_subplots import plotly.graph_objects as go import dash_bootstrap_components as dbc import mplcursors as mplcursors import numpy as np from sklearn import linear_model layout = html.Div( [ html.H2('B...
{"hexsha": "ff49af6f95376d15b0237cac23fd2ae6f5666b7f", "size": 1777, "ext": "py", "lang": "Python", "max_stars_repo_path": "pages/btc_fair_value.py", "max_stars_repo_name": "WilsonBreton5/cryptoCharts", "max_stars_repo_head_hexsha": "1aeaf0578aff18d7d60d71d16a73bffb6bed3939", "max_stars_repo_licenses": ["MIT"], "max_st...
# Spectral Estimation of Random Signals *This jupyter/Python notebook is part of a [collection of notebooks](../index.ipynb) in the masters module [Digital Signal Processing](http://www.int.uni-rostock.de/Digitale-Signalverarbeitung.48.0.html), Comunications Engineering, Universität Rostock. Please direct questions an...
{"hexsha": "6617a38fc2f6e3901f06c97299c55dd6e8f6bd47", "size": 102794, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "spectral_estimation_random_signals/parametric_methods.ipynb", "max_stars_repo_name": "ZeroCommits/digital-signal-processing-lecture", "max_stars_repo_head_hexsha": "e1e65432a5617a30...
import logging # use instead of print for more control import inspect # get signature of functions (e.g. to pass kwargs) from pathlib import Path # filesystem related stuff import numpy as np # numerical computations import re import matplotlib.pyplot as plt from astropy.io impor...
{"hexsha": "4271494aead982733d3c8e844f2db9568849e90d", "size": 16999, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pnlf/detection.py", "max_stars_repo_name": "fschmnn/pymuse", "max_stars_repo_head_hexsha": "91e97d03a3eb1ccc02131f4e731e6bb5df66772c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
import numpy as np import tempfile import pytest from sklearn.datasets import make_moons from sklearn.model_selection import train_test_split try: import tensorflow as tf IMPORT_TF = True except ImportError: IMPORT_TF = False else: from umap.parametric_umap import ParametricUMAP, load_ParametricUMAP ...
{"hexsha": "6a6518f02493448993dbadf0d62c6c1e97fd35af", "size": 4229, "ext": "py", "lang": "Python", "max_stars_repo_path": "umap/tests/test_parametric_umap.py", "max_stars_repo_name": "worldbeater/umap", "max_stars_repo_head_hexsha": "eb8c4b2bbb08c1fc9b6a983af8d50a8d03468735", "max_stars_repo_licenses": ["BSD-3-Clause"...
from behave import * from hamcrest import assert_that, equal_to from vec3 import Vec3, vec3 from vec4 import Vec4, point, vector from base import equal, normalize, transform, ray, lighting import numpy as np from shape import material, sphere, test_shape, normal_at, set_transform, intersect, glass_sphere, point_light f...
{"hexsha": "eee9f9f542f197693a4587a809d1d13007ab6153", "size": 8391, "ext": "py", "lang": "Python", "max_stars_repo_path": "features/steps/zz_08_materials_steps.py", "max_stars_repo_name": "tewarfel/RayTracerChallenge_1", "max_stars_repo_head_hexsha": "736cc5d159c267c9bcc14d42abb03eedc2f7e5f1", "max_stars_repo_licenses...
Stephanie Jordan graduated in December 2007 and received a BA in Psychology from UC Davis. She is from Sacramento and went to Loretto High School. She is a former ASUCD External Affairs Commission External Affairs Commissioner. She also served as an ASUCD representative to the Academic Senates Undergraduate Council a...
{"hexsha": "7aef063f6afa625c2e9b01aa23a73c8465594eb2", "size": 833, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/StephanieJordan.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# -*- coding: utf-8 -*- """ Created on Wed Jul 24 18:08:05 2019 @author: lealp """ import pandas as pd pd.set_option('display.width', 50000) pd.set_option('display.max_rows', 500) pd.set_option('display.max_columns', 500) from shapely.geometry import Point import geopandas as gpd import numpy as np class Base_cla...
{"hexsha": "fab1c447fe0a5f25544c08fba8abfb02807e721c", "size": 4390, "ext": "py", "lang": "Python", "max_stars_repo_path": "teleconnection/utils/netcdf_gdf_setter.py", "max_stars_repo_name": "PhilipeRLeal/teleconnection", "max_stars_repo_head_hexsha": "01c1e5f8e8c63e0e2223711e8a78654549145b0b", "max_stars_repo_licenses...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals, annotations) from collections import defaultdict from multiprocessing import Pool import numpy as np import psutil num_cpus = psutil.cpu_count(logical=False) def...
{"hexsha": "6fe6aa5e2add1e4a96bff34247542c3e59728881", "size": 1470, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/fasterparallel/benchmark2multi.py", "max_stars_repo_name": "imjoseangel/100DaysOfCode", "max_stars_repo_head_hexsha": "bff90569033e2b02a56e893bd45727125962aeb3", "max_stars_repo_licenses": ...
program isubregion use mod_za ! HYCOM I/O interface use mod_zb ! HYCOM I/O interface for subregion implicit none c c create a finer-grid subregion from a full region archive file. c c subregion grid must be an integer multiple of the original grid, c with co-located p-grid points. ...
{"hexsha": "4022d2cf75f7800a37726c8333977f7021a73a74", "size": 37178, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "subregion/src/isubregion.f", "max_stars_repo_name": "TillRasmussen/HYCOM-tools", "max_stars_repo_head_hexsha": "7d26b60ce65ac9d785e0e36add36aca05c0f496d", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] theorem summatory_totient_asymptotics'': "sum_upto (\<lambda>n. real (totient n)) \<sim>[at_top] (\<lambda>x. 3 / pi\<^sup>2 * x\<^sup>2)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sum_upto (\<lambda>n. real (totient n)) \<sim>[at_top] (\<lambda>x. 3 / pi\<^sup>2 * x\<^sup>2) [PROOF STEP] proof - ...
{"llama_tokens": 1196, "file": "Dirichlet_Series_Arithmetic_Summatory_Asymptotics", "length": 10}
#!/usr/bin/env python3 # makes a plot for the flow loss case # note: you need to comment out the header on the csv file import matplotlib.pyplot as pl from matplotlib import rc import numpy as np # directory with output data: outdir = ('/home/gav/projects/moltres/problems/' 'LOFA/') data = np.loadtxt(outdir...
{"hexsha": "662398fafbcd096657a8e0a87bcee81cd9e099df", "size": 1408, "ext": "py", "lang": "Python", "max_stars_repo_path": "flowLossPlot.py", "max_stars_repo_name": "arfc/uiuc-arfc-2017-01", "max_stars_repo_head_hexsha": "99e79735bc9ce977df4c4135e7b59bbb2a6b759c", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_co...
// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <http/request_p...
{"hexsha": "3ebf824840967ae55ab4e1523315558339c1cd9e", "size": 17867, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/lib/http/request_parser.cc", "max_stars_repo_name": "kphf1995cm/kea", "max_stars_repo_head_hexsha": "2f6940ef5ed697f3f683035ed7a16046253add4d", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np def newton(f,fprime,x0,epsilon=1.0e-6, LOUD=False): """Find the root of the function f via Newton-Raphson method Args: f: function to find root of fprime: derivative of f x0: initial guess epsilon: tolerance Returns: estimate of root "...
{"hexsha": "a0e114265660b761416632234d30c69a7f1be700", "size": 3742, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch13.py", "max_stars_repo_name": "DrRyanMc/CompNucEng", "max_stars_repo_head_hexsha": "55d36abea64c9298092dee0b539bfaccae3f49a1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_sta...
# Copyright (c) 2017 Arup Pty. Ltd. # Distributed under the terms of the MIT License. """Methods for Independent storms. """ import numpy as np from .utils import least_squares def peaks_over_threshold(max_storm_gusts, no_years, min_threshold=None, max_threshold=None): """Build a function that estimates the gus...
{"hexsha": "0303e667ab6835399f1ad333e1ef2d9458c5491b", "size": 2113, "ext": "py", "lang": "Python", "max_stars_repo_path": "extremevaluemethod/independentstorms.py", "max_stars_repo_name": "aldiamond/extreme-value-analysis", "max_stars_repo_head_hexsha": "b46487a2e51a687bc07b758ab8edf60b3e1772ef", "max_stars_repo_licen...
import logging from typing import List import numpy as np from rtree import index class MagicDict(dict): """Dictionary, but content is accessible like property.""" def __deepcopy__(self, memo): import copy cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = resul...
{"hexsha": "e5d32cfea471f2bdf34ca6d13b7ab50b89994d60", "size": 10910, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/common.py", "max_stars_repo_name": "jkwang1992/sbp-env", "max_stars_repo_head_hexsha": "929a88c30e0056cce55ef22f74bfa218c1e78cc8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, ...