text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import torch.optim.lr_scheduler as scheduler import numpy as np from vel.api import Callback, SchedulerFactory class LadderScheduler(Callback): """ Scheduler defined by a set of learning rates after reaching given number of iterations """ def __init__(self, optimizer, ladder, last_epoch): self.sched...
{"hexsha": "0699c266722934fd86252e62b0a2b9f77ec115c6", "size": 1219, "ext": "py", "lang": "Python", "max_stars_repo_path": "vel/scheduler/ladder.py", "max_stars_repo_name": "galatolofederico/vel", "max_stars_repo_head_hexsha": "0473648cffb3f34fb784d12dbb25844ab58ffc3c", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#https://codegolf.stackexchange.com/questions/10701/fastest-code-to-find-the-next-prime import sys import numpy as np import tqdm min_order = int(sys.argv[1]) max_order = int(sys.argv[2]) primes_order = int(sys.argv[3]) max_gap = int(sys.argv[4]) N_core = int(sys.argv[5]) N_order = max_order-min_order+1 N_primes = po...
{"hexsha": "849e623e729cb6dcb0030749c7e7cd1cdb808676", "size": 5699, "ext": "py", "lang": "Python", "max_stars_repo_path": "PrimeGaps/primegaps_sampling.py", "max_stars_repo_name": "DouglasBoubert/VisualisationEveryWeek", "max_stars_repo_head_hexsha": "aed332c3ae5706f9826a6e5460986a2b3df68b76", "max_stars_repo_licenses...
(* Title: HOL/Auth/n_g2kAbsAfter_lemma_inv__28_on_rules.thy Author: Yongjian Li and Kaiqiang Duan, State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences Copyright 2016 State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences *) header{*T...
{"author": "lyj238Gmail", "repo": "newParaVerifier", "sha": "5c2d49bf8e6c46c60efa53c98b0ba5c577d59618", "save_path": "github-repos/isabelle/lyj238Gmail-newParaVerifier", "path": "github-repos/isabelle/lyj238Gmail-newParaVerifier/newParaVerifier-5c2d49bf8e6c46c60efa53c98b0ba5c577d59618/examples/n_g2kAbsAfter/n_g2kAbsAft...
import csv import pandas import scipy.stats class TimeDataSet: sortTypes = ["BubbleSort", "InsertionSort", "MergeSort", "QuickSort", "SelectionSort"] def __init__(self, fileName): file = open(fileName) reader = csv.DictReader(file, fieldnames=self.sortTypes) self.sortTimes = {} ...
{"hexsha": "ff090498557bfa499634545d7df4577aea069b92", "size": 2194, "ext": "py", "lang": "Python", "max_stars_repo_path": "EvaluateData.py", "max_stars_repo_name": "SaurabhTotey/D-Language-Array-Measurements", "max_stars_repo_head_hexsha": "cc431df411adea1912ce4cd3deac159f030753f4", "max_stars_repo_licenses": ["Unlice...
"""Unit tests for the `src.milannotations.datasets` submodule.""" import csv import shutil from tests import conftest from src.milannotations import datasets import numpy import pytest import torch from PIL import Image @pytest.fixture def top_images(): """Return TopImages for testing.""" return datasets.To...
{"hexsha": "b6e7d767f3f1c1742d5522f257b87c867deebcb9", "size": 15273, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/milannotations/datasets_test.py", "max_stars_repo_name": "ericotjo001/neuron-descriptions", "max_stars_repo_head_hexsha": "744fbf65c6538edd2fa423108eca7e2cd72f8b59", "max_stars_repo_license...
# This code is based on: https://github.com/msmsajjadi/precision-recall-distributions/blob/master/prd_score.py """Precision and recall computation based on samples from two distributions. Given a set of generated samples and samples from the test set, both embedded in some feature space (say, embeddings of Inception N...
{"hexsha": "4c16fe10911b92edfc021251b091775065215eb7", "size": 8297, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval/precision_recall.py", "max_stars_repo_name": "i-supermario/Cifar100_CL", "max_stars_repo_head_hexsha": "6c22151ea2c4c3014a569112fdf8a549331b27c4", "max_stars_repo_licenses": ["MIT"], "max_sta...
using TerminalExtensions function Base.display(disp::TerminalExtensions.iTerm2.InlineDisplay, p::PredictionFrame) Base.display(disp, [p]) end function Base.display(disp::TerminalExtensions.iTerm2.InlineDisplay, frames::Vector{PredictionFrame}) print_frame_table(image_display_callback, frames) end function im...
{"hexsha": "86b8e99c38de449ab8c484a477030a833cc1f820", "size": 1312, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/display/terminal_extensions.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Metalhead.jl-dbeba491-748d-5e0e-a39e-b530a07fa0cc", "max_stars_repo_head_hexsha": "b61ddec642a6e9dfb88961c4ceb76ec...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <ndlinear/gsl_multifit_ndlinear.h> #include <gsl/gsl_math.h> #include <gsl/gsl_sf_laguerre.h> #include <gsl/gsl_sf_legendre.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_vector.h> #include <gsl/gsl_multifit.h> #include <gsl/gsl_rng.h> #include <gsl/...
{"hexsha": "a4872bf1a77cf2a2be99b4c83307d434f54fb98d", "size": 6164, "ext": "c", "lang": "C", "max_stars_repo_path": "src/BodyComponents/archive/ndlinear-1.0/doc/examples/harmosc.c", "max_stars_repo_name": "rennhak/Keyposes", "max_stars_repo_head_hexsha": "e5ffe4c849b0894f27d58985b41ec8edd3432be1", "max_stars_repo_lice...
import unittest from mltoolkit.mldp.steps.transformers.nlp import WindowSlider from mltoolkit.mldp.steps.transformers.nlp.helpers import create_new_field_name from mltoolkit.mldp.utils.tools import DataChunk import numpy as np class TestWindowSlider(unittest.TestCase): def setUp(self): self.field_name = "...
{"hexsha": "b91c61a752ad81bb3ad2ba5a7e0f42efd643c33d", "size": 4569, "ext": "py", "lang": "Python", "max_stars_repo_path": "mltoolkit/mldp/tests/transformers/test_window_slider.py", "max_stars_repo_name": "mancunian1792/FewSum", "max_stars_repo_head_hexsha": "c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e", "max_stars_repo_l...
"""This module defines classes of the package.""" # Author: Henri Gérard <hgerard.proy@gmail.com> # License: MIT abstract type RegressionModel end # Define an object to type LinearRegression <: RegressionModel function LinearRegression() return new() end end type LogisticRegression <: RegressionMod...
{"hexsha": "e1ebc908db23e84fe6397438d5a1168ad661d0f9", "size": 2879, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tests/test_objects.jl", "max_stars_repo_name": "Henri-Gerard/robox", "max_stars_repo_head_hexsha": "8ad29add8641e3a1255a22185907124cb8afa050", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\subsection{Complexity Estimate} \label{complexity_estimate} The Complexity Estimate (CE) is a complexity measure for time series and the authors of \cite{batista2011complexity} introduced one possible approach of a CE implementation. Given is a time series $Q = (q_1, q_2, \dots, q_i, \dots, q_l)$ with length $l$ over ...
{"hexsha": "9e23a2af7f334bb0e83e00889ff261177e031f36", "size": 1020, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "bachelor-thesis/background_and_notation/complexity_estimate.tex", "max_stars_repo_name": "GordonLesti/SlidingWindowFilter", "max_stars_repo_head_hexsha": "22c11f2912a5c523ae8ad85a849e2d0b123536ec", ...
# -*- coding: utf-8 -*- """ Created on Sun May 12 16:34:44 2019 @author: Alexandre """ ############################################################################### import numpy as np ############################################################################### from pyro.control import robotcontrollers from pyro...
{"hexsha": "da658709686ee2f9d2ecac853d71bf02af38f0c5", "size": 1239, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/robot_arms/twolinkrobot_effector_pid_controller.py", "max_stars_repo_name": "gabrielcabana21/pyro", "max_stars_repo_head_hexsha": "a3107d7b676a0fe1afb89a18a5a63d08fe9f0998", "max_stars_re...
import numpy as np from l5kit.data import ChunkedDataset, get_agents_slice_from_frames, get_tl_faces_slice_from_frames def insert_agent(agent: np.ndarray, frame_idx: int, dataset: ChunkedDataset) -> None: """Insert an agent in one frame. Assumptions: - the dataset has only 1 scene - the dataset is in...
{"hexsha": "3660acac918f0a8864e6a8c083a30724c537cf53", "size": 5635, "ext": "py", "lang": "Python", "max_stars_repo_path": "l5kit/l5kit/simulation/utils.py", "max_stars_repo_name": "cdicle-motional/l5kit", "max_stars_repo_head_hexsha": "4dc4ee5391479bb71f0b373f39c316f9eef5a961", "max_stars_repo_licenses": ["Apache-2.0"...
import pytest import os import cv2 import numpy as np from plantcv.plantcv.transform import (get_color_matrix, get_matrix_m, calc_transformation_matrix, apply_transformation_matrix, save_matrix, load_matrix, correct_color, create_color_card_mask, quick_color_check, ...
{"hexsha": "48a8adca689ae7b1e9f6c39f927c5822193a31cd", "size": 14190, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/plantcv/transform/test_color_correction.py", "max_stars_repo_name": "ygarrot/plantcv", "max_stars_repo_head_hexsha": "e934a891e0d1bf8987ca6a9f982a4ac1f420bfe7", "max_stars_repo_licenses": [...
[STATEMENT] lemma master1_automation: assumes "g \<in> O(MASTER_BOUND'' p')" "1 < (\<Sum>i<k. as ! i * bs ! i powr p')" "eventually (\<lambda>x. f x > 0) at_top" shows "f \<in> \<Theta>(MASTER_BOUND p 0 0)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. f \<in> \<Theta>(MASTER_BOUND p 0 0) [PROOF ST...
{"llama_tokens": 1242, "file": "Akra_Bazzi_Akra_Bazzi_Method", "length": 11}
'''Implementations of uniform distributions.''' import numpy as np from astropy import units from astropy.coordinates import SkyCoord TWO_PI = 2*np.pi @units.quantity_input(area=units.sr) def uniform_around(centre, area, size): '''Uniform distribution of points around location. Draws randomly distributed p...
{"hexsha": "661d15d4e2613694bb21ccad12a3f7ce431621c7", "size": 3703, "ext": "py", "lang": "Python", "max_stars_repo_path": "skypy/position/_uniform.py", "max_stars_repo_name": "ArthurTolley/skypy", "max_stars_repo_head_hexsha": "5621877ada75c667b1af7e665b02a91026f7ef0f", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
ouRevolution is a current publication of AS Papers which caters to the interest of AfricanAmericans African American students at UC Davis. Its Chief Editor is Alyssa Munson. Mission Statement ouRevolution Our Voice is an AS PAPERS publication. We place special emphasis on the unique needs of the African American an...
{"hexsha": "43561e430736c1f2ccab254379f45d0ef47d6c62", "size": 907, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/ouRevolution.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma eval_fps_0 [simp]: "eval_fps (0 :: 'a :: {banach, real_normed_div_algebra} fps) z = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. eval_fps 0 z = (0::'a) [PROOF STEP] by (simp only: fps_const_0_eq_0 [symmetric] eval_fps_const)
{"llama_tokens": 122, "file": null, "length": 1}
""" Get candidate object boxes (both GT and candidates) to provide to detectron to compute appearance/object scores The way we have implemented this : 1. Run the object detector to get candidate object (we used Detectron) 2. Create database object merging candidate detections and groundtruth 3. Forward the bounding box...
{"hexsha": "d464943e00cc7b0c6c797bb743cb55cee46a0682", "size": 1788, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/compute_candidate_boxes.py", "max_stars_repo_name": "doulemint/analogy", "max_stars_repo_head_hexsha": "75d17812080fde74c9032fb338ef0c6ab2667f44", "max_stars_repo_licenses": ["MIT"], "max_st...
#Generacion de la Linea de Muerte para la UBA año 2020 #Solo necesita 32GB de memoria RAM , 8 vCPU y una hora para correr #limpio la memoria rm( list=ls() ) #remove all objects gc() #garbage collection require("data.table") require("lightgbm") require("DiceKriging") require("mlrMBO") #en estos archiv...
{"hexsha": "409183875a6811d8f62be8931ac1a03143c2d3b0", "size": 7561, "ext": "r", "lang": "R", "max_stars_repo_path": "scripts/lineademuerte.r", "max_stars_repo_name": "miglesias91/dmeyf", "max_stars_repo_head_hexsha": "6b73adacd2f23644b8a14efd784d038c5ec79157", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# from sklearn.tree import DecisionTreeClassifier # import pickle # import numpy as np # def resume_clf(train_object): # """ # :param train_object: List-like object with training data as values # :return: 1 in case of any error, 0 otherwise. # """ # try: # X_train = np.ar...
{"hexsha": "d75189628cc3dba411a8c7341151f3b0bca0198b", "size": 682, "ext": "py", "lang": "Python", "max_stars_repo_path": "api/lib/algorithms.py", "max_stars_repo_name": "roshnet/peoplestat-api", "max_stars_repo_head_hexsha": "cf17a40def4dc2f094239870a09086c3f3a9eea5", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
module Issue252 where data I : Set where zero : I data D : I → Set where c : ∀ i → D i → D i id : I → I id i = i index : ∀ i → D i → I index i _ = i foo : ∀ i → D i → D zero foo .i (c i d) with id i foo ._ (c i d) | zero = d bar : ∀ i → D i → D zero bar .i (c i d) with index i d bar ._ (c i d) | zero = d -- ...
{"hexsha": "23f0bf5417b640cc0809fe15968f0279e8acb970", "size": 424, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/succeed/Issue252.agda", "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
__author__ = 'INVESTIGACION' import numpy as np from copy import deepcopy import math def getHeuristic(matrix, pesos): """ Vamos a utilizar Cj/Pj donde Pi se obtiene por el numero de filas que cubre la columna :param matrix: :param pesos: :return: """ lHeuristic = np.zeros((len(pesos),2)) #...
{"hexsha": "18381a125939e0115bbe4161a548efe8a644addc", "size": 9815, "ext": "py", "lang": "Python", "max_stars_repo_path": "problems/repairs/heuristic.py", "max_stars_repo_name": "m-arnao-molina/SCA-QL-SARSA", "max_stars_repo_head_hexsha": "65f859fce96bb8c11509238c2f7a5d8dd2ad042a", "max_stars_repo_licenses": ["MIT"], ...
Address(Dali Place) is a residential Culdesacs culdesac in the Wildhorse section of East Davis. Intersecting Streets Hepworth Drive
{"hexsha": "ffe4c79ad184183224f11917c2d9b95789a81344", "size": 139, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Dali_Place.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
(* This file is generated by Cogent *) theory U8rec_correctness_uabsfunsdeclfix imports "build_u8rec/U8rec_uabsfunsdeclfix_AllRefine" Cogent.ValueSemantics begin lemmas type_simps = U8rec_uabsfunsdeclfix_TypeProof.main_type_def U8rec_uabsfunsdeclfix_TypeProof.abbreviatedType1_def lemmas \<Xi>_simps = \<Xi>_def ...
{"author": "amblafont", "repo": "dargent-examples", "sha": "dbcfdd6573c088f65d4dade1b351b3bb2bc073e7", "save_path": "github-repos/isabelle/amblafont-dargent-examples", "path": "github-repos/isabelle/amblafont-dargent-examples/dargent-examples-dbcfdd6573c088f65d4dade1b351b3bb2bc073e7/correctness/U8rec_correctness_uabsfu...
module SmoothDeltaDirectSumModule use NumberKindsModule use LoggerModule use ParticlesModule use EdgesModule, only : MaxEdgeLength use PolyMesh2dModule use FieldModule use MPISetupModule use SphereGeomModule, only : ChordDistance, SphereDistance, SphereProjection implicit none include 'mpif.h' private public Sphe...
{"hexsha": "07c0eb3ad1f5509f47af56a3a7f4202162a0e208", "size": 6316, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "SmoothDeltaDirectSum.f90", "max_stars_repo_name": "pbosler/LPPM", "max_stars_repo_head_hexsha": "33b9572120ceca28ee56630a1af54f3befbda672", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""Module to read data analog data from NI-DAQ device A simple high-level wrapper for NI-DAQmx functions Requires: PyDAQmx, Numpy See COPYING file distributed along with the pyForceDAQ copyright and license terms. """ __author__ = 'Oliver Lindemann' import ctypes as ct import numpy as np import PyDAQmx from ._con...
{"hexsha": "692c6c0836c43ccbe785e9023681afb7be1afd97", "size": 3580, "ext": "py", "lang": "Python", "max_stars_repo_path": "forceDAQ/daq/_daq_read_Analog_pydaqmx.py", "max_stars_repo_name": "raunaqbhirangi/pyForceDAQ", "max_stars_repo_head_hexsha": "a2a41cd7a4a4f0afd178bc5555ba4e0540902d30", "max_stars_repo_licenses": ...
import numpy as np import matplotlib.pyplot as plt import torch, torchvision from torch.utils.tensorboard import SummaryWriter import os, argparse from tqdm import tqdm from degmo.gan.run_utils import config_model_test, generation, manifold, interpolation, helix_interpolation from degmo.utils import setup_seed, selec...
{"hexsha": "c900c6e8f0ecca4bae7a44822b8d4fe299419990", "size": 2476, "ext": "py", "lang": "Python", "max_stars_repo_path": "degmo/test_gan.py", "max_stars_repo_name": "IcarusWizard/Deep-Generative-Models", "max_stars_repo_head_hexsha": "4117c11ad944bdeff106a80adbb3642a076af64e", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Jayant Jain <jayantjain1992@gmail.com> # Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Utilities for creating 2-D visualizations of Poincare models and Poincare distance he...
{"hexsha": "f20fd8ab2d1e45324895848ed8432cd1bfe110f1", "size": 6168, "ext": "py", "lang": "Python", "max_stars_repo_path": "bobo/Lib/site-packages/gensim/viz/poincare.py", "max_stars_repo_name": "nehiridil/MLDays_nlp", "max_stars_repo_head_hexsha": "20d29d01836c82361cb1b656f2e98d7435a93622", "max_stars_repo_licenses": ...
# Import Python libraries import cv2 # OpenCV import numpy as np # Mask for green objects in image using LAB (t = 115) def colorMaskLAB(img: np.ndarray) -> np.ndarray: # Convert image to LAB LAB = cv2.cvtColor(img, cv2.COLOR_BGR2LAB) # BRG image to LAB color space LAB = LAB[:, :, 1] # Extract 2. channe...
{"hexsha": "d83f82e3edd86cc767a98b0be18b89885aa7c685", "size": 1302, "ext": "py", "lang": "Python", "max_stars_repo_path": "softwareProgram/ColorMask.py", "max_stars_repo_name": "Sebastian-Whitehead/Medialogi-P3-02", "max_stars_repo_head_hexsha": "8fb144c17a10417aa2f5a01fcbc71b4d562d4d27", "max_stars_repo_licenses": ["...
%Terminals DollarSign ::= '$' Percent ::= '%' _ a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z %End %Headers /. static readonly int[] tokenKind = new int[128]; static bool __b_init = init_block(); static bool init_...
{"hexsha": "77a23e259f58fa23803a2f0d4f700cd3dbf1cad3", "size": 3748, "ext": "gi", "lang": "GAP", "max_stars_repo_path": "lpg-generator-templates-2.1.00/include/csharp/KWLexerMapF.gi", "max_stars_repo_name": "kuafuwang/LPG2", "max_stars_repo_head_hexsha": "5cda43c109633d951facbeac361e060dd6d59dcd", "max_stars_repo_licen...
# Many scipy.stats functions support `axis` and `nan_policy` parameters. # When the two are combined, it can be tricky to get all the behavior just # right. This file contains utility functions useful for scipy.stats functions # that support `axis` and `nan_policy`, including a decorator that # automatically adds `axis...
{"hexsha": "d9a93a66d4b569981603ef7acfead2535f4ab62f", "size": 21314, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/stats/_axis_nan_policy.py", "max_stars_repo_name": "ChristinaCzaikowski/scipy", "max_stars_repo_head_hexsha": "544b938e06eba166b7e5bcc6298d9b3314f6cc33", "max_stars_repo_licenses": ["BSD-3-...
fact=function(num) { if(num==1) return(1) else { return(num*fact(num-1)) } print(fact) } fact(5)
{"hexsha": "7076148f61a009f3226fbbcca83d143a799c3d1d", "size": 128, "ext": "r", "lang": "R", "max_stars_repo_path": "RecursionFact.r", "max_stars_repo_name": "ninadsumant/RProgramming", "max_stars_repo_head_hexsha": "62aaf73e33d8e65f0f17a89c358feecef973cd5e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import util import json import sys import numpy as np from metrics import CorefEvaluator, Evaluator from collections import defaultdict from eval_ontonotes import SEGMENT_EVAL predictions = sys.argv[1:] ALL = "__@ALL" def read_file(path): d = {} with open(path, 'r') as f: for line in f: document_blob = ...
{"hexsha": "8c14d3a68659553d32ef5b34c87c522c466a18b3", "size": 7312, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval_all.py", "max_stars_repo_name": "wgantt/incremental-coref", "max_stars_repo_head_hexsha": "fadc44b59456b67055bf25f3dc688dd982a083af", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
__author__ = "Nikhil Mehta" __copyright__ = "--" import tensorflow as tf import numpy as np import os import sys import argparse os.environ['CUDA_DEVICE_ORDER']='PCI_BUS_ID' os.environ['CUDA_VISIBLE_DEVICES']="3" from utils import load_train_data, load_validation_data, translate from train_model import Model_Train ...
{"hexsha": "82cbcc2eab3ecd4ae8ef34a1247945c215cbd90c", "size": 1695, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "nikhil-dce/Transforming-AutoEncoder-TF", "max_stars_repo_head_hexsha": "9475638e4c35342cdf71ba2bf5c2a6fa709f8e44", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma permutation_edge_succ: "permutation (edge_succ M)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. permutation (edge_succ M) [PROOF STEP] by (metis edge_succ_permutes finite_arcs permutation_permutes)
{"llama_tokens": 88, "file": "Planarity_Certificates_Planarity_Graph_Genus", "length": 1}
import numpy as np import numpy.testing as npt import pytest from pulse2percept.utils import (is_strictly_increasing, radial_mask, sample, unique) def test_is_strictly_increasing(): npt.assert_equal(is_strictly_increasing([1]), True) npt.assert_equal(is_strictly_increasing([0...
{"hexsha": "ca6f3280451537d2a3ee1e8ee53980713b617f23", "size": 2549, "ext": "py", "lang": "Python", "max_stars_repo_path": "pulse2percept/utils/tests/test_array.py", "max_stars_repo_name": "narenberg/pulse2percept", "max_stars_repo_head_hexsha": "ca3aaf66672ccf3c9ee6a9a9d924184cdc6f031d", "max_stars_repo_licenses": ["B...
// (C) Copyright 2015 by Autodesk, Inc. //== INCLUDES ================================================================= //== COMPILE-TIME PACKAGE REQUIREMENTS ======================================== #include <CoMISo/Config/config.hh> #if COMISO_DOCLOUD_AVAILABLE //===================================================...
{"hexsha": "58c1cab14ae847779a3980315b0818bc6236f140", "size": 7260, "ext": "cc", "lang": "C++", "max_stars_repo_path": "ACAP_linux/3rd/CoMISo/NSolver/DOCloudCache.cc", "max_stars_repo_name": "shubhMaheshwari/Automatic-Unpaired-Shape-Deformation-Transfer", "max_stars_repo_head_hexsha": "8c9afe017769f9554706bcd267b6861c...
import unittest import numpy as np from smt.utils.sm_test_case import SMTestCase from smt.utils.kriging_utils import standardization class Test(SMTestCase): def test_standardization(self): d, n = (10, 100) X = np.random.normal(size=(n, d)) y = np.random.normal(size=(n, 1)) X_norm,...
{"hexsha": "f18fba92984333efeb4b825bf4887fb82c49e799", "size": 526, "ext": "py", "lang": "Python", "max_stars_repo_path": "smt/utils/test/test_kriging_utils.py", "max_stars_repo_name": "joshuauk1026/smt", "max_stars_repo_head_hexsha": "ec6aa20643b1e4fa772c6f470281c58df113c3a6", "max_stars_repo_licenses": ["BSD-3-Clause...
"""Modification CLAHE (Contrast Limited Adaptive Histogram Equalization).""" import cv2 as cv import numpy as np from dfd.datasets.modifications.interfaces import ModificationInterface class CLAHEModification(ModificationInterface): """Modification CLAHE (Contrast Limited Adaptive Histogram Equalization)""" ...
{"hexsha": "3ea8787fe392273afaaf0e54603353732a05a5a2", "size": 1745, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dfd/datasets/modifications/definitions/clahe.py", "max_stars_repo_name": "cicheck/dfd", "max_stars_repo_head_hexsha": "b02752f958cfea2f85222e2b4b3ba7e265a6152d", "max_stars_repo_licenses": ["M...
#ifndef YQVMC_EXTERNAL_LIBRARY_ADAPTOR_EIGEN3_HPP #define YQVMC_EXTERNAL_LIBRARY_ADAPTOR_EIGEN3_HPP #include <Eigen/Core> #include "../impl_/mae_traits.hpp" namespace yqvmc { namespace impl_ { template <typename S_, int R_, int C_, int O_, int MR_, int MC_> struct MeanAndErrorTraits<Eigen::Array<S_, R_, C_,...
{"hexsha": "c1ca65d58c643f92c3c1a6f23a72a36ca5fac381", "size": 1277, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/yqvmc/libadapt/eigen3_adaptor.hpp", "max_stars_repo_name": "yangqi137/yqvmc", "max_stars_repo_head_hexsha": "73b7367f6d4b01ea61612ea0888b285c8dac2fad", "max_stars_repo_licenses": ["MIT"], "max_s...
# script for extracting patches from video frames suitable for neural network # training from keras.preprocessing.image import ImageDataGenerator, load_img, img_to_array, array_to_img from PIL import Image import sys import os import glob from PIL import Image from os.path import basename, splitext import numpy as n...
{"hexsha": "118bb9cc42104087368b917dcb655edae791e512", "size": 2624, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract-subimages-videos.py", "max_stars_repo_name": "rzaluska/fcnn-conferences", "max_stars_repo_head_hexsha": "509946a4d342451f29e7b8706b6ff46b0af20f36", "max_stars_repo_licenses": ["MIT"], "max...
""" Modified from: http://hubpages.com/technology/Simplex-Algorithm-in-Python """ from __future__ import division from numpy import * # Ref: http://stackoverflow.com/questions/23344185/how-to-convert-a-decimal-number-into-fraction from fractions import Fraction class Tableau: def __init__(self, obj): ...
{"hexsha": "f19a5864b7030d2e7e0bf7d50ec0cd87efe0be2b", "size": 4860, "ext": "py", "lang": "Python", "max_stars_repo_path": "tableau.py", "max_stars_repo_name": "infimath/optimization-taha", "max_stars_repo_head_hexsha": "5f2c02429710614cf7ec5993cddb5e15afcb8103", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- # Dependencies: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from statsmodels.tsa.seasonal import seasonal_decompose from src import ( PATH_COVID_IMPACT_GRAPH, PATH_HISTOGRAM_BOOKINGS, PATH_PLOT_REVENUE_PER_DATE, PATH_PREPROCESSOR_COVID_...
{"hexsha": "027e24bd44347785f1e9da6dc0fe1630584af266", "size": 8812, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualization/visualize.py", "max_stars_repo_name": "carolmoraescruz/case_seazone", "max_stars_repo_head_hexsha": "76b44a64272685681442929c04ea9e4fd21a147e", "max_stars_repo_licenses": ["MIT"]...
module MeshingBenchmarks using FileIO using NRRD using Meshing using MeshIO using GeometryTypes using BenchmarkTools function benchmark() here = dirname(@__FILE__) println(pwd()) println("CTA-cardio.nrrd loading...") ctacardio = @btime load($here*"/../data/CTA-cardio.nrrd") q = 100 samples =...
{"hexsha": "c4fc6b88f75f70c7ddca98c3b4c1b15bb4cc0c57", "size": 2043, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MeshingBenchmarks.jl", "max_stars_repo_name": "sjkelly/MeshingBenchmarks.jl", "max_stars_repo_head_hexsha": "3184b00206e0b8be8626afa63799f7991a21e032", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma \<rho>'_ide_simp: assumes "ide a" shows "\<rho>'.map a = \<r>\<^sup>-\<^sup>1[a]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<rho>' a = \<r>\<^sup>-\<^sup>1[a] [PROOF STEP] using assms \<rho>'.inverts_components \<rho>_ide_simp inverse_unique [PROOF STATE] proof (prove) using this: ide...
{"llama_tokens": 244, "file": "MonoidalCategory_MonoidalCategory", "length": 2}
"""Class for reading, parsing, and downloading data from the Harmonizome API. """ import gzip import json import os import logging # Support for both Python2.X and 3.X. # ----------------------------------------------------------------------------- try: import io from urllib.request import urlopen from ur...
{"hexsha": "230d68bf47bd6dd7857e8eeb2f114fa3030c4a44", "size": 11967, "ext": "py", "lang": "Python", "max_stars_repo_path": "appyters/harmonizome_ml/harmonizome.py", "max_stars_repo_name": "shui02/appyter-catalog", "max_stars_repo_head_hexsha": "dfa15946d151daeb7d7b1bc9af9e48428474f012", "max_stars_repo_licenses": ["CC...
import numpy as np from alphaomega.cv.channel.channel_split import channel_splitter_apply from alphaomega.cv.channel.channel_merge import channel_merger_apply from alphaomega.utils.exceptions import WrongAttribute, WrongDimension class BorderIntropolation: """ Usage: Use this class to intropolate the b...
{"hexsha": "bc9805d95f78fc3bef75e0c26e17d0dc4f416a86", "size": 10554, "ext": "py", "lang": "Python", "max_stars_repo_path": "alphaomega/cv/border/border_intropolation.py", "max_stars_repo_name": "heidariarash/Alpha-Omega", "max_stars_repo_head_hexsha": "123be3c90cfb0e382845a1243923613d5475b529", "max_stars_repo_license...
from ShazamAPI import Shazam import subprocess import os import time import urllib.request from PIL import Image, ImageOps from pathlib import Path from selenium.common.exceptions import WebDriverException from selenium import webdriver from selenium.webdriver.chrome.options import Options import sys import pylast from...
{"hexsha": "60a5e2d62a66c3318d6b3f4bec8e06b083322a27", "size": 7888, "ext": "py", "lang": "Python", "max_stars_repo_path": "listen-show-scrobble-setlamps.py", "max_stars_repo_name": "jbrepogmailcom/listen-show-scrobble", "max_stars_repo_head_hexsha": "a8a4313570f19a5fd5ba195f13da0c72826c6800", "max_stars_repo_licenses"...
import tensorflow as tf import tensorflow_compression as tfc from focal_loss import focal_loss import os import numpy as np from collections import namedtuple def pc_to_tf(points, dense_tensor_shape): x = points x = tf.pad(x, [[0, 0], [1, 0]]) st = tf.sparse.SparseTensor(x, tf.ones_like(x[:,0]), dense_tens...
{"hexsha": "e036813680e0eba75b5313f6484865fa99112496", "size": 9268, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/compression_model.py", "max_stars_repo_name": "mauriceqch/pcc_geo_cnn", "max_stars_repo_head_hexsha": "22bbf081ffe7b77c9308f54c15490da60e78803c", "max_stars_repo_licenses": ["MIT"], "max_stars...
#include <boost/graph/graph_traits.hpp>
{"hexsha": "3a4eedb92bee9f756d0b598ff7a5ae070438a37c", "size": 40, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_graph_graph_traits.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"],...
import network3 import numpy as np import scipy import matplotlib.pyplot as plt import PIL training_data, _, _ = network3.load_data_shared() training_x, training_y = training_data x = training_x.get_value()[0] # vector corresponding to a 5 x_img = np.reshape(x, (-1, 28)) # recognizable 5 y = training_y.eval()[0] # ...
{"hexsha": "37ca91916338b4baf1a396480a5e34dd50c5c163", "size": 2121, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tutorials/Intro_To_NN/NNDL-solutions/code/chap6p4-9/display_transformed_image.py", "max_stars_repo_name": "lev1khachatryan/ASDS_CV", "max_stars_repo_head_hexsha": "c9f0c0412002e929bcb7cc2fc6e53929...
\documentclass{my_cv} \usepackage[skins]{tcolorbox} \usepackage{hyperref} \usepackage{parskip} \usepackage{parskip} \begin{document} \begin{multicols}{2}[ \titletext{Ankit}% {Devri}% {Hno.377/5,Mohan Mikins Sociey,Vasundhara,GZB,UP,201012}% {\href{mailto:first.last@mail.com}{vivekdevri@gmail...
{"hexsha": "3c4dca35304bb8488d785d8e798a27d19309d4c6", "size": 5063, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "resume.tex", "max_stars_repo_name": "AnkitDevri/Resume", "max_stars_repo_head_hexsha": "45e97c151a57a8dba6e41b45ffbd4e9f8c1c6acf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
import jax.numpy as np def adam_ops_init(flat_params): adam_ops = { "b1": 0.9, "b2": 0.999, "step_size": 0.001, "eps": 1e-8, "wd": 0.001, } adam_ops.update({"m": np.zeros(len(flat_params))}) adam_ops.update({"v": np.zeros(len(flat_params))}) return adam_ops ...
{"hexsha": "ad65727e45726a1d52b61f393d5596944f34dbb4", "size": 1466, "ext": "py", "lang": "Python", "max_stars_repo_path": "fundl/optimizers/step.py", "max_stars_repo_name": "ElArkk/fundl", "max_stars_repo_head_hexsha": "04b126d484f77e480196a24849683df93a0eabd8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pandas as pd from datetime import datetime, timedelta import numpy as np from scipy.stats import pearsonr # from mpl_toolkits.axes_grid1 import host_subplot # import mpl_toolkits.axisartist as AA # import matplotlib import matplotlib.pyplot as plt import matplotlib.t...
{"hexsha": "cbbb4ca34fa8722dd42e1e6ca687460874a08b2d", "size": 61000, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tesis_Eficiencia_Teorica.py", "max_stars_repo_name": "cmcuervol/Estefania", "max_stars_repo_head_hexsha": "13b564261dfc786b93c77fbc442a568018f87cc9", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys import numpy as np import wave import pyaudio import os import os.path class Distribution(dict): def __missing__(self, key): # if missing, return 0 return 0 def renormalize(self): normalization_constant = sum(self.values()) assert normalization_constant > 0, "Sum of...
{"hexsha": "b57b52c33d88d0288953db4d53a68e049ef3dd6b", "size": 4015, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "jhell96/music-perception-mcmc", "max_stars_repo_head_hexsha": "327ad9d15ccfda72c25efd370041fedf28686141", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
[STATEMENT] lemma authKeysI: "Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key K, Agent Tgs, Number Ta\<rbrace>, Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key K, Number Ta\<rbrace> \<rbrace> \<in> set evs \<Longrightarrow> K \<in> authKeys evs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Sa...
{"llama_tokens": 227, "file": null, "length": 1}
# Autogenerated wrapper script for Zellij_jll for i686-linux-gnu export zellij JLLWrappers.@generate_wrapper_header("Zellij") JLLWrappers.@declare_executable_product(zellij) function __init__() JLLWrappers.@generate_init_header() JLLWrappers.@init_executable_product( zellij, "bin/zellij", )...
{"hexsha": "28761b1f615726d82097573b4c02a60e56f24a24", "size": 380, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/i686-linux-gnu.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Zellij_jll.jl", "max_stars_repo_head_hexsha": "0730f1730fc6707c6a401a9968b2d46cdb24be7e", "max_stars_repo_licenses": ["MI...
# implementation of iWare-E for PAWS # Lily Xu # May 2019 import sys import time import pickle import pandas as pd import numpy as np from scipy.optimize import minimize from sklearn import metrics from sklearn.model_selection import train_test_split, StratifiedKFold from sklearn.preprocessing import StandardScaler...
{"hexsha": "fd924bc61dfe40c5d9c56a1cc38c70fdec605c48", "size": 45033, "ext": "py", "lang": "Python", "max_stars_repo_path": "iware/iware.py", "max_stars_repo_name": "lily-x/PAWS-public", "max_stars_repo_head_hexsha": "32f79d10a1187686f301be447de9f4d0e83cf127", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "...
SUBROUTINE DHC (P,PA,PB,XI,NAT,IF,IM,IL,JF,JM,JL, 1NORBS,DENER) IMPLICIT DOUBLE PRECISION (A-H,O-Z) DIMENSION P(*), PA(*), PB(*) DIMENSION XI(3,*),NFIRST(2),NMIDLE(2),NLAST(2),NAT(*) C*********************************************************************** C C DHC CALCULATES THE ENERGY CONT...
{"hexsha": "ff9e739df7bc6bdd8e0004ff235b568b1af42bb0", "size": 3159, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "1989_MOPAC5/dhc.f", "max_stars_repo_name": "openmopac/MOPAC-archive", "max_stars_repo_head_hexsha": "01510e44246de34a991529297a10bcf831336038", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
from os import system import numpy as np import scipy.optimize as op import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D #################################################################### def initTheta(X,degree): size=getThetaSizeFromDegree(X,degree) return np.zeros((size, 1)) ##########...
{"hexsha": "ea86414736b62f298a610f507789bb655fd57eaa", "size": 5481, "ext": "py", "lang": "Python", "max_stars_repo_path": "06_LinearRegression_Line3d/linearRegressionPlane.py", "max_stars_repo_name": "ManMohan291/PyProgram", "max_stars_repo_head_hexsha": "edcaa927bd70676bd14355acad7262ae2d32b8e5", "max_stars_repo_lice...
import numpy as np import pandas as pd from plotnine import ggplot, aes, geom_bar, geom_col, geom_histogram from plotnine import after_stat, theme, scale_x_sqrt, geom_text from plotnine.tests import layer_data n = 10 # Some even number greater than 2 # ladder: 0 1 times, 1 2 times, 2 3 times, ... df = pd.DataFrame...
{"hexsha": "0ed2a64289678f47000780443817cbebdd35ba99", "size": 1950, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/plotnine/tests/test_geom_bar_col_histogram.py", "max_stars_repo_name": "EkremBayar/bayar", "max_stars_repo_head_hexsha": "aad1a32044da671d0b4f11908416044753360b39", "max_sta...
# GUI改善版(画像でyolo実行可能) from tkinter import * import tkinter.ttk as ttk import tkinter.filedialog import os from PIL import Image, ImageTk from key_frame import get_keyframe from key_frame import detect_cloth_by_yolo import numpy as np import cv2 class Tab1(ttk.Frame): def __init__(self,mode, master=None...
{"hexsha": "c0c8857b1ffbf7555cbea4121f087c5d66af6d96", "size": 14347, "ext": "py", "lang": "Python", "max_stars_repo_path": "FIRS/gui.py", "max_stars_repo_name": "yuichikano/Fashion-Image-Retrieval-System", "max_stars_repo_head_hexsha": "5d712a4e400716e84337defe08f51c2165d44ade", "max_stars_repo_licenses": ["Apache-2.0...
# File: test_bayesian_optimization.py # File Created: Tuesday, 5th November 2019 10:00:04 am # Author: Steven Atkinson (212726320@ge.com) import os import sys import numpy as np import torch import pytest base_path = os.path.join(os.path.dirname(__file__), "..") if not base_path in sys.path: sys.path.append(bas...
{"hexsha": "e2fb843b920235d6ce31be21d450adfe7711f417", "size": 2747, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_bayesian_optimization.py", "max_stars_repo_name": "212726320/BEBO-1", "max_stars_repo_head_hexsha": "2909b3a00161b2e29fad667add30392abc11a968", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import pytest from pandas._libs import join as libjoin from pandas._libs.join import inner_join, left_outer_join import pandas._testing as tm class TestIndexer: @pytest.mark.parametrize( "dtype", ["int32", "int64", "float32", "float64", "object"] ) def test_outer_...
{"hexsha": "37e1cf4dbc733f7bf1c967e42cf3a83a9892acc0", "size": 11296, "ext": "py", "lang": "Python", "max_stars_repo_path": "mypython/Lib/site-packages/pandas/tests/libs/test_join.py", "max_stars_repo_name": "lilianatang/data-modelling-with-postgresql", "max_stars_repo_head_hexsha": "4b5d057d23c346cc36695dc0548f11908ae...
[STATEMENT] lemma knows_Spy_Inputs_secureM_sr: "\<lbrakk> A \<noteq> Spy; evs \<in>sr \<rbrakk> \<Longrightarrow> knows Spy (Inputs A C X # evs) = knows Spy evs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>A \<noteq> Spy; evs \<in> sr\<rbrakk> \<Longrightarrow> knows Spy (Inputs A C X # evs) = know...
{"llama_tokens": 191, "file": null, "length": 2}
[STATEMENT] lemma UGroupHomI: assumes "\<And>g g'. T (g + g') = T g + T g'" shows "UGroupHom T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. UGroupHom T [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: T (?g + ?g') = T ?g + T ?g' goal (1 subgoal): 1. UGroupHom T [PROOF STEP] by unfol...
{"llama_tokens": 150, "file": "Buildings_Algebra", "length": 2}
from swarms.lib.agent import Agent # from swarms.objects import Sites from swarms.lib.model import Model from swarms.lib.time import SimultaneousActivation from swarms.lib.space import Grid from unittest import TestCase from swarms.utils.bt import BTConstruct import py_trees from py_trees import Blackboard import numpy...
{"hexsha": "cd66d75e56e445f8bb285108337d374765a279c2", "size": 6782, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_full_bt.py", "max_stars_repo_name": "aadeshnpn/swarm", "max_stars_repo_head_hexsha": "873e5d90de4a3b3f69d4edc8de55eb9311226c2e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 7 14:57:18 2018 @author: root """ import numpy as np from matplotlib import pyplot as plt def load_band(file:str): band=np.loadtxt(file, skiprows=1,delimiter=",") return band def open_figure(rows,cols): fig,ax=plt.subplots(rows,cols) ...
{"hexsha": "6b388da8c6235c2f6b3e4ae921f729a0d7eb053b", "size": 2060, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods.py", "max_stars_repo_name": "Massetting/Spectral_Convolution", "max_stars_repo_head_hexsha": "f0e86d707d3ab64f39a24ab0181d7c280356da60", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" Class for the gravity and magnetic field 'gradient' tensors. """ import numpy as _np import matplotlib as _mpl import matplotlib.pyplot as _plt import copy as _copy from scipy.linalg import eigvalsh as _eigvalsh import xarray as _xr from .shgrid import SHGrid as _SHGrid class Tensor(object): """ Gene...
{"hexsha": "167c9f2314570c1155e94a618557e4d5e0a04fe7", "size": 176595, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyshtools/shclasses/shtensor.py", "max_stars_repo_name": "nephanth/SHTOOLS", "max_stars_repo_head_hexsha": "663d267715639de65f244b1e5ff8826cda0e9c8d", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import numpy as np import pandas as pd import pytest import tempfile import calliope from . import common from .common import assert_almost_equal class TestInitialization: def test_model_initialization_default(self): model = calliope.Model() assert hasattr(model, 'data') assert hasattr(m...
{"hexsha": "3b4462d1e784593c20888c2c3da1784cc6cffbb3", "size": 13086, "ext": "py", "lang": "Python", "max_stars_repo_path": "calliope/test/test_core.py", "max_stars_repo_name": "sjpfenninger/calliope", "max_stars_repo_head_hexsha": "a4e49c3b7d37f908bafc84543510eec0b4cf5d9f", "max_stars_repo_licenses": ["Apache-2.0"], "...
#include "functions/transpose.hh" #include <boost/test/unit_test.hpp> #include "data/matrix.hh" BOOST_AUTO_TEST_CASE(tranpose_test) { using namespace manifolds; auto m1 = GetRowMatrix<3, 2>(1, 2, 3, 4, 5, 6); auto m2 = GetColMatrix<2, 3>(1, 2, 3, 4, 5, 6); auto check = GetMatrix<2, 3>(1, 3, 5, 2, 4, 6); BOOS...
{"hexsha": "578ce7edc5f07a450cc6ee21c21605a1dac37fb6", "size": 388, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "functions/tests/test_transpose.cpp", "max_stars_repo_name": "GuylainGreer/manifolds", "max_stars_repo_head_hexsha": "96f996f67fc523c726f2edbc9705125c212bedae", "max_stars_repo_licenses": ["MIT"], "ma...
#!/usr/bin/env python # coding: utf-8 # In[1]: from keras.layers import Input, Dense, concatenate from keras.layers.recurrent import GRU from keras.utils import plot_model from keras.models import Model, load_model from keras.callbacks import ModelCheckpoint import keras import pandas as pd import numpy as np import...
{"hexsha": "cdb6ef3090bfc1b9dd21862cda58aa974b9762c7", "size": 17890, "ext": "py", "lang": "Python", "max_stars_repo_path": "ipython/3_Training_Predicting/prnn_cb12_pred_hyp.py", "max_stars_repo_name": "samuelru/session-knn-ae", "max_stars_repo_head_hexsha": "c6232667dbe57f82391d487875b52f651ca08a21", "max_stars_repo_l...
""" This contains classes used for analyzing the sentiments of input texts """ import re import pprint import shelve # import IOMDataService as DS # from TextFiltration import Sentences, Words, Lemmatized, Bigrams, Trigrams import numpy as np from senti_classifier import senti_classifier import nltk from nltk.corp...
{"hexsha": "1a6dabe5888941644a552c39ff6e5464a6927692", "size": 8919, "ext": "py", "lang": "Python", "max_stars_repo_path": "SentimentTools/SentimentAnalysis.py", "max_stars_repo_name": "AdamSwenson/TwitterProject", "max_stars_repo_head_hexsha": "8c5dc7a57eac611b555058736d609f2f204cb836", "max_stars_repo_licenses": ["MI...
#include <mpi.h> #include <sys/time.h> #include <iostream> #include <functional> #include <algorithm> #include <vector> #include <string> #include <sstream> #ifdef THREADED #ifndef _OPENMP #define _OPENMP #endif #include <omp.h> #endif // These macros should be defined before stdint.h is included #ifndef __STDC_C...
{"hexsha": "e731815b16b8bb60398f3713628854aabadda096", "size": 19522, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "CombBLAS/Applications/Graph500.cpp", "max_stars_repo_name": "shoaibkamil/OLD-kdt-specializer", "max_stars_repo_head_hexsha": "85074ec1990df980d25096ea8c55dd81350e531e", "max_stars_repo_licenses": [...
from setuptools import Extension, setup from Cython.Build import cythonize import numpy setup( ext_modules=cythonize( [Extension('match', ['match.pyx'], include_dirs=[numpy.get_include()])] ) )
{"hexsha": "75e2cc86975d1e02e1f220515026cccc59ceee5f", "size": 212, "ext": "py", "lang": "Python", "max_stars_repo_path": "pose_util/setup.py", "max_stars_repo_name": "SelvamArul/MOTR", "max_stars_repo_head_hexsha": "2a0b70288feaca665d460096159100d5077e9312", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
[STATEMENT] lemma atU_union_cases[case_names left right, consumes 1]: "\<lbrakk> atU U (c1+c2); atU U c1 \<Longrightarrow> P; atU U c2 \<Longrightarrow> P \<rbrakk> \<Longrightarrow> P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>atU U (c1 + c2); atU U c1 \<Longrightarrow> P; atU U c2 \...
{"llama_tokens": 176, "file": "Program-Conflict-Analysis_Semantics", "length": 1}
from os import stat import numpy as np from matplotlib import pyplot as plt import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import ReferenceModification.LibFunctions as lib MEMORY_SIZE = 100000 # hyper parameters BATCH_SIZE = 100 GAMMA = 0.99 tau = 0.00...
{"hexsha": "d5fd0d2a28d8b882326baef072a80dbb786e44e1", "size": 9875, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReferenceModification/NavUtils/TD3.py", "max_stars_repo_name": "BDEvan5/ReferenceModification", "max_stars_repo_head_hexsha": "8d9d13c8f563cc331809836d148b3dc83dd5d9ac", "max_stars_repo_licenses":...
import sys hoomd_path = str(sys.argv[4]) gsd_path = str(sys.argv[5]) # need to extract values from filename (pa, pb, xa) for naming part_perc_a = int(sys.argv[3]) part_frac_a = float(part_perc_a) / 100.0 pe_a = int(sys.argv[1]) pe_b = int(sys.argv[2]) sys.path.append(hoomd_path) import hoomd from hoomd import md fr...
{"hexsha": "4906fc5e3de0aa1ab6963469f1f986091d27ebbb", "size": 15968, "ext": "py", "lang": "Python", "max_stars_repo_path": "deprecated/deprecated_post_proc_msd.py", "max_stars_repo_name": "kolbt/whingdingdilly", "max_stars_repo_head_hexsha": "4c17b594ebc583750fe7565d6414f08678ea7882", "max_stars_repo_licenses": ["BSD-...
[STATEMENT] lemma bindU_lifted_strict [simp]: "bindU\<cdot>\<bottom>\<cdot>k = (\<bottom>::udom\<cdot>lifted)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bindU\<cdot>\<bottom>\<cdot>k = \<bottom> [PROOF STEP] by fixrec_simp
{"llama_tokens": 94, "file": "Tycon_Lift_Monad", "length": 1}
__author__ = 'mangalbhaskar' __version__ = '1.0' """ ## Description: # -------------------------------------------------------- # Annotation Parser Interface for Annotation work flow. # It uses the annotations created by VGG VIA tool v2.03 (not tested), v2.05 (tested). # ## References * https://datascience.stackexchang...
{"hexsha": "e9f04c713c207213f23229eaa3cfb465dfab30ea", "size": 6876, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/annon/dataset/hmd_to_aids.py", "max_stars_repo_name": "Roy-Tuhin/maskrcnn_sophisticate-", "max_stars_repo_head_hexsha": "a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3", "max_stars_repo_licenses": ...
import numpy as np import copy import torch import pickle from tqdm import tqdm import cv2 def detach_single(state): return state.detach().cuda() def visualize_text_attention_weights(model_obj, test_loader, device, reverse_word_map, num_layers = 2, batch_size =24, rnn_weights = (512, 1024], max_num_words = 48): ...
{"hexsha": "370f87c8809ef799c27766b6df5b43fc756c2253", "size": 2625, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/attention_visualization.py", "max_stars_repo_name": "tjvsonsbeek/Multi-modal-automated-diagnosis-with-chestXray-and-EHR", "max_stars_repo_head_hexsha": "2ffa98b88708ca19475e09b31aac7b6569c37...
from tqdm.auto import tqdm import numpy as np from pyhopper.callbacks import Callback from pyhopper.utils import ( ParamInfo, CandidateType, steps_to_pretty_str, time_to_pretty_str, parse_timeout, ) import time class ScheduledRun: def __init__( self, max_steps=None, tim...
{"hexsha": "e22595379d10a4fb27cc8ae82fb1a1fff6d3fb01", "size": 17151, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyhopper/run_context.py", "max_stars_repo_name": "pyhopper/pyhopper", "max_stars_repo_head_hexsha": "3a5a449ba36c03ba365d33f900c3ecbb2d107e6b", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
import numpy as np import string import time import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import os,shutil arrr = [1,2,3,4] print(arrr[-1:0:-1]) arr = np.array([1,2,3]) arr = np.append(arr,[4,5,6]) print(arr.reshape((-1,1))) def m2(): labels = ['ellipse','rectangle','line'] ...
{"hexsha": "b78a495cd767ab6f8a902ff6f31b2920bcda2c79", "size": 936, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/study/testbox.py", "max_stars_repo_name": "sushanted/NNDL-forked", "max_stars_repo_head_hexsha": "3d8675f3e9258d17226b5a6da29854d75ee3315e", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
""" Scitail: A textual entailment dataset from science question answering https://arxiv.org/pdf/1910.14599.pdf The SciTail dataset is an entailment dataset created from multiple-choice science exams and web sentences. Each question and the correct answer choice are converted into an assertive statement to form the hyp...
{"hexsha": "0359f1d7c32d82a229619f287ed26ba8383536eb", "size": 1482, "ext": "py", "lang": "Python", "max_stars_repo_path": "lm_eval/tasks/scitail.py", "max_stars_repo_name": "bigscience-workshop/lm-evaluation-harness", "max_stars_repo_head_hexsha": "c639c81974d6d0efea2e471f6292cf3c6ae67e4c", "max_stars_repo_licenses": ...
!======================================================================= ! ! Check for convergence in the relative abundances of all species ! of each particle. Set the relevant convergence flags. Calculate ! the percentage of particles that have converged. ! !--------------------------------------------------------...
{"hexsha": "edde42fe54f002536e1c2a958d9c11214465f04b", "size": 2072, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/check_chemistry_convergence.f90", "max_stars_repo_name": "uclchem/uclpdr", "max_stars_repo_head_hexsha": "a1c5ece6f21852af040ddf0af463cff26757d208", "max_stars_repo_licenses": ["MIT"], "m...
# -*- coding: utf-8 -*- """ consciousness figure - save data """ from __future__ import division from brian2 import * ##from brian2.only import * prefs.codegen.target = 'auto' import matplotlib.pyplot as plt import scipy.io import numpy as np import numpy.random import random as pyrand from brian2 import defaultclock...
{"hexsha": "e258f83af50db2eb914baa5a89e8e1f01f18f301", "size": 7696, "ext": "py", "lang": "Python", "max_stars_repo_path": "consciousness.py", "max_stars_repo_name": "xjwanglab/JoglekarEtAl2018_Neuron", "max_stars_repo_head_hexsha": "42c21da0df79611f62b8aa549b2bacd921c79d61", "max_stars_repo_licenses": ["MIT"], "max_st...
NAME Ackermann MODE REDUCTION SORTS NAT SIGNATURE 0 : -> NAT s : NAT -> NAT + : NAT NAT -> NAT * : NAT NAT -> NAT fac : NAT -> NAT ack : NAT NAT -> NAT ORDERING KBO ack = 1, fac = 1, * = 1, + = 1, s = 1, 0 = 1 ack > fac > * > + > s > 0 VARIABLES x,y : NAT EQUATIONS +(x,0) = x +(x,s(y)) = s(+(x...
{"hexsha": "a0b646785b5d801b83d50a81a88ed3e88dbb0adf", "size": 589, "ext": "rd", "lang": "R", "max_stars_repo_path": "src/test/resources/specs/Ackermann.rd", "max_stars_repo_name": "falsewasnottrue/forstmeister", "max_stars_repo_head_hexsha": "a6402a479d6218b71b12369a97dab8f61e3f9717", "max_stars_repo_licenses": ["Apac...
import numpy as np import cv2 kNearest = cv2.ml.KNearest_create() # The size of license plate in Poland is 520 x 114 mm. # choose smaller ratio to accept bigger contours # Width to height ratio of license plates in Poland. PLATE_HEIGHT_TO_WIDTH_RATIO = 90 / 520 # Width and height ratio of character CHAR_RATIO_MIN = ...
{"hexsha": "7885a182f7e5342a220573bac1cc9240bebf57b4", "size": 22029, "ext": "py", "lang": "Python", "max_stars_repo_path": "license_plate_processing/license_plate_recognizer.py", "max_stars_repo_name": "arekmula/license_plate_recognition", "max_stars_repo_head_hexsha": "62e5374fc56a0709d6d951629449aed347e101d2", "max_...
import glob import os from PIL import Image import numpy as np import h5py import IPython path = '/home/ivanwilliam/Documents/Full_images/5.0/' all_dirs = os.listdir(path) dir_it=0 for dir_it in range(len(all_dirs)): file_path = '/home/ivanwilliam/Documents/Full_images/5.0/'+str(all_dirs[dir_it]) # import IPython;...
{"hexsha": "aff2aa7e024a900b3aa17147a3767311837d4643", "size": 6591, "ext": "py", "lang": "Python", "max_stars_repo_path": "Original_size/HDF5_converter_5.0.py", "max_stars_repo_name": "ivanwilliammd/32images_hdf5converter", "max_stars_repo_head_hexsha": "2956c163b790d1fc1c3248e46d17894dde52eeb9", "max_stars_repo_licen...
# -*- coding: utf-8 -*- """Copy of rnn.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1hw5VX0w03qnA-pD4YmOck-HAmzP9_fO8 # Recurrent Neural Network ## Part 1 - Data Preprocessing ### Importing the libraries """ import numpy as np import matplo...
{"hexsha": "04882599488e47e956405e21234df8e7bc1e87d4", "size": 4747, "ext": "py", "lang": "Python", "max_stars_repo_path": "Auto_Encoders_Materials/RNN/copy_of_rnn.py", "max_stars_repo_name": "mithiljoshi/Classification_Denoising_GWS", "max_stars_repo_head_hexsha": "6840cd58041dcf12e4fa88fce935977ddae205d6", "max_stars...
import json import numpy as np import tensorflow.keras as keras data_path = "/Users/talen/Desktop/Audio_features.json" #Loading the desired data from the json file def data_loading(data_path, session_num): #Read data from the json file with open(data_path, "r") as file: data = json.load(file) #S...
{"hexsha": "5a447180cbdfb48be040398805dd8595af093e48", "size": 4564, "ext": "py", "lang": "Python", "max_stars_repo_path": "Classify_CNN.py", "max_stars_repo_name": "chentalen2021/CNN-model", "max_stars_repo_head_hexsha": "44de28e590eeea1287fd1a7b8c2df7f740727bde", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import torch import numpy as np class ScheduledOptim: """ A simple wrapper class for learning rate scheduling """ def __init__(self, model, train_config, current_step): self._optimizer = torch.optim.Adam( model.parameters(), betas=train_config["optimizer"]["betas"]...
{"hexsha": "aa285c4838e3f5d876395e437075fe889c24ae40", "size": 1493, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/optimizer.py", "max_stars_repo_name": "shaun95/WaveGrad2", "max_stars_repo_head_hexsha": "167d5d6e98072f34a30296ff767c70a5696a4051", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 45...
""" The structure provides convenient computation of a Groebner basis of given ideal at a point. See evaluate function for more details """ ### Probably we want to dispatch on coefficients type mutable struct GroebnerEvaluator ideal::IdealContext end """ Convenience ctor 1 ?? conv...
{"hexsha": "d7b58b02bcf91a1f75a9509a28df9ea012eb16e0", "size": 3307, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/groebner.jl", "max_stars_repo_name": "sumiya11/RationalFunctionFields", "max_stars_repo_head_hexsha": "648db6a3ca01fd087b9eeba4e72930f73210e765", "max_stars_repo_licenses": ["MIT"], "max_stars_...
''' part dataset. Support ModelNet40, ModelNet10, XYZ and normal channels. Up to 10000 points. ''' import os import os.path import json import numpy as np import sys import torch from torch.utils.data import Dataset from torch.utils.data import DataLoader BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT...
{"hexsha": "13eb2d3d20114a14e1cc5f0cd6f388b1db76bb8c", "size": 5326, "ext": "py", "lang": "Python", "max_stars_repo_path": "DataLoader/part_dataset_seg.py", "max_stars_repo_name": "meihuaz/PCUNet", "max_stars_repo_head_hexsha": "c3aafd456800a1dd4e83e8d60e2606830d3e3ffc", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\filetitle{freq}{Frequency of a tseries object}{tseries/freq} \paragraph{Syntax}\label{syntax} \begin{verbatim} f = freq(x) \end{verbatim} \paragraph{Input arguments}\label{input-arguments} \begin{itemize} \itemsep1pt\parskip0pt\parsep0pt \item \texttt{x} {[} tseries {]} - Tseries object. \end{itemize} \p...
{"hexsha": "d5a331f862b39a2c6f7cb9c949d3096108268ca3", "size": 825, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "-help/tseries/freq.tex", "max_stars_repo_name": "OGResearch/IRIS-Toolbox-For-Octave", "max_stars_repo_head_hexsha": "682ea1960229dc701e446137623b120688953cef", "max_stars_repo_licenses": ["BSD-3-Clau...
import numpy as np import socket import asyncio from matplotlib import pyplot as plt from time import sleep from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler, LoggingEventHandler import logging HOST = "NUS15128-11-albhuan.local" # Needs to be constantly updated except 127.0.0.1...
{"hexsha": "916b277d40eb004eb1c77b2ca1edf0f6dc867ccd", "size": 2414, "ext": "py", "lang": "Python", "max_stars_repo_path": "server.py", "max_stars_repo_name": "RoboticsTeam4904/2022-camera-server", "max_stars_repo_head_hexsha": "8ba2d4b5b51f2e92b468212e73dba5af419e0a49", "max_stars_repo_licenses": ["Unlicense"], "max_s...
# # Mauna Loa time series example # # In this notebook, we apply Gaussian process regression to the Mauna Loa CO₂ # dataset. This showcases a rich combination of kernels, and how to handle and # optimize all their parameters. # ## Setup # # We make use of the following packages: using CSV, DataFrames # data loading ...
{"hexsha": "50f47e80c809d04e82ef81f7ba0c176e405e7f48", "size": 11222, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/1-mauna-loa/script.jl", "max_stars_repo_name": "JuliaGaussianProcesses/AbstractGP", "max_stars_repo_head_hexsha": "6ee8549f536c6037a02a1cc445fd35c0811425ef", "max_stars_repo_licenses": ["...
#!/usr/bin/env python3 import json import os.path import multiprocessing as mp import timeit import numpy as np import _init_path from skimage import io from spacenet7_model.configs import load_config from spacenet7_model.utils import (dump_prediction_to_png, ensemble_subdir, exper...
{"hexsha": "dbc4264ef416b43749b313e706f7553f0e13e05f", "size": 3793, "ext": "py", "lang": "Python", "max_stars_repo_path": "4-motokimura/code/tools/ensemble_models.py", "max_stars_repo_name": "remtav/SpaceNet7_Multi-Temporal_Solutions", "max_stars_repo_head_hexsha": "ee535c61fc22bffa45331519239c6d1b044b1514", "max_star...
import networkx as nw import random as rand import math import numpy as np from matplotlib import pyplot as plt point_dict = {} neighbor_dict = {} R = 50 infinity = 10000 X_MAX = 500 Y_MAX = 500 def check_if_same_point(x, y): global point_dict for item in point_dict: if item is not...
{"hexsha": "20ebdfa158abb9e53a21cf3892bf78139950bbba", "size": 5042, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/drawNetwork.py", "max_stars_repo_name": "SaltyFish6952/RoutingAlgorithmQt", "max_stars_repo_head_hexsha": "8020cf034c886e3cb401ed151b78575508c72f4b", "max_stars_repo_licenses": ["MIT"], "max_s...