text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
from matplotlib import pyplot as plt import csv import os import h5py import numpy as np from skimage.io import imread from skimage.transform import resize import pandas as pd import torch from torch import nn, optim from torch.autograd import Variable import torch.nn.functional as F from torchvision.utils import make...
{"hexsha": "52607fd13b05480dd3c56786a6d4558c3629408c", "size": 11033, "ext": "py", "lang": "Python", "max_stars_repo_path": "GTSRB/train_vgg.py", "max_stars_repo_name": "guruprasaad123/all_dl_projects", "max_stars_repo_head_hexsha": "04c869f7f001ef94c467740260663d91a34815e0", "max_stars_repo_licenses": ["Apache-2.0"], ...
from __future__ import absolute_import, division import numpy as np import cv2 from . import Tracker from ..utils import dict2tuple from ..utils.complex import real, conj, fft2, ifft2, complex_add, complex_mul, complex_div from ..descriptors.fhog import fast_hog class TrackerDCF(Tracker): def __init__(self, **...
{"hexsha": "6906cd624af11c9b13b8cc45bb7a2366569e67d3", "size": 5838, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/trackers/dcf.py", "max_stars_repo_name": "BestSonny/open-vot-1", "max_stars_repo_head_hexsha": "3e00fbded601cf8c6a38d6f57d7b5a9df0be394b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import PIL import pathlib import pdf2image #import rename_image #image_size = input("生成画像のサイズ>") pdf_files = pathlib.Path('in_pdf').glob('*.pdf') img_dir = pathlib.Path('out_img') for pdf_file in pdf_files: base = pdf_file.stem print(pdf_file) images = pdf2image.convert_from_path(pdf_f...
{"hexsha": "0558160d27c3a010b1ca35ff822a4b17e610e3ef", "size": 535, "ext": "py", "lang": "Python", "max_stars_repo_path": "make-dataset/pdftojpg.py", "max_stars_repo_name": "jphacks/A_2004", "max_stars_repo_head_hexsha": "185e53a2a74f23f62bf9e9cbc0d4a02ef33f4b5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# # Solve BTPDE # # We start by loading SpinDoctor and a Makie plotting backend. # LSP indexing solution #src # https://github.com/julia-vscode/julia-vscode/issues/800#issuecomment-650085983 #src if isdefined(@__MODULE__, :LanguageServer) ...
{"hexsha": "a3bd1bbca1559c4695e9fe04a7284d1b736521b1", "size": 4168, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/solve_btpde.jl", "max_stars_repo_name": "SpinDoctorMRI/SpinDoctor.jl", "max_stars_repo_head_hexsha": "6f8df53bc5741bd41d7f984e9041671ecd12d413", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- ## Sample file to show the implementation of thickness estimation module ### AUTHOR : VISWAMBHAR REDDY YASA ### MATRICULATION NUMBER : 65074 ### STUDENT PROJECT TUBF: Projekt LaDECO (Machine learning on thermographic videos) import numpy as np print('Project MLaDECO') print('Author: Viswambhar ...
{"hexsha": "d4b05f1d643b60b6f558df95cf24295bf6a3fdac", "size": 2654, "ext": "py", "lang": "Python", "max_stars_repo_path": "thickness_estimation.py", "max_stars_repo_name": "viswambhar-yasa/LaDECO", "max_stars_repo_head_hexsha": "0172270a86c71e8c32913005ec07fd63293af0f7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include <boost/algorithm/string.hpp> #include <raft-kv/raft/raft.h> #include <raft-kv/common/log.h> #include <raft-kv/common/slice.h> #include <raft-kv/raft/util.h> namespace kv { static const std::string kCampaignPreElection = "CampaignPreElection"; static const std::string kCampaignElection = "CampaignElection"; s...
{"hexsha": "56dab223ffb1494840a672aef41ec292f0695625", "size": 51271, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "raft-kv/raft/raft.cpp", "max_stars_repo_name": "jinyyu/kvd", "max_stars_repo_head_hexsha": "f3a2f7944b037ee59f26e7e8bf69024686023fd0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2.0, "m...
import math, sys, datetime import logging import numpy as np from tqdm.auto import tqdm import torch import torch.optim as optim from torch.optim.lr_scheduler import LambdaLR from torch.utils.data.dataloader import DataLoader logger = logging.getLogger(__name__) # print('logging to wandb... (comment it if you don\'t...
{"hexsha": "12fc4aa1f4c4214e30d2facecb3c3470f8fe8484", "size": 6217, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainer.py", "max_stars_repo_name": "ofooo/AI-Writer", "max_stars_repo_head_hexsha": "1ba84894c15c9e5605d3c6cd7521d5c6dab6eb6d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
###PROCESS LOCALLY DOWNLOADED FILES ###FOR JAXA EORC GSMAP-RT PRODUCT ############################## import sys # print sys.path print 'starting' ##IMPORT MODULES import datetime as dt import pytz import urllib import numpy as np import numpy.ma as ma import gzip import os ############################## ##SET DIRECTOR...
{"hexsha": "0ccd8a7717d2a502927d78495c1a0b4189721072", "size": 2596, "ext": "py", "lang": "Python", "max_stars_repo_path": "get_gsmap_backfill.py", "max_stars_repo_name": "dpbroman/satrain", "max_stars_repo_head_hexsha": "a71d5829be6e5c08f6ae29b773b96ad724301515", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# test_hscimgloader.py # ALS 2017/05/02 """ to be used with pytest test sets for hscimgloader """ import numpy as np import astropy.units as u import shutil import os import pytest from astropy.io import fits import filecmp import glob from ..hscimgloader import hscimgLoader ra = 140.099341430207 dec = 0.580162492...
{"hexsha": "31e50333213f4e704d3bc3362b7a449a7f71ecc7", "size": 1227, "ext": "py", "lang": "Python", "max_stars_repo_path": "bubbleimg/imgdownload/hsc/test/test_hscimgloader_plotcolorimg.py", "max_stars_repo_name": "aileisun/bubblepy", "max_stars_repo_head_hexsha": "054e7a3993659e7002f243c75253c2cb71d4fa73", "max_stars_...
subroutine tprnc(abeta,alamnc,incpr,ipbtmx,jpfcmx,natmax, $ ncvnc,nerr,nncpr,noutpt,npx2mx,npx2t,nttyo,nwarn,pcvnc, $ qpdnc,uaqsp,upair) c c Test and process the nc (neutral, cation) pair Pitzer data read c from the DATA0 file. Find and flag errors, such as duplication of c data (e.g., two d...
{"hexsha": "166cb1020cbe41a08467a0a2762c554bbed7b7c0", "size": 5867, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/eqpt/src/tprnc.f", "max_stars_repo_name": "39alpha/eq3_6", "max_stars_repo_head_hexsha": "4ff7eec3d34634f1470ae5f67d8e294694216b6e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
import ast import os import re from glob import glob import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from loren_frank_data_processing import make_tetrode_dataframe from src.figure_utilities import PAGE_HEIGHT, TWO_COLUMN, save_figure from src.parameters import (_BRAIN_AREAS...
{"hexsha": "db413361d08eda3fb2a7c5d28de2fafaa7184479", "size": 7715, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/figure5.py", "max_stars_repo_name": "Eden-Kramer-Lab/replay_trajectory_paper", "max_stars_repo_head_hexsha": "f2d2b3cc55968fe7d94d3109621b2772cdbb2c0a", "max_stars_repo_licenses": ["MIT"], "ma...
/- Copyright (c) 2021 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying ! This file was ported from Lean 3 source module probability.density ! leanprover-community/mathlib commit 17ef379e997badd73e5eabb4d38f11919ab3c4b3 ! Please do not edit these...
{"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/Probability/Density...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.ticker import MaxNLocator import pickle import math import os, sys from robolearn.old_utils.plot_utils import plot_sample_list, plot_sample_list_distribution, lqr_forward, plot_3d_gaussian from robolearn.old_algos...
{"hexsha": "9e2a3bbd66c145fd57c5b57160ea3751e2fe5664", "size": 7708, "ext": "py", "lang": "Python", "max_stars_repo_path": "scenarios/tests/load_plot_good_bad_errors.py", "max_stars_repo_name": "domingoesteban/robolearn", "max_stars_repo_head_hexsha": "0d20125425c352b80ef2eeed1c0b11ab6497b11a", "max_stars_repo_licenses...
[STATEMENT] lemma MAC_synth_helper: "\<lbrakk>hf_valid ainfo uinfo m z; no_oracle ainfo uinfo; HVF m = Mac[k_i] \<langle>ainfo, Num uinfo, \<sigma>\<rangle>; \<sigma> = Mac[Key (macK asid)] j; \<sigma> \<in> ik \<or> HVF m \<in> ik\<rbrakk> \<Longrightarrow> \<exists>hfs. m \<in> set hfs \<and> (\<exists>uinfo...
{"llama_tokens": 14121, "file": "IsaNet_instances_EPIC_L2_SA", "length": 22}
import pymc3 as pm import exoplanet as xo import os import model_apf as m # with m.model: # map_sol = xo.optimize(vars=[m.logKAa, m.logKAb, m.P, m.t_periastron, m.omega]) # map_sol1 = xo.optimize(start=map_sol) # print(map_sol1) with m.model: trace = pm.sample( tune=2500, draws=3000, ...
{"hexsha": "f4c19319db235466f1a23da1e0ee45e57c9e3196", "size": 771, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/close/rv/sample.py", "max_stars_repo_name": "iancze/TWA-3-orbit", "max_stars_repo_head_hexsha": "e852f69b298d315aacc5801dacb42346e3a281c1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import math from pyradioconfig.parts.panther.calculators.calc_agc import CALC_AGC_panther from py_2_and_3_compatibility import * from scipy import interpolate #This file contains calculations related to the configuring the AGC class CALC_AGC_ocelot(CALC_AGC_panther): def calc_agc_misc(self, model): self....
{"hexsha": "ce5a2c6beb9f2426d591cca98e51a3788fb8d67a", "size": 32819, "ext": "py", "lang": "Python", "max_stars_repo_path": "platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/calculators/calc_agc.py", "max_stars_repo_name": "PascalGuenther/gecko_sdk", "max_stars_repo_head_hexsha": "2e82050dc8823c9fe...
from pygenesys.data.library import nrel_electric_costs import pandas as pd import numpy as np renewable_techs = ['LandbasedWind', 'OffshoreWind', 'UtilityPV', 'ResPV', 'CommPV', 'Geothermal', 'Hydropower'...
{"hexsha": "0f33a7de6a7cc498568985862f8ccd7a8e1b22f7", "size": 3629, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygenesys/data/nrel_data.py", "max_stars_repo_name": "arfc/pygenesys", "max_stars_repo_head_hexsha": "2ac0c1fbe7c2dffd0135cf8c52d2c8b31cc31ab4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Interpolate given variable to tropopause height. ############################################################################### testkw/diag_tropopause.py Author: Katja Weigel (IUP, Uni Bremen, Germany) ESA-CMUG project ################################################...
{"hexsha": "0401bb45af5b89fab82e9b57cff33c3b6e58d081", "size": 15496, "ext": "py", "lang": "Python", "max_stars_repo_path": "esmvaltool/diag_scripts/cmug_h2o/diag_tropopause_zonalmean.py", "max_stars_repo_name": "cffbots/ESMValTool", "max_stars_repo_head_hexsha": "a9b6592a02f2085634a214ff5f36a736fa18ff47", "max_stars_r...
import numpy as np from typing import List, Tuple, Any from sklearn.metrics import accuracy_score def ChooseBestModel(models_: List[Any], train_data: Tuple[np.ndarray], test_data: Tuple[np.ndarray]): """ Takes list of potential models and returns the most accurate m...
{"hexsha": "ad63bef020d84ca97f189baee456172ec187020e", "size": 1269, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/choose_model.py", "max_stars_repo_name": "eightlay/ReviewAnalysis", "max_stars_repo_head_hexsha": "d66f5eef1c24f97299cc1a2b33e0da68a6a2d44d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from collections import defaultdict from pathlib import Path from typing import Dict, List import numpy as np import orjson import typer from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer from geneeval.common.data_utils import load_benchmark, load_features from geneeval.common.utils import BENCHMAR...
{"hexsha": "ad47b9d42058612953c2bc21778718cfce94b9b6", "size": 4766, "ext": "py", "lang": "Python", "max_stars_repo_path": "geneeval/main.py", "max_stars_repo_name": "BaderLab/GeneEval", "max_stars_repo_head_hexsha": "ad26540d999e7f0562ad1d67d574e08edcadae57", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import pathlib from collections import deque import gym import numpy as np from mani_skill_learn.env import get_env_info from mani_skill_learn.env.observation_process import process_mani_skill_base from mani_skill_learn.methods.builder import build_brl from mani_skill_learn.utils.data import to_np, unsqueeze from man...
{"hexsha": "a21e8c4965d4be4b202ec28d42af1be78d00c829", "size": 18715, "ext": "py", "lang": "Python", "max_stars_repo_path": "user_solution.py", "max_stars_repo_name": "Zed-Wu/ManiSkill-Learn", "max_stars_repo_head_hexsha": "8056fe327752cd0863f8730672fe62bd85a0ec12", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
from collections import ChainMap from itertools import chain from functools import reduce from typing import ( Dict, Tuple, Optional, NamedTuple, Iterator, List, Union ) from functools import partial import numpy as np from autofit.graphical.factor_graphs import \ Factor, AbstractNode, FactorGraph, FactorValu...
{"hexsha": "bed123e60eca4b8bdefeeff8e35636668e5fe6dc", "size": 15614, "ext": "py", "lang": "Python", "max_stars_repo_path": "autofit/graphical/mean_field.py", "max_stars_repo_name": "arfon/PyAutoFit", "max_stars_repo_head_hexsha": "5926b13eefd97e089ee468cbec33452766edbd22", "max_stars_repo_licenses": ["MIT"], "max_star...
#ifndef BID_DROP_FRONT_HPP_ #define BID_DROP_FRONT_HPP_ #include <bid/range/traits/drop_front_intrinsically.hpp> #include <bid/range/traits/pop_front.hpp> #include <bid/functor.hpp> #include <boost/optional.hpp> namespace bid { using boost::none_t; template<class Range> using prefered_drop_front_method = std::con...
{"hexsha": "421df356fa1e19bcb7d0cdadf91d62f1b91b659b", "size": 3019, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/bid/range/traits/drop_front.hpp", "max_stars_repo_name": "mbid/subsetunion-problem", "max_stars_repo_head_hexsha": "b161ed832576acce23e8c44f08ec2c28a8f1b98d", "max_stars_repo_licenses": ["MI...
import copy import numpy as np from ext import get_ext_list def b_mul(b, exp_list, init_ext_list): sum_add_v_all = 0.0 ext_list = get_ext_list(init_ext_list) for curr_exp in exp_list: sum_add_v = curr_exp[-1] for n_curr in range(len(ext_list)): sum_add_v *= curr_exp[...
{"hexsha": "184440e4df06c0cc05c995438302f1119776db97", "size": 2386, "ext": "py", "lang": "Python", "max_stars_repo_path": "approximation.py", "max_stars_repo_name": "DmitriyKhudiakov/MSE_approximation", "max_stars_repo_head_hexsha": "6d25711c14a27301335fe211bff9305ea2ad88d8", "max_stars_repo_licenses": ["MIT"], "max_s...
from keras.layers import Input, Conv2D, MaxPooling2D, concatenate, UpSampling2D from keras.models import Model from keras.optimizers import Adam import keras from random import shuffle, randint import numpy as np import os import tensorflow as tf import glob from keras import backend as K import matplotlib.pyplot as p...
{"hexsha": "bada2f9de03e569f9917ece686b5752be73a6aac", "size": 5927, "ext": "py", "lang": "Python", "max_stars_repo_path": "unet/unet_cell_contour.py", "max_stars_repo_name": "evansgroup/JournalOfBiomedicalOptics", "max_stars_repo_head_hexsha": "72fc3ef7551a3b38c49e4818f4c4b285972d627a", "max_stars_repo_licenses": ["MI...
#include <iostream> #include <cmath> #include <Eigen/Core> #include <Eigen/Geometry> #include <sophus/so3.h> #include <sophus/se3.h> int main(int argc, char** argv) { Eigen::Matrix3d R = Eigen::AngleAxisd(M_PI / 2, Eigen::Vector3d(0, 0, 1)).toRotationMatrix(); Sophus::SO3 SO3_R(R); Sophus::SO3 SO3_V(0, 0...
{"hexsha": "e03498eecb6f6bf38d71c3ec89de22f41db3fc45", "size": 1801, "ext": "cc", "lang": "C++", "max_stars_repo_path": "VisionSLAM14/ch4/sophus_test/use_sophus.cc", "max_stars_repo_name": "DLonng/Go", "max_stars_repo_head_hexsha": "a67ac6d6501f9fadadec6a6cf766d4b4a356d572", "max_stars_repo_licenses": ["MIT"], "max_sta...
import pytest np = pytest.importorskip("numpy") import networkx as nx class TestFloydNumpy: def test_cycle_numpy(self): dist = nx.floyd_warshall_numpy(nx.cycle_graph(7)) assert dist[0, 3] == 3 assert dist[0, 4] == 3 def test_weighted_numpy_three_edges(self): XG3 = nx.Graph(...
{"hexsha": "13df927f4ed9a73aae03447dee879c5aea595934", "size": 2230, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/algorithms/shortest_paths/tests/test_dense_numpy.py", "max_stars_repo_name": "ChristopherReinartz/networkx", "max_stars_repo_head_hexsha": "f542e5fb92d12ec42570d14df867d144a9e8ba4f", "max...
[STATEMENT] lemma mem_set_indexed_members'[simp]: "t \<in> set (indexed_members s) \<longleftrightarrow> snd t |\<in>|\<^bsub>fst t\<^esub> s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (t \<in> set (indexed_members s)) = (snd t |\<in>|\<^bsub>fst t\<^esub> s) [PROOF STEP] by (cases t, simp add: mem_set_indexe...
{"llama_tokens": 147, "file": "Incredible_Proof_Machine_Indexed_FSet", "length": 1}
# -*- coding: utf-8 -*- """ @date: 2020/3/26 下午2:50 @file: create_train_val.py @author: zj @description: 提取分类任务的训练/测试集,分类别保存 """ import cv2 import numpy as np import os import xmltodict #### for train # aeroplane 1171 # bicycle 1064 # bird 1605 # boat 1140 # bottle 1764 # bus 822 # car 3267 # cat 1593 # chair 3152 #...
{"hexsha": "dcefd44b43a1c28dd5076b6a351c59f6996f0599", "size": 4716, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/lib/data/create_train_val.py", "max_stars_repo_name": "zjZSTU/ResNet", "max_stars_repo_head_hexsha": "f185d1d24cdc96a533b2cf2df94f68172d820cb3", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import glob import json import pdb import matplotlib import matplotlib.pyplot as plt import numpy as np import csv with open('k80_only_JCT.json', 'r') as fp: k80_only = json.load(fp) with open('oracle_JCT.json', 'r') as fp: oracle_only = json.load(fp) with open('v100_only_JCT.json', 'r') as fp: v100_only =...
{"hexsha": "df5687ade4b0fc487f99cc5942f285c6ef5dd1e3", "size": 4649, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pwr_run/checkpointing/throughput/comparison/compare_oracle/generate_csv.py", "max_stars_repo_name": "boringlee24/keras_old", "max_stars_repo_head_hexsha": "1e1176c45c4952ba1b9b9e58e9cc4df...
# -*- coding: utf-8 -*- ''' 博客1:python+opencv实现基于傅里叶变换的旋转文本校正 https://blog.csdn.net/qq_36387683/article/details/80530709 博客2:OpenCV—python 图像矫正(基于傅里叶变换—基于透视变换) https://blog.csdn.net/wsp_1138886114/article/details/83374333 傅里叶相关知识: https://blog.csdn.net/on2way/article/details/46981825 频率:对于图像来说就是指图像颜色值的梯度,即灰度级的变化速度 幅...
{"hexsha": "87435a809a803028a7e08b77c0bba2d08370e25b", "size": 3546, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/rotation-opencv.py", "max_stars_repo_name": "vuminhduc97/TableDetect", "max_stars_repo_head_hexsha": "e69d760392973715c29238e56b35737663353aaa", "max_stars_repo_licenses": ["MIT"], "max_star...
function G = get_payoff_G_matrix_from_ygrid_2d( y_1, y_2, S_0s, sigmas, rho, contractParams) %UNTITLED5 Summary of this function goes here % Detailed explanation goes here payoff_type = contractParams.payoff_type; if payoff_type == 1 % G = S_1 payoff = @(y1,y2)S_0s(1)*exp(sigmas(1)*y1); elseif payoff_ty...
{"author": "jkirkby3", "repo": "PROJ_Option_Pricing_Matlab", "sha": "3859a390f395e452ad61440f95a5714dd8fb4d90", "save_path": "github-repos/MATLAB/jkirkby3-PROJ_Option_Pricing_Matlab", "path": "github-repos/MATLAB/jkirkby3-PROJ_Option_Pricing_Matlab/PROJ_Option_Pricing_Matlab-3859a390f395e452ad61440f95a5714dd8fb4d90/CTM...
[STATEMENT] lemma eccentricity_bot_iff: "eccentricity v = 0 \<longleftrightarrow> V = {} \<or> V = {v}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (eccentricity v = 0) = (V = {} \<or> V = {v}) [PROOF STEP] proof (intro iffI) [PROOF STATE] proof (state) goal (2 subgoals): 1. eccentricity v = 0 \<Longrightarrow> ...
{"llama_tokens": 2160, "file": "Undirected_Graph_Theory_Connectivity", "length": 24}
import keras.backend import numpy as np import tensorflow as tf #cpu def bbox_transform_cpu(ex_rois, gt_rois): ex_widths = ex_rois[:, 2] - ex_rois[:, 0] + 1.0 ex_heights = ex_rois[:, 3] - ex_rois[:, 1] + 1.0 ex_ctr_x = ex_rois[:, 0] + 0.5 * ex_widths ex_ctr_y = ex_rois[:, 1] + 0.5 * ex_heights gt_w...
{"hexsha": "292589e7da2f0692876e17876412c140061ee1e2", "size": 1663, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_detection/bbox_encode.py", "max_stars_repo_name": "Walter1218/Self_Driving_Car_ND", "max_stars_repo_head_hexsha": "526a9583a2bc616cb19cdfc7921b5e1c0f9711bd", "max_stars_repo_licenses": ["MIT...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __futu...
{"hexsha": "0014fcf61045d8810b4569012fef57a72361cf09", "size": 5876, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/golden_cut_select.py", "max_stars_repo_name": "vvhj/APRCP-HRNet-Adaptive-Pruning-Rate-Channel-Pruning-for-HRNet", "max_stars_repo_head_hexsha": "bb3d946b9de311f7d1161a0056f39d84db00cb4c", "m...
[STATEMENT] lemma autoref_SUCCEED[autoref_rules]: "(SUCCEED,SUCCEED) \<in> \<langle>R\<rangle>nres_rel" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (SUCCEED, SUCCEED) \<in> \<langle>R\<rangle>nres_rel [PROOF STEP] by (auto simp: nres_rel_def)
{"llama_tokens": 111, "file": "Refine_Monadic_Refine_Basic", "length": 1}
\chapter{Finite differences in 2D}\label{chap: finite diff 2d} In this chapter, we study the numerical solution of the Dirichlet boundary-value problem for the Poisson equation. Let $\Omega$ be a bounded, open subset of~$\mathbb{R}^2$, with a piecewise smooth boundary~$\Gamma=\partial\Omega$. Given suitable functi...
{"hexsha": "6cae0b4327de97518734331ffae6df20709d3763", "size": 53222, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "texsrc/chap5.tex", "max_stars_repo_name": "billmclean/ComputationalMathsNotes", "max_stars_repo_head_hexsha": "9d521fdf7ec407cca287997885d81c3150973415", "max_stars_repo_licenses": ["CC0-1.0"], "ma...
import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt import pandas as pd def f(x, a, b): return a * x + b def error(ydata): v_error = np.empty(len(ydata)) for i in range(len(ydata)): v_error[i] = max(ydata[i] * 0.0010, 0.01) return v_error data = pd.read_...
{"hexsha": "742bfeb505b3e21a87bfcba157efde989c20c36a", "size": 2665, "ext": "py", "lang": "Python", "max_stars_repo_path": "Photoelectric.py", "max_stars_repo_name": "EroSkulled/PHY224-324", "max_stars_repo_head_hexsha": "060a020d75e938d240d926e05e41f8e5c4bf435a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from gym import Wrapper import numpy as np from scipy.stats import norm class InstanceSamplingWrapper(Wrapper): """ Wrapper to sample a new instance at a given time point. Instances can either be sampled using a given method or a distribution infered from a given list of instances. """ def __init...
{"hexsha": "72a66f707d492d2feb7855c24aa50ff32d141338", "size": 3143, "ext": "py", "lang": "Python", "max_stars_repo_path": "dacbench/wrappers/instance_sampling_wrapper.py", "max_stars_repo_name": "ndangtt/LeadingOnesDAC", "max_stars_repo_head_hexsha": "953747d8702f179851d7973c65779a1f830e03a1", "max_stars_repo_licenses...
import numpy as np from prml.nn.array.array import asarray def uniform(min, max, size): return asarray(np.random.uniform(min, max, size))
{"hexsha": "8acce618f203c6f5dab0c00b604da5d9773cb2e7", "size": 145, "ext": "py", "lang": "Python", "max_stars_repo_path": "prml/nn/random/uniform.py", "max_stars_repo_name": "alexandru-dinu/PRML", "max_stars_repo_head_hexsha": "acd823e098df67abe0306a70225e7539f8edda40", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] theorem diff_const_axiom_valid: "valid diff_const_axiom" [PROOF STATE] proof (prove) goal (1 subgoal): 1. valid diff_const_axiom [PROOF STEP] apply(simp only: valid_def diff_const_axiom_def equals_sem) [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>I \<nu>. is_interp I \<longrightarrow> dterm_s...
{"llama_tokens": 316, "file": "Differential_Dynamic_Logic_Differential_Axioms", "length": 4}
[STATEMENT] lemma Abs_ffilter: "(ffilter f s = s') = ({e \<in> (fset s). f e} = (fset s'))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (ffilter f s = s') = ({e \<in> fset s. f e} = fset s') [PROOF STEP] by (simp add: ffilter_def fset_both_sides Abs_fset_inverse Set.filter_def)
{"llama_tokens": 131, "file": "Extended_Finite_State_Machines_FSet_Utils", "length": 1}
from distutils.version import StrictVersion import unittest import numpy as np import sklearn from sklearn import linear_model from sklearn.svm import LinearSVC from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from onnxruntime import InferenceSession, __version__ as ort_version from skl2onnx import ...
{"hexsha": "13a41a786f4835046be2889aea9830e5f735b12d", "size": 33538, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_sklearn_glm_classifier_converter.py", "max_stars_repo_name": "alexivaner/sklearn-onnx", "max_stars_repo_head_hexsha": "535a79481a79964287430bb390912c16911cff01", "max_stars_repo_licens...
[STATEMENT] lemma a_star_ImpLR: "N \<longrightarrow>\<^sub>a* N'\<Longrightarrow> ImpL <a>.M (y).N z \<longrightarrow>\<^sub>a* ImpL <a>.M (y).N' z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. N \<longrightarrow>\<^sub>a* N' \<Longrightarrow> ImpL <a>.M y.N z \<longrightarrow>\<^sub>a* ImpL <a>.M y.N' z [PROO...
{"llama_tokens": 168, "file": null, "length": 1}
"""Beamformer module.""" from typing import List from typing import Optional from typing import Union import numpy as np import torch from torch_complex import functional as FC from torch_complex.tensor import ComplexTensor EPS = torch.finfo(torch.double).eps def complex_norm(c: ComplexTensor) -> torch.Tensor: ...
{"hexsha": "0786eda313194279d5171b7f67e93607b7b8044e", "size": 22822, "ext": "py", "lang": "Python", "max_stars_repo_path": "espnet2/enh/layers/beamformer.py", "max_stars_repo_name": "zh794390558/espnet", "max_stars_repo_head_hexsha": "edb89d8c955e7d88f6e59c8e8e025617feec5af1", "max_stars_repo_licenses": ["Apache-2.0"]...
# scan.py # Author: Thomas MINIER - MIT License 2017-2020 from typing import Dict, Optional from sage.database.db_iterator import DBIterator from sage.query_engine.iterators.preemptable_iterator import PreemptableIterator from sage.query_engine.iterators.utils import selection, vars_positions from sage.query_engine.pr...
{"hexsha": "7f138bf6f278c99fbec66c63a011a6bad1a8acea", "size": 3385, "ext": "py", "lang": "Python", "max_stars_repo_path": "sage/query_engine/iterators/scan.py", "max_stars_repo_name": "JulienDavat/sage-engine", "max_stars_repo_head_hexsha": "87fb7075a07395a527da660d5efc056b0f49758c", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] theorem IK_nf_real_card: shows "card ((\<lambda> f. f RRR) ` {f . IK_nf f}) = 7" [PROOF STATE] proof (prove) goal (1 subgoal): 1. card ((\<lambda>f. f RRR) ` {f. IK_nf f}) = 7 [PROOF STEP] by (simp add: IK_nf_set) ((subst card_insert_disjoint; auto dest!: RRR_test simp: nf_RRR I_K id_def[symmetric] o_ass...
{"llama_tokens": 164, "file": "Kuratowski_Closure_Complement_KuratowskiClosureComplementTheorem", "length": 1}
#include "text/csv/iterator.hpp" #include <string> #include <vector> #include <sstream> #include <iostream> #include <boost/test/unit_test.hpp> using text::csv::row_range; using text::csv::map_row_range; static const std::string NUMERIC_DATA = "1,2,3\n4,5,6"; BOOST_AUTO_TEST_SUITE(csv_ranges) BOOST_AUTO_TEST_CASE...
{"hexsha": "94af67666978d758df7d5ebe104ab706db084b1d", "size": 1477, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_ranges.cpp", "max_stars_repo_name": "ferdymercury/text-csv", "max_stars_repo_head_hexsha": "08e0657137497c740c4022bdfae37c70310a9f8e", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_co...
#!/usr/bin/env python import roslib; roslib.load_manifest('rover_driver_base') import rospy from std_msgs.msg import Float64 from sensor_msgs.msg import JointState from geometry_msgs.msg import Twist,Pose from math import atan2, hypot, pi, cos, sin import tf import message_filters import numpy from numpy.linalg import ...
{"hexsha": "a1d7cec41d705049885f4a5ed84bb96afd71755b", "size": 3990, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rover_driver_base/nodes/rover_command.py", "max_stars_repo_name": "Thanusan19/catkin_ws", "max_stars_repo_head_hexsha": "c8622a48a29b9aabe17d86074c6005c45b2f58ca", "max_stars_repo_licenses": [...
from maindash import server import dash_html_components as html from stream_analysis.motion_detection.model_dash_integration import Detector, gen from flask import Response import os import numpy as np import cv2 @server.route('/video_feed') def video_feed(): # Find paths to model weights, model, and class n...
{"hexsha": "5d2a4eb41bfe16ad03484356b40a01075e1b4fb3", "size": 930, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/frontend/detection_stream.py", "max_stars_repo_name": "MLStruckmann/formula-frankfurt", "max_stars_repo_head_hexsha": "5a09f6ed02805c1dd5cfa42e82f9e396f52f9001", "max_stars_repo_licenses": ["MI...
import math import torch import numpy as np import utils.image_processing as ip import utils.torch_complex as tc import torch.fft as fft def ASM_precal(slm_res, pix_pitch, wavelength, prop_dist, device, linear_conv=True, dtype=torch.float64): input_resolution = slm_res if linear_conv: i...
{"hexsha": "bb47732edacfe83403f5e6a018ce4bf080368a19", "size": 2220, "ext": "py", "lang": "Python", "max_stars_repo_path": "propMethods/asm.py", "max_stars_repo_name": "fy255/perceptual_cgh", "max_stars_repo_head_hexsha": "71a999a8ca8fb355d2f8fb41f97321e48f219324", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python3 # (c) University of the Witwatersand, Johannesburg on behalf of the H3ABioinformatics Network Consortium # 2016-2018 # Licensed under the Creative Commons Attribution 4.0 International Licence. # See the "LICENSE" file for details import sys import pandas as pd import numpy as np EOL=chr(10) ...
{"hexsha": "500d6ad02093dc59a30115a28848cfc2e5fe7682", "size": 1649, "ext": "py", "lang": "Python", "max_stars_repo_path": "assoc/bin/extractPheno.py", "max_stars_repo_name": "lvclark/h3agwas", "max_stars_repo_head_hexsha": "5e42e60123b819d3c331a91b25ee50846e55af3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt import re import nltk import pickle from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from nltk.tokenize import word_tokenize from sklearn.feature_extraction.text import CountVectorizer from sqlalchemy impo...
{"hexsha": "4835435c67c5e815deb6b1e999da1088750d028b", "size": 4354, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/train_classifier.py", "max_stars_repo_name": "tobikasali/Disaster_response_pipleine", "max_stars_repo_head_hexsha": "aee12fc6ca27486490a5d90f7267740e4f7d6f1c", "max_stars_repo_licenses": ["...
def split_space_data( X_normalized, X, Y, file_path, observation_number, test_size ): '''Seperate the data in a stratified way. The function takes in a few different datasets, where the indices of each are aligned to be of the same object. | X_normalized...
{"hexsha": "39f2d00432c79f254443c58516795af776d8b242", "size": 8201, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn-model/space_utils.py", "max_stars_repo_name": "dessa-oss/supernova-classifier", "max_stars_repo_head_hexsha": "f9ac4cbdd7fd4d6294eb215555a1d380cb8dee02", "max_stars_repo_licenses": ["Apache-2....
# -*- coding: utf-8 -*- """Boilerplate: Created on Tue Feb 16 18:54:55 2021 @author: Timothe """ import os,sys,inspect import warnings from datetime import datetime from fileio import ConfigFile from structs import TwoLayerDict import pathes try : import numpy as np except TypeError as e : warnings.warn("n...
{"hexsha": "b76a8d4767b5baa500398d0b06e4bc14686656c4", "size": 13864, "ext": "py", "lang": "Python", "max_stars_repo_path": "workflows.py", "max_stars_repo_name": "ShulzLab/pGenUtils", "max_stars_repo_head_hexsha": "084e83f7c1030553a3c1ba69525de8e52ca9b503", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
program main use iso_c_binding implicit none block use tcl character(:), allocatable, target :: code integer(c_int) rc type(c_ptr) interp interp = tcl_create_interp() code = "puts foo" // achar(0) rc = tcl_eval(interp, c_loc(code)) call tcl_delete_interp(interp) end block e...
{"hexsha": "72fd629ccec8a0c6b3d42c686dfb9df9fc3bf24c", "size": 336, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/main.f90", "max_stars_repo_name": "dram/fortran-tcl", "max_stars_repo_head_hexsha": "c8ed977b565574b722f74531a41ddd38f2538335", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count...
import pandas as pd import numpy as np from sklearn.cluster import DBSCAN import more_itertools as mit import multiprocessing as mp from numba import njit pd.options.mode.chained_assignment = None @njit def _distance_between_two_coordinates(lat1_degrees, lon1_degrees, lat2_degrees, lon2_degrees) -> float: """Dista...
{"hexsha": "feb3a15c5b30ae4754c93b6a9ae897c5f3d63d1c", "size": 7400, "ext": "py", "lang": "Python", "max_stars_repo_path": "mobilipy/segmentation.py", "max_stars_repo_name": "plechoss/mobilipy", "max_stars_repo_head_hexsha": "3bf54fe11defe186228af99d01de82bf11f0b590", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" Unit tests for php_wrappers module. Running tests which are NOT marked as slow (default): python -m pytest test_php_wrappers.py These tests take about 30 seconds to run (on my local machine). Running all tests, including those marked as slow: python -m pytest test_php_wrappers.py --runslow These tests tak...
{"hexsha": "f0b3f9c51b255ecff03da8549040963bd9c40c21", "size": 4808, "ext": "py", "lang": "Python", "max_stars_repo_path": "etta/tests/test_php_wrappers.py", "max_stars_repo_name": "jennywwww/exofop-tess-api", "max_stars_repo_head_hexsha": "fe3673e6cc379bea8a5ea4a053b9548c26d3775f", "max_stars_repo_licenses": ["MIT"], ...
# *-* coding: utf-8 *-* import tensorflow as tf import numpy as np import cv2 import os import re import detect_face default_color = (0, 255, 0) #BGR default_thickness = 2 image_paths = sorted([f for f in os.listdir('.') if re.match(r'.+\.jpg', f)]) with tf.Graph().as_default(): sess = tf.Session() pnet, rn...
{"hexsha": "7e8900e68a96145f7ef369643c1c91de9c262881", "size": 1094, "ext": "py", "lang": "Python", "max_stars_repo_path": "32-detect/mtcnn-camera.py", "max_stars_repo_name": "moh3n9595/class.vision", "max_stars_repo_head_hexsha": "cbcc65fd1f226273d26e44576ca7c3950faea75c", "max_stars_repo_licenses": ["MIT"], "max_star...
import math import librosa import numpy as np import pickle import os LENGTH_CHOSEN = 80000 SCALERS_FOLDER = "speech_emotion_recognition/data_scaler" def read_file(audio_file): """ :param audio_file: a string representing the full-path of the input audio file :type audio_file: string :return: an arr...
{"hexsha": "0ce832362fc34c2febd3e114daed60b36db66ba4", "size": 6290, "ext": "py", "lang": "Python", "max_stars_repo_path": "speech_emotion_recognition/feature_extraction.py", "max_stars_repo_name": "helemanc/ambient-intelligence", "max_stars_repo_head_hexsha": "fe3571ac2d43b91b1331973ed7769372cc544af2", "max_stars_repo...
section\<open>The general Rasiowa-Sikorski lemma\<close> theory Rasiowa_Sikorski imports Forcing_Notions Pointed_DC begin context countable_generic begin lemma RS_relation: assumes "p\<in>P" "n\<in>nat" shows "\<exists>y\<in>P. \<langle>p,y\<rangle> \<in> (\<lambda>m\<in>nat. {\<langle>x,y\<rangle>\<in>P\<times>P...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Forcing/Rasiowa_Sikorski.thy"}
program dc double complex a, b, c, d, e, f, g, h double precision x complex w, z a = (1.0,1.0) b = 1 c = 1.0e0 d = 1.0d0 e = a + b f = COS(e) x = ABS(f) f = DCMPLX(x) h = LOG(g) + SQRT(f) + SIN(e) + EXP(a) print *, h w = (1.0,...
{"hexsha": "e1838badf26ca75e02a087f6827630936e99d51d", "size": 396, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/Flint/dcmplx.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses": ["MIT"], "m...
/* * Copyright (C) 2015 Dato, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distribu...
{"hexsha": "29d03ed95e4ef4c461a0ee8967f430485766c87f", "size": 69640, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "oss_test/sframe/sframe_test.cxx", "max_stars_repo_name": "csgxy123/SFrame-Ex", "max_stars_repo_head_hexsha": "b97cbefdaee9f8842735dbe50a1fa07fa2b460cf", "max_stars_repo_licenses": ["BSD-3-Clause"],...
Dear Princess Celestia: FizzBuzz! I learned modulus with a number using the number x and the number y. Did you know that product is a number? For every number factor from 1 to x: product is now factor times y. If product isn't less than x: Then you get product minus x. That's what I would do! That's what I d...
{"hexsha": "10843f856bba8b5825b82d5db07ce969fc1ad941", "size": 1390, "ext": "fpp", "lang": "FORTRAN", "max_stars_repo_path": "examples/fizzbuzz.fpp", "max_stars_repo_name": "stillinbeta/friendshipismonadic", "max_stars_repo_head_hexsha": "434cee6f1df3bcd87e23cd09022fa5a268d46b15", "max_stars_repo_licenses": ["BSD-3-Cla...
#include "ros/ros.h" #include <lwr_controllers/PoseRPY.h> #include <kdl/tree.hpp> #include <Eigen/Dense> #include <tf/transform_listener.h> #include <tf/transform_datatypes.h> #define PI 3.141592653 ros::Subscriber sub_terminal; ros::Publisher pub_right; ros::Publisher pub_left; Eigen::Matrix<double,3,1> p_global_r...
{"hexsha": "909b0840f0553bc88e0c6ffc1bcddfbda3b705bd", "size": 5662, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lwr_controllers/src/cartesian_command_vito.cpp", "max_stars_repo_name": "wxmerkt/kuka-lwr", "max_stars_repo_head_hexsha": "42841aad08fe771ac4fc8ca451d9c2adc55671a2", "max_stars_repo_licenses": ["Unl...
#!/usr/bin/env python # -*- coding: latin-1 -*- # # Copyright 2016-2021 Blaise Frederick # # 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/LICEN...
{"hexsha": "32fd5ed2644e00fce5fd1d58ef93add579b38ca9", "size": 22153, "ext": "py", "lang": "Python", "max_stars_repo_path": "rapidtide/stats.py", "max_stars_repo_name": "bbfrederick/delaytools", "max_stars_repo_head_hexsha": "190d79ae4c19317dfce38a528e43fd05459f29a5", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
! ----------------------------------------------------------------------------- ! This file was automatically created by SARAH version 4.12.1 ! SARAH References: arXiv:0806.0538, 0909.2863, 1002.0840, 1207.0906, 1309.7223 ! (c) Florian Staub, 2013 ! ---------------------------------------------------------------...
{"hexsha": "73c9a23a1a67c95d584069564d09b9ff2b20076c", "size": 711348, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Externals/SPheno-4.0.3/NMSSM_IS/CouplingsCT_NInvSeesaw.f90", "max_stars_repo_name": "yuanfangtardis/vscode_project", "max_stars_repo_head_hexsha": "2d78a85413cc85789cc4fee8ec991eb2a0563ef8", "...
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "graph/service/GraphService.h" #include <proxygen/lib/utils/CryptUtil.h> #include <boost/filesystem.hpp> #include "clients/storage/StorageClient.h" #include "common/base/Base.h" #include ...
{"hexsha": "9c6e37f12838a6be93ea4c74452a677853e07075", "size": 11015, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/graph/service/GraphService.cpp", "max_stars_repo_name": "sworduo/nebula", "max_stars_repo_head_hexsha": "9d172209cf05b0d4fb433d2fb17f44e301cdf440", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import numpy as np import cv2 from PIL import Image from random import * import matplotlib.pyplot as plt import matplotlib.image as mpimg import math from collections import deque #dna encoding msg_str = raw_input('Enter message: ') key =int(raw_input('Enter shift key: ')) msg=list(msg_str) print msg enc=[] bin1=[] ...
{"hexsha": "f401ff5970137edb0a95677b5593ed046180fa11", "size": 14472, "ext": "py", "lang": "Python", "max_stars_repo_path": "ias new/test.py", "max_stars_repo_name": "vrishabh22/IAS-Phishing-detection", "max_stars_repo_head_hexsha": "0a07f9a3a90c8f4c6c4f3e5abdd14bf354718f08", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- """ Created on July 2017 @author: JulienWuthrich """ import dateutil.parser import datetime import numpy def time2scds(tm): if isinstance(tm, str): tm = dateutil.parser.parse(tm) return tm.hour * 3600 + tm.minute * 60 + tm.second if isinstance(tm, datetime.datetime):...
{"hexsha": "e4879b438d453b4b026146f00c200111693665bc", "size": 1353, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytools/format/time.py", "max_stars_repo_name": "Jwuthri/PythonTools", "max_stars_repo_head_hexsha": "7281fc5e41eb874bc8cb0aae844abe669d00a1a2", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import cv2 class FisheyeToEquirectangular: def __init__(self, n=2048, side=3072, blending=16, aperture=1): self.blending = blending blending_ratio = blending / n x_samples = np.linspace(0-blending_ratio, 1+blending_ratio, n+blending*2) y_samples = np.linspace(-1, ...
{"hexsha": "7bcbd9524251f35e2493c91439752c0395ba1a61", "size": 2063, "ext": "py", "lang": "Python", "max_stars_repo_path": "fisheye.py", "max_stars_repo_name": "kylemcdonald/FisheyeToEquirectangular", "max_stars_repo_head_hexsha": "224d036972f7f4a0b6445311e82498f58660745d", "max_stars_repo_licenses": ["MIT"], "max_star...
function [pitch, roll, yaw] = q2att(qnb) q11 = qnb(1)*qnb(1); q12 = qnb(1)*qnb(2); q13 = qnb(1)*qnb(3); q14 = qnb(1)*qnb(4); q22 = qnb(2)*qnb(2); q23 = qnb(2)*qnb(3); q24 = qnb(2)*qnb(4); q33 = qnb(3)*qnb(3); q34 = qnb(3)*qnb(4); q44 = qnb(4)*qnb(4); C12=2*(q23-q14); C22=q11-q22+q33-q44; C3...
{"author": "yandld", "repo": "nav_matlab", "sha": "da70cb2083de407409ebe1ec1096a308611cf063", "save_path": "github-repos/MATLAB/yandld-nav_matlab", "path": "github-repos/MATLAB/yandld-nav_matlab/nav_matlab-da70cb2083de407409ebe1ec1096a308611cf063/study/eskf156/q2att.m"}
import random import numpy as np import torch class ConcatDataset(torch.utils.data.Dataset): def __init__(self, *datasets, randomize_subset_idx=False): self.datasets = datasets self.cslen = np.concatenate([[0], np.cumsum([len(d) for d in datasets])]) self.subset_idx = [list(range(len(d)))...
{"hexsha": "dd2d3e8e2708c71c11efa8d2ceac7ca4d248d77e", "size": 1079, "ext": "py", "lang": "Python", "max_stars_repo_path": "concatdataset.py", "max_stars_repo_name": "phernst/sparse_dbp", "max_stars_repo_head_hexsha": "e66a5dffc20ecf2c770e336bc450b53d58db5df7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
[STATEMENT] lemma GuardsFlip_sound: assumes valid: "\<forall>n. \<Gamma>,\<Theta>\<Turnstile>n:\<^bsub>/F\<^esub> P c Q,A" assumes validFlip: "\<forall>n. \<Gamma>,\<Theta>\<Turnstile>n:\<^bsub>/-F\<^esub> P c UNIV,UNIV" shows "\<Gamma>,\<Theta>\<Turnstile>n:\<^bsub>/{}\<^esub> P c Q,A" [PROOF STATE] proof (prove...
{"llama_tokens": 5137, "file": "Simpl_HoarePartialProps", "length": 47}
(* * @TAG(OTHER_LGPL) *) (* Author: Norbert Schirmer Maintainer: Norbert Schirmer, norbert.schirmer at web de License: LGPL *) (* Title: Compose.thy Author: Norbert Schirmer, TU Muenchen Copyright (C) 2006-2008 Norbert Schirmer Some rights reserved, TU Muenchen This library is...
{"author": "crizkallah", "repo": "checker-verification", "sha": "cd5101e57ef70dcdd1680db2de2f08521605bd7c", "save_path": "github-repos/isabelle/crizkallah-checker-verification", "path": "github-repos/isabelle/crizkallah-checker-verification/checker-verification-cd5101e57ef70dcdd1680db2de2f08521605bd7c/autocorres-1.0/c-...
#!/usr/bin/env python import argparse import logging import os import re import numpy as np def evaluate(session_directory, num_obj_complete): # Parse data from session (action executed, reward values) transitions_directory = os.path.join(session_directory, 'transitions') executed_action_log = np.loadtx...
{"hexsha": "c089dfebf4085140a155c37f956b8393f2032479", "size": 6938, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "skumra/romannet", "max_stars_repo_head_hexsha": "0af092a1be26ac5f213f1e5c21f81f89699a4c92", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 5,...
import napari import numpy as np from dask import array as da from transitions import Machine from ._logging import log_error from ._logging import logger from ._transitions import transitions from ._viewer_model import ViewerModel from ._viewer_model import ViewerState # XXX tenative implementation : pluginfy later...
{"hexsha": "c6f19b3d21db643ce2c8d5b0a6acc20f4980803a", "size": 5696, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/napari_travali/_viewer.py", "max_stars_repo_name": "yfukai/napariTrackEditor", "max_stars_repo_head_hexsha": "23022fd718bc5adc6e12acf948a091c7c038a465", "max_stars_repo_licenses": ["MIT"], "ma...
function yPred = objFcn(p , tObs, drug) %Copyright (c) 2011, The MathWorks, Inc. L0 = p(1) ; % Drug-independent parameter 1 L1 = p(2) ; % Drug-independent parameter 2 k1 = p(3) ; % Drug-independent parameter 3 k2_A = p(4) ; % Drug dependent parameter (drug A) k2_B = p(5) ; % Drug dependent parameter (drug ...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/30869-fitting-with-matlab-statistics-optimiz...
import os import arrow import glob import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import warnings import torch from torch.nn import Module, Linear, Sequential, ReLU from torch.nn.functional import mse_loss from torch.optim import Adam, SGD from torch.utils.data import Tens...
{"hexsha": "03bba1f0c9f4546e774e14c0ef80f1d13c95a90b", "size": 449, "ext": "py", "lang": "Python", "max_stars_repo_path": "01_AnomalyDetection/scripts/PythonImports.py", "max_stars_repo_name": "yellingmonkees/MetaLearningForAD", "max_stars_repo_head_hexsha": "04579ddf707421a016f5ca3a0a2e4ba80efe2890", "max_stars_repo_l...
#= Copyright 2013 - 2015 Marco Nehmeier (nehmeier@informatik.uni-wuerzburg.de) Copyright 2015 Oliver Heimlich (oheim@posteo.de) Original author: Marco Nehmeier (unit tests in libieeep1788) Converted into portable ITL format by Oliver Heimlich with minor corrections. Licensed under the Apache License, Ve...
{"hexsha": "8d6e1c081be57d6b400af569cae6504bfb5ef92c", "size": 158287, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "output/julia/Base.Test/ValidatedNumerics/libieeep1788_tests_mul_rev.jl", "max_stars_repo_name": "krish8484/ITF1788", "max_stars_repo_head_hexsha": "54dbc581703b5b0d89bb2f3a49bca4299b7d3b56", "max...
import numpy as np def updateState(state, patterns): newState = [None]*len(state) for pos in range(2, len(state) - 2): newState[pos] = patterns[state[pos-2:pos+3]] newState[-2:] = ['.', '.'] newState[:2] = ['.', '.'] newState = ''.join(newState) return newState nPadding = 10000...
{"hexsha": "fb0e4bc0a63e4bdcce57df8f8127ec107ee01971", "size": 978, "ext": "py", "lang": "Python", "max_stars_repo_path": "2018/day12-2.py", "max_stars_repo_name": "alvaropp/AdventOfCode2017", "max_stars_repo_head_hexsha": "2827dcc18ecb9ad59a1a5fe11e469f31bafb74ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
function prepareFWIDataFiles(m,Minv::RegularMesh,mref,boundsHigh,boundsLow, filenamePrefix::String,omega::Array{Float64,1},waveCoef::Array{Complex128,1}, pad::Int64,ABLpad::Int64,jump::Int64,offset::Int64=prod(Minv.n+1),workerList = workers(), maxBatchSize::Int64=48, Ainv::AbstractSolver = getMUMP...
{"hexsha": "a82c7582a7a62e91ef387746c085a23eaa3d53ff", "size": 4750, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/ex2DFWI/prepareFWIDataFiles.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/jInv.jl-3dacf901-f8cd-5544-86ed-7a705f85c244", "max_stars_repo_head_hexsha": "2e7305f231a29bd8e1e803...
[STATEMENT] lemma cf_pos_poly_represents[simp]: "(cf_pos_poly p) represents x \<longleftrightarrow> p represents x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. cf_pos_poly p represents x = p represents x [PROOF STEP] unfolding represents_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (ipoly (cf_pos_poly p)...
{"llama_tokens": 185, "file": "Algebraic_Numbers_Algebraic_Numbers_Prelim", "length": 2}
from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt def posterior(fitresult,plot_likelihood=False): ''' Plot the posterior probablity/likelihood from the given FitResult object. ''' #The fit parameters and the inverse covariance matrix p0 = fitresult...
{"hexsha": "d0f36e7457e7bb19cb217930608a5513ee719330", "size": 2885, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayesfit/plot.py", "max_stars_repo_name": "aripekka/bayesfit", "max_stars_repo_head_hexsha": "e17b46540ae8c8bbaecc90073690a197d77a78bb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from collections import OrderedDict from typing import Callable from typing import Hashable from typing import List from typing import Type import numpy as np from caldera.utils.np import replace_nan_with_inf from caldera.utils.nx.traversal._path_utils import PathSum from caldera.utils.nx.traversal._path_utils import...
{"hexsha": "5e66e49e7ffc2ae246a179a34a555165ee82bfd5", "size": 2560, "ext": "py", "lang": "Python", "max_stars_repo_path": "caldera/utils/nx/traversal/_all_pairs_shortest_path.py", "max_stars_repo_name": "jvrana/caldera", "max_stars_repo_head_hexsha": "a346324e77f20739e00a82f97530dda4906f59dd", "max_stars_repo_licenses...
import numpy as np import cv2,sys,csv,os,threading from PyQt5.QtWidgets import QMessageBox,QAction from keras.models import load_model import qimage2ndarray as q2a from PyQt5 import QtWidgets,QtGui,QtCore,QtCore from PyQt5.QtWidgets import QWidget, QLabel, QApplication,QMainWindow,QMessageBox,QFileDialog,QInputD...
{"hexsha": "18c9f17a944e54d17469e37b66afcd4e3e2d2eaa", "size": 7426, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "kanchansapkota27/Sign-Language-Translator", "max_stars_repo_head_hexsha": "2e63032d6a42042d8caecfc628de5abc647ab234", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python import math import sys import os import random import struct import popen2 import getopt import numpy pi=math.pi e=math.e j=complex(0,1) doreal=0 datatype = os.environ.get('DATATYPE','float') util = '../tools/fft_' + datatype minsnr=90 if datatype == 'double': fmt='d' elif datatype=='int1...
{"hexsha": "e161a42b3067bd33f81964ca4120c851df447067", "size": 3565, "ext": "py", "lang": "Python", "max_stars_repo_path": "KissFFT/kiss_fft130/test/testkiss.py", "max_stars_repo_name": "mpoullet/audio-tools", "max_stars_repo_head_hexsha": "b7cb54ec16f2845830ab6168d8e6992124c98a75", "max_stars_repo_licenses": ["MIT"], ...
FUNCTION TRAPZ2(X,Y,N,X1,X2,IERR) c Finds area below y(x) from x=X1 to x =X2 c X1 and X2 are not necessarily values of x(i) c but must fulfill X1>=x(1) and X2<=x(n) c Array declaration real x(n),y(n) data jerr1,jerr2/2*0/ TRAPZ2=0. ierr=0. ! Check for values outside valid range if (x1 < x(1)) then if (jerr1...
{"hexsha": "37962eba3f3af0876aeea409928ba29420c436e6", "size": 1474, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "bc03/src/trapz2.f", "max_stars_repo_name": "jchavesmontero/galaxpy", "max_stars_repo_head_hexsha": "ef5eaffa8f5ec0418dae44b88cf212ca03814b57", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import numpy as np import sys from detector_hit_conditions import * def get_acceptance_from_four_vectors(ma, ctau, four_vector_list, zmin, zmax, det_rad, Ethr=1.): evt_fraction_detected = [] for pa, pr in four_vector_list: if pa[3] < 0: continue gct = (pa[3]/ma)*ctau np.se...
{"hexsha": "f02d5cc6867ba5d28c985c814a082f978504e26a", "size": 1167, "ext": "py", "lang": "Python", "max_stars_repo_path": "dev/mathematica/get_ldmx_acceptance_to_share/compute_acceptance_LDMX.py", "max_stars_repo_name": "jmlazaro25/vissig", "max_stars_repo_head_hexsha": "370262b0546959bd2936cfd1ffa16de5b85a3dee", "max...
import numpy as np import scipy as sp import properties from ....utils.code_utils import deprecate_class from ....utils import mkvc, sdiag, Zero from ....data import Data from ...base import BaseEMSimulation from .boundary_utils import getxBCyBC_CC from .survey import Survey from .fields import Fields3DCellCentered, F...
{"hexsha": "ac40a782639b1fe138e609a23531840da8ef2ada", "size": 18048, "ext": "py", "lang": "Python", "max_stars_repo_path": "SimPEG/electromagnetics/static/resistivity/simulation.py", "max_stars_repo_name": "jcapriot/simpeg", "max_stars_repo_head_hexsha": "e88e653673c6b818592b6c075f76ee9215fe82b7", "max_stars_repo_lice...
\documentclass[runningheads]{llncs} % \usepackage{graphicx} % Used for displaying a sample figure. If possible, figure files should % be included in EPS format. \graphicspath{ {../plots/} } \usepackage{calc} % state diagrams \usepackage{tikz} \usetikzlibrary{automata, arrows, positioning} \tikzset{ ini...
{"hexsha": "59dfbb7da92600b5604953293ac0065f1c441d9b", "size": 9079, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "bnaic/2-page-summary-bnaic.tex", "max_stars_repo_name": "tinybeachthor/IPD", "max_stars_repo_head_hexsha": "af3dbb21a349c792125a1548d35d2e0fdfb23e60", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import numpy as np from pennpaper import Metric, plot_group xs = np.arange(0.1, 5, step=0.01) uni_noise = lambda x: np.random.uniform(size=x.shape) + x funcs = {} funcs['uniform'] = lambda x: np.random.uniform(size=x.shape) + x funcs['weibull'] = lambda x: np.random.weibull(a=1, size=x.shape) + x funcs['beta'] = la...
{"hexsha": "6fdadbe2d1b788b063b75b85051f531dd1ff4a04", "size": 619, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/plot_randoms.py", "max_stars_repo_name": "ikamensh/pennpaper", "max_stars_repo_head_hexsha": "82c8a7a55a2407ed44d095036ed4ae8f2d004b04", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import random import os import json import mxnet as mx from mxnet import gluon import argparse import logging import time from gluonnlp.utils.misc import logging_config from gluonnlp.models.transformer import TransformerModel, TransformerInference from gluonnlp.data.batchify import Tuple, Pad, Stack ...
{"hexsha": "46487e9442c1092c0e2edb35946a2e4987e4fe2d", "size": 19135, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/machine_translation/evaluate_transformer.py", "max_stars_repo_name": "leezu/gluon-nlp", "max_stars_repo_head_hexsha": "19de74c2b03f22dde8311a0225b4571c2deef0e4", "max_stars_repo_licenses"...
import gensim, time, os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import numpy as np import pandas as pd import gensim import string, nltk from nltk import word_tokenize import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.keras as tfk from tensorflow.keras.preprocessing.text import Tokenizer from ...
{"hexsha": "e366a259aff710107f72b3e90267d0f5014b73c8", "size": 2692, "ext": "py", "lang": "Python", "max_stars_repo_path": "Theory/steps.py", "max_stars_repo_name": "StamatisOrfanos/Fake-News_Detection", "max_stars_repo_head_hexsha": "1a26ff2396fc6083bd27ed276d6b927fb6783850", "max_stars_repo_licenses": ["MIT"], "max_s...
[GOAL] E : Type u_1 X : Type u_2 c : E f : ContDiffBump c ⊢ 1 < f.rOut / f.rIn [PROOFSTEP] rw [one_lt_div f.rIn_pos] [GOAL] E : Type u_1 X : Type u_2 c : E f : ContDiffBump c ⊢ f.rIn < f.rOut [PROOFSTEP] exact f.rIn_lt_rOut [GOAL] E : Type u_1 X : Type u_2 inst✝⁴ : NormedAddCommGroup E inst✝³ : NormedSpace ℝ E inst✝² :...
{"mathlib_filename": "Mathlib.Analysis.Calculus.BumpFunction.Basic", "llama_tokens": 3895}
!subroutine mpas_initialize_vectors(meshPool)!{{{ subroutine mpas_initialize_vectors(nCells, nEdges, maxEdges, R3, & verticesOnEdge, cellsOnEdge, & edgesOnCell, xCell, yCell, zCell, xEdge, yEdge, zEdge, & localVerticalUnitVectors, edgeNormalVectors, cellTangentPlane, & on_a_sphere, is_periodic, x_pe...
{"hexsha": "061aab53461bb69815ea2bb2b62e5847696fc56d", "size": 21694, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mpas_sw_operators.f90", "max_stars_repo_name": "xtian15/MPAS-SW-TL-AD", "max_stars_repo_head_hexsha": "d6ac1597ac4a6c1ee3339e8384dd6bef42eccbfc", "max_stars_repo_licenses": ["MIT"], "max_st...
# OPTIMO_FEAS # # PART OF OPTIMO """ FeasOptiModel( prob, [x0, with_indicator, xp, dp, wp, name] ) represents the following structured, proximal, feasibility problem: ``` minimize Φ(x) + with_indicator ind_g( x ) ``` with respect to `x`, starting from `x0`, where ``` Φ(x) := m( c(x) ...
{"hexsha": "ee0a8593bc69ad24f9ff041cdb18783799704189", "size": 7848, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/optimo_feas.jl", "max_stars_repo_name": "aldma/OptiMo.jl", "max_stars_repo_head_hexsha": "9512545b1e4f867c88438dcc24f1b63f37f3d889", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import numpy as np import pandas as pd from parallelm.components import ConnectableComponent class RandomDataframe(ConnectableComponent): """ Generating a random dataframe. The number of rows and columns is provided as input parameters to the component """ def __init__(self, engine): super(se...
{"hexsha": "76d8fe96125e2baaf71de5153f081c790faa44d2", "size": 723, "ext": "py", "lang": "Python", "max_stars_repo_path": "reflex-algos/components/Python/random-dataframe/random_dataframe.py", "max_stars_repo_name": "lisapm/mlpiper", "max_stars_repo_head_hexsha": "74ad5ae343d364682cc2f8aaa007f2e8a1d84929", "max_stars_r...
%for subplots function p=plots1(x,y,z,img) H1=abs(img); colormap(hot) subplot(x,y,z); image(5*100*H1/max(max(H1)));%4 for B-727r; if z==2 title('ISAR images using Harmonic Wavelets'); end if z==4 ylabel('Range') end if z==8 xlabel('Doppler') end
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/43601-harmonic-wavelet-based-isar-imaging/Co...
from math import pi, log10, ceil from typing import Optional, Dict, Union, Tuple import numpy as np import plotkit.plotkit as pk from sympy import Expr, sympify, Symbol Value = Union[float, int, complex] class FrequencyDomainPlotter: S = Symbol("s") def __init__(self, expr: Expr) -> None: self.expr...
{"hexsha": "e34094896421ee0ed3daff8fd96d02191bd8270c", "size": 3060, "ext": "py", "lang": "Python", "max_stars_repo_path": "symcircuit/plotting.py", "max_stars_repo_name": "martok/py-symcircuit", "max_stars_repo_head_hexsha": "c48b1ad8ae4e496306da0c0a7474b4cd968a629f", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...