text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
export Storage, update_storage # Create a structure that will hold evaluation of the basis functions, # as well as their derivative and second derivative """ $(TYPEDEF) An immutable structure to hold the evaluation of basis functions ## Fields $(TYPEDFIELDS) """ struct Storage m::Int64 Nψ::Int64 Nx::...
{"hexsha": "d2826300438daf6e5ed60017cf2dbaed56439b2c", "size": 4406, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/hermitemap/storage.jl", "max_stars_repo_name": "mleprovost/TransportBasedInference.jl", "max_stars_repo_head_hexsha": "bdcedf72e9ea23c24678fe6af7a00202c5f9d5d7", "max_stars_repo_licenses": ["MI...
import os from timeit import default_timer as timer import fire import h5py import numpy as np import torch from torch.utils.data import Subset from cnn_gp import save_K from plotting.createStartPlot import loadDataset from utils import load_kern, constructSymmetricMatrix, deleteValues, loadNormalizedModel def comp...
{"hexsha": "d37091818eecf361657d2e309b333113441e9c93", "size": 5848, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting/computeKernel.py", "max_stars_repo_name": "meinma/master-thesis", "max_stars_repo_head_hexsha": "0b1c3fa124eef97c4759064576bf6d25e8c60efd", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
import pandas import numpy as np import click from bitstring import BitArray from base58 import b58encode_int, b58decode_int class Clusterer: def __init__(self): pass def cluster(self, n, state_processor, pca = False, model_type = 'kmeans', z_score_exclude = 0.0, seed = None, quiet = False): from sklearn....
{"hexsha": "02c4b250b261c6bb504888c067ab3db8c6959e7e", "size": 2828, "ext": "py", "lang": "Python", "max_stars_repo_path": "wethepeopletoolkit/clusterer.py", "max_stars_repo_name": "alexpeattie/wethepeopletoolkit", "max_stars_repo_head_hexsha": "665881ef536355552b936f7a8341bdcc2711efeb", "max_stars_repo_licenses": ["MI...
"""Set up the environment for doctests This file is automatically evaluated by py.test. It ensures that we can write doctests without distracting import statements in the doctest. """ import inspect from collections import OrderedDict import numpy import pytest import krotov @pytest.fixture(autouse=T...
{"hexsha": "6dec8efc1d332cd75b4bb703fc649da5a2cad937", "size": 545, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mixed/Linear/src/conftest.py", "max_stars_repo_name": "mcditoos/krotov", "max_stars_repo_head_hexsha": "6a70cc791fa21186997ad2ca5a72f6d30574e7a0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
from panda3d.core import PNMImage, TextNode from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectEntry, DGG, DirectOptionMenu from direct.showbase.ShowBase import ShowBase from direct.showbase.DirectObject import DirectObject import numpy as np from typing import Tuple, Union, List, Any, Dic...
{"hexsha": "7c00fb4896d425bfd2af1cfc7b23e7a31ccad597", "size": 19678, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/simulator/views/gui/simulator_config.py", "max_stars_repo_name": "ed741/PathBench", "max_stars_repo_head_hexsha": "50fe138eb1f824f49fe1a862705e435a1c3ec3ae", "max_stars_repo_licenses": ["BSD-...
[STATEMENT] lemma CondLowCompositionality: assumes "nonInterference \<Gamma> c1" and "nonInterference \<Gamma> c2" and "\<Gamma> \<turnstile> b : Low" shows "nonInterference \<Gamma> (if (b) c1 else c2)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. nonInterference \<Gamma> (if (b) c1 else c2) [PROOF STEP] pro...
{"llama_tokens": 5524, "file": "VolpanoSmith_secTypes", "length": 40}
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import try: from osgeo import ogr except ImportError: ogr = None import numpy as np from threedigrid.admin import con...
{"hexsha": "0f7e9113e7e993990bd7574227129eab0cfb6423", "size": 3398, "ext": "py", "lang": "Python", "max_stars_repo_path": "threedigrid/admin/breaches/prepare.py", "max_stars_repo_name": "nens/threedigrid", "max_stars_repo_head_hexsha": "7bff5f9efa5edb8335a8ed601b9a096f85e19711", "max_stars_repo_licenses": ["BSD-3-Clau...
% Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ 12pt, ]{book} \usepackage{amsmath,amssymb} \usepackage{lmodern} \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provide...
{"hexsha": "ecd9b4852978972ed0146563386369668e44f907", "size": 457700, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/wam_tuto.tex", "max_stars_repo_name": "wamwiki/wam_tuto", "max_stars_repo_head_hexsha": "c8e275d0c91421a09602293e31168a5534705979", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count"...
# maintained by rajivak@utexas.edu from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np def format_numsel(numsel): ss = '' for i,j in enumerate(numsel): ss = ss + " %d:%d " %(i,j) return ss def get_train_testindi...
{"hexsha": "4a77a0ffdc93c5e262c47320e055e138b37f2dbd", "size": 1019, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mmd/MMD-critic/Helper.py", "max_stars_repo_name": "sthagen/christophM-interpretable-ml-book", "max_stars_repo_head_hexsha": "d8b82b8e6ab82c78d95de784a601e71025621ab2", "max_stars_repo_lice...
[STATEMENT] lemma benv_in_eval: assumes "\<forall>\<beta>'\<in>benv_in_ve ve. Q \<beta>'" and "Q \<beta>" shows "\<forall>\<beta>\<in>benv_in_d (\<A> v \<beta> ve). Q \<beta>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>\<beta>\<in>benv_in_d (\<A> v \<beta> ve). Q \<beta> [PROOF STEP] proof(cas...
{"llama_tokens": 4615, "file": "Shivers-CFA_ExCFSV", "length": 41}
###_______________________________ SymPy ___________________________________### # SymPy es una biblioteca de Python para matemática simbólica. Apunta a convertirse # en un sistema de algebra computacional (CAS) con todas sus prestaciones manteniendo # el código tan simple como sea posible para manterlo comprensible y...
{"hexsha": "9cf8d0e957967da7b5eceea824704c0222e6b602", "size": 7000, "ext": "py", "lang": "Python", "max_stars_repo_path": "MyScripts/040-SymPy.py", "max_stars_repo_name": "diegoomataix/Curso_AeroPython", "max_stars_repo_head_hexsha": "c2cf71a938062bc70dbbf7c2f21e09653fa2cedd", "max_stars_repo_licenses": ["CC-BY-4.0"],...
[STATEMENT] lemma PO_m3_inv1_keys_init [iff]: "init m3 \<subseteq> m3_inv1_keys" [PROOF STATE] proof (prove) goal (1 subgoal): 1. init m3 \<subseteq> m3_inv1_keys [PROOF STEP] by (auto simp add: PO_hoare_def m3_defs intro!: m3_inv1_keysI)
{"llama_tokens": 112, "file": "Security_Protocol_Refinement_Auth_simple_m3_enc", "length": 1}
theory Proof_1_6 imports HandDryer VCTheoryLemmas Extra begin theorem proof_1_6: "VC6 inv1 s0 hands_value" apply(simp only: VC6_def inv1_def R1_def dryer_def) apply(rule impI; rule conjI) proof - print_state assume VC: "((toEnvP s0 \<and> (\<forall>s1 s2. substate s1 s2 \<and> subs...
{"author": "ivchernenko", "repo": "post_vcgenerator", "sha": "fadfff131086870a027d6bd1c78b8d5a3baf183b", "save_path": "github-repos/isabelle/ivchernenko-post_vcgenerator", "path": "github-repos/isabelle/ivchernenko-post_vcgenerator/post_vcgenerator-fadfff131086870a027d6bd1c78b8d5a3baf183b/case-studies/HandDryer/Proof_1...
# Copyright 2020 Makani Technologies 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
{"hexsha": "31b2f46e7786004b90af6206c189ee907be116a8", "size": 29994, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/control/replay/estimator_helper.py", "max_stars_repo_name": "leozz37/makani", "max_stars_repo_head_hexsha": "c94d5c2b600b98002f932e80a313a06b9285cc1b", "max_stars_repo_licenses": ["Apach...
[STATEMENT] lemma sinvar_mono_I_proofrule_simple: "\<lbrakk> (\<forall> G nP. sinvar G nP = (\<forall> (e1, e2) \<in> edges G. P e1 e2 nP) ) \<rbrakk> \<Longrightarrow> sinvar_mono" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>G nP. sinvar G nP = (\<forall>(e1, e2)\<in>edges G. P e1 e2 nP) \<Longrighta...
{"llama_tokens": 559, "file": "Network_Security_Policy_Verification_TopoS_withOffendingFlows", "length": 4}
from contextlib import ExitStack as does_not_raise # noqa: N813 import numpy as np import pandas as pd import pytest from sid.msm import _flatten_index from sid.msm import _harmonize_input from sid.msm import _is_diagonal from sid.msm import get_diag_weighting_matrix from sid.msm import get_flat_moments from sid.msm ...
{"hexsha": "15dea6b997cdf3f126269b3a6e883217dcfdae17", "size": 3776, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_msm.py", "max_stars_repo_name": "covid-19-impact-lab/sid", "max_stars_repo_head_hexsha": "d867f55d4d005b01c672bd2edd0e1dc974cb182b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" This module is a part of system for the automatic enrichment of a WordNet-like taxonomy. Copyright 2020 Ivan Bondarenko, Tatiana Batura 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...
{"hexsha": "e4c1efdfa3ced5b4314eede90dfcbb9ae2201e9b", "size": 8607, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepare_contexts_for_submission.py", "max_stars_repo_name": "CT2020Hypernym/Hypernym", "max_stars_repo_head_hexsha": "50ab2c38f93d596dd78cdfe84cb6c8adae21b6ca", "max_stars_repo_licenses": ["Apache...
import argparse import os import subprocess import SimpleITK as sitk import numpy as np from nipype.interfaces.ants import N4BiasFieldCorrection from natsort import natsorted def ReadImage(file_path): ''' This code returns the numpy nd array for a MR image at path''' return sitk.GetArrayFromImage(sitk.ReadI...
{"hexsha": "2c332ecb8add7b7f1f4549b682051e9b4dfd96f0", "size": 4429, "ext": "py", "lang": "Python", "max_stars_repo_path": "createBrainParcellation.py", "max_stars_repo_name": "pykao/BraTS2018-tumor-segmentation", "max_stars_repo_head_hexsha": "6c81ab670f7bd035312f7ccd729776c5c05c47a3", "max_stars_repo_licenses": ["MIT...
import random import matplotlib.pyplot as plt import numpy as np import torch import copy import utils.pytorch_util as ptu def eval_np(module, *args, **kwargs): """ Eval this module with a numpy interface Same as a call to __call__ except all Variable input/outputs are replaced with numpy equivalents....
{"hexsha": "7d6befd6cc380fb082bc726abc53978029f4893a", "size": 5153, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/core.py", "max_stars_repo_name": "amarildolikmeta/oac-explore", "max_stars_repo_head_hexsha": "e3d63992a4ff33c8df593941f498457e94f81eb8", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os import numpy as np from torch.utils import data from .parsers.atis import readATISFile class PropheseeNCars(data.Dataset): """Prophesee N-Cars dataset from: Amos Sironi, Manuele Brambilla, Nicolas Bourdis, Xavier Lagorce, Ryad Benosman “HATS: Histograms of Averaged Time Surfaces for Robust Event...
{"hexsha": "b34633ed569a725692defe073ddc391a99d60d1e", "size": 1597, "ext": "py", "lang": "Python", "max_stars_repo_path": "ebdataset/vision/prophesee_ncars.py", "max_stars_repo_name": "tihbe/python-ebdataset", "max_stars_repo_head_hexsha": "4d16822a3a6b45882124a8d7f7e124bd39a75868", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma continuous_on_const[continuous_intros,simp]: "continuous_on s (\<lambda>x. c)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. continuous_on s (\<lambda>x. c) [PROOF STEP] unfolding continuous_on_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>x\<in>s. ((\<lambda>x. c) \<longlongright...
{"llama_tokens": 150, "file": null, "length": 2}
# Adapted from : VGG 16 model : https://github.com/machrisaa/tensorflow-vgg import time import os import inspect import numpy as np from termcolor import colored import tensorflow as tf from fcn.losses import sigmoid_cross_entropy_balanced from fcn.utils.io import IO class PickNet(): def __init__(self, cfgs, r...
{"hexsha": "1026b7909d61272bcf49c9b31b89dbd696c52cbc", "size": 15318, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/PickNet/fcn/models/picknet.py", "max_stars_repo_name": "MrXiaoXiao/ESPRH", "max_stars_repo_head_hexsha": "c4bbebba001523fbd86f9de4b09cb931665b7a71", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This set of functions is used for plotting the results from CT Crash data analysis @author: Anna Konstorum (konstorum.anna@gmail.com) """ import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D def myround(x, base=5...
{"hexsha": "433c6973882a25d71d4c0d9e420bb0f036eba472", "size": 5831, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/plot_results.py", "max_stars_repo_name": "akonstodata/CT_crash_analysis", "max_stars_repo_head_hexsha": "66a8ecce5279f4dfc9f1cc3766a00573229812ca", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python # coding: utf-8 # # import required library # In[1]: # Import numpy, pandas for data manipulation import numpy as np import pandas as pd # Import matplotlib, seaborn for visualization import matplotlib.pyplot as plt import seaborn as sns import warnings warnings.filterwarnings('ignore') # I...
{"hexsha": "f2551e934ec02c72327ff261b91868d8569a6187", "size": 9361, "ext": "py", "lang": "Python", "max_stars_repo_path": "Time Series Analysis/Weather Forecasting using SRIMAX Model/weather prediction.py", "max_stars_repo_name": "shreejitverma/Data-Scientist", "max_stars_repo_head_hexsha": "03c06936e957f93182bb18362b...
@testset "Robots: biped" begin q0 = [0.0; 0.0; 0.5 * π * ones(7)] v0 = zeros(9) @test norm(lagrangian(biped, q0, v0)) < 1.0e-8 # visualize vis = RoboDojo.Visualizer(); @test visualize!(vis, biped, [q0], Δt=0.1); end
{"hexsha": "def11798a6d8bf8bf45dba96832e4c872e2f727f", "size": 241, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/robots/biped.jl", "max_stars_repo_name": "mcx/RoboDojo.jl", "max_stars_repo_head_hexsha": "b31fa17ee84285f45b76de78d9e660a83f5ddc9e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Twenty Seconds Resume/CV % LaTeX Template % Version 1.0 (14/7/16) % % This template has been downloaded from: % http://www.LaTeXTemplates.com % % Original author: % Carmine Spagnuolo (cspagnuolo@unisa.it) with major modifications by % Vel (vel@LaTeXTemplates.com) % % License...
{"hexsha": "282a49fcbf7d94a35b76159512de83de5af722d9", "size": 6382, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "template.tex", "max_stars_repo_name": "latexstudio/Data-Engineer-Resume-LaTeX", "max_stars_repo_head_hexsha": "0ca7e94b54375276550a10da8041eea2d26786ed", "max_stars_repo_licenses": ["Apache-2.0"], "...
library(RMySQL) lin_sem_distance <- function (data) { options(warn = -1) con <- dbConnect(MySQL(), user="user", password="password", dbname="snomed_20160731", host="127.0.0.1") codes <- sort(na.omit(unique(as.vector(data)))) n_codes <- length(codes) weight <- matri...
{"hexsha": "26745d90e8e9072c2b3753f1a941045f0a1cb4fe", "size": 1515, "ext": "r", "lang": "R", "max_stars_repo_path": "sem_distance.r", "max_stars_repo_name": "danka74/SnomedAgreement", "max_stars_repo_head_hexsha": "4eb3d0764846c8bd25f178915f671603978058d7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2018 denglixi edenglixi@xgpd2> # # Distributed under terms of the MIT license. """ """ import numpy import os from xml_process import parse_rec def create_dishes(canteen): """create_dishes""" # each dish may have more than 1 ima...
{"hexsha": "bf6c2224e63c9953cc6804e19ea902a1893da37b", "size": 2537, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/datasets/clean_val.py", "max_stars_repo_name": "denglixi/faster-rcnn.pytorch", "max_stars_repo_head_hexsha": "12158fa2ec998ba3733a4696b7a4e08a35c157e3", "max_stars_repo_licenses": ["MIT"], "ma...
from pathlib import Path from typing import Union, Dict, List import numpy as np from .eeg import EEG from .transforms import HighPass, RemoveBeginning, RemoveLineNoise, Standardize def ingest_session( data_path: Path, output_dir: Path ) -> Dict[str, Union[int, List[int]]]: eeg = EEG.from_hdf5(data_path...
{"hexsha": "a294aa3fce6d2cc0bb3d7713b0da7200fc507b43", "size": 2262, "ext": "py", "lang": "Python", "max_stars_repo_path": "eegdrive/ingestion/ingest.py", "max_stars_repo_name": "lucagrementieri/eegdrive", "max_stars_repo_head_hexsha": "65b122246e2a75c0c7c80db3e544f6a6741ceb53", "max_stars_repo_licenses": ["Apache-2.0"...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 14 18:16:26 2020 @author: arslan """ from pyit2fls import IT2FS_Gaussian_UncertMean, join, IT2FS_plot, \ max_s_norm, probabilistic_sum_s_norm, bounded_sum_s_norm, \ drastic_s_norm, nilpotent_maximum_s_norm, einstein_sum_s_norm from numpy im...
{"hexsha": "7656caa9f56b779574285fec981fef6ed383ae94", "size": 1472, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex_13.py", "max_stars_repo_name": "Haghrah/PyIT2FLS", "max_stars_repo_head_hexsha": "ca2763032a4f441c3c4456570c18faa68cfee3e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 33, ...
import math, torch import numpy as np from numpy.random import normal as normrnd from scipy.stats import multivariate_normal, norm from scipy.linalg import sqrtm, expm from pdb import set_trace as bp from include.DNN import DNN import matplotlib.pyplot as plt import matplotlib.animation as animation from include.dataSt...
{"hexsha": "c28ebb519de9bc9d9ac37cfb68bb3d8715cb4b51", "size": 31290, "ext": "py", "lang": "Python", "max_stars_repo_path": "include/localize.py", "max_stars_repo_name": "sahibdhanjal/DeepLocNet", "max_stars_repo_head_hexsha": "a3a5973a0cb549d0a16f17b96a9c78c200cf0c7e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np class Solution: def minMoves2(self, nums: List[int]) -> int: nums.sort() length = len(nums) median = nums[length//2] left, right = 0, length - 1 # for i in nums: while left <= right: mid = left + (right - left) // 2 if num...
{"hexsha": "71b7ef56ab5f6800c93ce1452c4e63bd4f259deb", "size": 804, "ext": "py", "lang": "Python", "max_stars_repo_path": "leetcode/462.py", "max_stars_repo_name": "strawsyz/straw", "max_stars_repo_head_hexsha": "db313c78c2e3c0355cd10c70ac25a15bb5632d41", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
//============================================================================= // // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // ...
{"hexsha": "3e9944e5dec445a88596757d8add3d863ba2c729", "size": 4145, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "remus/worker/detail/testing/UnitTestMessageRouterWorkerTermination.cxx", "max_stars_repo_name": "robertmaynard/Remus", "max_stars_repo_head_hexsha": "090a14c9a4b0e628a86590dcfa7e46ba728e9c04", "max_...
[STATEMENT] theorem min_of_list3_correct: "(min_of_list3,min_of_list) \<in> (array_assn nat_assn)\<^sup>k \<rightarrow>\<^sub>a nat_assn" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (min_of_list3, min_of_list) \<in> (array_assn nat_assn)\<^sup>k \<rightarrow>\<^sub>a nat_assn [PROOF STEP] using min_of_list3.refin...
{"llama_tokens": 292, "file": "Refine_Imperative_HOL_Userguides_Sepref_Guide_Quickstart", "length": 2}
Name: Jesse Unger. Office: FC Personality: Activities: going to college... pretty much a full time job work in Wickson Hall for Dr. Hildegarde Heymann founder and prez of SBA AT UCD http://www.sbaatucd.com working for qualcomm over the summer going abroad 20051225 19:23:33 nbsp hey i called your number and ...
{"hexsha": "a8dc5785c46c690cb8937dbaf976315e67a3828f", "size": 587, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/JesseUnger.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os import scipy.io as io import numpy as np import torch from .. import LIB_DATA_PATH from .spatial import SpatialModel from .spatial_OLD.spatial_model import SpatialModel as SpatialModelOriginal from .spatial_OLD.spatial_hist import SpatialHist from ..util.general import aeq class Library(object): """ ...
{"hexsha": "18aa18bb038b0bd03fa0b0fa9ef2aac028fa706b", "size": 7306, "ext": "py", "lang": "Python", "max_stars_repo_path": "pybpl/library/library.py", "max_stars_repo_name": "lucast4/pyBPL", "max_stars_repo_head_hexsha": "fc5d9a87266df4a7b0014d09feec713a7052bc39", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import tactic.hint namespace tactic open expr open tactic.interactive ( casesm constructor_matching ) /-- find all assumptions of the shape `¬ (p ∧ q)` or `¬ (p ∨ q)` ...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/tactic/tauto.lean"}
program set_threads ! Load the OpenMP functions library use omp_lib ! Set variables implicit none integer :: tnum ! Create a parallel block of four threads (including master thread) !$OMP PARALLEL PRIVATE(tnum) NUM_THREADS(4) tnum = OMP_GET_THREAD_NUM() print *, "I am thre...
{"hexsha": "561d9b4744e8dad78f94450968f59cdf016ae88b", "size": 608, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "files/arc_openmp/fortran/setthreads.f90", "max_stars_repo_name": "ARCCA/Introduction-to-Parallel-Programming-using-OpenMP", "max_stars_repo_head_hexsha": "830c240a041c32928b6c1fb0f76693268114cd2e...
-- Andreas, 2012-01-30, bug reported by Nisse -- {-# OPTIONS -v tc.term.absurd:50 -v tc.signature:30 -v tc.conv.atom:30 -v tc.conv.elim:50 #-} module Issue557 where data ⊥ : Set where postulate A : Set a : (⊥ → ⊥) → A F : A → Set f : (a : A) → F a module M (I : Set → Set) where x : A x = a (λ ()) y : A...
{"hexsha": "4e0ca7e6bd1ca737b7b4b7252e4f18163452cd0f", "size": 500, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Succeed/Issue557.agda", "max_stars_repo_name": "cruhland/agda", "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
! This file is part of HolmMHD ! Copyright (C) 2019 Daniel Verscharen (d.verscharen@ucl.ac.uk) !All rights reserved. ! !Redistribution and use in source and binary forms, with or without !modification, are permitted provided that the following conditions are met: ! !1. Redistributions of source code must retain the abo...
{"hexsha": "03dcbee201d118583b2d5db0ce8c7a114f108cdf", "size": 2222, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/parameters.f90", "max_stars_repo_name": "danielver02/HolmMHD", "max_stars_repo_head_hexsha": "e32a42e77377bbc6632cb0e1aa975c45a83d1a66", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD"], ...
// Copyright 2005 Alexander Nasonov. // 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 FILE_boost_type_traits_integral_promotion_hpp_INCLUDED #define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED ...
{"hexsha": "92d2a6745017f91d14b4bee89396e1faa4d05053", "size": 7804, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/boost/type_traits/integral_promotion.hpp", "max_stars_repo_name": ...
!> @brief This function returns the overall index for any step within 2 nested do loops !> !> @param[in] i1 the index of the first do loop !> !> @param[in] i2 the index of the second do loop !> !> @param[in] n2 the end of the second do loop !> !> @warning This function assumes that all indexes go from 1 to n (inclusive...
{"hexsha": "b9698895e529b59eac695d871a80736ca3fee923", "size": 866, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "mod_safe/func_overall_index/func_overall_index_2loops.f90", "max_stars_repo_name": "Guymer/fortranlib", "max_stars_repo_head_hexsha": "30e27b010cf4bc5acf0f3a63d50f11789640e0e3", "max_stars_repo_l...
import LinearAlgebra.dot import GeometryBasics.Point import Random.GLOBAL_RNG export random_vector_matrix, perlin_noise """ random_vector_matrix([rng,] rows, cols) Produce a matrix with the given number of rows and columns, in which every entry is a random unit vector. If provided, the given random number genera...
{"hexsha": "8b294a533be8d6da707ec7c15a761d02e223284f", "size": 1507, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/noise.jl", "max_stars_repo_name": "fonsp/PenPlots.jl", "max_stars_repo_head_hexsha": "f330f8014049fad0c915759181798f823dd42757", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19, "max_...
function codepart(cnt,prevc) codepart=cnt>1 ? string(cnt) : "" return codepart * prevc end function encode(s) # prevc=s prevc = length(s)>0 ? s[1] : s coded = "" cnt=0 for c in s if c == prevc cnt = cnt + 1 else # codepart=cnt>1 ? string(cnt) : "" ...
{"hexsha": "6e94bfd99e75414006ca21bb0b23e6b3d633cc59", "size": 1002, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "run-length-encoding/run-length-encoding.jl", "max_stars_repo_name": "stepinski/julia-in", "max_stars_repo_head_hexsha": "08c82e2de236ead3b1eb356d60a04c61e275d4fa", "max_stars_repo_licenses": ["MIT"...
#if COMPILATION_INSTRUCTIONS (echo "#include\""$0"\"" > $0x.cpp) && mpic++ -O3 -std=c++14 -Wall -Wextra -Wfatal-errors -D_TEST_MPI3_SHARED_COMMUNICATOR $0x.cpp -o $0x.x && time mpirun -n 3 $0x.x $@ && rm -f $0x.x $0x.cpp; exit #endif #ifndef MPI3_SHARED_COMMUNICATOR_HPP #define MPI3_SHARED_COMMUNICATOR_HPP #include "....
{"hexsha": "287c377a7a2b398404977b5db7e54b744febd198", "size": 5728, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "external_codes/mpi_wrapper/mpi3/shared_communicator.hpp", "max_stars_repo_name": "djstaros/qmcpack", "max_stars_repo_head_hexsha": "280f67e638bae280448b47fa618f05b848c530d2", "max_stars_repo_license...
""" Keep different states of pipeline using reposition and position. If we add preprocessing and postprocessing to pipeline steps, we can play with state and capture specific inputs and outputs as separate elements of the state. In this example the final state elements are: - 0: initial dataframe with two columns (sub...
{"hexsha": "ca3c6b83c17a96c033200c8b1b619bb03bc322e3", "size": 3753, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_reposition.py", "max_stars_repo_name": "ftrojan/e2epipeline", "max_stars_repo_head_hexsha": "e337539010aa3128d021ebcb48a473c712b271b1", "max_stars_repo_licenses": ["BSD-2-Clause"]...
\documentclass[12pt,a4paper]{article} \usepackage[]{graphicx} \usepackage[]{color} \usepackage{chngcntr} \usepackage{pdfpages} \usepackage{pdflscape} \usepackage{subfig} \usepackage[backend=biber]{biblatex} \addbibresource{biblio_supmat.bib} \usepackage[ colorlinks, citecolor=blue, urlcolor=cyan, bookmarks=true, hypert...
{"hexsha": "689a250619235aea976e3b3ab1435d6d52282a50", "size": 36426, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ms/appendix.tex", "max_stars_repo_name": "palmaraz/SaniVult", "max_stars_repo_head_hexsha": "4ad91b093c5b553c13a70a3c3946e9580f03ac33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
import torch import torchvision #import skimage.io as io import numpy as np import torchvision.transforms as t import torch.nn as nn import os import matplotlib.pyplot as plt import torchvision.models as model #from sklearn.metrics import accuracy_score torch.cuda.set_device(0) #device=torch.device(#"cuda" i...
{"hexsha": "5312b6629308f46336fbdf54c9a5d501cd3126ac", "size": 12178, "ext": "py", "lang": "Python", "max_stars_repo_path": "DeepFeatureExtraction/EXTRACTOR_GoogLeNet.py", "max_stars_repo_name": "SohamChattopadhyayEE/DeepGA", "max_stars_repo_head_hexsha": "034e0b254244b00bc1bc6daaaeec610d5c73dd55", "max_stars_repo_lice...
using HDF5 using JLD2 using Pkg using SparseVertex include("./triqs_conv_functions.jl") file = ARGS[1] outdir = ARGS[2] # Gimp gImp = triqs_read_gf(file, "G_imp") # chi chiupdo_mesh = h5read(file, "chi_updn_ph_imp/mesh") mesh = triqs_build_freqGrid(chiupdo_mesh); chiupdo_raw = h5read(file, "chi_updn_ph_imp/data") c...
{"hexsha": "46e0e81fd0188c133ed4092850f302d3cb533fca", "size": 1584, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/triqs_conv.jl", "max_stars_repo_name": "Atomtomate/LadderDGA.jl", "max_stars_repo_head_hexsha": "8cd39fe2ae2aa1130bff706171266d3cf2d4c8e7", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Copyright (c) 2003-2015 by Mike Jarvis # # TreeCorr is free software: redistribution and use in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condi...
{"hexsha": "b22b2b71e2a6528482a735a0f37e83b4736e4ad2", "size": 28203, "ext": "py", "lang": "Python", "max_stars_repo_path": "treecorr/celestial.py", "max_stars_repo_name": "kstoreyf/TreeCorr", "max_stars_repo_head_hexsha": "f81b4b762c8672b9047ed045c300730cc2983eb0", "max_stars_repo_licenses": ["Python-2.0", "OLDAP-2.7"...
@testset "Main" begin @testset "Simulate with trace" begin n = 3 ε = .1 reward = Distribution[Bernoulli(.5 + ((i == j) ? ε : 0.)) for i in 1:n, j in 1:n] instance = UncorrelatedPerfectBipartiteMatching(reward, PerfectBipartiteMatchingMunkresSolver()) Random.seed!(1) n_rounds = 2 s, t = si...
{"hexsha": "08a2ff674b08f44929172efe982c2104c9e0e442", "size": 867, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/main.jl", "max_stars_repo_name": "dourouc05/-CombinatorialBandits.jl", "max_stars_repo_head_hexsha": "05470f136ac8832e6f8afc2ee07705ac3f769271", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
// // Boost.Process // ~~~~~~~~~~~~~ // // Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling // Copyright (c) 2009 Boris Schaeling // Copyright (c) 2010 Felipe Tanus, Boris Schaeling // // Distributed under the Boost Software License, Version 1.0. (See accompany...
{"hexsha": "98e3c89ad9d9692502f2bdfd5d75a85166fbc8a6", "size": 625, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libraries/fc/vendor/boost_1.51/include/boost/process.hpp", "max_stars_repo_name": "techsharesteam/techshares", "max_stars_repo_head_hexsha": "47c58630a578204147057b7504e571e19546444f", "max_stars_rep...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
{"hexsha": "4db2863999400d13815344a9cbed90531de6e1af", "size": 21174, "ext": "py", "lang": "Python", "max_stars_repo_path": "silx/gui/data/DataViewer.py", "max_stars_repo_name": "vallsv/silx", "max_stars_repo_head_hexsha": "834bfe9272af99096faa360e1ad96291bf46a2ac", "max_stars_repo_licenses": ["CC0-1.0", "MIT"], "max_s...
import os from tesserocr import PSM, PyTessBaseAPI import cv2 import numpy as np from PIL import Image from typing import List, Optional from constants import SIDES_DIR from cv_helpers import contour_bounding_box_for_contour, extract_color, four_point_transform,\ get_center_for_contour, get_classifier_directories...
{"hexsha": "e001462526598e8938908ba58cb103101ba491c2", "size": 8516, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sides/serial_number_cv.py", "max_stars_repo_name": "FuegoFro/KeepTalkingBot", "max_stars_repo_head_hexsha": "c4a66750e253aae667f561a9863f163da0eeb68b", "max_stars_repo_licenses": ["MIT"], "max...
-- Estudante: Lucas Emanuel Resck Domingues -- Exercise 1 section parameters {A : Type} {R : A → A → Prop} parameter (irreflR : irreflexive R) parameter (transR : transitive R) local infix < := R def R' (a b : A) : Prop := R a b ∨ a = b local infix ≤ := R' theorem reflR' (a : A) : a ≤ a...
{"author": "lucasresck", "repo": "Discrete-Mathematics", "sha": "0a08081c5f393e5765259d3f1253c3a6dd043dac", "save_path": "github-repos/lean/lucasresck-Discrete-Mathematics", "path": "github-repos/lean/lucasresck-Discrete-Mathematics/Discrete-Mathematics-0a08081c5f393e5765259d3f1253c3a6dd043dac/Lists of exercises/List 7...
*DECK CARG FUNCTION CARG (Z) C***BEGIN PROLOGUE CARG C***PURPOSE Compute the argument of a complex number. C***LIBRARY SLATEC (FNLIB) C***CATEGORY A4A C***TYPE COMPLEX (CARG-C) C***KEYWORDS ARGUMENT OF A COMPLEX NUMBER, ELEMENTARY FUNCTIONS, FNLIB C***AUTHOR Fullerton, W., (LANL) C***DESCRIPTION C C C...
{"hexsha": "f6e44aabc2242534dfcad53e33d0d6ef5618e49f", "size": 950, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/carg.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count":...
import os import requests from string import Template import json import boto3 import uuid import shutil import sys from PIL import Image from skimage import feature from skimage.filters import gaussian from fil_finder import FilFinder2D from astropy import units as u import numpy as np import networkx as nx # https:/...
{"hexsha": "0fcb5344529f25b2eb5b1baf9130692de297d4e9", "size": 5102, "ext": "py", "lang": "Python", "max_stars_repo_path": "ingest-lamdba/src/lambda.py", "max_stars_repo_name": "Ricool06/TheGlowGetters", "max_stars_repo_head_hexsha": "e0f22073ec51671f0eb6f8ab49472f7981978039", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np def cls_type_to_id(cls_type): type_to_id = {'Car': 1, 'Pedestrian': 2, 'Cyclist': 3, 'Van': 4} if cls_type not in type_to_id.keys(): return -1 return type_to_id[cls_type] class Object3d(object): def __init__(self, line, gt=False): # if read from ground truth label, the txt f...
{"hexsha": "5eb0dd8f0b9476ec0a596f5ec7af8ea258374b82", "size": 2398, "ext": "py", "lang": "Python", "max_stars_repo_path": "pcdet/utils/object3d_jrdb.py", "max_stars_repo_name": "brudermueller/OpenPCDet", "max_stars_repo_head_hexsha": "dc6e16abb03363e5b307225e4c02297c231d56da", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np import math from ..miniworld import MiniWorldEnv, Room from ..entity import Box, ImageFrame from gym import spaces class Hallway(MiniWorldEnv): """ Environment in which the goal is to go to a red box at the end of a hallway """ def __init__(self, length=10, stochastic=False, den...
{"hexsha": "66c9a4391f84429e26357fcf0b7b5a1921a4a4b2", "size": 3221, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym_miniworld/envs/hallway.py", "max_stars_repo_name": "PrieureDeSion/gym-miniworld", "max_stars_repo_head_hexsha": "896509fe59c18650ed8483e4df3394f098f07c3c", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.gaussian_process.kernels import RBF class Dataset(object): def __init__(self, X, Y, T, n_candidate, n_safety, n_test, seed=None, include_T=False, include_intercept=True, standardize=False): n_train = n_candidate + n_saf...
{"hexsha": "7778588d8cae9e8d700aada4a53c61caf0b1d776", "size": 11707, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/datasets/dataset.py", "max_stars_repo_name": "sgiguere/RobinHood-NeurIPS-2019-", "max_stars_repo_head_hexsha": "4bc3283b1cba13b1addf07f3fccf667f4c8f4a08", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/python3 import matplotlib.pyplot as plt import numpy as np import plawt # Simple data to display in various forms x = np.linspace(0, 2 * np.pi, 400) y = np.sin(x ** 2) plt.close('all') f, axarr = plt.subplots(2, 2) f.suptitle('Matplotlib: Grid of subplots') axarr[0, 0].plot(x, y) axarr[0, 0].set_title('Ax...
{"hexsha": "337c43ab08a86e08bf7dcca140778c381449db75", "size": 1228, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/subplotgridtest.py", "max_stars_repo_name": "mef51/plawt", "max_stars_repo_head_hexsha": "7d5dbcd64d97499eaf7896d2f6e50826d54d2e6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\section{Development} When trying to follow a traditional software engineering approach to in Haskell, one soon runs into several dead ends: due to the different paradigm and style, trying to apply some methods feels forced or unnatural. Traditionally, in Haskell the approach when formalizing a piece of code just invo...
{"hexsha": "fd8ad20b5db79530fd413c7e80afaf406137fd0c", "size": 66787, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis/4-development.tex", "max_stars_repo_name": "DiegoVicen/bachelor-thesis", "max_stars_repo_head_hexsha": "feb1657ef4082402434d5e6519ec57eac85ac7a6", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python3 # coding: utf-8 import argparse SD_FACTOR1 = 2.5 SD_FACTOR2 = 4 def main(args): import os import numpy as np import allel import matplotlib.pyplot as plt from scipy.optimize import curve_fit def read_vcfs(vcf_list, fields): callset = {f: np.array([],dtype='float...
{"hexsha": "d9e235b01dce536bc14fa34e7c4794e09dfa533d", "size": 4696, "ext": "py", "lang": "Python", "max_stars_repo_path": "workflow/scripts/estimate_parental_filtering_params.py", "max_stars_repo_name": "ibebio/vc-gatk4-snakemake", "max_stars_repo_head_hexsha": "154074c72c847fb251cf5f8fd878b42053c07c92", "max_stars_re...
import torch from torch.optim import Optimizer from typing import Callable, Union, List import numpy as np import matplotlib.pyplot as plt __all__ = ['get_lr', 'change_lr', 'plot_schedule', 'save_optimizer', 'load_optimizer'] def get_lr(optim: Optimizer) -> List[float]: return [param_group['lr'] for param_group...
{"hexsha": "04009bf2a126efedb10850acff4f499e18c2d40f", "size": 1794, "ext": "py", "lang": "Python", "max_stars_repo_path": "nntoolbox/optim/utils.py", "max_stars_repo_name": "nhatsmrt/nn-toolbox", "max_stars_repo_head_hexsha": "689b9924d3c88a433f8f350b89c13a878ac7d7c3", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# Para visualizar gráficos en la terminal interactiva from IPython import get_ipython get_ipython().run_line_magic('matplotlib', 'ipympl') """ # Actividad en clases: Series de Fourier Objetivos: - Componer señales periodicas en base a sinusoides - Visualizar señales con matplotlib - Escuchar las señales con IPython...
{"hexsha": "a93385068d32710faa1ef462b518bf1eaac50ed5", "size": 1890, "ext": "py", "lang": "Python", "max_stars_repo_path": "class-activities/unit1/sinewaves.py", "max_stars_repo_name": "phuijse/UACH-INFO183", "max_stars_repo_head_hexsha": "0e1b6bef0bd80cda2753bd11e62016268f2de638", "max_stars_repo_licenses": ["MIT"], "...
"""Basic definitions for the transforms module.""" import numpy as np import torch from torch import nn import nflows.utils.typechecks as check class InverseNotAvailable(Exception): """Exception to be thrown when a transform does not have an inverse.""" pass class InputOutsideDomain(Exception): """Ex...
{"hexsha": "860b3494d05c106795e3d0b83d66052581c998ca", "size": 8253, "ext": "py", "lang": "Python", "max_stars_repo_path": "nflows/transforms/base.py", "max_stars_repo_name": "mshakerinava/nflows", "max_stars_repo_head_hexsha": "d86cb1478ff36ffd3e005e980d92a3b0bbffbf02", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma infer_v_pair2I: fixes v\<^sub>1::v and v\<^sub>2::v assumes "\<Theta>; \<B>; \<Gamma> \<turnstile> v\<^sub>1 \<Rightarrow> \<tau>\<^sub>1" and "\<Theta>; \<B>; \<Gamma> \<turnstile> v\<^sub>2 \<Rightarrow> \<tau>\<^sub>2" shows "\<exists>\<tau>. \<Theta>; \<B>; \<Gamma> \<turnstile> V_pair v\<...
{"llama_tokens": 6191, "file": "MiniSail_TypingL", "length": 25}
[STATEMENT] lemma fbd_ifbd_inv2_iff: "((bd\<^sub>\<F> \<circ> bd\<^sup>-\<^sub>\<F>) \<phi> = \<phi>) = (Sup_pres \<phi>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ((bd\<^sub>\<F> \<circ> bd\<^sup>-\<^sub>\<F>) \<phi> = \<phi>) = Sup_pres \<phi> [PROOF STEP] using fbd_ifbd_inv2 fbd_ifbd_inv2_inv [PROOF STATE] ...
{"llama_tokens": 306, "file": "Transformer_Semantics_Kleisli_Transformers", "length": 2}
from vg.compat import v1 as vg def find_rigid_transform(a, b, compute_scale=False, fail_in_degenerate_cases=True): """ Args: a: a Nx3 array of vertex locations b: a Nx3 array of vertex locations a and b are in correspondence -- we find a transformation such that the first point...
{"hexsha": "81bf573d53978fb85b030717097383f3ec4aafb9", "size": 3082, "ext": "py", "lang": "Python", "max_stars_repo_path": "entente/rigid_transform.py", "max_stars_repo_name": "metabolize/entente", "max_stars_repo_head_hexsha": "c1b16bb7c7fb83b31db4e8ddaf65f1504374fe7a", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import unittest import numpy as np try: import bokeh from openmdao.visualization.meta_model_viewer.meta_model_visualization import MetaModelVisualization except ImportError: bokeh = None import openmdao.api as om @unittest.skipUnless(bokeh, "Bokeh is required") class UnstructuredMetaModelCompTests(unitt...
{"hexsha": "55b1f90f88a32f8fd39727176d800bcf076dccc7", "size": 6696, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmdao/visualization/meta_model_viewer/tests/test_unstruct.py", "max_stars_repo_name": "bollwyvl/OpenMDAO", "max_stars_repo_head_hexsha": "4d7a31b2bb39674e2be0d6a13cbe22de3f5353af", "max_stars_r...
# PART 5 – ASSESSMENT OF LOCAL METAL LOSS # Determine Asessment Applicability #Determine the assessment applicability # @doc DesignCodeCriteria # @doc MaterialToughness # @doc CyclicService # @doc Part5ComponentType print("Begin -- Assessment Applicability and Component Type Checks\n") creep_range = CreepRangeTemperat...
{"hexsha": "297229c5f0a513de7307302825811ccabd213fd8", "size": 10184, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/part5_local_metal_loss_assessment.jl", "max_stars_repo_name": "JuliaTagBot/FitnessForService.jl", "max_stars_repo_head_hexsha": "530fa8c4764967275220561bcf525291c88d7cd8", "max_stars_repo_lice...
#!/usr/bin/env python3 # # Author: Yipeng Sun # License: BSD 2-clause # Last Change: Thu Jul 29, 2021 at 02:36 AM +0200 import numpy as np from .io import read_branches # Find total number of events (unique events) out of total number of candidates. def extract_uid(ntp, tree, run_branch='runNumber', event_branch='e...
{"hexsha": "25c33303e20e088f5f750d531d12b81bc3065476", "size": 2000, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyTuplingUtils/utils.py", "max_stars_repo_name": "umd-lhcb/pyTuplingUtils", "max_stars_repo_head_hexsha": "dd2efe154f1418a70295eabd8919e16ace2785cc", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
import os import random import cv2 import torch import numpy as np from torch.utils.data import Dataset from PIL import Image, ImageFile def read_image(img_path): """Keep reading image until succeed. This can avoid IOError incurred by heavy IO process.""" got_img = False if not os.path....
{"hexsha": "8e64a17c9a76a4b508c43bbea9a22899e51c662a", "size": 1529, "ext": "py", "lang": "Python", "max_stars_repo_path": "addition_module/DMUE/pretrain/utils/dataset.py", "max_stars_repo_name": "weihaoxie/FaceX-Zoo", "max_stars_repo_head_hexsha": "db0b087e4f4d28152e172d6c8d3767a8870733b4", "max_stars_repo_licenses": ...
import group_theory.subgroup data.equiv.basic data.fintype algebra.big_operators open equiv variables {α : Type*} def is_transposition (f : perm α) : Prop := ∃ x y, f x = y ∧ f y = x ∧ ∀ a, a ≠ x → a ≠ y → f a = a lemma is_transposition_inv {f : perm α} : is_transposition f → is_transposition (f⁻¹) := λ ⟨x, y, h⟩...
{"author": "ChrisHughes24", "repo": "leanstuff", "sha": "9efa85f72efaccd1d540385952a6acc18fce8687", "save_path": "github-repos/lean/ChrisHughes24-leanstuff", "path": "github-repos/lean/ChrisHughes24-leanstuff/leanstuff-9efa85f72efaccd1d540385952a6acc18fce8687/transpostions.lean"}
[STATEMENT] lemma continuous_on_swap_args: assumes "continuous_on (A\<times>B) (\<lambda>(x,y). d x y)" shows "continuous_on (B\<times>A) (\<lambda>(x,y). d y x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. continuous_on (B \<times> A) (\<lambda>(x, y). d y x) [PROOF STEP] proof - [PROOF STATE] proof (state...
{"llama_tokens": 590, "file": null, "length": 7}
from transformers import AutoModelForSeq2SeqLM, DataCollatorForSeq2Seq, Seq2SeqTrainingArguments, Seq2SeqTrainer from transformers import AutoTokenizer, MBartTokenizer from src.envs import build_env import torch.nn.functional as F import datasets import random import pandas as pd from datasets import Dataset import tor...
{"hexsha": "94139dc9d92526188c959b6d9d100c21e828b6ff", "size": 4371, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "softsys4ai/differentiable-proving", "max_stars_repo_head_hexsha": "ed9b0c1a2803a3d2f75b60b78ec864c6e57fb8c4", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- """customer-conversion-prediction.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1fwoTRHqz3_T-_RekFYT9qNkeqasMEBQ7 **Predict Customer Conversion (Churn) with Machine Learning** Importing necessary libraries """ import n...
{"hexsha": "ef8cf21938d283f4685b5e2b87cec041a3a25187", "size": 3178, "ext": "py", "lang": "Python", "max_stars_repo_path": "customer-conversion-prediction/customer_conversion_prediction.py", "max_stars_repo_name": "rajgmishra/machine-learning-datasets", "max_stars_repo_head_hexsha": "26df1446dc6140d4ab19503c3108e192733...
module LogSynth using Counters, Markdown, Random export SkipListDistribution, AliasTableDistribution md""" A `SkipListDistribution` provides an implementation of a multinomial distribution that has ``O(log(n))`` sample time, but which allows the underlying probability for any element to be adjusted in ``O(log(n))`` ...
{"hexsha": "031ebe69d13aabceed57db1dffd722daae009d71", "size": 7024, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LogSynth.jl", "max_stars_repo_name": "tdunning/LogSynth.jl", "max_stars_repo_head_hexsha": "f585182b5aa16230fecabdbd50ad77776bfe24a2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
SUBROUTINE HC_FVLD ( advise, nfcst, flat, flon, fstype, f34kt, + f50kt, f64kt, iret) C************************************************************************ C* HC_FVLD * C* * C* This subroutine finds the forecasted latitudes and longitudes, and * C* the 34, 50 and the 64 knot or 100 kt ...
{"hexsha": "f71abcec4e8d10c92d1ce9a221c804e910017b28", "size": 8278, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/bridge/hc/hcfvld.f", "max_stars_repo_name": "sgdecker/gempak", "max_stars_repo_head_hexsha": "92f9a3a8ee667ec49a9082f44380e27f61ca716b", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
# import json # import os # import cv2 # import numpy as np # from tqdm import tqdm # from pycocotools import mask as maskUtils # parent_path = '/data/zequn/datasets/coco/val2017' # json_file = '/data/zequn/datasets/coco/annotations/instances_val2017.json' # with open(json_file) as anno_: # annotations = json.load...
{"hexsha": "397b6234bb915fc75f7c2d9c6af48b824a9eaed4", "size": 2280, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmdetection/vis_coco.py", "max_stars_repo_name": "InukKang/Pedestron", "max_stars_repo_head_hexsha": "b592292389f313907c18b38cc9066c3b6f8ad5a4", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "...
# coding=utf-8 import pandas as pd import numpy as np from config.neighborhoods import Neighborhoods dataFrame = pd.read_csv('data/uber_map.csv') def rgb(minimum, maximum, value): minimum, maximum = float(minimum), float(maximum) r = 255 ratio = (value-minimum)/(maximum - minimum) bg = 20 + int(max(0,...
{"hexsha": "b4e811ffe9f4f29f5fc937c5f59f7964a28500ec", "size": 929, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/calculate_avgs.py", "max_stars_repo_name": "vandrefonseca/Copia-Uber-Natal", "max_stars_repo_head_hexsha": "09c453d24bc2d817f18508b217875a8351cdc967", "max_stars_repo_licenses": ["Apache-2.0"],...
struct DeepEnsemble models::Array DeepEnsemble(generator, N::Int) = new([generator() for _=1:N]) end Flux.@functor DeepEnsemble Flux.trainable(m::DeepEnsemble) = (Flux.trainable(model) for model in m.models) # Get the mean and variance estimate from each network individually function individual_forw...
{"hexsha": "a1bf42c1548edcdb00169566e7c698887aab939d", "size": 2381, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/extras/deep_ensembles.jl", "max_stars_repo_name": "ancorso/Shard.jl", "max_stars_repo_head_hexsha": "77b3b891494ca7f12113d86854641404ac961ad6", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
abstract type Grid{d} end # # # backward backward compatibility nodes(::Type{<:Union{ListOfPoints,ListOfPoints{d}}}, grid::Grid{d}) where d = nodes(grid) nodes(::Type{<:Matrix}, grid::Grid) = copy(from_LOP(nodes(grid))) node(::Type{<:Union{Point,Point{d}}}, grid::Grid{d}, i::Int) where d = node(grid,i) node(::Type{<:...
{"hexsha": "88c5d179a68e2c8fdb2eeaccc5571864f8860174", "size": 5969, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/numeric/grids.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Dolo.jl-9d24351c-2990-5e1b-a277-04c4b809c898", "max_stars_repo_head_hexsha": "f507e1b812d8980d87ccac33bfd56677c8d70ec0"...
''' @lanhuage: python @Descripttion: @version: beta @Author: xiaoshuyui @Date: 2020-05-07 08:55:29 @LastEditors: xiaoshuyui @LastEditTime: 2020-05-07 10:58:40 ''' ''' this file define a class to save the result of the mask of parse the mask will be save as a gray image using different color to represent different obje...
{"hexsha": "71d489e54ff6cb3389fc121604a53c731f2d8bd2", "size": 2223, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/saveMaskImage.py", "max_stars_repo_name": "guchengxi1994/LabelImgTool", "max_stars_repo_head_hexsha": "e7595f6758a3756379c8a1534e778bb57b71730f", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma borel_measurable_ereal_prod[measurable (raw)]: fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> ereal" assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M" shows "(\<lambda>x. \<Prod>i\<in>S. f i x) \<in> borel_measurable M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (...
{"llama_tokens": 277, "file": null, "length": 2}
#!/usr/bin/env python """Extract subcatchment and routing information from SWMM input file to GIS. Reads subcatchment geometries and routing from a SWMM input (.inp) file and saves them as shapefiles into the same folder as the SWMM input file. Copyright (C) 2018 Tero Niemi, Aalto University School of Engineering TO...
{"hexsha": "dd2585f0fe32a6a8fa0a7fbcba7dc2ea9f07c843", "size": 13702, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/inp2gis.py", "max_stars_repo_name": "AaltoUAW/GisToSWMM5", "max_stars_repo_head_hexsha": "b3435006e084a14f6f0f325c0962a4c2a5213559", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
% ClientServerProtocol.tex: Sedna Client/Server Protocol % Copyright (C) 2010 ISP RAS % The Institute for System Programming of the Russian Academy of Sciences \documentclass[a4paper,12pt]{article} \usepackage{alltt} % Like verbatim but supports commands inside \usepackage{theorem} \newtheorem{note}{Note} ...
{"hexsha": "d49460c442762d4e470bebea89b85586f69a81c6", "size": 30119, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/ClientServerProtocol/ClientServerProtocol.tex", "max_stars_repo_name": "TonnyRed/sedna", "max_stars_repo_head_hexsha": "06ff5a13a16f2d820d3cf0ce579df23f03a59eda", "max_stars_repo_licenses": ["E...
using CircuitscapeUI using Circuitscape using Distributed w = run_ui() oldpwd = pwd() cd(CircuitscapeUI.TESTPATH) Circuitscape.runtests() cd(oldpwd)
{"hexsha": "788d222ecedf3635d0d8645a01993a40dd000222", "size": 149, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "build/snoop.jl", "max_stars_repo_name": "JuliaTagBot/CircuitscapeUI.jl", "max_stars_repo_head_hexsha": "87f392d993d95ce787d84460c96ebe22c9499a3a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (C) 2019-2022, François-Guillaume Fernandez. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import Callable, Dict, List import numpy as np import torch import torch.nn as nn from...
{"hexsha": "629c1098b4b921842afbea6f318d4e012a4b1f53", "size": 5715, "ext": "py", "lang": "Python", "max_stars_repo_path": "holocron/nn/modules/downsample.py", "max_stars_repo_name": "frgfm/torch-zoo", "max_stars_repo_head_hexsha": "c97beacf3d49eaa34398abf47f378ea6b48a70f3", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] lemma "\<FF> \<F> \<Longrightarrow> ci" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<FF> \<F> \<Longrightarrow> \<forall>P. contains (\<bullet>P) (\<^bold>\<not> ((\<^bold>\<and>) P\<^sup>c (\<^bold>\<not> P))) [PROOF STEP] nitpick [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<FF> \<F> \<Longri...
{"llama_tokens": 181, "file": "Topological_Semantics_ex_LFIs", "length": 2}
# --- # jupyter: # jupytext: # formats: ipynb,.pct.py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [markdown] ...
{"hexsha": "e8338c1efebee55c77bff5ef6061c9f7e79772e8", "size": 5502, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/source/notebooks/tailor/kernel_design.pct.py", "max_stars_repo_name": "christabella/GPflow", "max_stars_repo_head_hexsha": "30824d289f8ee3f58d4249238c8b7267e6a0b2fc", "max_stars_repo_licenses"...
#import libraries import math #import matplotlib import numpy #import sympy import subprocess as sub #import sys import time import keyboard #define variables res="" exe="" cmd="" timsl=0.25 lcmd="" #define redirections cmred={"quit":"m0","basic":"m1","math":"m2","numpy":"m3","emulationstation":"m0","(":"m0",")":"m...
{"hexsha": "b2f009598f616ccf2fb8ce54b79c6785ba40e9b6", "size": 11980, "ext": "py", "lang": "Python", "max_stars_repo_path": "Raspberry/Interface/main.old.py", "max_stars_repo_name": "miguiss27/Calculadora", "max_stars_repo_head_hexsha": "f4f488abd156b22082f425200291d9f27c6dff54", "max_stars_repo_licenses": ["MIT"], "ma...
import argparse import os import numpy as np from sklearn.model_selection import train_test_split def read_sentence_data(gold_sent_fh): gold_scores = [float(line.strip()) for line in open(gold_sent_fh, 'r')] return gold_scores def read_data(fname): data = [line.strip() for line in open(fname, 'r')] ...
{"hexsha": "9d6793434f7aecd6c6904f1a84a8ed1f979d611b", "size": 2072, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/split_dev_set.py", "max_stars_repo_name": "deep-spin/explainable-qe-shared-task", "max_stars_repo_head_hexsha": "da517a9a76f6dc0c68113e2d6be830f5b57726a7", "max_stars_repo_licenses": ["MIT...
import os import tornado.web import tornado.ioloop import codecs import math import numpy as np import os import sys import json import torch from torch.utils.data import DataLoader from config import Config from dataset.classification_dataset import ClassificationDataset from dataset.collator import ClassificationC...
{"hexsha": "8716884d212ffb9de36800f52f3795d49682deb1", "size": 4177, "ext": "py", "lang": "Python", "max_stars_repo_path": "api_tornado.py", "max_stars_repo_name": "TechnologyInstitute/NeuralNLP-NeuralClassifier", "max_stars_repo_head_hexsha": "cd2c46c8d99dd8fa537206b5f4444a777c7b5d89", "max_stars_repo_licenses": ["Apa...
[STATEMENT] lemma Spy_see_shrK_D [dest!]: "\<lbrakk>Key (shrK A) \<in> parts (knows Spy evs); evs \<in> otway\<rbrakk> \<Longrightarrow> A \<in> bad" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Key (shrK A) \<in> parts (knows Spy evs); evs \<in> otway\<rbrakk> \<Longrightarrow> A \<in> bad [PROOF S...
{"llama_tokens": 159, "file": null, "length": 1}
#!/usr/bin/env python import argparse import os import os.path import shutil import cv2 import duckietown_utils import numpy as np import numpy.random import rosbag # Example usage: ./sample_images.py path_to_bag /scbb/camera_rectifier/image/compressed 500 if __name__ == '__main__': parser = argparse.ArgumentPa...
{"hexsha": "d2d3f3b53ab6cf5e9146b5de3f99880774534f5e", "size": 1357, "ext": "py", "lang": "Python", "max_stars_repo_path": "catkin_ws/src/10-lane-control/anti_instagram/sandbox/annotation/sample_images.py", "max_stars_repo_name": "johnson880319/Software", "max_stars_repo_head_hexsha": "045894227f359e0a3a3ec5b7a53f8d1eb...
import unittest import numpy as np import pandas as pd import numpy.testing as np_testing import pandas.testing as pd_testing import os import import_ipynb from tensorflow import random from keras.applications.vgg16 import VGG16, preprocess_input, decode_predictions from keras.preprocessing import image class Test(uni...
{"hexsha": "679b3440d01906f8cfa6bb4714b2a981aa8293fb", "size": 1411, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter08/Activity8.01/Activity8.01_Unit_test.py", "max_stars_repo_name": "PacktWorkshops/Applied-Deep-Learning-with-Keras", "max_stars_repo_head_hexsha": "d1372a6109e2ee9434ae47df59440577566badaa...
[STATEMENT] lemma strong_supplementation: "\<not> P x y \<Longrightarrow> (\<exists> z. P z x \<and> \<not> O z y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> P x y \<Longrightarrow> \<exists>z. P z x \<and> \<not> O z y [PROOF STEP] nitpick [expect = genuine] [PROOF STATE] proof (prove) goal (1 subgoal):...
{"llama_tokens": 167, "file": "Mereology_GMM", "length": 2}
\documentclass[letterpaper,10pt]{article} \usepackage[margin=2cm]{geometry} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[colorlinks]{hyperref} \newcommand{\panhline}{\begin{center}\rule{\textwidth}{1pt}\end{center}} \title{\textbf{LectureTitle}} \author{Authors} ...
{"hexsha": "c25cec0ac92a09f03bcc3ae0d16df9704900e3be", "size": 565, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Notes/R3_MleMapVectorMatrixDifferentiation/document.tex", "max_stars_repo_name": "MengwenHe-CMU/17S_10701_MachineLearning", "max_stars_repo_head_hexsha": "613a3087a57a206b83d79855cec359e04cb440f7", "...
import sys import numpy as np print("Make space between values.") n = map(float, input("Reflactive Index>> ").split()) r = map(float, input("Curvature>> ").split()) d = map(float, input("Thickness>> ").split()) n = list(n) n.insert(0, 1.0) r = list(r) d = list(d) print(n) all_matrix = [] def calculate_mat...
{"hexsha": "d5197d496b4ead9c85488cfee5b89548fc1d4274", "size": 1454, "ext": "py", "lang": "Python", "max_stars_repo_path": "matrix.py", "max_stars_repo_name": "ilikemap2/RayMatrix", "max_stars_repo_head_hexsha": "d894ed1b0bda85aad2c3b155cbcf2a277c30e8be", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...