text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# -*- coding: utf-8 -*- """ Created on Mon Jan 29 12:21:51 2018 @author: neh69 """ import numpy import os import sys if __name__ == "__main__": root = __file__ print(numpy.get_include()) print(root) print(os.path.split(root)) print(os.path.join(numpy.get_include(), 'numpy')) ...
{"hexsha": "93238ef2093b9bf8a88b272b3b484e9a61136005", "size": 574, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/test_installation.py", "max_stars_repo_name": "EricHughesABC/EPG", "max_stars_repo_head_hexsha": "d5aaf80d20667a5d56db3ab0842d76bd2bf92ea9", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os, subprocess, time, signal import gym from gym import error, spaces from gym import utils from gym.utils import seeding import numpy as np from os import path from blockworld.envs.engine.game import * from blockworld.envs.engine.tasks.Walkway import * from gym.envs.classic_control import rendering import log...
{"hexsha": "4723453c2601ff66e8b9bfb596e5e083956dd04c", "size": 2874, "ext": "py", "lang": "Python", "max_stars_repo_path": "blockworld/envs/blockworld_env.py", "max_stars_repo_name": "menwhitehead/gym-blockworld", "max_stars_repo_head_hexsha": "ce3a878487c28c0fd80bd98764e8e8cf65b9eb84", "max_stars_repo_licenses": ["MIT...
#!/usr/bin/env python """Tests for Ellipsoid class in the 'setfilter` package.""" import pytest # math import numpy as np import numpy.linalg as la import numpy.random as rand @pytest.fixture def base(): """test Ellipsoid class """ # build fixture from setfilter.ellipsoid import Ellipsoid center = [1.,...
{"hexsha": "3820a1044b7f406f47b3e70b4befaf6679b4aa3b", "size": 2274, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_ellipsoid.py", "max_stars_repo_name": "k2shah/sfilter", "max_stars_repo_head_hexsha": "79c4584831d04f32fcfb1e0d4d3743fc184e900c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np from tensorflow import keras from tensorflow import random as tf_random from kerastuner import HyperModel from tensorflow.keras import models from tensorflow.keras.layers import ( Conv1D, Conv2D, Dense, Dropout, Flatten, MaxPooling1D, MaxPooling2D, Input, Activatio...
{"hexsha": "1dd89e232b3a206091c0ad787e80cf2c1f5d63ab", "size": 13193, "ext": "py", "lang": "Python", "max_stars_repo_path": "mymodels/hypermodels.py", "max_stars_repo_name": "lauromoraes/promoter_paper", "max_stars_repo_head_hexsha": "62aea776cb318a13e142f84dd84bb0a29fb0e83f", "max_stars_repo_licenses": ["Apache-2.0"],...
"""ML-ENSEMBLE :author: Sebastian Flennerhag :copyright: 2017-2018 :license: MIT Model selection suite for tuning and benchmarking a set of estimators. """ # pylint: disable=too-many-instance-attributes # pylint: disable=too-many-arguments from __future__ import division, with_statement import warnings import numpy...
{"hexsha": "124e95401e7034f809c97246404489f520684b25", "size": 25658, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlens/model_selection/model_selection.py", "max_stars_repo_name": "mehrdad-shokri/mlens", "max_stars_repo_head_hexsha": "6cbc11354b5f9500a33d9cefb700a1bba9d3199a", "max_stars_repo_licenses": ["MI...
%%******************************************************************* %% Read in a problem in SDPA sparse format. %% %% [blk,At,C,b] = read_sdpa(fname) %% %% Input: fname = name of the file containing SDP data in %% SDPA foramt. %% Important: the data is assumed to contain only %% semi...
{"author": "shamilmamedov", "repo": "dynamic_calibration", "sha": "11af40e7deb758ec080a175fed8fcdd6c99aca29", "save_path": "github-repos/MATLAB/shamilmamedov-dynamic_calibration", "path": "github-repos/MATLAB/shamilmamedov-dynamic_calibration/dynamic_calibration-11af40e7deb758ec080a175fed8fcdd6c99aca29/utils/SDPT3-4.0/...
import numpy as np import cv2,os # it will extract the image list def _get_img_lists(img_path): frame_list = [] for frame in os.listdir(img_path): if os.path.splitext(frame)[1] == '.jpg': frame_list.append(os.path.join(img_path, frame)) return frame_list def _linear_mapping(img): ...
{"hexsha": "90b971b7aeb8216b1fafa0e622516842a296aeda", "size": 1881, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "TIANGANGLIN/pyCFTrackers", "max_stars_repo_head_hexsha": "de37d27fc19069a34ac97454532aeb64663a6054", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
""" .. module:: samples :platform: Unix, Windows :synopsis: a module for defining the class :class:`pooledsample`. .. moduleauthor:: Charlles R. A. Abreu <abreu@eq.ufrj.br> """ import numpy as np import pandas as pd import mics from mics.funcs import func from mics.funcs import qualifiers from mics.utils impo...
{"hexsha": "6a1cb0968d7378a212fcaaca59575e58011f38fd", "size": 4298, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mics/pooledsamples.py", "max_stars_repo_name": "craabreu/MICS", "max_stars_repo_head_hexsha": "7d806a7ec354869efbbd7e690b644d17513568cb", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python import sys import sqlite3 import Bio from Bio import SeqIO import pickle import tagmatch import pandas as pd import numpy as np from collections import defaultdict import shelve db = sqlite3.connect(sys.argv[1]) cursor = db.cursor() tag_df = pd.read_sql("SELECT DISTINCT tagid, seqstr from tags"...
{"hexsha": "d33df3fefab80ca93cd52cfc2ed4396f8cb06e9d", "size": 621, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/python/bp_pickletags.py", "max_stars_repo_name": "reid-wagner/proteomics-pipelines", "max_stars_repo_head_hexsha": "2214c2ad4c14fabcb50a3c0800e9d383ce73df3d", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python ''' This script makes Gazebo less fail by translating gazebo status messages to odometry data. Since Gazebo also publishes data faster than normal odom data, this script caps the update to 20hz. Winter Guerra ''' import rospy from nav_msgs.msg import Odometry from geometry_msgs.msg import Pose, ...
{"hexsha": "fc3772c8c132db56f5c1b2c19777b1dbe8a8aeeb", "size": 2466, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulator/f110-fall2018-skeletons/simulator/racecar-simulator/racecar_gazebo/scripts/gazebo_odometry.py", "max_stars_repo_name": "timkrentz/AAF1Tenth", "max_stars_repo_head_hexsha": "2abcecbcebbe1...
# -*- coding: utf-8 -*- # @Author: Jiahong Zhou # @Date: 2018-10-20 # @Email: JoeZJiahong@gmail.com # @Fork-Author: Sérgio de Sousa # @Date: 2020-05-20 # @sergio7sjs@gmail.com # implement of L-LDA Model(Labeled Latent Dirichlet Allocation Model) # References: # i. RAMAGE, Daniel et al. Labeled LDA: A ...
{"hexsha": "82dd56edb4b66c5edee2604071111ca29ca4eadb", "size": 43560, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasks/LDA/labeled_lda_SergioSJS/model/labeled_lda.py", "max_stars_repo_name": "rongfang323/policy-data-analyzer", "max_stars_repo_head_hexsha": "73a03089753a26fe5e7031c5c68ba887428246a9", "max_st...
using Documenter, LadeGCM makedocs() deploydocs( deps = Deps.pip("pygments", "mkdocs", "python-markdown-math"), repo = "github.com/Libbum/LadeGCM.jl.git", julia = "0.6" )
{"hexsha": "6734b7a42a17a918f018f8ee1bbbe6eef4c6ba20", "size": 190, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Libbum/LadeGCM", "max_stars_repo_head_hexsha": "a15a21a93ebf14055a6a6d55f716e1f4fcebe7f4", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "max_stars_count":...
import torch import pandas as pd import numpy as np from injector import inject from transformers import BertTokenizer from backend.common.logging.console_loger import ConsoleLogger from backend.services.toxic_comment_jigsaw.application.ai.training.src.preprocess import Preprocess from backend.services.toxic_comment_j...
{"hexsha": "ac92ee9b7d6c1499d59b2656f0b19068c32b620d", "size": 5187, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/services/toxic_comment_jigsaw/application/ai/inference/prediction.py", "max_stars_repo_name": "R-aryan/Jigsaw-Toxic-Comment-Classification", "max_stars_repo_head_hexsha": "e5e4da7df379ac1b...
using Cairo using Test # CairoSurface # ptr::Ptr{Nothing} # width::Float64 # height::Float64 # data::Matrix{T} c = CairoARGBSurface(160, 90) @test c isa CairoSurface{UInt32} ctx = CairoContext(c) @test ctx isa CairoContext
{"hexsha": "9da11687fc6802edf5137c703e22ff01214a43c6", "size": 242, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/cairo/surface.jl", "max_stars_repo_name": "wookay/PushInterface.jl", "max_stars_repo_head_hexsha": "87458c21f9a12a53c1b19e0ce573d1e43e764938", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# -*- coding: utf-8 -*- # This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt) # Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016 from unittest import TestCase import numpy as np import pandas as pd from distributed import LocalCluster, Client from ts...
{"hexsha": "53848ba5d4a557edee7103eb5d112636ec1f140e", "size": 6937, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/units/utilities/test_distribution.py", "max_stars_repo_name": "jeffzi/tsfresh", "max_stars_repo_head_hexsha": "b9f14775030d0d9798fb95d5cd6df2e84bb4fbc7", "max_stars_repo_licenses": ["MIT"], ...
module Demo export @demo function julia_code(expr) println("Julia code:") println("-----------\n") println(expr) println("\n...") end function outcome() println("Output:") println("-------\n") end macro demo(expr) s = string(expr) quote input = chomp(readline(STDIN)) ...
{"hexsha": "44a023778ce37609a23ccfc9c662a15d6b71118b", "size": 461, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Demo.jl", "max_stars_repo_name": "Ward9250/Demo.jl", "max_stars_repo_head_hexsha": "e7b735c34be41370050d01ac586ab1d29aae4c1e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
[STATEMENT] lemma (in Ring) AB_inc_sum_mult:"\<lbrakk>ideal R A; ideal R B\<rbrakk> \<Longrightarrow> sum_mult R A B \<subseteq> A \<inter> B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ideal R A; ideal R B\<rbrakk> \<Longrightarrow> sum_mult R A B \<subseteq> A \<i...
{"llama_tokens": 1039, "file": "Group-Ring-Module_Algebra5", "length": 7}
[STATEMENT] lemma L_transform_Tree\<^sub>\<alpha>_eqvt [eqvt]: "p \<bullet> L_transform_Tree\<^sub>\<alpha> t\<^sub>\<alpha> = L_transform_Tree\<^sub>\<alpha> (p \<bullet> t\<^sub>\<alpha>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. p \<bullet> L_transform_Tree\<^sub>\<alpha> t\<^sub>\<alpha> = L_transform_Tree...
{"llama_tokens": 147, "file": "Modal_Logics_for_NTS_L_Transform", "length": 1}
""" Utilities for working with files. """ import os import pickle as pkl import json from copy import deepcopy from typing import Dict, Any, Callable, Optional, cast, List, Tuple, Iterator, Union import torch import numpy as np from experiment_utils import configs, utils def save_experiment( exp_dict: dict, ...
{"hexsha": "3942f4cf4ea26ad792e0941d518c87c6a0194684", "size": 11380, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/experiment_utils/files.py", "max_stars_repo_name": "aaronpmishkin/experiment_utils", "max_stars_repo_head_hexsha": "cfa5f899b81d0ee4bc4b7752bc87f5b58f6c1998", "max_stars_repo_licenses": ["MIT...
import numpy as np import matplotlib.pyplot as plt %matplotlib inline import pandas as pd ## Dataset mean_01 = np.array([0.0, 0.0]) cov_01 = np.array([[1.0, 0.8], [0.7, 1.6]]) data = np.random.multivariate_normal(mean_01, cov_01, 800) print (data.shape) plt.scatter(data[:, 0], data[:, 1]) plt.show() def PCA(X, m=No...
{"hexsha": "1cea0db42d3fb99f94796d772a82c74f521a294a", "size": 1586, "ext": "py", "lang": "Python", "max_stars_repo_path": "principal_component_analysis/python/PCA.py", "max_stars_repo_name": "bakuryuthem0/al-go-rithms", "max_stars_repo_head_hexsha": "8ad4b65a988740525585ecae2b6f0b815cdbcd66", "max_stars_repo_licenses"...
\documentclass[landscape,twocolumn,letterpaper,9pt,reqno]{article}\usepackage[]{graphicx}\usepackage[]{color} %% maxwidth is the original width if it is less than linewidth %% otherwise use linewidth (to make sure the graphics do not exceed the margin) \makeatletter \def\maxwidth{ % \ifdim\Gin@nat@width>\linewidth ...
{"hexsha": "8a3ea3b5764ef01f2bea2820cc1e5d59e3256732", "size": 38154, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "slides/regression/handouts/EPIB607_handout_practice_questions.tex", "max_stars_repo_name": "ly129/EPIB607", "max_stars_repo_head_hexsha": "ac2f917bc064f8028a875766af847114cd306396", "max_stars_repo...
from django.http import HttpResponse from django.template import loader from django.shortcuts import render from aurora_application.models import IMG from sklearn.linear_model import RidgeClassifier from sklearn.metrics import confusion_matrix import h5py import numpy as np import pandas as pd import numpy.random a...
{"hexsha": "660486626a275496ba8bc59b23b75c09fa6f06ea", "size": 3609, "ext": "py", "lang": "Python", "max_stars_repo_path": "website/aurora_application/views.py", "max_stars_repo_name": "ec500-software-engineering/project-aurora_borealis_classification", "max_stars_repo_head_hexsha": "cbc057dd5cf07a057fc15d29b9f5c427431...
// Copyright Oleg Maximenko 2014. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://github.com/svgpp/svgpp for library home page. #pragma once #include <svgpp/definitions.hpp> #include <svgpp/tra...
{"hexsha": "7580a0a96c57b9920e5e40454933b231294b09a8", "size": 11043, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/svgpp/traits/child_element_types.hpp", "max_stars_repo_name": "RichardCory/svgpp", "max_stars_repo_head_hexsha": "801e0142c61c88cf2898da157fb96dc04af1b8b0", "max_stars_repo_licenses": ["BSL...
module JuliaInterpreter # We use a code structure where all `using` and `import` # statements in the package that load anything other than # a Julia base or stdlib package are located in this file here. # Nothing else should appear in this file here, apart from # the `include("packagedef.jl")` statement, which loads w...
{"hexsha": "c781f465b99ca1f38d0d8a16a2a6a5ac9ac89eaa", "size": 537, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/JuliaInterpreter.jl", "max_stars_repo_name": "bicycle1885/JuliaInterpreter.jl", "max_stars_repo_head_hexsha": "8e7bac93fb03e98ff5bc89097995ada1518d0157", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import sklearn from skimage import filters from skimage.measure import block_reduce from mydeep_api.tensor import Tensor from surili_core.surili_io.image_io import OpencvIO from surili_core.worker import Worker from surili_core.workspace import Workspace def extract_features(rgb: Tensor): if l...
{"hexsha": "95eb46b462d2de621b835adc32e9a70cb40bf047", "size": 1801, "ext": "py", "lang": "Python", "max_stars_repo_path": "kaggle-projects/sign-mnist/sign_mnist/treshold_filter.py", "max_stars_repo_name": "flegac/deep-experiments", "max_stars_repo_head_hexsha": "e1b12e724f2c8340cbe9c51396cf3f42e3b4e934", "max_stars_re...
from OpenGL import GL import argparse import numpy as np import os import roboschool import gym from ppo_actor import PPOActor import numpy as np from models.ppo_mujoco_model import PPOMujocoModel from models.ppo_atari_model import PPOAtariModel import atari_wrappers from chainer import optimizers from chainer...
{"hexsha": "b1a27eed3eea405080116ee50c19f1b47e9b123f", "size": 10114, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "yuishihara/chainer-ppo", "max_stars_repo_head_hexsha": "9a10b2ab29b646feb20fe4f76d12b676b45f3446", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
[STATEMENT] lemma chain_rel_prodD2: "Complete_Partial_Order.chain (rel_prod orda ordb) Y \<Longrightarrow> Complete_Partial_Order.chain ordb (snd ` Y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Complete_Partial_Order.chain (rel_prod orda ordb) Y \<Longrightarrow> Complete_Partial_Order.chain ordb (snd ` Y) ...
{"llama_tokens": 140, "file": null, "length": 1}
module SimpleTT where data 𝟘 : Set where absurd : ∀ {ℓ} {A : Set ℓ} → 𝟘 → A absurd () data _⁺ (A : Set) : Set where Z : A ⁺ S : A → A ⁺ record Signature : Set₁ where field ty-op : Set tm-op : Set ty-ty-arg : ty-op → Set -- ty-tm-arg : ty-op → Set -- tm-ty-arg ...
{"hexsha": "c7ade1a29356fc1999a888784079d6a94bf3ec05", "size": 1568, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Experimental/SimpleTT.agda", "max_stars_repo_name": "cilinder/formaltt", "max_stars_repo_head_hexsha": "0a9d25e6e3965913d9b49a47c88cdfb94b55ffeb", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import sys from LAC import LAC import cn2an import numpy as np import paddle.inference as paddle_infer from decoders_text.ctc_greedy_decoder import greedy_decoder class Predictor: def __init__(self, model_dir, audio_process, decoding_method='ctc_greedy', alpha=1.2, beta=0.35, lang_mod...
{"hexsha": "c7004815d16c4b616c54bee6ffbf4ec5b8631625", "size": 5905, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils_text/predict.py", "max_stars_repo_name": "Yxxxb/Speech-Recognition-Final-Project", "max_stars_repo_head_hexsha": "3427b050d687e97c1525d300fbcec871d1583300", "max_stars_repo_licenses": ["...
(* Title: JinjaDCI/BV/BVNoTypeErrors.thy Author: Gerwin Klein, Susannah Mansky Copyright GPL Based on the Jinja theory BV/BVNoTypeErrors.thy by Gerwin Klein *) section \<open> Welltyped Programs produce no Type Errors \<close> theory BVNoTypeError imports "../JVM/JVMDefensive" BVSpecTypeSafe...
{"author": "susannahej", "repo": "jinja-dci", "sha": "0969fa2c5966204b326395763d7a375e7dc6badf", "save_path": "github-repos/isabelle/susannahej-jinja-dci", "path": "github-repos/isabelle/susannahej-jinja-dci/jinja-dci-0969fa2c5966204b326395763d7a375e7dc6badf/BV/BVNoTypeError.thy"}
#!/usr/bin/python3 """ Hidden Markov Model for the analysis of the abrupt changing properties of the process of the green electrisity grid. HMM_a(brupt)c(hanging)p(roperties of the)p(rocess of )g(reen)e(lectrisity)g(rid).py The given time series is an imbalance of consumers and electricity generation. A- priori, ...
{"hexsha": "cdde927ab9aa2f9c2cd88d2c24aa9e5e6f4a7cb7", "size": 6082, "ext": "py", "lang": "Python", "max_stars_repo_path": "stgelpDL/hmm/HMM_acppgeg.py", "max_stars_repo_name": "dmitryv56/stgelpDL", "max_stars_repo_head_hexsha": "a3dbe9f1a4ff19586dfdfac01748634b47389a6e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os import argparse import time import datetime import json import subprocess import cv2 import random import threading import pandas as pd import numpy as np from pprint import pprint parser = argparse.ArgumentParser(description="Script to Automate Classification Process") parser.add_argument("--csv", help="P...
{"hexsha": "07b0de1fc0748ce29384ce8867b02c7f9d8936c8", "size": 2881, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier_code/infer_pipeline/new_frame_split.py", "max_stars_repo_name": "talsperre/distracted-driving-snapchat", "max_stars_repo_head_hexsha": "b400fdbcee66d897e0ccaee3444046a2432ee2cf", "max_s...
""" barycentric_weights{T<:Real}(x::AbstractVector{T}) Compute the barycentric weights corresponding to the nodes `x`. [Kopriva, Implementing Spectral Methods for PDEs, Algorithm 30]. """ function barycentric_weights(x::AbstractVector) w = fill!(similar(x), one(eltype(x))) @inbounds barycentric_weights!(w...
{"hexsha": "233365441a2fcb5ff9a7fe647df67629e5910fba", "size": 4077, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/interpolation.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/PolynomialBases.jl-c74db56a-226d-5e98-8bb0-a6049094aeea", "max_stars_repo_head_hexsha": "7a1ac70cbdae378323a4dd611c8dc1...
%!TEX root = ../thesis.tex %******************************************************************************* %****************************** Fourth Chapter ********************************** %******************************************************************************* %Here you make the strongest statement concerning...
{"hexsha": "0db540147b89e52fffa38a6b5d0a749021b8f7cd", "size": 22197, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter4/chapter4.tex", "max_stars_repo_name": "diennv/phd-thesis", "max_stars_repo_head_hexsha": "ee2ea626a3b5cd273d549220bf0f95e7da5fa240", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import xray import numpy as np import matplotlib.pyplot as plt import atmos as atm from atmos import split_timedim datadir = '/home/jwalker/eady/datastore/' #datadir = '/home/jennifer/datastore/' # ---------------------------------------------------------------------- # NCEP2 Monthly filename = datadir + 'atmos-tools...
{"hexsha": "ee425935df03ff3f1a2ffda005f41206f532e2c2", "size": 2506, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/testing-data-split_timedim.py", "max_stars_repo_name": "jenfly/atmos", "max_stars_repo_head_hexsha": "c0a733b78749098d8cc2caaaacee245e6aeeac07", "max_stars_repo_licenses": ["MIT"], "max_st...
import os import json import numpy as np import tensorflow as tf import time import argparse from tqdm import tqdm from tf_ncf import neural_mf import heapq # for retrieval topK import math def pop_env(): for k in ['https_proxy', 'http_proxy']: if k in os.environ: os.environ.pop(k) pop_env(...
{"hexsha": "20c0402f8d26a163d4ac3692b7956227b780dc4c", "size": 6521, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/rec/run_tfworker.py", "max_stars_repo_name": "initzhang/Hetu", "max_stars_repo_head_hexsha": "447111a358e4dc6df5db9c216bdb3590fff05f84", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
''' Raul Angel Jimenez 19017 Donaldo Sebastian Garcia 19683 Oscar Saravia 19322 Modulo de distintas encriptaciones, Cifrado de informacion ''' from persistence.persistence import Persistence from itertools import * import numpy as np import nltk import re persistenceRepo = Persistence() class Cipher: def...
{"hexsha": "f8389d1d745b3d23b8fece425d9192aa43bf8a72", "size": 5363, "ext": "py", "lang": "Python", "max_stars_repo_path": "Cipher.py", "max_stars_repo_name": "donaldosebas/lab1-cifrado", "max_stars_repo_head_hexsha": "c1f2ae0d7877703350568bde1764be4ed7874978", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# Refered to the blog post below # https://stackabuse.com/time-series-prediction-using-lstm-with-pytorch-in-python # and changed the structure and details of the code # to serve the purpose of this project # import libraries import torch import torch.nn as nn import numpy as np import pandas as pd from sklearn.prepr...
{"hexsha": "c7830e4b5af4a0acc79e2a958873037c1f6cf4cf", "size": 4512, "ext": "py", "lang": "Python", "max_stars_repo_path": "django_project/stock_analytics/lstm.py", "max_stars_repo_name": "justinekang/Athena_Stocks", "max_stars_repo_head_hexsha": "024826b7cf1bac78c570824b884a3310e5a8120e", "max_stars_repo_licenses": ["...
# coding: utf-8 import warnings import numpy as np import pandas as pd import talib as ta from czsc.plot import * from czsc.utils import * ######################## compare method ############################### def has_gap(k1, k2, min_gap=0.002): """判断 k1, k2 之间是否有缺口""" assert k2['dt'] > k1['dt'] if k1...
{"hexsha": "93efad678322da11ff108cb58584ef0c57aec237", "size": 38280, "ext": "py", "lang": "Python", "max_stars_repo_path": "czsc/analyze.py", "max_stars_repo_name": "forex24/czsc_in_practise", "max_stars_repo_head_hexsha": "75e7443c0e7dcbf199e74a5bd1fb172797043e2e", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# in notebook.ipynb # from projectname.config import data_path import numpy as np import wfdb def load_raw_data(df, sampling_rate, path): if sampling_rate == 100: data = [wfdb.rdsamp(path + f) for f in df.filename_lr] else: data = [wfdb.rdsamp(path + f) for f in df.filename_hr] data = np.a...
{"hexsha": "e699d3361874de3edf0c0aac5fecae5737e15049", "size": 1505, "ext": "py", "lang": "Python", "max_stars_repo_path": "fda/utils.py", "max_stars_repo_name": "GabrieleBonzi/FDAxECG", "max_stars_repo_head_hexsha": "2ccc0128fd573bfe69be7db5d33452a7766b379a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
#!/usr/bin/env python # -*- coding:utf-8 -*- #!/usr/bin/env python # -*- coding:utf-8 -*- import json import xml.etree.ElementTree as ET from collections import defaultdict from PIL import Image import numpy as np num_to_class = { "1": "1", "2": "2", "3": "3"} def write_xml(sh, sw, imgname, filepath, labeldic...
{"hexsha": "a713df6cf24b682391cfc625848055598bcfd2f1", "size": 3064, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/core/transform/coco2xml.py", "max_stars_repo_name": "isLinXu/DatasetMarkerTool", "max_stars_repo_head_hexsha": "b324315ed5c679f9dc764a6b1d88be246ee7f2db", "max_stars_repo_licenses": ["Apac...
import numpy as np import pandas as pd import pathlib from sklearn.model_selection import train_test_split file_path = pathlib.WindowsPath(__file__).parent.parent.parent.joinpath('data/') test_path = file_path.joinpath('test.csv') train_path = file_path.joinpath('train.csv') # Importing datasets def load_test_dataset...
{"hexsha": "b16aacf92cf81c0ef096822751f609452cce7e46", "size": 2166, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model/processing/data_manager.py", "max_stars_repo_name": "kalpesh94552/los_model_production_repo", "max_stars_repo_head_hexsha": "543e9f344e95d18cdf1423899ff4ce9d08d7fede", "max_stars_repo_li...
[STATEMENT] lemma sum_with_cases[case_names comm zero]: assumes "\<And>C. \<lbrakk> f ` S \<subseteq> C; comm_monoid_add_ow C pls z \<rbrakk> \<Longrightarrow> P (Finite_Set.fold (pls o f) z S)" and "(\<And>C. comm_monoid_add_ow C pls z \<Longrightarrow> (\<exists>s\<in>S. f s \<notin> C)) \<Longrightarrow...
{"llama_tokens": 350, "file": "Types_To_Sets_Extension_Examples_Vector_Spaces_VS_Groups", "length": 2}
import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split from sklearn.neighbors import NearestNeighbors from sklearn.preprocessing import StandardScaler import utils # DATASET df = utils.load_tracks(buckets="continuous", outliers=False) column2drop = [ ("track", "la...
{"hexsha": "2ec1207ef179f3ed5658a77256e0f30335c3e626", "size": 5226, "ext": "py", "lang": "Python", "max_stars_repo_path": "outliers_detection_KNN.py", "max_stars_repo_name": "Mariabba/DataMining2-project", "max_stars_repo_head_hexsha": "d12cf4d6605a16194f24b8410c332cff701d2b6d", "max_stars_repo_licenses": ["CC-BY-4.0"...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
{"hexsha": "514a866c041b42b61003db8328cad81122bbeb0a", "size": 6189, "ext": "py", "lang": "Python", "max_stars_repo_path": "moldesign/models/base.py", "max_stars_repo_name": "Autodesk/molecular-design-toolkit", "max_stars_repo_head_hexsha": "5f45a47fea21d3603899a6366cb163024f0e2ec4", "max_stars_repo_licenses": ["Apache...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Testing :mod:`astropy.cosmology.flrw.__init__.py`.""" ############################################################################## # IMPORTS import pytest from astropy.utils import resolve_name from astropy.utils.exceptions import AstropyDeprecati...
{"hexsha": "54c76947de6c9f917594d893ac1679356ae7b22d", "size": 1203, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/cosmology/flrw/tests/test_init.py", "max_stars_repo_name": "zabop/astropy", "max_stars_repo_head_hexsha": "11b3214f18b74aea5e3f8349e50ae1b09c39d30e", "max_stars_repo_licenses": ["BSD-3-Cla...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{"hexsha": "906d09a77cfe116cfaec436f4637c26dd0fb96d7", "size": 8124, "ext": "py", "lang": "Python", "max_stars_repo_path": "graph_embedding/simulations/sbm_simulator_test.py", "max_stars_repo_name": "xxdreck/google-research", "max_stars_repo_head_hexsha": "dac724bc2b9362d65c26747a8754504fe4c615f8", "max_stars_repo_lice...
import os import random import shutil from pathlib import Path import numpy as np import pandas as pd import torch import wandb from torch import optim from torch.optim.lr_scheduler import StepLR from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm from utils.args_helper import append_dataset_args,...
{"hexsha": "c019fe7d2536a0b0e6aafed980d3d1588d0ad93e", "size": 10288, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "akurniawan/indonlu", "max_stars_repo_head_hexsha": "35ad2a91451d269005fc0577dbea75fc1dc25747", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
import os import glob import sqlite3 import pandas as pd import numpy as np from bokeh.plotting import figure, output_file, output_notebook, show from bokeh.models import ColumnDataSource, HoverTool from bokeh.models.widgets import Panel, Tabs import matplotlib.pyplot as plt import statsmodels.api as sm import seaborn ...
{"hexsha": "b4f8a2f0af7586aa4a6cba4e1363875c5c3c50dd", "size": 23118, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools.py", "max_stars_repo_name": "kpolimis/NFLCombineEvaluationNotebooks", "max_stars_repo_head_hexsha": "a763cc6f09c48a94c0e98a036d4d74e41f57dbfd", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import wave import librosa import numpy as np import pyaudio import paddle.fluid as fluid # 创建执行器 place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) # 保存预测模型路径 save_path = 'models/' # 从模型中获取预测程序、输入数据名称列表、分类器 [infer_program, feeded_var_names, target_var] = fluid.io.load_inf...
{"hexsha": "76ab625b9711217cd98f0d10793fc76978c30d83", "size": 2457, "ext": "py", "lang": "Python", "max_stars_repo_path": "infer_record.py", "max_stars_repo_name": "GT-AcerZhang/AudioClassification-PaddlePaddle", "max_stars_repo_head_hexsha": "326854273ecbf60e3a3b36ae4ee667833a6b7b26", "max_stars_repo_licenses": ["Apa...
import numpy as np; np.set_printoptions(precision=4, linewidth=200) import pandas as pd; pd.set_option('display.width', 200) import os import logging import scipy.stats as stats from polyfun import configure_logger, check_package_versions from pyarrow import ArrowIOError from pyarrow.lib import ArrowInvalid fro...
{"hexsha": "cb81d78308c38564fac6163e5155dc1355522ab0", "size": 6086, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_finemapper_jobs.py", "max_stars_repo_name": "jerome-f/polyfun", "max_stars_repo_head_hexsha": "73e17a8ecc9c52e582564674d1093cf3f0367ae6", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from PhiRelevance.PhiUtils1 import phiControl,phi import pandas as pd import matplotlib.pyplot as plt import numpy as np import math from random import seed from random import randint from random import random class SmoteRRegression: """ Class SmoteRRegression takes arguments as follows: data - Pandas...
{"hexsha": "66f89d8602e29dc7cf4b07b52a7eb1fe2de33707", "size": 23011, "ext": "py", "lang": "Python", "max_stars_repo_path": "archive/utility_based_smoter_regression.py", "max_stars_repo_name": "ndai093/UtilityBasedRegression", "max_stars_repo_head_hexsha": "1af262ab5b2b0645eda247ca63ef0b2f24fe18dd", "max_stars_repo_lic...
#!/usr/bin/python # # Copyright 2022 DeepMind Technologies 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 a...
{"hexsha": "a110672265e92f243bb900bebb7c8ffa52c989da", "size": 5027, "ext": "py", "lang": "Python", "max_stars_repo_path": "distribution_shift_framework/core/datasets/data_utils.py", "max_stars_repo_name": "deepmind/distribution_shift_framework", "max_stars_repo_head_hexsha": "f6946779128dd90ae820f5c36fb5dbfad58ad885",...
/* * TaxiTrip.hpp * * Created on: 12 Nov 2016 * Author: jabir */ #include <bitset> #include <vector> #include <map> #include <string> #include "buffering/Shared.hpp" #include "conf/settings/DisableMPI.h" #include "entities/misc/TripChain.hpp" #include "util/DailyTime.hpp" #include <boost/lexical_cast.hpp> #...
{"hexsha": "c36d16d0affd6590c89ddacc08bdf478808b156c", "size": 1141, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "dev/Basic/shared/entities/misc/TaxiTrip.hpp", "max_stars_repo_name": "gusugusu1018/simmobility-prod", "max_stars_repo_head_hexsha": "d30a5ba353673f8fd35f4868c26994a0206a40b6", "max_stars_repo_licens...
""" Library utility functions. """ import itertools import tarfile import os import datetime import numpy as np import requests def synthesize_route(station_lists): """ Given a list of station lists (that is: a list of lists, where each sublist consists of the series of stations which a train was purpor...
{"hexsha": "35307bf9144097e013107aadd3bca59eb481ffd4", "size": 4579, "ext": "py", "lang": "Python", "max_stars_repo_path": "gtfs_tripify/utils.py", "max_stars_repo_name": "ResidentMario/gtfs-tripify", "max_stars_repo_head_hexsha": "6f0d5965aab9442a0095133ab6d3cfebdb9dd398", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import cv2 import numpy as np def down_size_image(image: np.ndarray): """Halves image by deleting every other row/column. # Arguments: image: np.ndarray array with shape (height, width, channels) # Returns: numpy array """ image = np.delete(image, list(ran...
{"hexsha": "6af4b385575b5f491d455b3c9b66e1f8e1497de0", "size": 1354, "ext": "py", "lang": "Python", "max_stars_repo_path": "easy-receptive-fields-pytorch/houseNet/util/array_utils.py", "max_stars_repo_name": "Swinsie/cv-rep-fork", "max_stars_repo_head_hexsha": "1c3454934645e3f9afa39ba90c3b216eb9ed7f75", "max_stars_repo...
""" Contains class Coordinates. # Author: Vladan Lucic (Max Planck Institute for Biochemistry) # $Id$ """ from __future__ import unicode_literals from __future__ import absolute_import from builtins import range from builtins import object __version__ = "$Revision$" import logging from copy import copy, deepcopy im...
{"hexsha": "3c5189e32340954eb2669e5b0c4b8cdc9e335f92", "size": 5322, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/pyto/geometry/coordinates.py", "max_stars_repo_name": "anmartinezs/pyseg_system", "max_stars_repo_head_hexsha": "5bb07c7901062452a34b73f376057cabc15a13c3", "max_stars_repo_licenses": ["Apache...
import numpy as np import tensorflow as tf def cnn(idx, X, filters, kernel_size, is_training, strides=(1, 1, 1, 1), padding='SAME', use_batchnorm=True, dropout=None): input_filter_size = X.shape[-1] Wconv = tf.get_variable(f'Wconv{idx}', shape=[*kernel_size, input_filter_size, filters]) bc...
{"hexsha": "756f030db3728e7056f49aff1f439f5a9850c49d", "size": 1095, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment2/nn/cnn.py", "max_stars_repo_name": "hyzhak/cs231n-lecture-notes", "max_stars_repo_head_hexsha": "0f0a586a1f015e97f6ea62ad9711ac6e766f46bc", "max_stars_repo_licenses": ["MIT"], "max_sta...
// Copyright 2015-2018 Hans Dembinski // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_HISTOGRAM_DETAIL_COMMON_TYPE_HPP #define BOOST_HISTOGRAM_DETAIL_COMMON_TYPE_HPP #include <boost/histogram/d...
{"hexsha": "e1a4b664695eb06e6def7a40a714e2c2b82f4861", "size": 2354, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "core/lib/boost/boost/histogram/detail/common_type.hpp", "max_stars_repo_name": "RomanWlm/lib-ledger-core", "max_stars_repo_head_hexsha": "8c068fccb074c516096abb818a4e20786e02318b", "max_stars_repo_l...
//////////////////////////////////////////////////////////// // Nero Game Engine // Copyright (c) 2016-2020 Sanou A. K. Landry ///////////////////////////////////////////////////////////// ///////////////////////////HEADERS/////////////////////////// //NERO #include <Nero/editor/GameProject.h> #include <Nero/core/cpp/u...
{"hexsha": "e3a407455f5175780d5d23562245bf23a7294a72", "size": 18111, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/editor/GameProject.cpp", "max_stars_repo_name": "NeroGames/Nero-Game-Engine", "max_stars_repo_head_hexsha": "8543b8bb142738aa28bc20e929b342d3e6df066e", "max_stars_repo_licenses": ["MIT"], "max_...
""" """ from __future__ import division, print_function, absolute_import, unicode_literals import numpy as np from ...smhm_models import ZuMandelbaum15SmHm __all__ = ('test_mc_scatter1', ) def test_mc_scatter1(): model = ZuMandelbaum15SmHm(redshift=0) sm = model.mc_stellar_mass(prim_haloprop=1e12)
{"hexsha": "7290319706d8c8d7c34dca5c9704d027945ccd34", "size": 313, "ext": "py", "lang": "Python", "max_stars_repo_path": "halotools/empirical_models/smhm_models/tests/test_zu_mandelbaum15.py", "max_stars_repo_name": "pllim/halotools", "max_stars_repo_head_hexsha": "6499cff09e7e0f169e4f425ee265403f6be816e8", "max_stars...
[STATEMENT] lemma basis_reduction_swap_code[code]: "basis_reduction_swap i ((f1,f2), dmus, ds) = (let di = ds !! i; dsi = ds !! (Suc i); im1 = i - 1; dim1 = ds !! im1; fi = hd f2; fim1 = hd f1; dmu_i_im1 = dmus !! i !! im1; fi' = fim1; fim1' = fi in ...
{"llama_tokens": 1594, "file": "LLL_Basis_Reduction_LLL_Impl", "length": 5}
import unittest import numpy as np from mockito import any, mock, when, unstub from bcipy.helpers.task import alphabet, trial_reshaper from bcipy.helpers.load import load_json_parameters class TestAlphabet(unittest.TestCase): def test_alphabet_text(self): parameters_used = 'bcipy/parameters/parameters....
{"hexsha": "239083b5da2a4176997db96904f3413c14467130", "size": 2643, "ext": "py", "lang": "Python", "max_stars_repo_path": "bcipy/helpers/tests/test_task.py", "max_stars_repo_name": "theGreenJedi/BciPy", "max_stars_repo_head_hexsha": "222ac9b79f1ab3374e888be9e9b8d86f88d1bc82", "max_stars_repo_licenses": ["MIT"], "max_s...
import re import time import json import random import collections import numpy as np import tensorflow as tf from os import makedirs from os.path import exists class KGE(): """A Framework of Knowledge Graph Embedding Models.""" def __init__(self, args): """ (1) Initialize...
{"hexsha": "eb41d8dfa56219c353bccf273d9564cb569a0206", "size": 15271, "ext": "py", "lang": "Python", "max_stars_repo_path": "KGE.py", "max_stars_repo_name": "ZhuChaoY/R-GCN-enhanced-KGE", "max_stars_repo_head_hexsha": "73cd5355d1f553d009f52676fbe5ed19f2f54fc8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
#!/usr/bin/env python # encoding: utf-8 r""" Variable-coefficient acoustics example. """ import numpy as np def acoustics2D(kernel_language='Fortran',iplot=False,htmlplot=False,use_petsc=False,outdir='./_output',solver_type='classic'): """ Example python script for solving the 2d acoustics equations. """ ...
{"hexsha": "408df961c1ae8d42bd5a597db75cc7d00f2450b8", "size": 2549, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/acoustics_2d_variable/acoustics.py", "max_stars_repo_name": "arashb/pyclaw", "max_stars_repo_head_hexsha": "dbe0bc28ed801b16c501bdff58012c30f7a90b9f", "max_stars_repo_licenses": ["BSD-3-Claus...
import os import os.path as osp import numpy as np import cv2 import shutil from PIL import Image import paddlex as pdx # 定义训练集切分时的滑动窗口大小和步长,格式为(W, H) train_tile_size = (1024, 1024) train_stride = (512, 512) # 定义验证集切分时的滑动窗口大小和步长,格式(W, H) val_tile_size = (769, 769) val_stride = (769, 769) # 下载并解压2015 CCF大数据比赛提供的高清遥感影像...
{"hexsha": "fe8c7e24927e803081c1196d3ff8325c8469409b", "size": 3929, "ext": "py", "lang": "Python", "max_stars_repo_path": "static/examples/remote_sensing/prepara_data.py", "max_stars_repo_name": "cheneyveron/PaddleX", "max_stars_repo_head_hexsha": "86f73fc6a66b12c638f642524bfd1cf730e26c4b", "max_stars_repo_licenses": ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # yampex: # Yet Another Matplotlib Extension # # Copyright (C) 2017-2021 by Edwin A. Suominen, # http://edsuom.com/yampex # # See edsuom.com for API documentation as well as information about # Ed's background and other projects, software and otherwise. # # Licensed unde...
{"hexsha": "58e2c319e3acd1dfaee5067660f562ccecbb162c", "size": 13270, "ext": "py", "lang": "Python", "max_stars_repo_path": "yampex/test/test_annotate.py", "max_stars_repo_name": "edsuom/yampex", "max_stars_repo_head_hexsha": "624bc178fe0b04cf427895f6ad0a911e7e41b5a3", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
''' DKRZ matplotlib script: DKRZ_example_ICON_tricontourf.py Description: Python script using matplotlib - ICON model data - variable 'ta' - extract subregion with python-cdo - cell center - add colorbar...
{"hexsha": "f2a8bc049469545f64179781d94ca27389a6fb0d", "size": 3428, "ext": "py", "lang": "Python", "max_stars_repo_path": "Visualization/Cartopy/draw_ICON_contours.py", "max_stars_repo_name": "1271756664/-xESMF", "max_stars_repo_head_hexsha": "f2341fe5a949050dc9e350fdc8c7d3e3d3d48222", "max_stars_repo_licenses": ["MIT...
""" Script for serving. """ from flask import current_app, Flask, request import pandas as pd import numpy as np from tensorflow.keras import models OUTPUT_MODEL_NAME = "/artefact/bdrk-model/model_COVID_bdrk.h5" # pylint: disable=invalid-name app = Flask(__name__) @app.before_first_request def init_background_threa...
{"hexsha": "d6936f273a4ec434664df41849f3acbd94e3688b", "size": 1582, "ext": "py", "lang": "Python", "max_stars_repo_path": "serve_http.py", "max_stars_repo_name": "hfchong/test-tf-upload-serve", "max_stars_repo_head_hexsha": "4fb4db8fcb06d8b4e131ab329e4ef30933e37890", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# -*- coding: utf8 -*- import os.path import torch import torch.utils.data as data from data.image_folder import make_dataset from PIL import Image import random import nibabel as nib from abc import ABC, abstractmethod import numpy as np from util.myutils import normalizationminmax1 from util.myutils import...
{"hexsha": "b8ba7d9f151e975fe30e603f0dddc0e8614604f9", "size": 3871, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/downsample_micro_test_dataset.py", "max_stars_repo_name": "rameshnair007/SR-cycleGAN", "max_stars_repo_head_hexsha": "a111131fadb2fca45c6655410107e040d6973351", "max_stars_repo_licenses": ["B...
import jsonpickle as j import numpy as np import importlib import argparse import ast parser = argparse.ArgumentParser() parser.add_argument('args') args = parser.parse_args() arguments = ast.literal_eval(args.args) module = importlib.import_module('sklearn.' + arguments[0]) estimatorName = arguments[1...
{"hexsha": "9cacd040133bff169d38be6ae3058c775894d328", "size": 957, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/exec.py", "max_stars_repo_name": "lramsey/scikit-node", "max_stars_repo_head_hexsha": "2306341ce93e316f0dc065e1ae22f3724ae47c8c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 72, "max...
import numpy as np import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from sklearn import preprocessing from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix from sklearn.metrics import roc_curve from keras.models import Sequential from keras.lay...
{"hexsha": "50dbb2c34b15d6066bd4d5abdfc8788e581a309d", "size": 6428, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter 2/visualize.py", "max_stars_repo_name": "andrebodo/neural-network-scratch-start", "max_stars_repo_head_hexsha": "fd3f3b12435a84520851ee0ad786b327ce173abc", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma length_s_mtf[simp]: "length(s_mtf n) = length s0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length (s_mtf n) = length s0 [PROOF STEP] by (induction n) simp_all
{"llama_tokens": 83, "file": "List_Update_Move_to_Front", "length": 1}
[STATEMENT] lemma mult_map_poly_imp_map_poly: assumes "map_poly complex_of_real q = r * map_poly complex_of_real p" "p \<noteq> 0" shows "r = map_poly complex_of_real (map_poly Re r)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. r = map_poly complex_of_real (map_poly Re r) [PROOF STEP] proof - [PRO...
{"llama_tokens": 3464, "file": "Three_Circles_RRI_Misc", "length": 32}
import torch import numpy as np import seq_des.util.data as data import seq_des.util.canonicalize as canonicalize import seq_des.util.voxelize as voxelize import common.atoms import torch.nn.functional as F from torch.distributions.categorical import Categorical def get_idx(filename): # get variable or fixed in...
{"hexsha": "0aac36bf399a15bb5ed876590ed6a9a72ec42484", "size": 12290, "ext": "py", "lang": "Python", "max_stars_repo_path": "seq_des/util/sampler_util.py", "max_stars_repo_name": "Tpan1039-ui/protein_seq_des", "max_stars_repo_head_hexsha": "2156963079371cff6c74c1d6e8106b113663dd61", "max_stars_repo_licenses": ["BSD-3-C...
# ============================================================================== # Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # ============================================================================== """Openvino Tensorflow log operation test """ from __future__ import absolute_i...
{"hexsha": "5d907fcd48a87cb59af2907cc4ae793a78867553", "size": 1083, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/python/test_while_loop.py", "max_stars_repo_name": "slyalin/openvino_tensorflow", "max_stars_repo_head_hexsha": "37a2e5b6ff1e60217d31340ad3975b41faa39da0", "max_stars_repo_licenses": ["Apache...
import argparse import json from os import listdir, makedirs from os.path import isfile, join, expanduser import numpy as np import torch import torch.backends.cudnn as cudnn import torch.nn.functional as F from PIL import Image from tqdm.auto import tqdm import torchvision.transforms.functional as TF from adv_patch_...
{"hexsha": "ff3e90aa858436d122c919e9f04e1772b179a179", "size": 6133, "ext": "py", "lang": "Python", "max_stars_repo_path": "prep_vistas_for_yolo.py", "max_stars_repo_name": "chawins/adv-patch-bench", "max_stars_repo_head_hexsha": "224c4a39f9322cd27312deffbf5e8c882bce3dd2", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" struct DirichletFESpace <: SingleFieldFESpace space::SingleFieldFESpace end """ struct DirichletFESpace{S<:SingleFieldFESpace} <: SingleFieldFESpace space::S function DirichletFESpace(space::SingleFieldFESpace) new{typeof(space)}(space) end end ConstraintStyle(::Type{DirichletFESpace{B}}) ...
{"hexsha": "99712effddd62658ba908816d1c4dffaf65eed51", "size": 1792, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FESpaces/DirichletFESpaces.jl", "max_stars_repo_name": "Omega-xyZac/Gridap.jl", "max_stars_repo_head_hexsha": "c9f0ca39a0c84646ea9e4b57fd39d3a6db59c044", "max_stars_repo_licenses": ["MIT"], "ma...
import ants import numpy as np import h5py import time from zebrafish_io import lif_read_stack, save import multiprocessing as mp def pipeline(file_path,fixed_index,moving_indices,rigid_out_file,atlas_file,transform_out_file,out_diff_file): stack,spacing=lif_read_stack(file_path) #rigid=rigid_registration(stac...
{"hexsha": "bc5518ca16f5ee0b6c0fe3ebcda103a6b93b1c84", "size": 3613, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline.py", "max_stars_repo_name": "mariakesa/ZebraFishRegistrationPipeline", "max_stars_repo_head_hexsha": "4955044eb69dc04c579f59ccb24e02e4451aebcc", "max_stars_repo_licenses": ["MIT"], "max_s...
from scipy import ndimage as ndi import matplotlib.pyplot as plt from skimage.morphology import disk from skimage.segmentation import watershed from skimage import data from skimage.filters import rank from skimage.util import img_as_ubyte from skimage import io from skimage.color import rgb2gray image = io.imread("...
{"hexsha": "1e53b38e36f8256f96772d18a066b70a75ba9acf", "size": 1388, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/markers_of_watershed_transform.py", "max_stars_repo_name": "ComicShrimp/scikit-image-filters", "max_stars_repo_head_hexsha": "973ef190bf4dc74c8c9a89ffe8092d94d51d4bbd", "max_stars_repo_license...
import logging import os import pickle import numpy as np import torch import torch.nn.functional as F from tqdm import tqdm def autotune_threshold(ratio, graph): threshold = 1.0 r = 0.0 for th in range(100, 0, -1): th = th / 100.0 logging.info( f"Autotuning threshold for grap...
{"hexsha": "fb6eec36a2dfe965b770ecf7b5ad853fc4a5f415", "size": 3223, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/gcn_utils.py", "max_stars_repo_name": "nashory/rtic-gcn-pytorch", "max_stars_repo_head_hexsha": "75c3a6d6c05dd69f1260db7b0b4bfaca20c56d5d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # periodbase - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jan 2017 '''This top-level module hoists all period-finder functions up into the ``astrobase.periodbase`` namespace, so you can do:: from astrobase import periodbase periodbase.<name of period-finder fun...
{"hexsha": "8feb07f3be932715ac288071366f5154e80ebd03", "size": 3261, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrobase/periodbase/__init__.py", "max_stars_repo_name": "pierfra-ro/astrobase", "max_stars_repo_head_hexsha": "b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c", "max_stars_repo_licenses": ["MIT"], "max...
""" Q1: 袋中有5张标号1,2,3,4,5的卡片,现从中有放回地抽出3张卡片,号码之和X的数学期望为 """ import numpy as np def calculate_Q1(): all_result = [(a, b, c) for a in [1, 2, 3, 4, 5] for b in [1, 2, 3, 4, 5] for c in [1, 2, 3, 4, 5]] all_sum = [sum(x) for x in all_result] val, count = np.unique(all_sum, return_counts=True) pr...
{"hexsha": "5aa3080e8aaf46ba5194e01310eb9818847fb46b", "size": 505, "ext": "py", "lang": "Python", "max_stars_repo_path": "probability_basic/discrete_distributions/calculate_exception.py", "max_stars_repo_name": "OnlyBelter/MachineLearning_examples", "max_stars_repo_head_hexsha": "c2d766540aacb0aea1a4892c97c5dd509bf2a6...
# # Draft ACEModel Interface: # # * A model incorporates both the parameterisation and the parameters. # * E.g. a LinearACEModel would know about the basis and the coefficients # * We can then perform the following operations: # - evaluate the model at a given configuration, with given parameters # - take grad...
{"hexsha": "1ec2b50175fc80d42116be829242902cd93f2d25", "size": 4002, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/linearmodel.jl", "max_stars_repo_name": "davkovacs/ACE.jl", "max_stars_repo_head_hexsha": "f0174e768d1ab21e10a6c3d619038843a3fd1458", "max_stars_repo_licenses": ["RSA-MD"], "max_stars_count": n...
#file for pitch estimation, pitch changing, other vocoding stuff #idea: take a simple rc-relaxation pll # then run it on the audio mixed up to a higher frequency band where # the span is much less than an octave # then pll to the zero crossings and get the pitch?? # import math import numpy as np import scipy.signa...
{"hexsha": "cee4bc6a2910164af211bb640e854facae75ee76", "size": 49057, "ext": "py", "lang": "Python", "max_stars_repo_path": "pitch.py", "max_stars_repo_name": "Paul-31415/soundplay", "max_stars_repo_head_hexsha": "0e7ea27c6d4bdf5f94e5034c7775a10c62d1583e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"hexsha": "10ab76e4bfb1581cb631e1ac1410fba76e562923", "size": 5061, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/test_accuracy_op.py", "max_stars_repo_name": "zmxdream/Paddle", "max_stars_repo_head_hexsha": "04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c", "max_stars_repo_licens...
# -*- coding: utf-8 -*- import numpy as np import pytest from africanus.model.coherency import convert as np_convert from africanus.model.coherency.cuda import convert from africanus.model.coherency.tests.test_convert import ( stokes_corr_cases, ...
{"hexsha": "acf4f0e916794a5f6e050c1b0db445131f96479a", "size": 1595, "ext": "py", "lang": "Python", "max_stars_repo_path": "africanus/model/coherency/cuda/tests/test_convert.py", "max_stars_repo_name": "JoshVStaden/codex-africanus", "max_stars_repo_head_hexsha": "4a38994431d51510b1749fa0e4b8b6190b8b530f", "max_stars_re...
import df2img import numpy as np import bots.config_discordbot as cfg from bots.config_discordbot import logger from bots.helpers import save_image from gamestonk_terminal.stocks.due_diligence import finviz_model def analyst_command(ticker=""): """Displays analyst recommendations [Finviz]""" # Debug if ...
{"hexsha": "377ee4bae3783686ad29bbe6522ff5b9457177dc", "size": 1414, "ext": "py", "lang": "Python", "max_stars_repo_path": "bots/stocks/due_diligence/analyst.py", "max_stars_repo_name": "b17z/GamestonkTerminal", "max_stars_repo_head_hexsha": "135eedb8d995fd10baff6283de525e8a4d124cae", "max_stars_repo_licenses": ["MIT"]...
import numpy as np from copy import deepcopy as copy from rl4rs.env import RecSimBase, RecState import tensorflow as tf from rl4rs.utils.datautil import FeatureUtil class SlateState(RecState): def __init__(self, config, records): super().__init__(config, records) self.batch_size = self.config["bat...
{"hexsha": "c6f22e9eb80536d6a04719f592d63325bd7e486f", "size": 13132, "ext": "py", "lang": "Python", "max_stars_repo_path": "rl4rs/env/slate.py", "max_stars_repo_name": "fuxiAIlab/RL4RS", "max_stars_repo_head_hexsha": "e26ee5d068eaffd0f04779067614e34e313b1200", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
program programWithSubmodule use moduleWithSubmodule type(<caret>subtype) :: a end
{"hexsha": "a1543176ae8588d7df6e021a19d6f470f0fafc17", "size": 90, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "src/test/resources/resolve/ProgramWithSubmoduleType.f95", "max_stars_repo_name": "LChernigovskaya/fortran-plugin", "max_stars_repo_head_hexsha": "6750933e79c5bf420937160aecedc39b142ca5f6", "max_st...
import time, sys, os import dill as pickle import numpy as np import scipy.constants as constants import scipy.interpolate as interp import scipy.optimize as opti from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib.ticker import (FormatStrFormatter, MultipleLocator) import grav_ut...
{"hexsha": "9ea8755e7da5b1a4c3f8381b7638642956a085b6", "size": 16512, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/patch_potentials/plot_patch_potential_data.py", "max_stars_repo_name": "charlesblakemore/opt_lev_analysis", "max_stars_repo_head_hexsha": "704f174e9860907de349688ed82b5812bbb07c2d", "max_...
name = "rssi" from subprocess import Popen, PIPE # Used to run native OS commads in python wrapped subproccess import numpy # Used for matrix operations in localization algorithm # RSSI_Scan # Use: # from rssi import RSSI_Scan # rssi_scan_instance = RSSI_Scan('network_interface_name) # ------...
{"hexsha": "439b2d7104efffd5bd81122dfb0fd6426684763e", "size": 22425, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib.linux-x86_64-2.7/rssi/__init__.py", "max_stars_repo_name": "JLBicho/rssi_module", "max_stars_repo_head_hexsha": "8f80f7125ee48344ea77736b0c24ca245fb42f02", "max_stars_repo_licenses": ["...
# Global_objects.py – Software ACUITEE # Copyright 2021 b<>com. All rights reserved. # This software is licensed under the Apache License, Version 2.0. # 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 r...
{"hexsha": "583e40519fbd7cdc41009335a0932be11bb9e8da", "size": 3093, "ext": "py", "lang": "Python", "max_stars_repo_path": "application/Global_objects.py", "max_stars_repo_name": "b-com/ACUITEE", "max_stars_repo_head_hexsha": "c273c3d838ed96e95df230342a580ba00a8c4917", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import numpy as np import tensorflow as tf class AttributionMask(object): """Base class for saliency masks""" def __init__(self, model): self.model = model def GetMask(self, x_value): raise NotImplementedError('A derived class should implemented GetMask()') def GetSmoothedMask(self, x_value, target_c...
{"hexsha": "f137cad47ff0c3024c21cde1aacc4d534e83f111", "size": 1400, "ext": "py", "lang": "Python", "max_stars_repo_path": "attribute/gradients.py", "max_stars_repo_name": "psbots/attribute", "max_stars_repo_head_hexsha": "252b3ff19f2c070dc07637153a42fa9da901cdb8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
# Construction du point P(t) d'une courbe de Bézier pour # la valeur t du paramètre, par l'algorithme de Casteljau. # Données : XP, YP coordonnées des points de contrôle # t valeur du paramètre # Résultats : x,y coordonnées du point P(t) import numpy as np def c...
{"hexsha": "b2545767b1ed4effde3c58d0d24e1d8f0afa61b9", "size": 759, "ext": "py", "lang": "Python", "max_stars_repo_path": "casteljau.py", "max_stars_repo_name": "JosueGauthier/Surface-de-Bezier-Python", "max_stars_repo_head_hexsha": "e37847296cbbe36f0c72c9cefc1861870ce883db", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma reads_bind_pure: assumes "pure f h" and "pure f h'" and "reads S f h h'" and "\<And>x. h \<turnstile> f \<rightarrow>\<^sub>r x \<Longrightarrow> reads S (g x) h h'" shows "reads S (f \<bind> g) h h'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. reads S (f \<bind> g) h h' [PROOF STEP]...
{"llama_tokens": 305, "file": "Core_SC_DOM_common_preliminaries_Heap_Error_Monad", "length": 2}
# Refer to http://docs.opencv.org/3.1.0/dd/d49/tutorial_py_contour_features.html#gsc.tab=0 # Import is still cv2 when using OpenCV 3.0 import cv2 import numpy as np imgFile = "coffeePot.jpg" img = cv2.imread(imgFile, 0) ret,tresh = cv2.threshold(img,127,255,0) contours,hiearchy = cv2.findContours(thresh, 1, 2) cnt = ...
{"hexsha": "b66ff9580e9683abda2713a8dfe16b8b05c401f5", "size": 1079, "ext": "py", "lang": "Python", "max_stars_repo_path": "imaging/contour_detector.py", "max_stars_repo_name": "ciauri/CoffeeRobot", "max_stars_repo_head_hexsha": "1efdeca1cb11ff8fb8a720e0b991cee13eff5fcb", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/env python #################################################################################################### # Load the necessary libraries ################################################################################################### import networkx as nx import numpy as np from scipy import spars...
{"hexsha": "c6389133a241acb85c328e1fe5e3f8c67eb2df74", "size": 12633, "ext": "py", "lang": "Python", "max_stars_repo_path": "SG/pipeline/py/old/pipeline.fromIlastik.py", "max_stars_repo_name": "BiCroLab/WSI-analysis", "max_stars_repo_head_hexsha": "9f55a7a5296d006f2da8adfb2fe6a22eebe3dc42", "max_stars_repo_licenses": [...
#pragma once #include <chrono> #include <random> #include <iostream> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include <spdlog/spdlog.h> #include <spdlog/sinks/basic_file_sink.h> namespace pneat { class Genome; using boost::property_tree::ptree; using boost::property_t...
{"hexsha": "bc4c68aa8580744b76f93637eb2f37e7a829181c", "size": 3291, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "util.hpp", "max_stars_repo_name": "piero0/myNEAT", "max_stars_repo_head_hexsha": "b2c5a4e98274d20fd18765a624ad5f8347ffaaa1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r...
""" Python | Thresholding techniques using OpenCV Set-3 (Otsu Thresholding) In Otsu Thresholding, a value of the threshold isn't chosen but is determined automatically. A bimodal image (two distinct image values) is considered. The histogram generated contains two peaks. So, a generic condition wou...
{"hexsha": "5427d73ab298a61b9ca3e888c8552855f1448647", "size": 1296, "ext": "py", "lang": "Python", "max_stars_repo_path": "OpenCV2/Image_Processing/Otsu_Thresholding.py", "max_stars_repo_name": "siddharth-143/Python", "max_stars_repo_head_hexsha": "293f4643a3a13e3b82d23fd8922db54dbb0f12bc", "max_stars_repo_licenses": ...