text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma remove_max_max_lemma: shows "fst (foldl f (m, t) l) = Max (set (m # l))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fst (foldl f (m, t) l) = Max (SelectionSort_Functional.set (m # l)) [PROOF STEP] proof (induct l arbitrary: m t rule: rev_induct) [PROOF STATE] proof (state) goal (2 subgoals):...
{"llama_tokens": 1461, "file": "Selection_Heap_Sort_SelectionSort_Functional", "length": 10}
(* Title: HOL/Analysis/Jordan_Curve.thy Authors: LC Paulson, based on material from HOL Light *) section \<open>The Jordan Curve Theorem and Applications\<close> theory Jordan_Curve imports Arcwise_Connected Further_Topology begin subsection\<open>Janiszewski's theorem\<close> lemma Janiszewski_weak:...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Analysis/Jordan_Curve.thy"}
/** * The MIT License (MIT) * * Copyright © 2018-2020 Ruben Van Boxem * * 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 * ...
{"hexsha": "141240df282a95ef0e7a923bf087ce37c0c61674", "size": 4142, "ext": "h++", "lang": "C++", "max_stars_repo_path": "css/grammar/background.h++", "max_stars_repo_name": "1094387012/SKUI", "max_stars_repo_head_hexsha": "c85dd7fb9d30ff15d5d6de184670cb47e46df6de", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from librosa.core import load from librosa.feature import melspectrogram import numpy as np from torch import Tensor, log10 eps = np.finfo(float).eps def segment_audio(audiopath, f_duration=5, max_frag=6): total_audio, sr = load(audiopath, sr=44100) middle_audio = total_audio[int(0.15*len(total_audio)): int...
{"hexsha": "c2e4000e87e4fd00e684cfc4cbfe6236dd168ba6", "size": 912, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "migperfer/Latin-music-genre-recognition", "max_stars_repo_head_hexsha": "6b7270543991d7e83a2020386c91c9cf6250b402", "max_stars_repo_licenses": ["MIT"], "max_stars...
Require Import Coq.Program.Basics. Require Import Coq.Logic.FunctionalExtensionality. Require Import Coq.Program.Combinators. Require Import Setoid. Require Import ZArith. Require Import Psatz. Require Import FinProof.Common. Require Import FinProof.CommonInstances. Require Import FinProof.StateMonad2. Require Import...
{"author": "Pruvendo", "repo": "depool_contract", "sha": "6afe23011d62f65921ac2493df691ab888ffeb95", "save_path": "github-repos/coq/Pruvendo-depool_contract", "path": "github-repos/coq/Pruvendo-depool_contract/depool_contract-6afe23011d62f65921ac2493df691ab888ffeb95/src/NewProofs/DePoolContract_completeRound.v"}
CONFIG = Dict( "target.project_dir" => (@__DIR__) |> dirname |> abspath, "reporter.use_dataframe" => true, ) ON_TRAVIS = get(ENV, "TRAVIS", "false") == "true" if ON_TRAVIS BENCHMARK_FILES = [ "dummy.jl", "gdemo.jl", "mvnormal.jl", ] else BENCHMARK_FILES = [ "dummy.j...
{"hexsha": "2550673eade578799b16120ede7e866a93a79d0c", "size": 797, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmarks/benchmark_config.jl", "max_stars_repo_name": "andreasnoack/Turing.jl", "max_stars_repo_head_hexsha": "7cd1800905d51e9cd4f2db5072b96a79e9c6c74f", "max_stars_repo_licenses": ["MIT"], "max_s...
from distutils.core import setup from Cython.Build import cythonize import numpy import os os.environ['CFLAGS'] = '-O3 -ffast-math -std=c99 -march=native' setup(name='candid', version='0.3.1', py_modules=['candid'], author='Antoine Merand', author_email='antoine.merand@gmail.com', url='h...
{"hexsha": "b7159f40f5608fe8ae58b46174ce8a6650905d6b", "size": 515, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "amerand/CANDID", "max_stars_repo_head_hexsha": "8b54dc66b1fe6c19f15974826cb018adf0fc1d79", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": 7, "max_st...
import numpy as np import multiprocessing import lazy_property from mb_api.analytics import MinCollusionSolver, MinCollusionResult class IteratedSolver: max_best_sol_index = 2500 _solution_threshold = 0.01 _solver_cls = MinCollusionSolver def __init__(self, data, deviations, metric, plausibility_con...
{"hexsha": "77a7d1ca06ddda237445fdf44a2428ddd532082a", "size": 4742, "ext": "py", "lang": "Python", "max_stars_repo_path": "mb_api/solvers.py", "max_stars_repo_name": "chassang/missing_bids", "max_stars_repo_head_hexsha": "eec0b1318c607244c60ce8355f45cd0e9c0b1d16", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import division from __future__ import print_function import argparse import os import shutil import time import warnings import chainer from chainer import optimizers import numpy as np import six from lib import iproc from lib import srcnn from lib import utils from lib.dataset_sampler import Datas...
{"hexsha": "81f529065696d79a1f92b0a8b1a77176dbc2ace8", "size": 8747, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "nkxingxh/waifu2x-chainer", "max_stars_repo_head_hexsha": "fa91111d6a3c985d45608942c11643cb884255e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 150, ...
[STATEMENT] lemma elementsAppend [simp]: shows "elements (a @ b) = elements a @ elements b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. elements (a @ b) = elements a @ elements b [PROOF STEP] by (induct a) auto
{"llama_tokens": 80, "file": "SATSolverVerification_Trail", "length": 1}
# Tutorial 2.7. Spin textures # =========================== # # Physics background # ------------------ # - Spin textures # - Skyrmions # # Kwant features highlighted # -------------------------- # - operators # - plotting vector fields sigma_0 = [1 0; 0 1] sigma_x = [0 1; 1 0] sigma_y = [0 -1im; 1im 0] sigma_z = ...
{"hexsha": "1ec1b3a5d5bff2fdd2d54ef07037d593e5b79b5c", "size": 3050, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tutorials/magnetic_texture.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Kwant.jl-ed3f9b50-51cd-11e9-3ece-75fc8af922bb", "max_stars_repo_head_hexsha": "b44d1b78212576ea1337a88a47ffcd9...
[STATEMENT] lemma walk_2 [simp]: "v\<rightarrow>w \<Longrightarrow> walk [v,w]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v \<rightarrow> w \<Longrightarrow> walk [v, w] [PROOF STEP] by (simp add: edges_are_in_V(2) walk.intros(3))
{"llama_tokens": 96, "file": "Menger_Graph", "length": 1}
section "Solution to Day 8 of AoC 2020" theory day8 imports Main "HOL.Code_Numeral" string_utils list_natural_utils natural_utils list_utils HOL.Option begin text "This is a solution to the puzzle for day 8" subsection "Input parsing" datatype instr = Nop integer |Acc integer |Jmp integer type_synonym prog...
{"author": "lexbailey", "repo": "AOC2020_isabelle", "sha": "c08c347793814e9cc3e9d9638dd889d2ada2eb1d", "save_path": "github-repos/isabelle/lexbailey-AOC2020_isabelle", "path": "github-repos/isabelle/lexbailey-AOC2020_isabelle/AOC2020_isabelle-c08c347793814e9cc3e9d9638dd889d2ada2eb1d/day8.thy"}
import dace import numpy as np N = dace.symbol('N') @dace.program def plus_1(X_in: dace.float32[N], num: dace.int32[1], X_out: dace.float32[N]): @dace.map def p1(i: _[0:num[0]]): x_in << X_in[i] x_out >> X_out[i] x_out = x_in + 1 if __name__ == '__main__': X = np.random.rand(10...
{"hexsha": "4c2b6a0e3ab8cb50ec63fbef7cff797fb3669792", "size": 680, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/map_indirect_array_test.py", "max_stars_repo_name": "gronerl/dace", "max_stars_repo_head_hexsha": "886e14cfec5df4aa28ff9a5e6c0fe8150570b8c7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import os from itertools import product import time import torch import random import numpy as np import datetime # import pathlib from glob import glob import matplotlib.pyplot as plt from torch.utils.data.dataset import Dataset from torchvision import transforms import torchvision from torchvision.utils import save_i...
{"hexsha": "2b22febeeaced3e36141e8bbcf2093c84c2b045a", "size": 11369, "ext": "py", "lang": "Python", "max_stars_repo_path": "AEGEAN/utils.py", "max_stars_repo_name": "laurentperrinet/AEGeAN", "max_stars_repo_head_hexsha": "03e2c6c38c7ae77610d9796f1484abf0694b3a62", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # coding: utf-8 # # Example: Exporting to $\LaTeX$ # # The first code block contains the imports needed and defines a flag which determines whether the # output $\LaTeX$ should be compiled. # In[ ]: # imports import numpy as np import subprocess # Flag to compile output tables compile_latex...
{"hexsha": "719023c90217f1159f0cb877b37e55c5e174f188", "size": 3699, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example-latex-output.py", "max_stars_repo_name": "ColdTeapot273K/python-for-econometrics-statistics-data-analysis", "max_stars_repo_head_hexsha": "f8aa79e400c68cfec23fb5a6a99b4ee1172e9218...
from kivy.graphics import Color, Line, Rectangle, RoundedRectangle, Ellipse, PushMatrix, PopMatrix, Rotate from kivy.core.image import Image from kivy.core.window import Window from kivy.uix.label import Label from kivy.graphics.instructions import InstructionGroup from util import * import random import numpy as np ...
{"hexsha": "8498716f70768f0d01f90c369b9326f6dbfbb041", "size": 17435, "ext": "py", "lang": "Python", "max_stars_repo_path": "util_interface.py", "max_stars_repo_name": "magj3k/DrawingVectorizer", "max_stars_repo_head_hexsha": "6cf9f98e042c6667ccfb5af9da2ec3e32e06c385", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import sm import numpy def qdot(q1,q2): return numpy.dot(sm.quatPlus(q1),q2) def qinv(q): return sm.quatInv(q) def qlog(q): return sm.quat2AxisAngle(q) def qexp(a): return sm.axisAngle2quat(a)
{"hexsha": "30503a07462e9dffa0bcc2876745c7fd6fe37405", "size": 213, "ext": "py", "lang": "Python", "max_stars_repo_path": "aslam_nonparametric_estimation/bsplines/interp_rotation/quaternions/__init__.py", "max_stars_repo_name": "PushyamiKaveti/kalibr", "max_stars_repo_head_hexsha": "d8bdfc59ee666ef854012becc93571f96fe5...
from tensorflow import keras import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # Some code is taken from: # https://www.kaggle.com/ashusma/training-rfcx-tensorflow-tpu-effnet-b2. class WarmUpCosine(keras.optimizers.schedules.LearningRateSchedule): def __init__( self, learning_rat...
{"hexsha": "2b0eeac84137cf27bd90f0b080a8815e31845c99", "size": 3849, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/model/training_utils.py", "max_stars_repo_name": "avitrost/MAE-Crowd-Counting", "max_stars_repo_head_hexsha": "8f8fad851fc495e4112a0c708636105298a9bc0b", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2021 Huawei Technologies Co., Ltd # # 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": "a3dcc2f93f0e5a2c2abbaca547f048b033d94d7a", "size": 1838, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/cv/gan/export.py", "max_stars_repo_name": "leelige/mindspore", "max_stars_repo_head_hexsha": "5199e05ba3888963473f2b07da3f7bca5b9ef6dc", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
from skimage.measure import compare_ssim from skimage.color import rgb2gray import numpy as np import cv2 import skimage def test_quality(): real_path = "places_rgb_test//" #real_path = "resized//" fake_path = "snapshots//default//images//result_final//" ssim_scores = [] psnr_scores = ...
{"hexsha": "072fc383a04dc5295304cb655e1734aa951bf6df", "size": 1303, "ext": "py", "lang": "Python", "max_stars_repo_path": "quality_test.py", "max_stars_repo_name": "wangning-001/MANet", "max_stars_repo_head_hexsha": "5c09d1d57b482dc6a1d8d6e2fb6b57af491d6641", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, ...
! Modifications for optimised local copy in c_redist_22 and c_redist_32 ! (and their inverse routines): ! (c) The Numerical Algorithms Group (NAG) Ltd, 2012 ! on behalf of EPSRC for the HECToR project module redistribute ! ! Redistribute distributed (integer, real, complex or logical) ! (1, 2, 3, or 4) dimensional ar...
{"hexsha": "4efffb7d44d96242d84b303444c6077e0ef4449c", "size": 277127, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "utils/redistribute.f90", "max_stars_repo_name": "nicolaschristen/gs2_ndc_git", "max_stars_repo_head_hexsha": "ec0295f0726d7e2f372a02cadad0e375f7cd1c31", "max_stars_repo_licenses": ["MIT"], "ma...
# a!/b! factorial_ratio(a::I, b::I) where {I<:Integer} = gamma(a+1)/gamma(b+1) #binomial(a,b)*factorial(a-b) function coulomb_analytical(k::I, γ::R, ℓ::I, r̃::R) where {I<:Integer, R<:Real} e⁻ᵞʳ = exp(-γ*r̃) # S = -gamma(k+ℓ+1)/r̃^(ℓ+1)*(e⁻ᵞʳ-1)/γ^(k+ℓ+1) S = 2gamma(k+ℓ+1)*exp(-γ*r̃/2 -(ℓ+1)*log(r̃))*...
{"hexsha": "4a8654c6dff54fce7b172624d3e5e4d95a3863ea", "size": 556, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/analytical.jl", "max_stars_repo_name": "jagot/CoulombIntegrals.jl", "max_stars_repo_head_hexsha": "d3be310cd936ea820f46813969bf9dd67f79b633", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy from dedupe import predicates from .base import FieldType class PriceType(FieldType): _predicate_functions = [predicates.orderOfMagnitude, predicates.wholeFieldPredicate, predicates.roundTo1] type = "Price" @staticmethod def compara...
{"hexsha": "4804a4e7b8fdaf68d642b336d4ab99a53925e5c4", "size": 535, "ext": "py", "lang": "Python", "max_stars_repo_path": "dedupe/variables/price.py", "max_stars_repo_name": "cilopez/dedupe", "max_stars_repo_head_hexsha": "d6567dc22be42174bbe80c43236acc1e845c1d91", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import imageio import numpy as np from generator import base_numbers from generator.Generator import Generator from ocr.ocr_detector import get_detector from ocr.ocr_recognizer import get_recognizer def load_model(): detector_model_h5 = "/Users/wdavis4/__pycache__/lecture0/sudoku_solver/solver/ocr_detector.h5" ...
{"hexsha": "916c3dad01bc399c2ab56b3b5e39878b0903078f", "size": 5415, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver/utils.py", "max_stars_repo_name": "w1ll1am-davis/lecture0", "max_stars_repo_head_hexsha": "0c1ae34c69c9ff236457f52897af14839a4839e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import tactic import data.real.basic universe u --local attribute [instance] classical.prop_decidable noncomputable def absVal (a : ℝ) : ℝ := if a < 0 then -a else a theorem triIneqInt (a : ℝ) (b : ℝ) : (absVal(b - a) ≤ absVal(a) + absVal(b)) := begin repeat {rw absVal}, split_ifs, repeat {linarith}, end def absVal...
{"author": "AlexKontorovich", "repo": "Spring2020Math492", "sha": "659108c5d864ff5c75b9b3b13b847aa5cff4348a", "save_path": "github-repos/lean/AlexKontorovich-Spring2020Math492", "path": "github-repos/lean/AlexKontorovich-Spring2020Math492/Spring2020Math492-659108c5d864ff5c75b9b3b13b847aa5cff4348a/triIneq_v2.lean"}
""" Project: dncnn Author: khalil MEFTAH Date: 2021-11-26 DnCNN: Deep Neural Convolutional Network for Image Denoising data loader implementation """ # Imports import numpy as np from PIL import Image, UnidentifiedImageError from pathlib import Path from random import randint import torch from torch.utils.data impo...
{"hexsha": "bb4b56a91264089659b503498902eaeb950fda5b", "size": 2015, "ext": "py", "lang": "Python", "max_stars_repo_path": "dncnn/loader.py", "max_stars_repo_name": "kTonpa/DnCNN", "max_stars_repo_head_hexsha": "aca7e07ccbe6b75bee7d4763958dade4a8eee609", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
> module Double.Predicates > import Data.So > %default total > %access public export > %auto_implicits on * EQ > ||| > data EQ : Double -> Double -> Type where > MkEQ : {x : Double} -> {y : Double} -> So (x == y) -> EQ x y * LT > ||| > data LT : Double -> Double -> Type where > MkLT : {x : Double} -> {y : Do...
{"hexsha": "5d40cba40cc48b6e0609d73c471c3c4b24829016", "size": 887, "ext": "lidr", "lang": "Idris", "max_stars_repo_path": "Double/Predicates.lidr", "max_stars_repo_name": "zenntenn/IdrisLibs", "max_stars_repo_head_hexsha": "a81c3674273a4658cd205e9bd1b6f95163cefc3e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
import numpy as np def most_frequent_class(y): labels, counts = np.unique(y, return_counts=True) return labels[np.argmax(counts)]
{"hexsha": "c9eab26c05440a7ddf602b7428fd6dd76064fc80", "size": 140, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Bellator95/gradient_boosting", "max_stars_repo_head_hexsha": "679851e107093e181aadc1106c02d4857eaf753e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import numpy as np from matplotlib import pyplot as plt from .basewidget import BaseWidget from .utils import get_unit_colors from .unitprobemap import plot_unit_probe_map from .unitwaveformdensitymap import plot_unit_waveform_density_map from .amplitudes import plot_amplitudes_timeseries from .unitwaveforms import p...
{"hexsha": "c90db0a609b55696a41b7716159235d4d0cf03e3", "size": 3122, "ext": "py", "lang": "Python", "max_stars_repo_path": "spikeinterface/widgets/unitsummary.py", "max_stars_repo_name": "vncntprvst/spikeinterface", "max_stars_repo_head_hexsha": "dd5ae94f85fe5d9082b45321d2c96ba316eb4b77", "max_stars_repo_licenses": ["M...
using Images, TestImages, Colors, ZernikePolynomials, FFTW using NumberTheoreticTransforms image_float = channelview(testimage("cameraman")) image_int = map(x -> x.:i, image_float) .|> Int64 blur_float = evaluateZernike(LinRange(-41,41,512), [12, 4, 0], [1.0, -1.0, 2.0], index=:OSA) blur_float ./= (sum(blur_float)) b...
{"hexsha": "82cf84acaef8d7c7fb2a932313e3c3e5c3c3261a", "size": 1267, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "doc/src/fnt/cameraman.jl", "max_stars_repo_name": "jakubwro/NumberTheoreticTransforms.jl", "max_stars_repo_head_hexsha": "5e933d4edcbb05926be2ede4e2c2105d381ebd7d", "max_stars_repo_licenses": ["MIT...
"""This module contains the code for approximate solutions to the DCDP.""" import warnings import numba as nb import numpy as np from respy.config import MAX_LOG_FLOAT from respy.parallelization import parallelize_across_dense_dimensions from respy.shared import calculate_expected_value_functions from respy.shared im...
{"hexsha": "fb7977076f8c410647d9129d351ff4d90a729b2f", "size": 14502, "ext": "py", "lang": "Python", "max_stars_repo_path": "respy/interpolate.py", "max_stars_repo_name": "restudToolbox/respy", "max_stars_repo_head_hexsha": "19b9602c6f34f39034b00a88f36219ed3c4cfe5a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
subroutine near3 (xg, yg, zg, node) !*********************************************************************** ! $Id: near3.f,v 1.1 2006/05/17 15:23:22 zvd Exp $ !*********************************************************************** ! Copyright, 1993, 2005, The Regents of the University of California. ! This...
{"hexsha": "ee047f3b72e97152a5cbd3b878ddf98735935e4f", "size": 3284, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/near3.f", "max_stars_repo_name": "lanl/PLUMECALC", "max_stars_repo_head_hexsha": "70a15749a1f21b8d4289d696a401b283265d49a9", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 3, ...
Add LoadPath "D:\sfsol". Require Export Types. Module STLC. Inductive ty : Type := | TBool : ty | TArrow : ty -> ty -> ty. Inductive tm : Type := | tvar : id -> tm | tapp : tm -> tm -> tm | tabs : id -> ty -> tm -> tm | ttrue : tm | tfalse : tm | tif : tm -> tm -> tm -> tm. Tactic Notation "t_cases"...
{"author": "mmalone", "repo": "sfsol", "sha": "5888f4532a1ec1ababa21bef39e25eb26279f0e4", "save_path": "github-repos/coq/mmalone-sfsol", "path": "github-repos/coq/mmalone-sfsol/sfsol-5888f4532a1ec1ababa21bef39e25eb26279f0e4/Stlc.v"}
#----------------------------------------------------------------------------------------------------------------------------- discret_data_normalized <- function(x, inter){ re <- rep((1/(length(inter)-1)),length(inter)-1) for(i in 2:length(inter)){ re[i-1] <- (re[i-1] + length(which(x >= inter[i-1] & x <...
{"hexsha": "036f5bc283cfc45c22218e469fc6e8ff0f246cd2", "size": 2956, "ext": "r", "lang": "R", "max_stars_repo_path": "DySyn_synthetic/functions/discret_data.r", "max_stars_repo_name": "andregustavom/icdm21_paper", "max_stars_repo_head_hexsha": "ee4f5247ae6574ab69f5a29134846d50d9e305b8", "max_stars_repo_licenses": ["MIT...
! <module_mc_wind_domain.for - A component of the City-scale ! Chemistry Transport Model EPISODE-CityChem> !*****************************************************************************! !* !* EPISODE - An urban-scale air quality model !* ========================================== !* Copyright (C) 201...
{"hexsha": "376df3b7b1dc953760d5cd0d9e12bd11fc5695bb", "size": 9963, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "JPS_CITY_CHEM/citychem-1.3/preproc/mcwind/src/module_mc_wind_domain.for", "max_stars_repo_name": "mdhillmancmcl/TheWorldAvatar-CMCL-Fork", "max_stars_repo_head_hexsha": "011aee78c016b76762eaf511...
[STATEMENT] lemma (in pre_digraph) subgraphI_max_subgraph: "max_subgraph P x \<Longrightarrow> subgraph x G" [PROOF STATE] proof (prove) goal (1 subgoal): 1. max_subgraph P x \<Longrightarrow> subgraph x G [PROOF STEP] by (simp add: max_subgraph_def)
{"llama_tokens": 95, "file": "Graph_Theory_Digraph_Component", "length": 1}
Require Export ProjectiveGeometry.Dev.matroid_properties. Require Export ProjectiveGeometry.Dev.projective_space_rank_axioms. (*****************************************************************************) (** Rank space or higher properties **) Section s_rankProperties_1. Context `{M : RankProjectiveSpace}. Contex...
{"author": "ProjectiveGeometry", "repo": "ProjectiveGeometry", "sha": "4f7f4e6c14580833c91fdef38d048259fb454b88", "save_path": "github-repos/coq/ProjectiveGeometry-ProjectiveGeometry", "path": "github-repos/coq/ProjectiveGeometry-ProjectiveGeometry/ProjectiveGeometry-4f7f4e6c14580833c91fdef38d048259fb454b88/Dev/rank_sp...
''' This file applies the GMM_IVQR method to the Fulton fish market data ''' import numpy as np import pandas as pd from IVQR_GMM import IVQR_GMM from math import log from decimal import Decimal as Dec from decimal import getcontext getcontext().prec = 50 df = pd.read_csv('NYFishMarket.csv') #print(df)...
{"hexsha": "53fb7fabb40d4dd07b5e4cfce5fcc35b07e4aaa2", "size": 1126, "ext": "py", "lang": "Python", "max_stars_repo_path": "Empirical_FishMarket.py", "max_stars_repo_name": "zizhe-xia/IVQR-GMM-Python", "max_stars_repo_head_hexsha": "4c6d5e94bee255317951c1d73745e9ec63d8b1f4", "max_stars_repo_licenses": ["MIT"], "max_sta...
import cv2 import numpy as np from PIL import Image import os, glob # 画像が保存されているルートディレクトリのパス root_dir = "../score" # 画像名 types = [ "score_16_9", ] # 画像データ用配列 X = [] # ラベルデータ用配列 Y = [] # 画像データごとにadd_sample()を呼び出し、X,Yの配列を返す関数 def make_sample(files): global X, Y X = [] Y = [] for cat, fname in file...
{"hexsha": "d9aef43c9d7e636bcd1676bca42f9d94bc509643", "size": 1171, "ext": "py", "lang": "Python", "max_stars_repo_path": "mask_maker/score_data_to_mask_16_9.py", "max_stars_repo_name": "hibibol/PriLog_web", "max_stars_repo_head_hexsha": "d15a8111424e3b3b5bd8d786ef8bb8949c9c8d90", "max_stars_repo_licenses": ["MIT"], "...
function sys = probability(c) % PROBABILITY Create basis for chance constraint % % EXAMPLE: % The following example computes the largest value t such that the % probability that a zero mean unit variance of a Gaussian variable is % larger than t, is larger than 0.9 % % w = sdpvar(1,1); % t = sdpvar(1); % Model = [...
{"author": "yalmip", "repo": "YALMIP", "sha": "f6d5a6d4222a4d722de30bffb43cae4b3e13b860", "save_path": "github-repos/MATLAB/yalmip-YALMIP", "path": "github-repos/MATLAB/yalmip-YALMIP/YALMIP-f6d5a6d4222a4d722de30bffb43cae4b3e13b860/extras/@probability/probability.m"}
from airflow import DAG # Operator imports from airflow.operators.mssql_operator import MsSqlOperator from airflow.operators.python_operator import PythonOperator from airflow.operators.dummy_operator import DummyOperator from airflow.hooks.mssql_hook import MsSqlHook # Utils imports from airflow.macros import datetim...
{"hexsha": "5a2a36abca82136e09c0af551e085f8d9b5bc2b5", "size": 3621, "ext": "py", "lang": "Python", "max_stars_repo_path": "dags/db_setup_dag.py", "max_stars_repo_name": "PFreitas91/b2b-ecommerce", "max_stars_repo_head_hexsha": "d8a693c45f4fc78b39146ab4af85e6b134bba5ae", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
------------------------------------------------------------------------ -- The Agda standard library -- -- Type(s) used (only) when calling out to Haskell via the FFI ------------------------------------------------------------------------ {-# OPTIONS --without-K #-} module Foreign.Haskell where open import Level ...
{"hexsha": "6243ca498b84a0ac5aaac53b31595994acc7df6f", "size": 1493, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda-stdlib/src/Foreign/Haskell.agda", "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [...
import os.path as op import numpy as np import pandas as pd from sklearn.dummy import DummyRegressor from sklearn.pipeline import make_pipeline from sklearn.linear_model import RidgeCV from sklearn.preprocessing import StandardScaler from sklearn.model_selection import KFold, cross_val_score import mne import config ...
{"hexsha": "eb89ef878a238469a5c5c85da1e601c92aeab67e", "size": 4270, "ext": "py", "lang": "Python", "max_stars_repo_path": "debug/compute_scores_models_nips.py", "max_stars_repo_name": "DavidSabbagh/meeg_power_regression", "max_stars_repo_head_hexsha": "d9cd5e30028ffc24f08a52966c7641f611e92ee6", "max_stars_repo_license...
import onnx import onnxruntime import numpy as np import argparse import coloredlogs import logging import onnx.numpy_helper as onh from onnx import helper coloredlogs.install(level='INFO') logging.basicConfig(level=logging.INFO) class Quantizer(): def __init__(self, model): self.fractional_part = 8 s...
{"hexsha": "a332ef9aacf5ccdd1f44472d783386a62f3f7ae1", "size": 4661, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/analysis/quantization.py", "max_stars_repo_name": "ptoupas/mmaction2", "max_stars_repo_head_hexsha": "1e1911295b63cffeba4c6f4809cb74d291c4505b", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import os import time import numpy as np import torch from ray import tune from logging import getLogger from torch.utils.tensorboard import SummaryWriter from libcity.executor.abstract_executor import AbstractExecutor from libcity.utils import get_evaluator, ensure_dir from libcity.model import loss from functools imp...
{"hexsha": "e1f1c2060914c8027a0ffc1bea303536f86df40d", "size": 18614, "ext": "py", "lang": "Python", "max_stars_repo_path": "libcity/executor/traffic_state_executor.py", "max_stars_repo_name": "moghadas76/test_bigcity", "max_stars_repo_head_hexsha": "607b9602c5b1113b23e1830455e174b0901d7558", "max_stars_repo_licenses":...
import numpy as np import matplotlib.pyplot as plt def sigmoid(x): return 1.0/(1+np.exp(-x)) """ Predicts the outcome for the input x and the weights w x_0 is 1 and w_0 is the bias """ def predict(x,w): return sigmoid(np.sum([w[p]*x[p] for p in range(len(x))])) """ Determine the cost of the pred...
{"hexsha": "40bd8d7a5cbddc4d6e485c7047e94873e188f1a7", "size": 2091, "ext": "py", "lang": "Python", "max_stars_repo_path": "and.py", "max_stars_repo_name": "openmachinesblog/learning-sigmoid-neuron", "max_stars_repo_head_hexsha": "1daadc69a34627fe72d130da84722aca32c4b491", "max_stars_repo_licenses": ["MIT"], "max_stars...
__all__ = ['getCurDir', 'getDatasetPath', 'getKaggleJson', 'getModelPath', 'r_mse', 'm_rmse', 'rf', 'rf_feat_importance', 'plot_fi', 'get_oob', 'normalize'] import fastbook from fastbook import * from fastai.tabular.all import Path from sklearn.ensemble import RandomForestRegressor from scipy.special import erfinv d...
{"hexsha": "b4bb75cb4857c8f45eb49d64ca3a5d6b52550596", "size": 2205, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/func.py", "max_stars_repo_name": "JimBeam2019/Prudential-Life-Insurance-Assessment", "max_stars_repo_head_hexsha": "352d4d9c24a57888ef6bfd24c791d38cbc5b7b65", "max_stars_repo_licenses": ["MI...
## @file pipeline.py # @authir Andre N. Zabegaev <speench@gmail.com> # pipeline for lane line finding on video import numpy as np import os import cv2 import matplotlib.pyplot as plt from moviepy.editor import VideoFileClip ## Class for calibration adn correction of camera distortion class CameraCorrector(object)...
{"hexsha": "23b69a9d602110b263265a9720b6203d005e6193", "size": 18173, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline.py", "max_stars_repo_name": "Spinch/CarND-Advanced-Lane-Lines", "max_stars_repo_head_hexsha": "618d19b4fc3394809c6d6bfa6872527e129d856f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from copy import deepcopy import logging import numpy as np from wepy.reporter.reporter import FileReporter from wepy.hdf5 import WepyHDF5 from wepy.walker import Walker, WalkerState from wepy.util.json_top import json_top_atom_count class WepyHDF5Reporter(FileReporter): """Reporter for generating an HDF5 format...
{"hexsha": "e1c2556c842b426c193501586e53947d906a887a", "size": 26112, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/wepy/reporter/hdf5.py", "max_stars_repo_name": "edeustua/wepy", "max_stars_repo_head_hexsha": "f1a2ef5c8cc368d5602c9d683983b3af69a48ce2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import json import faculty import drawFigure from flask import Flask , render_template , redirect , request app = Flask(__name__) with open('feedback1.json') as file: json_string = file.read() documents1 = json.loads(json_string) w...
{"hexsha": "e44819f48f746e273a6923dcca972807b385c9bd", "size": 10430, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "rishabh99-rc/Student-Feedback-Sentimental-Analysis", "max_stars_repo_head_hexsha": "fb1d228bae9ef6d5ff077f6555c18ac36983d8ff", "max_stars_repo_licenses": ["MIT"],...
! { dg-do run } ! ! PR fortran/18918 ! ! this_image(coarray) run test, ! expecially for num_images > 1 ! ! Tested are values up to num_images == 8, ! higher values are OK, but not tested for ! implicit none integer :: a(1)[2:2, 3:4, 7:*] integer :: b(:)[:, :,:] allocatable :: b integer :: i if (this_image(A, dim=1) /=...
{"hexsha": "9ee4b153231663c53fd91323daf70ed389ca2637", "size": 5796, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/gcc/testsuite/gfortran.dg/coarray/this_image_1.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a43898c", "ma...
[STATEMENT] lemma Ord_linear2: assumes o: "Ord(k)" "Ord(l)" obtains (lt) "k\<^bold>\<in>l" | (ge) "l \<le> k" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>k \<^bold>\<in> l \<Longrightarrow> thesis; l \<le> k \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis [PROOF STEP] by (metis Ord_linear ...
{"llama_tokens": 143, "file": "HereditarilyFinite_Ordinal", "length": 1}
using ComponentArrays using DifferentialEquations using UnPack: @unpack tspan = (0.0, 20.0) ## Lorenz system function lorenz!(D, u, p, t; f=0.0) @unpack σ, ρ, β = p @unpack x, y, z = u D.x = σ*(y - x) D.y = x*(ρ - z) - y - f D.z = x*y - β*z return nothing end function lorenz_jac!(D, u, ...
{"hexsha": "8568cd515e3f35c918e628207dc3d1bdc1e41780", "size": 2313, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/ODE_jac_example.jl", "max_stars_repo_name": "torfjelde/ComponentArrays.jl", "max_stars_repo_head_hexsha": "37e3e4d9d0c0ab12e672984188cf5bf23e10b8e7", "max_stars_repo_licenses": ["MIT"], "m...
""" binning/bootstrap/reweighting """ import numpy as np def binned(data, rwt=None, binsize=None, nbins=None): """bin data along axis=0""" assert (binsize is None) or (nbins is None) if binsize is not None: nbins = data.shape[0] // binsize if nbins is not None: binsize = data.shape[0...
{"hexsha": "a9052dfd994c45559e173018151b3e7d8c11e654", "size": 2718, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/puck/statistics.py", "max_stars_repo_name": "krox/puck", "max_stars_repo_head_hexsha": "3760f697049790549d6bb5c9b134416d756c2d6d", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": ...
[STATEMENT] lemma hdomain_hunion [simp]: "hdomain (f \<squnion> g) = hdomain f \<squnion> hdomain g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. hdomain (f \<squnion> g) = hdomain f \<squnion> hdomain g [PROOF STEP] by (simp add: hdomain_def)
{"llama_tokens": 105, "file": "HereditarilyFinite_HF", "length": 1}
import pandas as pd import numpy as np from matplotlib import pyplot as plt import os.path import math # user defined functions from t2nnls import T2NNLS from getT2LogMean import getT2LogMean from getLambdaFromRMSE import getLambdaFromRMSE from pltLcurve import pltLambdaRMS, pltLcurve from pltRTD import pltT2dist def...
{"hexsha": "f29f801a9f0288f0fdf3c40e187e3dcab3215f16", "size": 2974, "ext": "py", "lang": "Python", "max_stars_repo_path": ".ipynb_checkpoints/invRCA-checkpoint.py", "max_stars_repo_name": "pengyonghui/invRCA", "max_stars_repo_head_hexsha": "2247dcb1709dba442573b05c63c58d3b6a7f72c0", "max_stars_repo_licenses": ["MIT"],...
import numpy import math class IntigerToStringIdConverter: def convert(self,id): ALPHABET = numpy.array( ["G", "k", "v", "s", "y", "4", "g", "3", "j", "b", "x", "r", "A", "o", "l", "6", "R", "f", "0", "F", "m", "B", "U", "p", "D", "i", "t", "7", "8", "S", "L", "2", "w", "d", "Z", ...
{"hexsha": "320c113eb681c8b5d93669618df968bc8ec77f64", "size": 745, "ext": "py", "lang": "Python", "max_stars_repo_path": "CommonCode/intigerToStringIdConvertor.py", "max_stars_repo_name": "prodProject/WorkkerAndConsumerServer", "max_stars_repo_head_hexsha": "95496f026109279c9891e08af46040c7b9487c81", "max_stars_repo_l...
using Ejemplo using Test @testset "Ejemplo.jl" begin @test f(2, 1) == 7 @test f(2, 3) == 13 @test f(1, 3) == 11 end @testset "Derivada de f" begin @test ∂ₓf(124.24, 245.245) == 2 end
{"hexsha": "b7f21497db64a29d4e470541d041e23edde23453", "size": 200, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_f.jl", "max_stars_repo_name": "Erasmo98/Ejemplo.jl", "max_stars_repo_head_hexsha": "e4fc709506a4321880db4ca3fbfcd20569125a8b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import time import random import datatable as dt import pandas as pd import numpy as np def genom_multilat(n=2000, k=50, urdata="../../sample_data/mydata", refdata="", refmaf=""): # Import Data (Reference / Your own parsed data) print(" Import Reference Data...
{"hexsha": "bf8293b14a8a49826212263ee6d190599523efe9", "size": 3627, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/1.DV_Generator/dv_gen.py", "max_stars_repo_name": "hanlab-SNU/GenomicGPS", "max_stars_repo_head_hexsha": "adff68e3d6e04104d032768e3cca3b12d08ffb1d", "max_stars_repo_licenses": ["MIT"], "ma...
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <gsl/gsl_rng.h> #ifdef SUBFIND #include "fof.h" #include "allvars.h" #include "proto.h" #include "domain.h" #include "subfind.h" static struct id_li...
{"hexsha": "938b93e7d74b8d378222ef6fac0d25b1f5273ecd", "size": 26420, "ext": "c", "lang": "C", "max_stars_repo_path": "testing/icgen/random_verschillende_resoluties_N-GenIC/gadget3_64/subfind.c", "max_stars_repo_name": "egpbos/egp", "max_stars_repo_head_hexsha": "5e82c2de9e6884795b4ee89f2b15ed5dde70388f", "max_stars_re...
/Users/remywang/metalift/txl/stng/stng_labeled_cloverleaf/stencil/kernel//viscosity_kernel.f90 /Users/remywang/metalift/txl/stng/stng_labeled_cloverleaf/stencil/kernel//update_halo_kernel.f90 /Users/remywang/metalift/txl/stng/stng_labeled_cloverleaf/stencil/kernel//field_summary_kernel.f90 /Users/remywang/metalift/txl/...
{"hexsha": "3075e87eacd06dd3ded58feb8ee45ce4e92aa836", "size": 5855, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fp.f90", "max_stars_repo_name": "remysucre/sloth-fortran", "max_stars_repo_head_hexsha": "24e4e362135bd9a5e0ee0508af3d156d33880efd", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
from styx_msgs.msg import TrafficLight import cv2 import numpy as np import tensorflow as tf # Based on Team Vulture's guide on how to train a Traffic Light Detector & Classifier with TF Object Detection API: class TLClassifierSite(object): def __init__(self): # Handling cuDNN issues when using the model:...
{"hexsha": "11e2ec9c4fa03f872befcdce3da3c385a229ea29", "size": 3306, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/tl_detector/light_classification/tl_classifier_site.py", "max_stars_repo_name": "SamuelHazak/SDCE_T3_P3_capstone", "max_stars_repo_head_hexsha": "fde856f924522f800162f73a06379643d29c11db",...
[STATEMENT] lemma has_derivative_at': "(f has_derivative f') (at x) \<longleftrightarrow> bounded_linear f' \<and> (\<forall>e>0. \<exists>d>0. \<forall>x'. 0 < norm (x' - x) \<and> norm (x' - x) < d \<longrightarrow> norm (f x' - f x - f'(x' - x)) / norm (x' - x) < e)" [PROOF STATE] proof (prove) ...
{"llama_tokens": 504, "file": null, "length": 2}
""" This code contains support code for formatting L1B products for the LP DAAC. Authors: Philip G. Brodrick, philip.brodrick@jpl.nasa.gov Nimrod Carmon, nimrod.carmon@jpl.nasa.gov """ import argparse from netCDF4 import Dataset from emit_utils import daac_converter from emit_utils.file_checks import netcdf...
{"hexsha": "b2801200fbd74b2a4f5a4797c59724de18333d44", "size": 5752, "ext": "py", "lang": "Python", "max_stars_repo_path": "output_conversion.py", "max_stars_repo_name": "emit-sds/emit-sds-l1b", "max_stars_repo_head_hexsha": "be5307fe6821a043971becdd33609b4cf89b1974", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
from config import alpha_dir, figure_dir, gamma_dir from config import f_alpha, mae_offset, mse_offset, mae_v_gamma, mse_v_gamma from config import width, height, pad_inches from config import p_label, s_label, d_label from config import colors, markers, linestyles, p_index, s_index, d_index from config import line_wid...
{"hexsha": "dd89cc117d0ca6262360436abda11f377138f5b0", "size": 3804, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/double_robust_estimators/draw_gamma.py", "max_stars_repo_name": "xiaojiew1/surprise", "max_stars_repo_head_hexsha": "74d8f15d01b6a6e4e82852a0d35eb04c83bf4e9f", "max_stars_repo_licenses": ...
import cv2 import numpy as np import sys def resize(dst,img): width = img.shape[1] height = img.shape[0] dim = (width, height) resized = cv2.resize(dst, dim, interpolation = cv2.INTER_AREA) return resized video = cv2.VideoCapture(0) oceanVideo = cv2.VideoCapture("ocean.mp4") success, ref_img = video.read() flag ...
{"hexsha": "d79a08e115586f50f773cc3aaa15bff6dfe6251e", "size": 1569, "ext": "py", "lang": "Python", "max_stars_repo_path": "bg_removal/backgroundRemoval_video.py", "max_stars_repo_name": "shantanukaushik97/Background-Removal", "max_stars_repo_head_hexsha": "b462e87be32d70195640b688028c99ca1b57d42d", "max_stars_repo_lic...
module puresaturation use nonlinear_solvers use thermopack_var, only: nc, get_active_thermo_model, thermo_model, & base_eos_param, get_active_alt_eos ! use utilities, only: get_thread_index implicit none private save public :: PureSat, PureSatLine contains !-------------------------------------...
{"hexsha": "7c558dc62ee78e1cf146634d1fb568e8e5ea19ba", "size": 8824, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/puresaturation.f90", "max_stars_repo_name": "SINTEF/Thermopack", "max_stars_repo_head_hexsha": "63c0dc82fe6f88dd5612c53a35f7fbf405b4f3f6", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from __future__ import print_function, division, absolute_import import numpy as np from .sort_driver import RocRadixSortDriver from timeit import default_timer as timer def speed(compare_driver, nelem, dtype=np.intp): data = np.random.randint(0, 0xffffffff, nelem).astype(dtype) sorter = compare_driver() ...
{"hexsha": "7d0ba8de8d8ff895a35f130b59c0ab8b26fe032e", "size": 1210, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba_roc_examples/radixsort/benchmark.py", "max_stars_repo_name": "numba/roc-examples", "max_stars_repo_head_hexsha": "752391b1f014df8e8f6919279ffa382d278f3b4b", "max_stars_repo_licenses": ["BSD-...
(* 雪江明彦「代数学1群論入門」日本評論社 本文に沿って、coqにて展開する。 2011_03_19 Sectionを使い、群に共通の定義をまとめて定義した。 2011_03_20 Ltac でtacticsをまとめた。 *) Require Import Setoid. (* rewrite at *) Section Group. Variable G : Set. (* 演算子 *) Variable App : G -> G -> G. Infix "**" := App (at level 61, left assoc...
{"author": "elle-et-noire", "repo": "coq", "sha": "fd253f245131883ee55ff9f1824d4bb417b6e7b7", "save_path": "github-repos/coq/elle-et-noire-coq", "path": "github-repos/coq/elle-et-noire-coq/coq-fd253f245131883ee55ff9f1824d4bb417b6e7b7/algebra/yukie_group_theory.v"}
# -*- coding: utf-8 -*- ## Minimal 3-node example of PyPSA linear optimal power flow # # Available as a Jupyter notebook at <https://pypsa.readthedocs.io/en/latest/examples/minimal_example_lopf.ipynb>. import numpy as np import pypsa network = pypsa.Network() # add three buses for i in range(3): network.add("Bu...
{"hexsha": "985fc2d081712f2565ea154e591da0d542c07157", "size": 1912, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/minimal_example_lopf.py", "max_stars_repo_name": "p-glaum/PyPSA", "max_stars_repo_head_hexsha": "a8cfdf1acd9b348828474ad0899afe2c77818159", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import IMLearn.learners.regressors.linear_regression from IMLearn.learners.regressors import PolynomialFitting from IMLearn.utils import split_train_test import numpy as np import pandas as pd import plotly.express as px import plotly.io as pio pio.templates.default = "simple_white" def load_data(filename: str) -> p...
{"hexsha": "e7bdd97cb6b26b53d395ee57651d7135c60eac73", "size": 3260, "ext": "py", "lang": "Python", "max_stars_repo_path": "exercises/city_temperature_prediction.py", "max_stars_repo_name": "chaimgross7/IML.HUJI", "max_stars_repo_head_hexsha": "5e79c723c67663f5f7899a7250428eb2ffa8db98", "max_stars_repo_licenses": ["MIT...
import argparse from datasets import PhototourismDataset, NotreDameDataset import numpy as np import os import pickle def get_opts(): parser = argparse.ArgumentParser() parser.add_argument('--root_dir', type=str, required=True, help='root directory of dataset') parser.add_argument(...
{"hexsha": "1d41775bfd0cae45c7bcd0621c9b59eef69fd196", "size": 2506, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepare_phototourism.py", "max_stars_repo_name": "AlphaPlusTT/nerf-w", "max_stars_repo_head_hexsha": "c56589df46b80077eb9e0bfb29b023490b0a7fa1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma llist_all2_lSupI: assumes "Complete_Partial_Order.chain (rel_prod (\<sqsubseteq>) (\<sqsubseteq>)) Y" "\<forall>(xs, ys)\<in>Y. llist_all2 P xs ys" shows "llist_all2 P (lSup (fst ` Y)) (lSup (snd ` Y))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. llist_all2 P (lSup (fst ` Y)) (lSup (snd ` Y)...
{"llama_tokens": 12891, "file": "Coinductive_Coinductive_List", "length": 51}
# -*- coding: utf-8 -*- """ Es 2 Il metodo senza pivot non funziona poiche abbiamo un elemento sulla diagonale di A1 nullo """ import funzioni_Sistemi_lineari as fz import numpy as np A1 = np.array([1,2,3,0,0,1,1,3,5], dtype=float).reshape((3,3)) b1 = np.array([6,1,9], dtype=float) A2 = np.array([1,1,0,3,2,1...
{"hexsha": "cedcef3ff9f3065f0a17e63f4ade7d34345ca0cb", "size": 1198, "ext": "py", "lang": "Python", "max_stars_repo_path": "sistemi_lineari/esercizi/Test2.py", "max_stars_repo_name": "luigi-borriello00/Metodi_SIUMerici", "max_stars_repo_head_hexsha": "cf1407c0ad432a49a96dcd08303213e48723c57a", "max_stars_repo_licenses"...
import os import sys import json import torch from parse import parse import pickle as pkl from gm_hmm.src.genHMM import load_model from gm_hmm.src.utils import append_class, accuracy_fun, accuracy_fun_torch, divide, parse_, get_freer_gpu from functools import partial import time import numpy as np if __name__ == "__m...
{"hexsha": "cc52429801dd92512ce6e7ba34d09ccaec7bff8d", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/compute_accuracy_class.py", "max_stars_repo_name": "FirstHandScientist/genhmm", "max_stars_repo_head_hexsha": "95954794a48c40486c9df4644a654c541866df4c", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma finfun_Ex_Ex: "finfun_Ex P = Ex (($) P)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finfun_Ex P = Ex (($) P) [PROOF STEP] unfolding finfun_Ex_def finfun_All_All [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<not> All (($) (Not \<circ>$ P))) = Ex (($) P) [PROOF STEP] by simp
{"llama_tokens": 143, "file": "FinFun_FinFun", "length": 2}
abstract type DiagnosticsGroupParams end """ DiagnosticsGroup Holds a set of diagnostics that share a collection interval, a filename prefix, an output writer, an interpolation, and any extra parameters. """ mutable struct DiagnosticsGroup{DGP <: Union{Nothing, DiagnosticsGroupParams}} name::String init::...
{"hexsha": "ff82d7b70aab629acf834c19c737bb30c9e984f7", "size": 2091, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Diagnostics/groups.jl", "max_stars_repo_name": "mwarusz/CLIMA", "max_stars_repo_head_hexsha": "af1bb8e2865bca9df9cf97c9bc1540080169676c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
""" Implementation of spiking activation maps (SAM). Original paper: https://arxiv.org/pdf/2103.14441.pdf""" from typing import List import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np import cv2 from spikingjelly.clock_driven import neuron import math impo...
{"hexsha": "21bb34c1995fada843471d6bad6b55ae86b0fed8", "size": 5307, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/utils/sam.py", "max_stars_repo_name": "Barchid/snn-sod", "max_stars_repo_head_hexsha": "719508be981125432cdf61b4047c9750964eb9db", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import os import sys sys.path.insert( 0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) ) # External: from sklearn import datasets import copy import math import numpy as np import pandas as pd import random # Arboreal: from core.dataset import Metadata, Dataset from core.arboreal_tree import Dec...
{"hexsha": "432f7757d5712a8d6f7ed9dbe0be4fa1654a252b", "size": 3447, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/scratch_pandas.py", "max_stars_repo_name": "PietrOz/arboreal", "max_stars_repo_head_hexsha": "3fda601a9af21a11bef3284a11d0bffe804cb3cc", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
@testset "ch08_fastslam02345" begin dt = 0.1 # environment xlim = [-5.0, 5.0] ylim = [-5.0, 5.0] # id of landmark must start from 0 with 1 step landmarks = [Landmark([2.0, -3.0], 0), Landmark([3.0, 3.0], 1), Landmark([-4.0, 2.0], 2)] envmap = Map() push!(envmap, landmarks) wo...
{"hexsha": "2f94b966ea94c7fda32ea1e23bd6e495b08eb72d", "size": 2643, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ch08_test.jl", "max_stars_repo_name": "soblin/JuliaProbo", "max_stars_repo_head_hexsha": "bb206e19dd350af7f82b90e7c5062e5a088eff2d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
from functools import partial, partialmethod import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import gridspec try: from gatspy import periodic except ImportError: raise ImportError('Please, pip install gatspy') from astropy.timeseries import LombScargle from .utils ...
{"hexsha": "cda5b2bd058c25d9460162fb520c95a3bcac2b4e", "size": 19299, "ext": "py", "lang": "Python", "max_stars_repo_path": "vera/_periodograms.py", "max_stars_repo_name": "j-faria/vera", "max_stars_repo_head_hexsha": "96cbdb61c98c3527416611155b29a03a2bc66b15", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
||| An approach to intrinsically-typed STLC with types as terms. ||| ||| We use this razor to demonstrate succintly how Type universes are ||| used to separate descriptions of how types are formed and their ||| use to type values. ||| ||| Standard constructions are used to represent the language as an ||| EDSL, togethe...
{"hexsha": "397a9bf8e8e95c5dc4b4fc24dff0272bce162ed3", "size": 13628, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Razor/STLC.idr", "max_stars_repo_name": "border-patrol/pearly-razors", "max_stars_repo_head_hexsha": "bc2677dda9171f8043e6cfb62ef4153e92c15714", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"],...
# coding=utf-8 # Copyright 2021 The init2winit Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
{"hexsha": "6cdd0abdd0699576bfff98fecc85b7e5490ffd92", "size": 4806, "ext": "py", "lang": "Python", "max_stars_repo_path": "init2winit/dataset_lib/test_ogbg_molpcba.py", "max_stars_repo_name": "google/init2winit", "max_stars_repo_head_hexsha": "62ec9fd31bd7b38bb7c220f15d4187bf0706506d", "max_stars_repo_licenses": ["Apa...
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule libigc_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("libigc") JLLWrappers.@generate_main_file("libigc", UUID("94295238-5935-5bd7-bb0f-b00942e9bdd5")) end # module libigc_jll
{"hexsha": "e22e4397475720caefc433bcb0a991079582fae8", "size": 302, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/libigc_jll.jl", "max_stars_repo_name": "troels/igc.jl", "max_stars_repo_head_hexsha": "546804a0c01e5e7ca3967337cbc7f9e300c5e8e0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import os from unittest.mock import patch import numpy as np import pytest import xarray as xr from pharedox import experiment from pharedox import image_processing as ip from pharedox import pio class TestExperiment: @pytest.fixture(scope="function") def paired_imgs(self, shared_datadir): return p...
{"hexsha": "5bcd5a710390a1bb61eaab028ba2759cc32b7878", "size": 1915, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_experiment.py", "max_stars_repo_name": "omarvaneer/pharynx_redox", "max_stars_repo_head_hexsha": "ffcd5733fd0823244f50590951e9af0bc9ae2518", "max_stars_repo_licenses": ["MIT"], "max_sta...
from matplotlib import pyplot as plt import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from protosc.pipeline import BasePipeElement from pathlib import Path class FourierFeatures(BasePipeElement): def __init__(self, n_angular=8, n_spatial=7, cut_circle=True, ...
{"hexsha": "cf1f198e628983a99968058f9f4e0dfd79d966d6", "size": 5778, "ext": "py", "lang": "Python", "max_stars_repo_path": "protosc/feature_extraction/fourier_features.py", "max_stars_repo_name": "UtrechtUniversity/protosc", "max_stars_repo_head_hexsha": "cc78f25c0ffed8bbfb8b9edf7fac544fb9bfe2ca", "max_stars_repo_licen...
import numpy as np from Network import utils class Input: def __init__(self, n): self.output = None self.next_layer = n def get_image(self, img): self.output = np.array(img) / 255.0 def forward_pass(self,img): self.get_image(img) self.next_layer.forw...
{"hexsha": "1768e20446d0b0128e0edb0eafe8a0b1a41bf041", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "CNN_from_scratch/Network/Input.py", "max_stars_repo_name": "pr0deep/ML-AI-from-scratch", "max_stars_repo_head_hexsha": "2d06056a7dc6cca9f06c87fb69a4ee3e3bec924f", "max_stars_repo_licenses": ["MIT"]...
# -*- coding: utf-8 -*- """ Created on Tue Sep 25 13:50:13 2018 @author: shams """ # importing libraries import numpy as np import pandas as pd from keras.preprocessing import sequence from keras.models import load_model from keras.layers import Dense, Input, LSTM, GRU, BatchNormalization from keras.models import ...
{"hexsha": "52b84db10046a2da69c11b106e926ee41e0b0108", "size": 3494, "ext": "py", "lang": "Python", "max_stars_repo_path": "HPC_code/train_graham.py", "max_stars_repo_name": "nasim-shams/SlackTrack", "max_stars_repo_head_hexsha": "09d9d4522679ac2f95efc2d7653d7d1e432326b6", "max_stars_repo_licenses": ["MIT"], "max_stars...
#include "UGCPopularity.hpp" #include "ContentElement.hpp" #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_01.hpp> #include <boost/random/gamma_distribution.hpp> #include "boost/random/uniform_real_distribution.hpp" #include <boost/math/distributions/lognormal.hpp> #include "boost/random/u...
{"hexsha": "e8735ef178714a9e6c78f033e9c9ab76d99069a6", "size": 6932, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/UGCPopularity.cpp", "max_stars_repo_name": "manuhalo/PLACeS", "max_stars_repo_head_hexsha": "1574a34a2a98468e72d072cc9d1f2b32fcee38f2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
""" pp_prob_plot(sepp::SEPP) Plot the probability plot for the point process. See 4.1 in Li2020. """ function pp_prob_plot(sepp::SEPP) s, p = pp_analysis(sepp) id = layer(x = p, y = p, color = [color("red")], Geom.line, order = 2) emp = layer(x = p, y = s, color = [color("black")], Geom.line, order...
{"hexsha": "cd14bd3c057af7db0beba6bb4353a9fe58a2a3c1", "size": 1501, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Plots/ValidationPlots.jl", "max_stars_repo_name": "adam-dvd/SEMPP.jl", "max_stars_repo_head_hexsha": "fb2c0f39b7deddd3864fcd768959d889e55d7606", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -*- coding: utf-8 -*- """ Created on Wed May 22 16:58:10 2019 @author: sgs4167 """ import numpy as np import cv2 import PIL.Image as Image import PIL.ImageDraw as ImageDraw import PIL.ImageFont as ImageFont def contrast_brightness(image, c, b): #其中c为对比度,b为每个像素加上的值(调节亮度) blank = np.zeros(image.shape, image.dt...
{"hexsha": "38af39aad1b98298953747dd7676e7187ca2f7c0", "size": 9561, "ext": "py", "lang": "Python", "max_stars_repo_path": "ai_detection/fire_detection.py", "max_stars_repo_name": "bzy880114/Safety_model_cap", "max_stars_repo_head_hexsha": "6914927a3cd8aecfb217d33d8ae480e4619a6e0a", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma integrable_weighted_\<theta>: assumes "2 \<le> a" "a \<le> x" shows "((\<lambda>t. \<theta> t / (t * ln t ^ 2)) integrable_on {a..x})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>t. \<theta> t / (t * (ln t)\<^sup>2)) integrable_on {a..x} [PROOF STEP] proof (cases "a < x") [PROOF ...
{"llama_tokens": 1210, "file": "Prime_Number_Theorem_Prime_Counting_Functions", "length": 9}
# codinf=utf-8 import numpy as np import tensorflow as tf from GNN.Sequencers.GraphSequencers import CompositeMultiGraphSequencer, CompositeSingleGraphSequencer from GNN.composite_graph_class import CompositeGraphObject from GNN.graph_class import GraphObject ################################################...
{"hexsha": "4d3055637e28a63125b67c8de687ff71c141481e", "size": 9202, "ext": "py", "lang": "Python", "max_stars_repo_path": "GNN/Sequencers/TransductiveGraphSequencers.py", "max_stars_repo_name": "NickDrake117/GNNkeras", "max_stars_repo_head_hexsha": "17fc756dcc3102c4e33d213cd83f4990659af003", "max_stars_repo_licenses":...
import tensorflow.keras.backend as K import numpy as np ####################################################################################### def categorical_crossentropy(y_true, y_pred, from_logits=False, label_smoothing=0): y_pred = K.constant(y_pred) y_true = K.cast(y_true, y_pred.dtype) if label_sm...
{"hexsha": "0669700d0c227b384570b1943c6c7166af2e230f", "size": 1800, "ext": "py", "lang": "Python", "max_stars_repo_path": "losses.py", "max_stars_repo_name": "xAlpharax/TensorFlowTools", "max_stars_repo_head_hexsha": "a03e4be067a8019383436180c7d1e3c3c44bd2a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
import sys import numpy as np from scipy.fft import rfftfreq, rfft, irfft class KdVSolverBaseClass(): def __init__(self, t, x, delta, nSkip=1): self.nSkip = nSkip self.delta = delta self.dt = t[1]-t[0] self.t = t self.x = x self.k = rfftfreq(x.size,d=x[1]-x[0])*2*n...
{"hexsha": "97e48293aeea88661cc0daf1ad06205b12d233ce", "size": 3267, "ext": "py", "lang": "Python", "max_stars_repo_path": "main_KdV_generate_data.py", "max_stars_repo_name": "omelchert/IQOSeminarWeek2020", "max_stars_repo_head_hexsha": "8ecdd9cbbc56fabbfa62b13bff0b4c1634c5a5dd", "max_stars_repo_licenses": ["MIT"], "ma...
module InfiniteOpt # Import the necessary packages. import JuMP import MathOptInterface import Distributions import Random import MutableArithmetics const _MA = MutableArithmetics const MOI = MathOptInterface const MOIU = MOI.Utilities const JuMPC = JuMP.Containers # Import all of the datatpyes, methods, macros, and ...
{"hexsha": "a1759be7d7e356004251c3387543b079b49dd08d", "size": 4509, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/InfiniteOpt.jl", "max_stars_repo_name": "thongisto/InfiniteOpt.jl", "max_stars_repo_head_hexsha": "0f7537b642acb26c3ada5230e54fa96e074f337e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
## Jobs data import (Jinsung Yoon, 10/11/2017) import numpy as np from scipy.special import expit import argparse import pandas as pd import initpath_alg initpath_alg.init_sys_path() import utilmlab ''' Input: train_rate: 0.8 Outputs: - Train_X, Test_X: Train and Test features - Train_Y: Observable outcomes - T...
{"hexsha": "a481c73791deb22e63a65af57639d5167fbdcd62", "size": 4738, "ext": "py", "lang": "Python", "max_stars_repo_path": "alg/ganite/data_preprocessing_ganite.py", "max_stars_repo_name": "loramf/mlforhealthlabpub", "max_stars_repo_head_hexsha": "aa5a42a4814cf69c8223f27c21324ee39d43c404", "max_stars_repo_licenses": ["...
import cv2 import numpy as np class TPerspectiveTransformer(): """ Perspective transformer class. """ # Constants --------------------------------------------------------------- # Manually captured on straight_lines1.jpg LEFT_BOTTOM = (193, 719) LEFT_TOP = (595, 449) RIGHT_TOP = (685, 449)...
{"hexsha": "9612119259d5a238313da81aedbf1f17e4faa582", "size": 1470, "ext": "py", "lang": "Python", "max_stars_repo_path": "perspective_transform.py", "max_stars_repo_name": "vernor1/carnd_advanced_lane_finding", "max_stars_repo_head_hexsha": "1e9d2fb7b845c647452542e9bb063781d76cd8ec", "max_stars_repo_licenses": ["Apac...
import numpy as np from scipy.ndimage import map_coordinates import cv2 # Based on https://github.com/sunset1995/py360convert class Equirec2Cube: def __init__(self, equ_h, equ_w, face_w): ''' equ_h: int, height of the equirectangular image equ_w: int, width of the equirectangular image ...
{"hexsha": "16ba8129ba914b4d8a6f6f65c482776ea8760500", "size": 3826, "ext": "py", "lang": "Python", "max_stars_repo_path": "UniFuse/datasets/util.py", "max_stars_repo_name": "HalleyJiang/UniFuse-Unidirectional-Fusion", "max_stars_repo_head_hexsha": "27a4441fe3d3031d1c9f3eb2d72a3624407d19fc", "max_stars_repo_licenses": ...