text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import sys import gif from os import getcwd, path def hilbert(i): index = i & 3 points = np.array([[0,0],[0,1],[1,1],[1,0]]) v = points[index] for iOrder in range(1,order): i = i >> 2 index = i & 3 ...
{"hexsha": "5c25ea7ce1b2996cd6e231e9c1f9f34dd3c8cf08", "size": 1945, "ext": "py", "lang": "Python", "max_stars_repo_path": "HilbertCurve.py", "max_stars_repo_name": "damuopel/HilbertCurve", "max_stars_repo_head_hexsha": "b0a93275a57090d21144a35b600f8a2d93391389", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
% !TEX root = ../../main.tex % !TEX encoding = UTF-8 Unicode \chapter{The Large Hadron Collider} \label{ch:lhc} The Large Hadron Collider (LHC)~\cite{LHC,LHC_design_v1,LHC_design_v2,LHC_design_v3} is a circular particle accelerator designed to probe physics at the \TeV\,scale. By colliding protons or heavy-ions with h...
{"hexsha": "8423fe2e2c58b9e1760ade666e61201a2755c7bd", "size": 23292, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/preface/LHC.tex", "max_stars_repo_name": "rynecarbone/Thesis_lvJ", "max_stars_repo_head_hexsha": "46ba8b142e945d5f3103a364630f661da3405479", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_c...
[STATEMENT] lemma SubstAtomicP_unique: "{SubstAtomicP v tm x y, SubstAtomicP v tm x y'} \<turnstile> y' EQ y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {SubstAtomicP v tm x y, SubstAtomicP v tm x y'} \<turnstile> y' EQ y [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. {SubstAtomicP v tm x...
{"llama_tokens": 18208, "file": "Incompleteness_Functions", "length": 23}
C Copyright(C) 1988-2017 National Technology & Engineering Solutions C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with C NTESS, the U.S. Government retains certain rights in this software. C C Redistribution and use in source and binary forms, with or without C modification, ar...
{"hexsha": "05b6c4a7e43f46a46bccb9e4d0218b4dc086403b", "size": 3489, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/numbers/nu_lissel.f", "max_stars_repo_name": "mathstuf/seacas", "max_stars_repo_head_hexsha": "49b3466e3bba12ec6597e364ce0f0f149f9ca909", "max_stars_repo_licenses": ["...
using TypeClasses using Test using DataTypesBasic using Suppressor splitln(str) = split(strip(str), "\n") # Combine # ======= a = Callable(x -> "hello $x") b = Callable(x -> "!") (a ⊕ b)(:Albert) # FunctorApplicativeMonad # ======================= g = Callable(x -> x*2) f = Callable(x -> x*x) # just function com...
{"hexsha": "5fbd5bab3981f97b03ffe30471698e8e7ee7a39c", "size": 714, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/TypeInstances/Callable.jl", "max_stars_repo_name": "JuliaFunctional/TypeClasses.jl", "max_stars_repo_head_hexsha": "815ab57bc0b15a57132191d4989b3bbe7abcabbe", "max_stars_repo_licenses": ["MIT"]...
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection import random class Atom: """A simple atom in a 2-D crystal grain, with its coordinates.""" def __init__(self, grain, coords): self.grain = grain self.coords = coords ...
{"hexsha": "716abcf8a0899063ece5c16e0f636da5a989ec90", "size": 14619, "ext": "py", "lang": "Python", "max_stars_repo_path": "crystal_para_mexer.py", "max_stars_repo_name": "adrianopls/SonicSim", "max_stars_repo_head_hexsha": "77c77c49781cbd947c70869aabed859323e0e07b", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import detectron2 from detectron2.engine import DefaultPredictor from detectron2.config import get_cfg from detectron2.data import MetadataCatalog from detectron2.utils.visualizer import ColorMode, Visualizer from detectron2 import model_zoo from detectron2.modeling import build_model from detectron2.checkpoint import ...
{"hexsha": "86aff4e493606150d824b4bb55ad2775467ec8e8", "size": 7372, "ext": "py", "lang": "Python", "max_stars_repo_path": "Detectron_roadside.py", "max_stars_repo_name": "jinsuwang/16824-Fall2021-Project", "max_stars_repo_head_hexsha": "a60d33b1413db350be1d47660abec051071e5296", "max_stars_repo_licenses": ["MIT"], "ma...
(* Title: Jive Data and Store Model Author: Norbert Schirmer <schirmer at informatik.tu-muenchen.de>, 2003 Maintainer: Nicole Rauch <rauch at informatik.uni-kl.de> License: LGPL *) section \<open>Store Properties\<close> theory StoreProperties imports Store begin text \<open>This theory ...
{"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/JiveDataStore...
""" Copyright 2019 Manuel Olguín 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 in writing, ...
{"hexsha": "541482ea0a061d022f20323e8b42b5e8b2562563", "size": 4212, "ext": "py", "lang": "Python", "max_stars_repo_path": "aggregate.py", "max_stars_repo_name": "molguin92/EdgeDroidResults", "max_stars_repo_head_hexsha": "083906c3b1e95d81327494e2d6465c3a39547050", "max_stars_repo_licenses": ["Apache-2.0", "CC-BY-4.0"]...
# Creating the Two Zone Example Data # # Transform the TM1 TAZ-based model 25 zone inputs to a two-zone (MAZ and TAZ) set of inputs for software development. # # The 25 zones are downtown San Francisco and they are converted to 25 MAZs. # MAZs 1,2,3,4 are small and adjacent and assigned TAZ 2 and TAP 10002. # MAZs 13,1...
{"hexsha": "bc49a2a0ef1eb65b17c7517449f611fba6556cf6", "size": 9084, "ext": "py", "lang": "Python", "max_stars_repo_path": "activitysim/examples/example_multiple_zone/scripts/three_zone_example_data.py", "max_stars_repo_name": "mxndrwgrdnr/activitysim", "max_stars_repo_head_hexsha": "722d6e36b2210d5d24dfa2ac4a3504c1e8f...
import math import numpy as np import sys print("Inflow(Cs),") f=np.load('outfile.npz') x=sys.argv[1] for item in f[x+'PredictPlot']: if not math.isnan(item): print(item[0],",")
{"hexsha": "d138c8a18bbea7ae7b8abbc8c06d422217a9af05", "size": 190, "ext": "py", "lang": "Python", "max_stars_repo_path": "LSTM/graphs/read_outfile.py", "max_stars_repo_name": "Anurag14/Inflow-prediction-Bhakra", "max_stars_repo_head_hexsha": "d440ec552032084991878877ba5154ea2c452264", "max_stars_repo_licenses": ["MIT"...
SUBROUTINE XLAENV( ISPEC, NVALUE ) * * -- LAPACK auxiliary routine (version 3.1) -- * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. * November 2006 * * .. Scalar Arguments .. INTEGER ISPEC, NVALUE * .. * * Purpose * ======= * * XLAENV sets certain machine- and...
{"hexsha": "648c0c85b154787d8de22682e3e47d95afb6ca6b", "size": 2622, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "external_src/oomph_flapack/xlaenv.f", "max_stars_repo_name": "pkeuchel/oomph-lib", "max_stars_repo_head_hexsha": "37c1c61425d6b9ea1c2ddceef63a68a228af6fa4", "max_stars_repo_licenses": ["RSA-MD"], ...
function e = calcError(pf,rec,varargin) % RP and mean square error % % *calcError(pf,rec)* calculates reconstruction error between meassured % intensities and the recalcuated ODF or between two meassured pole % figures. It can be specified whether the RP % error or the mean square error is calculated. The scaling coe...
{"author": "mtex-toolbox", "repo": "mtex", "sha": "f0ce46a720935e9ae8106ef919340534bca1adcb", "save_path": "github-repos/MATLAB/mtex-toolbox-mtex", "path": "github-repos/MATLAB/mtex-toolbox-mtex/mtex-f0ce46a720935e9ae8106ef919340534bca1adcb/PoleFigureAnalysis/@PoleFigure/calcError.m"}
#!/usr/local/bin/python3 """ Requirements: - sklearn - numpy Python: - 3.7 Hierarchical clustering (HC) is a method of cluster analysis which seeks to build a hierarchy of clusters. The code contains Agglomerative approach for hierarchical clustering. Agglomerative: This is a "bottom-up" approach. Each observatio...
{"hexsha": "330c1ffc40ce9baef22aab480c6634c9b7bcc2f2", "size": 7627, "ext": "py", "lang": "Python", "max_stars_repo_path": "machine_learning/hierarchial_clustering.py", "max_stars_repo_name": "jindal2309/Python", "max_stars_repo_head_hexsha": "894293574d3439b13ec848d223afec34cd9a075f", "max_stars_repo_licenses": ["MIT"...
# -*- coding: utf-8 -*- """ Logistic regression (yes, pretty basic) Created on Sun Jun 7 21:05:59 2020 @author: Gurpinder """ import numpy as np import matplotlib.pyplot as plt from scipy.optimize import fmin_tnc X = [] y = [] #Reading the data with open("ex2data1.txt") as f: lines = f.readl...
{"hexsha": "14dcec5b009c2fd575f37b11298afa19aa602a2f", "size": 2100, "ext": "py", "lang": "Python", "max_stars_repo_path": "Logistic_Regression/Logistic_Regression.py", "max_stars_repo_name": "Gurpinder98/Fun_scripts", "max_stars_repo_head_hexsha": "32e3c512196a0db7326cbb06475ab30e8e083738", "max_stars_repo_licenses": ...
import os from glob import glob from tqdm import tqdm import numpy as np import cv2 import skimage.measure def i3d_prediction(model, features_folder, output_folder): feature_paths = glob(os.path.join(features_folder, '*')) feature_paths.sort() os.makedirs(output_folder, exist_ok=True) for feature_pa...
{"hexsha": "6927ae4e2be45fa8b4a2ca80ec54ef05b5f6b642", "size": 3901, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_model/libs/i3d_funcs.py", "max_stars_repo_name": "wpfhtl/Drone-Detection-1", "max_stars_repo_head_hexsha": "d3aeb2f731739475b1b63e74337876ea14de08ac", "max_stars_repo_licenses": ["MIT"], "max...
! Generated by cart. DO NOT EDIT program main implicit none if (.not.run()) stop 1 contains function run() result(passed) use acceleration_test, only: & acceleration_acceleration => & test_acceleration use amount_rate_test, only: & amount_...
{"hexsha": "d7316fba3fff1afcfec95cea6db20b1efcbc0d8e", "size": 6605, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/main.f90", "max_stars_repo_name": "everythingfunctional/quaff", "max_stars_repo_head_hexsha": "72a4a4611e18b799196a5f962b4c653ace7a3671", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" Module to gather various high-level algorithms based on the kernel methods, such as kernel-based predictive models for classification and regression. """ from abc import abstractmethod from copy import deepcopy import numpy as np from sklearn.base import (BaseEstimator, ClassifierMixin, RegressorMixin, ...
{"hexsha": "20cd02eb193d6753b226abf37bbf5f0b24c81116", "size": 22358, "ext": "py", "lang": "Python", "max_stars_repo_path": "kernelmethods/algorithms.py", "max_stars_repo_name": "vishalbelsare/kernelmethods", "max_stars_repo_head_hexsha": "f49eae7057e6223fe1bae52ca4f308af807fe347", "max_stars_repo_licenses": ["Apache-2...
"""Helios Force-Directed Layout using octree References ---------- [1] Fruchterman, T. M. J., & Reingold, E. M. (1991). Graph Drawing by Force-Directed Placement. Software: Practice and Experience, 21(11). [2] Y. Hu, “Efficient, High-Quality Force-Directed Graph Drawing,” The Mathematica Journal, p. 35...
{"hexsha": "5dcd43607dc6cfb7bf8d5387192594bf7b0a3d3b", "size": 3734, "ext": "py", "lang": "Python", "max_stars_repo_path": "helios/layouts/force_directed.py", "max_stars_repo_name": "fury-gl/helios", "max_stars_repo_head_hexsha": "14e39e0350b4b9666775ba0c4840d2e9887678c2", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np, pandas as pd from scipy import stats """ Notes on Analysis: - we have mean, se, & worst on radius, texture, perimeter, area, smoothness, compactness, concavity, concave points, symmetry, fractal dimensions 1st preprocessing: normalize each columns using z-score """ print("Import data") df = pd...
{"hexsha": "0da2013ae98f721642c9b166bc24b9b3e83bef63", "size": 750, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing.py", "max_stars_repo_name": "jayliu99/bcbn", "max_stars_repo_head_hexsha": "6ec0977299c66c224877ec953b64d34f9b74c6f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import cv2 import time import numpy as np import pose_module as pm import pandas as pd import matplotlib.pyplot as plt import seaborn as sns class Video: def __init__(self, video_path: str): """ :param video_path: path of video to analyse Object video has poseDetector inner or nested class...
{"hexsha": "9141e205a6eb77b5cdd6e57a3483746e5abeca4f", "size": 5588, "ext": "py", "lang": "Python", "max_stars_repo_path": "video_pose.py", "max_stars_repo_name": "lucamagnasco/human_pose_test", "max_stars_repo_head_hexsha": "c2041fa35f9150c262e91b4b1fc342f53518d4e9", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
module Mod_TempeDriver use typre use MPI use Mod_BroadCastBuffer use Mod_Listen use Mod_caseVariables use Mod_PhysicalProblemDriver use Mod_PhysicalProblem use Mod_DistributedContainer use Mod_DC_ip use Mod_DC_rp use Mod_InChannel use Mod_MasterVariables use Mod_Temp...
{"hexsha": "015108b48aff4c029ffa0b442d5b3f3ed7de235b", "size": 10185, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Sources/master/Drivers/PhysicalProblems/Mod_TempeDriver.f90", "max_stars_repo_name": "ciaid-colombia/InsFEM", "max_stars_repo_head_hexsha": "be7eb35baa75c31e3b175e95286549ccd84f8d40", "max_star...
function decompose(_dataset::AbstractVTKStructuredData, target::String = "Faces", decompose_cell_data = false) dataset = VTKStructuredData(_dataset) _dim = dim(dataset) if decompose_cell_data if target == "Faces" if _dim == 2 return decompose_to_faces_2d_with_cell_data(d...
{"hexsha": "018705362da80b5a1ddfdc14ef79e0143c7a7f09", "size": 33531, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/decompose_struct.jl", "max_stars_repo_name": "mohamed82008/VTKDataTypes.jl", "max_stars_repo_head_hexsha": "f1434139863b5d2c6b46f0c0d133dca56993c1b3", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma InvariantsAfterAddClause: fixes state::State and clause :: Clause and Vbl :: "Variable set" assumes "InvariantConsistent (getM state)" "InvariantUniq (getM state)" "InvariantWatchListsContainOnlyClausesFromF (getWatchList state) (getF state)" and "InvariantWatchListsUniq (getWatchList state)" ...
{"llama_tokens": 385976, "file": "SATSolverVerification_Initialization", "length": 456}
# Eric Xu, 2019-09 ###### PACKAGES ###### import pandas as pd import logging import time import dateutil.parser import flask import numpy as np from functools import wraps from flask import Flask, request, Response, render_template import numpy as np import math from flask_limiter import Limiter from flask_limiter.uti...
{"hexsha": "c29a0e4d6cefb8ee8924a10b5f7a8e119b8bf22c", "size": 2454, "ext": "py", "lang": "Python", "max_stars_repo_path": "subscription_service.py", "max_stars_repo_name": "eric-xu-ownerIQ/klaviyo-weather-app", "max_stars_repo_head_hexsha": "aa01332f18b1fe6ca3a6df2a6d7f2ae304f001d4", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorlayerx import tensorlayerx as tlx from tests.utils import CustomTestCase import numpy as np class Layer_BinaryLinear_Test(CustomTestCase): @classmethod def setUpClass(self): ...
{"hexsha": "d3f12fbccf184a06268e049f718b76d43d2b2605", "size": 4810, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/layers/test_layers_linear.py", "max_stars_repo_name": "tensorlayer/TensorLayerX", "max_stars_repo_head_hexsha": "4e3e6f13687309dda7787f0b86e35a62bb3adbad", "max_stars_repo_licenses": ["Apach...
"""test_production.py This contains validation scripts comparing circuit-based Z2 simulation to Erik's numerics code. To run the pre-arranged test suite just call python3 -m pytest test_production.py Alternatively, you can arrange a custom test suite using the __name__==__main__ logic at the end of this module....
{"hexsha": "15bb3edf95603300677fcbc92a92c46e2a34f062", "size": 8018, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_production.py", "max_stars_repo_name": "Fermilab-Quantum-Science/Z2Sim-public", "max_stars_repo_head_hexsha": "dfbefffd933aa2e39a0cb9f668b424596dfa7d35", "max_stars_repo_licenses": ["MI...
[STATEMENT] lemma run_snth: assumes "run r p" shows "enabled (r !! k) (target (stake k r) p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. enabled (r !! k) (target (stake k r) p) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: run r p goal (1 subgoal): 1. enabled (r !! k) (target (st...
{"llama_tokens": 176, "file": "Transition_Systems_and_Automata_Transition_Systems_Transition_System_Extra", "length": 2}
/* vim: set tabstop=4 expandtab shiftwidth=4 softtabstop=4: */ /** * \file boost/numeric/ublasx/operation/abs.hpp * * \brief Apply the \c std::abs function to a vector or matrix expression. * * \author Marco Guazzone (marco.guazzone@gmail.com) * * <hr/> * * Copyright (c) 2010, Marco Guazzone * * Distribute...
{"hexsha": "7912ddd63fe2d2e4dae911667903bb748fb3ef2f", "size": 3930, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/numeric/ublasx/operation/abs.hpp", "max_stars_repo_name": "sguazt/boost-ublasx", "max_stars_repo_head_hexsha": "21c9b393d33a6ec2a8071ba8d48680073d766409", "max_stars_repo_licenses": ["BSL-1.0"...
(AxisVector{T, A, SVector{1, T}} where {T})( a::Real, ::LocalGeometry, ) where {A} = AxisVector(A.instance, SVector(a)) # standard conversions ContravariantVector(u::ContravariantVector, ::LocalGeometry) = u CovariantVector(u::CovariantVector, ::LocalGeometry) = u LocalVector(u::LocalVector, ::LocalGeometry) =...
{"hexsha": "c82a0e4324c7756f0820b9171b5a0821a0a93a7c", "size": 14062, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Geometry/conversions.jl", "max_stars_repo_name": "CliMA/ClimaCore.jl", "max_stars_repo_head_hexsha": "e28309249a4c0dea0e8bb897b4dc9ebc376fa94e", "max_stars_repo_licenses": ["Apache-2.0"], "max...
#!/usr/bin/env python3 import argparse import sys import pandas as p import numpy as np from numpy.random import RandomState from scipy.optimize import minimize_scalar from numpy.random import RandomState from scipy.stats import chi2 from collections import defaultdict from scipy.special import gammaln #class to perfo...
{"hexsha": "80be5c44a2e75a685eb4a59c312586c10ea809dd", "size": 10549, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Variant_eval.py", "max_stars_repo_name": "MatthewWolff/DESMAN", "max_stars_repo_head_hexsha": "3f683e75830c4862b5f2c7577ef31b4cc86bdd61", "max_stars_repo_licenses": ["BSD-2-Clause-FreeBSD...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import os import numpy as np import boto3 import time import sagemaker import sagemaker.session from sagemaker.workflow.parameters import ParameterInteger, ParameterString from sagemaker.sklearn.processing import SKLe...
{"hexsha": "e1904458e9960fc48085767b14f0b32283301954", "size": 7516, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cloud/pipelines/semantic_segmentation/pipeline.py", "max_stars_repo_name": "aws-samples/amazon-sagemaker-edge-defect-detection-computer-vision", "max_stars_repo_head_hexsha": "61d762ef43a59a5e...
[STATEMENT] lemma (in Module) lin_span_sub_carrier:"\<lbrakk>ideal R A; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> linear_span R M A H \<subseteq> carrier M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ideal R A; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> linear_span R M A H \<sub...
{"llama_tokens": 2285, "file": "Group-Ring-Module_Algebra7", "length": 15}
SUBROUTINE CLUKM(X,NX,N,NATT,NCLUST,IASSGN,LIST,NUM,SS,MAXIT, * IWORK,RW,NW) C*********************************************************************** C* * C* FORTRAN CODE WRITTEN FOR INCLUSION IN IBM RESEARCH REPORT RC20525, * C* 'FORTRAN...
{"hexsha": "aeb4d4a620165729e5f0a11bf489b7836a2a6c1b", "size": 5383, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "contrib/lmoments/Src/clukm.for", "max_stars_repo_name": "xylar/cdat", "max_stars_repo_head_hexsha": "8a5080cb18febfde365efc96147e25f51494a2bf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
""" permutation-flowshop repository Module that implements constructive heuristics for the flowshop scheduling problem. """ import random import numpy as np def NEH(solution, tie_breaking=False, order_jobs="SD"): """Create initial solution with NEH heuristic. Apply the Nawaz, Enscore and Hans heuristic (198...
{"hexsha": "c9f6723e641d91fe154c6bc846eb771b832fc7a0", "size": 2399, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/constructive_heuristic.py", "max_stars_repo_name": "sukanyakudva/permutation-flowshop", "max_stars_repo_head_hexsha": "11ac52f309cf443da9bff5a11b9e83602fdae84a", "max_stars_repo_licenses": ["M...
import datetime import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn import cross_validation from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report from sklearn.metrics import confus...
{"hexsha": "d5bd87f189968255cc85d71e1498df14242a236c", "size": 2991, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/mlservice/classes/protomodel.py", "max_stars_repo_name": "hamed225/Channel-Sensor-Error-Detection", "max_stars_repo_head_hexsha": "12aba311c4334fec2fbbe0a69e0c764d6db5988c", "max_stars_repo_l...
from __future__ import (absolute_import, division, print_function, unicode_literals) import batman import numpy as np from .cache import planet_props from .limbdarkening import quad __all__ = ['kic_to_params', 'transit_model'] def kic_to_params(kic): """ For a KIC number ``kic``, re...
{"hexsha": "b4fa88d3d6199fb932c51c6519b6cfc658b4fc4b", "size": 3801, "ext": "py", "lang": "Python", "max_stars_repo_path": "salter/params.py", "max_stars_repo_name": "bmorris3/salter", "max_stars_repo_head_hexsha": "f7471aa074fb9fdd024ba2f4dc7ac51ae9180093", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import cv2 import numpy as np from pathlib import Path import json from settings_folder import settings_folder circles_detection_file = f'{settings_folder}circles_detection_data.txt' def nothing(_): pass def get_circles(image): cv2.namedWindow('Circle detection') erosion = 0 minDist = 10 param1 ...
{"hexsha": "ec1c6fe5ae087186cb087fe8845da7ebe5f6dee9", "size": 4686, "ext": "py", "lang": "Python", "max_stars_repo_path": "circles_calibration.py", "max_stars_repo_name": "Dikzamen/dbd_bloodweb_python", "max_stars_repo_head_hexsha": "51c13a917d49740f15fdb38189308851a1369e63", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma sub_point_rep_number_le: "x \<in> \<U> \<Longrightarrow> \<A> rep x \<le> \<B> rep x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<in> \<U> \<Longrightarrow> \<A> rep x \<le> \<B> rep x [PROOF STEP] by (simp add: point_replication_number_def blocks_subset multiset_filter_mono size_mset_mono)
{"llama_tokens": 129, "file": "Design_Theory_Sub_Designs", "length": 1}
import Dates import HTTP import JSON function compare_http_date_header(header_value::String, timestamp_request_completed::Dates.DateTime) :: Nothing header_value_timestamp::Dates.DateTime = Dates.DateTime(split(header_value, " UTC")[1], "e, d u Y H:M:S") @test header_value_timestamp <= timestamp_request_compl...
{"hexsha": "326490d3c9e6c8aab8e77afaca9ca74a61b1f1b2", "size": 1685, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/utils/request.jl", "max_stars_repo_name": "DanceJL/Flamenco.jl", "max_stars_repo_head_hexsha": "c0d16201f3265d2b265b6114e5af07555a467720", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Simple Linear Regression ======================== See `LinearRegression <http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html>`_. """ import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression def plot_linear_regression(): a = ...
{"hexsha": "b799b8b48b1368a36b67073ade9931539af7a66f", "size": 868, "ext": "py", "lang": "Python", "max_stars_repo_path": "_doc/examples/sklearn_ensae_course/plot_linear_regression.py", "max_stars_repo_name": "Jerome-maker/ensae_teaching_cs", "max_stars_repo_head_hexsha": "43ea044361ee60c00c85aea354a7b25c21c0fd07", "ma...
""" calc_grm() --- Merge imputed data and calculate GRM. e.g., two.bed + norge.bed, or, dutch.bed, german.bed, norge.bed """ function calc_grm(source) title("Data imputed within country") cd(work_dir) fra = joinpath(work_dir, "data/genotypes/step-8.plk") ped = joinpath(work_dir, "data/pedigree"...
{"hexsha": "ded30e2cbbbed119a3069986fc3191542ee788a2", "size": 14019, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/grm/calc-grm.jl", "max_stars_repo_name": "xijiang/ReDiverse.jl", "max_stars_repo_head_hexsha": "02212b981934b43997b942a78ea8e6f7ac1b9fa4", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
! ! Copyright © 2011 The Numerical Algorithms Group Ltd. All rights reserved. ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions are ! met: ! - Redistributions of source code must retain the above copyright n...
{"hexsha": "498593b19933250f0d2660337d73deb4d35f6e2b", "size": 19427, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "control/plasma_f90.f90", "max_stars_repo_name": "zhuangsc/Plasma-ompss1", "max_stars_repo_head_hexsha": "bcc99c164a256bc7df7c936b9c43afd38c12aea2", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
[STATEMENT] lemma O'_O: assumes "Orig.validFrom s tr" and "Orig.reach s" shows "Prime.O (translateTrace tr) = translateO (Orig.O tr)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. O (translateTrace tr) = translateO (Orig.O tr) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: Orig.validFrom s tr Orig...
{"llama_tokens": 2115, "file": "BD_Security_Compositional_Transporting_Security", "length": 13}
#! /usr/bin/env python import os import logging import re import pathlib from datetime import date, datetime from collections import namedtuple import time as timer import scipy.io as spio import numpy as np import pandas as pd import decimal import warnings import datajoint as dj from pybpodgui_api.models.project ...
{"hexsha": "1d119e13fd297645eceb215fa081e4b3546bcaf1", "size": 71298, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline/ingest/behavior.py", "max_stars_repo_name": "Yambottle/map-ephys", "max_stars_repo_head_hexsha": "bea24e29070a53ad97561a66d30a12fc4d8e5409", "max_stars_repo_licenses": ["MIT"], "max_star...
import cv2 as cv import numpy as np img = cv.imread("img.png",0) img = cv.GaussianBlur(img,(9,9),10) th2 , ret2 = cv.threshold(img,0,255,cv.THRESH_BINARY + cv.THRESH_OTSU) kernel = np.ones((5,5)) ret2 = cv.morphologyEx(ret2, cv.MORPH_OPEN, kernel) ret2 = cv.dilate(ret2 , kernel,50) cv.imshow("the",ret2) ...
{"hexsha": "903434185fa9189a5a59b7911f75378f87f9af50", "size": 887, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab 10/main.py", "max_stars_repo_name": "AbdulMoeed-140212/DIP-Labs", "max_stars_repo_head_hexsha": "0b083e381ef9f9e2a780dc64ef6a4f04bcde6946", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
subroutine nut_nrain !! ~ ~ ~ PURPOSE ~ ~ ~ !! this subroutine adds nitrate from rainfall to the soil profile !! ~ ~ ~ INCOMING VARIABLES ~ ~ ~ !! name |units |definition !! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ !! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~...
{"hexsha": "f92774bf788325a2ded70fa878b8bebbf76c9680", "size": 3183, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/data/program_analysis/multifile_multimod/mfmm_02/nut_nrain.f90", "max_stars_repo_name": "mikiec84/delphi", "max_stars_repo_head_hexsha": "2e517f21e76e334c7dfb14325d25879ddf26d10d", "max_st...
import numpy as np from scipy.interpolate import UnivariateSpline from scipy.optimize import fmin_slsqp from quantecon import MarkovChain from scipy.optimize import root class RecursiveAllocation: ''' Compute the planner's allocation by solving Bellman equation. ''' def __init__(self, model, μgr...
{"hexsha": "c02e16421c500e8eaa6892b02ccc4d94bab1d376", "size": 9244, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/_static/lecture_specific/opt_tax_recur/recursive_allocation.py", "max_stars_repo_name": "gliptak/lecture-source-py", "max_stars_repo_head_hexsha": "6d8fc91acc6668f31e5c163991db7dedb133b8b7"...
""" helper utility to work with global map / map layout""" import os import numpy import matplotlib.pyplot as plt import networkx as nx from scipy.misc import imread from utils import root def plot_map(): """ Older utility, new stuff should use GlobalMap.plot() """ filename = os.path.join(root, 'flash', 'f...
{"hexsha": "45a22f488444d8fe422ea119d597e45b55700377", "size": 1899, "ext": "py", "lang": "Python", "max_stars_repo_path": "planning/astar/global_map.py", "max_stars_repo_name": "opikalo/pyfire", "max_stars_repo_head_hexsha": "1a56a39532e1a1d6ca938f46ca5f8eb09fb43957", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# make sure the rest of the ABXpy package is accessible import os import sys package_path = os.path.dirname( os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) if not(package_path in sys.path): sys.path.append(package_path) # remove this dependency to ABXpy and create separate repository for this ? ...
{"hexsha": "142aa6cad0919db08b6a602125658adad8ccd5fd", "size": 3912, "ext": "py", "lang": "Python", "max_stars_repo_path": "ABXpy/database/database.py", "max_stars_repo_name": "elinlarsen/ABXpy", "max_stars_repo_head_hexsha": "7b254b99d6ce3f386f45d3da9c92cd45720dd9dd", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Imports import numpy as np import sys sys.path.append('../stationsim/') from ensemble_kalman_filter import EnsembleKalmanFilter from ensemble_kalman_filter import EnsembleKalmanFilterType # from ensemble_kalman_filter import ActiveAgentNormaliser from stationsim_gcs_model import Model # Functions def make_observa...
{"hexsha": "21d7edcbdc438919d2906718e458c5c95423714b", "size": 2663, "ext": "py", "lang": "Python", "max_stars_repo_path": "Projects/ABM_DA/tests/utils.py", "max_stars_repo_name": "Urban-Analytics/dust", "max_stars_repo_head_hexsha": "952ca8991ac1f7ff65387a1b21a3fd36cf98314a", "max_stars_repo_licenses": ["MIT"], "max_s...
include("functions/GenerateCareerPaths.jl") using Compose, GraphPlot FirstLevel = Vector{AbstractLevel}() g = DiGraph(4) # 1 => world add_edge!(g, 1, 2) #add_edge!(g, 1, 4) # 2 => 1B-BDL add_edge!(g, 2, 3) add_edge!(g, 2, 4) #add_edge!(g, 2, 5) #add_edge!(g, 2, 6) push!(FirstLevel, AcademicLevel("1B-BDL", next = ["...
{"hexsha": "ebf53f3343815853a6214cffc0a4595a59cb572b", "size": 2062, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TempTestsSmall.jl", "max_stars_repo_name": "Omazaria/CareerPathBeDef", "max_stars_repo_head_hexsha": "da5b1cc1a70382444a348da82725d4cfe670d3c9", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-1, 1, 50) y1 = 2*x + 1 y2 = x**2 # 生成窗口来显示图像 plt.figure() plt.plot(x, y1) # 生成新的窗口来显示图像 plt.figure(num=3, figsize=(4,4)) l1, = plt.plot(x, y2, label="y=2*x+1") l2, = plt.plot(x, y1, color='r', linewidth=1.0, linestyle='--', label='y=x**2') # 设置x轴显...
{"hexsha": "b1a6dbc33adf0e2236224ba393bba3d762d87e7f", "size": 1658, "ext": "py", "lang": "Python", "max_stars_repo_path": "matplotlib/sample_matplotlib.py", "max_stars_repo_name": "zjhdota/practice", "max_stars_repo_head_hexsha": "de28003e7adf6140dfc06a1ffa3a808e514dbbc0", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy import sklearn.ensemble try: from typing import OrderedDict except ImportError: from typing import MutableMapping as OrderedDict class RandomForestClassifier: def __init__(self, **kwargs): self.clf = sklearn.ensemble.RandomForestClassifier(**kwargs) def __call__(self, raw: numpy...
{"hexsha": "e45c6b38d8590a09398eef706a41bfb0a79d57a3", "size": 781, "ext": "py", "lang": "Python", "max_stars_repo_path": "bioimageio/sklearn/models.py", "max_stars_repo_name": "k-dominik/python-bioimage-io", "max_stars_repo_head_hexsha": "aecaa3412c31672ce159335db083ee9fb4fca519", "max_stars_repo_licenses": ["MIT"], "...
from numpy import arange from bokeh.plotting import figure, show x = arange(1, 4.5, 0.25) y = 1 / x plot = figure(height=200) plot.circle(x, y, fill_color="blue", size=5) plot.line(x, y, color="darkgrey") plot.xaxis.axis_label = "Resistance" plot.xaxis.ticker = [1, 2, 3, 4] plot.yaxis.axis_label = "Current at 1 V" ...
{"hexsha": "4af6a64f61e29cb76d67da33772cf096304c831f", "size": 464, "ext": "py", "lang": "Python", "max_stars_repo_path": "sphinx/source/docs/user_guide/examples/styling_math_text_latex_tick_labels.py", "max_stars_repo_name": "Suicoleiro/bokeh", "max_stars_repo_head_hexsha": "a212acdf091a7a4df639fa9d443be6ade0018039", ...
import argparse import numpy as np import pandas as pd from sklearn import preprocessing from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection import train_test_split from nltk.tokenize import word_tokenize #this function uses the train data to create a dictionary, which contains w...
{"hexsha": "2f65920b601e3fd84da6dd05687ed61affa3a498", "size": 3663, "ext": "py", "lang": "Python", "max_stars_repo_path": "binary_data_creation.py", "max_stars_repo_name": "simonmarty/data-mining-project", "max_stars_repo_head_hexsha": "4801be11c29bea7f05e7b499babf67cc37584098", "max_stars_repo_licenses": ["MIT"], "ma...
#-*- coding:utf-8 -*- import torch from torchvision import transforms import cv2 from PIL import Image, ImageOps import numpy as np class MultiViewDataInjector(): def __init__(self, transform_list): self.transform_list = transform_list def __call__(self, sample): output = [transform(sample).uns...
{"hexsha": "7635389fc0335626aa9aec3710d32f29934c0fca", "size": 2222, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/byol_transform.py", "max_stars_repo_name": "SuhongMoon/BYOL-PyTorch", "max_stars_repo_head_hexsha": "fa8eea6c4cc65436aa458a1a48c79fd0d9d46d51", "max_stars_repo_licenses": ["MIT"], "max_stars_...
clc; close all %% which one to show? idx = 24; coordIndices = [1,2,3]; imgFig1 = figure(1); set(imgFig1, 'Position', [100 100 1400 900]) % [1 1 width height] subplot(2,2,1); imagesc(imgMat(:,:,:,idx)); axis off image; subplot(2,2,2); imagesc(instanceMaskMat(:,:,:,idx)); axis off image; subplot(2,2,3); A = (predInstan...
{"author": "aimerykong", "repo": "Recurrent-Pixel-Embedding-for-Instance-Grouping", "sha": "748ade6b969c7861c2a9009cd0f0ffb27004677c", "save_path": "github-repos/MATLAB/aimerykong-Recurrent-Pixel-Embedding-for-Instance-Grouping", "path": "github-repos/MATLAB/aimerykong-Recurrent-Pixel-Embedding-for-Instance-Grouping/Re...
#Hasan Avcı 170401035 from sympy import Symbol,pprint file = open("veriler.txt", "r") data = file.readlines() for i in range(len(data)): data[i] = int(data[i]) def detectPolynominal(m1, m2, m3, m4, m5, m6): if m1 > m6 and m1 > m5 and m1 > m4 and m1 > m3 and m1 > m2: print(str(m1) + " en uygun 1. poli...
{"hexsha": "ad60904106c4e2de6211f8ed6a7e5e05bc8113f0", "size": 5286, "ext": "py", "lang": "Python", "max_stars_repo_path": "final/170401035.py", "max_stars_repo_name": "yigitcanustek/blm2010", "max_stars_repo_head_hexsha": "2e86dab3fc225a7679b6c660fb01902423476a94", "max_stars_repo_licenses": ["Unlicense"], "max_stars_...
from sklearn.datasets import load_boston from tqdm import tqdm from sklearn.utils import shuffle, resample import numpy as np from xhp_flow.nn.node import Placeholder,Linear,Sigmoid,ReLu,Leakrelu,Elu,Tanh,LSTM from xhp_flow.optimize.optimize import toplogical_sort,run_steps,forward,save_model,load_model,Auto_update_lr,...
{"hexsha": "fe98652eabeaf0e0efb57589c4365ddd56e2dfda", "size": 4791, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/LSTM.py", "max_stars_repo_name": "xhpxiaohaipeng/xhp_flow_frame", "max_stars_repo_head_hexsha": "903b67bee0fa56373ce8751ca604b601ab8be8fd", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" NE method: naively combine AttrPure and DeepWalk (AttrComb) by Chengbin Hou 2018 """ import numpy as np from . import node2vec from .utils import dim_reduction class ATTRCOMB(object): def __init__(self, graph, dim, comb_method='concat', comb_with='deepWalk', number_walks=10, walk_length=80, window=10, work...
{"hexsha": "954306fac28279f0a092e57cf7e28328af9758e0", "size": 4399, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/libnrl/attrcomb.py", "max_stars_repo_name": "houchengbin/OpenANE", "max_stars_repo_head_hexsha": "d608cb3ece77f45f417d85aad257767ac209f206", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import rospy import ros_numpy import numpy as np import copy import json import os import sys import torch import time from std_msgs.msg import Header import sensor_msgs.point_cloud2 as pc2 from sensor_msgs.msg import PointCloud2, PointField from jsk_recognition_msgs.msg import BoundingBox, BoundingBoxArray from pyq...
{"hexsha": "b514bf323bb801b9fdd15d38ea3182afcb24dee4", "size": 9443, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/single_infernece_ros.py", "max_stars_repo_name": "xyupeng/CenterPoint", "max_stars_repo_head_hexsha": "091f4245da1c1b6b9b2f057b4256e415d983ed1b", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/python # -*- coding utf-8 -*- # # Hyperbel - Klasse von agla # # # This file is part of agla # # # Copyright (c) 2019 Holger Böttcher hbomat@posteo.de # # # Licensed under the Apache License, V...
{"hexsha": "2081d19f6317ce815665e436e2b633c2af554383", "size": 20113, "ext": "py", "lang": "Python", "max_stars_repo_path": "agla/lib/objekte/hyperbel.py", "max_stars_repo_name": "HBOMAT/AglaUndZufall", "max_stars_repo_head_hexsha": "3976fecf024a5e4e771d37a6b8056ca4f7eb0da1", "max_stars_repo_licenses": ["Apache-2.0"], ...
module EdgeTest using Test using ForneyLab: Interface, Edge, Variable, Interface, FactorNode, FactorGraph, currentGraph, addNode!, disconnect!, generateId # Integration helper mutable struct MockNode <: FactorNode id::Symbol interfaces::Vector{Interface} i::Dict{Symbol,Interface} function MockNode(; ...
{"hexsha": "9fd5f3a9d505132990a83bdd9ddb59057aaf429f", "size": 1602, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_edge.jl", "max_stars_repo_name": "chmathys/ForneyLab.jl", "max_stars_repo_head_hexsha": "30933f28f9fe3aaaf343547a76a309314ea982cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import sys import colorsys import os import numpy as np import matplotlib.patches as mpatches import matplotlib.pyplot as plt from scipy import stats from itertools import combinations from scipy.stats import ks_2samp from matplotlib.lines import Line2D from lokki.lib import PipelineComponents # Description: Retu...
{"hexsha": "9921659ddb4ea529c9b9916e68c370462a4b6446", "size": 14081, "ext": "py", "lang": "Python", "max_stars_repo_path": "lokki/visualize/enrichment.py", "max_stars_repo_name": "bzhanglab/Lokki", "max_stars_repo_head_hexsha": "035087d58f2b194b3a1644b932683ded0fb71af4", "max_stars_repo_licenses": ["Apache-2.0"], "max...
#!/usr/bin/env python """ find minimum and maximum, stats in an HDF5 variable """ from pathlib import Path import h5py import numpy as np import warnings from argparse import ArgumentParser def main(): p = ArgumentParser() p.add_argument('fn', help='HDF5 filename') p.add_argument('var', help='HDF5 variabl...
{"hexsha": "9b095dac5d5472a2704f78e6dde5ff2ea84bc7ca", "size": 1010, "ext": "py", "lang": "Python", "max_stars_repo_path": "hdf5stats.py", "max_stars_repo_name": "scienceopen/cvhst", "max_stars_repo_head_hexsha": "0613fdcc11cd086cdd375aae05677b33bfbbcfd0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 6...
# Copyright 2019 Xanadu Quantum Technologies Inc. # 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 agre...
{"hexsha": "58de699eb6c0bd1e8132577ccd69364c14fc42a6", "size": 13911, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/gbs/test_sample.py", "max_stars_repo_name": "rajeshkumarkarra/strawberryfields", "max_stars_repo_head_hexsha": "138d8459fe773a9d645569d7af3ecd1f86e65f5a", "max_stars_repo_licenses": ["Apach...
""" Example configurations for the models that worked well """ import enum from typing import Dict import numpy as np from reconstruction.model.bunny import FixedBunny from reconstruction.model.dragon import Dragon from reconstruction.model.model_mesh import MeshModelLoader from reconstruction.model.model_pts import ...
{"hexsha": "2225f3eaf9ecba08c4f1ebffb438975afcae45f1", "size": 1688, "ext": "py", "lang": "Python", "max_stars_repo_path": "example.py", "max_stars_repo_name": "mickare/Robust-Reconstruction-of-Watertight-3D-Models", "max_stars_repo_head_hexsha": "c3afd98a8732c0447c153d38bfcefb5c4441bc7b", "max_stars_repo_licenses": ["...
import time import numpy as np from sklearn.metrics import (accuracy_score, confusion_matrix, f1_score, precision_score, recall_score) def classify_folds(clf, X, Y, folds): """Performs the full-learning procedure (training, testing and metrics). Args: clf (Classifier): A...
{"hexsha": "2d1ea5ae99e537b774b3c7e98a3abd77c2dee476", "size": 5618, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/wrapper.py", "max_stars_repo_name": "malvesbertoni/ensemble_opf", "max_stars_repo_head_hexsha": "d36289e19db1ac9c55f3b404f90ba1894fc0e62a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np class ActionFreeReplayBuffer(): def __init__(self, observation, observation_img, observation_img_raw, done): self.n = len(observation) - 1 self.observation = observation self.observation_img = observation_img self.observation_img_raw = observation_img_raw ...
{"hexsha": "f407ebb101f5156929de766ead4064941838af88", "size": 1720, "ext": "py", "lang": "Python", "max_stars_repo_path": "RLV/torch_rlv/utils/action_free_buffer.py", "max_stars_repo_name": "simonr98/Reinforcement-Learning-with-Videos", "max_stars_repo_head_hexsha": "e40cec6b8d817276375e940696b290fc4e1e8bc7", "max_sta...
# This is a Python port of Joy's affinity maturation flexibility code # available at: https://github.com/jlouveau/Toy_Model_for_John import csv import sys import os import importlib import numpy as np # numerical tools from copy import deepcopy # deepcopy copies a dat...
{"hexsha": "4fbc7977bcaba625bd6283115eab6f2e5cb1fb23", "size": 34329, "ext": "py", "lang": "Python", "max_stars_repo_path": "Mixture.py", "max_stars_repo_name": "vanouk/Affinity-Maturation-PNAS", "max_stars_repo_head_hexsha": "43839ef01c7164914eb8ef7b338d2a7b1ba769d2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from __future__ import print_function from __future__ import division import click import os import json import numpy as np import matplotlib.pyplot as plt def visualize_test_evaluation(input_file, output_folder, experiment_title = ''): assert os.path.isfile(input_file) with open(input_file) as infile: ...
{"hexsha": "2568acffc8448e974a76a6cfbfb678510a94b1da", "size": 1924, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/tools/visulization.py", "max_stars_repo_name": "jingkunchen/MS-CMR_miccai_2019", "max_stars_repo_head_hexsha": "ce4b67e017c0891533efadbdce4947b1c4821d6c", "max_stars_repo_licenses": ["MIT"],...
import os from flask import Flask, request, render_template from numpy.lib.polynomial import poly from werkzeug.utils import secure_filename import base64 import cv2 import numpy as np from model import Model import glob import argparse import tifffile as tiff app = Flask(__name__) app.config['UPLOAD_IMAGES'] = 'uploa...
{"hexsha": "50d4a2eed79040643823b1bdb578c9cc858d4bae", "size": 8988, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo_server/app.py", "max_stars_repo_name": "abcxs/polyrnn", "max_stars_repo_head_hexsha": "92eee689fe62585529deb1c44fbf1c889f414fa2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
# TODO add ToroidalGeometry, LinearGeometry and other structs that let you pick parameters (like Toroidal parameters to define a plasma)
{"hexsha": "1267474fe0097736fb0adc2675c8779f4873a3f0", "size": 136, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/geometry.jl", "max_stars_repo_name": "SebastianM-C/Plasma.jl", "max_stars_repo_head_hexsha": "e01f53c4ffa08f81971db9a04ee43f5f6d4abdf0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 21...
# This is an approximate model of an acceleration controlled differential drive. # The angular velocities and the orientation are updated using their closed form # expression, the position along x and y axes are updated with the midway constant # angular velocities. The error in this heuristic increases with time and #...
{"hexsha": "d017d4ed0f5be083549f5f5f9c3ca863416ac353", "size": 2691, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "model/AccelerationControlledDifferentialDrive.jl", "max_stars_repo_name": "grgomrton/robot-model", "max_stars_repo_head_hexsha": "e3c4fb37919a6cadc091a434d692e8f77bd809c6", "max_stars_repo_licenses...
# -*- mode: python; coding: utf-8 -* # Copyright (c) 2022 Radio Astronomy Software Group # Licensed under the 3-clause BSD License """ Estimate scalings on different axes from profiling data. NB: This script cannot tell the difference between lines that are hit once and axes with length 1. It is only usefu...
{"hexsha": "e0f93fda7f2eff9a526e6b2a49475b5cbc36535b", "size": 1907, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarking/analyze_runtimes.py", "max_stars_repo_name": "HERA-Team/pyuvsim", "max_stars_repo_head_hexsha": "d5ae72b06e4bad07433c3fc8073bebb43a3be399", "max_stars_repo_licenses": ["BSD-3-Clause"]...
C**************************************************************** C C File: out_cmde.f C Purpose: Routine to solve COMMON-MODE-OUTAGE C C Author: Walt Powell Date: 7 Mar 1995 C Modified: C Called by: apsoln C C*********************************************************...
{"hexsha": "d3cc425db15abeeefd5a8e9c40a39c8fa7bbba87", "size": 6974, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/out_cmde.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14,...
# -*- coding: utf-8 -*- """ Project: neurohacking File: helpers.py Author: wffirilat """ import numpy as np from numpy.fft import fft, rfft import plugin_interface as plugintypes from open_bci_v3 import OpenBCISample class PluginHelpers(plugintypes.IPluginExtended): def __init__(self): self.packetnum = ...
{"hexsha": "8620a278157169d2532fc920a61686f7c5d4aa59", "size": 1641, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/helpers.py", "max_stars_repo_name": "wffirilat/Neurohacking", "max_stars_repo_head_hexsha": "4407566ddb1b4a19a27f585a0050ab04b2bc5efe", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
/* High Performance Astrophysical Reconstruction and Processing (HARP) (c) 2014-2015, The Regents of the University of California, through Lawrence Berkeley National Laboratory. See top level LICENSE file for details. */ // Test that we can instantiate our plugin. #include <iostream> #include <cstdio> #incl...
{"hexsha": "eb3314bd78101b0ad193eb2ae1dc9fe4f6b46fdb", "size": 1320, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "plugin_example/harp_mpi_example.cpp", "max_stars_repo_name": "tskisner/HARP", "max_stars_repo_head_hexsha": "e21435511c3dc95ce1318c852002a95ca59634b1", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL...
function PascalDistribution(arg0::jint, arg1::jdouble) return PascalDistribution((jint, jdouble), arg0, arg1) end function cumulative_probability(obj::PascalDistribution, arg0::jint) return jcall(obj, "cumulativeProbability", jdouble, (jint,), arg0) end function get_number_of_successes(obj::PascalDistribution...
{"hexsha": "9c5959395cc59c93e500896a9bd13774605cff2a", "size": 1356, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/HipparchusWrapper/DistributionWrapper/DiscreteWrapper/pascal_distribution.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471dab...
#include "Media/MediaSinkPad.h" #include "Media/IMediaFilter.h" #include <boost/foreach.hpp> //SharedMediaFormat MediaSinkPad::accept(SharedMediaPad sourcePad, SharedMediaFormat format) //{} // //SharedMediaFormat MediaSinkPad::onAccept(SharedMediaPad sourcePad, SharedMediaFormat format) //{ // SharedMediaFormats sour...
{"hexsha": "8377d37d54fc1dc4852429a733d433f9b7fa6ead", "size": 3824, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sdk/Media/MediaSinkPad.cpp", "max_stars_repo_name": "InfiniteInteractive/LimitlessSDK", "max_stars_repo_head_hexsha": "cb71dde14d8c59cbf8a1ece765989c5787fffefa", "max_stars_repo_licenses": ["MIT"], ...
#include <boost/asio/bind_executor.hpp> #include <boost/asio/signal_set.hpp> #include <cstdlib> #include <memory> #include <thread> #include <vector> #include "http_listener.h" int main(int argc, char *argv[]) { auto const address = boost::asio::ip::make_address("0.0.0.0"); auto const port = 8080; auto con...
{"hexsha": "05d7ab8c0c815c4336b4d661c8270e28083d37b1", "size": 1445, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "jeprof_in_use/src/main.cpp", "max_stars_repo_name": "phantom9999/mithril", "max_stars_repo_head_hexsha": "d7c5ff22a6396a77f7f92a1ee20706573e065c13", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# -*- coding:utf-8 -*- # @author leone # @desc 摄像头实时人脸识别 # @version 2018-12-13 import cv2 import dlib import numpy as np import pandas as pd # 人脸识别模型,提取 128D 的特征矢量 face_recognition_model = dlib.face_recognition_model_v1("../data/data_dlib/dlib_face_recognition_resnet_model_v1.dat") # 计算两个向量间的欧式距离 def return_euclid...
{"hexsha": "c2f1e595271b4f3ed787f0a5d7a1f6a0ff3932a9", "size": 4350, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/recognition_from_camera.py", "max_stars_repo_name": "janlle/dlib-face-recognition", "max_stars_repo_head_hexsha": "394b3665612dd98d5a9104545b1efa55b146e52b", "max_stars_repo_licenses": ["Apach...
import math import os import numpy as np from file_handling import binary_classes from margrie_libs.signal_processing.metadata_handling import store_meta_data def detrend_single_channel(trace): from scipy.signal import savgol_filter return trace - savgol_filter(trace, 1001, 3) def detrend_al...
{"hexsha": "aded0748d07b5aba731492c8e6d26c668b0cd2e0", "size": 5541, "ext": "py", "lang": "Python", "max_stars_repo_path": "margrie_libs/margrie_libs/signal_processing/detrending.py", "max_stars_repo_name": "Sepidak/spikeGUI", "max_stars_repo_head_hexsha": "25ae60160308c0a34e7180f3e39a1c4dc6aad708", "max_stars_repo_lic...
import paddle import numpy as np import argparse import os import os.path as osp import sys import time import json from mmcv import Config from dataset import build_data_loader from models import build_model from utils import ResultFormat, AverageMeter # import warnings # warnings.filterwarnings('ig...
{"hexsha": "5641993c5962d89683172de67c502e2af1b0a939", "size": 2158, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "RoseSakurai/PSENet_paddle", "max_stars_repo_head_hexsha": "6b45f95059724080932b116a98d5af14ea0e1640", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
""" Module implementing GAN which will be trained using the Progressive growing technique -> https://arxiv.org/abs/1710.10196 """ import datetime import os import time import timeit import copy import numpy as np import torch as th class Generator(th.nn.Module): """ Generator of the GAN network """ def _...
{"hexsha": "d24f2040dd603f46e6aeed183a0af5f8206d07cd", "size": 21510, "ext": "py", "lang": "Python", "max_stars_repo_path": "sourcecode/MSG_GAN/GAN.py", "max_stars_repo_name": "manojtld/BMSG-GAN", "max_stars_repo_head_hexsha": "b3d85cd4fa4dd648e05c7881457c39a6d5379cb5", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import time, copy import os, os.path import sys import numpy from PyQt4.QtCore import * from PyQt4.QtGui import * from scipy import optimize from echem_plate_ui import * from echem_plate_math import * homepath='C:/Users/Gregoire/Documents/CaltechWork/echemdrop/20130301_CuZnSnFe_Plate3_3654' mainapp=QApplication...
{"hexsha": "3e39a7e6b490aff3c1e626932a3db19c6b1852c3", "size": 1459, "ext": "py", "lang": "Python", "max_stars_repo_path": "echem_testphoto.py", "max_stars_repo_name": "johnmgregoire/JCAPdatavis", "max_stars_repo_head_hexsha": "6d77a510e00acf31de9665828d27ea33aba6ab78", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
from fvcore.common.file_io import PathManager import xml.etree.ElementTree as ET from typing import Dict from tqdm import tqdm import numpy as np import os def bias_pascal_voc( dirname: str, noise_ratio: float, bias_rule: Dict[str, str] ): """ Add Noise to Pascal VOC detection annotations. Ar...
{"hexsha": "2804b3fe9e9e71c922b4b225ad28edad7e927613", "size": 2103, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoqa/add_noise.py", "max_stars_repo_name": "Umbrasi/qa-automation", "max_stars_repo_head_hexsha": "5ac1d97bc77289399132cf8fdda45bde3adb158b", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
#!/usr/bin/python3 """ Counterfactual explanation of a user query. Based on application on the knapsack problem of Korikov, A., & Beck, J. C. mming, CP2021. Counterfactual Explanations via Inverse Constraint Programming. Usecase: 1) Some optimal solution x* is provided to the user by a constraint optimization solver...
{"hexsha": "e5838f112a52745f7cdff9e96e9a589b1ade8c22", "size": 9119, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/advanced/counterfactual_explain.py", "max_stars_repo_name": "vishalbelsare/cpmpy", "max_stars_repo_head_hexsha": "42b1795d268c4e634d49d6d6aa2bb243aea67b0c", "max_stars_repo_licenses": ["A...
section \<open>Commonly used Lemmas\<close> theory Common imports Main "HOL-Library.Extended_Nat" "HOL-Eisbach.Eisbach" begin declare [[coercion_enabled = false]] subsection \<open>Miscellaneous\<close> lemma split_sym_rel: fixes G :: "'a rel" assumes "sym G" "irrefl G" obtains E where "E\<inter>E\<in...
{"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/Prim_Dijkstra_Simple/Common.thy"}
# -*- coding: utf-8 -*- """ Created on Fri Jul 8 22:40:32 2016 @author: au194693 """ import mne import numpy as np from my_settings import * subject = 1 raw = mne.io.Raw(data_folder + "sub_%s-raw.fif" % subject, preload=True) raw.filter(8, 12) picks = mne.pick_types(raw.info, "grad") raw.apply_hilbert(picks) ev...
{"hexsha": "38e3c539a469ff8cac4b778c90f941c6822e4046", "size": 2248, "ext": "py", "lang": "Python", "max_stars_repo_path": "hilbert_transform.py", "max_stars_repo_name": "MadsJensen/biomeg_class", "max_stars_repo_head_hexsha": "470ce736d8103e6d90ca203a0b2e0a96b756a780", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
// ----------------- BEGIN LICENSE BLOCK --------------------------------- // // Copyright (C) 2018-2019 Intel Corporation // // SPDX-License-Identifier: MIT // // ----------------- END LICENSE BLOCK ----------------------------------- #pragma once #include <boost/program_options/options_description.hpp> #include "ad...
{"hexsha": "55517e654c47a4beb4e64ba9a1009abf692c42af", "size": 732, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "tools/map_maker/common/include/ad/map/maker/common/InternalToRoad5ConfigDescription.hpp", "max_stars_repo_name": "seowwj/map", "max_stars_repo_head_hexsha": "2afacd50e1b732395c64b1884ccfaeeca0040ee7"...
#!/usr/bin/env python #Copyright (c) 2014, #All rights reserved. #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #* Redistributions of source code must retain the above copyright notice, this # list of conditions and t...
{"hexsha": "5be417a67762f027128cc84ffec9bb277860a136", "size": 26448, "ext": "py", "lang": "Python", "max_stars_repo_path": "hydrogeol_utils/grid_utils.py", "max_stars_repo_name": "GeoscienceAustralia/hydrogeol_utils", "max_stars_repo_head_hexsha": "586c8289f5a9931c25c04c141dbdf3cd3b2ae3dc", "max_stars_repo_licenses": ...
# -*- coding: utf-8 -*- # !/usr/bin/python ################################### PART0 DESCRIPTION ################################# # Filename: class_compute_meta_data_of_network.py # Description: # # Author: Shuai Yuan # E-mail: ysh329@sina.com # Create: 2015-12-06 21:49:46 # Last: __author__ = 'yuens' #############...
{"hexsha": "0dc01f78e3eb29a92d8ae9e9240ce763142543e5", "size": 31897, "ext": "py", "lang": "Python", "max_stars_repo_path": "mypackage/class_compute_edge_property.py", "max_stars_repo_name": "ysh329/link-prediction", "max_stars_repo_head_hexsha": "1ffbd1ecdf3b80a6ddebb02cf20a0487e36adb3b", "max_stars_repo_licenses": ["...
import unittest import numpy import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.utils import type_check @testing.parameterize( {'axis': 0, 'start': 2, 'out_shape': (3, 2, 4)},...
{"hexsha": "60cdeb368af47d793e9962fd8d9ba25b81b4dde2", "size": 3523, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/chainer_tests/functions_tests/array_tests/test_rollaxis.py", "max_stars_repo_name": "disktnk/chainer", "max_stars_repo_head_hexsha": "133798db470f6fd95973b882b9ccbd0c9726ac13", "max_stars_re...
[STATEMENT] lemma cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r_inject [simp]: "cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<...
{"llama_tokens": 397, "file": "Core_SC_DOM_common_pointers_NodePointer", "length": 1}
""" Tests the InputMixl class to ensure it is constructed correctly and that input validation works as expected. """ import unittest import numpy as np from src.models.base_model_inputs import InputMixl class InputMixlTests(unittest.TestCase): """ Unit test class for storing the various tests of the InputMix...
{"hexsha": "f048882adf60c618048b61209a5aa5a65ce90e82", "size": 1439, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_input_mixl.py", "max_stars_repo_name": "timothyb0912/check-yourself", "max_stars_repo_head_hexsha": "bbca2afcd63c068401913de2dd98f64569373c97", "max_stars_repo_licenses": ["MIT"], ...
""" ``` transform_data(m::AbstractModel, levels::DataFrame; verbose::Symbol = :low) ``` Transform data loaded in levels and order columns appropriately for the DSGE model. Returns DataFrame of transformed data. The DataFrame `levels` is output from `load_data_levels`. The series in levels are transformed as specified...
{"hexsha": "df5ff598ed781a487d6650c5d20c6d1a390850a4", "size": 3493, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/data/transform_data.jl", "max_stars_repo_name": "bgoodri/DSGE.jl", "max_stars_repo_head_hexsha": "6f9077ab8e9912bbade15b40c9c78c298c26e8f0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
"""Connect four game. """ import numpy as np class Connect_four_game: def __init__(self): self.n_in_a_row = 4 self.board_dim = 6 self.reset() self.bad_move = 0 #States: # 0: start # 1: player 1 # 2: check for win? # 3: player 2 # 4: ...
{"hexsha": "8688771ada387d4775ccd5dcbd80cd3ccc2f6058", "size": 5435, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/connect_four/game.py", "max_stars_repo_name": "kasperskov01/pysnaike", "max_stars_repo_head_hexsha": "401a4601cbbd151470fa9ac0575288f89fa93240", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/bin/python import numpy as np class LabelGroup(): def __init__(self, baseNames): self.base = baseNames self.cropped = self.crop(self.base) # lowercase greek letters for niceness; self.clusterSymbolMap = [chr(945 + x) for x in range(55)] print(self.cropped) @static...
{"hexsha": "ebfcfc74e664e488aab9327c8da13db4a321a77a", "size": 2364, "ext": "py", "lang": "Python", "max_stars_repo_path": "straintables/Viewer/MatrixLabelGroup.py", "max_stars_repo_name": "Gab0/linkageMapper", "max_stars_repo_head_hexsha": "549b292e5b6ab22e03373483cd27236aa2f635eb", "max_stars_repo_licenses": ["MIT"],...