text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
function x = inv_digamma(y,niter) % INV_DIGAMMA Inverse of the digamma function. % % inv_digamma(y) returns x such that digamma(x) = y. % a different algorithm is provided by Paul Fackler: % http://www.american.edu/academic.depts/cas/econ/gaussres/pdf/loggamma.src % Newton iteration to solve digamma(x)-y = 0 x = e...
{"author": "FuzhenZhuang", "repo": "Transfer-Learning-Toolkit", "sha": "24b5323b354aee844b8b7df9fcad17fdfb191dc4", "save_path": "github-repos/MATLAB/FuzhenZhuang-Transfer-Learning-Toolkit", "path": "github-repos/MATLAB/FuzhenZhuang-Transfer-Learning-Toolkit/Transfer-Learning-Toolkit-24b5323b354aee844b8b7df9fcad17fdfb19...
import mmcv import os import sys import numpy as np def write_submission(outputs): import pandas as pd import numpy as np from scipy.special import softmax from mmdet.datasets.kaggle_pku_utils import quaternion_to_euler_angle submission = 'Nov20-18-24-45-epoch_50.csv' predictions = {} PATH...
{"hexsha": "6cab9bd2e0f4b76af21c4b36145c19df52ef072a", "size": 1749, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/pkl2csv.py", "max_stars_repo_name": "tyunist/Kaggle_PKU_Baidu", "max_stars_repo_head_hexsha": "48651d8a0fc8a7beda0822a2db794861feada7c6", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
#' Count Letters, Words, and Lines of a File #' #' See title. #' #' @details #' \code{wc_l()} is a shorthand for counting only lines, similar to \code{wc -l} #' in the terminal. Likewise \code{wc_w()} is analogous to \code{wc -w} for #' words. #' #' @param file #' Location of the file (as a string) from which the co...
{"hexsha": "2f0efafe17901fd7b73dfeea81f2a8058e738c2f", "size": 2070, "ext": "r", "lang": "R", "max_stars_repo_path": "R/wc.r", "max_stars_repo_name": "wrathematics/lineSampler", "max_stars_repo_head_hexsha": "b3683ea15888b0da6e1f983233c395d23cf9e2b6", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 15, ...
[STATEMENT] lemma ln_upper_11_neg: assumes "0 < x" and x1: "x \<le> 1" shows "ln(x) \<le> ln_upper_11 x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ln x \<le> ln_upper_11 x [PROOF STEP] apply (rule gen_upper_bound_decreasing [OF x1 d_delta_ln_upper_11]) [PROOF STATE] proof (prove) goal (3 subgoals): 1. \<And>...
{"llama_tokens": 489, "file": "Special_Function_Bounds_Log_CF_Bounds", "length": 4}
/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2015 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as p...
{"hexsha": "012288507bf7e4f8efbba2e0d3fa16d5d19381ba", "size": 1938, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "external/mapnik/include/mapnik/text/formatting/text.hpp", "max_stars_repo_name": "baiyicanggou/mapnik_mvt", "max_stars_repo_head_hexsha": "9bde52fa9958d81361c015c816858534ec0931bb", "max_stars_repo_...
module calc_kine_temp_module implicit none private public :: calc_Ndof, get_Ndof public :: calc_kine public :: calc_temp real(8),parameter :: TOJOUL=4.35975d-18 ! (J/hartree) real(8),parameter :: kB_J=1.380658d-23 ! (J/K) real(8),parameter :: kB=kB_J/TOJOUL ! (hartree/K) integer :: N_degree_o...
{"hexsha": "85494231f481f63c21906e9f5225d00eb6d25a4a", "size": 2014, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/mdsource/calc_kine_temp_module.f90", "max_stars_repo_name": "j-iwata/RSDFT_DEVELOP", "max_stars_repo_head_hexsha": "14e79a4d78a19e5e5c6fd7b3d2f2f0986f2ff6df", "max_stars_repo_licenses": ["Ap...
function cmatchregret(I::Int64, r::Vector{Vector{Float64}}, gs::GameSet) ni_stage, na_stage = gs.ni_stage, gs.na_stage na = numactions(I, ni_stage, na_stage) σ = Vector{Float64}(undef, na) for a in 1:na denom = sum(max(r[I][b], 0.0) for b in 1:na) if denom > 0.0 σ[a] =...
{"hexsha": "8cd0c6a06c068b98465bace1eb567a70bda57a2f", "size": 7876, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ccfrops_solve.jl", "max_stars_repo_name": "ajkeith/Cyber-Air-Defense", "max_stars_repo_head_hexsha": "856b833e7c6cbfe389b2ec1b21edb5d6e6ee97e3", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import pickle,os from Common.Module import Module class FakeRateWeighter(Module): def analyze(self,data,dataset,cfg): if dataset.name == "ZX": cfg.collector.event_weight = np.ones(data["genWeight"].shape) * cfg.collector.selection_weight idx_3p1f = data["nFailedLeptonsZ2"] == 1 idx_2p2f...
{"hexsha": "d66f0391a36c1505c7a41708cf8e0ef5efb2fe44", "size": 2125, "ext": "py", "lang": "Python", "max_stars_repo_path": "Wto3l/Weighter/FakeRateWeighter.py", "max_stars_repo_name": "Nik-Menendez/PyCudaAnalyzer", "max_stars_repo_head_hexsha": "4b43d2915caac04da9ba688c2743e9c76eacdd5b", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Script de comparação dos resultados gerados. """ import numpy as np import rasterio as rio import matplotlib.pyplot as plt from matplotlib.lines import Line2D ds_30062020 = rio.open("sits/30-06-2020/classification-results/Sinop_probs_class_bayesian_2013_9_2014_8_v1....
{"hexsha": "cfb308e31d0e890ae9dfce4aafe5871b9b1e7ac2", "size": 2118, "ext": "py", "lang": "Python", "max_stars_repo_path": "verification/difference_plot.py", "max_stars_repo_name": "M3nin0/experiment-software-lulc-versions", "max_stars_repo_head_hexsha": "734e8e6acc369d6bdf5dd8d694d3e3d61740ce44", "max_stars_repo_licen...
[STATEMENT] lemma lt_plus_distinct_eq_max: assumes "lt p \<noteq> lt q" shows "lt (p + q) = ord_term_lin.max (lt p) (lt q)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lt (p + q) = ord_term_lin.max (lt p) (lt q) [PROOF STEP] proof (rule ord_term_lin.linorder_cases) [PROOF STATE] proof (state) goal (3 subgoals...
{"llama_tokens": 2869, "file": "Polynomials_MPoly_Type_Class_Ordered", "length": 28}
import pandas as pd import numpy as np from random import sample import random import torch import torch.nn as nn # # reference from https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow # class QLearningTable: # def __init__(self, actions, learning_rate=0.01, reward_decay=0.9, e_greedy=0.9): # ...
{"hexsha": "3cd4382fefb246c6375ea96343f268b2e5a39029", "size": 9552, "ext": "py", "lang": "Python", "max_stars_repo_path": "s09287/racepack/utils.py", "max_stars_repo_name": "parksurk/skcc-drl-sc2-course-2020_1st", "max_stars_repo_head_hexsha": "951d09424b93c76093bab51ed6aaa75eb545152e", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python3 import json from pathlib import Path import numpy as np import tokenizers as tk import torch from theissues import training, utils from theissues.model import TrainArgs, TransformerModel def main( path_tokenizer: Path, dir_model: Path, ): tokenizer = tk.Tokenizer.from_file(str(pa...
{"hexsha": "12135916bdd686410843e30a9fbcc07d8f155a6c", "size": 1715, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/generate.py", "max_stars_repo_name": "gmcgoldr/theissues", "max_stars_repo_head_hexsha": "4e4c9eb66c543cdbcda4f1b96a7d2b163450368c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import pyplume import numpy as np # Mechanism management cti = 'test.cti' pyplume.mech.mechFileAdd(cti) #Add mechanism file pyplume.mech.mechFileDelete(cti) #Delete mechanism file pyplume.mech.mechFileRestore() #Restore mechanism files pyplume.mech.mechFileList() #list mechanism files pyplume.tests.testMechs.runT...
{"hexsha": "3a347070f2528f430522e977d062fa721cba87e7", "size": 557, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/scratch.py", "max_stars_repo_name": "awa1k3r/plume-generation-and-analysis", "max_stars_repo_head_hexsha": "926f2b09fa1011515310167f0d2b34a051539db1", "max_stars_repo_licenses": ["BSD-3-Cl...
#include <boost_python_exception/util.hpp> #include <boost/python/import.hpp> using namespace boost::python; namespace boost_python_exception { object builtins() { #if PY_MAJOR_VERSION == 2 return import("__builtin__"); #elif PY_MAJOR_VERSION == 3 return import("builtins"); #endif } }
{"hexsha": "9eca11c507a8c5291bb26c6eb51d012d5e9523c0", "size": 299, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/boost_python_exception/util.cpp", "max_stars_repo_name": "abingham/boost_python_exception", "max_stars_repo_head_hexsha": "7882d5e8df051494498a58c06e046cb52421620b", "max_stars_repo_licenses": ["...
from skimage import data, filters from skimage.viewer import ImageViewer from skimage import filters import scipy from scipy import ndimage import matplotlib.pyplot as plt smooth_mean=[ [1/9,1/9,1/9], [1/9,1/9,1/9], [1/9,1/9,1/9]] ############################ edge1 = [[-1, -1, -1], ...
{"hexsha": "081a3048222dfc58e5ab016024feafcb8e910675", "size": 2784, "ext": "py", "lang": "Python", "max_stars_repo_path": "Modules/module3/opdracht2.py", "max_stars_repo_name": "Pink-Shadow/VISN", "max_stars_repo_head_hexsha": "4a484610cd86a170a9612a65c81e082394cc08f0", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta...
using GitHubActionsUtils using Test using Luxor @testset "GitHubActionsUtils.jl" begin # move up from the `test` folder to the main repo cd("..") @show GitHubActionsUtils.is_github_actions() @show GitHubActionsUtils.event_name() @show GitHubActionsUtils.is_push() @show GitHubActionsUtils.is_...
{"hexsha": "01b1b21a70bc70f296f64a3e9aeda24c58d925fc", "size": 1807, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "jkrumbiegel/GitHubActionsUtils.jl", "max_stars_repo_head_hexsha": "077a54df983b4362715148197427a191c80fe4f7", "max_stars_repo_licenses": ["MIT"], "max_sta...
import torch from typing import Iterable, Union, Dict, List, Callable from data import * from config import * from torch import nn import numpy as np @dataclass class ModelOutput: loss: Union[torch.Tensor, np.array] @dataclass class ClassifierOutput(ModelOutput): predictions: Union[torch.Tensor, np.array, No...
{"hexsha": "d92c40c921280c40f388e63e7af7c42faa30773e", "size": 10079, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules.py", "max_stars_repo_name": "cr1m5onk1ng/semantic-search-api", "max_stars_repo_head_hexsha": "25ecdde4509943bb6420a5a678e4aaa0b1f5a866", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
#!/usr/bin/env python3 import os import numpy as np from katsdpsigproc.accel import Operation, IOSlot, create_some_context, build class SumTemplate: def __init__(self, context): self.wgs = 128 self.program = build(context, 'sum.mako', {'wgs': self.wgs}, extra_dirs=[...
{"hexsha": "1f6457f48bbc9a393f54d5c0adea117040679140", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/user/examples/sum.py", "max_stars_repo_name": "ska-sa/katsdpsigproc", "max_stars_repo_head_hexsha": "d471d05a3c340ff217db4fd85de0599fe9dfad80", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
Require Import HoTT. Require Import Auxiliary.Family. Require Import Auxiliary.WellFounded. Require Import Syntax.ScopeSystem. Require Import Auxiliary.Coproduct. Require Import Auxiliary.Closure. Require Import Syntax.All. Require Import Typing.Context. Require Import Typing.Judgement. Require Import Typing.RawTypeThe...
{"author": "peterlefanulumsdaine", "repo": "general-type-theories", "sha": "596f032e5d59fa017c2f2595136448b24b810f1d", "save_path": "github-repos/coq/peterlefanulumsdaine-general-type-theories", "path": "github-repos/coq/peterlefanulumsdaine-general-type-theories/general-type-theories-596f032e5d59fa017c2f2595136448b24b...
# Copyright (c) 2018-2021, Carnegie Mellon University # See LICENSE for details NewRulesFor(TTensorInd, rec( # base cases # I x A dsA_base_vec_push := rec( info := "IxA base", forTransposition := false, applicable := nt -> IsParPar(nt.params) and nt.isTag(1, AVecReg), children ...
{"hexsha": "d372251dd158386fef612b9c7eb6db1dbb073609", "size": 1854, "ext": "gi", "lang": "GAP", "max_stars_repo_path": "namespaces/spiral/paradigms/vector/breakdown/ttensorind.gi", "max_stars_repo_name": "sr7cb/spiral-software", "max_stars_repo_head_hexsha": "349d9e0abe75bf4b9a4690f2dbee631700f8361a", "max_stars_repo_...
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestLaplacian(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global numpy global assert_equal glo...
{"hexsha": "7174e924cadb948595015aa9d49d7ee3f6b82980", "size": 2686, "ext": "py", "lang": "Python", "max_stars_repo_path": "networkx/linalg/tests/test_laplaican.py", "max_stars_repo_name": "rafguns/networkx", "max_stars_repo_head_hexsha": "ce5e7394e56c3ee92f3f40a392b7344ce1f7e366", "max_stars_repo_licenses": ["BSD-3-Cl...
theory Flatten_Iter_Spec imports Basic_Assn "Separation_Logic_Imperative_HOL.Imp_List_Spec" "HOL-Real_Asymp.Inst_Existentials" begin text "This locale takes an iterator that refines a list of elements that themselves can be iterated and defines an iterator over the flattened list of lower level elements" loc...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/BTree/Flatten...
SUBROUTINE ZACAI(ZR, ZI, FNU, KODE, MR, N, YR, YI, NZ, RL, TOL, * ELIM, ALIM) C***BEGIN PROLOGUE ZACAI C***REFER TO ZAIRY C C ZACAI APPLIES THE ANALYTIC CONTINUATION FORMULA C C K(FNU,ZN*EXP(MP))=K(FNU,ZN)*EXP(-MP*FNU) - MP*I(FNU,ZN) C MP=PI*MR*CMPLX(0.0,1.0) C C TO CONTINUE...
{"hexsha": "aa05a5c7b6c6446198f397fac714d5a02594c4fa", "size": 3719, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "mathext/internal/amos/amoslib/zacai.f", "max_stars_repo_name": "blackrez/gonum", "max_stars_repo_head_hexsha": "aad36a059009dc681b68a7d9fbdcadd09c9db798", "max_stars_repo_licenses": ["BSD-3-Clause...
import sys # sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') # import open3d as o3d import numpy as np import random import paddle.fluid as fluid import argparse from shapenet_part_loader import PartDataset import utils from utils import distance_squre, PointLoss import copy from model_PFNet import PFNe...
{"hexsha": "21c5c21e8b4792ede02634c4d99f512ab8491aa1", "size": 7499, "ext": "py", "lang": "Python", "max_stars_repo_path": "pf-net/Test_PFNet.py", "max_stars_repo_name": "63445538/Contrib", "max_stars_repo_head_hexsha": "8860692e341020bb4332ff9f59b17a0c8cd9c748", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
#include <boost/geometry/algorithms/centroid.hpp>
{"hexsha": "2c5991633ba677a84d872db945e3ddcb42972b18", "size": 50, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_geometry_algorithms_centroid.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["...
[STATEMENT] lemma shrK_notin_image_publicKey [simp]: "shrK x \<notin> publicKey b ` AA" [PROOF STATE] proof (prove) goal (1 subgoal): 1. shrK x \<notin> publicKey b ` AA [PROOF STEP] by auto
{"llama_tokens": 78, "file": "Inductive_Confidentiality_DolevYao_Public", "length": 1}
## philvals.py ## This is my implementation of phivals.m ## Computation of scaling function and wavelet by recursion ## using Python libraries numpy, scipy ## ## The main reference that I'll use is ## Gilbert Strang, and Kevin Amaratunga. 18.327 Wavelets, Filter Banks and Applications, Spring 2003. (Massachusetts Inst...
{"hexsha": "cb840dd7bc47cda9382799aacf13049eb034becf", "size": 7549, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/phivals.py", "max_stars_repo_name": "ernestyalumni/18-327-wavelets-filter-banks", "max_stars_repo_head_hexsha": "eeb3fd65b42808cf907aa716110417515dbbfd82", "max_stars_repo_licenses": ["MIT"]...
from copy import deepcopy from functools import wraps import numpy as np from scipy.optimize import OptimizeResult from scipy.optimize import minimize as sp_minimize from sklearn.base import is_regressor from sklearn.ensemble import GradientBoostingRegressor from joblib import dump as dump_ from joblib import load as ...
{"hexsha": "83d5e27abc0c077adef7a176f39a897b559a22b0", "size": 26526, "ext": "py", "lang": "Python", "max_stars_repo_path": "skopt/utils.py", "max_stars_repo_name": "sqbl/scikit-optimize", "max_stars_repo_head_hexsha": "c1866d5a9ad67efe93ac99736bfc2dc659b561d4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
@testset "EigenAngles.jl" begin @info "Testing EigenAngles" @test isbits(EigenAngle(deg2rad(complex(85.0, -1.0)))) @test EigenAngle(deg2rad(80-0.5im)) > EigenAngle(deg2rad(75-0.3im)) @test_logs (:warn, "θ > 2π. Make sure θ is in radians.") EigenAngle(complex(85.0, 0.31)) end
{"hexsha": "11e1bfa3441c6abb2595236399693d97717de3c9", "size": 294, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/EigenAngles.jl", "max_stars_repo_name": "fgasdia/LongwaveModePropagator.jl", "max_stars_repo_head_hexsha": "d99750b7e248f93c36beb9a291e6481da08bb8c9", "max_stars_repo_licenses": ["MIT"], "max_s...
import os import pickle from tune.api.factory import TUNE_OBJECT_FACTORY from typing import Any, Optional, Tuple from uuid import uuid4 import numpy as np import pandas as pd from sklearn.metrics import get_scorer from sklearn.model_selection import cross_val_score from triad import FileSystem from tune import NonIter...
{"hexsha": "cacf9391b22f36c181d310d851e3c1395daf5f9d", "size": 4703, "ext": "py", "lang": "Python", "max_stars_repo_path": "tune_sklearn/objective.py", "max_stars_repo_name": "fugue-project/tune", "max_stars_repo_head_hexsha": "bf2288ddcb29c8345d996a9b22c0910da9002da1", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import time import numpy as np import torch import torch.optim import torch.utils.data import torch.nn.functional as F import models import train_img_pairs from inverse_warp import compensate_pose, pose_vec2mat, inverse_rotate from logger import AverageMeter train_img_pairs.parser.add_argument('-d', '--target-mean-de...
{"hexsha": "1f01e68910227dbcfd95c03adc7cadcd550e106a", "size": 5773, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_flexible_shifts.py", "max_stars_repo_name": "ClementPinard/unsupervised-depthnet", "max_stars_repo_head_hexsha": "71bc54afd8a22d5c99e1db88618119c33956b8c4", "max_stars_repo_licenses": ["MIT"...
module SimplePackage using Boot include_folder(SimplePackage, @__FILE__) end
{"hexsha": "e18bf887ebf0377b3b8c55da38800a5d97503cd8", "size": 84, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/packages/SimplePackage/src/SimplePackage.jl", "max_stars_repo_name": "djsegal/Boot.jl", "max_stars_repo_head_hexsha": "25aefa8ffc7467ece2951f4df0ae44c1c5897f25", "max_stars_repo_licenses": ["MIT...
import sys import re import pandas as pd import numpy as np import linecache def main(): args = sys.argv """args[1] : threshold number of word [2]:cancer type""" K = 96 threshold = int(args[1]) pre_data_file = 'data/data1/Pre_data1_o' + args[1] + '.txt' pre_data = pd.read_csv(pre_data_file, d...
{"hexsha": "8d8335a3cf4dce196c355cbdcc26e79dcf8f9b52", "size": 6412, "ext": "py", "lang": "Python", "max_stars_repo_path": "Preprocessing/get_M1.py", "max_stars_repo_name": "qkirikigaku/MS_LDA", "max_stars_repo_head_hexsha": "7eea53759e21c95cd6cb3afd2937388a6b222c5b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
"""Methods for drawing a bounding box on an image.""" import cv2 import numpy as np import selfsupmotion.data.objectron.dataset.box as Box _LINE_TICKNESS = 10 _POINT_RADIUS = 10 _COLORS = [ (255, 0, 0), (0, 255, 0), (0, 0, 255), (128, 128, 0), (128, 0, 128), (0, 128, 128), (255, 255, 255),...
{"hexsha": "a27197e1f25e079ba12699d3ef5b02cb29b44afe", "size": 2901, "ext": "py", "lang": "Python", "max_stars_repo_path": "selfsupmotion/data/objectron/dataset/graphics.py", "max_stars_repo_name": "sbrodeur/selfsupmotion", "max_stars_repo_head_hexsha": "32ba34a090e7e575b43a6a6f14c52c0a5f363d40", "max_stars_repo_licens...
# Copyright 2021 The NetKet 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 applicable ...
{"hexsha": "53453f36e1d8b361f56b89731f4a019a25d1bf11", "size": 10831, "ext": "py", "lang": "Python", "max_stars_repo_path": "netket/variational/mc_mixed_state.py", "max_stars_repo_name": "inailuig/netket", "max_stars_repo_head_hexsha": "ab57a6fb019edb9ac298969950724781f2ae2b22", "max_stars_repo_licenses": ["Apache-2.0"...
#include <utility> // You must include this before including boost headers. #include "resource-types-fwd.h" #include <boost/python/class.hpp> #include <boost/python/def.hpp> #include <kj/io.h> #include <capnp/any.h> #include <capnp/dynamic.h> #include <capnp/message.h> #include <capnp/schema.h> #include <capnp/seri...
{"hexsha": "9cc15762bb4f9147b6cc1501e987964993235ac9", "size": 6248, "ext": "cc", "lang": "C++", "max_stars_repo_path": "py/g1/third-party/capnp/src/message.cc", "max_stars_repo_name": "clchiou/garage", "max_stars_repo_head_hexsha": "446ff34f86cdbd114b09b643da44988cf5d027a3", "max_stars_repo_licenses": ["MIT"], "max_st...
import sys import pickle as pkl # import libraries import nltk from nltk.corpus import stopwords nltk.download(['punkt', 'wordnet']) st = set(stopwords.words('english')) import re import time import pandas as pd import numpy as np from sqlalchemy import create_engine from sklearn.pipeline import Pipeline from sklear...
{"hexsha": "95cc29f65c69dfba6312cc3768849ee788d6cc91", "size": 6924, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/train_classifier.py", "max_stars_repo_name": "lewi0332/disaster_relief_ml_pipeline", "max_stars_repo_head_hexsha": "774b8459f2d6e337c8003cfb4012adf70461caeb", "max_stars_repo_licenses": ["M...
from torch.utils.data import DataLoader, Dataset import torch.nn as nn import os import glob import torch import numpy as np from examples.mnist.gendata import get_projection_grid, project_2d_on_sphere_sun360, rand_rotation_matrix, rotate_grid import cv2 from utils import rotate_map_given_R, calculate_Rmatrix_from_phi_...
{"hexsha": "08d16f4441195a3cfb5129446014a1504eedcd93", "size": 3842, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/sun360/sun360_dataset.py", "max_stars_repo_name": "csm-kr/s2cnn", "max_stars_repo_head_hexsha": "09652af9811357c4bf6f7a6d3e912a06d7826f70", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import argparse import json import os import nltk nltk.download('stopwords') nltk.download('wordnet') nltk.download('punkt') from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer import numpy as np import scipy from gensim.models import TfidfModel from gensim.corpora import Dictionary def par...
{"hexsha": "93e232b6688bcc34af781c3319bd121cee2252fe", "size": 2401, "ext": "py", "lang": "Python", "max_stars_repo_path": "etc/compute_related.py", "max_stars_repo_name": "learning2hash/learning2hash.github.io", "max_stars_repo_head_hexsha": "71447a57e0288660ba5fc245e19b2cc748884be6", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/env Rscript library(readr) library(lmerTest) library(car) library(psych) library(scales) speed_data <- read_csv('data.csv') #calculate reading speed in WPM speed_data$speed <- speed_data$num_words/(speed_data$adjust_rt/60000) #remove retake participants speed_data <- subset(speed_data, retake != 1) #rem...
{"hexsha": "b5d79192eb1bf559f3d35a6c3ae09886d6e0ffaf", "size": 1306, "ext": "r", "lang": "R", "max_stars_repo_path": "example/reading/script.r", "max_stars_repo_name": "uwdata/boba", "max_stars_repo_head_hexsha": "80ff10ffd9a2ae99002bc7e88d173869b86c736c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
# Copyright (c) 2021 Sony Corporation. 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 applicabl...
{"hexsha": "6e1dd0bff4dd60afe467839a14f37f336d5a1ddf", "size": 1665, "ext": "py", "lang": "Python", "max_stars_repo_path": "responsible_ai/data_cleansing/datasets/utils.py", "max_stars_repo_name": "JonathanLehner/nnabla-examples", "max_stars_repo_head_hexsha": "2971b987484945e12fb171594181908789485a0f", "max_stars_repo...
\documentclass[english]{../thermomemo/thermomemo} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{array}% improves tabular environment. \usepackage{dcolumn}% also improves tabular environment, with decimal centring. \usepackage{booktabs} \usepackage{todonotes} \usepackage{subcaption,caption} \usepackage{xs...
{"hexsha": "e65cadcd3f6e20efc5a4999ec5770ec963e87b93", "size": 21701, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/memo/UNIFAC/unifac.tex", "max_stars_repo_name": "SINTEF/Thermopack", "max_stars_repo_head_hexsha": "63c0dc82fe6f88dd5612c53a35f7fbf405b4f3f6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import unittest import numpy as np class TestCase(unittest.TestCase): def _GetNdArray(self, a): if not isinstance(a, np.ndarray): a = np.array(a) return a def assertAllEqual(self, a, b): """Asserts that two numpy arrays have the same values. Args: a: the ex...
{"hexsha": "10f5b9326be2b3bb5b30fcc514c98dc64b1a31a2", "size": 4524, "ext": "py", "lang": "Python", "max_stars_repo_path": "second/framework/test.py", "max_stars_repo_name": "jerry99s/second.pytorch", "max_stars_repo_head_hexsha": "80143908a349b9f3ff1642d21dacaf23455b3cf8", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np from data_loading import load_data, store_song from transitions_creation import fade def main(): load_path = "../songs/dev_songs_house/" store_path = "../listening_test/mixes/mix_A.wav" store_path_transition_times = "../listening_test/mixes/mix_A_transition_times.txt" # Load data ...
{"hexsha": "94c1706ac282bc2cc74ab3bdd6db85d2fcd95db0", "size": 1749, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/fadeinfadeout_mix.py", "max_stars_repo_name": "erikpiscator/song_mixing", "max_stars_repo_head_hexsha": "8fb430311e46d9e917d75ccdd85be57bac67f262", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (c) 2018-2020 Manfred Moitzi # License: MIT License from typing import Iterable, Tuple, List, Sequence, Union, Any from itertools import repeat import math import reprlib __all__ = [ 'Matrix', 'gauss_vector_solver', 'gauss_matrix_solver', 'gauss_jordan_solver', 'gauss_jordan_inverse', 'LUDecomposit...
{"hexsha": "0c493de70629d63ee4ee9d202c223c6925740a7e", "size": 33565, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ezdxf/math/linalg.py", "max_stars_repo_name": "hh-wu/ezdxf", "max_stars_repo_head_hexsha": "62509ba39b826ee9b36f19c0a5abad7f3518186a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\chapter{Guidelines on the preparation of theses} \label{ch-1} The guidelines below set out the organization and formatting requirements of the OIST PhD thesis, in order to assist students in the preparation of theses for submission. The academic requirements of the thesis are defined in the Academic Program Policie...
{"hexsha": "146c1eb6ba434931e5b9368dab46cd4fa7fc97f3", "size": 8102, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "PhD Thesis/MainText/chapter1.tex", "max_stars_repo_name": "Pradeep20oist/LaTeX-templates", "max_stars_repo_head_hexsha": "658b7f8745cc4d1ae157c1b75bc197fb4fa146b4", "max_stars_repo_licenses": ["MIT"...
type Configuration{T <: Parameter} <: Parameter parameters::Dict{String, T} name::String value::Dict{String, Any} function Configuration(parameters::Dict{String, T}, name::String, values::Dict{String, Any}) for key in keys(parameters) @inbounds values[key] = parameters[key].value ...
{"hexsha": "45e565b27b38d22a7b3db08fc69fb56d0b5b4caf", "size": 1429, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/core/configuration.jl", "max_stars_repo_name": "JuliaPackageMirrors/StochasticSearch.jl", "max_stars_repo_head_hexsha": "58e48c8812fb402e4a46ffff1d5bcb87fca3fd05", "max_stars_repo_licenses": ["...
import time import numpy as np import trajPlot class TrajectoryController: def __init__(self,speedMax,accMax,size=3): self.initPoint = np.zeros((size,1)) self.endPoint = np.zeros((size,1)) self.speedMax = speedMax self.accMax = accMax self.speed = 0 self.D = np.zeros((size,...
{"hexsha": "659b711ae9577aee656b3fcc011c788ac72b5587", "size": 1733, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/traj/trajectoryController.py", "max_stars_repo_name": "Fdepraetre/PinokioProject", "max_stars_repo_head_hexsha": "dfea3ee23f10a44d761597d2547db3a1ff196fb1", "max_stars_repo_licenses": ["MIT"],...
from datetime import datetime from lib.pyparsing import Word, Keyword, alphas, ParseException, Literal, CaselessLiteral \ , Combine, Optional, nums, Or, Forward, ZeroOrMore, StringEnd, alphanums, oneOf \ , QuotedString, quotedString, removeQuotes, delimitedList, nestedExpr, Suppress, Group, Regex, operatorPrecedence \ ...
{"hexsha": "7ead86cd946d8d3a8f75bb1ae4c172e8013d5b15", "size": 12391, "ext": "py", "lang": "Python", "max_stars_repo_path": "expressionParser.py", "max_stars_repo_name": "lagvier/echo-sense", "max_stars_repo_head_hexsha": "fe8ab921e7f61c48b224f0cc2832103a395a6cf7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # coding=utf-8 import numpy as np import cv2 file = open("../build/Record.txt") cv2.namedWindow("Window") for line in file.readlines(): background = np.zeros((1024, 1024, 3), dtype=np.uint8) line = line[:-1] points = line.split(" ") oriPt = (-int(100 * float(points[0])), int(10...
{"hexsha": "b54cab0afadf764b7837d920324a2e014809e84a", "size": 644, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/drawCircle.py", "max_stars_repo_name": "srm2021/WMJ2021", "max_stars_repo_head_hexsha": "ce142019ed55ca591a27f5f79abb26cdb98fdb0e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 22, "...
[STATEMENT] lemma Class_cover_imp_subset_or_disj: assumes "A = (\<Union> (Class B ` C))" and "x \<in> G" and "C \<subseteq> G" shows "Class B x \<subseteq> A \<or> Class B x \<inter> A = {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Class B x \<subseteq> A \<or> Class B x \<inter> A = {} [PROOF STEP] by (si...
{"llama_tokens": 147, "file": "Kneser_Cauchy_Davenport_Kneser_Cauchy_Davenport_preliminaries", "length": 1}
(==){G<:Grasp, R<:Real}(a::Rvl{G,R}, b::Rvl{G,R}) = ((a.lo == b.lo) & (a.hi == b.hi)) (!=){G<:Grasp, R<:Real}(a::Rvl{G,R}, b::Rvl{G,R}) = ((a.lo != b.lo) | (a.hi != b.hi)) (<=){G<:Grasp, R<:Real}(a::Rvl{G,R}, b::Rvl{G,R}) = ((a.lo <= b.lo) & (a.hi <= b.hi)) (>=){G<:Grasp, R<:Real}(a::Rvl{G,R}, b::Rvl{G,R}) = ((a.lo >=...
{"hexsha": "3032c9655d47b699a8988f76ffa9a7c6bd67f5b8", "size": 606, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/number/compares.jl", "max_stars_repo_name": "J-Sarnoff/InterVal.jl", "max_stars_repo_head_hexsha": "320e6980b596fc89f50b460669481ea0d80645d2", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import Random struct VariableIndex value::Int64 end struct ConstraintIndex value::Int64 end const CI = ConstraintIndex const VI = VariableIndex function chooseNbVar(L::Vector{Float64}) x::Float64 = rand() if x < L[1] return 2 elseif x+L[1] < L[2] return 3 else return...
{"hexsha": "45d46921ae5948d8d4b17f0c5e7865a5c5e6715a", "size": 4074, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Dm/SppGenerator.jl", "max_stars_repo_name": "LucasBaussay/AntOptim.jl", "max_stars_repo_head_hexsha": "d97041d2763a66d92fd3a7a205670aa963dabd68", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np from PyQt5.QtCore import pyqtSlot, QThread from checkers.gui.worker import Worker from checkers.image.pawn_colour import opposite from checkers.logic.move import check_move from checkers.logic.move_status import MoveStatus first_matrix = np.array( [[0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1,...
{"hexsha": "a1b5f9798a60312e498ea2d620a0ad4ab099bf6c", "size": 3170, "ext": "py", "lang": "Python", "max_stars_repo_path": "checkers/gui/worker_no_cam.py", "max_stars_repo_name": "mnajborowski/pt-projekt", "max_stars_repo_head_hexsha": "fa02580464579dbe3eb13b6b07f4f8f3cb4d44ce", "max_stars_repo_licenses": ["MIT"], "max...
-- Integration over the complex closed disk import measure_theory.function.jacobian import measure import prod import simple import tactics open complex (abs arg exp I) open linear_map (to_matrix_apply) open measure_theory open metric (ball closed_ball sphere) open real (cos sin) open set (Icc Ioc) open_locale real ...
{"author": "girving", "repo": "ray", "sha": "e0c501756e067711e2d3667d4b1d18045d83a313", "save_path": "github-repos/lean/girving-ray", "path": "github-repos/lean/girving-ray/ray-e0c501756e067711e2d3667d4b1d18045d83a313/src/fubini_ball.lean"}
# -*- coding: utf-8 -*- from numpy import linspace, zeros from ....Classes.Segment import Segment from ....Classes.Arc1 import Arc1 from ....Classes.SurfLine import SurfLine def get_surface_active(self, alpha=0, delta=0): """Return the full active surface Parameters ---------- self : SlotM13 ...
{"hexsha": "461aff09744eef9c4242fb9f308e7cadb4eb6425", "size": 1416, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyleecan/Methods/Slot/SlotM13/get_surface_active.py", "max_stars_repo_name": "IrakozeFD/pyleecan", "max_stars_repo_head_hexsha": "5a93bd98755d880176c1ce8ac90f36ca1b907055", "max_stars_repo_license...
import torch import numpy as np from PIL import Image import random from ..model.vocab import Vocab from ..tool.translate import process_image import os from collections import defaultdict import math from prefetch_generator import background class BucketData(object): def __init__(self, device): self.max_l...
{"hexsha": "e021618745358585932b4a057a1a0790207879bb", "size": 5009, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/ocr/loader/dataloader_v1.py", "max_stars_repo_name": "martinhoang11/vietnamese-ocr-toolbox", "max_stars_repo_head_hexsha": "524b4908bedceb0c87b2c7cd7b5e3f6e1126ace5", "max_stars_repo_licen...
//#include <QtGui/QApplication> #include <QApplication> #include <QtDebug> #include <QFile> #include <QTextStream> #include <QDateTime> #include <QDir> #include <QDesktopServices> #include <boost/program_options.hpp> namespace po = boost::program_options; #include <iostream> #include <algorithm> #include <iterator> ...
{"hexsha": "4987ca14bc46f54244fad87ba20aecc711c530f8", "size": 4816, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/main.cpp", "max_stars_repo_name": "jychoi-hpc/pviz3", "max_stars_repo_head_hexsha": "d55c84a45df0a5bf30ecb832b370e03f0c7ab4c1", "max_stars_repo_licenses": ["xpp"], "max_stars_count": null, "max_...
""" Helper routines to perform bias subtraction and overscan trimming of LRIS data. """ import scipy def oneamp(data): """ Subtracts bias from data and returns the overscan region-subtracted image. """ bias = (data[:,2:21].mean(axis=1)*18+data[:,2069:2148].mean(axis=1)*80)/98. out_data = data[:,21:2069]-bias...
{"hexsha": "0a70da429f7935c17f2e70b5bb068a76a0895e83", "size": 2377, "ext": "py", "lang": "Python", "max_stars_repo_path": "keckcode/lris_redux/lris/lris_biastrim.py", "max_stars_repo_name": "cdfassnacht/keck_code", "max_stars_repo_head_hexsha": "a952b3806b3e64eef70deec2b2d1352e6ef6dfa0", "max_stars_repo_licenses": ["M...
from tpot import TPOTRegressor from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split from deap import creator from sklearn.model_selection import cross_val_score, cross_val_predict import numpy as np from tempfile import mkdtemp from shutil import rmtree random_seed = 42 housing...
{"hexsha": "d74dcddc44fa6a8d5664ba158fea073671809d7f", "size": 3065, "ext": "py", "lang": "Python", "max_stars_repo_path": "BayOptPy/tpot/debug/tpot_boston.py", "max_stars_repo_name": "Mind-the-Pineapple/tpot-age", "max_stars_repo_head_hexsha": "2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef", "max_stars_repo_licenses": ["MI...
from Pipeline.main.PullData.Misc.PullCoinMarketCap import PullCoinMarketCap import numpy as np class MarketDetails: """ Period: short: 1h, mid: 24h, long: 1w """ def __init__(self): self.pull = PullCoinMarketCap() def multiTicks(self, tickSizeList): coinPage = se...
{"hexsha": "9d86a8c3dde79b322b53513d36394d8329a20965", "size": 1350, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pipeline/main/Monitor/MarketDetails.py", "max_stars_repo_name": "simonydbutt/b2a", "max_stars_repo_head_hexsha": "0bf4a6de8547d73ace22967780442deeaff2d5c6", "max_stars_repo_licenses": ["MIT"], "ma...
"""RDF datasets Datasets from "A Collection of Benchmark Datasets for Systematic Evaluations of Machine Learning on the Semantic Web" """ import os from collections import OrderedDict import itertools import rdflib as rdf import abc import re import networkx as nx import numpy as np import dgl import dgl.backend as ...
{"hexsha": "ce223ba004fe589837c77572cfc6b4e184964e57", "size": 23627, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/dgl/data/rdf.py", "max_stars_repo_name": "vipermu/dgl", "max_stars_repo_head_hexsha": "c9ac6c9889423019977e431c8b74a7b6c70cdc01", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
from newspaper import Article import random import string import nltk from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics.pairwise import cosine_similarity import numpy as np import warnings warnings.filterwarnings('ignore') #Download the punkt package nltk.download('punkt', quiet=True) a...
{"hexsha": "4714973d1b1dbb64d7f2e87f385f2bd08aa52f6c", "size": 2826, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Chat_bot.py", "max_stars_repo_name": "Deborah-code/Chatbot", "max_stars_repo_head_hexsha": "db211bdd7032018c69e1c34fd933f3b81a47e208", "max_stars_repo_licenses": ["0BSD"], "max_stars_count...
import numpy as np import math scale = 255.0/32768.0 scale_1 = 32768.0/255.0 def ulaw2lin(u): u = u - 128 s = np.sign(u) u = np.abs(u) return s*scale_1*(np.exp(u/128.*math.log(256))-1) def lin2ulaw(x): s = np.sign(x) x = np.abs(x) u = (s*(128*np.log(1+scale*x)/math.log(256))) u = np....
{"hexsha": "b79d4315bf1fa7cfc1236c71e79762e0511713fb", "size": 381, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ulaw.py", "max_stars_repo_name": "Mozilla-GitHub-Standards/ee089678ec78c1555fc3f1eff2962a95ae31dcf042f14e37b019b4fbb4b13288", "max_stars_repo_head_hexsha": "5d4d89070dc8da54a716bb3d0db7f394334b...
""" Estimate a linear model with high dimensional categorical variables / instrumental variables ### Arguments * `df::AbstractDataFrame` * `model::Model`: A model created using [`@model`](@ref) * `save::Union{Bool, Symbol} = false`: Should residuals and eventual estimated fixed effects saved in a dataframe? Use `save ...
{"hexsha": "a90f70a4cbd3bb380924d54ca7e6f94b3c9d2426", "size": 16564, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/reg.jl", "max_stars_repo_name": "maxnorton/FixedEffectModels.jl", "max_stars_repo_head_hexsha": "b97a25dfbe2cc5c325df6133ead55b2d0e5609fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os import numpy as np import matplotlib.pyplot as plt RESULTS_FOLDER = './results/' NUM_BINS = 100 BITS_IN_BYTE = 8.0 MILLISEC_IN_SEC = 1000.0 M_IN_B = 1000000.0 VIDEO_LEN = 64 VIDEO_BIT_RATE = [1500, 4900, 8200, 11700, 32800, 152400] COLOR_MAP = plt.cm.jet #nipy_spectral, Set1,Paired SIM_DP = 'sim_dp' SCHEME...
{"hexsha": "fc1577804d65b36b5888b7aedb81e894a07b5b95", "size": 5382, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_exp/plot_results.py", "max_stars_repo_name": "ahmadhassan997/pensieve", "max_stars_repo_head_hexsha": "d54f16bc398d2f24c7b0525dad90df002b31506a", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" author: muzexlxl email: muzexlxl@foxmail.com time series factors bias: -1 0 1 neut: 1, 0 """ import pandas as pd import numpy as np from datetime import datetime import collections import math # import src.data.clickhouse_control as cc class FactorX: def __init__(self, id: list, timeframe: str, data_source...
{"hexsha": "3d98bf2982ee336f49382e01bed153699d261da1", "size": 4278, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/factor/factor.py", "max_stars_repo_name": "jiangtiantu/JAB", "max_stars_repo_head_hexsha": "39d91043619c337c07ade87a86f3f876b05ad3e3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3,...
import logging from functools import reduce from operator import mul from torch import optim import math import numpy as np import random import torch from torch import nn import torch.nn.functional as F class CdnnClassifier(): def __init__(self, vec_len, cnn_params=[(21, 12), (9, 6)], dnn_params=[(0.5, 0.2)], ...
{"hexsha": "f625902306d993549f4c98b7aa34c4dae0eddc83", "size": 5738, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/attacks/CdnnClassifier.py", "max_stars_repo_name": "tahleen-rahman/linkability_stepcount", "max_stars_repo_head_hexsha": "ed873782453d391865ad15e7c2d538058f5db88a", "max_stars_repo_licenses": ...
# Rough outline from typing import Union, Tuple, Callable import numpy as np import scipy.linalg from general.Environment import Environment from general.Exceptions import ConvergenceFailure from utils.MutableFloat import MutableFloat class Circuit: def __init__(self, environment: Environment): self.mat...
{"hexsha": "22424386e25fa6c6d434d391c46335a994b8df1b", "size": 4640, "ext": "py", "lang": "Python", "max_stars_repo_path": "general/Circuit.py", "max_stars_repo_name": "MrAttoAttoAtto/CircuitSimulatorC2", "max_stars_repo_head_hexsha": "4d821c86404fe3271363fd8c1438e4ca29c17a13", "max_stars_repo_licenses": ["MIT"], "max_...
From iris.program_logic Require Export weakestpre. From iris.heap_lang Require Export notation lang. From iris.proofmode Require Export tactics. From iris.heap_lang Require Import proofmode. From iris.base_logic.lib Require Export invariants. Set Default Proof Using "Type". Section IncRA. Inductive incRAT : Type := ...
{"author": "ocecaco", "repo": "iris-iterators", "sha": "ce5c1bf34178e0cd7592dc08884956f0fad2403a", "save_path": "github-repos/coq/ocecaco-iris-iterators", "path": "github-repos/coq/ocecaco-iris-iterators/iris-iterators-ce5c1bf34178e0cd7592dc08884956f0fad2403a/experiments/IncRA.v"}
% corrected VD 98 \subsection{Requirements} % Describe here all the properties that characterize the deliverables you % produced. It should describe, for each main deliverable, what are the expected % functional and non functional properties of the deliverables, who are the actors % exploiting the deliverables. It is ...
{"hexsha": "6dd00b77b8618641676737275b275aefe6e20d86", "size": 1269, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/scientific/requirements.tex", "max_stars_repo_name": "Lemswasabi/bsps3-report", "max_stars_repo_head_hexsha": "ca3f7bee2d4740c5c7ad9f586766ab04a0e5f58b", "max_stars_repo_licenses": ["MIT"],...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns #Import Cancer data from the Sklearn library # Dataset can also be found here (http://archive.ics.uci.edu/ml/datasets/breast+cancer+wisconsin+%28diagnostic%29) from sklearn.datasets import load_breast_cancer canc...
{"hexsha": "6ac99f8c6a97ce7553603aba0211837dfb3b5635", "size": 842, "ext": "py", "lang": "Python", "max_stars_repo_path": "cancerbreast.py", "max_stars_repo_name": "axyroxxx/Breast-Cancer", "max_stars_repo_head_hexsha": "f7bbc00b43ddee0a810191e1fc1ee667f01586ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- """ Created on Mon Jul 16 15:44:19 2018 @author: tmthydvnprt This function is adapted from the discussion at: https://stackoverflow.com/questions/6620471/fitting-empirical-distribution-to-theoretical-ones-with-scipy-python Though I've made it easy to use, I did NOT write this awesome code - mr...
{"hexsha": "be5325b00d534f4d1b6de895e5173f2d8ac6392a", "size": 812, "ext": "py", "lang": "Python", "max_stars_repo_path": "Example/fineDataAnalysis.py", "max_stars_repo_name": "richmr/QuantitativeRiskSim", "max_stars_repo_head_hexsha": "f98d416d075dc6232fdc573844847f8c4843e7f8", "max_stars_repo_licenses": ["MIT"], "max...
using BinaryBuilder, Pkg name = "MKL" version = v"2021.1.1" sources = [ ArchiveSource("https://anaconda.org/intel/mkl/2021.1.1/download/linux-64/mkl-2021.1.1-intel_52.tar.bz2", "bfb0fd056576cad99ae1d9c69ada2745420da9f9cf052551d5b91f797538bda2"; unpack_target = "mkl-x86_64-linux-gnu"), Archiv...
{"hexsha": "1d84a86bfbb28d1c6197e3080603aa79f4cce59f", "size": 3120, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "M/MKL/build_tarballs.jl", "max_stars_repo_name": "waralex/Yggdrasil", "max_stars_repo_head_hexsha": "bba5443f75b221c6973d479e2c6727cf0ae3a0b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#' Dates of different days within isoweekyears #' #' @format #' \describe{ #' \item{yrwk}{Isoweek-isoyear.} #' \item{mon}{Date of Monday.} #' \item{tue}{Date of Tuesday.} #' \item{wed}{Date of Wednesday.} #' \item{thu}{Date of Thursday.} #' \item{fri}{Date of Friday.} #' \item{sat}{Date of Saturday.} #' \item{sun}{Date...
{"hexsha": "84b5f108c1a67237ffa6becb8fa0149c8292fa2f", "size": 966, "ext": "r", "lang": "R", "max_stars_repo_path": "R/days.r", "max_stars_repo_name": "folkehelseinstituttet/municipdata", "max_stars_repo_head_hexsha": "eae72bd8eb130adb6397b9d5f3f8c00a02982b8c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import os from functools import partial import tensorflow as tf import numpy as np def _parse(filename, channels): image_string = tf.io.read_file(filename) image_decoded = tf.image.decode_png(image_string, channels=channels) return tf.cast(image_decoded, tf.float32) def _flip(x): x = tf.image.rando...
{"hexsha": "53efdd40403c43787dbcb7c6d85ccc659750060d", "size": 1403, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/datasets/from_images.py", "max_stars_repo_name": "cyprienruffino/CycleGAN-TensorFlow", "max_stars_repo_head_hexsha": "5eaa864e406d4ff0a1b86a85cf43a9096d0d0395", "max_stars_repo_licenses": ["MI...
/////////////////////////////////////////////////////////////// // Copyright 2018 John Maddock. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt //[eigen_eg #include <iostream> #include <boost/multiprecision/cpp_...
{"hexsha": "a70e3fbcf527f14e5a5c5261351e7e3ee173affe", "size": 1487, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/multiprecision/example/eigen_example.cpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b444494140676da98e2", "max...
import numpy as np import torch def filter_samples(Y_hat: torch.Tensor, Y: torch.Tensor, weights): if weights is None: return Y_hat, Y if isinstance(weights, torch.Tensor): idx = torch.nonzero(weights).view(-1) else: idx = torch.tensor(np.nonzero(weights)[0]) if Y.dim() > 1:...
{"hexsha": "bd484694a685b35de9acbbd6ffcd1e8141a53461", "size": 1627, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "JonnyTran/LATTE", "max_stars_repo_head_hexsha": "613c976c1361560d1b5b78f1d8131002cbeabfc5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
(* This is the definition of formal syntax for Dan Grossman's Thesis, "SAFE PROGRAMMING AT THE C LEVEL OF ABSTRACTION". An attempt at a variable module in a context. *) Require Import List. Export ListNotations. Require Import ZArith. Require Import Init.Datatypes. Require Import Coq.Init.Logic. Require Ex...
{"author": "briangmilnes", "repo": "CycloneCoqSemantics", "sha": "190c0fc57d5aebfde244efb06a119f108de7a150", "save_path": "github-repos/coq/briangmilnes-CycloneCoqSemantics", "path": "github-repos/coq/briangmilnes-CycloneCoqSemantics/CycloneCoqSemantics-190c0fc57d5aebfde244efb06a119f108de7a150/3/TypingInfoProofsSigDef....
""" This library contains metrics to quantify the shape of a waveform 1. threshold_amplitude - only look at a metric while oscillatory amplitude is above a set percentile threshold 2. rdratio - Ratio of rise time and decay time 3. pt_duration - Peak and trough durations and their ratio 3. symPT - symmetry between peak ...
{"hexsha": "6ca3a110e510a0faaca648ad6254d3c19a732baa", "size": 32116, "ext": "py", "lang": "Python", "max_stars_repo_path": "shape.py", "max_stars_repo_name": "voytekresearch/misshapen", "max_stars_repo_head_hexsha": "8ee2afa2da3449789e52bcce63ecd852c191e6fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, ...
import argparse import os, sys import numpy as np import tensorflow as tf from emd import tf_auctionmatch from cd import tf_nndistance import time def f_score(label, predict, dist_label, dist_pred, threshold): num_label = label.shape[0] num_predict = predict.shape[0] f_scores = [] for i in range(len(t...
{"hexsha": "723b84239cff71301a57f06567c8d45c5b405827", "size": 4651, "ext": "py", "lang": "Python", "max_stars_repo_path": "pix3d/eval/eval_shapenet_object_centered.py", "max_stars_repo_name": "zouchuhang/Silhouette-Guided-3D", "max_stars_repo_head_hexsha": "884504982f16567f6c9152baf7a676dbf50711e9", "max_stars_repo_li...
/* * Legal Notice * * This document and associated source code (the "Work") is a preliminary * version of a benchmark specification being developed by the TPC. The * Work is being made available to the public for review and comment only. * The TPC reserves all right, title, and interest to the Work as provided *...
{"hexsha": "3274847bce6c35530710788d1f9af7192cddc93f", "size": 10627, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "egen/unittest/tc_securityfile.cpp", "max_stars_repo_name": "dotweiba/dbt5", "max_stars_repo_head_hexsha": "39e23b0a0bfd4dfcb80cb2231270324f6bbf4b42", "max_stars_repo_licenses": ["Artistic-1.0"], "m...
# -*- coding: utf-8 -*- import gym import numpy as np # 目標とする報酬 goal_average_steps = 195 # エピソードのタイムステップの最大の長さ max_number_of_steps = 200 # エピソード数 num_episodes = 5000 # 保存しておく連続したエピソードの数 num_consecutive_iterations = 100 # 最後のエピソードの報酬 last_time_steps = np.zeros(num_consecutive_iterations) def bins(clip_min, clip_max, n...
{"hexsha": "1329295127eaa15a8e0415c3165e75eb1d26686e", "size": 3393, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/q-leaning/cartpole.py", "max_stars_repo_name": "Silver-birder/reinforcement-learning-fx", "max_stars_repo_head_hexsha": "043e54015387b105669c7d047ca7f43c43dcc72b", "max_stars_repo_licenses...
# Copyright (C) 2016-2021 Alibaba Group Holding Limited # # 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 l...
{"hexsha": "03a917b75964cf8320e60e812530cbaea5ab2803", "size": 4758, "ext": "py", "lang": "Python", "max_stars_repo_path": "efls-train/python/efl/privacy/fixedpoint_tensor.py", "max_stars_repo_name": "finalljx/Elastic-Federated-Learning-Solution", "max_stars_repo_head_hexsha": "fb588fdc03a2c1598b40b36712b27bdffdd24258"...
from ..plugins.state_init import * import pytest import numpy as np State_initialiser def test_index_based(): method ='index' input_list = np.zeros(4) my_S = State_initialiser(method,input_list) assert my_S.logic == index_based def test_energy_based(): method ='energy' input_list = np...
{"hexsha": "3bca2de37718830fc49cc570ad7527c7e000ea10", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "rydprop/hohi/adiabatic_solver/tests/test_state_init.py", "max_stars_repo_name": "jdrtommey/rydprops", "max_stars_repo_head_hexsha": "cdc7e14d61ff33929844ee5d779a18fd64f89f4f", "max_stars_repo_lice...
# # Copyright (c) 2015-2016,2018 CNRS # import numpy as np from pinocchio.robot_wrapper import RobotWrapper from . import libpinocchio_pywrap as pin from . import utils from .explog import exp, log from .libpinocchio_pywrap import * from .deprecated import * from .shortcuts import * pin.AngleAxis.__repr__ = lambda s...
{"hexsha": "cc8ebdf341dc9adbc9f048e54b245f630bb19fa2", "size": 352, "ext": "py", "lang": "Python", "max_stars_repo_path": "bindings/python/scripts/__init__.py", "max_stars_repo_name": "matthieuvigne/pinocchio", "max_stars_repo_head_hexsha": "01f211eceda3ac2e5edc8cf101690afb6f3184d3", "max_stars_repo_licenses": ["BSD-2-...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. @doc raw""" ObjsChannel(; accepted_user=nothing, created=nothing, creator=nothing, id=nothing, is_archived=nothing, is_channel...
{"hexsha": "b2f7bb24e8e0a6c8f931e84cc557f08e738f59a8", "size": 13528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/web/model_ObjsChannel.jl", "max_stars_repo_name": "aviks/SlackSDK.jl", "max_stars_repo_head_hexsha": "5035e0d3c53c6812e364a84e81304b36f00f4340", "max_stars_repo_licenses": ["MIT"], "max_stars_...
''' This project is written by Anqi Ni(anqini4@gmail.com) according the algorithm on the paper: 'The Split Bregman Method for L1-Regularized Problems'(2009) by Tom Goldstein and Stanley Osher published on SIAM J. IMAGING SCIENCES Vol2, No. 2, pp323-343. And it is For Educational Purposes Only. ...
{"hexsha": "70167a9e8258b68fe2d45e2534bc71084ac9c1a7", "size": 1643, "ext": "py", "lang": "Python", "max_stars_repo_path": "itv.py", "max_stars_repo_name": "ucas010/Split-Bregman-for-TV-Image-Recovery", "max_stars_repo_head_hexsha": "3baf24775f94ac491bc614ce032a74b36731a303", "max_stars_repo_licenses": ["MIT"], "max_st...
# This file is a part of SimilaritySearch.jl # License is Apache 2.0: https://www.apache.org/licenses/LICENSE-2.0.txt export l1_distance, l2_distance, squared_l2_distance, linf_distance, lp_distance """ l1_distance(a, b)::Float64 Computes the Manhattan's distance between `a` and `b` """ function l1_distance(a, b...
{"hexsha": "69864c38233c7bf36725ea3c718be82d194df96e", "size": 1783, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/distances/vectors.jl", "max_stars_repo_name": "UnofficialJuliaMirror/SimilaritySearch.jl-053f045d-5466-53fd-b400-a066f88fe02a", "max_stars_repo_head_hexsha": "f6815ebd4f018ee3536f5b3be4e39640b3...
[STATEMENT] lemma image_mset_ordering_eq: assumes "M1 = {# (f1 u). u \<in># L #}" assumes "M2 = {# (f2 u). u \<in># L #}" assumes "\<forall>u. (u \<in># L \<longrightarrow> (((f1 u), (f2 u)) \<in> r \<or> (f1 u) = (f2 u)))" shows "(M1 = M2) \<or> ( (M1,M2) \<in> (mult r) )" [PROOF STATE] proof (prove) goal (1 s...
{"llama_tokens": 6653, "file": "SuperCalc_multisets_continued", "length": 54}
[STATEMENT] lemma sd_1r_correct: assumes "s\<^sub>o - s\<^sub>e > safe_distance_1r" shows "no_collision_react {0..}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. no_collision_react {0..} [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. no_collision_react {0..} [PROOF STEP] from assms [PRO...
{"llama_tokens": 544, "file": "Safe_Distance_Safe_Distance_Reaction", "length": 8}
#!/usr/bin/env python ### Up to date as of 10/2019 ### '''Section 0: Import python libraries This code has a number of dependencies, listed below. They can be installed using the virtual environment "slab23" that is setup using script 'library/setup3env.sh'. Additional functions are housed in file ...
{"hexsha": "49fa5b9ce9b469153fc198ba4a2f0fc2f5e253b8", "size": 82778, "ext": "py", "lang": "Python", "max_stars_repo_path": "slab2code/slab2.py", "max_stars_repo_name": "ftbernales/slab2", "max_stars_repo_head_hexsha": "0070903421eb2ede8cb86bd06609389b0ecf52dd", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count"...
module DBdatatype # Note: correspondence here is complicated by platform issues. # See http://julia.readthedocs.org/en/release-0.3/manual/calling-c-and-fortran-code/ using Compat const DB_INT = 16 const DB_SHORT = 17 const DB_LONG = 18 const DB_FLOAT = 19 const DB_DOUBLE = 20 const DB_CHAR = 21 const DB_LONG_LONG = 22...
{"hexsha": "68d681896852c12e7d01ff46653d70d1f3c745f7", "size": 976, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/DBdatatype.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Silo.jl-1d21c727-5350-5715-a0f1-d07632c10ec8", "max_stars_repo_head_hexsha": "f33c1166064914ab67eb9acf8398c70551bcdb15", "max_stars_...
[STATEMENT] theorem (in graph) init_root [simp]: "DataRefinement ({.Init.} o Q2_a) R1_a R2_a Q2'_a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. DataRefinement ({. Init .} \<circ> Q2_a) R1_a R2_a Q2'_a [PROOF STEP] by (simp add: data_refinement_hoare hoare_demonic Q2'_a_def Init_def Loop'_def R1_a_def R2_a...
{"llama_tokens": 168, "file": "GraphMarkingIBP_StackMark", "length": 1}
/* * The MIT License - see LICENSE file for details */ #include "DebugPanel.h" #include "DebugThread.h" #include "FileUtils.h" #include <boost/foreach.hpp> #include <boost/format.hpp> DEFINE_EVENT_TYPE(wxEVT_MY_EVENT_PRINT_LINE) DEFINE_EVENT_TYPE(wxEVT_MY_EVENT_NOTIFY_FILE_AND_LINE) DEFINE_EVENT_TYPE(wxEVT_MY_EVENT_...
{"hexsha": "a6da309bc52d64972aaa7bf6432e20445a33773a", "size": 4261, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "gui/DebugPanel.cpp", "max_stars_repo_name": "hagish/lua-debugger", "max_stars_repo_head_hexsha": "ea74561dec68e09896f42ad49b65cc721227d781", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1....
import matplotlib.pyplot as plt import numpy as np import cv2 SIZE_RATIO = 5 def is_black_square(square, threshold = 0.8): N = square.shape[0] total_area = N*N black_area = np.sum(square == 0) print("ratio", black_area/total_area) if (black_area/total_area) > threshold: return True ...
{"hexsha": "37348b3c0535ab53af8482c787d2b34657224708", "size": 4547, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "tomasr8/qr", "max_stars_repo_head_hexsha": "40eda9a040139b2e800abc798c6d67c6e864fa32", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_rep...
!*********************************************************************************************************************************** !** S U B R O U T I N E G A T E F L O W ** !****************************************************...
{"hexsha": "7fcd15aa4a862305381e85643078be3666d65f48", "size": 30489, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gate-spill-pipe.f90", "max_stars_repo_name": "WQDSS/CE-QUAL-W2-Linux", "max_stars_repo_head_hexsha": "62479d6c1ae8a2dcb632327d96e5084b52d6f9b5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
##################################################################### # Task 2 : identify an image region by hue ##################################################################### import cv2 import numpy as np ##################################################################### # define video capture with acce...
{"hexsha": "b3814c3f98426c7a6236dcb75e444fa2e197da2d", "size": 1811, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hsv_colour.py", "max_stars_repo_name": "tobybreckon/colour-filtering", "max_stars_repo_head_hexsha": "1679db2c075036f68dcc8a75c575c8f362e9ec94", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os import numpy as np import pandas as pd from models.predictor import predict from evaluation.metrics import evaluate from plots.rec_plots import pandas_bar_plot def getGroup(user_counts): sorted_user_counts = np.sort(user_counts) full_length = len(user_counts) first_quater = sorted_user_counts[fu...
{"hexsha": "cb9141f713e83dad1e1f7ad534bed70cf376b14e", "size": 2685, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment/usercategory.py", "max_stars_repo_name": "wuga214/MultiModesPreferenceEstimation", "max_stars_repo_head_hexsha": "f80c2feb196cb498a8b417f2037aadad151cceb3", "max_stars_repo_licenses": [...
# import os # import numpy as np # from PIL import Image # from .. import utils # import logging # logger = logging.getLogger() # # ----- parsers # # These objects are mux, they consume and streamline the output # # Don't know what mux are? Study electronics. # class BaseParser: # """This is the base parser cla...
{"hexsha": "cb54c9458b037f16c03d89b29f04291304b49605", "size": 11001, "ext": "py", "lang": "Python", "max_stars_repo_path": "nbox/framework/parsers.py", "max_stars_repo_name": "cshubhamrao/nbox", "max_stars_repo_head_hexsha": "df32552e94c436b3d55b197263e5834bdbb8b724", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...