text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "12160cf6f18e79594c1fcc23d820b86a020cf557", "size": 1667, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/examples/mnist/mnist-data.jl", "max_stars_repo_name": "Vikas-kum/incubator-mxnet", "max_stars_repo_head_hexsha": "ba02bf2fe2da423caa59ddb3fd5e433b90b730bf", "max_stars_repo_licenses": ["Apach...
from random import * import math import argparse import json from PIL import Image, ImageDraw, ImageOps from filters import * from strokesort import * import perlin from util import * no_cv = False export_path = "output/out.svg" draw_contours = True draw_hatch = True show_bitmap = False resolution = 1024 hatch_size ...
{"hexsha": "7c4d92eaf61ced5382be41c570882d7b0c8e82d9", "size": 9115, "ext": "py", "lang": "Python", "max_stars_repo_path": "linedraw.py", "max_stars_repo_name": "evildmp/linedraw", "max_stars_repo_head_hexsha": "fd5d5c602714a746b7b7a86248b536a1d2e92329", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "max_s...
\section{\module{fl} --- FORMS library interface for GUI applications} \declaremodule{builtin}{fl} \platform{IRIX} \modulesynopsis{FORMS library interface for GUI applications.} This module provides an interface to the FORMS Library\index{FORMS Library} by Mark Overmars\index{Overmars, Mark}. The source ...
{"hexsha": "26133fde840b44102ce1d9729762ab3dd3049f02", "size": 15558, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/lib/libfl.tex", "max_stars_repo_name": "marcosptf/cpython-2.0.1", "max_stars_repo_head_hexsha": "73c739a764e8b1dc84640e73b880bc66e1916bca", "max_stars_repo_licenses": ["PSF-2.0"], "max_stars_co...
# coding=utf-8 # Copyright 2020 The Google Research 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...
{"hexsha": "e18f5b71634d54735f79f8b2ad778acfebc719d2", "size": 15327, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/benchmarks/TFT/libs/hyperparam_opt.py", "max_stars_repo_name": "lpd6375/qlib", "max_stars_repo_head_hexsha": "3a911bc09ba5136cd7c61c2c8dcca8a63339e738", "max_stars_repo_licenses": ["MIT"...
""" Integration test taking in csv of local attributions and producing csv of global attributions """ import glob import os import numpy as np import pytest from gam import gam def test_read_csv(): g = gam.GAM(attributions_path="tests/test_attributes.csv") g._read_local() assert hasattr(g, "attributi...
{"hexsha": "83c01de3b979b0fdef2413c4e6065a18f1be8f95", "size": 4054, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_gam.py", "max_stars_repo_name": "timwong101/project-gam", "max_stars_repo_head_hexsha": "6a0b87418091772517e2f3b2339e8998c43ffc54", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# -*- coding: utf-8 -*- import gzip from matplotlib import pyplot as plt import numpy as np import os import pandas as pd import seaborn as sns import sklearn.preprocessing def extract_params(statefile): """Extract the alpha and beta values from the statefile. Args: statefile (str): Path to statefile...
{"hexsha": "eab5b21924a9b4873244c7701e1c5a31cfd9bab5", "size": 2928, "ext": "py", "lang": "Python", "max_stars_repo_path": "GoH/verify_model.py", "max_stars_repo_name": "jerielizabeth/GoH", "max_stars_repo_head_hexsha": "7c16eac86d76525170330924348cecccce3aa5cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
from io import BytesIO from django.shortcuts import render from django.http import HttpResponse import librosa import soundfile as sf from .models import File from devices.models import DeviceContext from projects.models import Project import scipy.io.wavfile as sa # Create your views here. def list_files(request,...
{"hexsha": "191381c288ae90ddeef840a9b7b2778653e707d2", "size": 1131, "ext": "py", "lang": "Python", "max_stars_repo_path": "files/views.py", "max_stars_repo_name": "plaf2000/webspec", "max_stars_repo_head_hexsha": "487ccccff088ddbda0e5e475aaad167a01f4aab2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import numpy as np from .propagator import Propagator from ..optics import Wavefront, make_agnostic_optical_element from ..field import Field @make_agnostic_optical_element() class FraunhoferPropagator(Propagator): '''A monochromatic perfect lens propagator. This implements the propagation of a wavefront through a...
{"hexsha": "e44356e27de64727928de326d4f1629606ffaae7", "size": 3440, "ext": "py", "lang": "Python", "max_stars_repo_path": "hcipy/propagation/fraunhofer.py", "max_stars_repo_name": "rahulbhadani/hcipy", "max_stars_repo_head_hexsha": "b52726cb9502b5225ddff9d7b1ff417f2350cda8", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/python3 # Name: Chenying Wang # Email: chenying.wang@usc.edu # USC ID: ****-****-** # Date: Friday, March 20, 2020 import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.mplot3d import sys COLOR = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red'] def main(input_csv, output_file): fea...
{"hexsha": "376989e14bdefdf7351ce3073de9614a97fb572c", "size": 1017, "ext": "py", "lang": "Python", "max_stars_repo_path": "ee569/hw4/plot/plot_3d.py", "max_stars_repo_name": "chenying-wang/usc-ee-coursework-public", "max_stars_repo_head_hexsha": "5bc94c2350bcebf1036fb058fe7dc4f7e31e1de1", "max_stars_repo_licenses": ["...
import sys sys.path.append('..') from neml import elasticity, interpolate from neml.math import tensors, rotations import unittest from common import * import numpy as np import numpy.linalg as la class CommonElasticity(object): """ Tests that could apply to any elastic model. """ def test_C2S(self): ...
{"hexsha": "fee23822f0fc0a2b43e892beba29e1f991ae2b36", "size": 3766, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_elasticity.py", "max_stars_repo_name": "ajey091/neml", "max_stars_repo_head_hexsha": "23dd2cdb83057fdd17a37fa19f4592c54f821dbf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6,...
from functools import partial import mmcv import numpy as np from six.moves import map, zip def tensor2imgs(tensor, mean=(0, 0, 0), std=(1, 1, 1), to_rgb=True): num_imgs = tensor.size(0) mean = np.array(mean, dtype=np.float32) std = np.array(std, dtype=np.float32) imgs = [] for img_id in range(nu...
{"hexsha": "1921ec5beff20a368a32a2d7c953f59a696b9fa5", "size": 2496, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmdet/core/utils/misc.py", "max_stars_repo_name": "youshyee/Greatape-Detection", "max_stars_repo_head_hexsha": "333b63d8f76538659bcd2bc6022128830a7a435b", "max_stars_repo_licenses": ["Apache-2.0"]...
import requests import os from datetime import datetime import json from bs4 import BeautifulSoup as bs import time import random import numpy class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ...
{"hexsha": "b1dc4b81ce50670ee0ed435fd489e7dbe2144e1d", "size": 72400, "ext": "py", "lang": "Python", "max_stars_repo_path": "myigbot.py", "max_stars_repo_name": "vishaljoshi789/MyIGBot", "max_stars_repo_head_hexsha": "1fa3920e478464098bd6ece7d7828bfd2b62d3eb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
""" SCRIPT FOR TRAINING 2DCNN MODELS Run with two arguments - arg1=region, arg2=model type """ import os, sys import torch import numpy as np import time from CNN import * from Training import * from Data_maker_loader import * from random import randint, uniform, choice if sys.argv[2] == "2D": from CNN import * el...
{"hexsha": "6748bf14deb0144e8563fb8b269a59fbaf75a6ad", "size": 11082, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/2DCNN_training.py", "max_stars_repo_name": "PatBall1/DeepForestcast", "max_stars_repo_head_hexsha": "f9444490d71b89aa7823e830cf7fbe6752c74d9a", "max_stars_repo_licenses": ["MIT"], "max...
# Copyright - Transporation, Bots, and Disability Lab - Carnegie Mellon University # Released under MIT License """ Common 2D Rotation Operations """ from .basic import * import numpy as np __all__ = [ 'clip_radian_rotation', 'find_rotation', "theta_to_clock", 'find_theta_distance', 'deg_to_theta' ] def cl...
{"hexsha": "7efaa8c48988e6f13d1347c70f74011b121cbe71", "size": 3147, "ext": "py", "lang": "Python", "max_stars_repo_path": "alloy/math/rotation_2D.py", "max_stars_repo_name": "CMU-TBD/alloy", "max_stars_repo_head_hexsha": "cf66738e044613fb274bd1b159864a7600e15cb5", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Spectral Temporal SIMilarity""" from dataclasses import dataclass import numpy as np from vibromaf.signal.spectrum import compute_spectral_support from vibromaf.signal.transform import PerceptualSpectrumBuilder, preprocess_input_signal def st_sim(distorted: np.array, reference: np.array, eta: float = 2 / 3) -> ...
{"hexsha": "9d9edd0718569e4ebf9521c1e9f94bdf60d6125b", "size": 2454, "ext": "py", "lang": "Python", "max_stars_repo_path": "vibromaf/metrics/stsim.py", "max_stars_repo_name": "hofbi/vibromaf", "max_stars_repo_head_hexsha": "7678042d18fa3b4ab006283bdbd1b1cc6d84e822", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import cPickle as pck import numpy as np from make_input.qe_input import makeQEInput_new from make_input.qe_run import run_qe_hpc from tqdm import tqdm from make_input.SSSP_acc_PBE_info import wfccutoffs,rhocutoffs calculation_type = '"vc-relax"' sites_z = [14] kpt = [2,2,2] Nkpt = 3000 # rhocutoff ,wfccutoff = No...
{"hexsha": "3493f980b5b818aaf1375334f42591178ae75274", "size": 2479, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_relax_Si_new.py", "max_stars_repo_name": "felixmusil/run_qe", "max_stars_repo_head_hexsha": "10001c2779788122e59b299d088ef83821e24a38", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. /* svd_utils_test.cc Jeremy Barnes, 18 November 2012 Copyright (c) 2012 mldb.ai inc. All rights reserved. Test for SVD utilities */ #define BOOST_TEST_MAIN #define BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> #includ...
{"hexsha": "c0d3f684004a42bfb8377d98229a9eb82c1d3ec1", "size": 1932, "ext": "cc", "lang": "C++", "max_stars_repo_path": "testing/svd_utils_test.cc", "max_stars_repo_name": "kstepanmpmg/mldb", "max_stars_repo_head_hexsha": "f78791cd34d01796705c0f173a14359ec1b2e021", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
""" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% function [XPP,YPP]=cast2(t,XP,YP) %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Enveloppe convexe d'une courbe de Bézier %% Construction des points de contrôle %% Deuxième partie t dans [0.5,...
{"hexsha": "0d56cd30501eabacf43b9872bdb63691cd3a2b81", "size": 1476, "ext": "py", "lang": "Python", "max_stars_repo_path": "cast2.py", "max_stars_repo_name": "JosueGauthier/Surface-de-Bezier-Python", "max_stars_repo_head_hexsha": "e37847296cbbe36f0c72c9cefc1861870ce883db", "max_stars_repo_licenses": ["MIT"], "max_stars...
module Mod_sld_ExternalForces use typre use Mod_sld_BaseElmope implicit none private public SetPointersExternalForces integer(ip), allocatable :: kfl_IsSet contains !---------------------------------------------------------------------------- !Setting Pointers subroutine SetPoint...
{"hexsha": "5c388a06ab2f3c81ba63e1c7775e23684a6988ce", "size": 1251, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Sources/modules/solids/models/Mod_sld_ExternalForces.f90", "max_stars_repo_name": "ciaid-colombia/InsFEM", "max_stars_repo_head_hexsha": "be7eb35baa75c31e3b175e95286549ccd84f8d40", "max_stars_re...
import numpy as np import struct UINT8 = "B" UINT16 = "H" UINT32 = "I" class SABFormat(object): def __init__(self): super(SABFormat, self).__init__() self.RadialHeaderSize = 128 self.InfSize = 28 def RadialHeader(self): return ( ('reserve0', '14s'), ('...
{"hexsha": "3243ac81ecece94ab06868ba5d06fff4c1bbf13e", "size": 2183, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycwr/io/BaseDataProtocol/SABProtocol.py", "max_stars_repo_name": "zhaopingsun/pycwr", "max_stars_repo_head_hexsha": "7459371588e6d0d6d0737e249afa3921fe073151", "max_stars_repo_licenses": ["MIT"],...
#!/usr/bin/env Rscript # run with Rscript plot-gradients.r -i taxontable -w 'Bacteroides,Prevotella' -o outdir # REQUIRED GLOBAL VARIABLES: PLEASE EDIT #source(paste(Sys.getenv('MWAS_DIR'),'/lib/gradients.r',sep='')) #source(paste(Sys.getenv('MWAS_DIR'),'/lib/util.r',sep='')) require('RColorBrewer') require('optparse...
{"hexsha": "6f404a801934d1a9c86dc3d39370fcdf82ba2192", "size": 5758, "ext": "r", "lang": "R", "max_stars_repo_path": "bin/util/plot-gradients.r", "max_stars_repo_name": "hhuang2018/mwas", "max_stars_repo_head_hexsha": "26518c937be831026c6015f8fdfb764c1d3a58be", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import os from glob import glob import numpy as np import pandas as pd DATASET_NAME = "adhd_sin" DATASET_PATH = f"../datasets/{DATASET_NAME}" REFN_DATA_PATH = f"{DATASET_PATH}" # reference data REFN_FXTN_PATH = f"{REFN_DATA_PATH}_fxtn" # fixations from reference data SYNT_DATA_PATH = f"{DATASET_PATH}_synt" # synt...
{"hexsha": "38c3648958de49fd9f967580cef4d5d7cb546d80", "size": 3393, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/eyetracking/dataset_compare.py", "max_stars_repo_name": "nirdslab/streaminghub", "max_stars_repo_head_hexsha": "a0d9f5f8be0ee6f090bd2b48b9f596695497c2bf", "max_stars_repo_licenses": ["MIT...
# # TODO: should ITensorMap be a special version of # an ITensorNetwork with input and output indices specified? # # T is however the nodes are indexed # TODO: how to deal with 2D, multiple networks, etc.? # struct IndexSetNetwork{T} # # Use Vector{SortedVector{Pair{T, IndexSet}}} # data::Vector{Vector{Pair{T, In...
{"hexsha": "543d53d7f9701d1480d256ecfe62627e870ebe2c", "size": 7226, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/itensormap.jl", "max_stars_repo_name": "LHerviou/ITensorInfiniteMPS.jl", "max_stars_repo_head_hexsha": "1489817f7960903e84331b324d810631074d0f35", "max_stars_repo_licenses": ["MIT"], "max_stars...
delivery_util(reward::Float64, ie::InteractionEvent) = reward """ Look up the CDF of the Epanechnikov distribution for the arrival time. """ function delivery_success_prob(std_scale::Float64, ref_time::Float64, ie::InteractionEvent) travel_time = ie.timestamps[SUCCESS] - ie.timestamps[FINISH] # TODO: Need s...
{"hexsha": "499b3dffbe82bda6cf47d40094d52b3025a38fcb", "size": 5853, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/domains/routing/routing_scoba.jl", "max_stars_repo_name": "sisl/SCoBA.jl", "max_stars_repo_head_hexsha": "e66633dcf044decfb63b2d3cb1b5b059f79cd6ea", "max_stars_repo_licenses": ["MIT"], "max_sta...
import torch import numpy as np from utils.block_diag_matrix import block_diag_irregular from scipy.spatial import distance_matrix def compute_adjs(args, seq_start_end): adj_out = [] for _, (start, end) in enumerate(seq_start_end): mat = [] for t in range(0, args.obs_len + args.pred_len): ...
{"hexsha": "d1e0677fa7f582efc4167bff7afb79397a695c20", "size": 3227, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/adj_matrix.py", "max_stars_repo_name": "alessiabertugli/AC-VRNN", "max_stars_repo_head_hexsha": "3a204bd23a7b90c3939efc6468fa6477c31a733f", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np from cvxpy import * import matplotlib.pyplot as pyplot import heapq import time settings.USE_CVXCANON = True ANSWERS = [] TIME = 0 np.random.seed(0) m=100 k=40 # max # permuted measurements n=20 A=10 * np.random.randn(m,n) x_true=np.random.randn(n,1) # true x value y_true = A.dot(x_true) + np.random...
{"hexsha": "8a2d74b42dbe7952449f4c43d3d5f95068a571e0", "size": 1724, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/cvxcore/tests/python/364A_scripts/lsq_permute.py", "max_stars_repo_name": "jasondark/cvxpy", "max_stars_repo_head_hexsha": "56aaa01b0e9d98ae5a91a923708129a7b37a6f18", "max_stars_repo_license...
import matplotlib import numpy as np from PIL import Image from scipy.signal import convolve2d matplotlib.use('agg') if __name__ == '__main__': file = 'images/histeq.png' img = Image.open(file) img = img.convert('L') # im = np.array(img, dtype=np.float64) # im = im[:, 15:615] # # kernel ...
{"hexsha": "173fe00beb5e2583680fcbfb5f409cf24f90e070", "size": 475, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "Patrick22414/cw-computer-vision", "max_stars_repo_head_hexsha": "899ed5ee6346ebd1b2b52ea2b9f618d90596a458", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
# # Tests for the Processed Variable class # import pybamm import casadi import numpy as np import unittest import tests class TestProcessedSymbolicVariable(unittest.TestCase): def test_processed_variable_0D(self): # without inputs y = pybamm.StateVector(slice(0, 1)) var = 2 * y v...
{"hexsha": "1346de88a295cdea615aeb6e2a78597652d66ab4", "size": 11566, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_solvers/test_processed_symbolic_variable.py", "max_stars_repo_name": "DrSOKane/PyBaMM", "max_stars_repo_head_hexsha": "903b4a05ef5a4f91633e990d4aec12c53df723a2", "max_stars_repo_l...
Lutheran Episcopal Christian Fellowship (LECF) is a campus student Religious and Spiritual Organizations organization of Christians and seekers of the Lutheran, Episcopal (Anglican), and other traditions as well as seekers. LECF meets at The Belfry. LECF is a progressive Christian group, in the liberal Christian tr...
{"hexsha": "ddba611017071a5004258b2d43c146f6ddf5a15f", "size": 1887, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Lutheran_Episcopal_Christian_Fellowship.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses"...
// Copyright Carl Philipp Reh 2009 - 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <fcppt/algorithm/fold.hpp> #include <fcppt/preprocessor/disable_gcc_warning.hpp> #include...
{"hexsha": "cb00738e8a849f4c2af3868b77d1ee02f40e8870", "size": 1183, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/algorithm/fold.cpp", "max_stars_repo_name": "vinzenz/fcppt", "max_stars_repo_head_hexsha": "3f8cc5babdee178a9bbd06ca3ce7ad405d19aa6a", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count":...
import argparse import numpy as np import json import torch from torchvision import datasets, transforms, models from utility import process_image from model import load_checkpoint parser = argparse.ArgumentParser(description='Predict the top K most likely flower classes based on image path and saved checkpoint') #...
{"hexsha": "cb74915b4b17b4b56c49503c598701f95fbc9473", "size": 3797, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "cynthia3r/flower_image_classifier", "max_stars_repo_head_hexsha": "bac89f88410642d164030fd60436597ba5270f20", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import cv2 import sys import random import math import re import time import numpy as np import tensorflow as tf import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as patches import skimage import glob ROOT_DIR = os.getcwd() sys.path.append(ROOT_DIR) from Mask_RCNN.mrcnn import util...
{"hexsha": "f75314bb4952672c082c83819e9de3a44c8ad901", "size": 2097, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference_2.py", "max_stars_repo_name": "mosvlad/tumor_mask_rcnn", "max_stars_repo_head_hexsha": "16d6b20431553e6e1cf1594686a1f503171d5f8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import pickle import numpy as np import matplotlib.pylab as plt import powerlaw as pl def plot_avalanches(aval_times, aval_sizes): """Plot avalanche events distrubutions Includes plots and power-law fits for duration, size, and average size """ # figure main parameters FIG_SIZE = (6, 5) ...
{"hexsha": "832a767ed9908d3aa3e7738ce6c9e25bdd6f400f", "size": 3505, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_avalanches.py", "max_stars_repo_name": "delpapa/sandpilemodel", "max_stars_repo_head_hexsha": "6d176ff2e711f33668a33ea1947d71a69393871e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from os import name from numpy import load from .bed import load_from_bed, recode_zarr import pandas import numpy from .load import BinaryICDLoader import zarr import pytest @pytest.mark.skip(reason="Requires gwas results") def test_load_from_bed(): bfile_prefix = '/media/data1/ag3r/ukb/runs/all/split/train' ...
{"hexsha": "0058f176d1a2b9559e85109c66008974a7dfccb3", "size": 2746, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ukb_loader/bed_test.py", "max_stars_repo_name": "alex-medvedev-msc/ukb_loader", "max_stars_repo_head_hexsha": "4940f3859eb1cc167bd768def97ce8d55c14892b", "max_stars_repo_licenses": ["MIT"], "m...
module da_minimisation !--------------------------------------------------------------------------- ! Purpose: Collection of routines associated with minimisation. !--------------------------------------------------------------------------- use module_configure, only : grid_config_rec_type use module_...
{"hexsha": "248cc5906eff9b29ef72d112095479d1f1483b87", "size": 11855, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "var/da/da_minimisation/da_minimisation.f90", "max_stars_repo_name": "wasserblum/wrf-teb", "max_stars_repo_head_hexsha": "38f741a996868634d9b1bc6bc055f640a1b38751", "max_stars_repo_licenses": ["...
#load python included modules import tkinter as tk from tkinter import filedialog #load additional python modules import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns root = tk.Tk() root.withdraw() #parameters to load data x_axis_name = "genotype" y_axis_name = ...
{"hexsha": "f51ec755111a2b98c01218d6780949ec784022b3", "size": 1279, "ext": "py", "lang": "Python", "max_stars_repo_path": "barplot FISH results.py", "max_stars_repo_name": "BioJoe/automated-FISH-analyses", "max_stars_repo_head_hexsha": "c2859fe9ee8fc122e3651537ead3c5ccb7e270a1", "max_stars_repo_licenses": ["MIT"], "ma...
x = [ 1 2 3 4 5 6]; y = [ 2 6 8 7 8 5]; barh(x,y); title('\bfExample of a Horizontal Bar Plot'); xlabel('\bf\ity'); ylabel('\bf\itx'); axis([0 10 0 7]);
{"author": "101Hub", "repo": "Matlab101", "sha": "07273f68f1147a110443aeb121fa10962234f298", "save_path": "github-repos/MATLAB/101Hub-Matlab101", "path": "github-repos/MATLAB/101Hub-Matlab101/Matlab101-07273f68f1147a110443aeb121fa10962234f298/assets/\u300aMatlab\u7f16\u7a0b\u300b\u6e90\u7801/chap6/barh_plot.m"}
using Revise, Test, ForwardDiff, Parameters, Setfield, Plots, LinearAlgebra using BifurcationKit, Test const BK = BifurcationKit norminf(x) = norm(x, Inf) #################################################################################################### function COm(u, p) @unpack q1,q2,q3,q4,q5,q6,k = p x, y, s = ...
{"hexsha": "a741aa133e516468d9daca681cafb90ff68d55e0", "size": 3868, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/COModel.jl", "max_stars_repo_name": "free-Gift-card/BifurcationKit.jl", "max_stars_repo_head_hexsha": "07938db6909fa00b10736f916750d19f92b87e22", "max_stars_repo_licenses": ["MIT"], "max_s...
subroutine decay !! ~ ~ ~ PURPOSE ~ ~ ~ !! this subroutine calculates degradation of pesticide in the soil and on !! the plants !! ~ ~ ~ INCOMING VARIABLES ~ ~ ~ !! name |units |definition !! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ...
{"hexsha": "ea09a07fe7fbc8051f48635a676801bf39ae4729", "size": 3773, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "swat_cli/rev670_source/decay.f", "max_stars_repo_name": "GISWAT/erosion-sediment", "max_stars_repo_head_hexsha": "6ab469eba99cba8e5c365cd4d18cba2e8781ccf6", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma env_restr_esing[simp]: "x\<in> S \<Longrightarrow> esing x\<cdot>v f|` S = esing x\<cdot>v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> S \<Longrightarrow> esing x\<cdot>v f|` S = esing x\<cdot>v [PROOF STEP] by (auto intro: env_restr_useless dest: subsetD[OF edom_esing_subset])
{"llama_tokens": 133, "file": "Launchbury_Env", "length": 1}
""" Defines abstract samplers. """ import numpy as np import csb.core from abc import ABCMeta, abstractmethod, abstractproperty class DimensionError(TypeError): pass class AbstractSampler(object): """ Abstract interface for sampling algorithms. """ __metaclass__ = ABCMeta @abstrac...
{"hexsha": "f821101d585f307b54d18e22e6e847a9025edd45", "size": 3221, "ext": "py", "lang": "Python", "max_stars_repo_path": "csb/statistics/samplers/__init__.py", "max_stars_repo_name": "ujjwalsh/CSB", "max_stars_repo_head_hexsha": "cbe04f35e1ecace7fa01cabce669d99714b9dd38", "max_stars_repo_licenses": ["MIT"], "max_star...
using HybridSystems include(joinpath(dirname(dirname(pathof(HybridSystems))), "examples", "cruise_control.jl")); if true D = 1.0 U = 1.0 v_shift = 2.0 vmin = -1.0 vmax = 2.0 v = (1.0,) m = 1.0 m0 = 1.0 h = 0.5 kd = 1/2 ks = 1/2 Δv = 5.0 else function constant(scaling...
{"hexsha": "6fbf1341b6a7b04ead3fb1a929e58f1a8746e305", "size": 2912, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/cruise_control.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SwitchOnSafety.jl-ceb7f16a-07bf-5f4a-9354-b68f01b1610f", "max_stars_repo_head_hexsha": "e9fefe2cb8f45f27ed9ea95d3...
import matplotlib.pyplot as plt from matplotlib import style import numpy as np class SVMClassifier: def __init__(self, visualization=True): self.visualization = visualization self.colors = {0: 'r', 1: 'b'} if self.visualization: self.fig = plt.figure() self.ax = s...
{"hexsha": "9c482a5a41b5d8e61aa36633a7a1129e696a4750", "size": 3089, "ext": "py", "lang": "Python", "max_stars_repo_path": "manual_svm_test.py", "max_stars_repo_name": "dkirel/ManualSVM", "max_stars_repo_head_hexsha": "0c8aaf5631f272d537126a8cd6237eaa937413cd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
[STATEMENT] lemma eq_fin_le_fininf_transp[intro, trans]: assumes "w\<^sub>1 =\<^sub>F w\<^sub>2" "w\<^sub>2 \<preceq>\<^sub>F\<^sub>I w\<^sub>3" shows "w\<^sub>1 \<preceq>\<^sub>F\<^sub>I w\<^sub>3" [PROOF STATE] proof (prove) goal (1 subgoal): 1. w\<^sub>1 \<preceq>\<^sub>F\<^sub>I w\<^sub>3 [PROOF STEP] ...
{"llama_tokens": 253, "file": "Partial_Order_Reduction_Traces", "length": 2}
\documentclass[a4paper,12 pt]{article} \usepackage{graphicx} \usepackage{caption} \usepackage{refstyle} \usepackage{wrapfig} \usepackage{subcaption} \usepackage{geometry} \geometry{ a4paper, total={210mm,297mm}, left=25mm, right=25mm, top=25mm, bottom=25mm, } \title {Project Report \\ Sensor Module Interfaci...
{"hexsha": "8f637edd40afee97fa12c3325073d7cfeae7dae0", "size": 9443, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "5.IMU/Gyroscope/documentation&tutorial/Gyro_manual/Gyroscope.tex", "max_stars_repo_name": "eyantra/Sensor-Module-Interfacing", "max_stars_repo_head_hexsha": "a5d7d3dc259fb7ddf369c513d20f011a099c927f...
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from math import cos, sin from IPython import embed robot_radius = 3.35/2.0; def draw_circle(ax, pos_ang, radius, color, label=None): pos = pos_ang[:2] circ = plt.Circle(pos, radius, color=color, label=label) ax.add_artist(circ); ...
{"hexsha": "9e7fadd0e49a451522752e0970ce0eacce77e39b", "size": 3845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/visualize_circle_world.py", "max_stars_repo_name": "LAIRLAB/qr_trees", "max_stars_repo_head_hexsha": "66eb7310daa1d9978158198a508d02bf2128a377", "max_stars_repo_licenses": ["BSD-3-Claus...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 #Unless required by applicable law ...
{"hexsha": "b7e1eb1c7bf0fe0a2024ed8ef29270687fae5a3a", "size": 2763, "ext": "py", "lang": "Python", "max_stars_repo_path": "fluid/PaddleCV/yolov3/config.py", "max_stars_repo_name": "kuke/models", "max_stars_repo_head_hexsha": "b610d1654fa1d728fe2171fb02ee47497942fe24", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
[STATEMENT] lemma comp_left_increasing_sup: "x * y \<le> (x \<squnion> z) * y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x * y \<le> (x \<squnion> z) * y [PROOF STEP] by (simp add: comp_left_isotone)
{"llama_tokens": 100, "file": "Stone_Relation_Algebras_Relation_Algebras", "length": 1}
# -*- coding: utf-8 -*- """ Created on Sat Apr 25 19:57:35 2020 Read and write event data. Conversion of event data into frames (images, 2D): - histograms of events - thresholded (1 f-stop) - brightness increment images - time surfaces: exponential decay or average time With polarity on the same representation or spl...
{"hexsha": "50273ac00b62fd070d98f4ba37953d2f0fec08cb", "size": 15488, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex2_events_visualization.py", "max_stars_repo_name": "tub-rip/events_viz", "max_stars_repo_head_hexsha": "dfc6fd27688c70f11e98b349111e35a5aad9a718", "max_stars_repo_licenses": ["MIT"], "max_stars...
import tensorflow as tf import numpy as np import math # ======================================================h===================== # # TensorFlow implementation of Text Boxes encoding / decoding. # =========================================================================== # def tf_text_bboxes_encode_layer(bb...
{"hexsha": "c06bf8cc15b265093a3f079ec72c0ab25d70e93a", "size": 10065, "ext": "py", "lang": "Python", "max_stars_repo_path": "openvision/ocr/textbox/nets/textbox_common.py", "max_stars_repo_name": "liuzz1983/open_vision", "max_stars_repo_head_hexsha": "f346e2f789944ea590c1d263e72a6e93490bb3a0", "max_stars_repo_licenses"...
from argparse import ArgumentParser import os import cv2 import numpy as np import torch import pytorch_lightning as pl from pytorch_lightning import Trainer, loggers from torchsummary import summary import torch.nn.functional as F from autoencoder import Autoencoder from harbour_datamodule import list_frames_in_dir ...
{"hexsha": "34e0177e697ea98cee1ad015cce46cdc1dbaf92c", "size": 4761, "ext": "py", "lang": "Python", "max_stars_repo_path": "embed.py", "max_stars_repo_name": "markpp/thermal_autoencoder", "max_stars_repo_head_hexsha": "a122128f973f89aa61f641449d5cbe2dd222b40f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np from pyscf.lib.linalg_helper import eig from pyscf.lib.numpy_helper import einsum from scipy import linalg as la import matplotlib.pyplot as plt def createMPO(hamType,hamParams): ############################################ # Determine MPO Sp = np.array([[0,1],[0,0]]) Sm = np.array(...
{"hexsha": "6189fc7aa4b7060f197a8c8e5819cced3f2ba735", "size": 8981, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/iMPS_2site.py", "max_stars_repo_name": "philliphelms/iMPS", "max_stars_repo_head_hexsha": "ce7e097bf67ad68a01cf8180c3f7577660c38ee8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : Communication.py # @Time : 2021/11/5 11:20 上午 # @Author : Mingxue Cai # @Email : im_caimingxue@163.com # @github : https://github.com/caimingxue/magnetic-robot-simulation # @notice : from math import * import numpy as np import struct from TCP import TCPClient fr...
{"hexsha": "2c5f0a784facc7dcab1f7bc98a0ce04bb541d5ba", "size": 2146, "ext": "py", "lang": "Python", "max_stars_repo_path": "color_tracker/utils/communication.py", "max_stars_repo_name": "caimingxue/color_tracker", "max_stars_repo_head_hexsha": "11e00daf540a46022dc16a2f79ce4a787dce4f9b", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma iso5_sharp [simp]: "(((x \<sqinter> nc) \<cdot> 1\<^sub>\<pi>) \<parallel> nc) \<cdot> 1\<^sub>\<pi> = (x \<sqinter> nc) \<cdot> 1\<^sub>\<pi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x \<sqinter> nc) \<cdot> 1\<^sub>\<pi> \<parallel> nc \<cdot> 1\<^sub>\<pi> = (x \<sqinter> nc) \<cdot> 1\<...
{"llama_tokens": 172, "file": "Multirelations_C_Algebras", "length": 1}
function gather_check_dims(X::AbstractArray{Tx,Nx}, Y::AbstractArray{Ty,Ny}, idx::AbstractArray{Tidx,Nidx}) where {Tx,Ty,Tidx<:IntOrIntTuple,Nx,Ny,Nidx} M = NNlib.typelength(Tidx) dims = gather_check_dims(Nx, Ny, M, Nidx) size...
{"hexsha": "dcfd29b03249e8ef8f88cea846440fd9303cf2ab", "size": 2166, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gather.jl", "max_stars_repo_name": "yuehhua/NNlibCUDA.jl", "max_stars_repo_head_hexsha": "96a334633ef3a3707c85fc1754c2c7eb8849db4e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import numpy from IPython.display import HTML import ipywidgets from matplotlib import animation, pyplot def create_init_fig(wrapped_signal, freq_arr, xcm_arr): """ creates initial figure needed for animation, but it doesn't display it. """ fig, ax = pyplot.subplots(figsize=(10.0, 5.0)) pyplot.tig...
{"hexsha": "d236ac4ca7e988a60f80eae023eb738eb0ea38a3", "size": 3141, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/almost_fourier_helper.py", "max_stars_repo_name": "engineersCode/EngComp5_surfourier", "max_stars_repo_head_hexsha": "bdf2eb7330e555106f17e64b693f0fbdd04b7710", "max_stars_repo_licenses": ...
from timeit import timeit from typing import Type import numpy as np import tensorflow as tf from tensorflow.python.framework.errors_impl import FailedPreconditionError import sandblox as sx import sandblox.util.tf_util as U from sandblox.core.io import bind_resolved from sandblox.test.core.foo import FooLogic clas...
{"hexsha": "3b31f04834674c2a14f8b2add0c020b80aac7419", "size": 7279, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandblox/test/core/base.py", "max_stars_repo_name": "reubenjohn/sandblox", "max_stars_repo_head_hexsha": "0b7917eb866ddbc4749a098884046d4ebb441985", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import pickle import numpy as np from .band_interface import * from .s1_interface import BigEarthNet_S1_Patch from .s2_interface import BigEarthNet_S2_Patch # FUTURE: Write a base class that gives the # common skeleton to inherit from class BigEarthNet_S1_S2_Patch: def __init__( self, bandVH: np...
{"hexsha": "7dfa3dc577aacbc5c738e29f9d2143abf7f40c30", "size": 3400, "ext": "py", "lang": "Python", "max_stars_repo_path": "bigearthnet_patch_interface/merged_interface.py", "max_stars_repo_name": "kai-tub/bigearthnet_patch_interface", "max_stars_repo_head_hexsha": "395f40f486c471f383a74667d1ae2006ee13e328", "max_stars...
[STATEMENT] lemma index_of_r_to_l_lm: "nat_to_pr index_of_r_to_l (c_pair x (c_pair y z)) = c_pair (c_pair x y) z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nat_to_pr index_of_r_to_l (c_pair x (c_pair y z)) = c_pair (c_pair x y) z [PROOF STEP] apply(unfold index_of_r_to_l_def) [PROOF STATE] proof (prove) goal (1...
{"llama_tokens": 1086, "file": "Recursion-Theory-I_RecEnSet", "length": 8}
mutable struct LossFunction{Δ, FT, ML, F, T, L, P} first_targets :: FT max_simulation_length :: ML field_weights :: F # scenario weights time_series :: T profile :: L end allsame(x) = all(y -> y ≈ first(x), x) t_interval(data) = data.t[2:end] .- data.t[1:end-1] funct...
{"hexsha": "145ade70ed40aefb915fb59395478b3426b25f56", "size": 7280, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LossFunctions/loss_function.jl", "max_stars_repo_name": "adelinehillier/OceanTurbulenceParameterEstimation.jl", "max_stars_repo_head_hexsha": "c0253976746d43c6667414be3801343818f6b2bf", "max_st...
import argparse import numpy as np import timm import torch from onnx.optimizer import optimize from timm.models import load_checkpoint from models.t2t_vit import * try: import onnx import onnxruntime as rt except ImportError as e: raise ImportError(f'Please install onnx and onnxruntime first. {e}') de...
{"hexsha": "bfd1b9bd9fc333e95e6649f20b1e7214a780b0dc", "size": 2741, "ext": "py", "lang": "Python", "max_stars_repo_path": "export.py", "max_stars_repo_name": "druzhkov-paul/T2T-ViT", "max_stars_repo_head_hexsha": "819c3ddc4cb6f464d4a9866d8713c7ace42ebf6c", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"], "max_stars_...
#include <iostream> #include <iomanip> #include <stdexcept> #include <math.h> #include <set> #include <boost/multiprecision/gmp.hpp> #include <boost/multiprecision/number.hpp> using namespace std; using namespace boost::multiprecision; int target = 100; int main(int argc, char** argv) { set<mpz_int> visited; fo...
{"hexsha": "d0530bd585bcffa537a5673ef00590e556f78ac6", "size": 622, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "29.cpp", "max_stars_repo_name": "DouglasSherk/project-euler", "max_stars_repo_head_hexsha": "f3b188b199ff31671c6d7683b15675be7484c5b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
'''This module contains the S-model Environment.''' import numpy as np # from random import uniform as u class SEnvironment(object): '''The S-model Learning Environment.''' def __init__(self, p_vector, precision=1): '''Create a probability vector from the probability of success vector.''' ...
{"hexsha": "6c972d994fc47546fd056a01b8f4f5cca73346ca", "size": 798, "ext": "py", "lang": "Python", "max_stars_repo_path": "distest/senvironment.py", "max_stars_repo_name": "0xSteve/detection_learning", "max_stars_repo_head_hexsha": "e767d740ffbb2df4570d8522a29062eca01b14ee", "max_stars_repo_licenses": ["Apache-2.0"], "...
## from Markdown.jl import Base: display, show graph_types = AbstractString["Plot", "FramedPlot"] function tohtml(io::IO, m::MIME"text/html", x) show(io, m, x) end function tohtml(io::IO, m::MIME"text/latex", x) show(io, m, x) end function tohtml(io::IO, m::MIME"text/plain", x) show(io, m, x) end function t...
{"hexsha": "7994f97166f0f58b5782f93fdde313d7328fa243", "size": 4937, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/markdown-additions.jl", "max_stars_repo_name": "jverzani/WeavePynb.jl", "max_stars_repo_head_hexsha": "5c2834f717fb3583d1fc245ed767b4d17aae6b39", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import unittest from ..weights import W, WSP from .. import util from ..util import WSP2W, lat2W from ..contiguity import Rook from ...io.fileio import FileIO as psopen from ... import examples from ..distance import KNN import numpy as np NPTA3E = np.testing.assert_array_almost_equal class TestW(unittest.TestCase):...
{"hexsha": "fd1832a57e71073fa84f4ec8754dbeae38205ff9", "size": 20248, "ext": "py", "lang": "Python", "max_stars_repo_path": "libpysal/weights/tests/test_weights.py", "max_stars_repo_name": "Kanahiro/dbf-df-translator", "max_stars_repo_head_hexsha": "6603ca1ac306203bf8c95e6545685c509324a438", "max_stars_repo_licenses": ...
# # created by Severin Dicks (IBSM, Freiburg) # # import cupy as cp import cudf import cugraph import anndata import time import numpy as np import pandas as pd import scipy import math from scipy import sparse import seaborn as sns import matplotlib.pyplot as plt from cuml.manifold import TSNE from cuml.cluster im...
{"hexsha": "1018f18126bbc162ff17e2b9a0f516acf53962e8", "size": 17904, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/scanpy_gpu_funcs.py", "max_stars_repo_name": "metzgerpatrick/rapids_singlecell", "max_stars_repo_head_hexsha": "319dabba5e6b15eb24e8ebc1b95e0d309b96bcc4", "max_stars_repo_licenses": ["MIT"],...
from difflib import SequenceMatcher import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec import matplotlib as mpl import argparse, math, random, gzip, pickle, types from collections import defaultdict import os import adjustText # Change following routines for other environments: L_init = ...
{"hexsha": "2f12c8527cd1f000d26491e6863834fc796a0997", "size": 11394, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analysis/p_unbound_analysis.py", "max_stars_repo_name": "Utenaq/GenoFold", "max_stars_repo_head_hexsha": "31b626ebf3d08b16b1cdf6544c36bbea75147719", "max_stars_repo_licenses": ["MIT"], "max_stars...
constant f : Nat → Nat @[simp] axiom fEq (x : Nat) (h : x ≠ 0) : f x = x example (x : Nat) (h : x ≠ 0) : f x = x + 0 := by simp (discharger := trace_state; exact (fun h' => h') h) example (x y : Nat) (h1 : x ≠ 0) (h2 : y ≠ 0) (h3 : x = y) : f x = f y + 0 := by simp (discharger := trace_state; assumption) assump...
{"author": "Kha", "repo": "lean4-nightly", "sha": "b4c92de57090e6c47b29d3575df53d86fce52752", "save_path": "github-repos/lean/Kha-lean4-nightly", "path": "github-repos/lean/Kha-lean4-nightly/lean4-nightly-b4c92de57090e6c47b29d3575df53d86fce52752/tests/lean/simpDisch.lean"}
#!/usr/bin/python import numpy as np import scipy import sys import random import time from math import pi ,sqrt, cos, sin random.seed(time.time()) M = int(float(sys.argv[1])) nrepeat = int(sys.argv[2]) nMol = nrepeat*nrepeat*nrepeat nAtoms = nMol d = [0.0,3.11,4.0,4.48,4.93,5.31,5.65] d0 = d[M] pdb = open("initia...
{"hexsha": "aafc332e1f9e182025aa2ada7ef25926b65f6cf1", "size": 1059, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/study.cases/LAMMPS/setup/model/writeInitEqu.py", "max_stars_repo_name": "JonathanLehner/korali", "max_stars_repo_head_hexsha": "90f97d8e2fed2311f988f39cfe014f23ba7dd6cf", "max_stars_repo_...
import gc import os import tqdm import cv2 import torch import numpy as np import pandas as pd import segmentation_models_pytorch as smp import pickle from torch.utils.data import DataLoader from clouds.models import Pretrained from clouds.io import CloudDataset, ClassificationCloudDataset from clouds.inference impor...
{"hexsha": "aa21a34a5d13a06991008bbb08603684b9ec9a3b", "size": 3619, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/create_clf_pseudo.py", "max_stars_repo_name": "jchen42703/understanding-clouds-kaggle", "max_stars_repo_head_hexsha": "6972deb25cdf363ae0d9a9ad26d538280613fc94", "max_stars_repo_licenses":...
import gym import time from gym.envs.registration import register import argparse import numpy as np parser = argparse.ArgumentParser(description=None) parser.add_argument('-e', '--env', default='collect', type=str) args = parser.parse_args() def main(): if args.env == 'soccer': register( id...
{"hexsha": "8ace97a5197de018f39bc1388718b202a99bb586", "size": 1094, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_env.py", "max_stars_repo_name": "euodiadodd1/RL_berry_poisoning_game", "max_stars_repo_head_hexsha": "46ce3e0d14651c82b56430308f992810dd5a4e05", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import os from flask import Flask, request, send_file import sys import torch import numpy as np from scipy.io import wavfile import io from nemo.collections.tts.models import TalkNetSpectModel from nemo.collections.tts.models import TalkNetPitchModel from nemo.collections.tts.models import TalkNetDursModel import json...
{"hexsha": "d94eb8ed04c6c1322aff411ab8ef1c55d822c9dc", "size": 3468, "ext": "py", "lang": "Python", "max_stars_repo_path": "mycroft_talknet.py", "max_stars_repo_name": "abb128/ControllableTalkNet", "max_stars_repo_head_hexsha": "6c806c5d6cd0cb9fe7725fc16ce85e59cc55dbfd", "max_stars_repo_licenses": ["CC0-1.0"], "max_sta...
#include <cmath> #include <boost/numeric/conversion/cast.hpp> #include <boost/math/special_functions/factorials.hpp> #include "kernel.h" const std::map<std::string, double> calculator::WExpression::global_constants { {"pi", boost::math::constants::pi<double>()}, {"e", boost::math::constants::e<double>()} }; d...
{"hexsha": "4cc3361c6f50c20e006e5f120887451fc2e8df35", "size": 11774, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "kernel.cpp", "max_stars_repo_name": "vega1986/wcalc_expression_parser", "max_stars_repo_head_hexsha": "e9645a5fa8086c4108ce4dc1f3ad7da3cead6480", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" act.qc.radiometer_tests ------------------------------ Tests specific to radiometers """ from scipy.fftpack import rfft, rfftfreq import numpy as np import xarray as xr import pandas as pd import datetime import dask import warnings from act.utils.datetime_utils import determine_time_delta from act.utils.geo_uti...
{"hexsha": "1833aa72d84a385027cfef5fa5a51c13f6924206", "size": 8681, "ext": "py", "lang": "Python", "max_stars_repo_path": "act/qc/radiometer_tests.py", "max_stars_repo_name": "rcjackson/ACT", "max_stars_repo_head_hexsha": "c57fb55094b142bbbef63e7069d4024049996139", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
# -*- coding: utf-8 -*- # Copyright (c) 2017 Interstellar Technologies Inc. All Rights Reserved. # Authors : Takahiro Inagawa, Kazuki Sakaki # # Lisence : MIT Lisence # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
{"hexsha": "b6b2f947575f7889ab5ad568e14b66007adf6afb", "size": 53441, "ext": "py", "lang": "Python", "max_stars_repo_path": "OpenGoddard/optimize.py", "max_stars_repo_name": "likping/OpenGoddard", "max_stars_repo_head_hexsha": "0906ee85038de85d7683e19532df62fcd53a9e28", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma set1_FGcontra_bound: fixes x :: "(_, 'co1, 'co2, 'co3, 'co4, 'co5, 'contra1, 'contra2, 'contra3, 'contra4, 'contra5, 'f1, 'f2) FGcontra" shows "card_of (set1_FGcontra x) <o (bd_FGcontra :: ('co1, 'co2, 'co3, 'co4, 'co5, 'contra1, 'contra2, 'contra3, 'contra4, 'contra5, 'f1, 'f2) FGcontrabd...
{"llama_tokens": 347, "file": "BNF_CC_Composition", "length": 3}
# utils.py # Ben Cook (bcook@cfa.harvard.edu) import numpy as np from scipy.misc import logsumexp from astropy.io import fits import os, sys # A module to create various utility functions def make_pcmd(mags): pcmd = np.copy(mags) n_filters = pcmd.shape[0] for i in range(1, n_filters): pcmd[i] = m...
{"hexsha": "3ff77e9e7b1226eadc5d240194b7aa73c6cbfb80", "size": 5699, "ext": "py", "lang": "Python", "max_stars_repo_path": "pcmdpy/utils/utils.py", "max_stars_repo_name": "johnnygreco/pcmdpy", "max_stars_repo_head_hexsha": "fe38db999f4445c98bde168867274654b2be4dbe", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
\documentclass[a4paper,12pt,titlepage]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=black, filecolor=magenta, urlcolor=blue, } \usepackage{graphicx} \graphicspath{ {./images/} } \usepackage{fancyhdr} \usepackage{lastpage} \usepackage{list...
{"hexsha": "f5af53793407fab072e4de3e4a03a2696d5691d2", "size": 8968, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/UserGuide/main.tex", "max_stars_repo_name": "SimLej18/KiloGuide", "max_stars_repo_head_hexsha": "5100df4da103f9d29113231ad87024a83c239faf", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_s...
""" KMATools Package for parsing various files produced by KMA. Tested on KMA 1.3.22. """ module KMATools using BioSymbols: DNA imap(f) = x -> Iterators.map(f, x) ifilter(f) = x -> Iterators.filter(f, x) const SPA_HEADER = join( [ "#Template", "Num", "Score", "Expected", ...
{"hexsha": "87550d9a620c3846f5a3641f3ad26d60a81df6d4", "size": 6619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/KMATools.jl", "max_stars_repo_name": "jakobnissen/KMATools.jl", "max_stars_repo_head_hexsha": "ec29bb5282c80dcab46b2d8fa399b788e33ed4df", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# # from models.MyGANet4 import GANet # # # # model = GANet() # # for name, module in model.named_children(): # # print(name) # # import torch # import torch.nn as nn # # a = torch.randn(2, 3, 2, 2) # 右图 # b = torch.ones(2, 1, 2, 2) # disp # print(a) # # def warp(x, disp): # """ # warp an image/tensor (...
{"hexsha": "0358d05b3ae93118c34878e2a379824528aaabea", "size": 1803, "ext": "py", "lang": "Python", "max_stars_repo_path": "view.py", "max_stars_repo_name": "hx-Tang/GANet", "max_stars_repo_head_hexsha": "8935c9d3d82189fa6f940c2a877534a398a041e4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
# -*- coding: utf-8 -*- """ Created on Sun Oct 21 14:51:28 2018 @author: yujika """ import pickle import numpy as np import cv2 import glob import matplotlib.pyplot as plt import matplotlib.image as mpimg #%matplotlib qt import util def corners_unwarp(img, nx, ny, mtx, dist): img_und = cv2.undistort(img, mtx, d...
{"hexsha": "fee2d7dc35559927031b95c10c362674814f0f0b", "size": 5568, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_work/camera_calibration.py", "max_stars_repo_name": "yujika/CarND-Advanced-Lane-Lines", "max_stars_repo_head_hexsha": "d8f671c60930353f7cd3e7b1c12f7d81fe50ab6f", "max_stars_repo_licenses": ["MI...
""" This module determines Auger, radiative, surface, and trap-assited recombination. Used primarily by find_current function in single_cell_power. Uses spectral.py to get radiative recombination and carriers.py for carrier concentration. Created 12/18/2019 by Nicholas Irvin""" import numpy as np import math ...
{"hexsha": "5412d79f5e1997a4d7b90194978fcf8bc371e2c6", "size": 20311, "ext": "py", "lang": "Python", "max_stars_repo_path": "recombination.py", "max_stars_repo_name": "npirvin/Radiative-Transport-PV", "max_stars_repo_head_hexsha": "d5236bfae5789fd2be5bb0190e962a83c24b3ae7", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Description: Using a two-layer network to predict the ozone layer thickness from data above Palmerston North in New Zealand between 1996 and 2004. """ from pylab import * import numpy as np #numerical package for scientific computing import mlpcn #ozone layer thickn...
{"hexsha": "2d15eec0d4762acbb7b30763403602bb1c11cbde", "size": 2953, "ext": "py", "lang": "Python", "max_stars_repo_path": "ffnn/time_series_problem.py", "max_stars_repo_name": "RaoulMa/NeuralNets", "max_stars_repo_head_hexsha": "f49072ac88686f753f9b5815d6cc5e71d536c3d2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import math fig, ax = plt.subplots() # pos1 = ax.get_position() # pos2 = [pos1.x0 + 0.1, pos1.y0 + 0.1, pos1.width, pos1.height] # ax.set_position(pos2) class Block: def __init__(self,x1,y1,x2,y2,vex=0, vey=0): self.fr ...
{"hexsha": "5d64e6e179111f826d6af6aac68286c280dd0ec8", "size": 4290, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/TestPipelinePlanner/TestCurveFollow.py", "max_stars_repo_name": "TheFactory22/RBotFirmware", "max_stars_repo_head_hexsha": "cb7ea74869189f015578cb31ddc0516c72f1ea00", "max_stars_repo_license...
#include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <cmath> #include <cstring> #include <memory> #include <vector> #include <limits> #include <algorithm> #include <utility> #include ...
{"hexsha": "888fb6da2f3f9d92199e55594465861cb872c42b", "size": 22163, "ext": "cc", "lang": "C++", "max_stars_repo_path": "models/statespace/fast_c/transient_combined.cc", "max_stars_repo_name": "davmre/sigvisa", "max_stars_repo_head_hexsha": "91a1f163b8f3a258dfb78d88a07f2a11da41bd04", "max_stars_repo_licenses": ["BSD-3...
# -*- coding: utf-8 # This script is the PyLaGriT version of LaGriT tutorial example at # https://lanl.github.io/LaGriT/pages/tutorial/stratigraphy/index.html. # Written by Guoyan Jiang (gyjiang@whu.edu.cn) with technical support # from Dylan Harp (dharp@lanl.gov) and Terry Miller (tamiller@lanl.gov). # Import ...
{"hexsha": "ee27d7525781010754fb16441f4547037966812f", "size": 15421, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyLaGriT/examples/stratigraphic_hex_mesh_tutorial.py", "max_stars_repo_name": "daniellivingston/LaGriT-CI-Test", "max_stars_repo_head_hexsha": "8c23f94150a69532be0ef8a33cd999585009530d", "max_sta...
[STATEMENT] lemma and_num_2097152_128: "(AND) (0b00000000001000000000000000000000::word32) (0b00000000000000000000000010000000::word32) = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 2097152 AND 128 = 0 [PROOF STEP] by simp
{"llama_tokens": 162, "file": "SPARCv8_SparcModel_MMU_Sparc_Properties", "length": 1}
///======================================================================= // Copyright 2015-2020 Clemson University // Authors: Bradley S. Meyer // // 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) //=============...
{"hexsha": "4a34c1af48ac632a6a65417ab610d99aecff54f5", "size": 36220, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/rank_spanning_branchings.hpp", "max_stars_repo_name": "mbradle/rank_spanning_branchings", "max_stars_repo_head_hexsha": "86aa045beebe0e5f273f0ee1bce5e91ca4f4f079", "max_stars_repo_licenses"...
##### ##### Tests copied from IterativeSolvers.jl ##### https://github.com/JuliaLinearAlgebra/IterativeSolvers.jl/blob/v0.9.2/src/lsmr.jl ##### # Type used in Dampenedtest # solve (A'A + diag(v).^2 ) x = A'b # using LSMR in the augmented space à = [A ; diag(v)] b̃ = [b; zeros(size(A, 2)] struct DampenedMatrix{Tv,TA<:...
{"hexsha": "d4842457ea79c45503def75e71aec19db3b62fe9", "size": 2781, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/utils/lsmr.jl", "max_stars_repo_name": "jondeuce/QSM.jl", "max_stars_repo_head_hexsha": "f960d8fe99f11d610be70051d79c2aba51f483f5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Use the same scale on x and y axis """ import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches # Plot data ################# #fig, ax = plt.subplots(figsize=(5, 5)) fig, (ax1, ax2) = plt.subplots(ncols=2) ax1.plot([0, 1]) ax2.plot(...
{"hexsha": "4040d9f4f7700f6f2225db6ea39bd8967be6636b", "size": 492, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/matplotlib/axis_equal.py", "max_stars_repo_name": "jeremiedecock/snippets", "max_stars_repo_head_hexsha": "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "max_stars_repo_licenses": ["MIT"], "max...
module RocketLowercaseOperatorTest using Test using Rocket include("../test_helpers.jl") @testset "operator: lowercase()" begin println("Testing: operator lowercase()") run_proxyshowcheck("Lowercase", lowercase()) run_testset([ ( source = from("Hello, world") |> lowercase(), ...
{"hexsha": "42f35e98e586368dd97387d3fb8bfbc50063dcdc", "size": 778, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/operators/test_operator_lowercase.jl", "max_stars_repo_name": "hgeorgako/Rocket.jl", "max_stars_repo_head_hexsha": "9661dad340e9a079ebd6ed57dcf9e5db31af637f", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python import argparse import marsyas import marsyas_util import time import numpy import cv from cv_utils import * import math # This program will perform real-time spectral analysis. # TODO: Put axis indicators in the plots! # # The basic functionality is as follows: # Source -> Window -> Spectra -> ...
{"hexsha": "cd1c7fa020c180191116e69a38b6b8268de2ebbc", "size": 3222, "ext": "py", "lang": "Python", "max_stars_repo_path": "marsyas-vamp/marsyas/src/marsyas_python/spectral_analysis.py", "max_stars_repo_name": "jaouahbi/VampPlugins", "max_stars_repo_head_hexsha": "27c2248d1c717417fe4d448cdfb4cb882a8a336a", "max_stars_r...
import numpy as np import matplotlib.pyplot as plt import torch from PIL import Image from tqdm import tqdm from pathlib import Path from plipy.ddl_inpainting import DDLInpaintingConv from plipy.dpdpl_inpainting import DPDPLInpaintingConv NUM_SAMPLES = 100 def psnr(im, imref, d=1): mse = np.mean((im - imref)*...
{"hexsha": "49ccf7ff0e01b9e865e04556a7be486707d49106", "size": 5129, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/others/inpainting_minima.py", "max_stars_repo_name": "bmalezieux/plipy", "max_stars_repo_head_hexsha": "35d17cad908219013fa43d81c4aeb6bb46ce9384", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2021 The TensorFlow Probability 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 law o...
{"hexsha": "f7188051fe659ac1411c3c3c3d773672836caf24", "size": 13881, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/distributions/student_t_process_regression_model_test.py", "max_stars_repo_name": "jakee417/probability-1", "max_stars_repo_head_hexsha": "ae7117f37ac441bc7a888167ea...
include("train.jl") using UnicodePlots # get the data # characters: [^0-9a-zA-Z&:,./()[]_-] THIS IS OLD raw = [] open("case_names/data.txt") do f line = 0 while !eof(f) push!(raw, readline(f)) end # while end # do #println(raw[1:20]) #chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ -[]()0123456789" chars...
{"hexsha": "1c16d1fe27172b9bf2d9e74544d951790e515aa7", "size": 1595, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "case_names/main.jl", "max_stars_repo_name": "Squalm/NeuralNetworks", "max_stars_repo_head_hexsha": "913a43e419c768e3ff29baab96c1f2871bc5e5bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python3 import cv2 import numpy as np import depthai as dai # Weights to use when blending depth/rgb image (should equal 1.0) rgbWeight = 0.4 depthWeight = 0.6 def updateBlendWeights(percent_rgb): """ Update the rgb and depth weights used to blend depth/rgb image @param[in] percent_rgb T...
{"hexsha": "37fb67cde274c3fafcced47adf57af4997c801d3", "size": 4309, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/StereoDepth/rgb_depth_aligned.py", "max_stars_repo_name": "MambaWong/depthai-python-1", "max_stars_repo_head_hexsha": "0d15abd77fd82b4a70e096ea5bb99237a17c9862", "max_stars_repo_licenses"...
# Copyright (c) 2012, Nicolo Fusi # Licensed under the BSD 3-clause license (see LICENSE.txt) import unittest import numpy as np import GPy from ..models import BayesianGPLVM class BGPLVMTests(unittest.TestCase): def test_bias_kern(self): N, num_inducing, input_dim, D = 10, 3, 2, 4 X = np.random.r...
{"hexsha": "1192448a9772dc394bff01dee62e3333b7ef8bc3", "size": 3661, "ext": "py", "lang": "Python", "max_stars_repo_path": "GPy/testing/bgplvm_tests.py", "max_stars_repo_name": "rokroskar/GPy", "max_stars_repo_head_hexsha": "0f8dbba56d480902c86cfe8bad9e79d9eabae009", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
using OrderedBinning using Test @testset "non-strinct, zero tolerance" begin boundaries = 0:3 ob = ordered_bins(boundaries; strict = false) @test ob(-1) == 0 @test ob(0) == 1 @test ob(0.5) == 1 @test ob(3) == 3 @test ob(4) == 4 for _ in 1:100 x = rand(Bool) ? rand(0:3) : rand() ...
{"hexsha": "9960db7358fcc2b6c3a0e6f0bc10ea628b8b76f7", "size": 983, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "tpapp/OrderedBinning.jl", "max_stars_repo_head_hexsha": "517821fdfa122e7952f2725e652c44e996900a06", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma atom_in_atom_image [simp]: "atom j \<in> atom ` V \<longleftrightarrow> j \<in> V" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (atom j \<in> atom ` V) = (j \<in> V) [PROOF STEP] by auto
{"llama_tokens": 89, "file": "Incompleteness_Pseudo_Coding", "length": 1}
type Packet ptr::Ptr{Void} function Packet(ptr::Ptr{Void}) p = new(ptr) finalizer(p, destroy) p end end function Packet() Packet(ccall((:sfPacket_create, libcsfml_network), Ptr{Void}, ())) end function copy(packet::Packet) return Packet(ccall((:sfPacket_copy, libcsfml_netw...
{"hexsha": "e655d69d418a27c2926c12e8a6828a2661381550", "size": 2225, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/julia/Network/packet.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SFML.jl-d50d9232-525f-5d35-8703-6ae49672cafe", "max_stars_repo_head_hexsha": "368097db31544432de82b92c40e10080b5...