text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
λ(∇ϕxi, θi, Flow::ZigZag) = pos(∇ϕx*θ)
function event(t, x, θ, Z::ZigZag)
t, copy(x), copy(θ)
end
function pdmp_inner_sub!(Ξ, ∇ϕ!, ∇ϕx, t, x, θ, c, a, b, t′, τref, (acc, num),
Flow::ZigZag, args...; factor=1.5, adapt=false)
while true
if τref < t′
error("don't go here")
... | {"hexsha": "0abb322688aa88407c968ad55aecc69f15a4cd9d", "size": 1984, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/deprecated_scripts/sub_pdmp.jl", "max_stars_repo_name": "vincentmolin/ZigZagBoomerang.jl", "max_stars_repo_head_hexsha": "40a318230854d5e1f560ea54ec46c1b970ce116e", "max_stars_repo_licenses... |
import collections
import itertools
import os
import json
import logging
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
from rna_learn.alphabet import ALPHABET_DNA, CODON_REDUNDANCY
logger = logging.getLogger(__name__)
def main():
logging.basicConfig(level=logging.INFO, format="%(... | {"hexsha": "a9eaffc8960faf82e676011be3e95fdf2af2ea75", "size": 6082, "ext": "py", "lang": "Python", "max_stars_repo_path": "rna_learn/codon_bias/triplet_bias.py", "max_stars_repo_name": "srom/rna_learn", "max_stars_repo_head_hexsha": "981ab4c341cac952b16f9c5694f0473c3931f06f", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Monodromy Matrices and Scaled Potentials
Given a real-valued $K$-periodic potential $(v(0),\dots,v(K-1))$, the corresponding monodromy matrix reads
\begin{equation}
M = \begin{pmatrix} -v(K-1)&-1\\1&0\end{pmatrix}
\begin{pmatrix} -v(K-2)&-1\\1&0\end{pmatrix}
\cdots
\begin{pmatrix} -v(0)&-1\\1&0\end{pmatrix}
\e... | {"hexsha": "56bcf9e88458a89fb17258149d50da90908913cc", "size": 13320, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "band_and_point_spec/systematic_study_of_0_lambda_valued_potentials.ipynb", "max_stars_repo_name": "eltenedor/simulation_aperiodSchr", "max_stars_repo_head_hexsha": "6abe97ca5fe4d2ef0... |
Field Mice Field mice are found throughout Davis, House Mice house mice share our homes, Lab Mice lab mice are on Campus campus, and there are a few Wiki Animals friends of the Wiki like Little Girl. Some parts of Davis also have rats and new world mice (aka peromyscus), neither of which are actually mice (mus muscul... | {"hexsha": "74276bc00aafa35c785894f3ed506c31fd334365", "size": 2528, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Mice.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
import sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import mlab
import csv
from os.path import join, dirname, exists, isfile, basename
from os import listdir, mkdir, environ
repaired_naive = []
repaired_rite = []
preds_loc = "./data/fa15/known+clusters+all/dnn-50-multiclass"
test = sorted([in... | {"hexsha": "c6ff483fd5fbb3ddeea2006f40a14e97e1682191", "size": 2137, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_repair_rates.py", "max_stars_repo_name": "gsakkas/rite", "max_stars_repo_head_hexsha": "958a0ad2460e15734447bc07bd181f5d35956d3b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
subroutine pot(symb,x,y,z,pemd,gpemd,nat,mnat,nsurf,mnsurf)
implicit none
double precision autoang,autocmi,autoev,autokcal
parameter(autoang=0.52917706d0)
parameter(autocmi=219474.63067d0)
parameter(autoev=27.2113961d0)
parameter(autokcal=627.509d0)
integer nat,mnat,nsur... | {"hexsha": "90cdd2bb0696f94dd63cae1acffa66358b531e73", "size": 2195, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "pot/1dso.f", "max_stars_repo_name": "kevinmooreiii/DiNT", "max_stars_repo_head_hexsha": "4ee1e573df9ea9c641eb3b496be4871554f44786", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nu... |
From Test Require Import tactic.
Section FOFProblem.
Variable Universe : Set.
Variable UniverseElement : Universe.
Variable wd_ : Universe -> Universe -> Prop.
Variable col_ : Universe -> Universe -> Universe -> Prop.
Variable col_swap1_1 : (forall A B C : Universe, (col_ A B C -> col_ B A C)).
Variable col_swap2_... | {"author": "janicicpredrag", "repo": "Larus", "sha": "a095ca588fbb0e4a64a26d92946485bbf85e1e08", "save_path": "github-repos/coq/janicicpredrag-Larus", "path": "github-repos/coq/janicicpredrag-Larus/Larus-a095ca588fbb0e4a64a26d92946485bbf85e1e08/benchmarks/coq-problems/col-trans/col_trans_0819.v"} |
from deap import tools
import numpy as np
from .base_strategy import BaseEvolutionStrategy
class DifferentialEvolution(BaseEvolutionStrategy):
def __init__(self, population_size=50, cr=.25, f=1.0, **kwargs):
super(DifferentialEvolution, self).__init__(**kwargs)
self.population_size = population... | {"hexsha": "9f9d642b68cfcdd96bcef59b677a17c548a43c0c", "size": 2404, "ext": "py", "lang": "Python", "max_stars_repo_path": "metric_learn/evolution/strategy/de.py", "max_stars_repo_name": "saviorabelo/metric-learn", "max_stars_repo_head_hexsha": "cc6df24e8525d6714810ca32d5d4eef494169d3d", "max_stars_repo_licenses": ["MI... |
import numpy as np
import os
import sys
import tensorflow as tf
import cv2
import imutils
import time
from imutils.video import FPS
from sklearn.metrics import pairwise
import copy
import pathlib
from collections import defaultdict
colors = np.random.uniform(0, 255, size=(100, 3))
font = cv2.FONT_HERSHEY_SIMPLEX
#... | {"hexsha": "7216462cef5eec101a75358540db6f5276fa0508", "size": 4608, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/lane_detection_utils.py", "max_stars_repo_name": "iamalex5156/Vehicle-Indicator-Toolset", "max_stars_repo_head_hexsha": "cfc46f408cf3cc04a4f0c0f8841189b9dc8ffc2c", "max_stars_repo_licenses":... |
import numpy as np
import jax
from momentum.hmc.hmc_within_gibbs import hmc_within_gibbs
from momentum.potential.correlated_topic_models import (
generate_correlated_topic_models_potential,
)
from momentum.utils import jax_prng_key
def draw_samples_hmc_within_gibbs(n_samples, w, mu, Sigma, beta, epsilon, L, mode... | {"hexsha": "7d1697800af383b883b7149690b3a9064ec14b9b", "size": 1040, "ext": "py", "lang": "Python", "max_stars_repo_path": "momentum/correlated_topic_models/hmc_within_gibbs.py", "max_stars_repo_name": "StannisZhou/mixed_hmc", "max_stars_repo_head_hexsha": "7925b3290c9ba692a2afbe06e102ea88a7cea511", "max_stars_repo_lic... |
# Temperature Modulation
const GLOBALKERNEL_ = Function[kse]
"Global Kernel"
function globalkernel!(k)
global GLOBALKERNEL_
GLOBALKERNEL_[1] = k
end
"Retrieve global kernel"
function globalkernel()
global GLOBALKERNEL_
GLOBALKERNEL_[1]
end
"Temporarily set global kernel"
function withkernel(thunk, k)
glob... | {"hexsha": "41031c8d94b803aa30e4c5ff925500d7157d34ad", "size": 1514, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/kernelctx.jl", "max_stars_repo_name": "zenna/SoftPredicates.jl", "max_stars_repo_head_hexsha": "d93edd825c5aed5608ea2c3aa18feba9a2b03b58", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import numpy as np
import block
import torch
import scipy.sparse as sp
default_type='torch.cuda.FloatTensor'
default_type='torch.FloatTensor'
class variable_size_graph():
def __init__(self, task_parameters):
# parameters
vocab_size = task_parameters['Voc']
nb_of_clust = task_par... | {"hexsha": "10d6c4c5b05622bc5ee902bf27f6c5508ad290b3", "size": 4492, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/labs_lecture19/lab02_graph_clustering/util/graph_generator.py", "max_stars_repo_name": "sanjaysaha1311/Deep_Learning_CS7454_2018_NTU", "max_stars_repo_head_hexsha": "3ab24cceb8cf4a7c2fe53e4b... |
""""
From https://github.com/utkuozbulak/pytorch-cnn-visualizations
"""
from dotenv import load_dotenv
import torchvision.transforms as transforms
from PIL import Image
import numpy as np
import torch
from torch.autograd import Variable
from torch import nn
import os
import copy
from PIL import Image
import matplotl... | {"hexsha": "f5faa63fbaf0e44d4a31b723ad7d874fd25dba1e", "size": 8880, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_exploration/network_visualization.py", "max_stars_repo_name": "Jakoviz/Infected-sweetpotato-classification", "max_stars_repo_head_hexsha": "003befcc5c430f41f8426d9ac94894e20fdfc247", "max_sta... |
[STATEMENT]
lemma iTrigger_empty[simp]: "P t0. t0 \<T> t1 {}. Q t1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. P t0. t0 \<T> t1 {}. Q t1
[PROOF STEP]
by (simp add: iTrigger_def) | {"llama_tokens": 90, "file": "Nat-Interval-Logic_IL_TemporalOperators", "length": 1} |
#MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"hexsha": "1ad09f2bc848a4bdf34e8e7f3db5d5a71c9e8bff", "size": 5560, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/system/dataproc/jobs/test_dimsum.py", "max_stars_repo_name": "MAhsanAkhtar/BDA_TERM_PROJECT", "max_stars_repo_head_hexsha": "68b0deb2b126f81924997b7d9f8c6c1ad53bbac0", "max_stars_repo_licens... |
SUBROUTINE XRGDTP
C****
C PURPOSE - XRGDTP DETERMINES A TYPE CODE FOR A CHARACTER
C
C AUTHOR - RPK CORPORATION; DECEMBER, 1983
C
C INPUT
C /XRGDXX/
C ICHAR AN ARRAY IN 80A1 FORMAT
C ICOL CURRENT ELEMENT IN THE ARRAY ICHAR
C
C OUTPUT
C /XRGDXX/
C ... | {"hexsha": "ed85195a4f9c925fe6ef7586ef91283a23feb3ef", "size": 1936, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mis/xrgdtp.f", "max_stars_repo_name": "ldallolio/NASTRAN-95", "max_stars_repo_head_hexsha": "6d2c175f5b53ebaec4ba2b5186f7926ef9d0ed47", "max_stars_repo_licenses": ["NASA-1.3"], "max_stars_count": ... |
"""
:code:`asymmetric_laplace.py`
Asymmetric Laplace Distribution, with location parameter 0. This is used as our NPI Effectiveness prior.
See also: https://en.wikipedia.org/wiki/Asymmetric_Laplace_distribution
"""
import pymc3.distributions.continuous as continuous
import theano.tensor as tt
import numpy as np
cla... | {"hexsha": "965a1c48b6b0b11f21a776b4f98f19a5500cc338", "size": 2557, "ext": "py", "lang": "Python", "max_stars_repo_path": "epimodel/pymc3_distributions/asymmetric_laplace.py", "max_stars_repo_name": "g-leech/masks_v_mandates", "max_stars_repo_head_hexsha": "44f78b14c095f10f5b7c1b2046c2d39ccbd868d3", "max_stars_repo_li... |
-- Convergent sequences of analytic functions
import analysis.analytic.basic
import analysis.calculus.fderiv_analytic
import analysis.complex.cauchy_integral
import analysis.complex.re_im_topology
import data.complex.basic
import data.real.basic
import data.real.ennreal
import data.real.nnreal
import data.real.pi.boun... | {"author": "girving", "repo": "ray", "sha": "e0c501756e067711e2d3667d4b1d18045d83a313", "save_path": "github-repos/lean/girving-ray", "path": "github-repos/lean/girving-ray/ray-e0c501756e067711e2d3667d4b1d18045d83a313/src/uniform.lean"} |
import os.path as path
import tensorflow as tf
import numpy as np
import cv2 as cv
# from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.contrib.learn.python.learn.datasets import mnist
def test-DatasetAPI():
num_epochs = 5
buffer_size = 11 * 5 + 1 # 大于样本数
batch_size = 11
filenames = [... | {"hexsha": "f4bf28740abbdc4cee945d2f42e45c5926dc0df2", "size": 3266, "ext": "py", "lang": "Python", "max_stars_repo_path": "input_pipeline_practice/test-TFRecordWriter.py", "max_stars_repo_name": "HustCoderHu/tensoflow_intro_practice", "max_stars_repo_head_hexsha": "77535e836fe5dab523d6847d5d6198052ce8ea0e", "max_stars... |
%!TEX root = ../main.tex
\subsection{Local Linearity}
\objective{Define derivatives and find numerical approximations}
When two variables grow proportionally to each other, they obey the algebraic relationship
$y=ax$. This means when one goes up, the other goes up, and visa versa. But many things
in nature are \... | {"hexsha": "ce7b3c8acae862ac989c1e893018b6c20a055f5d", "size": 2339, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ch03/0302.tex", "max_stars_repo_name": "aquatiki/AnalysisTextbook", "max_stars_repo_head_hexsha": "011c16427ada1b1e3df8e66c02566a5d5ac8abcf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2... |
import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
import numpy as np
from sklearn.metrics import mean_squared_error, r2_score
import csv
dataset = pd.read_csv('cleaned_further.csv',names = ['alpha','PIR', 'ptt',... | {"hexsha": "91c65256b123a76563824e81a5751c5b477c18d1", "size": 1898, "ext": "py", "lang": "Python", "max_stars_repo_path": "models_ML/svr.py", "max_stars_repo_name": "jeya-maria-jose/Cuff_less_BP_Prediction", "max_stars_repo_head_hexsha": "d8bac12e27b24046c71e8aa5391544d402bb5ef3", "max_stars_repo_licenses": ["MIT"], "... |
#!/usr/bin/env python3
# MIT License
# Copyright (c) 2018 The University of Michigan
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the r... | {"hexsha": "f316df5a540b169d5efdced51ea2a6fcda80dc06", "size": 32392, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/table_extraction/table_extraction_cnn.py", "max_stars_repo_name": "idea-fasoc/datasheet-scrubber", "max_stars_repo_head_hexsha": "0f649f25f199ebeeded46df36520c3f6f18a29b9", "max_stars_repo_li... |
import pandas as pd
import numpy as np
import tensorflow as tf
import Config
from tools import _get_data, _get_conf, get_label,auc_score
import random
import time
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
class xDeepFM(object):
def __init__(self):
self.total_emb, self.single_size, self.numerical_s... | {"hexsha": "f0671d1f58a4f7387174dec873ab8c4775327a51", "size": 22995, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeptrain0/xDeepFM/xDeepFM.py", "max_stars_repo_name": "HCH2CHO/KG18", "max_stars_repo_head_hexsha": "5d66bca2b6fd9d73af93b96ee58a5a204a0e51ea", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
\section{The Basic TSTL Test Tools}
Instead of the fault-free stack, we can test a real-world program with real faults, such as the SymPy library for performing symbolic mathematics in Python \cite{SymPy}. The SymPy harness can be found in the TSTL github repository {\tt examples/sympy} directory.
{\scriptsize
\begi... | {"hexsha": "018ddab84dda49ac334294317eb2f1e4478e8509", "size": 12998, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "deprecated/papers/issta17tool/example.tex", "max_stars_repo_name": "15821361594/python-automated-test", "max_stars_repo_head_hexsha": "c77dda6abf616c9dfcd052762c5b07bf4368ddde", "max_stars_repo_lic... |
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 07 22:41:34 2016
@author: Zhenqin Wu
"""
import numpy as np
from benchmark import benchmark_loading_datasets
import os
import time
import sys
from scipy.stats import truncnorm
# main layer
layer_sizes_0 = [1200]
weight_init_stddevs_0 = [0.02]
bias_init_consts_0 = [1.]
dr... | {"hexsha": "5a2df3a3e3c6db6fe414b16849da90e9d5ec90df", "size": 4123, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/benchmark_hyperparam_search.py", "max_stars_repo_name": "KEHANG/deepchem", "max_stars_repo_head_hexsha": "367bea14cab47b1093bf106e0c196bb02d55c755", "max_stars_repo_licenses": ["MIT"], "m... |
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and And... | {"hexsha": "e1cd70408efed13b043468ff7a9ff80a99206971", "size": 9296, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/numeric/mtl/utility/range_generator.hpp", "max_stars_repo_name": "lit-uriy/mtl4-mirror", "max_stars_repo_head_hexsha": "37cf7c2847165d3537cbc3400cb5fde6f80e3d8b", "max_stars_repo_licenses": ["... |
\documentclass{article}\usepackage[]{graphicx}\usepackage[]{color}
%% maxwidth is the original width if it is less than linewidth
%% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\... | {"hexsha": "fbda627b06b0db9e52003e750e1e9583689322b2", "size": 16431, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notebooks/compare_models_moreiterations.tex", "max_stars_repo_name": "bjsmith/reversallearning", "max_stars_repo_head_hexsha": "023304731d41c3109bacbfd49d4c850a92353978", "max_stars_repo_licenses":... |
function coeff = fourier_comp(func,m,L)
%FOURIER_COMP Numerically evaluate Fourier series coefficient.
% coeff = fourier_comp(func,m,L) tries to approximate the function func
% from -L to L with m term Fourier series using quad (MATLAB functions).
% func is a function handle, should accept a vector argument x and retur... | {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/24779-fourier-series-calculator/fourier_comp... |
C the problem is to have coherent effects or regions at foo
C and bar call sites for variable /env/ a.
program env_reg
C regions and environment
call foo
call bar
end
subroutine foo
common /env/ a(10), b(10)
do i = 1, 10
a(i) = 0.
enddo
... | {"hexsha": "45c3c0a3cd6dfb61f91333e90b58ffe73706771c", "size": 442, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/Regions/Old.sub/env_reg.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses": ... |
from sklearn.linear_model import LogisticRegression
from commons import variables
from commons import tools
from scipy.stats import mode
def learn(x, y, test_x):
# set sample weight
weight_list = []
for j in range(len(y)):
if y[j] == "0":
weight_list.append(variables.weight_0_lr)
... | {"hexsha": "93757cc9c5b51b2859de45198ebf42a0e7187e5a", "size": 695, "ext": "py", "lang": "Python", "max_stars_repo_path": "learning_algorithm/logistic_regression_blending.py", "max_stars_repo_name": "Bermuhz/DataMiningCompetitionFirstPrize", "max_stars_repo_head_hexsha": "e0202ceeb99fc6cb869906fd8e7cc79a173a315e", "max... |
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split, RandomizedSearchCV
from sklearn.model_selection import cross_validate
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, ExtraTreesClassifier
... | {"hexsha": "59ad54c30aca1f15a597313561ab5979229ac538", "size": 10909, "ext": "py", "lang": "Python", "max_stars_repo_path": "titanicprocessing.py", "max_stars_repo_name": "tugrulguner/titanicanalysis", "max_stars_repo_head_hexsha": "fcfb0a23a6d81b8ca00ab9288a3140631155af53", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
def generate_pscm(p, ratio, pr_edge, pr_exo):
"""
Generate a linear P-SCM with given parameters.
:param p: Number of observed variables.
:param ratio: Source to observed node ratio.
:param pr_edge: Probability of a causal connection between two observed variables
... | {"hexsha": "a61f18f28fe369e57c4e2158a90f8234fffbdc20", "size": 3880, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Yuqin-Yang/propagation-scm", "max_stars_repo_head_hexsha": "7374866e35fa462d59aa8f7431706f5f003990b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
'''Module implementing the multilevel constraint decomposition (MCD) method
for the classical obstacle problem, i.e. for a linear interior PDE like the
Poisson equation.'''
__all__ = ['mcdlvcycle', 'mcdlfcycle', 'mcdlsolver']
import numpy as np
from monitor import indentprint, ObstacleMonitor
def _levelreport(indent... | {"hexsha": "a17bd9e034e6d37c4467831fb63c72e79e3b6098", "size": 5575, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/mcdl.py", "max_stars_repo_name": "bueler/mg-glaciers", "max_stars_repo_head_hexsha": "649c323f18f31a332c0845bf3955d201cd4c3cf8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
import json
import math
import os
import numpy as np
from PIL import Image
reference_colors = (
(155, 188, 15),
(139, 172, 15),
(48, 98, 48),
(15, 56, 15),
)
TILE_SIZE = 16
class Tile:
def __init__(self, image):
if isinstance(image, str):
image = np.array(Image.open(image))
... | {"hexsha": "333c950f99b8c4442a643a0be6bf24bcdd81fd8c", "size": 4850, "ext": "py", "lang": "Python", "max_stars_repo_path": "remake/main.py", "max_stars_repo_name": "vpoupet/GameBoy", "max_stars_repo_head_hexsha": "c87408db67878f6f3cae6acccaeff8bc0e09fadf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "max_... |
function betweenScanMotEst(view, baseScan, targetScans)
%
% betweenScanMotEst(view, baseScan, targetScans)
%
% Robust 3D rigid body motion estimation between MEAN MAPS of different scans
%
% 04/05 Ress, rewritten from betweenScanMotComp.m
if ~exist('baseScan', 'var'), baseScan = selectScans(view, 'Select base scan'); ... | {"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrBOLD/MotionComp/betweenScanMotEst.m"} |
from skimage import io
import matplotlib.pyplot as plt
import argparse
import os, glob
from pathlib import Path
import skimage.io
import skimage.external.tifffile as skitiff
import glob
import random
import shutil, matplotlib
import numpy as np
BINS_RGB = 256
BINS_DEPTH = 1024
MAX_FILE = 10
HOME_PATH = str(Path.home(... | {"hexsha": "1a015ddb3f91eb3cf8eba9c1a86abdf164a7396c", "size": 2027, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/image_info.py", "max_stars_repo_name": "asyrovprog/cs230project", "max_stars_repo_head_hexsha": "cc9aebe256393b39140f69a2f31d1e9688c1e3d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
[STATEMENT]
lemma Outpts_A_Card_form_10:
"\<lbrakk> Outpts (Card A) A \<lbrace>Agent B, Nonce Nb, Key K, Certificate\<rbrace>
\<in> set evs; evs \<in> srb \<rbrakk>
\<Longrightarrow> K = sesK(Nb,pairK(A,B)) \<and>
Certificate = (Crypt (pairK(A,B)) (Nonce Nb))"
[PROOF STATE]
proof (prove... | {"llama_tokens": 2682, "file": null, "length": 3} |
import argparse
import logging
import os
import glob
import nni
import numpy as np
import torch
import torch.nn as nn
from torch.nn import CrossEntropyLoss
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from fastprogress.fastprogress import master_bar, progress_bar
from attrdict import AttrD... | {"hexsha": "60c45ae7b6dfe2f6a5e11ad89c192ab2f756cfe6", "size": 17720, "ext": "py", "lang": "Python", "max_stars_repo_path": "finetune/run_finetune.py", "max_stars_repo_name": "krevas/Dialog-KoELECTRA", "max_stars_repo_head_hexsha": "d3db9d760741d6ec0c199dbc8f1b88e175e1d2f0", "max_stars_repo_licenses": ["Apache-2.0"], "... |
! This function checks whether the argument is a valid floating point number
Logical Function CheckNaN(Number)
!
Implicit None
Real :: Number
!
CheckNaN=.False.
If (Number .gt. Huge(Number)) then
! Print *,'Larger than Huge'
CheckNan=.True.
End if
If (Number .lt. -Huge(Number)) then
! Print *,'Smaller than -Hu... | {"hexsha": "5e5d9b2553d220ad388c5f3ab8d37b2258a4ef88", "size": 683, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "inversor/database/NICOLE/misc/checknan.f90", "max_stars_repo_name": "aasensio/DeepLearning", "max_stars_repo_head_hexsha": "71838115ce93e0ca96c8314cff3f07de1d64c235", "max_stars_repo_licenses": [... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# '@webio':
# lastCommId: a8ab2762cccf499696a7ef0a86be4d18
# lastKernelId: 261999dd-7ee7-4ad4-9a26-99a84a77979b
# cite2c:
# citations:
# 6202365/8AH9AXN2:
# URL: http://econ.jhu.edu/people/ccarroll/papers/BufferStockTheory.pdf
# author:
# ... | {"hexsha": "e340d2a8695ccbb8f30f4fbf001bac338ff6224e", "size": 13765, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/notebooks/BufferStock-HARK-vs-dolo.py", "max_stars_repo_name": "iworld1991/dolo", "max_stars_repo_head_hexsha": "d70ccbe1254c8fc9a4fb8b0f7f2524140deebaf5", "max_stars_repo_licenses": ["B... |
[STATEMENT]
lemma deciding_mult:
assumes tr: "trans S" and ir: "irrefl S"
shows "(N,M) \<in> mult S = (M \<noteq> N \<and> (\<forall> b \<in># N - M. \<exists> a \<in># M - N. (b,a) \<in> S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ((N, M) \<in> mult S) = (M \<noteq> N \<and> (\<forall>b\<in>#N - M. \<e... | {"llama_tokens": 5114, "file": "Multiset_Ordering_NPC_Multiset_Ordering_More", "length": 44} |
import numpy as np
import torch
from tqdm import tqdm # for displaying progress bar
import os
import pandas as pd
from jiwer import wer as compute_WER
class Trainer:
def __init__(self, model, config):
self.model = model
self.config = config
self.lr = config.lr
self.lr_period = config.lr_period
self.gamma = ... | {"hexsha": "41b3272ac541d9d66088afa855e881844dac3e1f", "size": 7418, "ext": "py", "lang": "Python", "max_stars_repo_path": "training.py", "max_stars_repo_name": "lorenlugosch/conditional-computation-using-surprisal", "max_stars_repo_head_hexsha": "c5bdeeea7fefb60a7f55ef021e2b4a259f9d2e54", "max_stars_repo_licenses": ["... |
#include "visibility_test_lib.hpp"
#include <boost/throw_exception.hpp>
void
BOOST_SYMBOL_EXPORT
hidden_throw()
{
BOOST_THROW_EXCEPTION(my_exception() << my_info(42));
}
| {"hexsha": "6e566fe7c0ad4f71d4aa0224e6474d8cfcc48bdc", "size": 174, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/visibility_test_lib.cpp", "max_stars_repo_name": "DanielaE/boost.exception", "max_stars_repo_head_hexsha": "3ae756dd491f179c28e6660dd9625265535afee9", "max_stars_repo_licenses": ["BSL-1.0"], "ma... |
"""
Copyright (c) Facebook, Inc. and its affiliates.
"""
import random
import re
import numpy as np
from typing import List, Tuple, Union, Optional
# TODO with subinterpret
from droidlet.lowlevel.minecraft.craftassist_cuberite_utils import block_data
from droidlet.interpreter.craftassist import size_words
from .block... | {"hexsha": "965f62fc2031b4e6fec7f7b22e7ff9b2ecd4a575", "size": 9619, "ext": "py", "lang": "Python", "max_stars_repo_path": "droidlet/interpreter/craftassist/schematic_helper.py", "max_stars_repo_name": "adamlerer/droidlet", "max_stars_repo_head_hexsha": "ada38d191dadcea9aba12330e35e8e7d6d1663d9", "max_stars_repo_licens... |
"""Module for handling operations on both databases: media and clusters."""
import itertools
import logging
import multiprocessing
from pathlib import Path
import pandas as pd
from filecluster.configuration import Config, CLUSTER_DF_COLUMNS
from filecluster.filecluster_types import ClustersDataFrame
from filecluster.... | {"hexsha": "82a0d127759faf66dccb0524e498a3da80d5ec7b", "size": 3002, "ext": "py", "lang": "Python", "max_stars_repo_path": "filecluster/dbase.py", "max_stars_repo_name": "izikeros/filecluster", "max_stars_repo_head_hexsha": "3604dc3ba24147ccb5874ad73a364a72f70d45a2", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env Rscript
#===============================================================================
# TITLE : heatmap-engine.r
# ABSTRACT : An R script that creates gene transcription and gene binding
# heatmaps from combined gene activity TSV files
#
# AUTHOR : Dennis Aldea <dennis.aldea@gmail.com... | {"hexsha": "5c14877c2164ec91699b49ed545285455ec5a477", "size": 9438, "ext": "r", "lang": "R", "max_stars_repo_path": "src/heatmap-engine.r", "max_stars_repo_name": "daldea/genetic-heatmap", "max_stars_repo_head_hexsha": "26d04914be3ec427a665b17accde2b27a298d0ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
\subsection{Documentation and examples}
\label{sec:comp:doctest}
Derived from \S\ref{sec:design:test}.
Across the codebase there are scripts, example code, and other utilities.
Often these are lurking in \texttt{examples} directories in stack packages.
Occasionally they are exposed as Jupyter notebooks, sometimes liv... | {"hexsha": "61a17cff5491e43b99390338d78e9a17983e5a88", "size": 3012, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "components/examples.tex", "max_stars_repo_name": "lsst-dm/dmtn-085", "max_stars_repo_head_hexsha": "559239d28f6abb0c2e41fa28116608d56e66b2f0", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_co... |
\documentclass[11pt,a4paper]{article}
\usepackage[hidelinks]{hyperref}
\begin{document}
\title{Project Proposal -- Voxel Populi:\\ A Decentralised Peer-to-Peer Voxel-Based World}
\author{Samuel J. Sully}
\date{25 October 2019}
{\let\newpage\relax\maketitle}
\thispagestyle{empty}
\noindent
\textbf{Project S... | {"hexsha": "5e8a3894b019b57dec50980ff2cc2b46c85fa855", "size": 17550, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Proposal/proposal.tex", "max_stars_repo_name": "Abrasam/Part-II-Project", "max_stars_repo_head_hexsha": "bf2ac2c8a9a87859ad9fb189405d7ce76e19a8f4", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import pprint
from bs4 import BeautifulSoup
from astropy.extern.six.moves.urllib import parse as urlparse
from astropy.extern import six
from astropy import units as u
from . import conf
from ..query import BaseQuery
from ..utils import prepend_docstr_nos... | {"hexsha": "73fb262e83877e47483821a998ec841235d712d7", "size": 14161, "ext": "py", "lang": "Python", "max_stars_repo_path": "astroquery/skyview/core.py", "max_stars_repo_name": "hdevillepoix/astroquery", "max_stars_repo_head_hexsha": "ce8c500c28424fe841e04741d4230b8f695ee194", "max_stars_repo_licenses": ["BSD-3-Clause"... |
Soothing Energy Massage is the mobile massage business of Daniel Troglin he comes to you. Each massage is individually tailored to meet the needs of your mind, body, and soul, and you will be given the time and care you deserve. At all times, your well being comes first and foremost. Daniel has both a massage tab... | {"hexsha": "dcda5d4441398c3457d39be25931d3e586f90321", "size": 691, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Soothing_Energy_Massage.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_s... |
import jax.numpy as np
import numpy as onp
import pandas as pd
from jax import grad
from jax.experimental.optimizers import adam, sgd
from fundl.datasets import make_simple_sequence
from fundl.layers import dense
from fundl.layers.rnn import gru, lstm
from fundl.losses import _mse_loss
from fundl.weights import add_de... | {"hexsha": "8babc39b83f8eedab1b224a657855ee7e0530a5d", "size": 1729, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/rnn.py", "max_stars_repo_name": "ElArkk/fundl", "max_stars_repo_head_hexsha": "04b126d484f77e480196a24849683df93a0eabd8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 15, "max_s... |
import warnings
from collections.abc import Callable, Iterable
import matplotlib.cm as cm
import numpy as np
from matplotlib import get_backend
from matplotlib.colors import TABLEAU_COLORS, XKCD_COLORS, to_rgba_array
from matplotlib.path import Path
from matplotlib.pyplot import close, subplots
from matplotlib.widgets... | {"hexsha": "7f9d1b92ad89f6ff3df5c4b60e7af8a47bfd40a0", "size": 26348, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpl_interactions/generic.py", "max_stars_repo_name": "AntHoneyLam/mpl-interactions", "max_stars_repo_head_hexsha": "2ef46db1eb04479535bcc1ff033c0ac1a955735b", "max_stars_repo_licenses": ["BSD-3-C... |
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.colors as colors
from mpl_toolkits.axes_grid1 import make_axes_locatable
from copy import copy
def get_kernel(w,p,ktype='donut',show=True):
"""
w is the outer boundary
p id the inne... | {"hexsha": "7a855ff4a3e2f44f4415ee4b73dc26a9e35275fb", "size": 8715, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotools.py", "max_stars_repo_name": "sergpolly/cooloop", "max_stars_repo_head_hexsha": "de6946f4455346c952de3f495fb89d4603da2910", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
import numpy as np
# Helper functions for setting up obstacle environments, simulating
# dynamics, etc.
# Parameters
def get_parameters():
params = {} # Initialize parameter dictionary
# number of rays for sensor measurements for control
params['num_rays_control'] = 30
# number of rays for sensor m... | {"hexsha": "1427ab78d882b374db11e06047eca2362e269de0", "size": 13250, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_network_lyapunov/examples/car/utils_simulation.py", "max_stars_repo_name": "hongkai-dai/neural-network-lyapunov-1", "max_stars_repo_head_hexsha": "8843c13f69f7f39cbb939ab250413e76f61843f6"... |
[STATEMENT]
lemma B_trusts_NS3: "[| evs \<in> nsp; A \<notin> bad; B \<notin> bad |] ==> ns2 B A NA NB \<in> set evs
\<longrightarrow> Crypt (pubK B) (Nonce NB) \<in> parts (spies evs) \<longrightarrow> ns3 A B NB \<in> set evs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>evs \<in> nsp; A \<notin> bad; B... | {"llama_tokens": 5974, "file": null, "length": 9} |
r"""
Points on affine varieties
Scheme morphism for points on affine varieties
AUTHORS:
- David Kohel, William Stein
- Volker Braun (2011-08-08): Renamed classes, more documentation, misc
cleanups.
- Ben Hutz (2013)
"""
# Historical note: in trac #11599, V.B. renamed
# * _point_morphism_class -> _morphism
# *... | {"hexsha": "2955de86861c9db1486f51d8610a263e3a71c13a", "size": 13218, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/schemes/affine/affine_point.py", "max_stars_repo_name": "switzel/sage", "max_stars_repo_head_hexsha": "7eb8510dacf61b691664cd8f1d2e75e5d473e5a0", "max_stars_repo_licenses": ["BSL-1.0"], ... |
[STATEMENT]
lemma PO_m2_leak_refines_m1_leak:
"{R12}
(m1_leak Rs), (m2_leak Rs)
{> R12}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. {R12} m1_leak Rs, m2_leak Rs {> R12}
[PROOF STEP]
by (simp add: PO_rhoare_defs R12_def m2_defs, safe, auto) | {"llama_tokens": 145, "file": "Security_Protocol_Refinement_Key_establish_m2_ds", "length": 1} |
"""
Clump finder tests
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2016, yt Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------... | {"hexsha": "d8c6ed33dbacb2c0adb0ad9fec65f1d9cba3d4f6", "size": 2161, "ext": "py", "lang": "Python", "max_stars_repo_path": "yt/analysis_modules/level_sets/tests/test_clump_finding.py", "max_stars_repo_name": "bkhamesra/yt-EinsteinToolkit", "max_stars_repo_head_hexsha": "576bf88b5cd706fd577c513c23b1db07ec5f4cd2", "max_s... |
import argparse
import os
import numpy as np
import tensorflow as tf
from hparams import hparams, hparams_debug_string
from infolog import log
from tqdm import tqdm
from wavenet_vocoder.synthesizer import Synthesizer
def run_synthesis(args, checkpoint_path, output_dir, hparams):
log_dir = os.path.join(output_dir, '... | {"hexsha": "e9d87b527b278b7eb2624660a2e392a2498fc69b", "size": 2689, "ext": "py", "lang": "Python", "max_stars_repo_path": "wavenet_vocoder/synthesize.py", "max_stars_repo_name": "rickyHong/Tacotron2-deepmind-update-repl", "max_stars_repo_head_hexsha": "a94b9d2b1bfa76bc42edcde747d435065008c113", "max_stars_repo_license... |
"""
Kriging geographical data
-------------------------
In this example we are going to interpolate actual temperature data from
the German weather service `DWD <https://www.dwd.de/EN>`_.
"""
import os
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import gstools as gs
border = np.loadtxt... | {"hexsha": "4d2a87e112e12531cd59f98cfa8e3960f2673d78", "size": 5442, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/01_dwd_krige.py", "max_stars_repo_name": "GeoStat-Examples/gstools-temperature-trend", "max_stars_repo_head_hexsha": "75e9f1a98bc29c126a6598c01a5067388cab13c4", "max_stars_repo_licenses": ["MI... |
from pathlib import Path
from typing import Union
import numpy as np
from .inception import create_conv_features
from .metrics.frechet_distance import compute_fid
from .metrics.inception_score import compute_is
from .metrics.precision_recall_distributions import compute_prd_from_embedding
def load_npy(path: Union[str... | {"hexsha": "26dc341e00a64b9080bcf9b2d97c25b5bc8b0040", "size": 4114, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/video/score.py", "max_stars_repo_name": "roeiherz/AG2Video", "max_stars_repo_head_hexsha": "a4eb439d7147c91237ddd50ec305add8e1537360", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
Implements the maximum marginal relevance (MMR) algorithm and related
functionality
"""
import numpy as np
from utils.logger import get_logger
from .diversity import load_similarity_func, gaussian_similarity
# Global variable for logging
logger = get_logger()
DEFAULT_SIMILARITY = gaussian_similarity()
# Note f... | {"hexsha": "908cb571101c9c50b1612081f2bd73915a658cee", "size": 22957, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/jewel/prioritize.py", "max_stars_repo_name": "JPLMLIA/OWLS-Autonomy", "max_stars_repo_head_hexsha": "aa3b11451c3c58929e53c45c2b8cd65206f53072", "max_stars_repo_licenses": ["RSA-MD"], "max_sta... |
import torch
import numpy as np
from ..registry import Problem
from ..runners import GymRunner
from ..runners import BaseRunner
class GymProblem(Problem):
"""
This problem implements a Problem class to handle
Gym related environments.
.. note::
Any :class:`~torchrl.registry.problems.HParams` supplied... | {"hexsha": "4434329f3e05a44b1960b477d698e28fe3693733", "size": 3049, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchrl/problems/gym_problem.py", "max_stars_repo_name": "srikarym/torchrl", "max_stars_repo_head_hexsha": "fee98e78ac1657a2c9a4063dd8d63ba207a121e2", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
"""
adapt_to_mesh_level!(u_ode, semi, level)
adapt_to_mesh_level!(sol::Trixi.TrixiODESolution, level)
Like [`adapt_to_mesh_level`](@ref), but modifies the solution and parts of the
semidiscretization (mesh and caches) in place.
"""
function adapt_to_mesh_level!(u_ode, semi, level)
# Create AMR callback with ... | {"hexsha": "9f7cdc90b33b932286d493fd2271e7db361aad6f", "size": 1937, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/visualization/adapt.jl", "max_stars_repo_name": "jbreue16/Trixi.jl", "max_stars_repo_head_hexsha": "f6de21b834ceb9b9a5295cbf6b221ab297c279f0", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import numpy as np
import matplotlib.pylab as plt
import re
from lmfit import minimize, Parameters, fit_report
# generate synthetic data with noise
x = np.linspace(0, 100)
np.random.seed(10)
eps_data = np.random.normal(size=x.size, scale=0.2)
data = 7.5 * np.sin(x*0.22 + 2.5) * np.exp(-x*x*0.01) + eps_data
variabl... | {"hexsha": "397f0e3a511026927867b69ed3ba46bcb1e2ef29", "size": 1006, "ext": "py", "lang": "Python", "max_stars_repo_path": "pythonfit/main.py", "max_stars_repo_name": "StephenSmith25/ft", "max_stars_repo_head_hexsha": "b18f811fc70223dfe86894acf00b8062eebde299", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count... |
#!/Users/keli/anaconda3/bin/python
import sys
import numpy as np
import XYZReader
import networkx as nx
import seaborn as sns
import matplotlib.pyplot as plt
class Connection:
def __init__(self, boxsize, Otype = '63', Htype = '64'):
self.dimensions = np.array([boxsize, boxsize, boxsize])
self.H... | {"hexsha": "6f49361730bd9e7fde8e707876c21464890c9ec1", "size": 4492, "ext": "py", "lang": "Python", "max_stars_repo_path": "HBondNetwork2.py", "max_stars_repo_name": "like201707/Tmp_share", "max_stars_repo_head_hexsha": "39fdeb848780c7b9462b9a9eeaae845755079847", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
#include <boost/fusion/include/adapt_struct.hpp>
| {"hexsha": "8755d0ba9ebcd1eee00a388cc4844df49a1470e4", "size": 49, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_include_adapt_struct.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["B... |
from sacred import Experiment
from tqdm import tqdm
from Config import config_ingredient
import tensorflow as tf
import numpy as np
import os
import Datasets
import Utils
import Models.MixWaveUNet
import Test
import functools
ex = Experiment('Waveunet Training', ingredients=[config_ingredient])
@ex.config
# Execut... | {"hexsha": "165073c352669bbf68727fabb57b8dd96dcea682", "size": 6409, "ext": "py", "lang": "Python", "max_stars_repo_path": "Training.py", "max_stars_repo_name": "ayalapr/Mix-Wave-U-Net", "max_stars_repo_head_hexsha": "d3f5e17fdd8aa08c548bc26a395ab18128e3d9b4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import unittest
from connectome.preprocessing.graph_metrics import get_graph_metrics, \
get_gms_from_pd, pd_to_arrays, is_conn_col
from connectome.preprocessing.data_loader import flat_to_mat
import numpy as np
import pandas as pd
from typing import List
# checking the is_conn_col() function
test_names = ["1_2", "... | {"hexsha": "f14f971b0d174097b5d06ccca9bf88284b70c044", "size": 1596, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_graph_metrics.py", "max_stars_repo_name": "JanaGauss/Connectome", "max_stars_repo_head_hexsha": "9b59aabfb4040201c72d7ff239b50bb47f092ad1", "max_stars_repo_licenses": ["MIT"], "max_star... |
import sys
sys.path.append('core')
from PIL import Image
import argparse
import os
import time
import numpy as np
import torch
import torch.nn.functional as F
import matplotlib.pyplot as plt
import datasets
from utils import flow_viz
from utils import frame_utils
from raft import RAFT
from utils.utils import InputPa... | {"hexsha": "f369b2498a4cefc919dc7461eb05bf5c2fa4f16c", "size": 21347, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "Guominyingxiongququ/RAFT", "max_stars_repo_head_hexsha": "04c1bbf2cf404489c7b5fa082a8b883e4df231e7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_... |
import sys
import subprocess as sp
import numpy
from random import shuffle
# python split.py N_APPLICATIONS REVIEWERS
reviewers = sys.argv[2].split(',')
apps = [x for x in range(1, int(sys.argv[1]) + 1)]
shuffle(apps)
for idx, line in enumerate(numpy.array_split(apps, len(reviewers))):
pdfs = [f'build/split.d/{x... | {"hexsha": "2586ffa00f7360ec9811ee13a4a10e5f9b8060d6", "size": 568, "ext": "py", "lang": "Python", "max_stars_repo_path": "etc/pdf-split-shuffle-partition/doit.py", "max_stars_repo_name": "3vivekb/hail", "max_stars_repo_head_hexsha": "82c9e0f3ec2154335f91f2219b84c0fb5dbac526", "max_stars_repo_licenses": ["MIT"], "max_s... |
[STATEMENT]
lemma below_monic_ValKF [iff]:
"below_monic_cfun ValKF"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. below_monic_cfun ValKF
[PROOF STEP]
by (rule below_monicI) simp | {"llama_tokens": 84, "file": "PCF_Continuations", "length": 1} |
from skimage.measure import compare_ssim
import numpy as np
import imageio
def imsave(nm, img):
if len(img.shape) == 4:
img = np.squeeze(img, 0)
img = np.uint8(np.clip(img,0,1) * 255.)
imageio.imsave(nm, img)
def get_mse(pred, gt):
return np.mean(np.square(pred-gt))
def get_psnr(pred, gt):
... | {"hexsha": "4d3934ef5b8c93838611698cf3a848f09fdc9b61", "size": 681, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/np_utils.py", "max_stars_repo_name": "likesum/deepFnF", "max_stars_repo_head_hexsha": "461d93de15a642bda75c7ef15937a01e1c5575e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "ma... |
#!/usr/bin/python
import argparse
from operator import itemgetter
from itertools import starmap
import numpy as np
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import LeaveOneOut
from sklearn.preprocessing import normalize
if __name__ == '__main__':
parser = argparse.ArgumentPar... | {"hexsha": "6a2230bbcdb5227a6b8ae48d12b919f3cfb64fc0", "size": 1568, "ext": "py", "lang": "Python", "max_stars_repo_path": "knn/sklearn_check.py", "max_stars_repo_name": "kravtsun/au-ml", "max_stars_repo_head_hexsha": "a9e354c14d4df8d1e4569e7f6cfa2fdad060522f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# pylint: disable=no-self-use
from random import randrange
from unittest import mock, TestCase
import networkx
from angr.code_location import CodeLocation
from angr.knowledge_plugins.key_definitions.dataset import DataSet
from angr.knowledge_plugins.key_definitions.atoms import Atom, Register
from angr.knowledge_plug... | {"hexsha": "e01a74884b6d8f726af892ade127e90fdf6ac298", "size": 5821, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/analyses/reaching_definitions/test_dep_graph.py", "max_stars_repo_name": "mbrattain/angr", "max_stars_repo_head_hexsha": "614978bbd4bf861dd4d5a101584c04d5ca2122bc", "max_stars_repo_licenses"... |
(* Title: HOL/Algebra/RingHom.thy
Author: Stephan Hohe, TU Muenchen
*)
theory RingHom
imports Ideal
begin
section {* Homomorphisms of Non-Commutative Rings *}
text {* Lifting existing lemmas in a @{text ring_hom_ring} locale *}
locale ring_hom_ring = R: ring R + S: ring S
for R (structure) and S (s... | {"author": "Josh-Tilles", "repo": "isabelle", "sha": "990accf749b8a6e037d25012258ecae20d59ca62", "save_path": "github-repos/isabelle/Josh-Tilles-isabelle", "path": "github-repos/isabelle/Josh-Tilles-isabelle/isabelle-990accf749b8a6e037d25012258ecae20d59ca62/src/HOL/Algebra/RingHom.thy"} |
[STATEMENT]
lemma parts_insert_Hash [simp]:
"parts (insert (Hash X) H) = insert (Hash X) (parts H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. parts (insert (Hash X) H) = insert (Hash X) (parts H)
[PROOF STEP]
apply (rule parts_insert_eq_I)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>x. x \<in> ... | {"llama_tokens": 209, "file": "Inductive_Confidentiality_GeneralAttacker_MessageGA", "length": 3} |
[STATEMENT]
lemma fmempty_transfer[simp, intro, transfer_rule]: "fmrel P fmempty fmempty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. fmrel P fmempty fmempty
[PROOF STEP]
by transfer auto | {"llama_tokens": 78, "file": null, "length": 1} |
from data import DataPreparation, Query, result_df, r_squared
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, LSTM
from keras import optimizers
from keras.preprocessing.sequence import TimeseriesGenerator
from sklearn.preprocessi... | {"hexsha": "a6f5c5b881dc0b1b5cc3b48c70ca0d6c7ac864d0", "size": 2731, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_modules/lstm_model.py", "max_stars_repo_name": "taswani/amazon_stock_prediction_app", "max_stars_repo_head_hexsha": "88fff09750dd9ea3b9a7bac68eca00bcc28f8061", "max_stars_repo_licenses": ["MI... |
\begin{myenv}
\chapter[ for the toc for the toc]{ \emph{emphasise} title text title text title text title text title text title text }
body text body text body text body text body text body text%
\section{section text}
section body%
\section{section text}
section body%
\chapter{second chapter}
chapter body ... | {"hexsha": "a1fa3bfd7de9b5913d69dab1fb22bb60d81f021c", "size": 345, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "project/server/dependencies/latexindent.pl-master/test-cases/headings/headings-single-line-comment-mod1.tex", "max_stars_repo_name": "digorithm/latex-linter", "max_stars_repo_head_hexsha": "d6b63002c... |
import numpy as np
import scipy as sp
import trefide.extras.tools as tools_
# cython
def kurto_one(x):
"""
Computer kurtosis of rows of x with 2D (d x T)
Outputs: idx of components with kurtosis > population mean + std
"""
# Compute kurtosis
kurt = sp.stats.kurtosis(x, axis=1, fisher=True, b... | {"hexsha": "dde44dea059b92ed626d1873b7067f8515196e12", "size": 8732, "ext": "py", "lang": "Python", "max_stars_repo_path": "trefide/trefide/extras/greedyPCA.py", "max_stars_repo_name": "hijizhou/NeuronDemix", "max_stars_repo_head_hexsha": "493151de568da608e3306ff04f233641be6e5b04", "max_stars_repo_licenses": ["MIT"], "... |
/* Copyright (c) 2014 Vinícius dos Santos Oliveira
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 BOOST_HTTP_ALGORITHM_HPP
#define BOOST_HTTP_ALGORITHM_HPP
#include <boost/http/algorithm/header.hpp>
#... | {"hexsha": "a2f5602f4d404c7561346901911e1fe4503d2c78", "size": 439, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/http/algorithm.hpp", "max_stars_repo_name": "seem-sky/boost.http", "max_stars_repo_head_hexsha": "63595fa281eb63c84c3975651c807a2970776a9a", "max_stars_repo_licenses": ["BSL-1.0"], "max... |
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "e8dcd6e432963035379632c76c05b12dda37b027", "size": 21909, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/debug/lib/debug_events_monitors_test.py", "max_stars_repo_name": "yage99/tensorflow", "max_stars_repo_head_hexsha": "c7fa71b32a3635eb25596ae80d007b41007769c4", "max_stars_repo_l... |
Require Import List.
Require Import Arith.
Import ListNotations.
Definition serializer (A: Type) := A -> list bool.
Definition deserializer (A: Type) := list bool -> option (A * nat).
Definition ser_deser_spec (A: Type) (ser : serializer A) (deser : deserializer A) :=
forall a : A, forall bools : list bool,
... | {"author": "pensono", "repo": "Ethan-Cheerios", "sha": "f214e92e02bbeebd93c06c44efd73782325a44fa", "save_path": "github-repos/coq/pensono-Ethan-Cheerios", "path": "github-repos/coq/pensono-Ethan-Cheerios/Ethan-Cheerios-f214e92e02bbeebd93c06c44efd73782325a44fa/cheerios_nat.v"} |
[STATEMENT]
lemma coeff_zero [simp]: "coeff P \<zero>\<^bsub>P\<^esub> n = \<zero>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. coeff P \<zero>\<^bsub>P\<^esub> n = \<zero>
[PROOF STEP]
by (auto simp add: UP_def) | {"llama_tokens": 95, "file": null, "length": 1} |
import argparse
import os
import shutil
import time
import numpy
import torch
import torch.nn as nn
import copy
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import resnet
LOSS_... | {"hexsha": "8d8a5c3e9fcff82e2fcf952f12aa185c03204f84", "size": 18383, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "ZhangHangTao/DNN-Hardware-Fault-Attacks-", "max_stars_repo_head_hexsha": "013eea7fb7dd2f44e2ed8504e1c1aa1b7bc1efd6", "max_stars_repo_licenses": ["BSD-2-Clause... |
import pandas as pd
import numpy as np
import csv
import random
import re
import os
from datetime import date
import inflect
inflector = inflect.engine()
def generalized_callback(pattern, selector, entity_map,id):
#wanted to write a generalized callback,
#but it interfered with entity updating
pass
def... | {"hexsha": "c383623ae6c47096735aaee2376046205d7f5d1a", "size": 38109, "ext": "py", "lang": "Python", "max_stars_repo_path": "anonymize.py", "max_stars_repo_name": "eisenzopf/redactomatic", "max_stars_repo_head_hexsha": "90a9f2b316789e1b537e0a8a956eff8ef3cd4917", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4,... |
using .MDP
using Printf
# Only needed for rle function
using StatsBase
L = 100
alpha = [0.75 0.75]
P = [ alpha[1] 1-alpha[1]
1 - alpha[2] alpha[2] ]
# Initialize xi (could be optimized)
xi = [ P^n for n = 1:L+1]
r = 1.0
for c = [0.1 0.2 0.3 0.4 0.5]
for p = [0.1 0.2 0.3 0.4]
q = 1 - p
... | {"hexsha": "6f555a950a35de4ffc7047efbbba058dff3ba491", "size": 2003, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/channel.jl", "max_stars_repo_name": "adityam/MDP.jl", "max_stars_repo_head_hexsha": "456e5d071a3c5e749620f477b158a3c957093536", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_coun... |
[STATEMENT]
lemma polar_identity:
includes notation_norm
shows \<open>\<parallel>x + y\<parallel>^2 = \<parallel>x\<parallel>^2 + \<parallel>y\<parallel>^2 + 2 * Re (x \<bullet>\<^sub>C y)\<close>
\<comment> \<open>Shown in the proof of Corollary 1.5 in @{cite conway2013course}\<close>
[PROOF STATE]
proof (prov... | {"llama_tokens": 2032, "file": "Complex_Bounded_Operators_Complex_Inner_Product", "length": 14} |
import logging
import numpy as np
from tqdm import tqdm
import torch
from torch import nn
from torch import optim
from torch.nn import functional as F
from torch.utils.data import DataLoader
from models.base import BaseLearner
from models.podnet import pod_spatial_loss
from utils.inc_net import IncrementalNet
from util... | {"hexsha": "c98de70d220ecf87ce5c529376a925b7433d0455", "size": 7991, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/ewc.py", "max_stars_repo_name": "sajjadahmadish/PyCIL", "max_stars_repo_head_hexsha": "bc8cb714edb8ec7815f51fe008c43ea4967a9b57", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 103,... |
||| Implementation of ordering relations for `Nat`ural numbers
module Data.Nat.Order
import Data.Nat
import Data.Fun
import Data.Rel
import Decidable.Decidable
%default total
public export
zeroNeverGreater : Not (LTE (S n) Z)
zeroNeverGreater LTEZero impossible
zeroNeverGreater (LTESucc _) impossible
public exp... | {"hexsha": "73aa4e1d6395cb21890afbf6b3c1ef24baba6e19", "size": 1117, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "idris2/libs/base/Data/Nat/Order.idr", "max_stars_repo_name": "chrrasmussen/Idris2-Erlang", "max_stars_repo_head_hexsha": "dfa38cd866fd683d4bdda49fc0bf2f860de273b4", "max_stars_repo_licenses": ["BS... |
module MPIExecutor
using Serialization
using MPI
import Base: size, get!
include("RemoteFunction.jl")
include("worker.jl")
macro prof(name::Symbol, ex)
if true
quote
local elapsedtime = time_ns()
local val = $(esc(ex))
elapsedtime = time_ns() - elapsedtime
println($(String(name))," ", elapse... | {"hexsha": "aa6bf1ab0643a50503fb6dcde1269845fb331b8c", "size": 7738, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MPIExecutor.jl", "max_stars_repo_name": "tomhaber/MPIExecutor.jl-", "max_stars_repo_head_hexsha": "ae8b2c07bbdb2315cc4bbeeb0b54693f866f340a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import Arena
import numpy as np
from MCTS import MCTS
from othello.OthelloGame import OthelloGame
from othello.keras.NNet import NNetWrapper as nn
from othello.OthelloInteractiveBoard import InteractiveBoard
from othello.OthelloLogic import Board
from othello.OthelloAgents import *
import pygame
import os
import wandb
... | {"hexsha": "4867704e0d7ebeed9bf54a2bb8e0ff03a617ef40", "size": 9972, "ext": "py", "lang": "Python", "max_stars_repo_path": "pit.py", "max_stars_repo_name": "NetasDev/bachelor", "max_stars_repo_head_hexsha": "aee390e96e6d9cab2cb491f93db260a2398abcf1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta... |
INCLUDE 'VICMAIN_FOR'
SUBROUTINE MAIN44
C TEST PROGRAM FOR THE SUBROUTINE MINMAX
BYTE BUF(25)
DATA BUF/1,2,3,4,5,6,7,0,1,2,3,-1,34,55,6,78,47,24,
& 11,22,33,44,55,66,77/ ! -1 IS DN OF 255.
INTEGER*2 I2BUF(2)
DATA I2BUF/1,2/
INTEGER*4 I4BUF(30)
DATA I4BU... | {"hexsha": "191584ff27a827f17176e1fe45a23314553363e4", "size": 5186, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p2/prog/minmax/test/tminmax.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
import math
import os
import os.path
import time
import numpy as np
import scipy.misc
import cv2 as cv
import torch
import torch.nn as nn
import torch.nn.functional as F
import imageio
from PIL import ImageFont, ImageDraw, Image
from console_progressbar import ProgressBar
import inference
from utils import ScreenSpa... | {"hexsha": "1ed05aca14f5ccb21d1f0d620cd1793888d3223c", "size": 19903, "ext": "py", "lang": "Python", "max_stars_repo_path": "SuperresolutionNetwork/mainPSNR2_AllAngles.py", "max_stars_repo_name": "shamanDevel/IsosurfaceSuperresolution", "max_stars_repo_head_hexsha": "0658e67b7ca9f633547c65e3e16f93d2e0c5a4a2", "max_star... |
# Constructors.
"""
LinearOperator(Mv, Mtu, Maw, M; symmetric=false, hermitian=false)
Construct a linear operator from a dense or sparse matrix, using `Mv` as storage space
for `M * v` and `Mtu` as storage space for `transpose(M) * u` and `Maw` to store
`adjoint(M) * w`. Use the optional keyword arguments to indica... | {"hexsha": "4312bfa17564b5f1ab173794f99bb3df28c3d415", "size": 5407, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constructors.jl", "max_stars_repo_name": "geoffroyleconte/LinearOperatorsRevamp.jl", "max_stars_repo_head_hexsha": "972a68aa8b010f1f33b253c208027712b559b221", "max_stars_repo_licenses": ["MIT"]... |
[STATEMENT]
lemma sublinear_wp_DC:
fixes x::"'s prog"
assumes slx: "sublinear (wp x)" and sly: "sublinear (wp y)"
shows "sublinear (wp (x \<Sqinter> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. sublinear (wp (x \<Sqinter> y))
[PROOF STEP]
proof(rule sublinearI, simp only:wp_eval)
[PROOF STATE]
proof (st... | {"llama_tokens": 5898, "file": "pGCL_Sublinearity", "length": 29} |
# -*- coding: utf-8 -*-
# *****************************************************************************
# ufit, a universal scattering fitting suite
#
# Copyright (c) 2013-2019, Georg Brandl and contributors. All rights reserved.
# Licensed under a 2-clause BSD license, see LICENSE.
# ********************************... | {"hexsha": "13256d53e618bc5e40af1364065e876697a37d4a", "size": 54361, "ext": "py", "lang": "Python", "max_stars_repo_path": "ufit/rescalc.py", "max_stars_repo_name": "McStasMcXtrace/ufit", "max_stars_repo_head_hexsha": "02640e2b802bf6d42ae6829a1c1852b21c6fa9f7", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c... |
# 4. faza: Analiza podatkov
#Napoved spreminjanja stevila obsojenih oseb
model_polnoletni <- ggplot(stevilo_obsojenih_polnoletnih, aes(x=Leto, y=Stevilo)) + geom_point(color='violetred4', size=2)
linearni_polnoletni <- lm(data = stevilo_obsojenih_polnoletnih, Stevilo ~ Leto)
leta <- data.frame(Leto=seq(2014, 2030, 1)... | {"hexsha": "f89b67ac15d55c6dd109dd485521422c0539e765", "size": 1982, "ext": "r", "lang": "R", "max_stars_repo_path": "analiza/analiza.r", "max_stars_repo_name": "TInkara25/APPR-2019-20", "max_stars_repo_head_hexsha": "0e3bd76452135d56a56a191d83418cc3ecb12881", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import numpy as np
#!----Relu activation function-----!
inputs = [1, 2, -2, 100, -130, 22, 0, 1, 4]
outputs =[]
for i in inputs:
if i > 0:
outputs.append(i)
else:
outputs.append(0)
print(outputs)
# print( np.exp(3))
# print(2.718**3)
#another way
inputs = [1, 2,-2, 100, -130,22,0,1,4]
outp... | {"hexsha": "59c9c10aea184367262e0cf679193a78962917f8", "size": 1311, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter_4/activation_function.py", "max_stars_repo_name": "Dev-Gaju/NNFS-book-with-Implementation", "max_stars_repo_head_hexsha": "1a788ab61c8129aa52428923f02aca17b8757a33", "max_stars_repo_licens... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.