text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
(** This file is part of the Flocq formalization of floating-point arithmetic in Coq: http://flocq.gforge.inria.fr/ Copyright (C) 2010-2018 Sylvie Boldo #<br /># Copyright (C) 2010-2018 Guillaume Melquiond This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Genera...
{"author": "PrincetonUniversity", "repo": "VST", "sha": "7d3133f3ff626e3c98bec2bd603ac74af2aff6d9", "save_path": "github-repos/coq/PrincetonUniversity-VST", "path": "github-repos/coq/PrincetonUniversity-VST/VST-7d3133f3ff626e3c98bec2bd603ac74af2aff6d9/compcert_new/flocq/Prop/Relative.v"}
import random import numpy as np from beamng_brewer import BeamNGBrewer from beamng_waypoint import BeamNGWaypoint from road_storage import RoadStorage from simulation_data_collector import SimulationDataCollector from beamng_tig_maps import maps random.seed(42) np.random.seed(42) maps.install_map_if_needed() def...
{"hexsha": "1c360299626f54c716aa4aecbead375a80472123", "size": 2013, "ext": "py", "lang": "Python", "max_stars_repo_path": "DeepJanus-BeamNG/udacity_integration/take-free-screenshot.py", "max_stars_repo_name": "TrackerSB/deepjanus", "max_stars_repo_head_hexsha": "f715072645b1e6f2cc0c51ec0c3a6296cfb14a1d", "max_stars_re...
import pandas as pd import numpy as np import os import keras import matplotlib.pyplot as plt from keras.layers import Dense,GlobalAveragePooling2D, Conv2D from keras.applications import MobileNet from keras.applications.densenet import DenseNet121 from keras.preprocessing import image from keras.applications.mobilenet...
{"hexsha": "e84db6e11230d09c0c1448273ffb53e2716ad5e6", "size": 3510, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "velvet-market/Greenseer", "max_stars_repo_head_hexsha": "8c7973e5645f9a26317692ff9cbbb24e1f14a898", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
from stable_baselines.ppo2.run_mujoco import eval_return import cma import numpy as np from stable_baselines.low_dim_analysis.eval_util import * from stable_baselines.low_dim_analysis.common import do_pca, plot_2d, \ dump_rows_write_csv, generate_run_dir, do_proj_on_first_n_IPCA, get_allinone_concat_df from sklear...
{"hexsha": "f7041307e33cd1201a9c5c859e8fdf222c915063", "size": 10525, "ext": "py", "lang": "Python", "max_stars_repo_path": "stable_baselines/cmaes/cma_redo.py", "max_stars_repo_name": "hugerepo-tianhang/low_dim_update_stable", "max_stars_repo_head_hexsha": "565f6cbf886d266d0633bc112ccae28f1d116ee1", "max_stars_repo_li...
(* File: Probability_Misc.thy Authors: Max Haslbeck, Manuel Eberl Miscellaneous facts about measures and probability that are missing from the library and should perhaps be moved there at some point. *) section \<open>Auxiliary material\<close> theory Probability_Misc imports "HOL-Probability.Probabil...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Treaps/Probability_Misc.thy"}
import numpy as np from itertools import permutations, product, combinations from pysat.pb import PBEnc from utils import verify_solution, sat_search, build_sat, sat_to_dice m = 19 dice_names = ["D%i" % i for i in range(m)] d = 5 cardinality_clauses = False dice_pairs = list(permutations(dice_names, 2)) n = len(d...
{"hexsha": "e174e6303442089ad8530201e87eb8173ad03a25", "size": 2463, "ext": "py", "lang": "Python", "max_stars_repo_path": "oskar_row_sums.py", "max_stars_repo_name": "michaelpatrickpurcell/balanced-nontransitive-dice", "max_stars_repo_head_hexsha": "d4d6e4cfc282d65edd10e9ff0219615c5ac2b77b", "max_stars_repo_licenses":...
import numpy as np # just does a sinusoidal and its square def run(self,Input): freq = Input['frequency'] mag = Input['magnitude'] num_steps = 8000 max_eval = 2.*np.pi steps = np.linspace(0,max_eval,num_steps) self.single = np.sin(freq*steps) self.square = self.single*self.single self.time = steps
{"hexsha": "6422a1231088ab8a422486fe7129ffc8d40cb652", "size": 318, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/framework/PostProcessors/BasicStatistics/HeavyXmlWrite/sinusoidal.py", "max_stars_repo_name": "rinelson456/raven", "max_stars_repo_head_hexsha": "1114246136a2f72969e75b5e99a11b35500d4eef", "m...
from torch import nn from torch.nn import Sequential, Conv2d, MaxPool2d, Flatten, Linear import numpy as np class ExModel(nn.Module): def __init__(self): super(ExModel, self).__init__() self.seq = Sequential( Conv2d(3, 32, 5, padding=2), MaxPool2d(2), ...
{"hexsha": "fda3409f85e6edd1892f56d42003aba63e011baa", "size": 688, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_demo/model.py", "max_stars_repo_name": "Beautyya/demo", "max_stars_repo_head_hexsha": "77311fc9347727ab2de0dd3a036ac76bedbde215", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
/** * 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...
{"hexsha": "0e31f6a148183a390581493d44b96ede8e8c3d2b", "size": 9174, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pulsar-client-cpp/tests/ReaderTest.cc", "max_stars_repo_name": "KangZhiDong/incubator-pulsar", "max_stars_repo_head_hexsha": "f2160c01e3581f0e8374db5d4d713810de7533af", "max_stars_repo_licenses": ["A...
"""Test based on the example_pott_segmentation.""" import json import os import numpy as np import numpy.testing from pysparselp.examples.example_pott_segmentation import run __folder__ = os.path.dirname(__file__) def trim_length(a, b): min_len = min(len(a), len(b)) return a[:min_len], b[:min_len] def ...
{"hexsha": "a2f617aa2d2839a1bbcc91c428bc24418a546143", "size": 1163, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pott_segmentation.py", "max_stars_repo_name": "tristone13th/PySparseLP", "max_stars_repo_head_hexsha": "926f0d08a9e99caacb6f9ac072fe98413a7def99", "max_stars_repo_licenses": ["MIT"], "m...
/- This file develops the memory model that is used in the dynamic semantics of all the languages used in the compiler. It defines a type [mem] of memory states, the following 4 basic operations over memory states, and their properties: - [load]: read a memory chunk at a given address; - [store]: store a memory ...
{"author": "digama0", "repo": "kremlin", "sha": "d4665929ce9012e93a0b05fc7063b96256bab86f", "save_path": "github-repos/lean/digama0-kremlin", "path": "github-repos/lean/digama0-kremlin/kremlin-d4665929ce9012e93a0b05fc7063b96256bab86f/memory.lean"}
#!/usr/bin/env python """ """ from pathlib import Path import pandas as pd import numpy as np import matplotlib.pyplot as plt # type: ignore import matplotlib.ticker as ticker # type: ignore plt.rc("figure", figsize=(15, 5)) plt.rc( "axes", titlesize=15, titleweight="bold", labelsize=12, labelweig...
{"hexsha": "58d0ec3dc01dde37b104fedf0f812a34a29205f4", "size": 4403, "ext": "py", "lang": "Python", "max_stars_repo_path": "use_cases/2021_12/scripts/overlay_single.py", "max_stars_repo_name": "idaholab/FORCE", "max_stars_repo_head_hexsha": "2ec8cef41b4133b1ba8dd565339243fb136d738e", "max_stars_repo_licenses": ["MIT"],...
""" BSD 3-Clause License Copyright (c) 2020, vj-sarthy All rights reserved. @Author: Vijay Sarthy, Ph.D., Mechanical Engineering, Clemson University, USA @Email: vsreedh@g.clemson.edu Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condition...
{"hexsha": "cbd9d5785b860b95dc62c97ba2365b76c36bc4cf", "size": 7548, "ext": "py", "lang": "Python", "max_stars_repo_path": "Wbal_SK2.py", "max_stars_repo_name": "vj-sarthy/Wbal_SK2", "max_stars_repo_head_hexsha": "f538414dd8768760b9cb291f665539fe98a9115e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
import abc import itertools import logging from typing import Any, Dict, List, Optional, Tuple, Union import networkx as networ from tqdm.autonotebook import tqdm import helpers.dbg as dbg import helpers.list as hlist _LOG = logging.getLogger(__name__) # ############################################################...
{"hexsha": "d36cc1f969141a1af9ef22985c4a1f6daef69072", "size": 15198, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/dataflow/core.py", "max_stars_repo_name": "ajmal017/amp", "max_stars_repo_head_hexsha": "8de7e3b88be87605ec3bad03c139ac64eb460e5c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
#include "bio/compressed_int_array.h" #include <boost/test/unit_test.hpp> #include <boost/test/parameterized_test.hpp> #include <boost/test/floating_point_comparison.hpp> #include <boost/assign/list_of.hpp> using namespace boost; using namespace boost::assign; using boost::unit_test::test_suite; #include <iostream>...
{"hexsha": "01e6410e263372eeaab4fdbe2c74f9ff00725aa2", "size": 2719, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "C++/test/check_compressed_int_array.cpp", "max_stars_repo_name": "JohnReid/biopsy", "max_stars_repo_head_hexsha": "1eeb714ba5b53f2ecf776d865d32e2078cbc0338", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import matplotlib.pyplot as plt import lmfit class curve: """ This class is for all curves. basic information will be saved. And plot and curve fitting and smoothing will be realized. """ def __init__(self, curvetype, infilename): """ curvetype: 'character',...
{"hexsha": "8d8a40cfe6baa9d821b66e1aa0a4c89b2591aa4a", "size": 4642, "ext": "py", "lang": "Python", "max_stars_repo_path": "xrd2021/curve_pre.py", "max_stars_repo_name": "nuannuanGo/xrdfit", "max_stars_repo_head_hexsha": "eeea9f3cf3b1d2808bae3cb448b72d4b95b3c198", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#coding=utf-8 from __future__ import division import os import numpy as np from numpy import append, array, int8, uint8, zeros import struct from array import array as pyarray from dml.CNN import CNNC,LayerC def read(digits, dataset = "training", path = "."): """ Loads MNIST files into 3D numpy arrays Ada...
{"hexsha": "e8b82058a1e7f9ba3e9977696c49a2c349d75497", "size": 2164, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/CNN_test/test_cnn.py", "max_stars_repo_name": "Edelweiss35/deep-machine-learning", "max_stars_repo_head_hexsha": "b1e4b133609f303be77de824601925f448a94764", "max_stars_repo_licenses": ["WTFPL...
# Copyright (c) 2021 PaddlePaddle 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 required by appli...
{"hexsha": "12e2c85f0f34ba27cdd446ef7f706400f8e3a787", "size": 6396, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/examples/gpt/test_accuracy.py", "max_stars_repo_name": "mukaiu/PaddleNLP", "max_stars_repo_head_hexsha": "0315365dbafa6e3b1c7147121ba85e05884125a5", "max_stars_repo_licenses": ["Apache-2.0"]...
[STATEMENT] lemma inj_iff_eq_0: "inj f = (\<forall>x. f x = 0 \<longrightarrow> x = 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. inj f = (\<forall>x. f x = (0::'c) \<longrightarrow> x = (0::'b)) [PROOF STEP] by (rule inj_on_iff_eq_0[OF m1.subspace_UNIV, unfolded ball_UNIV])
{"llama_tokens": 128, "file": null, "length": 1}
from skimage.measure import find_contours as FC import numpy as np from simplification.cutil import simplify_coords def find_contours(*args): contours = FC(*args) simplified_contours = [np.array(simplify_coords(x, 1), dtype=np.int32) \ for x in contours] retur...
{"hexsha": "90ee8e90a1e2d13f347b7ac0d67054e2f79233dd", "size": 351, "ext": "py", "lang": "Python", "max_stars_repo_path": "coco_dataset_generator/gui/contours.py", "max_stars_repo_name": "quaesitor-scientiam/COCO-Style-Dataset-Generator-GUI", "max_stars_repo_head_hexsha": "f724548d14aa3d8efab20336f5a8e4434a75f30b", "ma...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rank_images.py -- Creating ranking image list # # Usage: python3 rank_images.py InputFile(.csv) # import subprocess import csv import sys import numpy as np args = sys.argv InputCSV = args[1] OutputPNG = InputCSV.replace ('.csv', '') cnv_options = " -resize 128x128 ...
{"hexsha": "dbc99227da8d253c3d037aa53f477db6e796642a", "size": 1733, "ext": "py", "lang": "Python", "max_stars_repo_path": "rank_images.py", "max_stars_repo_name": "uchidalab/thumbnails_scatter", "max_stars_repo_head_hexsha": "e1cb3b444f78011aaec7ef293e138b4f4ff579d5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#' @include translate-sql-window.r #' @include translate-sql-helpers.r #' @include sql-escape.r NULL sql_if <- function(cond, if_true, if_false = NULL) { build_sql( "CASE WHEN (", cond, ")", " THEN (", if_true, ")", if (!is.null(if_false)) build_sql(" WHEN NOT(", cond, ") THEN (", if_false, ")"), ...
{"hexsha": "643c6deb3dc2a7080b10b71e8f5e41e8ace830a7", "size": 10351, "ext": "r", "lang": "R", "max_stars_repo_path": "R/translate-sql-base.r", "max_stars_repo_name": "washcycle/dbplyr", "max_stars_repo_head_hexsha": "ea093cabcdce45a63887c3ed94987687eabfa941", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
""" Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d =< 8 in ascending order of size, we get: 1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6...
{"hexsha": "6e1fd1369ed3ae880979ae332a42994359ced2b5", "size": 1637, "ext": "py", "lang": "Python", "max_stars_repo_path": "problem073.py", "max_stars_repo_name": "racamirko/proj_euler2014", "max_stars_repo_head_hexsha": "62a4ff109ffc08811d3fa504a5014e8d317daad0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
function debugging end enable_debug() = @eval debugging() = true disable_debug() = @eval debugging() = false enable_debug() # disable_debug() macro _assert(args...) call = Expr( :macrocall, getfield(ArgCheck, Symbol("@check")), # injecting the callable for esc __source__, args..., ...
{"hexsha": "16904a41f9f39b569dbb14157e9540d2af01c5cb", "size": 4323, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "tkf/SyncBarriers.jl", "max_stars_repo_head_hexsha": "ddf5b1cbcd1df34ef2d95f398611c3a0895fe8dd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
#include "File.h" #include <boost/filesystem.hpp> #include <iostream> const char File::SEPARATOR = boost::filesystem::path::preferred_separator; File::File(std::string path) : mPath(path) { update(path); } bool File::exists() const { return boost::filesystem::exists(boost::filesystem::path(mPath)); } s...
{"hexsha": "9d071538f200b9a227f6aa0adae1238ea690aa24", "size": 2383, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/io/File.cpp", "max_stars_repo_name": "danielroth1/CAE", "max_stars_repo_head_hexsha": "7eaa096e45fd32f55bd6de94c30dcf706c6f2093", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5.0, "max...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import numpy as np import torch import torchvision.utils as vutils import sys from collections import OrderedDict from options.train_options import TrainOptions import data from util.iter_counter import IterationCounter from util.util i...
{"hexsha": "6a8dea3c2aff2a431bd6e58bbfda496cfbe78719", "size": 5275, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "jiye-ML/CoCosNet", "max_stars_repo_head_hexsha": "c4b3f44393462c8353c6c6952d7b05496298df1c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
[STATEMENT] lemma map_fun_upds: "length xs = length ys \<Longrightarrow> distinct xs \<Longrightarrow> map (\<sigma>[xs :=\<^sup>* ys]) xs = ys" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>length xs = length ys; distinct xs\<rbrakk> \<Longrightarrow> map (\<sigma>[xs :=\<^sup>* ys]) xs = ys [PROOF STEP] ...
{"llama_tokens": 143, "file": "Safe_Range_RC_Restrict_Frees", "length": 1}
import numpy as np import random from itertools import product def fill_prob(lamda, kappa, distance, dt): """ Computes exponential fill probability assuming Poisson arrival at the top of the book. """ return lamda * np.exp(-kappa * distance) * dt class DeterministicMarketMakingSimulator: """...
{"hexsha": "fb9d92471ed87fea7dce77795da0cd37e8637e98", "size": 6017, "ext": "py", "lang": "Python", "max_stars_repo_path": "env.py", "max_stars_repo_name": "grayvalley/DQNAMM", "max_stars_repo_head_hexsha": "6a51f95632f88bb9a798b3c80e7a7a34725136f9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 6, "max...
# -*- coding: utf-8 -*- from utils.espeakng import ESpeakNG import re import itertools import pandas as pd import numpy as np from utils.vocab_utils import SOS, EOS, UNK, SOS_ID, EOS_ID, UNK_ID __all__ = [ 'IPAError', 'get_ipa', 'load_binf2phone', 'ipa2binf', 'get_mapping' ] engine = ESpeakNG() ...
{"hexsha": "eea7f8a7e56f80f02b242b31c4693a1b5ddec3c9", "size": 15091, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/ipa_utils.py", "max_stars_repo_name": "sciforce/phones-las", "max_stars_repo_head_hexsha": "f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
C %W% %G% block data stabdat !dem c c Initializes fixed data in COMMON blocks c First writing: Apr/09/92 by DEM c include 'tspinc/params.inc' include 'tspinc/titles.inc' include 'tspinc/param.inc' include 'tspinc/amorts.inc' ...
{"hexsha": "2a480ef9695c2314e8940ac2927c226df98b9aa4", "size": 1702, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "libtsp/stabdat.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import numpy as np from collections import Counter import hccpy.utils_hhs as utils import hccpy._AGESEXV6 as AGESEXV6 # age/sex variables import hccpy._I0V05ED2 as I0V05ED2 # age/sex edits import hccpy._V0519F3M as V0519F3M # interactions import hccpy._V0519F3P as V0519F3P # risk coefn class HHSHCCEngine: def __...
{"hexsha": "9ef56792b98297a999148f45af6a41d029432355", "size": 5341, "ext": "py", "lang": "Python", "max_stars_repo_path": "hccpy/hhshcc.py", "max_stars_repo_name": "mwalker14/hccpy", "max_stars_repo_head_hexsha": "a6dae55df3f82f657bb6cfc77967c724827117e8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
SUBROUTINE GD_GNUM ( iacss, gdattm, level, ivcord, parm, + ignum, iret ) C************************************************************************ C* GD_GNUM * C* * C* This subroutine gets the grid number for the requested grid. * C* * C* GD_GNUM ( IACSS, GDATTM, LEVEL, IVCORD, ...
{"hexsha": "adb7e104c0d4ffc3dd098e1b56b669f2d831fc94", "size": 2592, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gridlib/gd/gdgnum.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
[STATEMENT] lemma lfilter_transfer [transfer_rule]: "((A ===> (=)) ===> llist_all2 A ===> llist_all2 A) lfilter lfilter" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ((A ===> (=)) ===> llist_all2 A ===> llist_all2 A) lfilter lfilter [PROOF STEP] by(auto simp add: rel_fun_def intro: llist_all2_lfilterI)
{"llama_tokens": 131, "file": "Coinductive_Coinductive_List", "length": 1}
[STATEMENT] lemma filter_tab_dom_subset: "dom (filter_tab C t) \<subseteq> dom t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dom (filter_tab C t) \<subseteq> dom t [PROOF STEP] by (auto simp add: filter_tab_def dom_def)
{"llama_tokens": 90, "file": null, "length": 1}
import numpy as np # Atomic mass unit [g]. AMU = 1.660_540_2e-24 # Electron charge [esu]. Q_ELECTRON = 4.80325e-10 # Electron mass [g]. M_ELECTRON = 9.109_389_7e-28 # Hydrogen mass [g]. M_H = 1.672_621_9e-24 # Helium mass [g]. M_HE = 6.65e-24 # Ion mass [g]. MION = M_H # Speed of light in vacuum [cm/s]. CLIGHT = 2.997...
{"hexsha": "cbe10f266732d2a96cb20200f9c5db00efe2548d", "size": 3084, "ext": "py", "lang": "Python", "max_stars_repo_path": "backstaff/units.py", "max_stars_repo_name": "lars-frogner/bifrost-rust", "max_stars_repo_head_hexsha": "ae1b4e7adde92ec1c611259796ef593243f82a8d", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
from queue import Queue from threading import Thread from ipykernel.kernelbase import Kernel import subprocess import tempfile import os import os.path as path from shlex import split as shsplit from shutil import copyfile class RealTimeSubprocess(subprocess.Popen): """ A subprocess that allows...
{"hexsha": "0ad4c61f222be6cd97ebd0daf778f2b04e2d8f73", "size": 14450, "ext": "py", "lang": "Python", "max_stars_repo_path": "jupyter_ifort_kernel/kernel.py", "max_stars_repo_name": "f66blog/jupyter-ifort-kernel", "max_stars_repo_head_hexsha": "bb3489182aba6ecd914281b399b3878a79cb95eb", "max_stars_repo_licenses": ["MIT"...
# -*- coding: utf-8 -*- import click import logging import pandas as pd from pathlib import Path from dotenv import find_dotenv, load_dotenv from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from scipy.sparse import csr_matrix @click.command() @click.arg...
{"hexsha": "9b4b25489ad4e3524cd5c6bcb57c45b2d0735e7e", "size": 2043, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features/build_features.py", "max_stars_repo_name": "diodax/commit-multi-label-classification", "max_stars_repo_head_hexsha": "30edb27e6356a66ec7fdfba4d77c2bb6147d63e3", "max_stars_repo_licens...
[STATEMENT] lemma metric_eq_0D [dest]: "[| metric n s = 0; Min \<le> floor s; floor s \<le> Max |] ==> floor s = n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>metric n s = 0; Lift.Min \<le> floor s; floor s \<le> Lift.Max\<rbrakk> \<Longrightarrow> floor s = n [PROOF STEP] by (force simp add: met...
{"llama_tokens": 135, "file": null, "length": 1}
"""Simultaneous MT latency metrics.""" import numpy as np from .metric import Metric class AVPScorer: """Average Proportion metric (Cho and Esipova, 2016)""" def __init__(self, add_trg_eos=True): self.name = 'AVP' self.add_trg_eos = add_trg_eos def compute(self, actions): """`ac...
{"hexsha": "3a8e4609513eb3fd3d5a20ad277acbe319c57a6a", "size": 3668, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysimt/metrics/simnmt.py", "max_stars_repo_name": "welvin21/pysimt", "max_stars_repo_head_hexsha": "6250b33dc518b3195da4fc9cc8d32ba7ada958c0", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import math from SurfStatEdg import py_SurfStatEdg from matlab_functions import interp1, ismember import copy def py_SurfStatPeakClus(slm, mask, thresh, reselspvert=None, edg=None): """ Finds peaks (local maxima) and clusters for surface data. Parameters ---------- slm : a dictionary...
{"hexsha": "610a1d5a4ee51b610abcf800d70924a07c1ad186", "size": 7119, "ext": "py", "lang": "Python", "max_stars_repo_path": "surfstat/python/SurfStatPeakClus.py", "max_stars_repo_name": "rudimeier/BrainStat", "max_stars_repo_head_hexsha": "a5ef474ffd70300ecf5fa464fff4a41e71f4b7a1", "max_stars_repo_licenses": ["BSD-3-Cla...
# -*- coding: utf-8 -*- # ============================================================================== # SBEMimage, ver. 2.0 # Acquisition control software for serial block-face electron microscopy # (c) 2018-2019 Friedrich Miescher Institute for Biomedical Research, Basel. # This software is licensed under ...
{"hexsha": "5810aa51bebfa673248cbea42beafa0605281a79", "size": 18182, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/autofocus.py", "max_stars_repo_name": "seung-lab/SBEMimage", "max_stars_repo_head_hexsha": "4f563c43350106a2e44dcbab26cb15a98a7d4216", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" Creates non-binding data """ __author__ = "Michael Suarez" __email__ = "masv@connect.ust.hk" __copyright__ = "Copyright 2019, Hong Kong University of Science and Technology" __license__ = "3-clause BSD" import pickle import numpy as np import pandas as pd from rdkit.Chem import AllChem from rdkit import DataStruc...
{"hexsha": "936ce02ee02c85fe2c1f2b06e453d60625022b18", "size": 1766, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/CreateNonBinding.py", "max_stars_repo_name": "mike72353/FragFeatureNet", "max_stars_repo_head_hexsha": "ef61ae52e3d6dcc6d2d56df2a6bd5fe1a298c930", "max_stars_repo_licenses": ["BSD-3-Clause...
import numpy as np from scipy.stats import ttest_ind_from_stats from scipy.stats.mstats import gmean from scipy.ndimage import gaussian_filter from mesostat.utils.arrays import list_assert_get_uniform_shape, set_list_shapes from mesostat.stat.stat import convert_pmf from mesostat.utils.matrix import offdiag_1D from m...
{"hexsha": "2d682433314c88c9c0a7cda298f46ef8e97e0aa1", "size": 10322, "ext": "py", "lang": "Python", "max_stars_repo_path": "mesostat/metric/temporal/sequence.py", "max_stars_repo_name": "HelmchenLabSoftware/mesostat-dev", "max_stars_repo_head_hexsha": "8baa7120b892fe0df893cdcf0f20f49876643d75", "max_stars_repo_license...
#include <boost/filesystem.hpp> #include "GTestGroups.h" #include <Schema/multy_command.pa.h> #include <Schema/multy_command_create.pa.h> #include <Schema/multy_command_copy.pa.h> using namespace boost; using namespace bsw; using namespace protoargs; class MultiCommandsTests: public LogTest { ...
{"hexsha": "9504cbb9a57d9e3c1911a126b7980b870af767d3", "size": 5788, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Tests/src/MultiCommandsTests.cpp", "max_stars_repo_name": "OakInn/protoargs", "max_stars_repo_head_hexsha": "c15c32dab989419d5f6c145b0a871a9081b36da9", "max_stars_repo_licenses": ["BSD-2-Clause"...
[STATEMENT] lemma (in is_tdghm) tdghm_is_tdghm_if_ge_Limit: assumes "\<Z> \<beta>" and "\<alpha> \<in>\<^sub>\<circ> \<beta>" shows "\<NN> : \<FF> \<mapsto>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<beta>\<^esub> \<BB>" [PROOF STATE] proof (prove) goal (1 subgoal): 1...
{"llama_tokens": 1365, "file": "CZH_Foundations_czh_digraphs_CZH_DG_TDGHM", "length": 5}
# -*- coding:utf8 -*- # @TIME : 2021/4/11 21:04 # @Author : SuHao # @File : cal_anchors.py from __future__ import division from utils.datasets import * from utils.augmentations import * from utils.parse_config import * from utils.transforms import * import argparse import torch import tqdm import os import...
{"hexsha": "de65d23a4c922e3991f933f63030ad605a44c638", "size": 2270, "ext": "py", "lang": "Python", "max_stars_repo_path": "cal_anchors.py", "max_stars_repo_name": "qqsuhao/YOLOv3-YOLOv3-tiny-yolo-fastest-xl--pytorch", "max_stars_repo_head_hexsha": "351023a929afb2109b2233d4c089cb1d3562be52", "max_stars_repo_licenses": ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- #在python2的环境下执行 # run in python 2 from __future__ import division import numpy as np import gambit from fractions import Fraction def action2y(action,actionNumber,y_min,y_max): #把动作的编号转换成对应的动作值y # transform the action index to action y y = y_min + (y_max - ...
{"hexsha": "c0535353bb94399745896accb3885cda2a0f4573", "size": 2406, "ext": "py", "lang": "Python", "max_stars_repo_path": "old_source_code/Experiment 2- WoLF-PHC performance evaluation/gambitSolveGame.py", "max_stars_repo_name": "prasoonpatidar/multiagentRL-resource-sharing", "max_stars_repo_head_hexsha": "e63ba7fc3c7...
[STATEMENT] lemma \<I>_uniform_empty [simp]: "\<I>_uniform {} A = bot" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<I>_uniform {} A = \<bottom> [PROOF STEP] unfolding bot_\<I>_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<I>_uniform {} A = \<I>_uniform {} UNIV [PROOF STEP] including \<I>.lifting [PROOF...
{"llama_tokens": 187, "file": "CryptHOL_Generative_Probabilistic_Value", "length": 3}
[STATEMENT] lemma embed_le_1[simp,intro]: "\<guillemotleft>G\<guillemotright> s \<le> 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<guillemotleft> G \<guillemotright> s \<le> 1 [PROOF STEP] by(simp add:embed_bool_def)
{"llama_tokens": 101, "file": "pGCL_Expectations", "length": 1}
\hypertarget{Introduction}{} \chapter*{Introduction} \label{Chapter:Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set numberings \renewcommand{\thefigure}{I.\arabic{figure}} \renewcommand{\thetable}{I.\arabic{table}} \renewcommand{\theequation}{I.\arabic{equation}} \addcontentsline{toc}{chapter}{\tocEntry{Introductio...
{"hexsha": "0f39d9708f5e520654927197bf5e43443cd6a102", "size": 815, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis/Introduction/Introduction.tex", "max_stars_repo_name": "GPMueller/mwe-tex", "max_stars_repo_head_hexsha": "b6a734d44a7966613e2ce74e3e63656a6c393de0", "max_stars_repo_licenses": ["Unlicense"], ...
# Copyright 2020 Helga Svala Sigurðardóttir helgas@ru.is # In this file, a helper function to introduce word error # rates to a dataset is defined. # A list of sentences is split up to words, punctuation # marks removed and a function defined to introduce # word error rate with 25% deletion, 25% insertion and # 50% s...
{"hexsha": "50d2f846c007c5aad15763c5e38e849e4fcc277d", "size": 3043, "ext": "py", "lang": "Python", "max_stars_repo_path": "process/wer_assist.py", "max_stars_repo_name": "judyfong/punctuation-prediction", "max_stars_repo_head_hexsha": "cf30cdd5764aa2e2d4e2c666252cf03ad7cc9d4a", "max_stars_repo_licenses": ["MIT"], "max...
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
{"hexsha": "49f0ef1b6e201e49e91d6bb322682c6d2316eb2c", "size": 14627, "ext": "py", "lang": "Python", "max_stars_repo_path": "touchdown/sdr/train_eager.py", "max_stars_repo_name": "google-research/valan", "max_stars_repo_head_hexsha": "9fc6e38f411e6cb76408bf033cdc056ace980973", "max_stars_repo_licenses": ["Apache-2.0"],...
#!/usr/bin/env python # -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen, based on code from Ross Girshick # -------------------------------------------------------- """ Demo script showing detections...
{"hexsha": "05a8d03267afbafd11cfe922730ee5e7d3cb4c4f", "size": 8030, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/rs_vis.py", "max_stars_repo_name": "PengchengAi/tf-faster-rcnn-pcai", "max_stars_repo_head_hexsha": "b054345728c20c8eb64561a6800e85594ce76fd3", "max_stars_repo_licenses": ["MIT"], "max_stars...
{-# OPTIONS --without-K #-} open import Base module Homotopy.Pushout where open import Homotopy.PushoutDef public pushout-diag-flip : ∀ {i} → pushout-diag i → pushout-diag i pushout-diag-flip (diag A , B , C , f , g) = diag B , A , C , g , f pushout-flip : ∀ {i} {d : pushout-diag i} → pushout d → pushout (pushout-...
{"hexsha": "471e09d9abeac88ab320cfb8c52685cddcc05602", "size": 2218, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "old/Homotopy/Pushout.agda", "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma lfp_trans_unfold: fixes P::"'s expect" assumes mono: "\<And>t u. \<lbrakk> le_trans t u; \<And>P. sound P \<Longrightarrow> sound (t P); \<And>P. sound P \<Longrightarrow> sound (u P) \<rbrakk> \<Longrightarrow> le_trans (T t) (T u)" and sT: "\<And>t P. \<lbrakk> \...
{"llama_tokens": 324, "file": "pGCL_Induction", "length": 1}
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Image tools interfaces ~~~~~~~~~~~~~~~~~~~~~~ """ import os from subprocess import Popen, PIPE from textwrap import indent import numpy as np import niba...
{"hexsha": "f1ab58881badcf949150742ccf9634199932bfb4", "size": 26052, "ext": "py", "lang": "Python", "max_stars_repo_path": "qsiprep/interfaces/images.py", "max_stars_repo_name": "arokem/qsiprep", "max_stars_repo_head_hexsha": "f0a12fa002ea99cad97f2b5e40c1517d0569e14c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
from __future__ import print_function import numpy as np from sklearn.datasets import make_classification from sklearn.tree import DecisionTreeClassifier, export_graphviz from sklearn.model_selection import cross_val_score # For reproducibility np.random.seed(1000) nb_samples = 500 # Set a folder to...
{"hexsha": "22c287fd663b54814c83676b76ff7a44e3f3acd1", "size": 1050, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter08/1decision_tree.py", "max_stars_repo_name": "packtprasadr/Machine-Learning-Algorithms", "max_stars_repo_head_hexsha": "06c1d79fd036f32d28261f9a792f6206767717a7", "max_stars_repo_licenses"...
#!/usr/bin/env python3 ''' Hyperdimensional (HD) classifier using k-centroids per class as assotiative memory ''' import time, sys import numpy as np import torch from lsh import lsh from sklearn.svm import LinearSVC,SVC from hd_bin_classifier_cuda import hd_classifier from HD_Kmeans import KMeans __author__ ...
{"hexsha": "e37d4af8261f088bde9ae76bc3732c9103134b9f", "size": 5054, "ext": "py", "lang": "Python", "max_stars_repo_path": "hd_utils/hd_kmeans_classifier.py", "max_stars_repo_name": "MHersche/HDembedding-BCI", "max_stars_repo_head_hexsha": "d815dd75c326114da11f0fc2e0acc6da67d10d74", "max_stars_repo_licenses": ["Apache-...
""" Mujoco Maze environment. Based on `models`_ and `rllab`_. .. _models: https://github.com/tensorflow/models/tree/master/research/efficient-hrl .. _rllab: https://github.com/rll/rllab """ import itertools as it import os import tempfile import xml.etree.ElementTree as ET from typing import Any, List, Optional, Tupl...
{"hexsha": "31a7012a16580e0fc7d0156d779e8ed40cf08b01", "size": 25682, "ext": "py", "lang": "Python", "max_stars_repo_path": "mujoco_maze/maze_env.py", "max_stars_repo_name": "anilzeybek/mujoco-maze", "max_stars_repo_head_hexsha": "d04fd48d45d41f8f103ba95e70285182f71f4bea", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
{"hexsha": "bd5d62109ec327bc6339898cb20a69f0ba99f42f", "size": 8963, "ext": "py", "lang": "Python", "max_stars_repo_path": "spinoffs/oryx/oryx/distributions/distribution_extensions_test.py", "max_stars_repo_name": "mederrata/probability", "max_stars_repo_head_hexsha": "bc6c411b0fbd83141f303f91a27343fe3c43a797", "max_st...
% !TEX root = ../main.tex %--------------------------------------------------------------------------------------------------- %--------------------------------------------------------------------------------------------------- \section{Projects} %------------------------------------------------------------------------...
{"hexsha": "1e55c464acedb9cbc973fcedc33d7b17513fc173", "size": 2894, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "slides/files/s-projects.tex", "max_stars_repo_name": "OpenSourceEconomics/handout-eckstein-keane-wolpin-models", "max_stars_repo_head_hexsha": "68cc55540c8b8772a3b204b7ba063fb324b08fdb", "max_stars_...
[STATEMENT] lemma enabled_ok: "enabled ok \<omega> \<longleftrightarrow> \<omega> = sconst ok" [PROOF STATE] proof (prove) goal (1 subgoal): 1. enabled ok \<omega> = (\<omega> = sconst ok) [PROOF STEP] by (simp add: enabled_iff_sconst)
{"llama_tokens": 88, "file": "Markov_Models_ex_Zeroconf_Analysis", "length": 1}
import pandas as pd import scipy.stats as st import numpy as np import prepare_data def ttest(xbar, mu, N, s, tails=1): ''' One sample t-test from summary statistics. ''' t = (mu-xbar)*np.sqrt(float(N))/s if tails==1: if t>=0: p=1-st.t.cdf(x=t, df=N) else: p=1-st.t.cdf(x=-t, df=N) else: raise NotI...
{"hexsha": "282fec45aa4d92b3afc6cb69b032874d7d2f42e7", "size": 6550, "ext": "py", "lang": "Python", "max_stars_repo_path": "lrec18/experiments/significance_tests.py", "max_stars_repo_name": "weiweitoo/EmoMap", "max_stars_repo_head_hexsha": "86e326bca58b89539b058a0a69a0f8f9e6726c4e", "max_stars_repo_licenses": ["MIT"], ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from OpenGL.GL import * from OpenGL.GLUT import * from numpy import cos, sin, greater, choose, transpose, concatenate, \ array from numpy.random import random, randint MY_LIST = 1 NUMDOTS = 500 NUMDOTS2 = 600 MAX_AGE = 13 x = random(NUMDOTS) * 2-1 y = r...
{"hexsha": "9faecbe3996742faabce8c3f1551d15b71270bbf", "size": 2742, "ext": "py", "lang": "Python", "max_stars_repo_path": "DemOpenGL/da/dots.py", "max_stars_repo_name": "ismaelxyz/graphic-concentration", "max_stars_repo_head_hexsha": "2573ed7dc5df907bf5fe89704bf3f009cb083784", "max_stars_repo_licenses": ["MIT"], "max_...
import aios import time import threading import numpy as np Server_IP_list = ['192.168.5.81'] def main(): Server_IP_list = aios.broadcast_func() if Server_IP_list: # for i in range(len(Server_IP_list)): # aios.passthrough(Server_IP_list[i], "w config.dc_bus_undervoltage_trip_leve...
{"hexsha": "7dee1dc70ba226b86a2b0d2fcbd05afab1477ed0", "size": 5214, "ext": "py", "lang": "Python", "max_stars_repo_path": "restore_config.py", "max_stars_repo_name": "FourierDynamics/FourierDynamics-aios_python_example", "max_stars_repo_head_hexsha": "dc0b69d72fe6896ceab816f2b9508a1d9c6b25f1", "max_stars_repo_licenses...
# SPDX-FileCopyrightText: : 2017-2020 The PyPSA-Eur Authors # # SPDX-License-Identifier: GPL-3.0-or-later """ Creates hydrogen storage capacity geojson file based on input buses strcuture Relevant Settings ----------------- Inputs ------ - ``resources/country_shapes.geojson``: country shapes out of country selecti...
{"hexsha": "7c2d9a3254fa7a8d449993df2a2cf5cc0a2cfb25", "size": 9480, "ext": "py", "lang": "Python", "max_stars_repo_path": "Notebooks/build_co2_storage.py", "max_stars_repo_name": "ericzhou571/Co2Storage", "max_stars_repo_head_hexsha": "738f5cd5111aef161528ae5ad1a5bd80de501c40", "max_stars_repo_licenses": ["MIT"], "max...
'''Utility functions used in tree models''' import numpy as np from typing import Sequence, Union, Optional NumericArray = Sequence[Union[float, int]] def weighted_percentile(arr: NumericArray, quantile: float, weights: Optional[NumericArray] = None, ...
{"hexsha": "5b73e9a6cf71c3251f6f97c519714070cade12dd", "size": 3926, "ext": "py", "lang": "Python", "max_stars_repo_path": "doubt/models/tree/utils.py", "max_stars_repo_name": "nobias-project/doubt", "max_stars_repo_head_hexsha": "270abc9b1fb8e708893d8c4782472488459a0262", "max_stars_repo_licenses": ["MIT"], "max_stars...
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
{"hexsha": "833e26c2136e83ca7023658f6f9be530e968e844", "size": 10412, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/e2e/model/src/run_model.py", "max_stars_repo_name": "qimchen/Apollo_Jimmy", "max_stars_repo_head_hexsha": "75478acf597f77bfc8305e1ea4a2d5a80590e3ec", "max_stars_repo_licenses": ["Apache-2...
[STATEMENT] lemma multiple_proper_design: assumes "n > 0" shows "proper_design \<V> (multiple_blocks n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. proper_design \<V> (multiple_blocks n) [PROOF STEP] using multiple_is_design assms design_blocks_nempty multiple_block_in [PROOF STATE] proof (prove) using this...
{"llama_tokens": 255, "file": "Design_Theory_Design_Basics", "length": 2}
#!/usr/bin/env python import cv2 import cv2.cv as cv import numpy as np import copy class Initializer: def clear(self): self.robot_workspace_done = False self.press_A_cnt = 0 self.L_click_cnt = 0 self.robot_workspace = [[0 for i in range(2)] for i in range(4)] def mouse_event...
{"hexsha": "d77f6cfd43efab7f2cf6e21797991bde923fee53", "size": 3088, "ext": "py", "lang": "Python", "max_stars_repo_path": "teaching_space/scripts/Place/initializer.py", "max_stars_repo_name": "Nishida-Lab/motoman_interaction", "max_stars_repo_head_hexsha": "bbe5119c08ef4e84d5559e243dcc19e19de55c77", "max_stars_repo_li...
import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np def plot_fairness_radar(fobject, fairness_metrics=['acc', 'tpr', 'ppv', 'fpr', 'stp']) : # /!\ plotting with plotnine in polar coordinates is not possible, # so we have to make a matplotlib figure. data = fobject.parity_loss_metri...
{"hexsha": "84744ae7933970dcb3c367eb904de67e8695946e", "size": 1853, "ext": "py", "lang": "Python", "max_stars_repo_path": "fairmodels/plot_fairness_radar.py", "max_stars_repo_name": "Locust2520/python-fairmodels", "max_stars_repo_head_hexsha": "0572f7c205b67c148bdc83b8dc4eaf70c06468a5", "max_stars_repo_licenses": ["MI...
library(data.table) library(tidyverse) ## ## set up output folders ## # where stuff is data.dir = "data" plots.dir = "plots" models.dir = "models" results.dir = "results" # create folders if needed (except data folder: if that's missing, you can't do much more here) if (!dir.exists(plots.dir)) # plots dir.create...
{"hexsha": "15323f644bc8178cea4d3fb179149a0f3307855a", "size": 1702, "ext": "r", "lang": "R", "max_stars_repo_path": "init.r", "max_stars_repo_name": "matthewgthomas/mosuo-kinship", "max_stars_repo_head_hexsha": "14996bc45585d46300dfb30b176dcce4775d4747", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
from Detection.MtcnnDetector import MtcnnDetector from Detection.detector import Detector from Detection.fcn_detector import FcnDetector from train_models.mtcnn_model import P_Net, R_Net, O_Net import numpy as np import cv2 import scipy.misc from scipy.stats.mstats import hmean from sklearn.decomposition import PCA fro...
{"hexsha": "e6cca057bc14e69be73e859e300bd5401a054739", "size": 7767, "ext": "py", "lang": "Python", "max_stars_repo_path": "Hackathon/IOT-house/opencv.py", "max_stars_repo_name": "huseinzol05/Hackathon-Huseinhouse", "max_stars_repo_head_hexsha": "6796af2fe02f10d7860ac8db27bd24fa27b8bb01", "max_stars_repo_licenses": ["M...
f = findSubjects('/silver/scr1/dti/trilinear_PPD','',{'...','mb041004','nad040610','vt040717','zs040630'}); n = length(f); for(ii=1:n) dt = load(f{ii}, 'anat', 'b0', 'dt6'); if(ii==1) sz = size(dt.anat.img); t1_a = zeros([sz(1) sz(2) n]); t1_s = zeros([sz(1) sz(3) n]); t1_c = zer...
{"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrScripts/diffusion/dtiShowSliceAllSubs.m"}
import arcade import socket as s import socket_util import numpy as np from Client import Sprites_, State, Event_Base import Vector import itertools import dataclasses neutral_colour = 'Gray' class GameView(Event_Base.EventBase): def __init__(self, slot_width, slot_height, win_length, name, colour, socket: s.soc...
{"hexsha": "32307ca271b053c287ed464fc6c3c61a079a4ba8", "size": 13501, "ext": "py", "lang": "Python", "max_stars_repo_path": "Client/Game_View.py", "max_stars_repo_name": "jackshotgamer/ConnectX", "max_stars_repo_head_hexsha": "20378286524c93967c902940f0cfee3f417c1084", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np import healpy ic = 180/np.pi def xyz2lonlat(x,y,z,norm=True,getr=False): """ """ if norm: r = np.sqrt(x*x+y*y+z*z) else: r = np.ones(x.shape) ii = r > 0 lat = np.zeros(len(r), dtype=float) lon = np.zeros(len(r), dtype=float) lat[ii] = np.arcsin(z[ii]/r...
{"hexsha": "5bcc85f5530731810a219735a50a7bd17007e8ce", "size": 660, "ext": "py", "lang": "Python", "max_stars_repo_path": "synmock/sphere.py", "max_stars_repo_name": "bengranett/synmock", "max_stars_repo_head_hexsha": "def8f73792d1b756feb2203c1e03e71ce9326d9b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
# Spherical coordinates in shenfun The Helmholtz equation is given as $$ -\nabla^2 u + \alpha u = f. $$ In this notebook we will solve this equation on a unitsphere, using spherical coordinates. To verify the implementation we use a spherical harmonics function as manufactured solution. We start the implementation...
{"hexsha": "59b42fa0e40c8147780e6a79fd600b998bbb535d", "size": 11604, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "binder/sphere2-helmholtz.ipynb", "max_stars_repo_name": "jaisw7/shenfun", "max_stars_repo_head_hexsha": "7482beb5b35580bc45f72704b69343cc6fc1d773", "max_stars_repo_licenses": ["BSD-2...
Jon is a lazy bum. So lazy, in fact, that hed rather not expend the effort in introducing himself as Jonathan. Jon will do. He is not so lazy as to not have a Photography flickr account. 20070119 17:12:32 nbsp Wow, I dont even remember seeing a Preachers with Signs Preacher with a Sign that day (11/07), or perhaps I...
{"hexsha": "bdc785afe2efbf7e286d11ea652e2c7963aceedc", "size": 555, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/JonathanWiles.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# -*- coding: utf-8 -*- import numpy as np import cv2 from matplotlib import pyplot as plt #读取图像 img = cv2.imread('lena.png', 0) #傅里叶变换 dft = cv2.dft(np.float32(img), flags = cv2.DFT_COMPLEX_OUTPUT) dftshift = np.fft.fftshift(dft) res1= 20*np.log(cv2.magnitude(dftshift[:,:,0], dftshift[:,:,1])) #傅里叶逆变换 ...
{"hexsha": "b55358f3e67ec7324b31de0e59a0afa5f1c5d761", "size": 727, "ext": "py", "lang": "Python", "max_stars_repo_path": "ImageProcessing-Python/blog22-fft/blog22-image04.py", "max_stars_repo_name": "Songner/image_classfication", "max_stars_repo_head_hexsha": "c1f15b2b96544e859e14a92373eb57c6a2644a93", "max_stars_repo...
# ------------encode utf-8------------------- #datetime: 20210322 #author: Sean Peldom Zhang #R.version()=4.0.3 # ------------Homework------------------------ str_test <- "hello world" print(str_test) A <- c(1:3) B <- seq(from = 1, to = 5, by = 1) C <- rep(0, 5) print(A + B) a <- factor(c(1, 1, 2, 2, 3, ...
{"hexsha": "e0f23122930c9dbbf6a3bc2439c24f444b269be9", "size": 1550, "ext": "r", "lang": "R", "max_stars_repo_path": "Exp1.r", "max_stars_repo_name": "CSUBioinformatics1801/R_Bioinformatics_ZYZ", "max_stars_repo_head_hexsha": "2b5eb49522aecf4bb5cf6e15f945e4c9e6b54cf2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import logging import numpy as np from fedml_api.standalone.hierarchical_fl.group import Group from fedml_api.standalone.hierarchical_fl.client import Client from fedml_api.standalone.fedavg.fedavg_trainer import FedAvgTrainer class Trainer(FedAvgTrainer): def setup_clients(self, train_data_local_num_dict, train...
{"hexsha": "53708945974349014e13ef7c2635432d009a35f9", "size": 3921, "ext": "py", "lang": "Python", "max_stars_repo_path": "fedml_api/standalone/hierarchical_fl/trainer.py", "max_stars_repo_name": "xuwanwei/FedML", "max_stars_repo_head_hexsha": "c049a30d9839c4554e7e14b0c18275e96fea8130", "max_stars_repo_licenses": ["Ap...
""" Encryptor An `Encryptor` can be used to encrypt a `Plaintext` instance, yielding a `Ciphertext` instance. See also: [`Plaintext`](@ref), [`Ciphertext`](@ref) """ mutable struct Encryptor <: SEALObject handle::Ptr{Cvoid} function Encryptor(context::SEALContext, public_key::PublicKey, secret_key::SecretKe...
{"hexsha": "a012d272373309ba5cec128a99fdfc3862b8e50c", "size": 2986, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/encryptor.jl", "max_stars_repo_name": "sloede/SEAL.jl", "max_stars_repo_head_hexsha": "68285d72db5c02d8ef692aa989bd02c651fd3ff2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "max...
# usage: python runHelenaScriptDistributed.py <helenaScriptNumericId> <numDistributedMachines> <timeoutInHours> <howManyRunsToAllowPerWorker> # ex: python runHelenaScriptDistributed.py 1022 24 helena-1 # ex: python runHelenaScriptDistributed.py 1153 15 helena-2 # ex: python runHelenaScriptDistributed.py 1162 24 helena-...
{"hexsha": "fd63803d2aee96f6fab491a1c6e67dff37253474", "size": 6280, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/runHelenaScriptDistributed.py", "max_stars_repo_name": "hesscl/helena", "max_stars_repo_head_hexsha": "db8db16019f1973e25ccabcb57f551918c1d4ea7", "max_stars_repo_licenses": ["BSD-2-Claus...
/* * The MIT License (MIT) * * Copyright (c) 2018 Sylko Olzscher * */ #include <smf/sml/scaler.h> #include <boost/assert.hpp> namespace node { namespace sml { std::string scale_value(std::int64_t value, std::int8_t scaler) { // Working with a string operation prevents us of losing precision. std::str...
{"hexsha": "20519af9e32cb74f24b57867917beeda251b2803", "size": 1125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lib/sml/protocol/src/scaler.cpp", "max_stars_repo_name": "solosTec/node", "max_stars_repo_head_hexsha": "e35e127867a4f66129477b780cbd09c5231fc7da", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from PIL import Image import numpy as np from io import BytesIO from scipy import misc from RsNet.tf_config import CHANNELS_LAST, CHANNELS_FIRST def _compress(data, quality=75): data_shape = np.shape(data) is_l = data_shape[-1] == 1 if is_l: data = np.squeeze(data, axis=3) buffer_fp = BytesIO...
{"hexsha": "5cc637b5e4932bb345ea3c0de69e62d06497deb8", "size": 4323, "ext": "py", "lang": "Python", "max_stars_repo_path": "RsNet/ciphernet/image_jpeg_compression.py", "max_stars_repo_name": "gehuangyi20/random_spiking", "max_stars_repo_head_hexsha": "c98b550420ae4061b9d47ca475e86c981caf5514", "max_stars_repo_licenses"...
from __future__ import division import matplotlib.pyplot as plt import pandas as pd import numpy as np import os from scipy import stats mydir = os.path.expanduser('~/GitHub/Emergence') tools = os.path.expanduser(mydir + "/tools") _lw = 2 sz = 20 df = pd.read_csv(mydir + '/results/simulated_data/SimData.csv') df2 =...
{"hexsha": "4f3c99a96eb02b6f3a22982f15c1c1815c36c7ec", "size": 1412, "ext": "py", "lang": "Python", "max_stars_repo_path": "figure_code/MacroecologyPatterns/TaylorsLaw.py", "max_stars_repo_name": "klocey/simplex", "max_stars_repo_head_hexsha": "69fdb4951f5bd3181e3403ae91253f096e8ba7f3", "max_stars_repo_licenses": ["MIT...
// Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless required by applicable law or agr...
{"hexsha": "a0d1ec84e19dbfd31b86b4ef248bdf669a4bc57d", "size": 2695, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "engine/gameobject/src/gameobject/gameobject_comp.cpp", "max_stars_repo_name": "hakoptak/defold", "max_stars_repo_head_hexsha": "1e0dfbe5941c0cc119b24b68241ec536dbefc5de", "max_stars_repo_licenses": ...
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. 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 # # U...
{"hexsha": "21d486e96c1566790c83b9cdeb3ef6df59baa395", "size": 26608, "ext": "py", "lang": "Python", "max_stars_repo_path": "dm_alchemy/types/graphs.py", "max_stars_repo_name": "locross93/dm_alchemy", "max_stars_repo_head_hexsha": "35449de51d56c427959ae6a3be13d6c6ab738be5", "max_stars_repo_licenses": ["Apache-2.0"], "m...
! { dg-do run } ! ! Tests the fix for PR49630 comment #3. ! ! Contributed by Janus Weil <janus@gcc.gnu.org> ! module abc implicit none type::abc_type contains procedure::abc_function end type abc_type contains function abc_function(this) class(abc_type),intent(in)::this character(:),allocata...
{"hexsha": "822cc5de3a841bab30ec19ae7486494ea94da225", "size": 638, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/gcc/testsuite/gfortran.dg/deferred_character_13.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a43898c", "ma...
@testset "Testing memcpy" begin # Test error checking first. x = Vector{Vector{Int}}() y = Vector{Vector{Int}}() @test_throws ArgumentError CachedArrays.memcpy!(x, y) # Source/Dest length mismatch x = rand(Float32, 1024) y = rand(Float32, 1025) @test_throws ArgumentError CachedArrays.m...
{"hexsha": "9c6113ce436aa82904cf79f8e1ee17326ec989b2", "size": 861, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/memcpy.jl", "max_stars_repo_name": "darchr/CachedArrays.jl", "max_stars_repo_head_hexsha": "50e899a0fead3eb0f243c71bdcc1f67a040a72e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, ...
import numba.unittest_support as unittest import llvmlite.llvmpy.core as lc import numpy as np from numba import types, typing from numba.targets import cpu class TestCompileCache(unittest.TestCase): ''' Tests that the caching in BaseContext.compile_internal() works correctly by checking the state of t...
{"hexsha": "9a72198f5c52615fa1120835f64df37f0e9dbfe1", "size": 2469, "ext": "py", "lang": "Python", "max_stars_repo_path": "numba/tests/test_compile_cache.py", "max_stars_repo_name": "laserson/numba", "max_stars_repo_head_hexsha": "35546517b27764a9120f6dfcd82eba7f4dd858cb", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
[STATEMENT] lemma help_rtrancl_Range: "\<lbrakk> a \<noteq> b; (a,b) \<in> R ^* \<rbrakk> \<Longrightarrow> b \<in> Range R" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>a \<noteq> b; (a, b) \<in> R\<^sup>*\<rbrakk> \<Longrightarrow> b \<in> Range R [PROOF STEP] apply (erule rtranclE) [PROOF STATE] proof...
{"llama_tokens": 291, "file": "Statecharts_Contrib", "length": 3}
import os import threading from multiprocessing import Process, Queue, Array import queue from math import ceil import ctypes #os.environ['KIVY_DPI'] = '227' #os.environ['KIVY_METRICS_DENSITY'] = '1' from kivy.app import App from kivy.event import EventDispatcher from kivy.properties import ObjectProperty, ListPropert...
{"hexsha": "f2a3c348701d1e5e4c640d98e4ab62286e331ca0", "size": 19648, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/eng_gui/GUIApp.py", "max_stars_repo_name": "Stanford-BIS/pystorm", "max_stars_repo_head_hexsha": "4acaaee78a04b69ad17554126018016800e5a140", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
example (m n : ℕ) : m + n = n + m := by simp theorem t1(p q: Prop):p → q → p:= assume hp:p, assume hq:q, show p, from hp --theorem t2(p q r: Prop)(H1:q → r)(H1:q → r):= theorem and_swap(p q : Prop):p ∧ q ↔ q ∧ p:= begin apply iff.intro, intro H1, exact and.intro(and.right H1)(and.left H1), intro H2, exact and...
{"author": "ngamt", "repo": "Lean", "sha": "08eda4561ea483e04c7e977277f4e2f0cdc834b3", "save_path": "github-repos/lean/ngamt-Lean", "path": "github-repos/lean/ngamt-Lean/Lean-08eda4561ea483e04c7e977277f4e2f0cdc834b3/proLogic.lean"}
from .autodiff import FunctionBase, Variable, History from . import operators import numpy as np from pdb import set_trace ## Task 1.1 ## Derivatives def central_difference(f, *vals, arg=0, epsilon=1e-6): r""" Computes an approximation to the derivative of `f` with respect to one arg. See :doc:`derivat...
{"hexsha": "22f758b7383a0a384f31f30799ab0a41808e6db2", "size": 5912, "ext": "py", "lang": "Python", "max_stars_repo_path": "jovsatools/minitorch/coursework/Module-2/minitorch/scalar.py", "max_stars_repo_name": "jovsa/jovsatools", "max_stars_repo_head_hexsha": "52e7f6737376b62bbeba41dba8b54167661412a2", "max_stars_repo_...
[STATEMENT] lemma map_real_pair_measurable[measurable]: assumes f: "case_prod f \<in> measurable (borel \<Otimes>\<^sub>M borel) M" shows "map_real_pair f g \<in> measurable (PRODUCT REAL REAL) M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_real_pair f g \<in> stock_measure (PRODUCT REAL REAL) \<rightarro...
{"llama_tokens": 1208, "file": "Density_Compiler_PDF_Values", "length": 11}
From mathcomp Require Import ssreflect. Set Implicit Arguments. Unset Strict Implicit. Import Prenex Implicits. Require Import family_of_sets. Section FundamentalOfFamilySet. Variable U:Type. Variables X Y I:Ensemble U. (* F:U -> Ensemble U となるような写像を作る *) Definition FunctionOfFamilySet := U -> Ensemble U. ...
{"author": "seisyuu-hantatsushi", "repo": "coq_ssreflect_practice", "sha": "96e1d440c8c69673209ae0d86046b6b9305f8bab", "save_path": "github-repos/coq/seisyuu-hantatsushi-coq_ssreflect_practice", "path": "github-repos/coq/seisyuu-hantatsushi-coq_ssreflect_practice/coq_ssreflect_practice-96e1d440c8c69673209ae0d86046b6b93...
#!python # Copyright 2019 Vale # github.com/pemn/bm_tri_surface_color # create a georeferenced image (geotiff) with block color over a surface # input_tri: surface in vulcan 00t format # input_scd: a vulcan scd containing a legend with same name as variable and a color palete # input_bmf: block model file # inpu...
{"hexsha": "5322d5e5498f42425f96edc92198633306fb166f", "size": 2854, "ext": "py", "lang": "Python", "max_stars_repo_path": "bm_tri_surface_color.py", "max_stars_repo_name": "pemn/bm_tri_surface_color", "max_stars_repo_head_hexsha": "5e7992acf9572afcf1be4f7fae5b4b40c223709a", "max_stars_repo_licenses": ["Apache-2.0"], "...
Scams are an unfortunate part of life in Davis. On occasion, people try to take advantage of others by tricking them out their money. The following is a list of scams that have been reported in Davis: 20070418: The Davis Chamber of Commerce has just been informed of a phone scam directed towards local businesses. A...
{"hexsha": "2771b27070f5a902b4d32af2d15b14061ec92dff", "size": 4257, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Scams.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import argparse import numpy as np import os import tensorflow as tf from tensorflow.contrib.eager.python import tfe from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.layers import Embedding from keras.layers import Conv1D, GlobalMaxPooling1D tf.logging.set_verbosity(tf...
{"hexsha": "40f4e1c31b5b8e896c5ca37deefe5a5de369a226", "size": 3030, "ext": "py", "lang": "Python", "max_stars_repo_path": "distributed training/tf-sentiment-script-mode/sentiment.py", "max_stars_repo_name": "merb92/amazon-sagemaker-keras-text-classification", "max_stars_repo_head_hexsha": "70aebaa80c50fa5fd57550896e21...