text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma rquot_D: "x \<preceq>\<^sub>R y \<Longrightarrow> z = rquot y x \<Longrightarrow> D x z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x \<preceq>\<^sub>R y; z = rquot y x\<rbrakk> \<Longrightarrow> D x z [PROOF STEP] using gR_rel_def rquot_prop [PROOF STATE] proof (prove) using this: (?x...
{"llama_tokens": 256, "file": "PSemigroupsConvolution_Partial_Semigroups", "length": 2}
\documentclass[../main.tex]{subfiles} \begin{document} \subsubsection{Comparing different radii} The first objective we set was determining the optimal beacon range. For this we tested all datasets, ceteris paribus, with the following levels of beacon radius: 0.25 till 3 with increments of 0.25 and also a radius of 0.1...
{"hexsha": "4ee20fc5ec4558210183e259a04a95d3c44f0b09", "size": 3469, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/subfiles/results.tex", "max_stars_repo_name": "JDevlieghere/MAS", "max_stars_repo_head_hexsha": "b00d2e5fa487b74a31f4092086d94ed01e348822", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import scipy.signal import scipy.fftpack as fftpack import numpy as np def sin(f,fs,time): x = np.linspace(0, 2*np.pi*f*time, fs*time) return np.sin(x) def downsample(signal,fs1=0,fs2=0,alpha=0,mod = 'just_down'): if alpha == 0: alpha = int(fs1/fs2) if mod == 'just_down': return signal...
{"hexsha": "c525c02c602fdd4e1753775dcc277abfb909af62", "size": 2969, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/dsp.py", "max_stars_repo_name": "HiYKY/candock", "max_stars_repo_head_hexsha": "fdbfced6f91f1d9a264bd6cdf9f957c03ec5d5d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
[STATEMENT] lemma converged_cd_diverge_cs: assumes \<open>is_path \<pi>\<close> and \<open>is_path \<pi>'\<close> and \<open>cs\<^bsup>\<pi>\<^esup> j = cs\<^bsup>\<pi>'\<^esup> j'\<close> and \<open>j<l\<close> and \<open>\<not> (\<exists>l'. cs\<^bsup>\<pi>\<^esup> l = cs\<^bsup>\<pi>'\<^esup> l')\<close> and \<open...
{"llama_tokens": 9129, "file": "IFC_Tracking_IFC", "length": 59}
""" Asif Khan """ import numpy as np import cv2 from mtcnn.mtcnn import MTCNN detector = MTCNN() def one_face(frame, bbs, pointss): # process only one face (center ?) offsets = [(bbs[:,0]+bbs[:,2])/2-frame.shape[1]/2, (bbs[:,1]+bbs[:,3])/2-frame.shape[0]/2] offset_dist = np.sum...
{"hexsha": "e63b10d62f081cd601194af7988dbf3483501c3a", "size": 7403, "ext": "py", "lang": "Python", "max_stars_repo_path": "pose_detection_mtcnn.py", "max_stars_repo_name": "fisakhan/Face_Pose", "max_stars_repo_head_hexsha": "b98e7338d1b64357e5842b507fb9e845dc48d126", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
<a href="https://colab.research.google.com/github/deep-learning-indaba/indaba-pracs-2019/blob/master/4a_recurrent_nets.ipynb" target="_parent"></a> # Practical 4a: Recurrent Neural Networks (RNNs) © Deep Learning Indaba. Apache License 2.0. ## Introduction Feedforward models (eg deep MLPs and ConvNets) map fixed-s...
{"hexsha": "bb7d0594ad046de47fa01f44f35c24be45f3557b", "size": 131300, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "4a_recurrent_nets.ipynb", "max_stars_repo_name": "amrrs/indaba-pracs-2019", "max_stars_repo_head_hexsha": "33f6121a8aec5856936254524c385ea847635e5a", "max_stars_repo_licenses": ["Ap...
#include <boost/program_options.hpp> #include <boost/format.hpp> #include <iostream> #include "../include/OutputFormatter.h" #include "../include/Genre.h" namespace RomViewer { /* Init Functions */ OutputFormatter::OutputFormatter() { } OutputFormatter::~OutputFormatter() { } /* Primary Functions */ void OutputForm...
{"hexsha": "991d9c674aa2ba63ca0a2ad654941a5ab3363078", "size": 1057, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/OutputFormatter.cpp", "max_stars_repo_name": "vyth/lsrom", "max_stars_repo_head_hexsha": "b926a1a2774f3c25d4e7d491d6de9296763557d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import numpy as np from torch.utils.data import DataLoader from typing import Tuple class TorchDataset: """`TorchDataset` class. Represents a dataset class for PyTorch. """ DATA_ROOT = "./data" @classmethod def numpy( cls, one_hot_encode: bool = True, transformers: s...
{"hexsha": "9d3a54205ca0770ae4f59b65f102cd9889b9d352", "size": 4040, "ext": "py", "lang": "Python", "max_stars_repo_path": "privacy_evaluator/datasets/torch/torch.py", "max_stars_repo_name": "chen-yuxuan/privacy-evaluator", "max_stars_repo_head_hexsha": "ed4852408108c3e6a01216af4183261945fd7e67", "max_stars_repo_licens...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data # (c) 07/2017-06/2019 : CNRS UMR 7344 IM2NP # (c) 07/2019-present : DESY PHOTON SCIENCE # authors: # Jerome Carnis, carnis_jerome@yahoo.fr import numpy as np from matpl...
{"hexsha": "a27c5a5c9602b07cb78a0344ea522ae7eb85c0e2", "size": 4165, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/postprocessing/bcdi_strain_mean_var_rms.py", "max_stars_repo_name": "sjleake/bcdi", "max_stars_repo_head_hexsha": "bf071ad085a11622158e1e651857a8a172c51cf1", "max_stars_repo_licenses": ["C...
"""Python library for backtesting and analyzing trading strategies at scale. While there are many great backtesting packages for Python, vectorbt was designed specifically for data mining: it excels at processing performance and offers interactive tools to explore complex phenomena in trading. With it you can traver...
{"hexsha": "01d79e96f5179598fd5b16fe9b900a963bb1457a", "size": 18721, "ext": "py", "lang": "Python", "max_stars_repo_path": ".venv/lib/python3.8/site-packages/vectorbt/__init__.py", "max_stars_repo_name": "eo1989/VectorBTanalysis", "max_stars_repo_head_hexsha": "bea3deaf2ee3fc114b308146f2af3e4f35f70197", "max_stars_rep...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{"hexsha": "8350c65ed54ba75222e685754d26b950fc50dbea", "size": 2941, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiple_user_representations/models/task_test.py", "max_stars_repo_name": "xxdreck/google-research", "max_stars_repo_head_hexsha": "dac724bc2b9362d65c26747a8754504fe4c615f8", "max_stars_repo_lice...
import logging import networkx as nx import numpy as np from joblib import Parallel, delayed from tqdm import tqdm from pygkernels.data.utils import np2nx class GraphGenerator: @classmethod def params_from_adj_matrix(cls, A, partition, name=None): return cls.params_from_graph(np2nx(A, partition), na...
{"hexsha": "6185783b6bc1942c051bac6124dc2406bf6b4cd4", "size": 1686, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygkernels/data/graph_generator.py", "max_stars_repo_name": "vlivashkin/pygraphs", "max_stars_repo_head_hexsha": "ec0ec0d064c0fc7f5a3620e94152bc3fe2f9feaf", "max_stars_repo_licenses": ["MIT"], "ma...
import os from qtpy.QtWidgets import QFileDialog from qtpy import QtGui import numpy as np from collections import OrderedDict import glob from NeuNorm.normalization import Normalization from __code.file_handler import make_or_reset_folder from __code.panoramic_stitching_for_tof.image_handler import HORIZONTAL_MARGIN...
{"hexsha": "c0fd8056178ae75d9d3a3225502f90ae80e89fcd", "size": 5916, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/__code/panoramic_stitching_for_tof/export.py", "max_stars_repo_name": "mabrahamdevops/python_notebooks", "max_stars_repo_head_hexsha": "6d5e7383b60cc7fd476f6e85ab93e239c9c32330", "max_st...
''' An implementation of a subset of the following symbolic nomenclature: http://www.ncbi.nlm.nih.gov/books/NBK310273/table/symbolnomenclature.T.monosaccharide_symb/?report=objectonly ''' import logging from collections import Counter from functools import partial import numpy as np from matplotlib.path import Pa...
{"hexsha": "80d543dc857b5c1b0a32dd4b33f51ef947a82599", "size": 19547, "ext": "py", "lang": "Python", "max_stars_repo_path": "glypy/plot/cfg_symbols.py", "max_stars_repo_name": "dcambie/glypy", "max_stars_repo_head_hexsha": "ecbf849b9686dc617a2e65ea171bcc33881a8db7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
ah1_file = path*"/SampleFiles/AH/ah1.f" ah1_fstr = path*"/SampleFiles/AH/ah1.*" ahc_file = path*"/SampleFiles/AH/lhz.ah" ah_resp = path*"/SampleFiles/AH/BRV.TSG.DS.lE21.resp" ah2_file = path*"/SampleFiles/AH/ah2.f" ah2_fstr = path*"/SampleFiles/AH/ah2.*" printstyled(" AH (Ad Hoc)\n", color=:light_green) print...
{"hexsha": "cab826290ca78b8bb7e2769053cfdbe7418fd56d", "size": 3523, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/DataFormats/test_ah.jl", "max_stars_repo_name": "UnofficialJuliaMirror/SeisIO.jl-b372bb87-02dd-52bb-bcf6-c30dd83fd342", "max_stars_repo_head_hexsha": "ae4ddd969c4c42281f36e218d5d3039af6c3146a"...
############################################################################### # 重要: 请务必把任务(jobs)中需要保存的文件存放在 results 文件夹内 # Important : Please make sure your files are saved to the 'results' folder # in your jobs # 本代码来源于 Notebook cell 里面的模型,大家进行离线任务时尽量只训练模型,不要进行模型评估等操作 ################################################...
{"hexsha": "08639803373506e53e1796d3ce90c8750f0f5bdd", "size": 9860, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_main.py", "max_stars_repo_name": "Stella925/Programming-Projects", "max_stars_repo_head_hexsha": "5d6357390e7494a10b675f02bd47cee75424c95f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import GPy import numpy as np from emukit.bayesian_optimization.acquisitions import ExpectedImprovement from emukit.bayesian_optimization.loops import UnknownConstraintBayesianOptimizationLoop from emukit.core import ContinuousParameter, ParameterSpace from emukit.core.loop import FixedIterationsStoppingCondition, Use...
{"hexsha": "3dad65944e11c75f72b4ae98d3c66fc2a3261171", "size": 1379, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/emukit/bayesian_optimization/test_constrained_loop.py", "max_stars_repo_name": "lfabris-mhpc/emukit", "max_stars_repo_head_hexsha": "ccb07f6bed0e9ae41dbeefdb3ad2ab247d3991e2", "max_stars_rep...
# Created by msinghal at 09/04/22 import os import numpy as np import networkx as nx import pandas as pd from sklearn import preprocessing from stellargraph import StellarGraph os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from stellargraph.datasets import DatasetLoader class MovieLens( DatasetLoader, name="Mov...
{"hexsha": "b284b830f7c9254aeb9f24e0e643bf684b625b7a", "size": 8003, "ext": "py", "lang": "Python", "max_stars_repo_path": "GraphicoRango/steller_graph_implementation/datasets.py", "max_stars_repo_name": "madansinghal/graphranko", "max_stars_repo_head_hexsha": "c975aa42104216237f4651c5b300a09ac8db02e8", "max_stars_repo...
import tensorflow as tf import os import time import json import pandas as pd import numpy as np """ Script to train a sequential NN. NN trains on training data, all results output to disk. Use this script over `train_and_predict.py` """ #GPU configuration - dont use too much memory os.environ["TF_GPU_ALLOCATOR"]="c...
{"hexsha": "4930cefa30c222d5a64e2e77b25b4e583e03ceb2", "size": 4744, "ext": "py", "lang": "Python", "max_stars_repo_path": "legacy/legacy_scripts/.ipynb_checkpoints/feature_importance-checkpoint.py", "max_stars_repo_name": "tomkimpson/ML4L", "max_stars_repo_head_hexsha": "ffa8360cb80df25bd6af4fa5cc39b42bd6f405cd", "max...
import os.path as osp import json, pickle import sys from math import sqrt from itertools import product from numpy import random import jittor as jt import numpy as np max_image_size = 550 augment_idx = 0 dump_file = 'weights/bboxes_aug.pkl' box_file = 'weights/bboxes.pkl' def augment_boxes(bboxes): bboxes_rel =...
{"hexsha": "71f236b773b43118ab1403c46fa3d02b5edb3b80", "size": 3985, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/augment_bbox.py", "max_stars_repo_name": "li-xl/Yolact.jittor", "max_stars_repo_head_hexsha": "10d93335b7e8c7a10cb9e62dc64b4ba9f9409ea5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
{"hexsha": "f08c80ad602fc8619425ed56ca3be8d2b150ef8b", "size": 2837, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/lite/tools/optimize/sparsity/format_converter_wrapper_pybind11_test.py", "max_stars_repo_name": "neochristou/tensorflow", "max_stars_repo_head_hexsha": "50b55bfc5c9132c3bd82505181380bff...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch from models.model import create_model, load_model from utils.image import get_affine_transform from utils.debugger import Deb...
{"hexsha": "4975e5cd1c91381bef6854f2f96249966e2ee258", "size": 8266, "ext": "py", "lang": "Python", "max_stars_repo_path": "chapter_08/lib/detectors/base_detector.py", "max_stars_repo_name": "XiangLiK/cv_course", "max_stars_repo_head_hexsha": "da7c2318fd4128bbdab96db26ddbb2524f37d0a0", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/env python3 # coding: utf-8 import logging import os import sys import warnings from argparse import ArgumentParser from typing import List, Tuple, Dict import numpy as np import pandas from pandas import DataFrame try: import matchbox except ImportError: sys.path.append(os.path.join(os.path.dirna...
{"hexsha": "9b922d598759cfc0bbcf6337cac53741db954a2c", "size": 4102, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/ds-summary.py", "max_stars_repo_name": "ayllon/MatchBox", "max_stars_repo_head_hexsha": "367b69c51f1ef4b574ce2a534d3e5441b2b2933b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from pathlib import Path from typing import Dict, List, Set, Tuple import networkx as nx import numpy as np import pandas as pd def sepset_dict_to_ndarray( sepsets: Dict[Tuple[int, int], Set[int]], variable_count: int, max_level: int ) -> np.ndarray: separation_sets = np.full((variable_count, variable_count,...
{"hexsha": "60dcbd3134ca87dadb257051e16aff424956d7af", "size": 2515, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/fixtures/file_readers.py", "max_stars_repo_name": "hpi-epic/gpucsl", "max_stars_repo_head_hexsha": "f461c47ce17105f7cf25aa65d39cb671021f07e4", "max_stars_repo_licenses": ["MIT"], "max_stars_...
__precompile__() module Utils # export @define, @reexport # # include("utils/macro_utils.jl") export istriustrict, istrilstrict export simd_scale!, simd_copy!, simd_copy_scale!, simd_copy_xy_first!, simd_copy_yx_first!, simd_copy_yx_first_last!, simd_xpy!, simd_ax...
{"hexsha": "11766ffc7a03ba27343cad20fb584aedbfead27e", "size": 404, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Utils.jl", "max_stars_repo_name": "ChrisRackauckas/GeomDAE.jl", "max_stars_repo_head_hexsha": "dbaf5d909dc1686d211312f4143ad7355ffbc325", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- """ Created on Sat Oct 12 14:51:16 2019 @author: Devendra Mishra """ #%% """ santa is matrix produced from the previous code synthetic outputs as out and input as inp took learning rate as lr=0.01 7 layers with tanh activation function and 1 layer of sigmoid activation function is used to tra...
{"hexsha": "e71af5997549b56dbd8a2c5ca023a494ca43afa6", "size": 4663, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ann.py", "max_stars_repo_name": "Devendra1225mishra/Optimisations", "max_stars_repo_head_hexsha": "dc59819693728807740cc7b510a5b643b3717fc7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd import glob filnames = glob.glob('data_transport/u_*') filnames.sort() dates = [filname.split('.')[-2].split('_')[-1] for filname in filnames] gammas = [filname.split('.')[-2].split('_')[-2] for filname in filnames] opt_types = [filname.s...
{"hexsha": "6989ad6fdc7f385acd78d9b3e5ef8638216531a9", "size": 6004, "ext": "py", "lang": "Python", "max_stars_repo_path": "make_check_list.py", "max_stars_repo_name": "clinfo/2021_Patients_Transport", "max_stars_repo_head_hexsha": "4f14cd0b1350eca98dfbe9d4ae530fda34759811", "max_stars_repo_licenses": ["Apache-2.0"], "...
""" Baseline Bi-GRU encoder -> MLP -> MST/ILP """ import tensorflow as tf import numpy as np import os, json, random, time, re, math from Sentence_Encoder import Sentence_Encoder from utils import load_data, build_vocab from os import path as fp from ilp import load_scip_output, mk_zimpl_input, dump_scores_to_dat_file...
{"hexsha": "94cbe4e57b6a09632f9a33d1d0bcb25acf65bd89", "size": 21805, "ext": "py", "lang": "Python", "max_stars_repo_path": "baseline/main.py", "max_stars_repo_name": "amillert/DialogueDiscourseParsing", "max_stars_repo_head_hexsha": "9baf9f957f054b0ed0e0f2668eabb26c74e38759", "max_stars_repo_licenses": ["BSD-2-Clause"...
""" @author: LXA Date: 2021年 2 月 20 日 """ import os import sys import tensorflow as tf import numpy as np import matplotlib import platform import shutil import DNN_data import time import DNN_base import DNN_tools import plotData import saveData # 记录字典中的一些设置 def dictionary_out2file(R_dic, log_fi...
{"hexsha": "9bf0b0b7d0faba7351c5ae21c625ba879193e85f", "size": 21872, "ext": "py", "lang": "Python", "max_stars_repo_path": "MissData_DNN.py", "max_stars_repo_name": "Blue-Giant/DNN2missdata_EQ", "max_stars_repo_head_hexsha": "be049af314ff0f85fcf7dd4f454be7ac59a93374", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
Ray teaches electric bass and is one of many area music teachers in Davis.
{"hexsha": "e0fe8c998fec95d2c6b422e4892c456df781f07c", "size": 78, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Ray_Yukich.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" Cantera Simulator Adapter module Used to run mechanism analysis with Cantera as an ideal gas in a batch reactor at constant V-U (adiabatic) """ import cantera as ct import numpy as np from typing import List, Optional, Type from rmgpy.tools.canteramodel import generate_cantera_conditions from rmgpy.tools.data imp...
{"hexsha": "d2bcf9b87bfc65b3aecd5774cf4d14995518fb88", "size": 26604, "ext": "py", "lang": "Python", "max_stars_repo_path": "t3/simulate/cantera_constantUV.py", "max_stars_repo_name": "ReactionMechanismGenerator/T3", "max_stars_repo_head_hexsha": "13e50482282c1ae4b82a9057eeaba5f3b8de2e8c", "max_stars_repo_licenses": ["...
# library imports library(tidyverse) library(scales) library(limma) library(edgeR) library(psych) # get the default plot width and height width <- options()$repr.plot.width height <- options()$repr.plot.height # load the IRS-normalized data and check the table data_import <- read_tsv("labeled_grouped_protein_summary...
{"hexsha": "4aa8590521f34b4bedc9a33b1899000b2a4c3e20", "size": 14805, "ext": "r", "lang": "R", "max_stars_repo_path": "Nat-Comm-2019_TMT_QE_averages.r", "max_stars_repo_name": "pwilmart/BCP-ALL_QE-TMT_Nat-Comm-2019", "max_stars_repo_head_hexsha": "646f1f4cf667df4f71aa31b3c994845e18c9a05d", "max_stars_repo_licenses": ["...
# ***************************************************************************** # © Copyright IBM Corp. 2018-2020. All Rights Reserved. # # This program and the accompanying materials # are made available under the terms of the Apache V2.0 # which accompanies this distribution, and is available at # http://www.apache....
{"hexsha": "942249580b5a13fbb06468e74ca6e977de3b3718", "size": 79597, "ext": "py", "lang": "Python", "max_stars_repo_path": "iotfunctions/anomaly.py", "max_stars_repo_name": "TheTheseus/functions", "max_stars_repo_head_hexsha": "526bb01598c80c5db8995a979a613a7aa6a1e126", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
\documentclass[11pt,letterpaper,roman]{moderncv} \usepackage{luapackageloader} \directlua{resume = require("resume")} % Modern CV type \moderncvstyle{classic} \moderncvcolor{grey} % Packages \usepackage{verbatim} \usepackage[margin=0.5in]{geometry} \usepackage{import} % Custom comand definitions \definecolor{cvblue}{...
{"hexsha": "14c506c7c442fea7bebea49643e3083c264cdb31", "size": 1379, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "EricLondresResume.tex", "max_stars_repo_name": "slondr/Resume", "max_stars_repo_head_hexsha": "4791a8e78ed32c8013e4f72fadd77e09639136b0", "max_stars_repo_licenses": ["0BSD"], "max_stars_count": 1, "...
# -*- coding: utf-8 -*- """ Colour Blindness Plotting ========================= Defines the colour blindness plotting objects: - :func:`plot_cvd_simulation_Machado2009` """ from __future__ import division from colour.blindness import cvd_matrix_Machado2009 from colour.plotting import CONSTANTS_COLOUR_STYLE, plot_...
{"hexsha": "43610d30deeec1ca2da7f47c005de25460cee557", "size": 2754, "ext": "py", "lang": "Python", "max_stars_repo_path": "colour/plotting/blindness.py", "max_stars_repo_name": "njwardhan/colour", "max_stars_repo_head_hexsha": "fedf769764b46cd0b4484cde7e4f59a09b37515c", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import argparse import os import random import sys import time import struct from collections import Counter from collections import deque from operator import itemgetter from tempfile import NamedTemporaryFile as NTF import SharedArray as sa import numpy as np from numba import jit from text_embedding.documents import...
{"hexsha": "1a585e927d9b23d55ccfb3d92f3eaecfabdbc3f1", "size": 33728, "ext": "py", "lang": "Python", "max_stars_repo_path": "solvers.py", "max_stars_repo_name": "NLPrinceton/text_embedding", "max_stars_repo_head_hexsha": "ee269727863982669ffb95c984c4220c1fba2834", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import torch import random import matplotlib.pyplot as plt import numpy as np from tqdm import tqdm import atexit from os import path import gym from torch.utils.tensorboard import SummaryWriter from models import StaticReconstructor, DiscriminatorConv from utils import WarpFrame, NoopResetEnv, MaxAndSkipEnv BATCH_SI...
{"hexsha": "ba7188e28f2107d0841394459a6bf3a0a70742a2", "size": 3083, "ext": "py", "lang": "Python", "max_stars_repo_path": "endecode.py", "max_stars_repo_name": "klemenkotar/optimus", "max_stars_repo_head_hexsha": "c454d48934a422a5033da2c5e8f4073dcbf60500", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#pragma once #include "kissfft.hh" #include <boost/math/constants/constants.hpp> #include <boost/optional.hpp> #include <cstddef> namespace vv { template <class T, class U> auto lerp(T x0, T x1, U ratio) { return x0 + (x1 - x0) * ratio; } template <class T> auto invlerp(T x0, T x1, T x) { return (x - x0) ...
{"hexsha": "c3db6cc05ad1805b7094c9412c731bfde37ff443", "size": 6847, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "vv/src/processor.hpp", "max_stars_repo_name": "planaria/vv", "max_stars_repo_head_hexsha": "08aebfbe37338fe1735fd3431f1178237941dde1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import datetime as dt import os import io import requests from dateutil.relativedelta import relativedelta from Modules.Utils import Listador, FindOutlier, FindOutlierMAD, Cycles from Modules.Graphs import GraphSerieOutliers, GraphSerieOutliersMAD def SST...
{"hexsha": "1e0e356cf22f78253be57bc1b26be4f731e1d446", "size": 6600, "ext": "py", "lang": "Python", "max_stars_repo_path": "Modules/ENSO.py", "max_stars_repo_name": "cmcuervol/HydroBalbo", "max_stars_repo_head_hexsha": "0c70536305d12f6fb9fb8fe7ce7cdb08d88472af", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#include <cassert> #include <cmath> #include <functional> #include <numeric> #include <sstream> #include <boost/multiprecision/gmp.hpp> #include <QtDebug> using s64 = int64_t; using namespace std; using boost::multiprecision::mpq_rational; QDebug operator<<(QDebug d, const mpq_rational& r) { d.nospace(); ...
{"hexsha": "d0082201219a366ebef5645dd13d7f9f37241af0", "size": 2919, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "project-euler/205/main.cpp", "max_stars_repo_name": "hydroo/coding-and-math-exercises", "max_stars_repo_head_hexsha": "c0c9b8ae48e043b0809e4c592444f3e4bc3222d8", "max_stars_repo_licenses": ["CC0-1.0...
(* Author: Simon Wimmer *) theory TA_Graphs imports More_List Stream_More "HOL-Library.Rewrite" begin chapter \<open>Graphs\<close> section \<open>Basic Definitions and Theorems\<close> locale Graph_Defs = fixes E :: "'a \<Rightarrow> 'a \<Rightarrow> bool" begin inductive steps where Single: "steps [...
{"author": "wimmers", "repo": "archive-of-graph-formalizations", "sha": "cf49dd3379174cca7f3f1de16214e1c66238841e", "save_path": "github-repos/isabelle/wimmers-archive-of-graph-formalizations", "path": "github-repos/isabelle/wimmers-archive-of-graph-formalizations/archive-of-graph-formalizations-cf49dd3379174cca7f3f1de...
# ! /usr/bin/env python import argparse import os import numpy as np import json from voc import parse_voc_annotation from yolo import create_yolov3_model, create_yolov3_tiny_model, dummy_loss from generator import BatchGenerator from utils.utils import normalize, evaluate, makedirs from keras.callbacks impo...
{"hexsha": "7ad3cefe6c8bfe8a5319dfe5522e111ef59b2782", "size": 13713, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "LachlanMares/keras-yolo3-generic", "max_stars_repo_head_hexsha": "abc0ad0488e727b3d997a924b57356ace2caf444", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import os import sys import glob import time import copy import logging import argparse import random import numpy as np import torch import torch.nn as nn import torch.utils import torch.nn.functional as F import torch.backends.cudnn as cudnn import utils from controller import NAO from nasbench import api def build...
{"hexsha": "e83003b219003c665e787cb06dad344461680f20", "size": 13410, "ext": "py", "lang": "Python", "max_stars_repo_path": "nasbench/train_seminas.py", "max_stars_repo_name": "PeterouZh/SemiNAS", "max_stars_repo_head_hexsha": "39731663271b994571160d43d796b2bb93386b3b", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
!COMPILER-GENERATED INTERFACE MODULE: Fri Mar 6 15:34:29 2020 ! This source file is for reference only and may not completely ! represent the generated interface used by the compiler. MODULE DIAGOSC_EMBM__genmod INTERFACE SUBROUTINE DIAGOSC_EMBM(ISTEP,IOUT,EXT,FX0...
{"hexsha": "14d659bf0dd4c68daf0a774c8ed172d535db112e", "size": 708, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "genie-embm/src/fortran/diagosc_embm__genmod.f90", "max_stars_repo_name": "crem33/EcoGENIE_LA", "max_stars_repo_head_hexsha": "89032945316dc2827478100ed6bf60143e31f34d", "max_stars_repo_licenses":...
#!/usr/bin/env python """ Generate events and perform jet finding. Can be invoked via ``python -m jet_hadron.event_gen.jet_analyis -c ...``. .. codeauthor:: Raymond Ehlers <raymond.ehlers@cern.ch>, Yale University """ import abc import enlighten import logging import numpy as np import os import pyjet from scipy.sp...
{"hexsha": "b5dc1fb47e42de9e3d59c43c14ba2a63b4a33a68", "size": 27353, "ext": "py", "lang": "Python", "max_stars_repo_path": "jet_hadron/event_gen/jet_analysis.py", "max_stars_repo_name": "raymondEhlers/alice-jet-hadron", "max_stars_repo_head_hexsha": "8526567935c0339cebb9ef224b09a551a0b96932", "max_stars_repo_licenses"...
import numpy as np import scipy.stats as sp import matplotlib.pyplot as plt import h5py def manifold(gridSize, binary, epoch): f = h5py.File('params/ff_epoch_' + str(epoch) + '.hdf5','r') wsig = np.matrix(f["wsig"]) bsig = np.matrix(f["bsig"]).T if binary: shape = (28,28) activation ...
{"hexsha": "fc54241a36be6b027a4628567af9f78211205098", "size": 1427, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot.py", "max_stars_repo_name": "TobiasMR/AEVB", "max_stars_repo_head_hexsha": "78b780f69d5d5136b49bcaff7da96eabb34de31a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
""" collection of useful miscellaneous functions """ def get_dim_exp(exp): """ outputs hard-coded data dimensions (lat-lon-lev-time) for a given simulation """ if exp == "QSC5.TRACMIP.NH01.L.pos.Q0.300.lon0.150.lond.45.lat0.0.latd.30": from ds21grl import dim_aqua_short as dim else...
{"hexsha": "134f15917aa2fbb9ad54862e24e8149153f10b8a", "size": 8804, "ext": "py", "lang": "Python", "max_stars_repo_path": "ds21grl/misc.py", "max_stars_repo_name": "edunnsigouin/ds21grl", "max_stars_repo_head_hexsha": "b6544cbc97529943da86e48a437ce68dc00e0f82", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
#pragma once #include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <boost/shared_ptr.hpp> #include "macros.h" namespace cloudproc { class CloudGrabberImpl; struct RGBD { typedef boost::shared_ptr<RGBD> Ptr; std::vector<unsigned char> rgb; std::vector<unsigned short> depth; RGBD() : rgb(480*640*3...
{"hexsha": "fe31f59a1987a06f40e43e688d707c07011b2366", "size": 795, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/cloudproc/cloudgrabber.hpp", "max_stars_repo_name": "HARPLab/trajopt", "max_stars_repo_head_hexsha": "40e2260d8f1e4d0a6a7a8997927bd65e5f36c3a4", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
""" SE-ResNet for CUB-200-2011, implemented in Gluon. Original paper: 'Squeeze-and-Excitation Networks,' https://arxiv.org/abs/1709.01507. """ __all__ = ['seresnet10_cub', 'seresnet12_cub', 'seresnet14_cub', 'seresnetbc14b_cub', 'seresnet16_cub', 'seresnet18_cub', 'seresnet26_cub', 'seresnetbc26b_cu...
{"hexsha": "e0575014302c61a6366d08182911d69a0fffacd2", "size": 15666, "ext": "py", "lang": "Python", "max_stars_repo_path": "gluon/gluoncv2/models/seresnet_cub.py", "max_stars_repo_name": "naviocean/imgclsmob", "max_stars_repo_head_hexsha": "f2993d3ce73a2f7ddba05da3891defb08547d504", "max_stars_repo_licenses": ["MIT"],...
from housing_df.utils import build_housing_df_registry_for_all_regions, save_all_dfs_in_registry from housing_df.specific import RegionDF, MetroDF from housing_df.workflow.report import Report import pandas as pd import numpy as np class MetroAreasRanked(Report): def __init__(self, housing_type): self.reg...
{"hexsha": "ad38bb400fd00a13706d31a58af5e73222883758", "size": 1278, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/housing_df/workflow/metro_areas_ranked.py", "max_stars_repo_name": "ojarrett/housing-data-utils", "max_stars_repo_head_hexsha": "f041e789ff8de7f08550a1d39641dfd1b683f324", "max_stars_repo_lice...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Jie Yang, Wei wu, Xiaoy LI # Last update: 2019.03.12 # First create: 2017.06.15 # Concate: # import os import sys root_path = "/".join(os.path.realpath(__file__).split("/")[:-3]) if root_path not in sys.path: sys.path.insert(0, root_path) impo...
{"hexsha": "4072c072a9617f750953160b1b3c4e2eead567f7", "size": 19712, "ext": "py", "lang": "Python", "max_stars_repo_path": "glyce/bin/run_lattice_lstm.py", "max_stars_repo_name": "TimSYQQX/glyce", "max_stars_repo_head_hexsha": "1542ed30ce104c25aa5c69ffcc9cc5ef2fcda975", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# Copyright 2020 MIT Probabilistic Computing Project. # See LICENSE.txt from math import log import pytest from numpy import linspace from sppl.distributions import bernoulli from sppl.distributions import beta from sppl.distributions import randint from sppl.compilers.ast_to_spe import IfElse from sppl.compilers.a...
{"hexsha": "0706de0a01ab04120ddced102df2d39cb131bbc6", "size": 3919, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_ast_switch.py", "max_stars_repo_name": "SEICS/sppl", "max_stars_repo_head_hexsha": "902c8c0ec0144fbabc8c0f33b15850af238e8d38", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
# Morphological operation functions for HDI data preparation # Developer: Joshua M. Hess, BSc # Developed at the Vaccine & Immunotherapy Center, Mass. General Hospital # Import external modules import numpy as np import skimage.filters import skimage.morphology import skimage.color import scipy.sparse # Define funct...
{"hexsha": "fa7f4c00fbefe7b385405e62c94afe2faece0159", "size": 7067, "ext": "py", "lang": "Python", "max_stars_repo_path": "HDIprep/morphology.py", "max_stars_repo_name": "JoshuaHess12/hdi-prep", "max_stars_repo_head_hexsha": "224994b17b229abb30c29e9e70579ad8fdfeff8a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import torch import numpy as np # From https://github.com/soumith/dcgan.torch/issues/14 def np_slerp(val, low, high): omega = np.arccos(np.clip(np.dot(low/np.linalg.norm(low), high/np.linalg.norm(high)), -1, 1)) so = np.sin(omega) if so == 0: return (1.0-val) * low + val * high # L'Hopital's rule/...
{"hexsha": "a03f484ad7f67a0aa74ca93641d9b84dcdef954b", "size": 717, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/slerp.py", "max_stars_repo_name": "li012589/NeuralWavelet", "max_stars_repo_head_hexsha": "6e593ded5cb4ae80579cbf56eb9c346d808669cb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import numpy as np import pandas as pd import logging from math import pi from datetime import datetime BASE_FEATURES = ['ip', 'app', 'device', 'os', 'channel'] def feature_creation(data_directory): """ Reads in the raw data stored in the data_directory (either sample, train, or test) and builds the requ...
{"hexsha": "adbf425532707ae32389878b15dd9cfacbbd18c0", "size": 1631, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/build_features.py", "max_stars_repo_name": "KennedyMurphy/AdTracking", "max_stars_repo_head_hexsha": "dfe69b89ada8fc3a3b5aae59de018e49267d7201", "max_stars_repo_licenses": ["FTL"], "m...
(** * Copyright (C) 2022 BedRock Systems, Inc. * All rights reserved. * * SPDX-License-Identifier: LGPL-2.1 WITH BedRock Exception for use over network, see repository root for details. *) Require Import iris.algebra.agree. Require Import iris.proofmode.proofmode. Require Import bedrock.lang.bi.spec.frac_splittab...
{"author": "bedrocksystems", "repo": "BRiCk", "sha": "23d7e64cc53706de608dbff0be75d1c4b8c3a7ec", "save_path": "github-repos/coq/bedrocksystems-BRiCk", "path": "github-repos/coq/bedrocksystems-BRiCk/BRiCk-23d7e64cc53706de608dbff0be75d1c4b8c3a7ec/theories/lang/cpp/logic/lib/auth_frac.v"}
# -*- coding: utf-8 -*- """ Created on Mon Jun 8 17:03:43 2020 @author: Shoba Banik """ import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") train = pd.read_csv('C:/Users/S...
{"hexsha": "9b29c9c5f7f714207377b0a2d2134c7018b066d4", "size": 3529, "ext": "py", "lang": "Python", "max_stars_repo_path": "Loan_SVM/Loan_svm.py", "max_stars_repo_name": "ShobaBanik/SVM_shoba", "max_stars_repo_head_hexsha": "3a428156fb085504ff0c5560b37f438f276d59d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""High-level API for cubic splines""" import numpy import numpy as np from ..cartesian import mlinspace class CubicSpline: """Class representing a cubic spline interpolator on a regular cartesian grid..""" __grid__ = None __values__ = None __coeffs__ = None def __init__(self, a, b, orders, v...
{"hexsha": "008f6000bd66928040f8ac4be05c0b00bc84069a", "size": 7070, "ext": "py", "lang": "Python", "max_stars_repo_path": "interpolation/splines/splines.py", "max_stars_repo_name": "vishalbelsare/interpolation.py", "max_stars_repo_head_hexsha": "116d144700a1c78b5ad86eee097d064610be8325", "max_stars_repo_licenses": ["B...
import h5py from mpi4py import MPI import numpy as np import time comm = MPI.COMM_WORLD rank = comm.rank # The process ID (integer 0-3 for 4-process run) size = comm.size def MPI_open(comm,handle,key,nparts): ## figure out how many particles each MPI task is supposed to read num_per_task = int(nparts//comm....
{"hexsha": "726abcfebf99abaa7911c38fd5778dd93db8a6f2", "size": 1869, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/abg_python/parallel/parallel_read.py", "max_stars_repo_name": "agurvich/abg_python", "max_stars_repo_head_hexsha": "f76425481781e6e8e28caf9e8290c0b5b920ab91", "max_stars_repo_licenses": ["MIT"...
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies ! This file was ported from Lean 3 source module combinatorics.double_counting ! leanprover-community/mathlib commit 327c3c0d9232d80e250dc8f65e7835b82b266ea5 ! Please do no...
{"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/Combinatorics/Doubl...
// Copyright Oliver Kowalke 2013. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FIBERS_H #define BOOST_FIBERS_H #include <boost/fiber/algo/algorithm.hpp> #include...
{"hexsha": "b1919dbbf0252cbdd4c865caa29f12affd601da9", "size": 1557, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "REDSI_1160929_1161573/boost_1_67_0/boost/fiber/all.hpp", "max_stars_repo_name": "Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo", "max_stars_repo_head_hexsha": "eb0f7ef64e188fe871f47c2ef9cdef36d8a66bc8",...
# coding: utf-8 # In[ ]: # Copyright (c) 2017 Andrew Glassner # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
{"hexsha": "bc365c6474f60802f021ca3f3e24a21bd7c3bb78", "size": 5646, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/lectures/lecture18/notes/DLBasics_Utilities.py", "max_stars_repo_name": "sytseng/2019-CS109B", "max_stars_repo_head_hexsha": "3ecde086bcc77dbac2e930fa3bdc93f94a1f2b6d", "max_stars_repo_licens...
# -*- coding: utf-8 -*- from flask import Flask, render_template, request import torch from torch import nn from torch.utils.data import Dataset import gluonnlp as nlp import numpy as np import kss from googletrans import Translator from itertools import combinations from krwordrank.word import summarize_with_keywor...
{"hexsha": "ce4499dbb538ddffbdcf9b6542bc6d1814445646", "size": 6225, "ext": "py", "lang": "Python", "max_stars_repo_path": "web/server.py", "max_stars_repo_name": "hanna56/Teddy", "max_stars_repo_head_hexsha": "c89a2a81ca4cb4c6cc2e41e70b49028d81d5e391", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
%----------------------------------------------------------------------------------------------- \section*{Conflict of Interest} The authors declare that there is no conflict of interest in this work. %-----------------------------------------------------------------------------------------------
{"hexsha": "14a9eafb333534d8a7a940b431e4b301a7bdf1f9", "size": 305, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "02-01-conflicts.tex", "max_stars_repo_name": "cnaak/man-CarnotPrinciple", "max_stars_repo_head_hexsha": "b258fa7508d8049d2c1a958ffab58ff9b17c78ff", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_star...
""" Sampling from a poisson distribution """ abstract type AbstractPoissonDistribution <: AbstractSampleDistribution end struct PoissonSampleDistribution{T} <: AbstractPoissonDistribution lambda::T function PoissonSampleDistribution(lambda::T) where {T <: AbstractFloat} return new{T}(lambda) end end """ ...
{"hexsha": "69b7e843109beea3ddd73b50e96ca4c27f3029d8", "size": 3781, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "glmSolverjl/src/simulate.jl", "max_stars_repo_name": "dataPulverizer/glmSolver", "max_stars_repo_head_hexsha": "d82623caac1e14d29ee09fbafa7efbbd5d6ee0bf", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- """CNN.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1K2l75LJfglEOZG4M09pzFUqdUfemlWQ3 """ !unzip -qq /content/drive/MyDrive/Data/joined.zip import numpy as np import pandas as pd import keras from keras.layers import...
{"hexsha": "b2a4be031d7427c9cb32a69382aa070b6c210a0b", "size": 3316, "ext": "py", "lang": "Python", "max_stars_repo_path": "Models/cnn.py", "max_stars_repo_name": "GunH-colab/CovidOps", "max_stars_repo_head_hexsha": "6a64a85d60f158fbe15a7f116a972ce419366996", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
# -*- coding: utf-8 -*- """ MWT collision graph manipulation general utilities """ from __future__ import ( absolute_import, division, print_function, unicode_literals) import six from six.moves import (zip, filter, map, reduce, input, range) # standard library import itertools import collections import types ...
{"hexsha": "409c62698872e36a9a170c160825a90538bcf75b", "size": 5340, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/waldo/collider/simplifications/util.py", "max_stars_repo_name": "amarallab/waldo", "max_stars_repo_head_hexsha": "e38d23d9474a0bcb7a94e685545edb0115b12af4", "max_stars_repo_licenses": ["MIT"]...
import os import json import datetime import numpy as np import glob from easydict import EasyDict def edict2dict(edict_obj): dict_obj = {} for key, vals in edict_obj.items(): if isinstance(vals, EasyDict): dict_obj[key] = edict2dict(vals) else: dict_obj[key] = vals return dict_obj def ge...
{"hexsha": "7d4e562eaa2179c162bbdff292406f9d143f15dc", "size": 2121, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework/run_utils.py", "max_stars_repo_name": "DeLightCMU/ElaborativeRehearsal", "max_stars_repo_head_hexsha": "0cf2a234b4716ff7a16fdbf4b18c173cc42fbcc4", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma invariant_start: "\<lbrakk>wf_state r; wf_state s\<rbrakk> \<Longrightarrow> invariant r s ([([], r, s)], [], {(post r, post s)})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>wf_state r; wf_state s\<rbrakk> \<Longrightarrow> invariant r s ([([], r, s)], [], {(post r, post s)}) [PROOF ...
{"llama_tokens": 150, "file": "MSO_Regex_Equivalence_Pi_Equivalence_Checking", "length": 1}
import numpy as np from matplotlib.axes import Axes from matplotlib.patches import Ellipse from .c_ellipsoid2 import AsymmetricEllipsoidalShell, EllipsoidalShellWithSizeDistribution from .c_gauss_ellipsoid import I0Rgfromrho, rhofromI0Rg, F2GaussianEllipsoid from ..core import FitFunction class F2AsymmetricCoreShell...
{"hexsha": "3d4c0046eb6ca878084f7ac829d8bcf88d830601", "size": 7843, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/saxsfittool/fitfunction/ellipsoid/ellipsoid.py", "max_stars_repo_name": "awacha/saxsfittool", "max_stars_repo_head_hexsha": "20e9a8aecf680cfc5f3b84264b932c9a50e47085", "max_stars_repo_licenses...
! requires pulchra.dat module nmr implicit none ! variables for adding backbone atoms integer,parameter:: num_stat = 2363 integer,parameter:: num_stat_pro = 1432 ! stats for proline integer, dimension(num_stat,3),save:: nco_stat_bin integer, dimension(num_stat_pro,3),save:: nco_stat_pro_bin ...
{"hexsha": "397065ba9863641975816eaa7b2da93a9590859e", "size": 79213, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "itasser/nmr.f90", "max_stars_repo_name": "fanufree/assign-it", "max_stars_repo_head_hexsha": "7eae0828aea4964f1d459a14a0e13025fefc4c9a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np from numpy.polynomial.legendre import legval from scipy import linalg from ..fixes import einsum from ..utils import logger, warn, verbose from ..io.pick import pick_types, pick_channels, pick_info from ..surface impor...
{"hexsha": "9c6fdafa2353d4f82397df632436ffe9bfb9d6f1", "size": 6725, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/channels/interpolation.py", "max_stars_repo_name": "jasmainak/mne-python", "max_stars_repo_head_hexsha": "039cb1bf52770019bd48ac028795af0861792fa2", "max_stars_repo_licenses": ["BSD-3-Clause"]...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2020 Ryan L. Collins <rlcollins@g.harvard.edu> # and the Talkowski Laboratory # Distributed under terms of the MIT license. """ Identify, cluster, and refine all significant segments per HPO from rCNV sliding window analysis """ from os import path imp...
{"hexsha": "c2fb42258db4999471fc799258135708138ae41f", "size": 74900, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/sliding_windows/refine_significant_regions.py", "max_stars_repo_name": "talkowski-lab/rCNV2", "max_stars_repo_head_hexsha": "fcc1142d8c13b58d18a37fe129e9bb4d7bd6641d", "max_stars_repo_li...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "bc447b0f1c55fbb96d9fe98c7fbffa0431203d71", "size": 42525, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/mxnet/gluon/loss.py", "max_stars_repo_name": "franciscocalderon2/incubator-mxnet", "max_stars_repo_head_hexsha": "3260862c1ea928e99af5517b8e8ce16e670205a9", "max_stars_repo_licenses": ["Ap...
# -*- coding: utf-8 -*- from base import Parameter, Channel, Estimator, Report, Constant import numpy as np def _cos_partial(x): return (x/2.0 + 1/4.0 * np.sin(2.0*x)) def _sin_partial(x): return (x/2.0 - 1/4.0 * np.sin(2.0*x)) class ThetaFFT(Parameter): """An angle of decesion from the |0> pole.""" ...
{"hexsha": "0c3b7a4322ea156977b4721db332d0015dd23d99", "size": 3766, "ext": "py", "lang": "Python", "max_stars_repo_path": "drift_qec/oneangleheuristic.py", "max_stars_repo_name": "janmtl/drift_qec", "max_stars_repo_head_hexsha": "3b1c703d151f9dc2833b761f85586cd09666557b", "max_stars_repo_licenses": ["0BSD"], "max_star...
import numpy as np def process_state_static(state, dist_norm): location = state.physics.location rotation = state.physics.rotation velocity = state.physics.velocity ang_vel = state.physics.angular_velocity boost = state.boost_amount jumped = 1 if state.jumped else -1 double_j = 1 if state.d...
{"hexsha": "c92a0abb863034e70da15cf8ba04528ae270b06e", "size": 2790, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ml_dir/experience_replay_buffer.py", "max_stars_repo_name": "danielbairamian/RL-RL", "max_stars_repo_head_hexsha": "4fc4ac14bd10088e83e7a15c3319370f74d0a756", "max_stars_repo_licenses": ["MIT"...
import cv2 as cv import numpy as np def read(): return cv.imread("images/bolt.jpg")
{"hexsha": "1386ea9f5c3c4b3cf6776f105e777a65e6ae61f6", "size": 89, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/test_camera.py", "max_stars_repo_name": "karagenit/material-sorter", "max_stars_repo_head_hexsha": "9bd195ab1fcfb72cb41e3ad3d35cf7b8f55bafe3", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import rospy import bisect import numpy as np import time import logging import math from time_msg_container import * from plan_scoring import * # Messages from geometry_msgs.msg import Twist, PoseStamped, Point, Quaternion from sensor_msgs.msg import LaserScan from nav_msgs.msg import Path, Odometry from move_base_m...
{"hexsha": "c1200d0e294ac9def4718b3efe4e077eb288e617", "size": 7040, "ext": "py", "lang": "Python", "max_stars_repo_path": "planner_comparison/python/planner_comparison/plan_scoring.py", "max_stars_repo_name": "IhabMohamed/deep_motion_planning", "max_stars_repo_head_hexsha": "6512f651bafbb56710ddbae501a5b4c22d56ac66", ...
function solve() n, a, b = [parse(Int, x) for x in split(readline())] n - a + b end println(solve())
{"hexsha": "1361fb38b1b7de81cff696041844c8a6f57b4079", "size": 110, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "abc171-180/abc180/a.jl", "max_stars_repo_name": "aishikawa/atcoder-julia", "max_stars_repo_head_hexsha": "93339ea6dd954b0739b3895a5625f94433e33baf", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
### A Pluto.jl notebook ### # v0.15.1 using Markdown using InteractiveUtils # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). macro bind(def, element) quote loc...
{"hexsha": "f0db2d1922c610c433d56609e77a7044b998b223", "size": 6592, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/fluxExamples.jl", "max_stars_repo_name": "aniketjivani/variational-autoencoders", "max_stars_repo_head_hexsha": "bba54d571b2c674e73dee3c018fdce5701d06940", "max_stars_repo_licenses": ["MI...
C Copyright restrictions apply - see stsdas$copyright.stsdas C SUBROUTINE GEOPOS(LATI,LONGI,MLAT,MLONG,ISTAT) * * Module number: * * Module name: GEOPOS * * Keyphrase: * ---------- * Calculate geomagnetic position from geographic position * * Description: * ------------ * This routine calcu...
{"hexsha": "a41d0e0269ffba7cb3122989ceb3c9ce27964052", "size": 2827, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "stsdas/pkg/hst_calib/stpoa/poa_fos/poa_calfos/geopos.f", "max_stars_repo_name": "iraf-community/stsdas", "max_stars_repo_head_hexsha": "043c173fd5497c18c2b1bfe8bcff65180bca3996", "max_stars_repo_l...
""" Script to compare different approaches to selecting Q-values according to integer action indices. Compares two approaches: 1. Create a new one-hot encoding, apply the element-wise product, and reduce 2. Use torch.gather() """ import time from numpy import dtype import torch import torch.nn as nn class Stopwatch:...
{"hexsha": "ca74e23b38f761beb152521981049286b092c722", "size": 2652, "ext": "py", "lang": "Python", "max_stars_repo_path": "junk/torch_benchmarks.py", "max_stars_repo_name": "oliehoek-research/interactive_agents", "max_stars_repo_head_hexsha": "fddf99fed8e6aaf213c658897c2e232fe5323053", "max_stars_repo_licenses": ["MIT...
# coding=utf-8 import tensorflow as tf import numpy as np from PIL import Image import matplotlib.pyplot as plt import cv2 import forward import backward import file Z1_PREDICT_PATH = '.\\predict\\Z1\\Z1-' def restore_model(time): with tf.Graph().as_default() as tg: x = tf.placeholder(tf.float32, [None,...
{"hexsha": "4b1e5739504bcd79aa9a55bb7e392b7013e74792", "size": 1669, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "DolorHunter/model_build_B", "max_stars_repo_head_hexsha": "7b189ebe4a95c328f13bde458fb245d3c5a37830", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
# Databricks notebook source # MAGIC %md ** Credit Card Fraud Detection ** : Supervised Machine Learning model is built to classify whether the transaction is fraud or not.<br> # MAGIC ** Dataset Source ** : The dataset used in this experiment has been downloaded from kaggle. The input dataset contains 3075 rows and 1...
{"hexsha": "4cb7e9284faf812375ba1a942f8ee4c8cdf017d0", "size": 5163, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/Users/shamir.alavi@cra-arc.gc.ca/Training.py", "max_stars_repo_name": "dg1223/ML-pipeline", "max_stars_repo_head_hexsha": "b421fd8dddb695689ffe6dcf58c7640625066074", "max_stars_repo_lice...
epsilon=1e-9 from math import * from alpha_zero.player.player_inherit_from import Player import random class Node: """ A node in the game tree. Note wins is always from the viewpoint of playerJustMoved. Crashes if state not specified. """ def __init__(self, move=None, parent=None, state=None): ...
{"hexsha": "6b89e609d7ab0ab2c38eaa38cf10da7994713dfd", "size": 7721, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/alpha_zero/player/mcts.py", "max_stars_repo_name": "theputernerd/alpha-zero-theputernerd", "max_stars_repo_head_hexsha": "7d0defbdbd4824a6104f8a889ca4c24d330c4ed2", "max_stars_repo_licenses": ...
PIPaginationLinks <- function(first = NULL, previous = NULL, last = NULL) { if (is.null(first) == FALSE) { if (is.character(first) == FALSE) { return (print(paste0("Error: first must be a string."))) } } if (is.null(previous) == FALSE) { if (is.character(previous) == FALSE) { return (print(paste0("Error:...
{"hexsha": "cc5e2c1f3036053ca2bd3bce856cb1a70cb937fd", "size": 678, "ext": "r", "lang": "R", "max_stars_repo_path": "R/PIPaginationLinks.r", "max_stars_repo_name": "frbl/PI-Web-API-Client-R", "max_stars_repo_head_hexsha": "1e12907493053fe10c8b9feb229584b741d4ae2e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import logging import re import time from typing import List, Optional, Tuple, Union import numpy as np import pandas as pd try: from tqdm import tqdm except ImportError: def tqdm(*args, **kwargs): if args: return args[0] return kwargs.get("iterable", None) from collections impo...
{"hexsha": "094a20343361b66630c9236717f89eac1e38f46c", "size": 11846, "ext": "py", "lang": "Python", "max_stars_repo_path": "blm_header/header_maker.py", "max_stars_repo_name": "loiccoyle/blm_header", "max_stars_repo_head_hexsha": "f3430ad5013bcd6f1918ca1ec1ef9b676335c885", "max_stars_repo_licenses": ["MIT"], "max_star...
\documentclass[12pt, titlepage]{article} \usepackage{booktabs} \usepackage{tabularx} \usepackage{hyperref} \usepackage{verbatim} \usepackage{fancyhdr} \usepackage{graphicx} \pagestyle{fancy} \hypersetup{ colorlinks, citecolor=black, filecolor=blue, linkcolor=red, urlcolor=blue } \usepackage[round]...
{"hexsha": "802178fcf06440084ff029cf42ffa5c4ee3680f3", "size": 22268, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/TestPlan/TestPlan.tex", "max_stars_repo_name": "curiouskunal/Ultimate_TicTacToe", "max_stars_repo_head_hexsha": "e77381d526e4f2e8ef325238d3e73419d7ed35ea", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2017 Martin Haesemeyer. All rights reserved. # # Licensed under the MIT license """ Script to create movie frames of network activations upon temperature stimulation and behavior generation """ import sys import numpy as np import h5py import matplotlib as mpl import matplotlib.pyplot as pl import tkint...
{"hexsha": "e0b08a249bd160f91a206348dca94120a01c3a74", "size": 2737, "ext": "py", "lang": "Python", "max_stars_repo_path": "activationMovie.py", "max_stars_repo_name": "haesemeyer/GradientPrediction", "max_stars_repo_head_hexsha": "679b48768ad74dccd58f8c2f434ad60036fc5cb7", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma lift_add : "insertion (f::nat\<Rightarrow>real) (liftPoly 0 z (a + b)) = insertion f (liftPoly 0 z a + liftPoly 0 z b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. insertion f (liftPoly 0 z (a + b)) = insertion f (liftPoly 0 z a + liftPoly 0 z b) [PROOF STEP] using liftPoly_add[of 0 z a b] [PRO...
{"llama_tokens": 250, "file": "Virtual_Substitution_Debruijn", "length": 2}
import os import sys import numpy as np import pandas as pd import torch import torch.nn as nn import cv2 from skimage import io from skimage.transform import resize sys.path.append('../') from model.models import CRNet from config.cfg import cfg def prepare_data(model): """ prepare training and test set ...
{"hexsha": "8dc75af8a824cfa892c3a79ad1dfc88508012d4c", "size": 3579, "ext": "py", "lang": "Python", "max_stars_repo_path": "main/fer.py", "max_stars_repo_name": "lucasxlu/CRNet", "max_stars_repo_head_hexsha": "17d27e39a77181921cc2bd5a5a8866a25282b4de", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, "max_sta...
import sys import mwapi import toolforge import pandas as pd import pymysql import numpy as np import argparse from urllib.parse import unquote import utils.db_access as db_acc import constants pymysql.converters.encoders[np.int64] = pymysql.converters.escape_int pymysql.converters.conversions = pymysql.converters.enc...
{"hexsha": "32f01865cdd781d826ce9369782f7459daf4321b", "size": 18622, "ext": "py", "lang": "Python", "max_stars_repo_path": "fetch_content.py", "max_stars_repo_name": "wikimedia/abstract-wikipedia-data-science", "max_stars_repo_head_hexsha": "e71cee92f3c8273749b747a155f802e62a425d0a", "max_stars_repo_licenses": ["MIT"]...
// -*- C++ -*- // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Jiao Lin // California Institute of Technology // (C) 2007 All Rights Reserved // // {LicenseText} // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
{"hexsha": "1452919b77b36469c5c96f2832b06e4eb80ef854", "size": 894, "ext": "cc", "lang": "C++", "max_stars_repo_path": "packages/mccomponents/mccomponentsbpmodule/wrap_IsotropicKernel.cc", "max_stars_repo_name": "mcvine/mcvine", "max_stars_repo_head_hexsha": "42232534b0c6af729628009bed165cd7d833789d", "max_stars_repo_l...
#= ported from: COTD Entry submitted by John W. Ratcliff [jratcliff@verant.com] THIS IS A CODE SNIPPET WHICH WILL EFFICIEINTLY TRIANGULATE ANY POLYGON/CONTOUR (without holes) AS A STATIC CLASS. THIS SNIPPET IS COMPRISED OF 3 FILES, TRIANGULATE.H, THE HEADER FILE FOR THE TRIANGULATE BASE CLASS, TRIANGULATE.CPP, THE IM...
{"hexsha": "866076c452d6d957651485835d58e9f147729d5c", "size": 5132, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/polygons.jl", "max_stars_repo_name": "JuliaPackageMirrors/GeometryTypes.jl", "max_stars_repo_head_hexsha": "705e5a646dd2177bbb4b9f8c26b52bc832b38d65", "max_stars_repo_licenses": ["MIT"], "max_s...
# Getting predictions from a deployed resnet-18 model import json import requests import numpy as np from pathlib import Path import typer import decord from mlserve.common.logger import logger from mlserve.common.misc import stopwatch app = typer.Typer(name="Deployment tests", add_completion=False) def load_video(...
{"hexsha": "338b6f5d24816138874af197a38e067ab1a885a0", "size": 1551, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlserve/local_serve/client.py", "max_stars_repo_name": "svats2k/mlserve", "max_stars_repo_head_hexsha": "3f93e3db872612fc6222cb585b425304d9429e45", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma erf_minus [simp]: "erf (-z) = - erf z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. erf (- z) = - erf z [PROOF STEP] unfolding erf_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<Sum>n. of_real (erf_coeffs n) * (- z) ^ n) = - (\<Sum>n. of_real (erf_coeffs n) * z ^ n) [PROOF STEP] by (sub...
{"llama_tokens": 190, "file": "Error_Function_Error_Function", "length": 2}
# -*- coding: utf-8 -*- # /usr/bin/python3.9 # import cv2 # import elasticdeform import numpy as np from skimage.exposure import rescale_intensity class Background: """Background definition""" def __init__( self, img_size, perlin_noise_level, poisson_noise_level, perl...
{"hexsha": "c4f7af17b31798233eee70ed35ebc5e11e1248b2", "size": 3470, "ext": "py", "lang": "Python", "max_stars_repo_path": "spheroid_simulator/background.py", "max_stars_repo_name": "ebouilhol/neuron_simulator", "max_stars_repo_head_hexsha": "bcaca4710d3f9b423ecd5253f9a67bd468b1af87", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma approx_HComplex: "\<lbrakk>a \<approx> b; c \<approx> d\<rbrakk> \<Longrightarrow> HComplex a c \<approx> HComplex b d" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>a \<approx> b; c \<approx> d\<rbrakk> \<Longrightarrow> HComplex a c \<approx> HComplex b d [PROOF STEP] unfolding approx...
{"llama_tokens": 229, "file": null, "length": 2}
[STATEMENT] lemma headconst_zero: fixes p::"'a::zero poly" shows "isnpolyh p n0 \<Longrightarrow> headconst p = 0 \<longleftrightarrow> p = 0\<^sub>p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. isnpolyh p n0 \<Longrightarrow> (headconst p = (0::'a)) = (p = 0\<^sub>p) [PROOF STEP] by (induct p arbitrary: n0 ...
{"llama_tokens": 140, "file": "Taylor_Models_Polynomial_Expression", "length": 1}
#include <cstdlib> #include <string> #include <boost/filesystem.hpp> #include <ros/ros.h> #include <rosbag/recorder.h> namespace fs = boost::filesystem; using namespace std::string_literals; int main(int argc, char** argv) { ros::init(argc, argv, "record_snapshot"); rosbag::RecorderOptions opts; const char* h...
{"hexsha": "351631a9055322c15cda5f4a4dd5a885ad9309b6", "size": 1519, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/kitcar_rosbag/src/record_snapshot/record_snapshot.cpp", "max_stars_repo_name": "KITcar-Team/kitcar-rosbag", "max_stars_repo_head_hexsha": "5fcbdcab16765862802e4c4cb69ed71deceea4f3", "max_stars_r...