text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import math import random from collections.__init__ import namedtuple import itertools import numpy as np import torch from Levenshtein._levenshtein import distance as edit_distance, editops as edit_ops from scipy.stats import rankdata from scipy.special import softmax from cachetools import cached, LRUCache from l...
{"hexsha": "eed6fa3b2673e7e82089c9a48610fb30c8aaa3ab", "size": 14904, "ext": "py", "lang": "Python", "max_stars_repo_path": "lambo/utils.py", "max_stars_repo_name": "samuelstanton/lambo", "max_stars_repo_head_hexsha": "7b67684b884f75f7007501978c5299514d0efb75", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
from PIL import Image import base64 import io import re import numpy as np import cv2 import tensorflow as tf print(tf.__version__) model = tf.keras.models.load_model('modelV3.h5') def predict(image_np): #image = cv2.imread("img.png") #image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) image = cv2.cvtColor(i...
{"hexsha": "082e1a5be80e1e0bc99c677406512103b9d6e5a5", "size": 6737, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/main.py", "max_stars_repo_name": "0b01001101/covid19-classification", "max_stars_repo_head_hexsha": "c06e278b16ec4b27a98c063dee2f991f987124e8", "max_stars_repo_licenses": ["MIT"], "max_sta...
\chapter*{Volume I} \label{chap:volume-1} \addcontentsline{toc}{chapter}{\nameref{chap:volume-1}} \setcounter{chapter}{1} \setcounter{section}{0} \setcounter{footnote}{0} \etocsetnexttocdepth{subparagraph} % local TOC goes down to subparagraphs \vspace{-1cm} % adjust for empty header \localtableofcontents \cleardoublep...
{"hexsha": "4f06c36afeb6a0a486362db112df2dfadb8e2606", "size": 324, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/complete/chapter-1.tex", "max_stars_repo_name": "ascherer/mueller-report", "max_stars_repo_head_hexsha": "3aa16a20104f48623ce8e12c8502ecb1867a40f8", "max_stars_repo_licenses": ["CC-BY-3.0"], "max...
''' Contains auxiliary and utility functions that are shared among different scripts. ''' import numpy as np def read_labels(filename): ''' Reads labels from a file. Labels are supposed to be stored in each line of the file. No further pre-processing will be performed. ''' labels = [] with ...
{"hexsha": "746ab8b02d4c6f085d9db5955ee041b0480b9bba", "size": 1313, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utilities.py", "max_stars_repo_name": "sunsiu/P-WL", "max_stars_repo_head_hexsha": "8671c663889ff76dcc8af775f8654565f63c3e20", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 53, "max_s...
c************************************************************************* c GETACCH_A3_TP.F c************************************************************************* c This subroutine calculates the 3rd term acceleration on the test particles c in the HELIOCENTRIC frame. This term is the direct...
{"hexsha": "c2bf2a430cabc369df1cc7db650fc1c2bfce62b3", "size": 2559, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/swift_j/mvs/getacch/getacch_ah3_tp.f", "max_stars_repo_name": "Simske/exostriker", "max_stars_repo_head_hexsha": "587b0af4c9cadb46637a4ac61a5392a596e966b1", "max_stars_repo_licenses": ["MIT...
""" The tests exercise the casting machinery in a more low-level manner. The reason is mostly to test a new implementation of the casting machinery. Unlike most tests in NumPy, these are closer to unit-tests rather than integration tests. """ import pytest import textwrap import enum import numpy as np ...
{"hexsha": "81b75445d186aee53accb49aa98cf2ff8bc685a1", "size": 12192, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_OCR_JE/venv/Lib/site-packages/numpy/core/tests/test_casting_unittests.py", "max_stars_repo_name": "JE-Chen/je_old_repo", "max_stars_repo_head_hexsha": "a8b2f1ac2eec25758bd15b71c64b59b27e0b...
### Loading libraries library("tree") library("randomForest") library("pander") library("rpart") ### Data Input data <- as.data.frame(read.csv("0806alldata.csv", header = TRUE)) attach(data) group1 <- data[,c("x", "y", "type", "ec", "elv", "ph", "hard", "tds",...
{"hexsha": "97fada7714d69c5a9b336813f8ad69f5a9669b84", "size": 5730, "ext": "r", "lang": "R", "max_stars_repo_path": "Old-projects/Cikapundung/0925-VarClassification.r", "max_stars_repo_name": "dasaptaerwin/vis", "max_stars_repo_head_hexsha": "ad3587d8172473065ad55700803ba13bd7f6caa8", "max_stars_repo_licenses": ["MIT"...
# -*- coding:utf-8 -*- # deep eyes import numpy as np import torch from mmdet.det_core.utils import voc_eval_map def demo_voc2012_map(): # gt_bbox1 = torch.tensor([[10.0, 20, 40, 60], # [50.0, 70, 90, 95]]).reshape(-1, 4) # xyxy # pred_bbox1 = torch.tensor([[11.0, 17, 44, 85, 0.9...
{"hexsha": "9b5809fc15977806d58d7fa86a4eb21887898e2d", "size": 1147, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/mAP_analyze.py", "max_stars_repo_name": "Karybdis/mmdetection-mini", "max_stars_repo_head_hexsha": "cf255db8037cfeecb7927268d018432f5771ab2e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro -/ import group_theory.congruence import linear_algebra.basic /-! # Tensor product of modules over commutative semirings. This file constructs the tensor produc...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/linear_algebra/tensor_product.lean"}
import torch import torch.nn as nn import torch.optim as optim import numpy as np import torchvision import argparse from torchvision import datasets, models, transforms from starlette.applications import Starlette from starlette.responses import HTMLResponse, JSONResponse, FileResponse, StreamingResponse from starlett...
{"hexsha": "2631e8b7c970cb67b2ce8f3a6c565005683cc799", "size": 5247, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/main.py", "max_stars_repo_name": "jesseniagonzalezv/App-Segmentation", "max_stars_repo_head_hexsha": "7faa4bb8801374444ab630501f7ad2e2b503a992", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2017, Toshiba Corporation, # Toshiba Infrastructure Systems & Solutions Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modificatio...
{"hexsha": "216b7fdbe2707886db9e2f8878b48d613a6394e4", "size": 6452, "ext": "py", "lang": "Python", "max_stars_repo_path": "TeamT2_ARC2017_src/t2_robot_vision/src/recognition_program.py", "max_stars_repo_name": "warehouse-picking-automation-challenges/Team_T2", "max_stars_repo_head_hexsha": "7cf4c211dcd5726fbe876ff555b...
import os, sys import tensorflow.keras from PIL import Image, ImageOps import numpy as np import datetime os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' model_file_path=sys.argv[1] # added for customization image_file_path=sys.argv[2] # added for customization # Disable scientific notation for clarity np.set_printoptions(s...
{"hexsha": "f3fbc69c853628c0fab2bd7f9f2aaf08b43f22f6", "size": 1559, "ext": "py", "lang": "Python", "max_stars_repo_path": "teachable_img_keras_orig_classify.py", "max_stars_repo_name": "ojjsaw/teachable-machine-openvino", "max_stars_repo_head_hexsha": "c4411b64f3aeb0a0730f711aaa1188fcba33ac37", "max_stars_repo_license...
import raocp as r import numpy as np # ScenarioTree generation ---------------------------------------------------------------------------------------------- p = np.array([[0.1, 0.8, 0.1], [0.4, 0.6, 0], [0, 0.3, 0.7]]) v = np.array([0.5, 0.4, 0.1]) (N, tau) = (8, 5) tree = r.core.Markov...
{"hexsha": "60d1734a5f8c2d5ac43927beca697b27b07f3704", "size": 1336, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "smokinmirror/raocp-toolbox", "max_stars_repo_head_hexsha": "56c45c1a720897c6cb241b6db74ca956adff7aa5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
#-*- coding:utf-8 -*- import sys import tensorflow as tf import numpy as np import pdb import pickle from encoder import EncoderBase import copy class MatchPyramid(EncoderBase): def __init__(self, **kwargs): super(MatchPyramid, self).__init__(**kwargs) self.maxlen1 = kwargs['maxlen1'] self....
{"hexsha": "3ea0ff4a5d7f63fd6018fafb96dd4100f4a40671", "size": 6636, "ext": "py", "lang": "Python", "max_stars_repo_path": "encoder/match_pyramid.py", "max_stars_repo_name": "zhufz/nlp_research", "max_stars_repo_head_hexsha": "b435319858520edcca7c0320dca3e0013087c276", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import sys import matplotlib.pyplot as plt import matplotlib.ticker as plticker from pathlib import Path import torch import consts from utils import divide_zero import copy from argparse import ArgumentParser import ast import pickle import numpy as np class plots: def __init__(self, dir_path: Path, max_num: in...
{"hexsha": "e92ccce2c11467132f0ce2c20742bd4cefcfdc93", "size": 33597, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis.py", "max_stars_repo_name": "technion-cs-nlp/Individual-Neurons", "max_stars_repo_head_hexsha": "088a7b08cb65ed8242cdc382d4b58bb23cb84445", "max_stars_repo_licenses": ["MIT"], "max_stars...
\documentclass{article} \usepackage{fullpage} \usepackage[utf8]{inputenc} \usepackage[pdfpagelabels=true,linktocpage]{hyperref} \usepackage{color} \title{\texttt{SMT-RAT 19.04}} \begin{document} \maketitle \texttt{SMT-RAT}~\cite{Corzilius2015} is an open-source \texttt{C++} toolbox for strategic and parallel SMT so...
{"hexsha": "9c06762b7cb02b6d8f2f2ac28c9fcce31f94d827", "size": 2987, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/smtcomp-description/smtcomp-2019.tex", "max_stars_repo_name": "ths-rwth/smtrat", "max_stars_repo_head_hexsha": "efd83021d5b5fb0e2903b38cd3148a953a1972c0", "max_stars_repo_licenses": ["MIT"], "ma...
import math import torch from pytorch_pretrained_bert import BertTokenizer, BertAdam from tensorboardX import SummaryWriter from experiment import Model, Training from experiment.checkpointing import QATrainStatePyTorch import numpy as np class InputExample(object): """A single training/test example for simple s...
{"hexsha": "39a516f9d359acda74ce5d8987ff7ee62d14e76a", "size": 17394, "ext": "py", "lang": "Python", "max_stars_repo_path": "bert-training/experiment/bert_utils.py", "max_stars_repo_name": "UKPLab/emnlp2019-duplicate_question_detection", "max_stars_repo_head_hexsha": "17a9d97c2414666fcc08015a58619fe9722daf2b", "max_sta...
# Funciones Basicas de TensorFlow ## Introduccion TensorFlow propone un modelo computacional distinto al normalmente usado: la computacion simbolica. Mas adelante veremos que significa esto, pero por ahora solo veamos un ejemplo de una computacion en python estadar ```python w = 1.0 #parametro b = 2.0 #parametro ...
{"hexsha": "49571a5bb611f39d831928cfed038d0883d90bbd", "size": 16071, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/ep1/tensorflow-basics.ipynb", "max_stars_repo_name": "neura-lab/intro-deeplearning-tensorflow", "max_stars_repo_head_hexsha": "216f2535c5b10381eb83ce703efcae517d10b3ae", "m...
import pickle import os import numpy as np import matplotlib.pyplot as plt from nltk.corpus import brown from pprint import pprint from collections import defaultdict from tqdm import tqdm from private_quotes.core.risk_evaluation import RiskEvaluator def prepare_reference_probabilities(): """ This function is ...
{"hexsha": "7af4050655bddbcc68833f0c26920c5b9969e7d8", "size": 1312, "ext": "py", "lang": "Python", "max_stars_repo_path": "private_quotes/core/prepare_datasets.py", "max_stars_repo_name": "AndrewBeers/DifferentialPrivacy_For_Quotes", "max_stars_repo_head_hexsha": "db63d9b9d533f37b9f2c546ffef1d4dd883cd3cb", "max_stars_...
From iris.proofmode Require Import proofmode. From iris.program_logic Require Import weakestpre adequacy lifting. From stdpp Require Import base. From cap_machine.ftlr_binary Require Export Mov_binary Load_binary AddSubLt_binary Get_binary IsPtr_binary Jmp_binary Jnz_binary Lea_binary Subseg_binary Restrict_binary Stor...
{"author": "logsem", "repo": "cerise", "sha": "a578f42e55e6beafdcdde27b533db6eaaef32920", "save_path": "github-repos/coq/logsem-cerise", "path": "github-repos/coq/logsem-cerise/cerise-a578f42e55e6beafdcdde27b533db6eaaef32920/theories/fundamental_binary.v"}
#! /usr/bin/env python # coding=utf-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import cv2 import numpy as np import core.utils as utils import tensorflow as tf return_elements = ["input/input_data:0", "pred_sbbox/concat_2:0", "pred_mbbox/concat_2:0", "pred_lbbox/concat_2:0"] pb_file = "....
{"hexsha": "c2bc15e74ce430651cf0bfba7f0c2ecbb882f2da", "size": 2716, "ext": "py", "lang": "Python", "max_stars_repo_path": "Automatic_tagging.py", "max_stars_repo_name": "1337235931/tensorflow-bee-yolov3_lastversion", "max_stars_repo_head_hexsha": "daab74071a992bbb5c1e991b7618d8adef8321c3", "max_stars_repo_licenses": [...
[STATEMENT] lemma sig_red_zero_subset: assumes "sig_red_zero sing_reg F p" and "sing_reg = (\<preceq>\<^sub>t) \<or> sing_reg = (\<prec>\<^sub>t)" shows "sig_red_zero sing_reg {f\<in>F. sing_reg (lt f) (lt p)} p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sig_red_zero sing_reg {f \<in> F. sing_reg (lt f) (lt...
{"llama_tokens": 1202, "file": "Signature_Groebner_Signature_Groebner", "length": 11}
"""Creates and simulates a simple circuit. """ import cirq import qsimcirq import os import re import numpy as np import math def main(): q0,q1,q2 = cirq.LineQubit.range(3) for iteration in range(1): random_circuit = cirq.testing.random_circuit(qubits=[q0,q1,q2], ...
{"hexsha": "94406615af41576e9638b95e053a6acf08c7cccf", "size": 3929, "ext": "py", "lang": "Python", "max_stars_repo_path": "kc_examples/kc_qtorch.py", "max_stars_repo_name": "yipenghuang0302/Cirq", "max_stars_repo_head_hexsha": "676440f2d5c82878c6627b4d7d87638baf70083d", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
############################################################################## # From client @dict_readable struct Capabilities dynamicRegistration::Union{Bool,Missing} end const ResourceOperationKind = String const ResourceOperationKinds = ("create", "rename", "delete") const FailureHandlingKind = String const Fa...
{"hexsha": "03e700b1e266e9ccd23615f91cc22ce80d3b544c", "size": 10177, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/protocol/initialize.jl", "max_stars_repo_name": "c42f/LanguageServer.jl", "max_stars_repo_head_hexsha": "fe278240564b94e9ad64c481d77b58bdcf6aee14", "max_stars_repo_licenses": ["MIT"], "max_sta...
import copy from itertools import compress import numpy as np import scipy as sp import scipy.stats #plotting import plotly.offline as pyo import plotly.graph_objs as go import plotly as py import colorlover as cl import plotly.figure_factory as ff # internal files from plotly_scientific_plots.plotly_misc import in_n...
{"hexsha": "1c58d7f848042aea35a85c94eb965b025200500a", "size": 52380, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotly_scientific_plots/plotly_plot_tools.py", "max_stars_repo_name": "rsandler00/plotly-scientific-plots", "max_stars_repo_head_hexsha": "c47c6073d54f1c77632b6eac5f1811782b8c75c3", "max_stars_re...
theory OpSem imports Main HOL.Rat begin type_synonym TS = rat (* Event *) type_synonym T = nat (* Thread ID *) type_synonym L = nat (*? Ref?*) definition "null = (0 :: nat)" type_synonym V = nat (* bool: release/aquire or relaxed*) datatype action = Read bool L V | Write bool L V | Update L V V print_theo...
{"author": "MSemenyuk", "repo": "PhD_Isabelle", "sha": "179f5d346a721b15940a271323e3487f4ea51338", "save_path": "github-repos/isabelle/MSemenyuk-PhD_Isabelle", "path": "github-repos/isabelle/MSemenyuk-PhD_Isabelle/PhD_Isabelle-179f5d346a721b15940a271323e3487f4ea51338/Amazon Ring Buffer/OpSem.thy"}
import math import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from sklearn.metrics import mean_squared_error from sklearn.model_selection import KFold, cross_val_score, train_test_split import xgboost as xgb from xgboost import plot_importance N_FOLDS = 5 def rmsle_cv(mode...
{"hexsha": "a1683350968c56427f8dfbd2db818e8609aadc0e", "size": 5395, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/second_one.py", "max_stars_repo_name": "oguzhangur96/isbank_ml_challange", "max_stars_repo_head_hexsha": "e3e4b7307b428e86da183c2e95881b4109f874e8", "max_stars_repo_licenses": ["MIT"], "...
import pandas as pd import numpy as np from marginal import marginal import urllib import json from typing import Dict, List,Tuple,Callable from scipy import integrate import functools import sys import math import os import shutil from collections import OrderedDict import datetime def inner_import(): global sha...
{"hexsha": "a7f1d49527ac4326d9cc1afd728d526800ffc5ee", "size": 14067, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/util.py", "max_stars_repo_name": "r0leGetter/b_thesis_top", "max_stars_repo_head_hexsha": "d2e7533909a1104726b03d422d12be582f35f716", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from unittest import TestCase from backend.algorithms.VFH import HistogramGrid import numpy as np sensor_angle = 15 sensor_measurement = 7.7 max_sensor_dst = 375 min_sensor_dst = 0 threshold = 0 window_size = 7 cell_size = 5 world_map = np.arange(15 ** 2, dtype=np.float16).reshape(15, 15) sensor = {sensor_angle: sens...
{"hexsha": "85c63f753dd78233e0c3e782fb07b041ee68e10f", "size": 1015, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/algorithms/testing/test_histogramGrid.py", "max_stars_repo_name": "MarioBartolome/GII_0_17.02_SNSI", "max_stars_repo_head_hexsha": "97215519d2111dd5b5b6d5152974458a976496ad", "max_stars_re...
% DEMROBOTWIRELESS1 Wireless Robot data from University of Washington, without dynamics and without back constraints. % FGPLVM % Fix seeds randn('seed', 1e5); rand('seed', 1e5); dataSetName = 'robotWireless'; experimentNo = 1; % load data [Y, lbls] = lvmLoadData(dataSetName); % Set up model options = fgplvmOptions...
{"author": "SheffieldML", "repo": "GPmat", "sha": "4b5914a38ecbad9fb7a13a3392970bfc28c9d911", "save_path": "github-repos/MATLAB/SheffieldML-GPmat", "path": "github-repos/MATLAB/SheffieldML-GPmat/GPmat-4b5914a38ecbad9fb7a13a3392970bfc28c9d911/fgplvm/demRobotWireless1.m"}
from __future__ import division import pickle import sys from pprint import pprint import numpy import pylab as P from datetime import datetime import matplotlib from matplotlib.transforms import Bbox from matplotlib.font_manager import FontProperties from collections import defaultdict from ci import calc_sample_mean ...
{"hexsha": "f8c2f39771db964ac0fe76636ad7de25cbce8cbc", "size": 3405, "ext": "py", "lang": "Python", "max_stars_repo_path": "U-SPRING/plot_runtimes.py", "max_stars_repo_name": "CN-UPB/SPRING", "max_stars_repo_head_hexsha": "1cb74919689e832987cb2c9b490eec7f09a64f52", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
module SightingDistance export polSightingDistance, unpolSightingDistance, profile1, profile, fv using Light, Roots, NLopt const brct = Float64[0,1000] # bracket for limits of the sighting distances (m) function polUnmaxSightingDistance(f::Stokes,b::Stokes, disc, c, Sp) # find the sighting distance for a fish again...
{"hexsha": "a1fe6b924813e5009a33db9953439ce9087c55be", "size": 3102, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SightingDistance.jl", "max_stars_repo_name": "yakir12/polarimetryLab", "max_stars_repo_head_hexsha": "86f754428a2f9d9e4e5ae49e3d9b9e4b92b4b579", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import pandas as pd import numpy as np import argparse from feature.tree_feature import tree_feature from feature.nn_feature import nn_feature from model.model import final_model import warnings warnings.filterwarnings('ignore') def main(): train_data = pd.read_csv(args.train_data, sep=' ') test_data = pd.re...
{"hexsha": "bbb5a6ac82b6149a9586acbfe1f5bf352be83516", "size": 4189, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/main.py", "max_stars_repo_name": "chiyukunpeng/used-car-price-prediction", "max_stars_repo_head_hexsha": "6e59334536006f6ebe83f95ee9d7fedaa75a22cb", "max_stars_repo_licenses": ["MIT"], "max_s...
import tensorflow as tf import numpy as np import os import cv2 import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from network import * from utils import * from preprocess_data import * #prepare the data image_dir = "data/train/" save_summary_dir = "graph/" train_ima...
{"hexsha": "8cbf8797cff4e3e5ebf5516eb38a0af4cededcf3", "size": 3228, "ext": "py", "lang": "Python", "max_stars_repo_path": "U-Net@TF1 Image Segmentation/main.py", "max_stars_repo_name": "blackburn07x/Image-Segmentation-Projects", "max_stars_repo_head_hexsha": "71132a09509dd296550a19d695b5bc4d20e360a6", "max_stars_repo...
import numpy as np from simulator.system import System from simulator import dialog_config from simulator.agent.core import SystemAct, UserAct, Action class LooseSystem(System): def __init__(self, config): super().__init__(config=config) def _index_to_action(self, sys_act_idx, usr_act=None): a...
{"hexsha": "0e2b84b29c9ec25ec3e2b092c716a50667d8d606", "size": 3534, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulator/loose_system.py", "max_stars_repo_name": "qbetterk/user-simulator", "max_stars_repo_head_hexsha": "77caca30ff67b9112b1fe5e65e191c6b5e25532c", "max_stars_repo_licenses": ["Apache-2.0"], "...
""" Unit testing for particular segmentation module Copyright (C) 2014-2018 Jiri Borovec <jiri.borovec@fel.cvut.cz> """ import os import sys import unittest import logging import numpy as np import pandas as pd sys.path.append(os.path.abspath(os.path.join('..', '..'))) # Add path to root from imsegm.utilities.data...
{"hexsha": "4656635b5bf3da5536b23af4f79d7270bca625a1", "size": 2041, "ext": "py", "lang": "Python", "max_stars_repo_path": "imsegm/tests/test_graph-cut.py", "max_stars_repo_name": "kant/pyImSegm", "max_stars_repo_head_hexsha": "e360bab573757de0707542139ab456b565764c3d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
""" Bezier curve recipe """ # adapted from: # https://stackoverflow.com/a/12644499/1098683 import numpy as np from scipy.misc import comb def bernstein(i, n, t): """ The iᵗʰ Bernstein basis polynomial of degree n, i as a function of t """ # return comb(n, i) * (t ** (n - i)) * (1 - t) ** i re...
{"hexsha": "d98fc3ab804356316f6764001657c588f18f65e4", "size": 1426, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/scrawl/bezier.py", "max_stars_repo_name": "astromancer/graphical", "max_stars_repo_head_hexsha": "2d72407c53967714953485dd52ad72e34e549ef5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from sklearn.metrics import confusion_matrix from scipy.stats import spearmanr from scipy.optimize import curve_fit import os import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np def load_topics(topic_file): topic_list = [] with open(t...
{"hexsha": "d1803c09b1da36754bc5d5a05547fbe7b01ab968", "size": 2702, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphing/scatter.py", "max_stars_repo_name": "aaronmueller/contextualized-topic-models", "max_stars_repo_head_hexsha": "a8e280e2daa9c7c95540de8979f565d73c60f73e", "max_stars_repo_licenses": ["MIT"...
import numpy as np import tensorflow as tf import cv2 import pafy import time import youtube_dl tf.compat.v1.disable_v2_behavior() class DetectorAPI: def __init__(self, path_to_ckpt): self.path_to_ckpt = path_to_ckpt self.detection_graph = tf.compat.v1.Graph() with self.detection_graph.a...
{"hexsha": "f5a353696e85b632b73fa4e5c38319eb58ad452c", "size": 4947, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main.py", "max_stars_repo_name": "GarvRJ/T.Y.MINIPROJECT", "max_stars_repo_head_hexsha": "e8a5db4e28adb008bf7decf32a25a72e8ff7c266", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
// // Created by Arnold Müller on 18.02.17. // #include "Properties.h" #include <boost/filesystem.hpp> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> const std::string Properties::filename_ { "simulation.json"}; Properties::Properties(const std::string configname) : confignam...
{"hexsha": "386e273459b9d53a24e596561a48b0e514df75f2", "size": 4884, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cliontest/Properties.cpp", "max_stars_repo_name": "noeld/cpp", "max_stars_repo_head_hexsha": "572a145f8c79f7292b7b0611822ed34792df4e9c", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": ...
import os import bicycleparameters as bp import numpy as np speeds = np.linspace(0, 10, num=100) ### Clunkily draws and saves default plots ### def draw_plot(): bike = bp.Bicycle('Benchmark', pathToData=os.getcwd()+'\\data') # Alter Bicycle name #bike.add_rider('Jason', reCalc=True) plot = bike.plot_eige...
{"hexsha": "a29b5b962fc2bc4a224db9b3a523127c20a391a3", "size": 583, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotdrawer.py", "max_stars_repo_name": "sandertyu/Simple-Geometry-Plot", "max_stars_repo_head_hexsha": "6fa4dfb50aebc4215818f75ff56f916fc32f8cfa", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"...
# -*- coding: utf-8 -*- """ Layers to construct recurrent networks. Recurrent layers can be used similarly to feed-forward layers except that the input shape is expected to be ``(batch_size, sequence_length, num_inputs)``. The CustomRecurrentLayer can also support more than one "feature" dimension (e.g. using convolu...
{"hexsha": "165e2c5d28d39eb59f64ade83c72086cc6a83f51", "size": 70647, "ext": "py", "lang": "Python", "max_stars_repo_path": "lasagne/layers/recurrent.py", "max_stars_repo_name": "david-leon/Lasagne_CTC", "max_stars_repo_head_hexsha": "674905d0ad42def2bbc3f48e9dd9bfc811b177c5", "max_stars_repo_licenses": ["MIT"], "max_s...
# Copyright (c) 2018-2021, Carnegie Mellon University # See LICENSE for details #F ========================================================================== #F ParCell(<num_spus>, <pkSize>) - Cell parallelization tag #F .params[1] is num_spus #F .params[2] is packetSize #F Class(ParCell, AGenericTag, rec(i...
{"hexsha": "21a1932f3a30287600d3c72954cb3af2530496a9", "size": 1112, "ext": "gi", "lang": "GAP", "max_stars_repo_path": "namespaces/spiral/paradigms/distributed/tags.gi", "max_stars_repo_name": "sr7cb/spiral-software", "max_stars_repo_head_hexsha": "349d9e0abe75bf4b9a4690f2dbee631700f8361a", "max_stars_repo_licenses": ...
#!/usr/bin/env python # coding: utf-8 # # EPY: stripped_notebook: {"metadata": {"kernelspec": {"display_name": "starfish", "language": "python", "name": "starfish"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert...
{"hexsha": "d360245dcbebc1ee508036a944293e4d7b5471c6", "size": 6097, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/py/SeqFISH.py", "max_stars_repo_name": "haoxusci/starfish", "max_stars_repo_head_hexsha": "d7bd856024c75f2ce41504406f2a663566c3814b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[GOAL] α : Type u_1 inst✝¹ : Preorder α inst✝ : DecidableRel fun x x_1 => x ≤ x_1 finsetIcc : α → α → Finset α mem_Icc : ∀ (a b x : α), x ∈ finsetIcc a b ↔ a ≤ x ∧ x ≤ b a b x : α ⊢ x ∈ (fun a b => filter (fun x => ¬b ≤ x) (finsetIcc a b)) a b ↔ a ≤ x ∧ x < b [PROOFSTEP] rw [Finset.mem_filter, mem_Icc, and_assoc, lt_if...
{"mathlib_filename": "Mathlib.Order.LocallyFinite", "llama_tokens": 41333}
using Test using Impero using LinearAlgebra Ω = Circle(0,2pi) × Interval(-1,1) t1 = Ω * Interval(-1,1) ∂(Ω) ∂(t1) info(Ω) @testset "domain tests" begin @test ndims(Ω) == 2 @test ndims(t1) == 3 @test Ω.domains[1] == Ω[1] @test ndims(∂(Ω)[1]) == 1 @test ndims(∂(t1)[1]) == 2 end
{"hexsha": "5c55d5251989825174ef21b1e059d2328a620eaf", "size": 302, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/domain_test.jl", "max_stars_repo_name": "CliMA/Impero.jl", "max_stars_repo_head_hexsha": "753a9d751d06d07764f14f5fe398ef5304e878c0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import math import numpy as np def equation1(points): # This method is a part of Eyebrows shape detector # Use shape_predictor_68 as a reference for points # points = [22,23,24,25,26] (right eyebrow) - (method works for left eyebrow too) avgPoint = [np.average(points[[2,3],0]), np.average(points[[2,3]...
{"hexsha": "ec693570d6290282febf97b5ef65dbc2670620d5", "size": 4214, "ext": "py", "lang": "Python", "max_stars_repo_path": "Web Development/Face Factory/extractor/geometry.py", "max_stars_repo_name": "zementalist/Professional-Experience", "max_stars_repo_head_hexsha": "04fc2db56ea3dd2389577ae90e479028009724f5", "max_st...
# Module to run tests on instantiating FRB objects from __future__ import print_function, absolute_import, division, unicode_literals # TEST_UNICODE_LITERALS import pytest import os from astropy.table import Table from astropy import units from frb.frb import GenericFRB, FRB def test_generic(): FRB1 = GenericF...
{"hexsha": "31a0729e100d8039d5d18e585d44a8bdf305da86", "size": 893, "ext": "py", "lang": "Python", "max_stars_repo_path": "frb/tests/test_frb.py", "max_stars_repo_name": "KshitijAggarwal/FRB", "max_stars_repo_head_hexsha": "3f732c6fa4fc79a5cfe69daf3cd88b51e6fb402b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
# testing EZM data testing =F if (testing){ concdata = read.csv("D:/Development_r/automaticreport.1/datafortest/EZM.csv") takeonlysum = "Sum" library(chron) } if (testing){ datapath="Y:/AOCF-User Projects/1412_Rosenmund_VGlut1-KI" source("Rfiles/FUNCTIONs.R") userprojectfolder=datapath IF <- read.c...
{"hexsha": "2c61bf7bb155ea8ca54662494fa7ae0d1a850723", "size": 1893, "ext": "r", "lang": "R", "max_stars_repo_path": "R_files/Dataanalysis/EZM.r", "max_stars_repo_name": "jcolomb/AOCFshiny", "max_stars_repo_head_hexsha": "cf3151a6d8c2876008a81b789670a96e2d74d370", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_coun...
import pyPROPOSAL as pp import numpy as np particle_defs = [ pp.particle.MuMinusDef.get(), pp.particle.TauMinusDef.get(), pp.particle.EMinusDef.get() ] mediums = [ pp.medium.Ice(1.0), pp.medium.Hydrogen(1.0), pp.medium.Uranium(1.0) ] cuts = [ pp.EnergyCutSettings(-1, -1), pp.EnergyCut...
{"hexsha": "520f5245c16c07c37427a318b8aeb03eae65ce9f", "size": 6985, "ext": "py", "lang": "Python", "max_stars_repo_path": "PROPOSAL/tests/gen_testfiles_scripts/ionization.py", "max_stars_repo_name": "hschwane/offline_production", "max_stars_repo_head_hexsha": "e14a6493782f613b8bbe64217559765d5213dc1e", "max_stars_repo...
[STATEMENT] lemma maxne0_Nil [simp]: "maxne0 [] as = 0" "maxne0 xs [] = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. maxne0 [] as = 0 &&& maxne0 xs [] = 0 [PROOF STEP] by (auto simp: maxne0_def)
{"llama_tokens": 100, "file": "Diophantine_Eqns_Lin_Hom_List_Vector", "length": 1}
#include <boost/test/unit_test.hpp> #include "fixtures.h" #include <cstring> #include <stdexcept> using std::string; struct Udata{ int x; }; LUAPP_USERDATA(Udata, "Test.Userdata") static int signal_ = 0; static lua::Retval concat(lua::Context& c) { ++signal_; return c.ret("userdata concatenated"); } struct...
{"hexsha": "2a130dd514bb8c824912ace1c8b15663222a8849", "size": 1657, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/testConcatNormal.cpp", "max_stars_repo_name": "LAK132/lua-api-pp", "max_stars_repo_head_hexsha": "8349860d2a27c8ef93851322a947e1cae15b0051", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/local/python """ City class Includes methods for: 1. Empirical Transition Matrix 2. Net Rewards Matrix """ from __future__ import division import numpy as np from city_utils import * import os import json import dill from datetime import * # Set directory structure DATA_DIR = os.path.abspath("/ho...
{"hexsha": "0217c7bfa7d755a6d99e0ed263a90ad4f19c8a8e", "size": 4892, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/city.py", "max_stars_repo_name": "chdhr-harshal/uber-driver-strategy", "max_stars_repo_head_hexsha": "f21f968e7aa04d8105bf42e046ab120f813aa12f", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma f2'_less_f2: "f2' < f2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. f2' < f2 [PROOF STEP] using f1cf2 [PROOF STATE] proof (prove) using this: f1 * c < f2 goal (1 subgoal): 1. f2' < f2 [PROOF STEP] by(auto simp add: f2'_def field_simps)
{"llama_tokens": 133, "file": "Dynamic_Tables_Tables_real", "length": 2}
#define BOOST_TEST_MODULE OffResonance #include <boost/test/unit_test.hpp> #include <cmath> #include <fstream> #include <sycomore/magnetization.h> #include <sycomore/como/Model.h> #include <sycomore/Pulse.h> #include <sycomore/sycomore.h> #include <sycomore/units.h> using namespace sycomore::units; BOOST_AUTO_TEST_...
{"hexsha": "418e54023c41e051b8ade75d18deac0f08c45156", "size": 2829, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/cpp/off_resonance.cpp", "max_stars_repo_name": "aTrotier/sycomore", "max_stars_repo_head_hexsha": "32e438d3a90ca0a9d051bb6acff461e06079116d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import os from src.hand_tracker import HandTracker import cv2 import numpy as np import math from statistics import mean from sklearn.preprocessing import normalize import time import warnings warnings.simplefilter(action='ignore', category=FutureWarning) # 8 12 16 20 # | | | | # 7 11 ...
{"hexsha": "286d46caaffda5297dba0ba58398aceffcd8110e", "size": 2469, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML/dataset_make/ges.py", "max_stars_repo_name": "sytk/SidebySide", "max_stars_repo_head_hexsha": "891e311391b59dd0900908b68a89df00a1cda44b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import random from collections import defaultdict import numpy as np class QAgent(): def __init__(self,env,gamma): self.gamma = gamma self.env = env self.q_vals = defaultdict(lambda: np.array([0. for _ in range(env.action_space.n)])) self.alpha = 0.4 self.eps = 0.5 ...
{"hexsha": "31b4b17334305ab141bc6076212538347c42a726", "size": 951, "ext": "py", "lang": "Python", "max_stars_repo_path": "Agents.py", "max_stars_repo_name": "NagarajSMurthy/Crawler-robot", "max_stars_repo_head_hexsha": "c688e93003a593184ee8ea477c74d3679cecac58", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" An implementation of the core concept event for astronomic spaces :author: Fenja Kollasch, 06/2017 """ from coreconcepts import CcEvent from astropy.time import Time class AstroTime(object): """ A simple wrapper for AstroPy's Time class. Accepts any format as Input, but returns it as ISO """ ...
{"hexsha": "9e258cb0e6e3d423cb9d99cc3d2e364961fd43a1", "size": 2645, "ext": "py", "lang": "Python", "max_stars_repo_path": "CoreConceptsPy/Astronomic_Spaces/events.py", "max_stars_repo_name": "spatial-ucsb/ConceptsOfSpatialInformation", "max_stars_repo_head_hexsha": "73d54a37ced14bc5ecb064f9d1ab8b1af8cd3c5a", "max_star...
import scipy.sparse as sp import numpy as np import networkx as nx import warnings from time import perf_counter from sklearn.model_selection import train_test_split def load_npz(file_name): if not file_name.endswith('.npz'): file_name += '_lcc.npz' with np.load(f'../data/{file_name}', allow_pickle=Tru...
{"hexsha": "8ee82f9f5279377a2eb7e184ac5d182d03f35415", "size": 4464, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "EdisonLeeeee/SGAttack", "max_stars_repo_head_hexsha": "406a836e85294e5588503cf0a6495a82d58ada77", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import tensorflow as tf import time import numpy as np import os root_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') import sys sys.path.append(root_dir) from adversarial_robustness.cnns import * from adversarial_robustness.da...
{"hexsha": "63a82d1411cad780c08b5a9e8c920472faca089f", "size": 7173, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/train_models.py", "max_stars_repo_name": "dtak/adversarial_robustness", "max_stars_repo_head_hexsha": "eb1e3af5301789cc6e7562750145ab91f80dcca7", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np, operator as o from numpy import ndarray from FuncDesigner.FDmisc import FuncDesignerException from baseClasses import * if 'div' in o.__dict__: div = o.div else: div = o.truediv #div = o.truediv # TODO: rework buggy multiarray.size #delattr(multiarray, 'size') complementarity = { ...
{"hexsha": "5e0f63f05c0c6c1f8d82602b51363c4b9bf2764c", "size": 3991, "ext": "py", "lang": "Python", "max_stars_repo_path": "FuncDesigner/FuncDesigner/multiarray.py", "max_stars_repo_name": "PythonCharmers/OOSuite", "max_stars_repo_head_hexsha": "b0e716e7afdbc2a0469b62ec8db1de3454f5b883", "max_stars_repo_licenses": ["CN...
import pandas as pd from utils import print0 as print from matplotlib import pyplot as plt import numpy as np path = '/Users/qianyuxiang/pydata-book/ch02/names/yob{}.txt' names1880 = pd.read_csv(path.format(1880), names = ['name', 'sex', 'births']) pieces = [] columns = ['name', 'sex', 'births'] for year in range(18...
{"hexsha": "d60cb718c06fb2317c71eb4f5aba6b76a4a0ac5b", "size": 3131, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch02/p37_47.py", "max_stars_repo_name": "QianYuXiang/UsePythonForDataAnalysis", "max_stars_repo_head_hexsha": "726a71a4bcdfab5011f75026cdd4c8dc6683aa45", "max_stars_repo_licenses": ["MIT"], "max_s...
# test peakassign known_energies = [3691, 4090, 4510, 4952, 5414, 5898, 6403, 6929, 7477, 8040, 8637] # kalpha energies Ca-Zn filt_values = known_energies.^0.9 # caluclate filt values with some amount of non-linearity tested = 0 peakassignwrong=0 nc = 7 tested+=length(combinations(1:length(known_energies),nc)) for ...
{"hexsha": "cc99c3463de0c154de905c59bb86e9c61b093b7f", "size": 1390, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/calibration.jl", "max_stars_repo_name": "ggggggggg/Mass2.jl", "max_stars_repo_head_hexsha": "7184d0345d70be36d8f0191666d4f60cd0a1c7b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import sys import os import pandas as pd import torch import torch.optim as optim import numpy as np sys.path.append( os.path.dirname( os.path.dirname(os.path.realpath(__file__)))) from utils.data_postprocess import DataProcessor from utils.nets import ActorNet, CriticNet, Normalizer from environments.age...
{"hexsha": "d7743edded9b6f3c290524514f5008deddfb828e", "size": 11672, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimal_bidding_bis/controllers/hybrid_rl.py", "max_stars_repo_name": "mathildebadoual/RL_power_systems", "max_stars_repo_head_hexsha": "825e60bad16129e0a0229d15af5110b26e0a1577", "max_stars_repo...
# coding:utf-8 import numpy as np def load_map() -> np.array: pass
{"hexsha": "461db0dc25f84f3f7103cf2dd1a12e8292bd9f51", "size": 73, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main/maps.py", "max_stars_repo_name": "whllhw/left_game", "max_stars_repo_head_hexsha": "482eae42673b017d993fe64556ff62ad5558c9d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
\chapter{Measuring audio visualization performance}\label{sec:colourised} An audio waveform is a plot of the amplitude of an audio signal over time \citep[p.~92]{Hausman2012}. The amplitude profile of a waveform can be used to identify different tracks, see which parts are loud or quiet, and to identify errors such ...
{"hexsha": "8318dd60550c5073e0168ff396391fb215101150", "size": 47213, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chp4.tex", "max_stars_repo_name": "chrisbaume/thesis", "max_stars_repo_head_hexsha": "a122f3785b2be538a700069dcb3a9774a09c8c40", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": 1, "max...
theory Ltake_lmap imports Main "$HIPSTER_HOME/IsaHipster" Ltake Lmap begin setup Tactic_Data.set_coinduct_sledgehammer setup Misc_Data.set_noisy (* cohipster ltake lmap *) (* Discovers and proves the following in ca. 40 seconds *) lemma lemma_aj [thy_expl]: "ltake z (lmap y x2) = lmap y (ltake z x2)" by (...
{"author": "moajohansson", "repo": "IsaHipster", "sha": "91f6ea3f1166a9de547722ece6445fe843ad89b4", "save_path": "github-repos/isabelle/moajohansson-IsaHipster", "path": "github-repos/isabelle/moajohansson-IsaHipster/IsaHipster-91f6ea3f1166a9de547722ece6445fe843ad89b4/benchmark/she/itp2018/Ltake_lmap.thy"}
__doc__ = """Reset the ghost vectors or scalar variables using functions implemented in Numba""" import numpy as np import numba from numba import njit @njit(cache=True) def _reset_vector_ghost(input, ghost_idx, reset_value=0.0): """ This function resets the ghost of an input vector collection. Default reset...
{"hexsha": "dc64ac67c25c2b6f3db7d77d39e3bc9e28272192", "size": 1758, "ext": "py", "lang": "Python", "max_stars_repo_path": "elastica/reset_functions_for_block_structure/_reset_ghost_vector_or_scalar.py", "max_stars_repo_name": "yeonsu-jung/PyElastica", "max_stars_repo_head_hexsha": "fee87b9da22e310ff925c16fdc839bf8405c...
# This is an impelementations of the bi-lanczos algorithms, producing an # left and right decomposition of the matrix that is orthogonal, and transform # the matrix to a triangular one. # Major references are from Professor GreenBaum's book and my own derivations. mutable struct IterativeBiLanczos A::Function ...
{"hexsha": "f767afa1d055801260f90f9c8906beb7df6e10d4", "size": 5672, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/iterative_bi_lanczos.jl", "max_stars_repo_name": "iluvjava/Subspace_Projection_Method", "max_stars_repo_head_hexsha": "0728d708b18a2f0bca763c1061eb729eb0b79c3a", "max_stars_repo_licenses": ["MI...
import os import sys import numpy as np import cv2 def bb_intersection_over_union(boxA, boxB): # determine the (x, y)-coordinates of the intersection rectangle xA = max(boxA[0], boxB[0]) yA = max(boxA[1], boxB[1]) xB = min(boxA[2], boxB[2]) yB = min(boxA[3], boxB[3]) # compute the area of inter...
{"hexsha": "70a1f9e54e389ba06447a75676c69d395ea63ae8", "size": 2058, "ext": "py", "lang": "Python", "max_stars_repo_path": "util_func/nms_utils.py", "max_stars_repo_name": "ltoppyl/Zissen_team1_AGE", "max_stars_repo_head_hexsha": "03330974dac631e14c6af0ff5b0745770cf97c4f", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk import WordNetLemmatizer from keras import Sequential import numpy as np from sklearn.model_selection import train_test_split from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from ker...
{"hexsha": "b075459238b36e34a70d9a9c1eb2a7b1334f5d81", "size": 6397, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/backend/twitter/control_center/intelligence/classifier.py", "max_stars_repo_name": "detiuaveiro/social-network-mining", "max_stars_repo_head_hexsha": "283ca46b9bdbcc2dffb71e5d4e3718040121380c...
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
{"hexsha": "fc4ded623b61145022b8f37e1e31baedb18552bc", "size": 5167, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/jittor/test/test_array.py", "max_stars_repo_name": "ishine/jittor", "max_stars_repo_head_hexsha": "4a14967cc5f52dae50ec93eb8f845e7221af92b1", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import numpy as np from enum import Enum from collections import defaultdict import networking # adapted from https://github.com/soong-construction/dirt-rally-time-recorder/blob/master/cars.sql # max_rpm, idle_rpm, car_name car_data = [ # 1960s [7330.38, 1047.2, 'Mini Cooper S'], [7833.04, 984.366, 'Lanc...
{"hexsha": "01e38966cbc08f8974482caa9259b751f92b2648", "size": 11033, "ext": "py", "lang": "Python", "max_stars_repo_path": "dr1specific.py", "max_stars_repo_name": "ahti123/dr2_logger", "max_stars_repo_head_hexsha": "1a21568f558f6a6b70f974b24ed782312f74dfd1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import skimage.exposure import numpy as np import h5py from collections import namedtuple szyx = namedtuple( 'szyx', 'size z y x') def to3d(vv): if(np.size(vv) == 1): vv = (vv,vv,vv) return vv def set_filter(radius, return_dist=False): flt_sz = 2*radius+1 cc = np.mgrid[-radius:radius+1,-...
{"hexsha": "bc6747fdec212b7a7f2a74838c66c3b80fd07e1c", "size": 1610, "ext": "py", "lang": "Python", "max_stars_repo_path": "flypylib/fplutils.py", "max_stars_repo_name": "janelia-flyem/flypylib", "max_stars_repo_head_hexsha": "b52aa96aca3ae1fcd5e10c22de75e832cf0590c6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import numpy as np import pygmo as pg from spineq.utils import coverage_matrix, coverage_from_sensors class OptimiseCoveragePyGMO: def __init__(self, oa_x, oa_y, oa_weight, n_sensors, theta): self.n_sensors = n_sensors self.n_locations = len(oa_x) if isinstance(oa_weight, dict): ...
{"hexsha": "856d5b6155c781e2146f5ea94dcaa9cd5db7917f", "size": 2927, "ext": "py", "lang": "Python", "max_stars_repo_path": "spineq/genetic.py", "max_stars_repo_name": "alan-turing-institute/spatial-inequality", "max_stars_repo_head_hexsha": "13e47817db92c14aaf3b0f3d020305adb821e0b5", "max_stars_repo_licenses": ["MIT"],...
""" Line Outage Distribution Factors (LODFs) are a sensitivity measure of how a change in a line’s flow affects the flows on other lines in the system. """ struct LODF{Ax, L <: NTuple{2, Dict}} <: PowerNetworkMatrix{Float64} data::Array{Float64, 2} axes::Ax lookup::L end function _buildlodf(branches, nodes...
{"hexsha": "d683d873f9125d599039cdd40a2568617333e743", "size": 2312, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils/network_calculations/lodf_calculations.jl", "max_stars_repo_name": "jd-lara/PowerSystems.jl", "max_stars_repo_head_hexsha": "b61dc4d079168c55d96ec46e085d64b8f2e97d13", "max_stars_repo_lic...
\chapter{Theoretical Framework} \section{Sequential Decision Making} In robotics, sequential decision-making problems refer to tasks in which a robot must achieve a goal by interacting with the world as a consequence of decisions that are made sequentially, for example, navigating from one point to another, grasping an...
{"hexsha": "082b644b39bb0ae579c8c862a6216f9fa62ab3f2", "size": 44074, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "cap1.tex", "max_stars_repo_name": "rperezdattari/thesis-document-latex", "max_stars_repo_head_hexsha": "3ad39caaf927dceeb0460912ebef26576493ee36", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision.ops import nms import numpy as np from functools import partial from visualDet3D.networks.heads.anchors import Anchors from visualDet3D.networks.utils.utils import calc_iou from visualDet3D.networks.lib.block...
{"hexsha": "3591c849e2e1205d8629843d4576dd3ae3834a72", "size": 14131, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualDet3D/networks/heads/retinanet_head.py", "max_stars_repo_name": "jovialio/visualDet3D", "max_stars_repo_head_hexsha": "5a54e4547576e4eb23d768746b2bdb2b4f25753f", "max_stars_repo_licenses": ...
library(tidyverse) library(lubridate) # used to order by date library(ggplot2) # Read the datasets cases <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv") death <- read_csv("https://raw.githubusercontent...
{"hexsha": "1741bfcbb908cc796d0465bb6b05b52bb94d85ce", "size": 10529, "ext": "r", "lang": "R", "max_stars_repo_path": "dataScience/Covid/covidProj.r", "max_stars_repo_name": "naokishami/Classwork", "max_stars_repo_head_hexsha": "ac59d640f15e88294804fdb518b6c84b10e0d2bd", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma drop_0 [simp]: "drop\<cdot>0\<cdot>xs = xs" "drop\<cdot>(MkI\<cdot>0)\<cdot>xs = xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Data_List.drop\<cdot>0\<cdot>xs = xs &&& Data_List.drop\<cdot>(MkI\<cdot>0)\<cdot>xs = xs [PROOF STEP] by (subst drop.simps, simp add: zero_Integer_def)+
{"llama_tokens": 138, "file": "HOLCF-Prelude_Data_List", "length": 1}
[STATEMENT] lemma Some_those_length: "those ys = Some xs \<Longrightarrow> length xs = length ys" [PROOF STATE] proof (prove) goal (1 subgoal): 1. those ys = Some xs \<Longrightarrow> length xs = length ys [PROOF STEP] by (induction ys arbitrary: xs) (auto split: option.splits)
{"llama_tokens": 100, "file": "Taylor_Models_Taylor_Models_Misc", "length": 1}
#!/usr/bin/python # import numpy as np from matplotlib import pyplot as plt from matplotlib.patches import Rectangle class Dbg(object): def __init__(self): pass def return_bounding_box_2d(self, x, y, xsize, ysize): """Return the bounding box :param x: x center :param y: y cen...
{"hexsha": "3625b83c7dd1126a273a10ef65ecc5e90f76343b", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "qsr_lib/dbg/dbg_template_bounding_boxes_qsrs.py", "max_stars_repo_name": "yianni/rtd-dbg", "max_stars_repo_head_hexsha": "3b730c9122d73c30fbe8fcc4255e6baf82210640", "max_stars_repo_licenses": ["MI...
import json from pathlib import Path from random import randint from typing import Tuple, Union, List, Dict import requests import cv2 import numpy from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtWidgets import QSlider, QHBoxLayout, QLabel, QCheckBox, QInputDialog, QPushButton from numpy import ndarray from ap...
{"hexsha": "ead1c142b1ced6248c5e2c8a411ffa5e84fcf713", "size": 23216, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/NtscApp.py", "max_stars_repo_name": "JargeZ/vhs", "max_stars_repo_head_hexsha": "34f025717aad1e4b261cdb5e934ee3c876de2c61", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 43, "...
''' Bryan Quah, Matthew Xu CSE 415 Project This implements a two layer net using using information from stanford's cs231n course on neural networks. It uses softmax loss function, l2 regularization, and ReLU instead of sigmoid. ''' import numpy as np class TwoLayeredNet(object): def __init__(self, input_s, hidde...
{"hexsha": "6354d9a3502aab41ec8395a651130b5fb2fe4ac3", "size": 3448, "ext": "py", "lang": "Python", "max_stars_repo_path": "two_layer_net.py", "max_stars_repo_name": "bryantpq/ai_classifiers", "max_stars_repo_head_hexsha": "c36204bbe8770c3d9516c3cb219e069b7bca5fbe", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma unique_idx_append: assumes "unique_idx gs data" and "(hs, data') = add_indices aux data" shows "unique_idx (gs @ hs) data'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. unique_idx (gs @ hs) data' [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. unique_idx (gs @ hs) data'...
{"llama_tokens": 8418, "file": "Groebner_Bases_Algorithm_Schema", "length": 111}
program project3 !------------------------------------------------------------------------------------------------ ! Fortran program to solve the traffic problem using the original closure equation. ! v = v_max * (1 - rho**2/rho_max**2) ! Various flux functions: ! (1) Exact Riemann Solution ! F(rh...
{"hexsha": "d269cec47deb75e636d2f5b9e35e918a968aca25", "size": 13403, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "traffic-equation/f95/pj3.f95", "max_stars_repo_name": "b1tank/computational-fluid-dynamics-basics", "max_stars_repo_head_hexsha": "c5184e2a22c5038fdffe1a7a1ff4c872410d65ba", "max_stars_repo_lic...
__precompile__(true) module Learn using Reexport @reexport using LearnBase @reexport using LossFunctions @reexport using Transformations @reexport using ObjectiveFunctions @reexport using PenaltyFunctions @reexport using StochasticOptimization # @reexport using MLDataUtils @reexport using MLMetrics end # module
{"hexsha": "64e60abe89724092b85c8fd0155ad77399f421f4", "size": 316, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Learn.jl", "max_stars_repo_name": "JuliaTagBot/Learn.jl", "max_stars_repo_head_hexsha": "d3cb0112e19bc28da65335779026b37b05e386b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 65, "ma...
function f = vlmop2(x) dim = 2; transl = 1./sqrt(dim); part1 = (x(:,1) - transl).^2 + (x(:,2) - transl).^2; part2 = (x(:,1) + transl).^2 + (x(:,2) + transl).^2; f(:,1) = 1 - exp( -part1 ); f(:,2) = 1 - exp( -part2 );
{"author": "Eric-Bradford", "repo": "TS-EMO", "sha": "9ec2aa2f54d1232f80d37494ac067f2ebc112688", "save_path": "github-repos/MATLAB/Eric-Bradford-TS-EMO", "path": "github-repos/MATLAB/Eric-Bradford-TS-EMO/TS-EMO-9ec2aa2f54d1232f80d37494ac067f2ebc112688/Test_functions/vlmop2.m"}
# Copyright (c) OpenMMLab. All rights reserved. import argparse import glob import os import os.path as osp import sys import warnings from multiprocessing import Lock, Pool import mmcv import numpy as np def extract_frame(vid_item): """Generate optical flow using dense flow. Args: vid_item (list): ...
{"hexsha": "1ab21a4da645e08a1cd0342e0c783b8d71f2b360", "size": 4705, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/tools/extract_frames.py", "max_stars_repo_name": "leonnnop/VAR", "max_stars_repo_head_hexsha": "59be66371e9a8a8a3e239cb5bdb1cf7ac8e86cae", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from __future__ import print_function import time import numpy as np import random import scipy.io as sio import tensorflow as tf from six.moves import cPickle as pickle import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../../../utilities/')) sys.path.append(os.path.join(os.path.dirname(__fi...
{"hexsha": "52ba1ccce8c2d7aa9b976e8d01a88812c69a1c20", "size": 10203, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/dmp_coupling/learn_tactile_feedback/dummy/test_neural_nets_topologies.py", "max_stars_repo_name": "gsutanto/dmp", "max_stars_repo_head_hexsha": "4f4492cf4295d9c3fe0ba9ce2fb726bf37be40df", ...
#include <boost/log/trivial.hpp> #include "gtest/gtest.h" namespace FilterModel { TEST(boost_test, ImportWorks) { BOOST_LOG_TRIVIAL(info) << "Hi"; } } // namespace FilterModel
{"hexsha": "b6494dd5a6ae5c1e3e39792f98db968acae07704", "size": 178, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "c++/tests/boost_test.cpp", "max_stars_repo_name": "skinnersBoxy/input-filter", "max_stars_repo_head_hexsha": "6528b6dc094c59ac6d28a24016d0c42de495d313", "max_stars_repo_licenses": ["MIT"], "max_stars...
module nbrsTest_nd_module use amrex_fort_module, only : amrex_real, dim=>bl_spacedim use nbrs_test_module, only : nbr_sten implicit none contains subroutine fill_redist_stencil(lo, hi, slo, shi, sten, Nsten, mask, mask_lo, mask_hi, & vf, vf_lo, vf_hi) bind(C,name="fill_redist_stencil") integer, ...
{"hexsha": "2173c7ed76c35e544060fa9f25afbb6bd23d33bc", "size": 3828, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Tests/GeometryShop/vofStructures/nbrsTest_nd.f90", "max_stars_repo_name": "malvarado27/Amrex", "max_stars_repo_head_hexsha": "8d5c7a37695e7dc899386bfd1f6ac28221984976", "max_stars_repo_licenses"...
import urllib.request import json import btrack import arboretum import napari import numpy as np def mercator(track): """ mercator projection """ R = 160. S = 100. x0 = np.array(track.x) - 600. y0 = np.array(track.y) - 800. t = np.array(track.t) longitude = x0 / R latitude = 2. * ...
{"hexsha": "55f8c3fd1f57e154007f5062cc028154b9397d2b", "size": 1229, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test3D.py", "max_stars_repo_name": "laureho/arboretum", "max_stars_repo_head_hexsha": "b011dc5b5cf54340a06925d0420985444358df86", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "63745cd9019d765fa21ef65b4fedc7a88f05e727", "size": 2759, "ext": "py", "lang": "Python", "max_stars_repo_path": "iree/jax/array_types.py", "max_stars_repo_name": "mariecwhite/iree-jax", "max_stars_repo_head_hexsha": "6dc59ca0e2240af68d3435fe5f4a7bcbba1fafb6", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import numpy as np from DShap import DShap from shap_utils import convergence_plots, label_generator ''' 1. noise level: 2. select a simplistic model 3. create data: nominal 4. add noise 5. calculate shapely value. 6. plot shapely value in both cases. 7. ''' problem = 'classification' model = 'logistic' num_test = 1...
{"hexsha": "94d3aaa173bc63b8b0a4176c69f903adca5b5417", "size": 1161, "ext": "py", "lang": "Python", "max_stars_repo_path": "shap_robustness.py", "max_stars_repo_name": "anupamme/DataShapley", "max_stars_repo_head_hexsha": "80d22fd54b7d23f321e88b3063254563abe64eae", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Created on Wed Aug 28 11:35:38 2019 @author: AVyas """ #importing global_functions from global_functions import rescale #Import RealSense SDK import pyrealsense2 as rs # Import Numpy for easy array manipulation import numpy as np # Import OpenCV for easy image rendering import cv2 # Creat...
{"hexsha": "1b4bb5372607851ee2b166167b602ed64e145abb", "size": 3394, "ext": "py", "lang": "Python", "max_stars_repo_path": "checkerboard/detect_3checker_support_file.py", "max_stars_repo_name": "adityavyasbme/HeightMeasurement", "max_stars_repo_head_hexsha": "d83dcb6c137678b413bdce1bb458f523a23bf1e2", "max_stars_repo_l...
import numpy as np from mot_neural_solver.utils.iou import iou_pairs class MOTGraphAugmentor: """ Class to do data augmentation on a set of detections. It simulates missed detections and small shifts in bounding box coordinates. """ def __init__(self, graph_df, dataset_params): self.graph_d...
{"hexsha": "e20d4c3a6300fc0ab03c516eee92165602d88c82", "size": 5374, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mot_neural_solver/data/augmentation.py", "max_stars_repo_name": "yongxinw/mot_neural_solver", "max_stars_repo_head_hexsha": "5dec429be531a56ce5720416cd6a2f00447a2950", "max_stars_repo_licenses...
""" --- Add a white additive circular gaussian noise to input signal Added noise is real if input signal is real and computedlex is input signal is complex Noise level is controled by the second input parameter which is the signal to noise ratio (SNR) Signal power powSig is computed based in the input sequence powe...
{"hexsha": "faf8fe52001d3c24f60bf6d782a8fba631196e68", "size": 2100, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Channel/addNoise.jl", "max_stars_repo_name": "JuliaTelecom/DigitalComm.jl", "max_stars_repo_head_hexsha": "13c854b9c4a8864787075e06e0e3ef5a1d30beae", "max_stars_repo_licenses": ["MIT"], "max_st...
from socialsent import util import functools import numpy as np from socialsent import embedding_transformer from scipy.sparse import csr_matrix from multiprocessing import Pool from sklearn.linear_model import LogisticRegression, Ridge from socialsent.graph_construction import similarity_matrix, transition_matrix ""...
{"hexsha": "fe7fb63733cdd7872b6819d01c0211c3c87cf68a", "size": 8682, "ext": "py", "lang": "Python", "max_stars_repo_path": "socialsent/polarity_induction_methods.py", "max_stars_repo_name": "tjkreutz/socialsent-py3", "max_stars_repo_head_hexsha": "852f27252062b1ebca3e4c089a224b7947d95633", "max_stars_repo_licenses": ["...
import numpy as np import tensorflow as tf from util.Comparator_model import Model from util.Reference_selection import ref_select from util.Test_feature_extraction import test_feature_extract from util.Predict_age import predict_age import os import math import argparse import pandas as pd os.environ["CUD...
{"hexsha": "b306cccd28541a0f16c230a26a525943668e05ce", "size": 8084, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/comparator_test.py", "max_stars_repo_name": "changsukim-ku/order-learning", "max_stars_repo_head_hexsha": "9878b0376d04edae74ea8f3df97a9bd79f5a906b", "max_stars_repo_licenses": ["MIT"], "max_...