text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import logging import os import time from collections import OrderedDict import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt from sklearn import decomposition import torch from torch import nn import torch.nn.functional as F from torch.nn.parallel import DistributedDataParallel as DDP from...
{"hexsha": "b3243216840586350741afe30c834147236eb260", "size": 15633, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/pipelines/pose2pose.py", "max_stars_repo_name": "ShenhanQian/SpeechDrivesTemplates", "max_stars_repo_head_hexsha": "3ad64d377462cbd860ee9355d80a67c92d7205f8", "max_stars_repo_licenses": ["MI...
SUBROUTINE CSigZ(Energy, Mu, Rs, ReSig, ImSig, ZTot, WpScl, & AmpFac) c SUBROUTINE CSigZ(Energy, Mu, Rs, ReSig, ImSig, ZTot, WpScl, Gamma, c & AmpFac) ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c Written by Josh Kas c This subroutine calculates the ...
{"hexsha": "143ddb75f22cc7579e4720f10969401d9e940d91", "size": 5913, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/EXCH/csigz.f", "max_stars_repo_name": "xraypy/feff85exafs", "max_stars_repo_head_hexsha": "ec8dcb07ca8ee034d0fa7431782074f0f65357a5", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co...
import numpy as np import torch import torch.nn.functional as F import random class IOStream(): def __init__(self, path): self.f = open(path, 'a') def cprint(self, text): print(text) self.f.write(text+'\n') self.f.flush() def close(self): self.f.close() class PN...
{"hexsha": "77b87946290a40c82823bf19d69ae000f20eadac", "size": 1415, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils.py", "max_stars_repo_name": "Gorilla-Lab-SCUT/AffordanceNet", "max_stars_repo_head_hexsha": "47c0c55a12f7e1429fd3e4a4bb781c4eec12803d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 ADCIRC Development Group # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ri...
{"hexsha": "69175dcb4b56b6cdc2c001cdb5ab397f4b424650", "size": 4401, "ext": "py", "lang": "Python", "max_stars_repo_path": "lambdas/build/metdata.py", "max_stars_repo_name": "adcirc/MetGet", "max_stars_repo_head_hexsha": "2f5265ff44ac9dc65345dc70dbcfe8d1d39deb43", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
include("../src/Operation.jl") using .Operation using Test @testset "Operation.jl" begin @test Operation.str2num("1 1 1 1", 2, 2) == [1 1; 1 1] #Квадратная @test Operation.str2num("1 1 1 1 1 1", 3, 2) == [1 1; 1 1; 1 1] #Для не квадратной @test Operation.transH("1 2 3 4", 2, 2) == [1 3; 2 4]#Транспонирован...
{"hexsha": "3766c354e8687fbe5ed9daf0853af880ef2f5dd7", "size": 2894, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "NikitaKutelev/kurs", "max_stars_repo_head_hexsha": "d0dc189afcb38903a8ddbf047faf407b2e97701d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import sys from dataset.kaldi_io import open_or_fd, read_vec_flt_scp, write_vec_flt import numpy as np vector_in = sys.argv[1:-1] vector_out = sys.argv[-1] vector_tot = [] vector_names = [] vector_single = {} for key, vec in read_vec_flt_scp(vector_in[0]): vector_names.append(key) vector_single[key] = vec ...
{"hexsha": "99b4595dba1362eb012e96cec5e923143c0f77ed", "size": 926, "ext": "py", "lang": "Python", "max_stars_repo_path": "misc/utils/paste-vector.py", "max_stars_repo_name": "ishine/tf-kaldi-speaker", "max_stars_repo_head_hexsha": "cac728d9db484e17bc27ea8ede843a3742111ce5", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] lemma seteq_qle_refl[iff]: "A =\<^sub>\<preceq> A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. A =\<^sub>\<preceq> A [PROOF STEP] by (simp add: seteq_qle_def)
{"llama_tokens": 85, "file": "Flyspeck-Tame_Quasi_Order", "length": 1}
[STATEMENT] lemma sd_power_zero [simp]: "sd_power x 0 = (1,\<bottom>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sd_power x 0 = (1::'a, \<bottom>) [PROOF STEP] using sd_unit_def [PROOF STATE] proof (prove) using this: sd_unit = (1::?'c, \<bottom>) goal (1 subgoal): 1. sd_power x 0 = (1::'a, \<bottom>) [PROOF ...
{"llama_tokens": 154, "file": "Quantales_Quantale_Modules", "length": 2}
from numpy import tri import pytest from datar.base.special import * from datar.base import Inf from .conftest import assert_iterable_equal, is_installed pytestmark = pytest.mark.skipif( not is_installed('scipy'), reason="'scipy' is not installed" ) @pytest.mark.parametrize('a,b,log,exp', [ (1, 2, False,...
{"hexsha": "c1ee3d6e2338fd3b6c15a78b7b1864276abf25d5", "size": 1985, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_base_special.py", "max_stars_repo_name": "stjordanis/datar", "max_stars_repo_head_hexsha": "4e2b5db026ad35918954576badef9951928c0cb1", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import cv2 import scipy.io as sio import numpy as np import PIL.Image as Image import PIL.ImageDraw as ImageDraw import cPickle import torch import time import json as json from libs.datasets.dataloa...
{"hexsha": "fa20718133ed39365ae792184fc67af21fd09afc", "size": 51612, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/datasets/citypersons2.py", "max_stars_repo_name": "FullStackD3vs/Detectron-PYTORCH", "max_stars_repo_head_hexsha": "b42c78b393098c8b678bb21bd4a48cc41028141b", "max_stars_repo_licenses": ["Ap...
#! ~/py33/bin # -*- coding: utf-8 -*- import sys import dadi import modeledemo_new_models_folded import numpy from numpy import array ...
{"hexsha": "68356b01164f2e77d788f0220e3fef5bae0506b7", "size": 3586, "ext": "py", "lang": "Python", "max_stars_repo_path": "05.bootstrap/01.scripts/uncertainty_godambe.py", "max_stars_repo_name": "QuentinRougemont/DemographicInference", "max_stars_repo_head_hexsha": "4c75148f065a626275b3cd424663eb02186f5faa", "max_star...
import argparse import json import logging import os import pandas as pd import pickle as pkl from sagemaker_containers import entry_point from sagemaker_xgboost_container.data_utils import get_dmatrix from sagemaker_xgboost_container import distributed import xgboost as xgb def _xgb_train(params, dtrain, evals, nu...
{"hexsha": "3830cf1c5618467c2623c74bf5b5088e1fff0533", "size": 4083, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/xgb_model.py", "max_stars_repo_name": "aribault/liverpool-ion-switching", "max_stars_repo_head_hexsha": "3503be3832b26db2c647e3cb3693b53cac187835", "max_stars_repo_licenses": ["MIT"], "max...
"""Parser for Troitsk Rsh data files.""" import os import struct import sys from datetime import datetime import dateutil import numpy as np from df_data.type_codes import (channel_control, synchro_channel_control, synchro_channel_types, synchro_control) CUR_DIR = os.path.dirname(os....
{"hexsha": "4bcefe77079240a38e4b2cec55dc8971147c00d3", "size": 13637, "ext": "py", "lang": "Python", "max_stars_repo_path": "dfparser/rsh_parser.py", "max_stars_repo_name": "kapot65/python-df-parser", "max_stars_repo_head_hexsha": "b38911f2e2cdc77935a5a34f331d98d44dad4d78", "max_stars_repo_licenses": ["MIT"], "max_star...
""" A Colleciton of data science helper functions """ import numpy as np import pandas as pd # sample and test code ONES = pd.DataFrame(np.ones(10)) ZEROS = pd.DataFrame(np.zeros(50))
{"hexsha": "35153556fb1cf57d6a3356ef622d4e0154a901a1", "size": 186, "ext": "py", "lang": "Python", "max_stars_repo_path": "lambdata_KyleHaggin/__init__.py", "max_stars_repo_name": "KyleHaggin/lambdata", "max_stars_repo_head_hexsha": "369fffea9498f496094aad77e1e47f40539e5b97", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import csv # assuming 6 days a week, with monday at 0 and saturday at 5 # assuming class starts at 8am until 9pm, with 30 minute time quanta DAYS_PER_WEEK = 6 TIME_QUANTA_PER_DAY = 26 # DECLARATIONS ================================================================= class Course: def __init__(se...
{"hexsha": "b9dd7b6fad29ab78bc013df55891ae1602fe5940", "size": 4057, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "calvss/schedulePermutation", "max_stars_repo_head_hexsha": "18f58f44790e50badb9a4c56dfbe20bf07f2eaff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import os import numpy as np from genEM3.data.wkwdata import WkwData, DataSource run_root = os.path.dirname(os.path.abspath(__file__)) datasources_json_path = os.path.join(run_root, '../../data/debris_clean_added_bboxes2_datasource.json') datasources_json_path_out = os.path.join(run_root, '../../data/debris_clean_adde...
{"hexsha": "eb5b0d9c3d639408d684382a9a35aa9e933b1e1c", "size": 1517, "ext": "py", "lang": "Python", "max_stars_repo_path": "genEM3/util/datasources_add_wiggled_bboxes.py", "max_stars_repo_name": "generem/generem", "max_stars_repo_head_hexsha": "b77387d33d177a3cc79742f873a73b636024fe38", "max_stars_repo_licenses": ["MIT...
"""The class of binocular camera """ # function comment template """name description Args: Returns: """ # class comment template """The class of description Attributes: """ import cv2 import numpy as np from tqdm import tqdm import sys import yaml import logging import glob imp...
{"hexsha": "f9b7b85c76b3e5b793ccdade9c5c1067cc5b142c", "size": 23672, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/ModelStereoCamera.py", "max_stars_repo_name": "Easonyesheng/StereoCameraToolk", "max_stars_repo_head_hexsha": "660e43019d0687e96e6da3aca48c1c423ae5abff", "max_stars_repo_licenses": ["MIT"]...
import numpy as np from typing import Tuple GAP_CHAR = "_" def pairwise_alignment( dataset: str, match_score=1, gap_score=-1, mismatch_score=-1 ) -> Tuple[str, int]: """ Needleman–Wunsch algorithm for dataset: "stringA\nstringB\n" Returns: (an optimal alignment, its matching score) """ ...
{"hexsha": "fc339a67def78ab18e8464ddff190faa632729bc", "size": 2943, "ext": "py", "lang": "Python", "max_stars_repo_path": "sequence_alignment/pairwise_alignment.py", "max_stars_repo_name": "haochunchang/Bioinformatics_Course", "max_stars_repo_head_hexsha": "c060c1cfe2ccc3c6f0adbe3e414b3c7ce8a5385c", "max_stars_repo_li...
import argparse import numpy as np import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import inputparser import mutstat def score(stats, P): assert np.all(stats >= 0) and np.all(stats <= 1) total = (np.sum(np.abs(stats)**P) / stats.size)**(1/P) return total def main(): ...
{"hexsha": "3f21caa35bf5b4c92e060e995dcb31ca2ada60f2", "size": 1089, "ext": "py", "lang": "Python", "max_stars_repo_path": "comparison/eval_mutdists.py", "max_stars_repo_name": "J-Moravec/pairtree", "max_stars_repo_head_hexsha": "91cbba628b78aea31034efb080976fdb47d83976", "max_stars_repo_licenses": ["MIT"], "max_stars_...
Subroutine adapt_cof(downSuccess, nPTReplicas, S_val, N_average, & lowerRepExe, upperRepExe, & lowerRail, upperRail, & repAnnealSpeed, replicaBounds) use params, only: dp implicit none ! inputs integer, intent(in) :: nPTReplicas integer, intent...
{"hexsha": "d1d5c3a37eb1c6cf59eaa5612537f8b555fb5e92", "size": 2834, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "src/mc/adapt_cof.f03", "max_stars_repo_name": "SpakowitzLab/BasicWLC", "max_stars_repo_head_hexsha": "13edbbc8e8cd36a3586571ff4d80880fc89d30e6", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
// sample/html/simple_html.cpp #include <boost/test/unit_test.hpp> #include <wordring/css/selector.hpp> #include <wordring/html/simple_html.hpp> #include <wordring/tree/tree_iterator.hpp> #include <cassert> #include <iterator> #include <string> #include <string_view> BOOST_AUTO_TEST_SUITE(html_simple_html_sample) ...
{"hexsha": "d8f76c5e6fa0664256d8e1ec324807889a0d8714", "size": 4972, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sample/html/simple_html.cpp", "max_stars_repo_name": "wordring/wordring", "max_stars_repo_head_hexsha": "e2c9c2ed66010537efd78694521312c5b63f0510", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
import subprocess from threading import Thread import numpy as np def viterbi_cxxrtl_tb(coded_sequence, cxxrtl_tb_filename): """Python interface to cxxrtl executable coded_sequence Input data cxxrtl_tb_filename Executable name """ coded_string = "".join([chr(c + 97) for c in cod...
{"hexsha": "a944275f0674f214f1a12c8de93fa07b5f64ba7e", "size": 1371, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/viterbi_cxxrtl_tb.py", "max_stars_repo_name": "pepelzorro/convolutionalcodes", "max_stars_repo_head_hexsha": "f94259b153394ca83b7bfd927128c05ebbe8110e", "max_stars_repo_licenses": ["BSD-...
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import pickle import os import scipy.io import time import matplotlib.pyplot as plt import matplotlib as mpl import utils from sklearn.manifold import TSNE from scipy import misc #~ from utils import resize_images class Solver(object)...
{"hexsha": "199d246e589b088abe6fa20c2e2767db0233c031", "size": 7291, "ext": "py", "lang": "Python", "max_stars_repo_path": "svhn2mnist/solver.py", "max_stars_repo_name": "pmorerio/minimal-entropy-correlation-alignment", "max_stars_repo_head_hexsha": "3b261683fbb24eca2d2efb6dff5c25ec4301b7fc", "max_stars_repo_licenses":...
import numpy as np from ..pyramids.filters import parse_filter from ..pyramids.c.wrapper import corrDn, upConv import scipy.signal def blur(image, n_levels=1, filt='binom5'): '''blur an image by filtering-downsampling and then upsampling-filtering Blur an image, by filtering and downsampling `n_levels` times...
{"hexsha": "811241d6b7babcefe86a84ecc4c89515481db990", "size": 18190, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrtools/tools/convolutions.py", "max_stars_repo_name": "drwalton/pyrtools", "max_stars_repo_head_hexsha": "00c055639d2dc887c94bf5adddb7adaa8960fb5f", "max_stars_repo_licenses": ["MIT"], "max_sta...
import os from os.path import join import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.patches import Rectangle from crabnet.utils.utils import CONSTANTS # %% cons = CONSTANTS() for benchmark in [True, False]: df = pd.read_csv("metrics/all_metrics.csv") ...
{"hexsha": "da01ee327136e107f9c42549c03a7c49eddcc9f8", "size": 8216, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/paper_figures/Paper_TABLE_2.py", "max_stars_repo_name": "sgbaird/CrabNet", "max_stars_repo_head_hexsha": "9b3966cb7238dd688b84eb3fae9f2c6ae3a4ae47", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np import stars # Define a dummy estimator (returns the same estimate for all subsamples) def estimator(subsamples, lmbda): p = subsamples.shape[2] A = np.triu(np.random.uniform(size=(p,p)), k=1) A += A.T A = A > 0.5 return np.array([A] * len(subsamples)) # Generate data from a nei...
{"hexsha": "9f7030662e5120a41008c09fada9de17f73b64d6", "size": 587, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/stars_example.py", "max_stars_repo_name": "juangamella/stars", "max_stars_repo_head_hexsha": "c109de574be7da73a821df2c7aa9932fd9915946", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
# -*- coding: utf-8 -*- from __future__ import print_function import ceiltrack import numpy as np import struct def rle(mask): # assume run starts with zeros, output <skip length> <run length> out = [] zero = True run = 0 for i in range(len(mask)): if zero: if mask[i]: ...
{"hexsha": "65ea2d92689103bbeab3f1cc6259e0cb0a8c00f6", "size": 1486, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/ceilslam/generate.py", "max_stars_repo_name": "naughtyStark/cycloid", "max_stars_repo_head_hexsha": "a9c2a738e217958cb03810f06538e80daefd74ee", "max_stars_repo_licenses": ["MIT"], "max_stars...
# setup.py -- Build-Script for building Psychtoolbox-3 "mex" files as Python extensions. # # (c) 2018 Mario Kleiner - Licensed under MIT license. # # from distutils.core import setup, Extension # Build system. from setuptools import setup, Extension, find_packages import os, fnmatch, shutil # Director...
{"hexsha": "f7ee72a66c89381c85cf47bcd938b3c52ba88922", "size": 12901, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "menrmenr/Psychotoolbox-3", "max_stars_repo_head_hexsha": "b294355ea46bcd3bcd6876196d0c0f321b3a6ddc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
using OrderedCollections using REPL.TerminalMenus """ line_count_dir(directory::String) Count lines of code in directory `directory`. """ function line_count_dir(directory, extensions, sort_results=true) extensions isa AbstractString && (extensions = (extensions,)) all_files = [joinpath(root, f) for (roo...
{"hexsha": "7b6f6799827ee0c740e5396d229528e2ec17e497", "size": 2809, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/line_count_dir.jl", "max_stars_repo_name": "charleskawczynski/UtilityBelt.jl", "max_stars_repo_head_hexsha": "83865eb7c4c46534f5d4eb9b1806dc92fbe0cb7d", "max_stars_repo_licenses": ["MIT"], "max...
import cv2 import numpy as np import matplotlib.pyplot as plt import numpy.linalg as la def ols_parabola(X, Y): xmax = max(X) ymax = max(Y) if xmax > ymax: maxls = xmax else: maxls = ymax xact = np.asarray([i/maxls for i in X]) yact = np.asarray([i/maxls for i in Y]) xact =...
{"hexsha": "6da0d311db6e118c9ae4321f326a22e83418625c", "size": 6248, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Trajectory_Plotting.py", "max_stars_repo_name": "rpande1996/Trajectory_Plotting", "max_stars_repo_head_hexsha": "f1fc70b0ce4f0c8cbf3ddf7fe771f84be43df332", "max_stars_repo_licenses": ["MIT"], ...
import os import pathlib from typing import List from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import torch import torch.nn as nn import torch.nn.functional as F import torchvision from torch import Tensor from torch.nn.functional import adaptive_avg_pool2d from torch.utils.data import DataLoader ...
{"hexsha": "836a095b27ba8a2ebaf213ec91840bc3d4b29c21", "size": 23874, "ext": "py", "lang": "Python", "max_stars_repo_path": "losses/fid.py", "max_stars_repo_name": "milesgray/ImageFunctions", "max_stars_repo_head_hexsha": "35e4423b94149b0ba291eafb0cd98260a70d5f31", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import numpy as np from scipy.stats import norm import matplotlib.pyplot as plt plt.style.use('dark_background') def trunc_gauss(x, mu, sig, start, end): y = np.zeros(len(x)) ind = np.argwhere(np.logical_and(np.abs(x-mu) < end, np.abs(x-mu) > start)) y[ind] = norm.pdf(x[ind], mu, sig) return y R = 100...
{"hexsha": "4a62051abb0322d2b7f3c6568250f25b278360e7", "size": 734, "ext": "py", "lang": "Python", "max_stars_repo_path": "CMTolerance/trunc_gauss.py", "max_stars_repo_name": "kzantow-audio/Bad-Circuit-Modelling", "max_stars_repo_head_hexsha": "d592dbafc98d9a45190b9fe6ae1c86f382e26bea", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma ordinal_of_nat_le [simp]: "(ordinal_of_nat x \<le> ordinal_of_nat y) = (x \<le> y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (ordinal_of_nat x \<le> ordinal_of_nat y) = (x \<le> y) [PROOF STEP] by (rule strict_mono_cancel_le[OF strict_mono_ordinal_of_nat])
{"llama_tokens": 131, "file": "Ordinal_OrdinalOmega", "length": 1}
/** * Some common calculations are defined here */ #ifndef WAVE_TWIST_JACOBIANS_HPP #define WAVE_TWIST_JACOBIANS_HPP #include <Eigen/Core> namespace wave_optimization { template<typename Derived, typename MDerived, typename VDerived, typename V1Derived, typename JDerived> inline void calcInFrameInterpolation(cons...
{"hexsha": "a4cf823abbd4246800fda58ac2ff21a32947393f", "size": 2047, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "wave_optimization/include/wave/optimization/ceres/odom_gp_twist/twist_jacobians.hpp", "max_stars_repo_name": "Jebediah/libwave", "max_stars_repo_head_hexsha": "c04998c964f0dc7d414783c6e8cf989a2716ad...
import scipy as sp import pdb import scipy.linalg as la import fastlmm.util.util as utilx import sys def genphen(y_G0,G1,covDat,options,nInd,K1=None,fracCausal=None,randseed=None): ''' Generate synthetic phenotype with a LMM and linear kernels, using SNPs in G1 for signal, snps in GO for background, and on...
{"hexsha": "cc15a87b291a1867de54d4d04ddec09f684aed26", "size": 3450, "ext": "py", "lang": "Python", "max_stars_repo_path": "fastlmm/util/genphen.py", "max_stars_repo_name": "HealthML/FaST-LMM", "max_stars_repo_head_hexsha": "3c502ce1c693a934b5f2ff7b63a9577e892cb716", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# Capture different color and depth frames and the corresponding pose of the camera with ROS. # Author: Hongtao Wu # Institution: Johns Hopkins University # Date: Nov 24, 2019 from __future__ import print_function import os import time import rospy import roslib from sensor_msgs.msg import Image from sensor_msgs.ms...
{"hexsha": "ae948ec9e296f3ae00945fcd2e7af1bc625ba1b4", "size": 3983, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros_camera_tsdf_fusion.py", "max_stars_repo_name": "jaydenwu17/cup_imagine", "max_stars_repo_head_hexsha": "0ac1dcb6a1e2df393a300186a1d07cef6b1b48c0", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
# originally code is from https://github.com/Ksuryateja/DCGAN-CIFAR10-pytorch/blob/master/gan_cifar.py # I am taking its generator for cifar10 dataset (nov 18, 2021) # used these are parameters in pycharm # --data_dir ../Data/ --log_dir ../logs/ -c configs/train_gen_cifar10_to_cifar10.yaml --ckpt_dir ~/.cache/ --hide_...
{"hexsha": "1c16d5a1cf648ccc890af91e4500a837de811065", "size": 12826, "ext": "py", "lang": "Python", "max_stars_repo_path": "dc_gan_cifar.py", "max_stars_repo_name": "MijungTheGatsbyPostdoc/SimSiam", "max_stars_repo_head_hexsha": "d8dd2b01f493d094dca1e7634d3b7c00857b5224", "max_stars_repo_licenses": ["MIT"], "max_stars...
Oakshade Commons is a business and residential development across the street from Oakshade Town Center that houses the following: Davis Surgery Center Moshi Moshi Oakshade Commons Apartments
{"hexsha": "2523a12cdc2ec21661f2a8932f7284f7ac33c0fb", "size": 199, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Oakshade_Commons.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#define BOOST_TEST_MODULE test_tir #include <boost/test/unit_test.hpp> #include <Tir/Tir.h> BOOST_AUTO_TEST_SUITE(tir_test_suite) BOOST_AUTO_TEST_CASE(actual_count) { BOOST_TEST_MESSAGE("using tolerances within checks."); const double notional = 100; const std::vector<double> CashFlows ...
{"hexsha": "cfe526f1baaa9c72cf02390d816071eea1826136", "size": 1125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "assignment1/src/Tir/tests/test.cpp", "max_stars_repo_name": "paulochang/finance_valuator", "max_stars_repo_head_hexsha": "6bf6e6bc5c803d3a9530d528bd37cd73cce062f2", "max_stars_repo_licenses": ["MIT"...
[STATEMENT] lemma unlessE_whenE: "unlessE P = whenE (~P)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. unlessE P = whenE (\<not> P) [PROOF STEP] by (rule ext)+ (simp add: unlessE_def whenE_def)
{"llama_tokens": 87, "file": "Planarity_Certificates_l4v_lib_wp_NonDetMonadLemmas", "length": 1}
from srxraylib.plot.gol import plot_image, plot, plot_show, set_qt import numpy # import h5py # import matplotlib import pylab as plt set_qt() def create_surface(p=20.0,M=1.0,theta=2e-3,shape='diaboloid'): # file available at: https://github.com/oasys-kit/OASYS-SYNED/blob/master/orangecontrib/syned/util/diab...
{"hexsha": "55b4228240c5e288b281c0b118f523db43d73877", "size": 7685, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/plot_detrended_surface_figs_7_and_8.py", "max_stars_repo_name": "oasys-als-kit/Paper_JSR_hf5419", "max_stars_repo_head_hexsha": "cb8f7c24a66bb14e0a71044bc389a43ccbb2ea71", "max_stars_repo_...
"""Tests for geometry_utils.""" import numpy as np from absl.testing import absltest from coffee.utils import geometry_utils class GeometryUtilsTest(absltest.TestCase): def test_l2_normalize(self) -> None: input_array = np.random.randn(4) output_array = geometry_utils.l2_normalize(input_array) ...
{"hexsha": "4da38440f1a817c44344209bdc6db905092c6424", "size": 1090, "ext": "py", "lang": "Python", "max_stars_repo_path": "coffee/utils/geometry_utils_test.py", "max_stars_repo_name": "kevinzakka/coffee", "max_stars_repo_head_hexsha": "a238be767a85421c8cdadbe1303c0cf8ead92f7a", "max_stars_repo_licenses": ["MIT"], "max...
"""Writing DICOM from vol in ssdf using pydicom. Module saves 'avgreg' volume to dicom (.dcm) files """ from __future__ import print_function import sys import os.path import dicom from dicom.dataset import Dataset, FileDataset import dicom.UID from stentseg.utils.datahandling import select_dir,loadvol,normalize_sof...
{"hexsha": "510fbc7b1b43033f6e7da671f59d345b9cf3f6a7", "size": 10710, "ext": "py", "lang": "Python", "max_stars_repo_path": "lspeas/_ssdf2dicom.py", "max_stars_repo_name": "almarklein/stentseg", "max_stars_repo_head_hexsha": "48255fffdc2394d1dc4ce2208c9a91e1d4c35a46", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np from sys import argv import sys import numpy as np import pandas as pd from matplotlib import pyplot as plt import seaborn as sns import matplotlib.ticker as ticker from collections import Counter from mpl_toolkits.axes_grid1.inset_locator import inset_axes from EpiModel import * import cv19 #---...
{"hexsha": "fc32d32c5b6367c282f26e12ad0c6e1535b32359", "size": 5924, "ext": "py", "lang": "Python", "max_stars_repo_path": "dev/sim_SEIR.py", "max_stars_repo_name": "ivco19/countries", "max_stars_repo_head_hexsha": "97aba40ea37428273895f02c40bb6ea1db6f349b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation plt.rcParams["figure.figsize"] = (8, 8) plt.rcParams["font.size"] = 14 plt.style.use('dark_background') # dark theme def CalculatePhaseFromFocus(x, y, e): return np.sqrt(np.sum((e.r-np.array([x, y]))**2))*...
{"hexsha": "bf1966f63b28aa7349e4f1aa6d5efef08f72c3d2", "size": 6604, "ext": "py", "lang": "Python", "max_stars_repo_path": "phased_array.py", "max_stars_repo_name": "davesspace/tutorial-phased-array", "max_stars_repo_head_hexsha": "a302da5393adda5a953c7cbee20ed069ae626ab6", "max_stars_repo_licenses": ["CC0-1.0"], "max_...
""" Validation =========================================================== Validates baselines for Match NN. Current baselines: cosine distance using raw input vectors and at random. Author: Bento Gonçalves License: MIT Copyright: 2020-2021 """ import numpy as np import pandas as pd from sklearn.metrics.pairwise impo...
{"hexsha": "cb3e3e8687589446a0bc7117734c85497a38e8b2", "size": 3720, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/validate_baselines.py", "max_stars_repo_name": "bentocg/Insight", "max_stars_repo_head_hexsha": "fbc69aebc33cade000dcebff12c42015e036cb12", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
// (C) Copyright Gennadiy Rozental 2011-2012. // 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) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version ...
{"hexsha": "be2ff18f0e49b053568c84607bf54049e2004175", "size": 3514, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/test/data/monomorphic/collection.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licenses": ["B...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict import argparse import cv2 # NOQA (Must import before importing caffe2 due to bug in cv2) import glob import logging import os import...
{"hexsha": "88b63071da01f0809e6140abac9e264b80a4e7d4", "size": 8648, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/infer_matterport3d.py", "max_stars_repo_name": "suhangpro/detectron", "max_stars_repo_head_hexsha": "5d1a449315ec6817c0a281baac79383979014f47", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
""" qqmap(obs::ClimGrid, ref::ClimGrid, fut::ClimGrid; method="Additive", detrend=true, window::Int=15, rankn::Int=50, thresnan::Float64=0.1, keep_original::Bool=false, interp::Function = Linear(), extrap::Function = Flat()) Quantile-Quantile mapping bias correction. For each julian day of the year (+/- **window** siz...
{"hexsha": "b1114a529c0a731e278d9a4d21077cdce4a1c97b", "size": 21926, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/biascorrect.jl", "max_stars_repo_name": "fidelthomet/ClimateTools.jl", "max_stars_repo_head_hexsha": "74f22ef4c062978024335f9e76bf653f3c3baeea", "max_stars_repo_licenses": ["0BSD"], "max_stars...
import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt from icecream import ( ic, install, ) install() sys.path.append('.') from vi_dem.particles import ( Particles, NList, ) from vi_dem.variational_int import ( HookianContact, time_step, ) from utils import * de...
{"hexsha": "5a68dcc588cd20e6f99414a2669fb64872c87c8a", "size": 16270, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/impact.py", "max_stars_repo_name": "dawiedotcom/vi_dem", "max_stars_repo_head_hexsha": "92e03e6087f4f0692aba8195637b2a6f51ac8fd4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#pragma once // // Copyright (c) 2015, J2 Innovations // Copyright (c) 2012 Brian Frank // Licensed under the Academic Free License version 3.0 // History: // 28 Aug 2014 Radu Racariu<radur@2inn.com> Ported to C++ // 06 Jun 2011 Brian Frank Creation // #include "headers.hpp" #include "dict.hpp" #include "row.hp...
{"hexsha": "ad43d2ce1397b76d967b7f2ecfe0f9fff2ddd749", "size": 7884, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/grid.hpp", "max_stars_repo_name": "kushaldalsania/haystack-cpp", "max_stars_repo_head_hexsha": "95997ae2bca9ea096dc7e61c000291f3ac08d9d7", "max_stars_repo_licenses": ["AFL-3.0"], "max_stars_...
import analysis.normed_space.finite_dimension import analysis.convolution import measure_theory.function.jacobian import measure_theory.integral.bochner import measure_theory.measure.lebesgue open set filter open_locale topological_space filter ennreal open measure_theory noncomputable theory variables {α : Type*} [...
{"author": "avigad", "repo": "mathematics_in_lean_source", "sha": "4eeb8c43762522c1acaa7f799599609d6a48f59e", "save_path": "github-repos/lean/avigad-mathematics_in_lean_source", "path": "github-repos/lean/avigad-mathematics_in_lean_source/mathematics_in_lean_source-4eeb8c43762522c1acaa7f799599609d6a48f59e/lean_source/0...
import numpy as np import pytest import pyfma def test_fma(): out = pyfma.fma(3.0, 2.0, 1.0) assert out == 7.0 @pytest.mark.parametrize("dtype", [np.single, np.double, np.longdouble]) def test_numpy(dtype): print(dtype) x = np.full((2, 3, 4), 3.0, dtype=dtype) y = np.full((2, 3, 4), 2.0, dtype=...
{"hexsha": "29c1b2b5f411e7178c70acba68bc25fac7a02b6c", "size": 524, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_fma.py", "max_stars_repo_name": "nschloe/pyfma", "max_stars_repo_head_hexsha": "545cac618a7c275d61b049c06458f935ab4c03c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max...
######################################################################## # # Vision Node - Python source code - file generated by vision # Wednesday 21 November 2007 11:50:30 # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Daniel S...
{"hexsha": "f9b38c5c3b9129faae64b6f9b775cfeae1d12752", "size": 4505, "ext": "py", "lang": "Python", "max_stars_repo_path": "resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/VisionLibraries/scipylib/signal/sinFunc.py", "max_stars_repo_name": "J-E-J-S/aaRS-Pipeline", "max_stars_repo_head_hexsha": "43f59f28ab06e4b16328...
""" Use the COCO evaluation pipeline. """ import argparse import copy import cPickle as pickle from cStringIO import StringIO import logging import numpy as np import pprint import sys import tensorflow as tf import tensorflow.contrib.slim as slim import time from pycocotools.coco import COCO from pycocotools.cocoeva...
{"hexsha": "d268372dc16e0cf3c2ffd09bba46d984e3842996", "size": 9658, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval.py", "max_stars_repo_name": "gvanhorn38/multibox", "max_stars_repo_head_hexsha": "e25bbaa55a17dd66f752ba7d6636300a3b75ebac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19, "max_st...
import pandas as pd import numpy as np from verstack.categoric_encoders.args_validators import is_bool_na_sentinel, assert_fit_transform_args, assert_transform_args class OneHotEncoder(): ''' Encoder to represent categoric (multiclass) variable as a set of binary variables one for each class. '''...
{"hexsha": "58db4ee49a1c40bd5c842f4c18556c6a6d0f1c98", "size": 6525, "ext": "py", "lang": "Python", "max_stars_repo_path": "verstack/categoric_encoders/OneHotEncoder.py", "max_stars_repo_name": "DanilZherebtsov/verstack", "max_stars_repo_head_hexsha": "56a5f4f8a7dbae17866fbffd45ef0e781bd59215", "max_stars_repo_licenses...
from collections import namedtuple from random import sample, choice, randrange from settings import * import numpy as np import torch from torch import optim import torch.nn as nn from torch.nn import functional as F Transition = namedtuple('Transition', ('state', 'action', 'next_s...
{"hexsha": "8676edc9194d1eb794db25a2a8c523802ab79767", "size": 4174, "ext": "py", "lang": "Python", "max_stars_repo_path": "RL/DQN/DQN.py", "max_stars_repo_name": "ColinFred/Reinforce_Learning_Pytorch", "max_stars_repo_head_hexsha": "48593dbb12f49915e8f94182ef9b0a3b68aee1d3", "max_stars_repo_licenses": ["MIT"], "max_st...
import pytest import test_aide as ta import tests.test_data as d import pandas as pd import numpy as np import tubular from tubular.imputers import MedianImputer class TestInit(object): """Tests for MedianImputer.init().""" def test_arguments(self): """Test that init has expected arguments.""" ...
{"hexsha": "12d20b92d53b9911fa841b7a57781cfbe9611d5f", "size": 7373, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/imputers/test_MedianImputer.py", "max_stars_repo_name": "bissoligiulia/tubular", "max_stars_repo_head_hexsha": "878fa0d484ab1e8688e40680f51b2dcaa15abe2e", "max_stars_repo_licenses": ["BSD-3-...
# -*- coding: utf-8 -*- from __future__ import print_function, division, unicode_literals from __future__ import absolute_import import numpy as np, time, sys # import relevant pieces for TCS34725 RGB (color) sensor import Adafruit_TCS34725 as TCS34725 class TCS34725Config(object): ''' TC34725 configuration and i...
{"hexsha": "72c79ab51d13d545517a1ef09c4485b8671a45be", "size": 4083, "ext": "py", "lang": "Python", "max_stars_repo_path": "phypidaq/TCS34725Config.py", "max_stars_repo_name": "RMGrau/PhyPiDAQ", "max_stars_repo_head_hexsha": "e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
/* * Copyright (c) 2011-2019, The DART development contributors * All rights reserved. * * The list of contributors can be found at: * https://github.com/dartsim/dart/blob/master/LICENSE * * This file is provided under the following "BSD-style" License: * Redistribution and use in source and binary forms, w...
{"hexsha": "6dba104628e568fecfcfe97fc4a682535efda703", "size": 11745, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "dart/common/detail/CompositeData.hpp", "max_stars_repo_name": "alinen/dart", "max_stars_repo_head_hexsha": "e84d236f40238654779a2c1541534906a8ad8b93", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
! ################################################################################################################################## ! Begin MIT license text. ! ___________________________________________________________________________...
{"hexsha": "438756df6bbf852d65093596cb47c13680365457", "size": 9894, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/LK1/L1A/FFIELD2.f90", "max_stars_repo_name": "dr-bill-c/MYSTRAN-general-purpose-finite-element-computer-program", "max_stars_repo_head_hexsha": "307d62953924e3945b22b2fcdb7963a8be330a0c",...
import numpy as np from collections import namedtuple def make_one_hot(labels, n_class): assert(np.asarray(labels).ndim == 1) one_hot = np.zeros((len(labels), n_class), dtype=np.float32) for i, label in enumerate(labels): one_hot[i, label] = 1. return one_hot class IndexedDict(object): def...
{"hexsha": "be8df161f01a86b1daf01179271bf1ad543249a2", "size": 910, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/datasets/dataset_utils.py", "max_stars_repo_name": "swang423/SpeechVAE", "max_stars_repo_head_hexsha": "6cecc489d713ef549f91d89bab717f17d6831449", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# Copyright 2018 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": "6b47ad323bd5b1948e1a6385a39eb688e8566ac7", "size": 3510, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_probability/python/sts/internal/missing_values_util_test.py", "max_stars_repo_name": "nbro/probability", "max_stars_repo_head_hexsha": "07a6378155f0ed720b5aaccf5387e3f9a432bd10", "max_s...
##WZN: 01092018: CAREFUL ABOUT AUMENTATION, it main ruin the saved ground truth!! #WZN: difference is by reading two additional variables of lidat birdview import numpy as np import numpy.random as npr import cv2 from fast_rcnn.config import cfg from utils.blob import prep_im_for_blob, im_list_to_blob from utils.tran...
{"hexsha": "19b13abfb7615d64e533e60d5b53258a85999dbf", "size": 13019, "ext": "py", "lang": "Python", "max_stars_repo_path": "MV3D_TF_release/lib/roi_data_layer/minibatch_mv3d_img.py", "max_stars_repo_name": "ZiningWang/Sparse_Pooling", "max_stars_repo_head_hexsha": "a160ddf9a03ef53bad630b4ac186a8437bd0475c", "max_stars...
[STATEMENT] lemma diff_mod_0_imp_mod_eq:" \<lbrakk> (b - a) mod m = 0; a \<le> b \<rbrakk> \<Longrightarrow> (a::nat) mod m = b mod m" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>(b - a) mod m = 0; a \<le> b\<rbrakk> \<Longrightarrow> a mod m = b mod m [PROOF STEP] apply (rule ccontr) [PROOF STATE] pro...
{"llama_tokens": 372, "file": "List-Infinite_CommonArith_Util_Div", "length": 4}
Definition plus_assoc := forall n m o : nat, n + m + o = n + (m + o).
{"author": "tzik", "repo": "top-prover", "sha": "3f92af1e76e437bee6b49152f11a6dfb3b730a61", "save_path": "github-repos/coq/tzik-top-prover", "path": "github-repos/coq/tzik-top-prover/top-prover-3f92af1e76e437bee6b49152f11a6dfb3b730a61/tasks/001/Problem.v"}
#!/usr/bin/env python import sys, json, codecs, pickle, argparse import numpy as np from sklearn.externals import joblib from sklearn.preprocessing import LabelEncoder from hmmlearn import hmm from nltk import FreqDist def warn(msg): print(msg, file=sys.stderr) np.random.seed(seed=None) args = argparse.Argument...
{"hexsha": "73b5a987dffe4c43ec9882afccf0a25d38d8b13a", "size": 2534, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "nicoleneo/codehub-text-gen", "max_stars_repo_head_hexsha": "69e3a9184c021358c42626adada0c02c6d45205d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import numpy as np import numpy.testing as npt from ..weno5js import WENO5JS class TestWENO5Interpolation: def test__sine_function__should_give_approximation_of_derivative(self): x, dx = np.linspace(0, 2*np.pi, num=100, retstep=True) w = WENO5JS(1e-6, len(x)) y = np.sin(x) desired...
{"hexsha": "f09d3732874037d4ab3b3b6c3853b1ea4ffbf39f", "size": 1606, "ext": "py", "lang": "Python", "max_stars_repo_path": "saf/nonlinear/tests/test_weno5js.py", "max_stars_repo_name": "dmitry-kabanov/fickettmodel", "max_stars_repo_head_hexsha": "255b1e9cae1cfb7a6b914ad61a17288d52215cc4", "max_stars_repo_licenses": ["M...
# Copyright 2021 The TensorFlow 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 or agreed to ...
{"hexsha": "a8dc4e45f5a9b598202b39d3ef9f62a25b67e7e6", "size": 6438, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_similarity/visualization/projector.py", "max_stars_repo_name": "Agrover112/similarity", "max_stars_repo_head_hexsha": "e4608675cc3e1713a31726b8df1f9ea9b64e91ca", "max_stars_repo_license...
c******************************************************************** c******************************************************************** *** the smoothing is controlled by the parameter hasmooth in the *** following manner. *** hasmooth = 0 - no smoothing *** 1 - smoothing of zi-1,zi and zi+1 bins if z>.3...
{"hexsha": "94ebfdeea6aeb81db4d424a955a7ba373a547543", "size": 3479, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/dmfit/dmfit_comm.f", "max_stars_repo_name": "fermi-lat/Likelihood", "max_stars_repo_head_hexsha": "78f6bd72449896e0699ffd832826f1b0dfffa3cc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
""" Utility functions and classes for 3D hydrostatic ocean model """ from __future__ import absolute_import from .firedrake import * import os import numpy as np import sys from .physical_constants import physical_constants from pyop2.profiling import timed_region, timed_function, timed_stage # NOQA from mpi4py import...
{"hexsha": "f096dfc0243057fcbf6a09ecf2836d9d5e5d97b7", "size": 65461, "ext": "py", "lang": "Python", "max_stars_repo_path": "thetis/utility.py", "max_stars_repo_name": "jrper/thetis", "max_stars_repo_head_hexsha": "3c08a2e6947552119232fefd7380fa61b2a9b84b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
\chapter{Related work} \label{chapter: related work} The literature study focuses on the aspects of human-computer interaction (HCI) related to gesture-based input and natural interfaces. This is followed by a closer look on research done that is directly related to using exergames as part of physical therapy. \sect...
{"hexsha": "e299ce91dd10de06d43f5debc017fbcd06a50488", "size": 5280, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Thesis/chapter2.tex", "max_stars_repo_name": "DimitriVargemidis/MLTForExergames", "max_stars_repo_head_hexsha": "52ae2615508bc852a7675234e1f68f80ce4629e8", "max_stars_repo_licenses": ["Apache-2.0"],...
""" Base tools for handling various kinds of data structures, attaching metadata to results, and doing data cleaning """ import numpy as np from pandas import DataFrame, Series, TimeSeries from statsmodels.tools.decorators import (resettable_cache, cache_readonly, cache_writable) import statsmodels.too...
{"hexsha": "43a61f244433de0f177d03de41cd4cb0a1df3312", "size": 9605, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/base/data.py", "max_stars_repo_name": "changhiskhan/statsmodels", "max_stars_repo_head_hexsha": "af26395e8b75b112ae7b3099532aefd8d002b8ca", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import cv2 import os import shutil import numpy as np def crop_img_for_lable2( fn ): img = cv2.imread(fn) img_crop = img[ int(0.35/1.35 * 576): , :, : ] cv2.imwrite( './input/crop_new.jpg', img_crop ) def resize_pano_img_for_training( fn, save_path=None, resize=(1280, 720) ): img = cv2.imread(fn) ...
{"hexsha": "61f1ce772ea61bc64e1c339b90e4ae9a506086e9", "size": 1295, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/labels/label_helper.py", "max_stars_repo_name": "wenke727/RoadNetworkCreator", "max_stars_repo_head_hexsha": "a359d2e5c5f0921b1af514c3a88b5e3a25707407", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import torch.nn as nn import torchvision import torch.backends.cudnn as cudnn import torch.optim import os import sys import argparse import time import dataloader import model import numpy as np from torchvision import transforms from PIL import Image import glob import time import cv2 import argparse pa...
{"hexsha": "ec78752f3a583555de7a30b00384bf3aa93d487f", "size": 1704, "ext": "py", "lang": "Python", "max_stars_repo_path": "senior/Zero-DCE/Zero-DCE_code/lowlight_test.py", "max_stars_repo_name": "LeiGitHub1024/lowlight", "max_stars_repo_head_hexsha": "86649ae4275b8908d39561792a8068d391318f8d", "max_stars_repo_licenses...
// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc // // SPDX-License-Identifier: Apache-2.0 #include "adapter-util/config/DescriptorPath.h" #include <boost/algorithm/string/join.hpp> #include <sstream> namespace adapter { namespace util { bool DescriptorPath::has_exact_parents(const std::initializer_lis...
{"hexsha": "769831434eacae0f053697de91808515f70e4056", "size": 1867, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "adapter-util/src/config/DescriptorPath.cpp", "max_stars_repo_name": "openenergysolutions/openfmb.adapters", "max_stars_repo_head_hexsha": "3c95b1c460a8967190bdd9ae16677a4e2a5d9861", "max_stars_repo_...
#ifndef BOOSTBINPOINTREADER_H #define BOOSTBINPOINTREADER_H #include <string> #include <iostream> #include <vector> #include "AABB.h" #include "Point.h" #include "PointReader.h" #include "PointAttributes.hpp" #include <memory> #include <fstream> #include <boost/serialization/serialization.hpp> #include <boost/arch...
{"hexsha": "0ffe0d8fd23f713541e3d5b04f34232ddde2de45", "size": 2236, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "PotreeConverter/include/BoostBINPointReader.hpp", "max_stars_repo_name": "NextDroid/PotreeConverter", "max_stars_repo_head_hexsha": "f3e30e57525b14cdeef90793e5d04296b936bd78", "max_stars_repo_licens...
using PyPlot, PyCall, IJulia """ t = delaunay(p) Delaunay triangulation `t` of N x 2 node array `p`. """ function delaunay(p) tri = pyimport("matplotlib.tri") t = tri[:Triangulation](p[:,1], p[:,2]) return Int64.(t[:triangles] .+ 1) end """ edges, boundary_indices = all_edges(t) Find all unique ...
{"hexsha": "4b0cfe8499c55c3472fc4933982aff348e66a7de", "size": 5236, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "fempoi.jl", "max_stars_repo_name": "edhschen/228bCode", "max_stars_repo_head_hexsha": "70cfb5547a6ec93244c7d2a303ab272b0a44a016", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ import scipy.ndimage import numpy as np import typing as ty import matplotlib.pyplot as plt import matplotlib as mpl def compute_spike_rates(spike_data: np.ndarray, window_size: ty...
{"hexsha": "ecb352279d5fa9b1a8f26d763e6a69718d287fd8", "size": 4258, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lava/lib/dnf/utils/plotting.py", "max_stars_repo_name": "srrisbud/lava-dnf", "max_stars_repo_head_hexsha": "6cdd59e8d8de2f5625524576b76940a1de51712f", "max_stars_repo_licenses": ["BSD-3-Clause...
"""Segmented models of the lattice.""" import math as _math import numpy as _np import pyaccel as _pyaccel def dipole_bc(m_accep_fam_name, simplified=False): """Segmented BC dipole model.""" segtypes = { 'BC': ('BC', _pyaccel.elements.rbend), 'BC_EDGE': ('BC_EDGE', _pyaccel.elements.marker), ...
{"hexsha": "3fc06d128c616e8570c5d1f60dfec34c68b3462a", "size": 21555, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymodels/SI_V24_04/segmented_models.py", "max_stars_repo_name": "lnls-fac/pymodels", "max_stars_repo_head_hexsha": "138b6787a7453eb8992291b57853cac3ea547848", "max_stars_repo_licenses": ["MIT"], ...
from scipy.stats import logistic from sklearn.neighbors import NearestNeighbors import numpy as np import os import math import time def gen_inlayer(ni, nh): """Returns a matrix niXnh that represents the mapping from ni to nh, obtained via matrix multiplication via an input H = X*W Nxnh = Nxni ...
{"hexsha": "6d1bc42392bd437fbb18a6b44dcf7e12e3dcc32f", "size": 10128, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "AIReproducibility2018/SemiSupELM", "max_stars_repo_head_hexsha": "a1076e040a02919939bb9aaa998037dac72dd9cb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
[STATEMENT] lemma disjnt_Diff1: "X \<subseteq> Y' \<Longrightarrow> disjnt (X - Y) (X' - Y')" [PROOF STATE] proof (prove) goal (1 subgoal): 1. X \<subseteq> Y' \<Longrightarrow> disjnt (X - Y) (X' - Y') [PROOF STEP] by (auto simp: disjnt_def)
{"llama_tokens": 105, "file": null, "length": 1}
#!/usr/bin/env python import numpy as np import cv2 import os import argparse import yaml import pickle from glob import glob if __name__ == '__main__': parser = argparse.ArgumentParser(description='Calibrate camera using a video of a chessboard or a sequence of images.') parser.add_argument('input', help='inp...
{"hexsha": "9c7b7326f23dbd33f49655d74177464e8c3076cb", "size": 3818, "ext": "py", "lang": "Python", "max_stars_repo_path": "calibrate.py", "max_stars_repo_name": "AutoSense/video2calibration", "max_stars_repo_head_hexsha": "9593bb276fca4b67d5a92bfc9c9a08b84624260f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL View: Standard Colors" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0 ...
{"hexsha": "878f66f7dd2f01c9b0190cee6b4be6c56f00e1fa", "size": 1178, "ext": "r", "lang": "R", "max_stars_repo_path": "src/mezz/mezz-colors.r", "max_stars_repo_name": "BrianHawley/rebol", "max_stars_repo_head_hexsha": "25033f897b2bd466068d7663563cd3ff64740b94", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
function sim = gaussianKernel(x1, x2, sigma) %RBFKERNEL returns a radial basis function kernel between x1 and x2 % sim = gaussianKernel(x1, x2) returns a gaussian kernel between x1 and x2 % and returns the value in sim % Ensure that x1 and x2 are column vectors x1 = x1(:); x2 = x2(:); % You need to return the fol...
{"author": "AvaisP", "repo": "machine-learning-programming-assignments-coursera-andrew-ng", "sha": "45268fc67ee60f65c2e07dbc7a2ef7c45f0d4ecf", "save_path": "github-repos/MATLAB/AvaisP-machine-learning-programming-assignments-coursera-andrew-ng", "path": "github-repos/MATLAB/AvaisP-machine-learning-programming-assignmen...
Require Export MinBFTass_tknows. Require Export MinBFTass_knew. Require Export MinBFTass_diss. Require Export ComponentAxiom. Section MinBFTass_tlearn. Local Open Scope eo. Local Open Scope proc. Context { dtc : DTimeContext }. Context { minbft_context : MinBFT_context }. ...
{"author": "veri-fit", "repo": "Asphalion", "sha": "fbf9c82e75dc7b5c98774e4ab07c642eb3856105", "save_path": "github-repos/coq/veri-fit-Asphalion", "path": "github-repos/coq/veri-fit-Asphalion/Asphalion-fbf9c82e75dc7b5c98774e4ab07c642eb3856105/MinBFT/MinBFTass_tlearn.v"}
\chapter{Distributed Cooperation Examples Messages} \begin{fullwidth} %\begin{multicols*}{1} \begin{description} \item[\hypertarget{msg:01.AirVehicleConfiguration.V1000.xml}{01.AirVehicleConfiguration.V1000.xml}] \hfill \ \VerbatimInput{\MessagesPath//01.AirVehicleConfiguration.V1000.xml} \item[\hypertarg...
{"hexsha": "1a654cb189e42a1ed90b52f73adb91ee3edda15a", "size": 2932, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/reference/UserManual/Examples/doc_DistributedCooperation/DistributedCooperation_Messages.tex", "max_stars_repo_name": "loonwerks/case-ta6-experimental-platform-OpenUxAS", "max_stars_repo_head_he...
[STATEMENT] lemma bnds_powr: assumes lu: "Some (l, u) = bnds_powr prec l1 u1 l2 u2" assumes x: "x \<in> {real_of_float l1..real_of_float u1}" assumes y: "y \<in> {real_of_float l2..real_of_float u2}" shows "x powr y \<in> {real_of_float l..real_of_float u}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x ...
{"llama_tokens": 12315, "file": null, "length": 84}
import tensorflow as tf import pandas as pd import numpy as np import os from tqdm import tqdm # import tensorflow_addons as tfa import matplotlib.pyplot as plt from sklearn.metrics import roc_auc_score from tensorflow.keras.callbacks import Callback, ReduceLROnPlateau from read_tfrecord import Extract_TFrecord from co...
{"hexsha": "b93e6ff03fe0efe1829055088827985cebfc6fe0", "size": 5968, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "KookyGhost/PERCH_CXR", "max_stars_repo_head_hexsha": "dff290d8e384ea7c57f8980bc83f81c34752e5c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
''' Main Author: Will LeVine Corresponding Email: levinewill@icloud.com ''' import numpy as np from .progressive_learner import ProgressiveLearner from .transformers import NeuralClassificationTransformer from .voters import KNNClassificationVoter from .deciders import SimpleAverage from sklearn.utils import check_X...
{"hexsha": "df0839f03f95981d88c761869de207ad33aa8221", "size": 2457, "ext": "py", "lang": "Python", "max_stars_repo_path": "proglearn/network.py", "max_stars_repo_name": "tliu68/progressive-learning", "max_stars_repo_head_hexsha": "66df2ec8671a3ba737e1cb7532c4f6e59fc5b104", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import subprocess import csv import numpy as np import sys import math import os import time import random #returns the result sampled from a gaussian distribution at point x with the average mu and standard deviation of sig def gaussian(x, mu, sig): return np.exp(-np.power(x - mu, 2.) / (2 * np.power(sig, 2.))) #T...
{"hexsha": "090268fb15ca155504f1c5488f40f594de55b1da", "size": 3357, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulation files/0-simulation_many_gaussians.py", "max_stars_repo_name": "hamedir2/BayesianOptimization", "max_stars_repo_head_hexsha": "5188d1dc401a567a86238cfc4acdaf3d24b8418f", "max_stars_repo_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 26 15:46:31 2019 @author: david """ import numpy as np import matplotlib.pyplot as plt from physique import exponentielle_decroissante, ajustement_exponentielle_decroissante x=np.array([0,1,2,3,4,5,6,7,8,9]) y=np.array([4.98, 3.59, 2.57, 1.83, 1.32...
{"hexsha": "25a1fe6c7e8de96af7280bf3e7204cdd1fb628ac", "size": 603, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/modelisation/test_modelisation_exp2_decroissante.py", "max_stars_repo_name": "david-therincourt/physique", "max_stars_repo_head_hexsha": "add85faef564359252da93dca9b7dbb35bd6b4ab", "max_stars...
[STATEMENT] lemma finite_mid_sums: "finite (mid_sums xs)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite (mid_sums xs) [PROOF STEP] by (simp add: mid_sums_def finite_mids)
{"llama_tokens": 79, "file": "Maximum_Segment_Sum_Maximum_Segment_Sum", "length": 1}
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import os import numpy as np from .lib import utils from .lib.callbacks import select_callbacks from logging import DEBUG from logging import getLogger logger = getLogger('impulso') logger.setLevel(DEBUG) # Set HOME directory. IMPULSO_HOME = os.environ['IMPULSO_HOME'...
{"hexsha": "4f3c3250f51400c433fba0d910ea3d14da074932", "size": 2802, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainer.py", "max_stars_repo_name": "pystokes/telop_detection", "max_stars_repo_head_hexsha": "a94ad87db57a0944c5060162a51f47ded784d23e", "max_stars_repo_licenses": ["Xnet", "X11"], "max_stars...
[STATEMENT] lemma circ_decompose_9: "(x\<^sup>\<circ> * y\<^sup>\<circ>)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ> * (x\<^sup>\<circ> * y\<^sup>\<circ>)\<^sup>\<circ>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x\<^sup>\<circ> * y\<^sup>\<circ>)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ> * (x\<...
{"llama_tokens": 176, "file": "Stone_Kleene_Relation_Algebras_Iterings", "length": 1}
from blueice.test_helpers import * from blueice.likelihood import UnbinnedLogLikelihood, LogLikelihoodReParam import numpy as np from scipy import stats from copy import deepcopy def test_likelihood_value(): """Just a sanity check to show we get the right likelihood values""" config = test_conf_reparam(events...
{"hexsha": "38a39560388461a85e57ba6688413cc96ffb61aa", "size": 3261, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_likelihood_reparam.py", "max_stars_repo_name": "dvelasc5/blueice", "max_stars_repo_head_hexsha": "2ab0d0f0fc9310b5faeccb7f863c3ea9d03dc7f7", "max_stars_repo_licenses": ["BSD-3-Clause"],...
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, David Kurniadi Angdinata ! This file was ported from Lean 3 source module algebraic_geometry.elliptic_curve.weierstrass ! leanprover-community/mathlib commit 03994e05d8b...
{"author": "leanprover-community", "repo": "mathlib3port", "sha": "62505aa236c58c8559783b16d33e30df3daa54f4", "save_path": "github-repos/lean/leanprover-community-mathlib3port", "path": "github-repos/lean/leanprover-community-mathlib3port/mathlib3port-62505aa236c58c8559783b16d33e30df3daa54f4/Mathbin/AlgebraicGeometry/E...
#!/usr/bin/env python3 # Copyright 2018 Ashish Arora # Copyright 2018 Chun-Chieh Chang # Apache 2.0 # minimum bounding box script is originally from #https://github.com/BebeSparkelSparkel/MinimumBoundingBox # dilate and erode script is inspired by # https://stackoverflow.com/a/3897471 """ It is a collection of ...
{"hexsha": "f330ab631fddb0a34d865c15b74f2cf8efa02490", "size": 14091, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/waldo/mar_utils.py", "max_stars_repo_name": "huangruizhe/waldo_old", "max_stars_repo_head_hexsha": "75ead75c3320643888141573f191f5190f9aa203", "max_stars_repo_licenses": ["Apache-2.0"], "...
import json from os import path from scipy.sparse import lil_matrix, csr_matrix, csc_matrix import numpy as np from dataset_checks import check_dataset def get_filepath(base_path, name, ds_index, ds_type_string): fname = '{:03}_{}.{}.csv'.format(ds_index, name, ds_type_string) return path.join(base_path, fnam...
{"hexsha": "c266fcc83c3bb0cc5474076a107cedf4788dad49", "size": 6782, "ext": "py", "lang": "Python", "max_stars_repo_path": "algo/dataset.py", "max_stars_repo_name": "xann16/merw-coauth-link-prediction", "max_stars_repo_head_hexsha": "fa941d441cfd528bdd9661028513f05f2ce29048", "max_stars_repo_licenses": ["MIT"], "max_st...
"""A simple inspector overlay for plots This module provides the SimpleInspectorOverlay for displaying information gathered from an inspector tool in a TextGrid. By default it is configured to work with a SimpleInspectorTool. The module also provides some helper factory functions for creating text formatters ...
{"hexsha": "1cb5e114b40d5c870b4de4e3a788f07b240d9b00", "size": 6305, "ext": "py", "lang": "Python", "max_stars_repo_path": "chaco/overlays/simple_inspector_overlay.py", "max_stars_repo_name": "janvonrickenbach/Chaco_wxPhoenix_py3", "max_stars_repo_head_hexsha": "21a10cfd81100f28e3fbc273357ac45642519f33", "max_stars_rep...