text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#include "lue/configure.hpp" #ifdef LUE_BUILD_DATA_MODEL #ifdef LUE_DATA_MODEL_WITH_PYTHON_API #include "lue/py/data_model/submodule.hpp" #endif #endif #ifdef LUE_BUILD_FRAMEWORK #ifdef LUE_FRAMEWORK_WITH_PYTHON_API #include "lue/py/framework/submodule.hpp" #endif #endif #include <boost/algorithm/string/join.hpp> #incl...
{"hexsha": "13c4b6d7ba0badaf487b55327b12bd8af26b5585", "size": 1590, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "source/python/src/python_extension.cpp", "max_stars_repo_name": "computationalgeography/lue", "max_stars_repo_head_hexsha": "71993169bae67a9863d7bd7646d207405dc6f767", "max_stars_repo_licenses": ["M...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' The MIT License (MIT) Copyright (c) 2012-2013 Karsten Jeschkies <jeskar@web.de> 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 ...
{"hexsha": "2a4274fea0b51436dde22e0a0fca0cc5304cd90d", "size": 5043, "ext": "py", "lang": "Python", "max_stars_repo_path": "pml/lib/smote.py", "max_stars_repo_name": "gatapia/py_ml_utils", "max_stars_repo_head_hexsha": "844d8b62a7c5cc0a80f4f62c0bfda092aac57ade", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18...
import warnings import chess import numpy as np from gym import spaces from pettingzoo import AECEnv from pettingzoo.utils import wrappers from pettingzoo.utils.agent_selector import agent_selector from . import chess_utils def env(): env = raw_env() env = wrappers.CaptureStdoutWrapper(env) env = wrapp...
{"hexsha": "8ad31ee61841e807f42418f0a76a863186a80047", "size": 4352, "ext": "py", "lang": "Python", "max_stars_repo_path": "pettingzoo/classic/chess/chess_env.py", "max_stars_repo_name": "hany606/PettingZoo", "max_stars_repo_head_hexsha": "ef958ff3dfb3759e980759b507448ea96ac8ba28", "max_stars_repo_licenses": ["Apache-2...
\ Part 2 of the JonesForth tutorial. \ This one is added word-by-word as they are succesfully executed \ Define / and MOD in terms of /MOD : / /MOD SWAP DROP ; : MOD /MOD DROP ; \ Some char constant : '\n' 10 ; : BL 32 ; \ BL (blank) is standard FORTH word for space. : CR '\n' EMIT ; : SPACE BL EMIT ; : NEGATE 0 SW...
{"hexsha": "a0d47dbed10896d4f8a9822e7097e3e1f7f1ecd4", "size": 12525, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "jombloforth.f", "max_stars_repo_name": "matematikaadit/JombloForth", "max_stars_repo_head_hexsha": "cf61a32e0679a6070b73f6db24bba1a0f9bb920c", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
from cctpy.baseutils import Vectors, Equal import unittest import numpy as np from cctpy.abstract_classes import LocalCoordinateSystem class LocalCoordinateSystemTest(unittest.TestCase): def test_point_to_local_coordinate(self): for i in range(10): o = np.random.rand(3) * (i + 1) ...
{"hexsha": "d4c6cda8430deca9c89570775591949473451403", "size": 3586, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/tests/local_coordinate_system_test.py", "max_stars_repo_name": "madokast/cctpy", "max_stars_repo_head_hexsha": "b02c64220ea533a4fc9cad0b882d1be6edadf1c0", "max_stars_repo_licenses": ["MIT"],...
""" Factor Analysis-regularized logistic regression. Is `linear_layer` necessary? """ __date__ = "June - December 2021" import numpy as np import os from sklearn.base import BaseEstimator from sklearn.utils.multiclass import unique_labels from sklearn.utils.validation import check_X_y, check_array, check_is_fitted i...
{"hexsha": "a43df95d9cd6c1d00d57c3f5dc494b56d8e5cdb2", "size": 18316, "ext": "py", "lang": "Python", "max_stars_repo_path": "lpne/models/factor_analysis_sae.py", "max_stars_repo_name": "carlson-lab/lpne", "max_stars_repo_head_hexsha": "b45087506669216d885b82ce11900c2ab006d456", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding: utf-8 -*- from __future__ import print_function from acq4.pyqtgraph.flowchart.Node import Node from acq4.util import Qt import numpy as np import acq4.util.metaarray as metaarray from acq4.pyqtgraph.flowchart.library.common import * import acq4.util.functions as functions class ExpDeconvolve(CtrlNode): ...
{"hexsha": "d578dafaad4ce032a73e6b5260d60d08dd43179e", "size": 2044, "ext": "py", "lang": "Python", "max_stars_repo_path": "acq4/util/flowchart/Filters.py", "max_stars_repo_name": "aleonlein/acq4", "max_stars_repo_head_hexsha": "4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np def cummin(x): """A python implementation of the cummin function in R""" for i in range(1, len(x)): if x[i-1] < x[i]: x[i] = x[i-1] return x def bh_fdr(pval): """A python implementation of the Benjamani-Hochberg FDR method. This code should always give preci...
{"hexsha": "1083ca1bcf90ccd5d22dad43aaa8af1e8f328fe8", "size": 1025, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepDegron/pvalue.py", "max_stars_repo_name": "ctokheim/deepDegron", "max_stars_repo_head_hexsha": "753687f92fbff22f1a3044c5dc398aa1a19373ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import rasterio def load_datasets(): """ Loads the two target datasets from disk into memory. """ print("Reading temperature data...") hourly_max_temp_data = rasterio.open("./hourly_max_temp_2019.nc").read() print("Reading land cover data...") land_cover_data = rasterio.o...
{"hexsha": "e52d493c53dd040d3b218c4f7be1ab2158de785e", "size": 1704, "ext": "py", "lang": "Python", "max_stars_repo_path": "sci-software-task/cpp/Data/convert.py", "max_stars_repo_name": "idouros/sci-software-task", "max_stars_repo_head_hexsha": "594fa39a1bac3881aa357d8dfb5eadaeeaa917b8", "max_stars_repo_licenses": ["M...
import noise as n import numpy as np import random import curses import math import argparse #default args scale = 50 octaves = 6 xspeed = 1 yspeed = .75 adjust = .15 colors = [17, 18, 19, 20, 21, 228, 41, 40, 34, 28, 22, 245, 244, 243, 242, 241, 240] #argument parser parser = argparse.ArgumentParser(description='Fly...
{"hexsha": "b98237485bff545c28a5c3f079d1fedc0b0adaea", "size": 2305, "ext": "py", "lang": "Python", "max_stars_repo_path": "cterra.py", "max_stars_repo_name": "wymcg/termsavers", "max_stars_repo_head_hexsha": "36de47b2ecce5b66ad106b2484dcf3cb1b73bb63", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_star...
using Pkg using Dates const HOME = ENV["HOME"] Pkg.activate("$HOME/HelioseismicKernels") using MPI MPI.Init() using HelioseismicKernels const comm = MPI.COMM_WORLD const nworkers = MPI.Comm_size(comm) try HelioseismicKernels.Cω(comm, Point2D(π/2, 0), Point2D(π/2, deg2rad(45)), los_earth(), ν_ind_range = 1:nwo...
{"hexsha": "e2d0cd6eddd35dfbac6eeebc07d228891a61551b", "size": 616, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "computecrosscov.jl", "max_stars_repo_name": "jishnub/HelioseismicKernels.jl", "max_stars_repo_head_hexsha": "7c2ee184c57a1b181f725c6fc1bb2b66a7b265ce", "max_stars_repo_licenses": ["MIT"], "max_stars...
from absl import flags from absl import app import sys import os from sotabencheval.language_modelling import WikiText103Evaluator, WikiText2Evaluator import tensorflow as tf dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(f"{dir_path}/tf") # add tf. to path to import dynamic_eval #os.chdir(...
{"hexsha": "5792ea174e7f7ddf5800ad7da81b289f9fbda6e7", "size": 2473, "ext": "py", "lang": "Python", "max_stars_repo_path": "sotabench.py", "max_stars_repo_name": "PiotrCzapla/dynamiceval-transformer", "max_stars_repo_head_hexsha": "010e05884031490f07abb107ef66af9c0061e094", "max_stars_repo_licenses": ["Apache-2.0"], "m...
""" Original code from OSVOS (https://github.com/scaelles/OSVOS-TensorFlow) Sergi Caelles (scaelles@vision.ee.ethz.ch) Modified code for liver and lesion segmentation: Miriam Bellver (miriam.bellver@bsc.es) """ import os import sys import tensorflow as tf slim = tf.contrib.slim import numpy as np root_folder = os.pat...
{"hexsha": "b90882a5a575e5b849b097707bf3dea0ea3c1dc7", "size": 1090, "ext": "py", "lang": "Python", "max_stars_repo_path": "seg_liver_test.py", "max_stars_repo_name": "rishyak/liverseg-2017-nipsws", "max_stars_repo_head_hexsha": "73d16bc9b818b1d0bb9b1cfcb67f6a8c25b5dba2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python # -*- coding: utf8 -*- import numpy as np from numpy import linalg as LA def gmres(A, b, eps=1e-16, iteration=None, x_0=None): if x_0 is None: x_0 = np.zeros(len(b)) if iteration is None: iteration = len(b) r = A.dot(x_0) - b beta = LA.norm(r, 2) v = [r / bet...
{"hexsha": "2cbe7c2bc477df99f459797234a805fc52d3aef9", "size": 652, "ext": "py", "lang": "Python", "max_stars_repo_path": "gmres.py", "max_stars_repo_name": "VasavanThiru/gm-ed-res", "max_stars_repo_head_hexsha": "e03f02863ae0d9e706ff6d07a147e318504690c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
""" Suite of Functions for Pre-Processing Chunked Neural Data """ import numpy as np from scipy.signal import hilbert from scipy import fftpack try: from neurodsp import filt # from mne.filter import filter_data _has_neurodsp = True except ImportError: _has_neurodsp = False try: import mne # ...
{"hexsha": "89fb827a03666ba10ad5a7e06112754f82550ee9", "size": 14832, "ext": "py", "lang": "Python", "max_stars_repo_path": "BirdSongToolbox/preprocess.py", "max_stars_repo_name": "Darilbii/BirdSongToolbox", "max_stars_repo_head_hexsha": "f4853a7f6cb5c4ef0f57e9f346be08f6e153ca65", "max_stars_repo_licenses": ["Apache-2....
from random import randint, uniform import torch.utils.data as data import os, sys sys.path.append("..") from src.utils import get_vid_list, get_img_iuv_text_mask, TransferTexture, get_mask_list import numpy as np import cv2 from src.computer_angle import compute_angle import pickle from options import get_general_op...
{"hexsha": "a1111b90a3a8f77ad26edea81d98caad77b1cdc7", "size": 34007, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data.py", "max_stars_repo_name": "Larry-u/JAFPro", "max_stars_repo_head_hexsha": "10e5ee3b77bcdb103709c08c3e7d033396bab5ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_sta...
import argparse import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import pandas as pd from simulator.network_simulator.bbr import BBR from simulator.network_simulator.cubic import Cubic from simulator.trace import Trace def parse_args(): """Parse arguments from ...
{"hexsha": "48e13296fc28357c0f747eb3a0b67441c81f025d", "size": 2885, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_scripts/plot_validation.py", "max_stars_repo_name": "zxxia/RL-CC", "max_stars_repo_head_hexsha": "d3d3be0097d69ee07b06363ad531cf2479029d74", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file adjlist.py is referred and derived from project NetworkX, # # https://github.com/networkx/networkx/blob/master/networkx/readwrite/adjlist.py # # which has the following license: # # Copyright (C) 2004-2020, NetworkX Developers # Aric Hagberg <hagberg@lanl.go...
{"hexsha": "979453e1c5353721eebc4c8294e2dc50df0ca323", "size": 3624, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/graphscope/nx/readwrite/adjlist.py", "max_stars_repo_name": "haoxins/GraphScope", "max_stars_repo_head_hexsha": "e1e22a425b5c33bed0dea930f8722e6159484153", "max_stars_repo_licenses": ["Apac...
[STATEMENT] lemma nprv_addLemmaE: assumes "prv \<phi>" "nprv (insert \<phi> F) \<psi>" and "\<phi> \<in> fmla" "\<psi> \<in> fmla" and "F \<subseteq> fmla" and "finite F" shows "nprv F \<psi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nprv F \<psi> [PROOF STEP] using assms nprv_cut prv_nprvI [PROOF STATE] proof...
{"llama_tokens": 374, "file": "Syntax_Independent_Logic_Natural_Deduction", "length": 2}
import sys sys.path.append('..') from common.core import * from common.gfxutil import * from common.audio import * from common.mixer import * from common.note import * from common.wavegen import * from common.wavesrc import * from common.writer import * from kivy.core.window import Window from kivy.clock import Clock ...
{"hexsha": "11b53b056896fff2669894313a7eeea7dd133a00", "size": 3207, "ext": "py", "lang": "Python", "max_stars_repo_path": "project/Player.py", "max_stars_repo_name": "osmidy/Dischord", "max_stars_repo_head_hexsha": "3c3802eb4917adb9384256d8a0c7ba4f123fd166", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import torch import torch.distributions from torch.distributions import Normal, Uniform from torch.nn import Sequential, Tanh, ReLU, Linear, Dropout, CELU, BatchNorm1d from torch.utils.tensorboard import SummaryWriter import numpy as np import matplotlib import matplotlib.pyplot as plt from tqdm import tqdm import sys...
{"hexsha": "29357cce21c0d5d95a48c0e2342d0822e5c3a1f6", "size": 15456, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/SIVILastLayer.py", "max_stars_repo_name": "ludwigwinkler/pytorch_ProbabilisticLayers", "max_stars_repo_head_hexsha": "10311a11e76bc98027766918131486ad8d9a9d36", "max_stars_repo_licens...
import numpy as np matrix = np.random.randint(10, size=(5, 5)) print(matrix); i=0; j=0; shortestPath = []; while "true": if i >= 5: break; center = int(matrix[i][j]); nearElements = []; top = 0; if i > 0: nearElements.append([i - 1, j, (matrix[i - 1][j])]); top = (matrix[i...
{"hexsha": "3c34298f08c209a793b0f23805e608bb54a6b0be", "size": 3217, "ext": "py", "lang": "Python", "max_stars_repo_path": "PythonTask/path.py", "max_stars_repo_name": "panchalneel/CaesarCipher", "max_stars_repo_head_hexsha": "5a0d0e7a9ab3511a81551323f985f4271857fdff", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from __future__ import print_function # # Computing the Gibbs free energy difference between a set of polymorphs by integrating the helmholtz free energy at all volumes # # Copyright Eric Dybeck and Michael R. Shirts, University of Virginia, 2014 # import numpy # numerical array library import pymbar # multistate Benn...
{"hexsha": "b3e1aa4c5b30210c9f844799ea39b57b4315280c", "size": 17737, "ext": "py", "lang": "Python", "max_stars_repo_path": "PSCP/analysis-scripts/dA-to-dG.py", "max_stars_repo_name": "shirtsgroup/finite-temperature-crystal-scripts", "max_stars_repo_head_hexsha": "799bc882d958d9afa264a168dae0b3051bafaf0b", "max_stars_r...
""" Stores data in a custom class and generates attributes for other modules """ import warnings import numpy as np from skhyper.view import hsiPlot from sklearn.decomposition import PCA class Process: """ Process object to store the hyperspectral array. Parameters ---------- X : array, dimensi...
{"hexsha": "e12cd8ac76cd95201e33aab900e9caae3ea542d1", "size": 6229, "ext": "py", "lang": "Python", "max_stars_repo_path": "skhyper/process/_process.py", "max_stars_repo_name": "tensor-strings/scikit-hyper", "max_stars_repo_head_hexsha": "795a0b48d92c644ef3662e9957c04e5a9a6f85b2", "max_stars_repo_licenses": ["BSD-3-Cla...
import argparse import os import torch import yaml import numpy as np import torch.nn.functional as F import cv2 import config_folder as cf from data_loaders.Chairs import Chairs from data_loaders.kitti import KITTI from data_loaders.sintel import Sintel from data_loaders.KLens import KLens from frame_utils import wr...
{"hexsha": "a7d7526e883c968d05c539bf72d1a15ba0c94dda", "size": 5720, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "klens-codes/MaskFlownet-Pytorch", "max_stars_repo_head_hexsha": "94d41fd20f774845a1b2df7f77ec95c44217af94", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
"""Script to make the obiwan scaling plots in my thesis""" if __name__ == "__main__": import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import subprocess import os import pickle import json import re import pandas as pd STAGES=['tims', 'mask_junk', 'srcs', 'fit...
{"hexsha": "21d9fa6e385542d6fdff98032817ac83eed2dc64", "size": 6261, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/obiwan/scaling/timing.py", "max_stars_repo_name": "legacysurvey/obiwan", "max_stars_repo_head_hexsha": "1810927aaad3cf458ada3962576355727c464ca6", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
onefunc <- function() { m <- try(func(infile = bf, csh = csh , pmod = "")) }
{"hexsha": "a4e3c95e22f7d3e1cf2f0955853aceafff3b6576", "size": 81, "ext": "r", "lang": "R", "max_stars_repo_path": "_unittests/ut_languages/data/r4.r", "max_stars_repo_name": "mohamedelkansouli/Ensae_py2", "max_stars_repo_head_hexsha": "e54a05f90c6aa6e2a5065eac9f9ec10aca64b46a", "max_stars_repo_licenses": ["MIT"], "max...
(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) (* \VV/ **************************************************************) (* // * Th...
{"author": "JasonGross", "repo": "category-coq-experience-tests", "sha": "f9949ede618788fd051fe8327f997ee683388e49", "save_path": "github-repos/coq/JasonGross-category-coq-experience-tests", "path": "github-repos/coq/JasonGross-category-coq-experience-tests/category-coq-experience-tests-f9949ede618788fd051fe8327f997ee6...
(* Copyright (c) 2014, Robert Dockins *) Require Import String. Require Import atoms. Require Import permutations. Require Import basics. Require Import preord. Require Import categories. Require Import sets. Require Import finsets. Require Import esets. Require Import effective. Require Import directed. Require Imp...
{"author": "robdockins", "repo": "domains", "sha": "6feea4ed576f8aa849af9fa102633d5df1191360", "save_path": "github-repos/coq/robdockins-domains", "path": "github-repos/coq/robdockins-domains/domains-6feea4ed576f8aa849af9fa102633d5df1191360/st_lam.v"}
(* File: List_Inversions.thy Author: Manuel Eberl, TU München A formalisation of inversions of a list and the O(n log n) divide-and-conquer algorithm to count them. *) section \<open>The Inversions of a List\<close> theory List_Inversions imports Main "HOL-Combinatorics.Permutations" begin subsectio...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/List_Inversio...
import numpy as np import cv2 import numpy as np from tqdm import tqdm from os.path import join def load_sphere(): cur_dir = os.path.dirname(__file__) faces = np.loadtxt(join(cur_dir, 'sphere_faces_20.txt'), dtype=np.int) vertices = np.loadtxt(join(cur_dir, 'sphere_vertices_20.txt')) return vertices, f...
{"hexsha": "d632b890f66d7b559b0acbfbb84550409831f527", "size": 12311, "ext": "py", "lang": "Python", "max_stars_repo_path": "vis/lib/geometry/geometry.py", "max_stars_repo_name": "CvHadesSun/3D-Tools", "max_stars_repo_head_hexsha": "b852bf84710fed0b5a01fa71a1ab371ec93392df", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np def calc_dihedral(b1, b2, b3): '''Refer to the formula on wikipedia: https://en.wikipedia.org/wiki/Dihedral_angle#cite_note-3 for details. It returns angles in a unit of degree. b array has to be a 2D-array in order to sup...
{"hexsha": "95091716e3df67838d66cf7bb98b491f0e75533a", "size": 863, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrotein/angle.py", "max_stars_repo_name": "carbonscott/pyrotein", "max_stars_repo_head_hexsha": "4c41eade0d014e70aadf9f9c475cbc4255a0a32e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import numpy as np from pmesh.pm import ParticleMesh from nbodykit.lab import BigFileCatalog, BigFileMesh, FFTPower, ArrayCatalog from nbodykit.source.mesh.field import FieldMesh from nbodykit.transform import HaloRadius, HaloVelocityDispersion from nbodykit.cosmology.cosmology import Cosmology from time import time im...
{"hexsha": "99364bc67b016d8e8256f9b9c47f5429f23147ec", "size": 6348, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/hodgal.py", "max_stars_repo_name": "farnikn/MithraLIMSims", "max_stars_repo_head_hexsha": "6b11448b8859519edf9733b2e22bc5569356942f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
\SecDef{symmetries}{Rotational Invariants in NORX} In this section I describe rotational symmetries in the permutation $F$ of NORX. They exist both on the word level (inherited from $G$) and on the state level (structural). \subsection{State Invariants} We can see a 4x4 NORX state $S$ as a list of 4 columns: $S = (c...
{"hexsha": "93d567652c6c5990671c1ff8a7911d1ba1f02d20", "size": 15994, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis-source/9niNORX/3symmetries.tex", "max_stars_repo_name": "hellman/thesis", "max_stars_repo_head_hexsha": "6ba1c2b241e63c07cf76108481c1b67f21a50f12", "max_stars_repo_licenses": ["MIT"], "max_s...
""" runabc(ABCsetup::ABCtype, targetdata; progress = false) Run ABC with ABCsetup defining the algotrithm and inputs to algorithm, targetdata is the data we wish to fit the model to and will be used as an input for the simulation function defined in ABCsetup. If progress is set to `true` a progress meter will be ...
{"hexsha": "be827c7e048db6552e26dc8cce2868107846f518", "size": 21710, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ABCalgorithm.jl", "max_stars_repo_name": "quipa/ApproxBayes.jl", "max_stars_repo_head_hexsha": "bde721fac3eeb071b2b945fa49e00c2b5c0820c0", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#pragma once #include <string> #include <cstdint> #include <memory> #include <boost/asio.hpp> #include <speaker_connection.hpp> #include <aria/io_thread.hpp> namespace aria { class speaker_callbacks { public: virtual void audio_received(const char * data, size_t length) = 0; virtual void ...
{"hexsha": "73f00813f518503fa22ce1ef1d76f30b37acf3ec", "size": 828, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/aria/speaker.hpp", "max_stars_repo_name": "Andlon/aria", "max_stars_repo_head_hexsha": "30fcabf9a2f577c6bbaea66ca0b3ead21dba92e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import numpy import torch import conf.config import dataset.voc_dataset import model.yolov3 if __name__ == "__main__": # 0. 确保每次的伪随机数相同以便于问题的复现 numpy.random.seed(0) torch.manual_seed(1) # 1. 配置文件 Config = conf.config.VocConfig # 2. 验证集 BATCH_SIZE = 16 voc_dataloader = dataset.voc_da...
{"hexsha": "d3e9a563887151d357d04e16b2b65aa2846ff111", "size": 1017, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict_voc_with_loss.py", "max_stars_repo_name": "lilinxi/210414_CfgYoloV3", "max_stars_repo_head_hexsha": "e6bbb64efa22e7d4c1f583f033370be4b16e548b", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma Transset_INT: "(\<And>x. x \<in> A \<Longrightarrow> Transset (B x)) \<Longrightarrow> Transset (\<Sqinter> (B ` A))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>x. x \<in> A \<Longrightarrow> Transset (B x)) \<Longrightarrow> Transset (\<Sqinter> (B ` A)) [PROOF STEP] by (metis Transset_...
{"llama_tokens": 126, "file": "ZFC_in_HOL_ZFC_in_HOL", "length": 1}
// Copyright (C) 2015, Pawel Tomulik <ptomulik@meil.pw.edu.pl> // // 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) #define BOOST_TEST_MODULE test_txpl_vm_eval_binary_eq #include <txpl/test_config.hpp> #include <...
{"hexsha": "bc9198e27d42f5af5d02ee7a7ed4c807256c19bb", "size": 26480, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/txpl/vm/eval_binary_eq_test.cpp", "max_stars_repo_name": "ptomulik/txpl", "max_stars_repo_head_hexsha": "109b5847abe0d46c598ada46f411f98ebe8dc4c8", "max_stars_repo_licenses": ["BSL-1.0"], "max...
""" Title: Video Classification With TimeDistributed Layer Author: [Sujoy K Goswami](https://www.linkedin.com/in/sujoy-kumar-goswami/) Date created: 2022/01/09 Last modified: 2022/01/10 Description: Guide to examine any video-classification-model quickly without any GPU. """ """ ## Introduction Video Class...
{"hexsha": "c02e17a5fbac572032f17b85c1dd31da84a98fd5", "size": 7315, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/vision/video_classify.py", "max_stars_repo_name": "SujoyKG/keras-io", "max_stars_repo_head_hexsha": "ca430025f0563907c7d6e57d66acde08c467ecac", "max_stars_repo_licenses": ["Apache-2.0"], ...
[STATEMENT] lemma valid_line_prepend_B_iff: "valid_line (B # xs) \<longleftrightarrow> valid_line xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. valid_line (B # xs) = valid_line xs [PROOF STEP] using valid_line_prepend_B valid_line_drop_B [PROOF STATE] proof (prove) using this: valid_line ?xs \<Longrightarrow>...
{"llama_tokens": 190, "file": "VerifyThis2018_Challenge2", "length": 2}
import os import unittest import numpy as np from gnes.encoder.base import BaseEncoder class TestPCAEncoder(unittest.TestCase): def setUp(self): dirname = os.path.dirname(__file__) self.dump_path = os.path.join(dirname, 'pca_encoder.bin') self.yaml_path = os.path.join(dirname, 'yaml', 'p...
{"hexsha": "dd17cde3ed4c395d9240f2fda074633c86e123f7", "size": 1061, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pca_encoder.py", "max_stars_repo_name": "micro-pixel/gnes", "max_stars_repo_head_hexsha": "388d1ba718ec04eedaaff3ce34da43689c197ee7", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
/* Copyright (c) 2008, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
{"hexsha": "7323569f46a2c88ed93b58db657c64be7b6c08c3", "size": 9734, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ThirdParty/libtorrent-rasterbar-0.15.6/src/lt_trackers.cpp", "max_stars_repo_name": "CarysT/medusa", "max_stars_repo_head_hexsha": "8e79f7738534d8cf60577ec42ed86621533ac269", "max_stars_repo_license...
from numpy import array, sqrt, kron, eye, ones from .abstract import AbstractEnv, organic, bandit, stop, f, env_args # Default arguments for toy environment ------------------------------------ env_0_args = env_args # users are grouped into distinct clusters to prevent mixing env_args['num_clusters'] = 2 # varianc...
{"hexsha": "f9bf9cd08a413cf8aba50c5130e3d20aac43061f", "size": 2377, "ext": "py", "lang": "Python", "max_stars_repo_path": "reco_gym/envs/reco_env_v0.py", "max_stars_repo_name": "NunoEdgarGFlowHub/reco-gym", "max_stars_repo_head_hexsha": "42701b7ae115b879edf6881f368878c458a2a368", "max_stars_repo_licenses": ["Apache-2....
# general libraries import warnings import numpy as np # image processing libraries from scipy import ndimage, interpolate, fft, signal from scipy.optimize import fsolve from skimage.feature import match_template from skimage.transform import radon from skimage.measure import ransac from sklearn.cluster import KMeans ...
{"hexsha": "0ab9fffce83fff3a990620bd09f7c25790955385", "size": 79340, "ext": "py", "lang": "Python", "max_stars_repo_path": "matching_tools.py", "max_stars_repo_name": "GO-Eratosthenes/start-code", "max_stars_repo_head_hexsha": "d40192a482a260676db9ec9b3ece6854c0d8ccf7", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import numpy try: import cupy import cupyx import cupy.cuda from cupy.cuda.compiler import compile_with_cache # noqa: F401 has_cupy = True # We no longer have to set up the memory pool, fortunately. except ImportError: cupy = None cupyx = None has_cupy = False from .ops import O...
{"hexsha": "5a5ca32576695c900a9a894683366b37f63a06c3", "size": 5057, "ext": "py", "lang": "Python", "max_stars_repo_path": "thinc/backends/cupy_ops.py", "max_stars_repo_name": "justindujardin/thinc", "max_stars_repo_head_hexsha": "b3d641c4d42e430fe9917ded7cb2892256f9b7e1", "max_stars_repo_licenses": ["MIT"], "max_stars...
// Copyright (c) 2013, Thomas Goyne <plorkyeran@aegisub.org> // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" A...
{"hexsha": "68f2f35240d4d6cc91543cecfb80d7e35c967166", "size": 7274, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "aegisub/libaegisub/common/karaoke_matcher.cpp", "max_stars_repo_name": "rcombs/Aegisub", "max_stars_repo_head_hexsha": "58f35cd31c7f0f5728e0a28e6a7a9fd6fce70c50", "max_stars_repo_licenses": ["ISC"],...
from google.protobuf import text_format import numpy as np import caffe_pb2 def parse_caffemodel(filepath): ''' parses the trained .caffemodel file filepath: /path/to/trained-model.caffemodel returns: layers ''' f = open(filepath, 'rb') contents = f.read() netparam = caffe_pb2.NetPar...
{"hexsha": "865e047507df4099d8f658de9c31ca92567c1bf9", "size": 741, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/caffe_converter/caffe_parse/parse_from_protobuf.py", "max_stars_repo_name": "Liuxg16/BrainMatrix", "max_stars_repo_head_hexsha": "0ec70edd4e12dd3719d20dd14d4e24438c60326f", "max_stars_repo_li...
import matplotlib.path import numpy # CSEP Imports import numpy as np import pyproj from csep.utils.time_utils import datetime_to_utc_epoch, epoch_time_to_utc_datetime from csep.utils import plots class Simulation: """ View of CSEP Experiment. Contains minimal information required to perform evaluations of ...
{"hexsha": "5224a83d64fc5abc4aa02b4c3e496339f398a982", "size": 12647, "ext": "py", "lang": "Python", "max_stars_repo_path": "csep/models.py", "max_stars_repo_name": "wsavran/csep2", "max_stars_repo_head_hexsha": "daf44c8c31badf8474794a32f89f2c44dcbe1f61", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
# (C) Copyright IBM Corp. 2017 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
{"hexsha": "dc418914b2159798e1908a0ad2ed680f4cbeab7a", "size": 2041, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tests/bandit.py", "max_stars_repo_name": "IBM-DSE/dybm", "max_stars_repo_head_hexsha": "3484e337954c017f0a20166403a6ddba4ce274c0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
f = open("jawiki-country.txt", "r") dict = Dict() for line in readlines(f) if ismatch(r"^\|.+\s=\s",line) m = match(r"^\|(.+)\s=\s(.+)",line) dict[m.captures[1]] = m.captures[2] end end println("key\tvalue") for k in keys(dict) println(k, "\t", dict[k]) end
{"hexsha": "65fd9e84050a29aafcf68f4f5383a6d8dca1c298", "size": 274, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "code/25.jl", "max_stars_repo_name": "nzw0301/julia-nlp100kncok", "max_stars_repo_head_hexsha": "1fd992b28c702328177f1b9fa9c261c4c116149c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
import os import numpy as np from tensorflow.keras.callbacks import Callback import tensorflow.keras.backend as K from ..core import ops from paz.models import SSD300 from paz.pipelines import SingleShotInference from paz.evaluation import evaluate from paz.datasets import VOC class DrawInferences(Callback): "...
{"hexsha": "c798b82ad86a0e33b377f50e586d2a1f5e5d81c6", "size": 5358, "ext": "py", "lang": "Python", "max_stars_repo_path": "paz/optimization/callbacks.py", "max_stars_repo_name": "SushmaDG/MaskRCNN", "max_stars_repo_head_hexsha": "10f27fed31a2927b585aa1815cb5e096da540952", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma deadlock_free_skip:"DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P UNIV \<sqsubseteq>\<^sub>F\<^sub>D SKIP" [PROOF STATE] proof (prove) goal (1 subgoal): 1. DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P UNIV \<sqsubseteq>\<^sub>F\<^sub>D SKIP [PROOF STEP] by(simp add:DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P_def failure_divergen...
{"llama_tokens": 157, "file": "HOL-CSP_Assertions", "length": 1}
""" Brains of the operation, runs tensorflow to determine a phonetic spelling for any made up word """ #SAmple: https://github.com/Piasy/Udacity-DLND/blob/master/language-translation/dlnd_language_translation.ipynb from distutils.version import LooseVersion import warnings import tensorflow as tf from tensorflow.pyt...
{"hexsha": "3e39d5809667e7bd59beb544da7708298af311cf", "size": 22136, "ext": "py", "lang": "Python", "max_stars_repo_path": "TF_code/TFLanguageTranslation.py", "max_stars_repo_name": "Cory-Edgett/IntroToAI-Text-to-Speech", "max_stars_repo_head_hexsha": "8c1e05b5e83cbb8d4cc24f7d81445cb3215e4448", "max_stars_repo_license...
[STATEMENT] lemma agree_weakening_1: assumes "\<Gamma> \<turnstile> e, eP, eV : \<tau>" "atom y \<sharp> e" "atom y \<sharp> eP" "atom y \<sharp> eV" shows "\<Gamma>(y $$:= \<tau>') \<turnstile> e, eP, eV : \<tau>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Gamma>(y $$:= \<tau>') \<turnstile> e, eP, eV :...
{"llama_tokens": 64519, "file": "LambdaAuth_Agreement", "length": 38}
import time import numpy as np from multiprocessing.dummy import Pool as ThreadPool from mcts import MCTS from play import play_match from players.uninformed_mcts_player import UninformedMCTSPlayer from players.deep_mcts_player import DeepMCTSPlayer # Object that coordinates AlphaZero training. class Trainer: def...
{"hexsha": "0bf4320dd5cac88814b1c524a685eaa9d7381135", "size": 4155, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "Counterfeiter/multiplayer-alphazero", "max_stars_repo_head_hexsha": "e89477975958d995772487ad77fe8859a3778a36", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import pytest import xarray as xr from climpred import PerfectModelEnsemble from climpred.exceptions import DatasetError from climpred.metrics import DETERMINISTIC_PM_METRICS xr.set_options(display_style="text") comparison_dim_PM = [ ("m2m", "init"), ("m2m", "member"), ("m2m", ["init",...
{"hexsha": "1a126c3ca58e0752bbb430a0739e980e05b4c988", "size": 14492, "ext": "py", "lang": "Python", "max_stars_repo_path": "climpred/tests/test_PerfectModelEnsemble_class.py", "max_stars_repo_name": "rom-py/climpred", "max_stars_repo_head_hexsha": "9b168992704b1b7627aa82a08edd5faecfeee7ac", "max_stars_repo_licenses": ...
import numpy as np import matplotlib.pyplot as plt moldata = np.loadtxt('sirius_data.dat') for i in range(len(moldata)): pKa = moldata[i,1] logp0 = moldata[i,2] logp1 = moldata[i,3] p0 = 10**(+logp0) p1 = 10**(+logp1) ka = 10**(-pKa) pHexp = [1.0,1.2,2.0,3.0,4.0,5.0,6.0,6.5,7.0,7.4,8.0,9...
{"hexsha": "28b87cbb5466fd1fc45443bd453f24d156ca311c", "size": 1062, "ext": "py", "lang": "Python", "max_stars_repo_path": "physical_property/logD/theory/logDplot.py", "max_stars_repo_name": "samplchallenges/SAMPL7", "max_stars_repo_head_hexsha": "1feed16ed8502a3519559fbdcc23812f21c64be1", "max_stars_repo_licenses": ["...
""" Script for extracting 256 x 256 pixel, plaque-centered images from the 1536 x 1536 color-normalized images """ import csv import glob, os import cv2 import numpy as np import pandas as pd import matplotlib.pyplot as plt from skimage import measure from tqdm import tqdm import random # Set random seeds np.random.se...
{"hexsha": "0f5ce36b99504eae90cb39e60097544a07ce3914", "size": 18624, "ext": "py", "lang": "Python", "max_stars_repo_path": "blob_detect.py", "max_stars_repo_name": "keiserlab/consensus-learning-paper", "max_stars_repo_head_hexsha": "2d204362569489b9ab4c861b6cb6c5b819659ada", "max_stars_repo_licenses": ["MIT"], "max_st...
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import pandas as pd import feather import numpy as np # Input data files are available in the "../input/" directory. # For example, running this (by clicking run...
{"hexsha": "94dc42ac7912e3712edf2d561cfb083511db9fe0", "size": 3618, "ext": "py", "lang": "Python", "max_stars_repo_path": "Create_data.py", "max_stars_repo_name": "mcvenkat/Python-Programs", "max_stars_repo_head_hexsha": "2ff66bbd5b07c8e093b11360e1dcac06740a5024", "max_stars_repo_licenses": ["CC0-1.0", "MIT"], "max_st...
begin=clock; omega=1; over_r=2.4; %note that over_r should be between 3 and 4 for this program. rate=5.3; %this is approximatly the ratio N/r, here the ratio must be above 1 n=ceil(rate*over_r);%this is the number of unions of sets p=ceil(2*n-over_r); %this is the degree of the fine mesh, use p=n+1, or larger L=200/n; ...
{"author": "yueyuzhao", "repo": "gyrophone", "sha": "aa816eec3d7a17d9e30ab7afa0d4b79ef0a7a82e", "save_path": "github-repos/MATLAB/yueyuzhao-gyrophone", "path": "github-repos/MATLAB/yueyuzhao-gyrophone/gyrophone-aa816eec3d7a17d9e30ab7afa0d4b79ef0a7a82e/strohmer_tanner_code/arbitrary_over.m"}
# Best Model: valid dice: 0.83 # use loop and list to create the only coarse model # 2018.4.2 import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torchvision import datasets from torchvision import transforms import torchvision as tv import numpy as np import matp...
{"hexsha": "4f36b0d1bd91cef9de532815293aa69fbbb71ea3", "size": 11181, "ext": "py", "lang": "Python", "max_stars_repo_path": "dilation2d_v2.0.py", "max_stars_repo_name": "twni2016/Prostate-Image-Segmentation", "max_stars_repo_head_hexsha": "d68e61f3910477c6a635aa8e0f4b35304798586e", "max_stars_repo_licenses": ["MIT"], "...
import math from typing import Optional import cv2 import numpy as np from paralleldomain.constants import CAMERA_MODEL_OPENCV_FISHEYE, CAMERA_MODEL_OPENCV_PINHOLE, CAMERA_MODEL_PD_FISHEYE from paralleldomain.utilities.mask import lookup_values class DistortionLookupTable(np.ndarray): """Container object for di...
{"hexsha": "379675c566c4246e9e6312ca7b98b04df749b29e", "size": 9575, "ext": "py", "lang": "Python", "max_stars_repo_path": "paralleldomain/utilities/projection.py", "max_stars_repo_name": "parallel-domain/pd-sdk", "max_stars_repo_head_hexsha": "20e3d052a5cb612a2dd84bda7b1b5487a6a60edc", "max_stars_repo_licenses": ["Apa...
#ifndef MANUALPHASE_HPP #define MANUALPHASE_HPP #include <set> #include <cmath> #include <Eigen/Core> #include <Eigen/Dense> namespace raisim { constexpr int n_gait = 9; template<typename T> class ManualPhase { public: ManualPhase() { for (int i = 0; i < n_gait; ++i) ...
{"hexsha": "603fc96c27d46bd0f8770e75157eefc30c2d5497", "size": 13427, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/ManualPhase.hpp", "max_stars_repo_name": "ZJU-XMech/PhaseGuidedControl", "max_stars_repo_head_hexsha": "f8a35ae8e1f903e948710b50681d2aa59046150e", "max_stars_repo_licenses": ["MIT"], "max_stars...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import os import theano import numpy from wordclasses import TheanoBigramOptimizer, NumpyBigramOptimizer from theanolm.vocabulary import Vocabulary from theanolm.vocabulary import compute_word_counts, BigramStatistics class TestBigramOptimizer(unittest....
{"hexsha": "bc3af24334c7853926542558d398fc29df93fa10", "size": 10110, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/wordclasses/bigramoptimizer_test.py", "max_stars_repo_name": "vasuneralla/theanolm", "max_stars_repo_head_hexsha": "51fbd89082ca3ea5d0178d09b744cf15c0113ab6", "max_stars_repo_licenses": ["A...
import csv import cv2 import numpy as np import tensorflow as tf from keras.models import Sequential from keras.layers import Flatten, Dense, Dropout, Lambda, Cropping2D from keras.layers.convolutional import Convolution2D from keras import optimizers from sklearn.model_selection import train_test_split from sklearn.u...
{"hexsha": "b199729abcf5d80745f35f8cd143cd3fa3f4f890", "size": 4061, "ext": "py", "lang": "Python", "max_stars_repo_path": "clone.py", "max_stars_repo_name": "Denis-Tsvetanov/sdc-behavioralCloning", "max_stars_repo_head_hexsha": "56d8d6c25cea13c1171c624192baf0c8cb215292", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- """ Created on Thu May 6 17:25:27 2021 @author: ShiningStone """ import torch import ignite from ignite.metrics import Loss,RunningAverage from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator from ignite.contrib.handlers import ProgressBar from ignite import...
{"hexsha": "9198ba37b7e41ffd5ad5ac160d7fe5af5cb56524", "size": 10032, "ext": "py", "lang": "Python", "max_stars_repo_path": "StimRespFlow/DataProcessing/DeepLearning/Trainer.py", "max_stars_repo_name": "powerfulbean/StellarBrainwav", "max_stars_repo_head_hexsha": "7636c28b0dbbf7cdd5514b9699e1d3cb21883563", "max_stars_r...
#!/usr/bin/env python # TODO # this is for Suzhou Chinese data # change vow and the conditional flow statements accordingly import os, re, glob, shutil from PIL import Image import numpy as np import argparse import audiolabel from operator import itemgetter from ultratils.rawreader import RawReader from ultratils.py...
{"hexsha": "98b77983af15c2c4265b95c0470a878bad48070f", "size": 447, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/dim-reduction/eb-cache-frames.py", "max_stars_repo_name": "jenniferxkuo/ultramisc", "max_stars_repo_head_hexsha": "65bff53c97715eb9a24acc62b77460f22e0dabc6", "max_stars_repo_licenses": ["MI...
(* SPDX-License-Identifier: GPL-2.0 *) Require Import Coqlib. Require Import Errors. Require Import AST. Require Import Integers. Require Import Floats. Require Import Op. Require Import Events. Require Import Globalenvs. Require Import Smallstep. Require Import Values. Require Import Memory. Require Import Maps. Requi...
{"author": "VeriGu", "repo": "VRM-proof", "sha": "9e3c9751f31713a133a0a7e98f3d4c9600ca7bde", "save_path": "github-repos/coq/VeriGu-VRM-proof", "path": "github-repos/coq/VeriGu-VRM-proof/VRM-proof-9e3c9751f31713a133a0a7e98f3d4c9600ca7bde/sekvm/MmioCore/ProofHigh.v"}
/* $Id: gspan.cpp,v 1.8 2004/05/21 09:27:17 taku-ku Exp $; Copyright (C) 2004 Taku Kudo, All rights reserved. This is free software with ABSOLUTELY NO WARRANTY. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
{"hexsha": "a8ea8ab9cb206a4e81f71e60b36fa9465b37f52b", "size": 48678, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "gspan.cpp", "max_stars_repo_name": "VlachosGroup/LARLASSO-gSpan", "max_stars_repo_head_hexsha": "67933e25bdb8a2ef2071d28178950cde44278b0f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# Monte Carlo Simulation of Berry 1994 function Berry1994(R, repNum; βo = 5.00, βx = 2.00, α = 1.00, γo = 1.00, γx = 0.50, γw = 0.25, σc = 0.25, σw = ...
{"hexsha": "35c2424649f85ebe798b4399e88aa5153600a4a9", "size": 3237, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Berry1994.jl", "max_stars_repo_name": "leopoldomig/MetricsProject.jl", "max_stars_repo_head_hexsha": "1872643bd99739152201fb331832e2c0db98e264", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import tempfile from urllib.request import urlretrieve import cv2 import numpy as np from vidstab import layer_overlay from vidstab.vidstab_utils import border_frame import imutils tmp_dir = tempfile.TemporaryDirectory() remote_expected_result = 'https://s3.amazonaws.com/python-vidstab/overlay_2_test.jpg' overlay_2_t...
{"hexsha": "df0c7c1878fe1f0fc509a116b888c89678c2a48a", "size": 2304, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_layer_utils.py", "max_stars_repo_name": "supersom/python_video_stab", "max_stars_repo_head_hexsha": "b6edd5cae79c3ef8a554243c55e97d6f945c9527", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" Run modisco """ import logging import matplotlib.pyplot as plt from argh.decorators import named, arg import shutil import pandas as pd import os from collections import OrderedDict from tqdm import tqdm from pathlib import Path from bpnet.utils import write_pkl, render_ipynb, remove_exists, add_file_logging, creat...
{"hexsha": "38092f5ee909490627af28f4333e5b060dc49f01", "size": 38834, "ext": "py", "lang": "Python", "max_stars_repo_path": "bpnet/cli/modisco.py", "max_stars_repo_name": "mlweilert/bpnet", "max_stars_repo_head_hexsha": "dcc9e8d805f9de774ae9dcc62c20504915be614f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9...
#= getindex.jl Indexing support for LinearMapAX 2018-01-19, Jeff Fessler, University of Michigan =# # [end] function Base.lastindex(A::LinearMapAX) return prod(size(A._lmap)) end # [?,end] and [end,?] function Base.lastindex(A::LinearMapAX, d::Int) return size(A._lmap, d) end # A[i,j] function Base.getindex...
{"hexsha": "432dd9e41c1df6a977da70eccd293a564e761db6", "size": 2125, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/getindex.jl", "max_stars_repo_name": "JeffFessler/LinearMapsAA.jl", "max_stars_repo_head_hexsha": "65d7fd4eaf0558988ae23ccad2a547778c6111e7", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" File: pylinex/loglikelihood/LinearTruncationLoglikelihood.py Author: Keith Tauscher Date: 29 Sep 2018 Description: File containing a class which represents a DIC-like loglikelihood which uses the number of coefficients to use in each of a number of bases as the parameters of the likelihoo...
{"hexsha": "b59f1889fab1374f43932a34d43a925bf30956a8", "size": 11303, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylinex/loglikelihood/LinearTruncationLoglikelihood.py", "max_stars_repo_name": "CU-NESS/pylinex", "max_stars_repo_head_hexsha": "b6f342595b6a154e129eb303782e5268088f34d5", "max_stars_repo_licens...
import numpy as np import librosa import matplotlib.pyplot as plt from configs.configs import logger, DEBUG from configs.modelConfigs import ( CHORUS_DURATION_SINGLE, CHORUS_DURATION, TUNE_SCOPE, CLF_TARGET_LABEL, MINIMUM_CHORUS_DUR, ) from utility.common import ( mergeIntervals, intervalIn...
{"hexsha": "e2e5aba574e968243cbcdb241d6e9bfdc8346611", "size": 3185, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/modules/structure_module/models/pickSingle.py", "max_stars_repo_name": "Himusoka/Beatmap-gen_Thesis", "max_stars_repo_head_hexsha": "1ed210ccdefaa367cc3c54b9f74f8c7f2906b3d2", "max_stars_repo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import numpy as np import unittest from pyentrp import entropy as ent TIME_SERIES = [1, 1, 1, 2, 3, 4, 5] TIME_SERIES_STRING = '1112345' SHANNON_ENTROPY = 2.12809 TS_SAMPLE_ENTROPY = [1, 4, 5, 1, 7, 3, 1, 2, 5, 8, 9, 7, 3, 7, 9, 5, 4, 3, 9, 1, 2, 3, 4...
{"hexsha": "8f8b41b08e6f5d0dd47dec3a4f6911981772ce7c", "size": 3127, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_entropy.py", "max_stars_repo_name": "samgdotson/pyEntropy", "max_stars_repo_head_hexsha": "c7f1fcade3597622d5325e608c25c8ab36f9cf25", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np import math def classify(row, features, labels, k=None): """ Returns the predicted label of a feature vector given a set of features and labels. Parameters ---------- row : array_like Row vector of input features. Must only contain numerical values. features : array...
{"hexsha": "e52388b2106ea80b4f6564188ee9b91d5d2a7898", "size": 1640, "ext": "py", "lang": "Python", "max_stars_repo_path": "kNearestNeighbor/__init__.py", "max_stars_repo_name": "MatthiasKrijgsman/k-NearestNeighbor", "max_stars_repo_head_hexsha": "d102e6d87dbd89888110f8fe389e77717d74f209", "max_stars_repo_licenses": ["...
/** * @file * @copyright defined in eos/LICENSE.txt */ #include <algorithm> #include <vector> #include <iterator> #include <boost/test/unit_test.hpp> #include <eos/chain/chain_controller.hpp> #include <eos/chain/exceptions.hpp> #include <eos/chain/permission_object.hpp> #include <eos/chain/key_value_object.hpp> ...
{"hexsha": "1050fc8c071c8b8d726f248a533dbc57d98c8cb3", "size": 5963, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/tests/special_accounts_tests.cpp", "max_stars_repo_name": "anauman/eosio", "max_stars_repo_head_hexsha": "84553e02c1f87f73594f44c497e31687dec8f250", "max_stars_repo_licenses": ["MIT"], "max_st...
Module Type Machine. Parameter Conf : Type. Parameter Rel : Conf -> Conf -> Prop. End Machine. Module MetaTheory (mod : Machine). Import mod. Require Import List. Import ListNotations. Require Import Relations. Infix "==>" := Rel(at level 80, no associativity). Definition trc := clos_refl_trans Conf Rel. Infix "=>>...
{"author": "pa-ba", "repo": "calc-comp-rel", "sha": "2ffe6e4601e15ec926e1953dc5bf8793d37397aa", "save_path": "github-repos/coq/pa-ba-calc-comp-rel", "path": "github-repos/coq/pa-ba-calc-comp-rel/calc-comp-rel-2ffe6e4601e15ec926e1953dc5bf8793d37397aa/Machine.v"}
Base.promote_array_type{FSA <: FixedArray, T}(F, ::Type{T}, ::Type{FSA}) = FSA # operations const unaryOps = (:-, :~, :conj, :abs, :sin, :cos, :tan, :sinh, :cosh, :tanh, :asin, :acos, :atan, :asinh, :acosh, :atanh, :sec, :csc, :cot, :asec, :acsc, :acot, ...
{"hexsha": "0c741cbe282dad1cb49e07f184929ab7770c1d95", "size": 12662, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ops.jl", "max_stars_repo_name": "mschauer/FixedSizeArrays.jl", "max_stars_repo_head_hexsha": "3642f02d94620f09f13e868a2759187b653986a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from fnal_column_analysis_tools.lookup_tools.lookup_base import lookup_base import numpy as np from awkward.array.jagged import JaggedArray from copy import deepcopy import numba from numpy import sqrt,log from numpy import maximum as max from numpy import minimum as min def numbaize(fstr, varlist): """ ...
{"hexsha": "b680e138784a8069ca21fc08ab94784935033174", "size": 4067, "ext": "py", "lang": "Python", "max_stars_repo_path": "fnal_column_analysis_tools/lookup_tools/jet_energy_corrector.py", "max_stars_repo_name": "fnavarro94/fnal-column-analysis-tools", "max_stars_repo_head_hexsha": "81cf9153194f8594484a3c63df4edd0ee80...
from __future__ import division, print_function import numpy import numba from math import floor @numba.jit(nopython=True) def interpolation_search(x, z): n = len(x) assert n > 1 if z < x[1] or n == 2: return 0 elif z >= x[-2]: return n - 2 imin = 0 imax = n - 1 while imax ...
{"hexsha": "deaa6ca49b757f01d2fc49e0a7b51af7e8c89296", "size": 1611, "ext": "py", "lang": "Python", "max_stars_repo_path": "foldedleastsquares/interpolation.py", "max_stars_repo_name": "martindevora/tls", "max_stars_repo_head_hexsha": "61811815d5b24dab5b28fb5a2263039711205541", "max_stars_repo_licenses": ["MIT"], "max_...
import threading import time import numpy from ..Player import * from .Game import Game from .GuiBase import GuiBase class GameController(object): """ control the drawing logic of gobang and the move of player1 and player2 whether human player or AI player """ def __init__(self, player1: Player, player2: Player,...
{"hexsha": "dc94642156e28504b8493c32de1e8fac8d4b1f52", "size": 2788, "ext": "py", "lang": "Python", "max_stars_repo_path": "Helper/Controller/GameController.py", "max_stars_repo_name": "jingege315/gobang", "max_stars_repo_head_hexsha": "983a0ce34dc2120464f42441ef6b190ef2433f08", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- #%% from sklearn.model_selection import GridSearchCV import numpy as np import pandas as pd #from sklearn import linear_model import matplotlib.pyplot as plt import fitting as ft import preprocessing as pp from datetime import datetime # Import GBDT from sklearn.ensemble import GradientBoostingC...
{"hexsha": "8e87a54fa0ea5e20aaca3d833e789411c958b594", "size": 4545, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/gridsearch_test.py", "max_stars_repo_name": "rexzhang2014/Easi-ML", "max_stars_repo_head_hexsha": "5ff084b81b2c516d0ebea75f1dc0db1ebcb775db", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import json import os.path import pickle import traceback from typing import List, Set, Tuple import click import mdtraj import numpy from nagl.utilities.toolkits import stream_from_file from openff.toolkit.topology import Molecule from openff.toolkit.utils import ( OpenEyeToolkitWrapper, ToolkitRegistry, ...
{"hexsha": "2af245003ce74282fac72f0b323e85f41a7f27f8", "size": 8363, "ext": "py", "lang": "Python", "max_stars_repo_path": "data-set-curation/qc-esp/generate-conformers.py", "max_stars_repo_name": "SimonBoothroyd/gnn-charge-models", "max_stars_repo_head_hexsha": "5342a175fac878629dcd93e617410b64447b4398", "max_stars_re...
import numpy as np positions = np.loadtxt("input.txt", dtype=int, delimiter=",") part1_fuel = np.abs( np.tile(positions, (positions.size, 1)) - np.arange(1, positions.size + 1).reshape(-1, 1) ) part2_fuel = part1_fuel * (part1_fuel + 1) // 2 print("Part 1:", part1_fuel.sum(axis=1).min()) print("Part 2:", par...
{"hexsha": "224082ab534f85ebfe5062be87315e6abb90f99a", "size": 347, "ext": "py", "lang": "Python", "max_stars_repo_path": "aoc-2021/day-07/day_7.py", "max_stars_repo_name": "bsamseth/advent-of-code-2018", "max_stars_repo_head_hexsha": "bdd3969e61fac3f1543c20983260aa9fda912e99", "max_stars_repo_licenses": ["MIT"], "max_...
struct SemCor{S} filepaths::Vector{S} end function SemCor(dirpath) @assert(isdir(dirpath), dirpath) if "brown1" ∈ readdir(dirpath) && "brown2" ∈ readdir(dirpath) tagfile_paths = joinpath.(dirpath, ["brown1", "brown2"], "tagfiles") paths = joinpath.(tagfile_paths[1], readdir(tagfile_paths[...
{"hexsha": "799cf382b4258cc173cab60699683884510f5afc", "size": 3077, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SemCor.jl", "max_stars_repo_name": "Ayushk4/CorpusLoaders.jl", "max_stars_repo_head_hexsha": "2bb7d7e0b4a04fc534f6e4900f4e9a2b04c30945", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import math import numpy as np from tqdm import tqdm from scalesim.scale_config import scale_config as cfg class systolic_compute_is: def __init__(self): # Params set by user self.config = cfg() self.ifmap_op_mat = np.zeros((1, 1)) self.ofmap_op_mat = np.zeros((1, 1)) self...
{"hexsha": "c5531a3f81593868108e303adab0919df78ad2f0", "size": 16498, "ext": "py", "lang": "Python", "max_stars_repo_path": "version2/compute/systolic_compute_is.py", "max_stars_repo_name": "KangSK-KAIST/SCALE-Sim", "max_stars_repo_head_hexsha": "349dd7b7053ea5bac482183597d2c403ad061560", "max_stars_repo_licenses": ["M...
__doc__ = """ """ __author__ = "Rui Campos" print("Importing `.materials.electron.makeGOS`") from numpy import * from scipy.optimize import fsolve ELECTRON_REST_MASS = 0.51099895000e6 #taken from PENELOPE EXCITATION = [19.2, 41.8, 40.0, 63.7, 76.0,81.0,82.0, 95.0, 115.0, 137.0, 149.0, 156.0, 166.0, 173.0, ...
{"hexsha": "1c80b75c1bb973ddb9be56679e7ab99a6a454c58", "size": 13219, "ext": "py", "lang": "Python", "max_stars_repo_path": "MontyCarlo/materials/electron/makeGOS.py", "max_stars_repo_name": "ruicamposcolabpt/MontyCarlo", "max_stars_repo_head_hexsha": "8f9e7af78f010f44fda81a4ab064e32421a205f9", "max_stars_repo_licenses...
# Copyright 2021 TileDB Inc. # Licensed under the MIT License. from typing import Any, Dict, Optional, Sequence, Tuple import numpy as np import pytest import tiledb from tiledb.cf import AttrMetadata, DimMetadata, Group, GroupSchema, from_netcdf from tiledb.cf.netcdf_engine import NetCDF4ConverterEngine netCDF4 = p...
{"hexsha": "0e36bb1600af478dd4ead56a25517472f8c33572", "size": 49118, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/netcdf_engine/test_netcdf4_converter_engine.py", "max_stars_repo_name": "TileDB-Inc/TileDB-CF-Py", "max_stars_repo_head_hexsha": "9aab0fe9ba7346a1846c7458a5d08b123dcf90a8", "max_stars_repo_...
# -*- coding: utf-8 -*- # # Test proper functionality of Syncopy's `BaseData` class + helpers # # Builtin/3rd party package imports import os import tempfile import h5py import time import pytest import numpy as np from numpy.lib.format import open_memmap from memory_profiler import memory_usage # Local imports fro...
{"hexsha": "fa3ffeb7f62cc9006a3a1e49763c78b7c3f4e0aa", "size": 16193, "ext": "py", "lang": "Python", "max_stars_repo_path": "syncopy/tests/test_basedata.py", "max_stars_repo_name": "KatharineShapcott/syncopy", "max_stars_repo_head_hexsha": "7b24eda65cf752e395538db5260cd3075029081f", "max_stars_repo_licenses": ["BSD-3-C...
import json import yaml import copy import numpy as np from . import log_util from .deprecated import deprecated logger = log_util.get_logger() def json_or_yaml(filename): """ This function would be obsolete when pyyaml supports yaml 1.2 With yaml 1.2 pyyaml can also read json files :return: """ ...
{"hexsha": "f2270ef84bea58417889db3f4209f5316dda10f9", "size": 6355, "ext": "py", "lang": "Python", "max_stars_repo_path": "ezai_util/dict.py", "max_stars_repo_name": "armando-fandango/ezai_util", "max_stars_repo_head_hexsha": "261a0b752a66ac0357e6576b7113ac8e2fff5396", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# coding:utf-8 import logging from xml import sax from math import radians, cos, sin, asin, sqrt import networkx as nx class NodePoint(object): def __init__(self, lat, lon): self.lat = lat self.lon = lon def dist(self, other): return gc_dist(self.lat, self.lon, other.lat, other.lon) ...
{"hexsha": "beb77f11d2112a2af047c9e41e1c921405b12715", "size": 10776, "ext": "py", "lang": "Python", "max_stars_repo_path": "osm.py", "max_stars_repo_name": "Falli0o/map", "max_stars_repo_head_hexsha": "2f1ac57e984d68e2656c547db885ad71fe76f4ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_s...
[STATEMENT] lemma subst_cv_subst_vb_switch: shows "(c[bv::=b']\<^sub>c\<^sub>b)[x::=v[bv::=b']\<^sub>v\<^sub>b]\<^sub>c\<^sub>v = c[x::=v]\<^sub>c\<^sub>v[bv::=b']\<^sub>c\<^sub>b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (c[bv::=b']\<^sub>c\<^sub>b)[x::=v[bv::=b']\<^sub>v\<^sub>b]\<^sub>c\<^sub>v = c[x::=v...
{"llama_tokens": 244, "file": "MiniSail_BTVSubstTypingL", "length": 1}
# -*- coding: utf-8 -*- from nltk.tokenize import RegexpTokenizer from gensim.matutils import unitvec from xml.dom import minidom import numpy as np str_to_entailment = {'none': 0, 'entailment': 1, 'paraphrase': 2} entailment_to_str = {v: k for k, v in str_to_entailment.items()}...
{"hexsha": "6cde620059cba1f143df380513c3e2671a4daccf", "size": 3959, "ext": "py", "lang": "Python", "max_stars_repo_path": "anaadementia/utils.py", "max_stars_repo_name": "lbsantos/ANAA-Dementia", "max_stars_repo_head_hexsha": "fb1b013f0de45526283d06291e99b70bf858a19d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- # Krzysztof Joachimiak 2018 # sciquence: Time series & sequences in Pythonn # # Binarizers # Author: Krzysztof Joachimiak # # License: MIT import sys sys.path.append("..") import numpy as np from sklearn.base import BaseEstimator, TransformerMixin import copy #from sciquence.utils.docstring im...
{"hexsha": "015b4df28dae5dd25ded6e5f1f9ef738275e312e", "size": 3864, "ext": "py", "lang": "Python", "max_stars_repo_path": "sciquence/postprocessing/binarizer.py", "max_stars_repo_name": "krzjoa/sciquence", "max_stars_repo_head_hexsha": "6a5f758c757200fffeb0fdc9206462f1f89e2444", "max_stars_repo_licenses": ["MIT"], "ma...
import pytest import ast from codemodel.type_validation.type_validation import * class TestTypeValidation(object): def setup(self): self.validation = TypeValidation([ StandardValidatorFactory(STANDARD_TYPES_DICT) ]) def test_register(self): validation = TypeValidation([]) ...
{"hexsha": "8beaef7cf98bc4ebb4546eaf1d3f8677793ce071", "size": 4037, "ext": "py", "lang": "Python", "max_stars_repo_path": "codemodel/tests/type_validation/test_type_validation.py", "max_stars_repo_name": "dwhswenson/codemodel", "max_stars_repo_head_hexsha": "f881f81054eaa89e93469135ad8c2ae33ea06841", "max_stars_repo_l...
import numpy as np import random def create_batches(X_train, Y_train, batch_size, classes_num=10): X_train_F = [] for i in xrange(0, classes_num): X_train_F.append([]) for i in xrange(0, len(X_train)): l = np.argmax(Y_train[i]) # l for label (in this case it's basically the index of class...
{"hexsha": "c37384e8b0cf4910544f8ec581b6e1009fa4aa0c", "size": 5185, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataUtils2.py", "max_stars_repo_name": "styanddty/Wide-resnet-fashionMnist", "max_stars_repo_head_hexsha": "f281f1e3e3c2b55be20620290d6e0535fcc70d98", "max_stars_repo_licenses": ["MIT"], "max_star...
import chess import numpy as np from Game import Game from utils import encode_board # encodings and mirror_move based on # https://github.com/yeekit24/alpha-zero-general/blob/3fa23d76ed618f732e9485bd1bd6a44835e353a5/_chess/ChessGame.py def from_move(move: chess.Move): return move.from_square * 64 + move.to_squa...
{"hexsha": "6dc4245dfb776b36253a4b54f815bb4a76d26e7b", "size": 3405, "ext": "py", "lang": "Python", "max_stars_repo_path": "chess_game/ChessGame.py", "max_stars_repo_name": "TheMessik/alpha-zero-general", "max_stars_repo_head_hexsha": "ef4b65c7c0f2913efa155ce27985ac6dcbecc555", "max_stars_repo_licenses": ["MIT"], "max_...