text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
from forse.tools.nn_tools import * from forse.tools.img_tools import * from forse.tools.mix_tools import * from keras.models import Sequential, Model, load_model from keras.layers import UpSampling2D, Conv2D, Activation, BatchNormalization from keras.layers import Reshape, Dense, Input from keras.layers import LeakyReL...
{"hexsha": "fd07f0162854861fa2803bb8d173efcca8b7848a", "size": 5530, "ext": "py", "lang": "Python", "max_stars_repo_path": "forse/networks/dcgan.py", "max_stars_repo_name": "ai4cmb/ForSE", "max_stars_repo_head_hexsha": "8ceab3b2e47f077b9d5dbaee879a5385c3a76073", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#!/bin/bash """ Create timeseries averages for the NOAA water vapour data. """ from datetime import datetime from pathlib import Path import numpy import h5py import pandas from wagl.geobox import GriddedGeoBox from wagl.hdf5.compression import H5CompressionFilter from wagl.hdf5 import read_h5_table, write_h5_image ...
{"hexsha": "141bd2c1ab3e5eae94262dfdddbbdf92d17d05e7", "size": 4420, "ext": "py", "lang": "Python", "max_stars_repo_path": "average_water_vapour.py", "max_stars_repo_name": "ASVincent/swfo", "max_stars_repo_head_hexsha": "17ef3c32047a5069c4db04fa04368a9268f19d93", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
from covariant_compositional_networks_tf2.CCN_Model import CCN_Model import tensorflow as tf from functools import reduce from operator import mul from ordered_set import OrderedSet import numpy as np from sklearn.metrics import accuracy_score from graphColoring import randomNPGraph, checkIfGraphConnected channels_in...
{"hexsha": "587fce2a9fa2bd4c8aa54c3be218882bc8cf144c", "size": 4050, "ext": "py", "lang": "Python", "max_stars_repo_path": "covariant_compositional_networks_tf2/tests/testModel_2.py", "max_stars_repo_name": "PiotrKaszuba/Covariant_Compositional_Networks_Tf2", "max_stars_repo_head_hexsha": "dcd287a5f063bf2c3a37120e3247a...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader, Dataset, WeightedRandomSampler # set to True to enable training # if set to False, training is skipped, # and the weights are loaded from the session storage. # this way, you can train the net...
{"hexsha": "1ca682958c7d5bca43cf5c045fdaaaa899a0ff90", "size": 6129, "ext": "py", "lang": "Python", "max_stars_repo_path": "shakespeare.py", "max_stars_repo_name": "christofferaakre/shakespeare", "max_stars_repo_head_hexsha": "c2563d19232465edbda2edaeebb7b93f491512d2", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
{"hexsha": "bff260c5b8de395b17e6b3d2c4ba12a33d6b7877", "size": 3710, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/platforms/cpp/core-test/src/cache_store_test.cpp", "max_stars_repo_name": "geertjanw/ignite", "max_stars_repo_head_hexsha": "521149998a76d78a72628cf49d1ffad162ed5a01", "max_stars_repo_licens...
[STATEMENT] lemma split_list_first_unique: assumes "u\<^sub>1 @ [a] @ u\<^sub>2 = v\<^sub>1 @ [a] @ v\<^sub>2" "a \<notin> set u\<^sub>1" "a \<notin> set v\<^sub>1" shows "u\<^sub>1 = v\<^sub>1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. u\<^sub>1 = v\<^sub>1 [PROOF STEP] proof - [PROOF STATE] proof (sta...
{"llama_tokens": 1116, "file": "Partial_Order_Reduction_Extensions_List_Extensions", "length": 8}
/* * Copyright (c) 2020-2022 The reone project contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
{"hexsha": "0bda89a102dc37ba06bf28be2e2988b0b2093121", "size": 28553, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/script/expressiontree.cpp", "max_stars_repo_name": "seedhartha/revan", "max_stars_repo_head_hexsha": "b9a98007ca2f510b42894ecd09fb623571b433dc", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma in_atlas_order_le: "c \<in> c_manifold.atlas charts l" if "l \<le> k" "c \<in> atlas" [PROOF STATE] proof (prove) goal (1 subgoal): 1. c \<in> c_manifold.atlas charts l [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. c \<in> c_manifold.atlas charts l [PROOF STEP] interpret l: c...
{"llama_tokens": 494, "file": "Smooth_Manifolds_Differentiable_Manifold", "length": 8}
#*- coding:UTF-8 -*- """ ## ========================================================================== ## ## author : Liang He, heliang@mail.tsinghua.edu.cn ## Xianhong Chen, chenxianhong@mail.tsinghua.edu.cn ## descrption : sre10 demo ## comparison of LDA and LPLDA ## ...
{"hexsha": "4b611c88f3daa29e7fb63feb960dc18a11700f53", "size": 9026, "ext": "py", "lang": "Python", "max_stars_repo_path": "sre10_demo.py", "max_stars_repo_name": "sanphiee/LPLDA", "max_stars_repo_head_hexsha": "95941de0a84010dc8c8bdd12e39a276331c0d286", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 13,...
import numpy as np def int_type(img): if img.max() > 255: dtype = np.uint16 else: dtype = np.uint8 return dtype def normalize(img, maxval=255, pmin=0, pmax=100): img = img.astype(np.float32) mn, mx = [np.percentile(img, p) for p in [pmin, pmax]] img = np.clip((img - mn) / (mx...
{"hexsha": "64f5ef014f453035f157c0c817ad5a7cd3367d9e", "size": 358, "ext": "py", "lang": "Python", "max_stars_repo_path": "care_batch/utils.py", "max_stars_repo_name": "amedyukhina/care_batch", "max_stars_repo_head_hexsha": "7670eb7bbd9339dcc580cf8686c79900253392eb", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import pandas as pd import numpy as np #import os from Clean_function import clean_note from collections import OrderedDict from progressbar import Percentage, ProgressBar,Bar,ETA from sklearn.model_selection import train_test_split import tensorflow as tf import pickle maxlen=2500 min_word_frequency=5 from tensorfl...
{"hexsha": "0d3c4949c6abfb53eecd2750caee270923ab9564", "size": 8863, "ext": "py", "lang": "Python", "max_stars_repo_path": "update_and_write.py", "max_stars_repo_name": "PiSchool/icd9-labelling", "max_stars_repo_head_hexsha": "1007643c7b96b9ba72d73678a75ffc68e5a2d882", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
SUBROUTINE TAVISPAK3X(EA,FCN,A,B,C,LUERR,IERR) IMPLICIT REAL*8 (A-H,O-Z) C C THIS ROUTINE SOLVES FOR THE A,B,C COEFFICIENTS OF THE FUNCTION C C FCN = A*COS(EA) + B*SIN(EA) - C C C WHICH IS USED TO APPROXIMATE THE RAM AND SHADOW FUNCTIONS. THREE C PAIRS OF ECCENTRIC ANOMALY AND FUNCTION VALUES ARE INP...
{"hexsha": "7a7291d853467b0101291399b1e873c1fc3ff0da", "size": 3298, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "gsc-13083/tavispak3x.for", "max_stars_repo_name": "SteveDoyle2/nasa-cosmic", "max_stars_repo_head_hexsha": "c8015a9851a04f0483b978d92c2cbaee31c81fe3", "max_stars_repo_licenses": ["BSD-Source-Cod...
import inspect import random import re import statistics from bisect import bisect_left from functools import lru_cache from typing import Dict, List, Set, Tuple import numpy as np import pandas as pd class _StringSpans: __slots__ = ("string", "spans") def __init__(self, string, spans): self.string ...
{"hexsha": "630c99857f6d521043b8c6fb2af9896f87dff57a", "size": 18769, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lemon/_lemon_utils.py", "max_stars_repo_name": "NilsBarlaug/lemon", "max_stars_repo_head_hexsha": "ee82f20253c50eb5a958fc5507b0df8ca51fa317", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Distance functions to define how "far" apart two vectors are. """ import numpy as np from squidward.utils import exactly_1d np.seterr(over="raise") # --------------------------------------------------------------------------------------------------------------------- # Radial Basis Function # -------------------...
{"hexsha": "27d06e12d208fe9ab0fb15bb0434c5ac914173ea", "size": 3620, "ext": "py", "lang": "Python", "max_stars_repo_path": "squidward/kernels/distance.py", "max_stars_repo_name": "looyclark/Gaussian_Processes", "max_stars_repo_head_hexsha": "f02aa64bfbca8b3086e403a81178e6ae4702b48a", "max_stars_repo_licenses": ["MIT"],...
import os import numpy as np import pandas as pd import matplotlib.mlab as ml import matplotlib.lines as mlines import matplotlib.patches as mpatches from mpl_toolkits.axes_grid1 import make_axes_locatable import networkx import matplotlib.pyplot as plt import shapely.geometry.linestring as shapely from shapely.geomet...
{"hexsha": "533918d205e73429774ab8b93fcbd2405fa0cea2", "size": 18317, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/routemap_cluster_the_shapes.py", "max_stars_repo_name": "jweckstr/westmetro_scripts", "max_stars_repo_head_hexsha": "a16385b00ac8d80f0068f348226ed89e2d0425a9", "max_stars_repo_licenses": ...
using LinearAlgebra, ForwardDiff, NLPModels export Bisseccao, Newton_rc_bissec function Bisseccao(g, a, b, max_bissec; λ = 0) ϵ = 1e-4 status= :resolvido iter = 0 while abs(g(λ)) > ϵ if g(a)*g(b)==0 && g(b)==0 λ=b else λ=a end if g(a) * g(b) <...
{"hexsha": "87deea35c473f1911df10821588679bc0386d3f2", "size": 3648, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Newton_rc_bissec.jl", "max_stars_repo_name": "RogerioOMDS/JSOSolverTemplate.jl", "max_stars_repo_head_hexsha": "fd57f4de0d9253003f15566fc502cca37abd890e", "max_stars_repo_licenses": ["MIT"], "m...
import os import imageio import numpy as np from elf.io import open_file from elf.util import normalize_index from ..data import ConcatDataset, ImageCollectionDataset, SegmentationDataset from .util import get_trainer, get_normalizer from .prediction import predict_with_halo try: import napari except ImportError...
{"hexsha": "31d1db6b1e2088ef15d7b0131c9ebd75e0651fc0", "size": 8516, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_em/util/validation.py", "max_stars_repo_name": "JonasHell/torch-em", "max_stars_repo_head_hexsha": "2e008e0cd2f0ea6681581374fce4f9f47b986d55", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import sys import matplotlib.pyplot as plt from pathlib import Path from loguru import logger import numpy as np sys.path.append("./") from fcutils.plot.figure import clean_axes from myterial import blue_grey from analysis.visuals import plot_probe_electrodes """ Running this script will save a figure with the...
{"hexsha": "655a18219a03f0f212253cdbabbdbb6d9e02cd00", "size": 3314, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/ephys/probe_n_units_per_channel.py", "max_stars_repo_name": "FedeClaudi/LocomotionControl", "max_stars_repo_head_hexsha": "1281f7894825096ad212407351463a2105c5152a", "max_stars_repo_licen...
One of the many Hotels in Davis. Amenties include Wifi Hot Spots Wireless Internet and cable TV. University B&B is closed June 29, 2006.
{"hexsha": "d7980641e841efea31047973a2718ff3a537478d", "size": 141, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/University_Bed_and_Breakfast.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "...
import torch import torch.nn as nn import numpy as np from torch.nn import functional as F import math from utils.tools import make_positions def Embedding(num_embeddings, embedding_dim, padding_idx=None): m = nn.Embedding(num_embeddings, embedding_dim, padding_idx=padding_idx) nn.init.normal_(m.weight, mean...
{"hexsha": "5e6bc55e268372029e7f57bc85f8e7bb87ff1abd", "size": 25543, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/blocks.py", "max_stars_repo_name": "ishine/DiffSinger", "max_stars_repo_head_hexsha": "d5dbe05ee1c7da0878393c73129089a67d0fe935", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Utility for storing common lib and data structures """ import math from collections import namedtuple from itertools import product import numpy as np import simplejson as json __author__ = 'Ari Saha (arisaha@icloud.com)' __date__ = 'Wednesday, March 14th 2018, 2:3...
{"hexsha": "1e767451bedee75bd0182d975de385a08042269a", "size": 13021, "ext": "py", "lang": "Python", "max_stars_repo_path": "rainman2/lib/environment/cellular/dev/utils.py", "max_stars_repo_name": "att-innovate/rainman2", "max_stars_repo_head_hexsha": "edd07c03a9d33a2e44b3a333fc28dc73c8cbe56e", "max_stars_repo_licenses...
__precompile__() module JFVM # global mumps_solver # using PyPlot try import MUMPS global mumps_solver = MUMPS catch @info "MUMPS solver (optional) is not available." end using SparseArrays, FFTW # using PyCall # I prefer not to use the following command for the issues that it has on windows machines # pygui_s...
{"hexsha": "d255c54a2d03af51f7b92e325b1db1f1c7ce17b4", "size": 2027, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/JFVM.jl", "max_stars_repo_name": "simulkade/JFVM", "max_stars_repo_head_hexsha": "3e6bf931a430c4e4ccb7ca7824a947c6b09f8fe2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 38, "max_star...
[STATEMENT] lemma lset_P_V [simp]: "lset P \<subseteq> V" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lset P \<subseteq> V [PROOF STEP] by (simp add: valid_path_in_V)
{"llama_tokens": 77, "file": "Parity_Game_ParityGame", "length": 1}
module Searching export bfs_parents, bfs_tree, dfs_parents, dfs_tree using ...CSetDataStructures, ..BasicGraphs """ tree(parents) Convert a parents array into a directed graph. """ function tree(parents::AbstractVector{Int}) n = T(length(parents)) t = Graph(n) for (v, u) in enumerate(parents) ...
{"hexsha": "461d1d6b29523dc479300e0d6afe246ee8d0aa5e", "size": 3486, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/graphs/Searching.jl", "max_stars_repo_name": "slwu89/Catlab.jl", "max_stars_repo_head_hexsha": "d197b0c12c65fe72198baf9c990e6a4e1f3aebe0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
@testset "reshape" begin test_rrule(reshape, rand(4, 5), (2, 10) ⊢ nothing) test_rrule(reshape, rand(4, 5), 2 ⊢ nothing, 10 ⊢ nothing) end @testset "hcat" begin A = randn(3, 2) B = randn(3) C = randn(3, 3) test_rrule(hcat, A, B, C; check_inferred=false) end @testset "reduce hcat" begin A =...
{"hexsha": "26d000bd3016fc9a1fcedb8c69d8ffb175c99993", "size": 846, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/rulesets/Base/array.jl", "max_stars_repo_name": "DhairyaLGandhi/ChainRules.jl", "max_stars_repo_head_hexsha": "76ef95c326e773c6c7140fb56eb2fd16a2af468b", "max_stars_repo_licenses": ["MIT"], "ma...
module sqlite use iso_c_binding, only: c_int implicit none private c_int include "constants.f90" interface function sqlite3_bind_text(stmt, index, text, bytes, destructor) bind(c) use iso_c_binding, only: c_int, c_ptr type(c_ptr), value :: stmt, text, destructor integer(c_int), v...
{"hexsha": "ea301a28f5e87e3a50b4662c3ba4f8c148fd9c0b", "size": 2442, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "sources/sqlite.f90", "max_stars_repo_name": "dram/fortran-sqlite", "max_stars_repo_head_hexsha": "9912de17549db247cbcf9768a462e52ed7907af0", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Thu Jan 04 10:35:33 2018 @author: ldh """ # utils.py import datetime as dt import numpy as np import pandas as pd def array_decorator(func): return np.frompyfunc(func,1,1) @array_decorator def time_matlab2py(date_time_ordinal): ''' Convert matlab format of time or ...
{"hexsha": "a83807024b1c264ffd6da45d52cca5350f23f68a", "size": 2344, "ext": "py", "lang": "Python", "max_stars_repo_path": "matlab_convert/utils.py", "max_stars_repo_name": "orxg/helper", "max_stars_repo_head_hexsha": "6cbad158213028e64407c8ef0fd4e66a9aff9917", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
\openepigraph{Science knows no country, because knowledge belongs to humanity, and is the torch which illuminates the world.}{---Louis Pasteur} \openepigraph{We live in a society exquisitely dependent on science and technology, in which hardly anyone knows anything about science and technology.}{---Carl Sagan} Many...
{"hexsha": "443af29b9435f0d488b7107f3c6e7be2ed323c58", "size": 50713, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "LatexVersion/Chapter1_PsychologicalScience.tex", "max_stars_repo_name": "danBurrell/research_methods_with_R", "max_stars_repo_head_hexsha": "74745c4bd69d185f1a36ef38638be8cc55966b06", "max_stars_re...
from scipy import integrate, interpolate from matplotlib import pyplot as plt import numpy as np import utils # Options nb_nodes = 30 nb_phases = 4 nb_frame_inter = 500 nb_dim = 3 output_files = "Eocar" # read states nb_points = (nb_phases * nb_nodes) + 1 i = 0 t = np.ndarray(nb_points) # initialization of the tim...
{"hexsha": "5b2eb8d6bd0931d296c51bc1909735456fd7ee0a", "size": 3116, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyses/show_eocar.py", "max_stars_repo_name": "ValKanAll/ViolinOptimalControl", "max_stars_repo_head_hexsha": "556311aecc3e13b1fd2dd6927d22510b127c38c4", "max_stars_repo_licenses": ["MIT"], "max...
from os import PathLike from pathlib import Path import cv2 import numpy as np import torch from PIL import Image from numpy import linalg from torch import nn from torchvision import transforms, models from kts.cpd_auto import cpd_auto class FeatureExtractor(object): def __init__(self): self.preprocess...
{"hexsha": "2be1e9271b87d120178eac1bf5af58ac09403450", "size": 2891, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/helpers/video_helper.py", "max_stars_repo_name": "wqliu657/DSNet", "max_stars_repo_head_hexsha": "1804176e2e8b57846beb063667448982273fca89", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" displayer.py is responsible for saving the rendered animation into file. """ import subprocess as sp import os import time import numpy as np import pygame as pg import configs as cfg FFMPEG_BIN = "ffmpeg" # on Windows def savevideo(animation): """ Saves the simulation as a video """ command = [FFMPE...
{"hexsha": "cd0f9b9cbb768ac81cae72525b6e78b39f1b6f9b", "size": 2923, "ext": "py", "lang": "Python", "max_stars_repo_path": "displayer.py", "max_stars_repo_name": "naummo/swarm_maze_opencl_solver", "max_stars_repo_head_hexsha": "1047e1293e90f484ccc4ff77cfe61196fb7cbbc6", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using ParameterisedModule using Test Functor = Function # Write your own tests here. # :(@sig struct S{A} # x :: Int # y :: A # struct K end # end) |> (x -> macroexpand(ParameterisedModule, x)) |> println @testset "I'm here?" begin @sig struct S{A} x :: Int y :: A struct K end end ...
{"hexsha": "51eee4efdaa26bb0178a58567f7b1bc465f18897", "size": 2678, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaTagBot/ParameterisedModule.jl", "max_stars_repo_head_hexsha": "5e8eb12915093479382db225760958204c8e7e8e", "max_stars_repo_licenses": ["MIT"], "max_st...
{-# OPTIONS --prop #-} {-# TERMINATING #-} makeloop : {P : Prop} → P → P makeloop p = makeloop p postulate A : Set B C : A → Prop record AB : Set where no-eta-equality -- the problem goes away if this is left out constructor _,_ field a : A b : B a open AB public -- -- Same problem if replacing t...
{"hexsha": "a9c1a3b5aec68878487262818032e08d62bbb3f9", "size": 914, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Fail/Issue4118.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
# from typing import ? import torch import torch.nn as nn from numpy import exp, sqrt from numpy.random import normal class VAE(nn.Module): def __init__(self): super().__init__() self.encoder = nn.Sequential( # linear (size of input, 2d), size of input= max possible size i...
{"hexsha": "33d97c280b59e3be525682e98fc1ab82f95f868e", "size": 3976, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/prototypes/vae.py", "max_stars_repo_name": "avishvj/3d-reactions", "max_stars_repo_head_hexsha": "8326fbecf2e8a0d0445508ae809dc61e3116d161", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" Tensor Products of Crystals Main entry points: - :class:`~sage.combinat.crystals.tensor_product.TensorProductOfCrystals` - :class:`~sage.combinat.crystals.tensor_product.CrystalOfTableaux` AUTHORS: - Anne Schilling, Nicolas Thiery (2007): Initial version - Ben Salisbury, Travis Scrimshaw (2013): Refactored tens...
{"hexsha": "7cacfeb335bf5999c026802106511ca8e50523f8", "size": 43529, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/combinat/crystals/tensor_product.py", "max_stars_repo_name": "haiyashah/sage", "max_stars_repo_head_hexsha": "55a711e3d6251f2ff4f3bcccc4c6a8b7a2a8d1b2", "max_stars_repo_licenses": ["BSL-...
(* Useful properties of our Simple.v specification *) Require Import Simple. (* Dominates is transitive *) Theorem dom_trans {D : Domain} : forall {s1 s2 s3}, Dominates s1 s2 -> Dominates s2 s3 -> Dominates s1 s3. (* Break apart our Dominates arguments *) intros. destruct H. destruct H0. ref...
{"author": "Warbo", "repo": "powerplay", "sha": "8792220032f8a277b775d52e46225ab58ddb6928", "save_path": "github-repos/coq/Warbo-powerplay", "path": "github-repos/coq/Warbo-powerplay/powerplay-8792220032f8a277b775d52e46225ab58ddb6928/SimpleTests.v"}
using AxisArrays using AxisKeys using CSV using Combinatorics using DataFrames using Dates using Distances using Documenter using HypothesisTests using LinearAlgebra using Random using Statistics using StatsBase using TableOperations using Tables using Test using Impute using Impute: Impute, Imputor, Chain...
{"hexsha": "536ae24551569c03b2c1f3b90d31859a2a875cd2", "size": 1447, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "pitmonticone/Impute.jl", "max_stars_repo_head_hexsha": "bd2e1f2c62a7b9d29cf25cb0bd2d5290cc569d07", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# -*- coding: utf-8 -*- """ Created on Fri Jan 23 08:16:00 2015 @author: marc """ import numpy as np import matplotlib.pyplot as plt from dgp import DGP from dgp import BCM from dgp import GP from dgp import rBCM from dgp import gPoE from dgp.utils import tictoc N = 1000 # no of training inputs d = 1 # no of inp...
{"hexsha": "4f0211ca853f99215663d99cae741c433df6a1d7", "size": 2715, "ext": "py", "lang": "Python", "max_stars_repo_path": "dgp/dgp/tests/test_rBCM.py", "max_stars_repo_name": "nick-terry/Splitting-GP", "max_stars_repo_head_hexsha": "efd886f6442f096833460cf8cd28ff3e18da732a", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- """ All K-Nearest Neighbors """ # Author: Dayvid Victor <victor.dvro@gmail.com> # # License: BSD 3 clause import numpy as np from sklearn.utils.validation import check_X_y from ..base import InstanceReductionMixin from protopy.selection.enn import ENN class AllKNN(InstanceReductionMixin):...
{"hexsha": "83aaf58677957706e3e3dc8d0986053d0edf79bd", "size": 2560, "ext": "py", "lang": "Python", "max_stars_repo_path": "protopy/selection/allknn.py", "max_stars_repo_name": "mjasher/scikit-protopy", "max_stars_repo_head_hexsha": "f4deddc42c5883b527d7bb1bfc6d0ece7d01979d", "max_stars_repo_licenses": ["BSD-2-Clause"]...
Require Import Lia. Require Export smpl.Smpl. Require Import Undecidability.Shared.Libs.PSL.FiniteTypes.BasicDefinitions. From Complexity.Libs Require Export PSLCompat. From Complexity.Libs.CookPrelim Require Import MorePrelim. (** * Representation of finite types by natural numbers *) (** This is needed as working ...
{"author": "uds-psl", "repo": "coq-library-complexity", "sha": "5a996877f16fd6fe16dc5f0c3b933486957869df", "save_path": "github-repos/coq/uds-psl-coq-library-complexity", "path": "github-repos/coq/uds-psl-coq-library-complexity/coq-library-complexity-5a996877f16fd6fe16dc5f0c3b933486957869df/theories/Libs/CookPrelim/Fla...
import random import torch import numpy as np import scipy.io as sio from lwrl.memories import Memory class SequentialMemory(Memory): def __init__(self, max_length, history_length=1): super().__init__() self.max_length = max_length self.obs_buffer = None self.history_length = hi...
{"hexsha": "f09ac62ffa89e53c27117b1f84717a31465af47e", "size": 3562, "ext": "py", "lang": "Python", "max_stars_repo_path": "lwrl/memories/sequential.py", "max_stars_repo_name": "sealday/lwrl", "max_stars_repo_head_hexsha": "52bcd67751e605c38db4afa609c58938c7034e8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import simplejson as json, os from sklearn.decomposition import PCA from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from kettle.utils import get_beers import numpy as np class BeerMLData(list): def __init__(self): self.proj = None self.arr = None self.beer_map...
{"hexsha": "93833a4661a59da31899b3702fe70c0ffb4ac536", "size": 5376, "ext": "py", "lang": "Python", "max_stars_repo_path": "kettle/scripts/formatData.py", "max_stars_repo_name": "hacktobacillus/fermenter", "max_stars_repo_head_hexsha": "198e739aa71b13290c542773658928a33709b8f2", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma invar_butlast: "invar (bq @ [t]) \<Longrightarrow> invar bq" [PROOF STATE] proof (prove) goal (1 subgoal): 1. invar (bq @ [t]) \<Longrightarrow> invar bq [PROOF STEP] unfolding invar_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. queue_invar (bq @ [t]) \<and> rank_invar (bq @ [t]) \<Longrighta...
{"llama_tokens": 819, "file": "Binomial-Heaps_BinomialHeap", "length": 5}
from math import log, isnan import numpy as np from bokeh.models import * from bokeh.plotting import figure from itertools import cycle from hail.expr import aggregators from hail.expr.expressions import * from hail.expr.expressions import Expression from hail.typecheck import * from hail import Table import hail pa...
{"hexsha": "c7fc88075892798bc6bbb5c4e02a976ba6eace76", "size": 14577, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/hail/plot/plots.py", "max_stars_repo_name": "maccum/hail", "max_stars_repo_head_hexsha": "e9e8a40bb4f0c2337e5088c26186a4da4948bed2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
function spm_progress_bar(action,varargin) % Display a 'Progress Bar' in the 'Interactive' window % FORMAT spm_progress_bar('Init',height,xlabel,ylabel,flgs) % Initialise the bar in the 'Interactive' window. % If flgs contains a 't', then use tex interpreter for labels. % % FORMAT spm_progress_bar('Set',value) % Set th...
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/spm12/spm_progress_bar.m"}
from typing import Union, Any import numpy as np import quaternion from framegraph.utils import transform_vecs, transform_vec from framegraph.pose_abc import AbstractPose class Pose(AbstractPose): def __init__(self, rotation: Union[np.ndarray, np.quaternion] = None, translation:...
{"hexsha": "70dbfd00949138388d1fd8ddc90c1d8b97bffa26", "size": 5159, "ext": "py", "lang": "Python", "max_stars_repo_path": "framegraph/pose.py", "max_stars_repo_name": "vi-robotics/framegraph", "max_stars_repo_head_hexsha": "554d3058059ef3c31f940fb38c93d67381d9df2d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma cf_comma_proj_left_ObjMap_vrange: assumes "\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<HH> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" shows "\<R>\<^sub>\<circ> (\<GG> \<^sub>C\<^sub>F\<Sqinter> \<HH>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub...
{"llama_tokens": 2362, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Comma", "length": 11}
import numpy as np from configs.DataPath import TRAIN_PATH, ROOT_PATH, DET_PATH, TRAIN_JSON_PATH from utils.rand import random_sys import cv2 import json import random class DataLoader(object): def __init__(self, data_settings, read_all_boxes=False): self.dataset_trained = [] se...
{"hexsha": "1cc39b563237297c0916e6886975b5e5bc43f314", "size": 9192, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/DataLoader.py", "max_stars_repo_name": "bit-bcilab/SiamDCA", "max_stars_repo_head_hexsha": "78a520f2bf6b89f8dee8b05ca7a9399813f77e92", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# -*- coding: utf-8 -*- import sys from PySide2 import QtWidgets from PySide2.QtTest import QTest from numpy import pi from Tests.GUI import gui_option # Set unit as [m] from pyleecan.Classes.LamSlotMag import LamSlotMag from pyleecan.Classes.SlotM18 import SlotM18 from pyleecan.GUI.Dialog.DMachineSetup.SMSlot.PMSlo...
{"hexsha": "8687b976809ba757ffbdd486ac876e9b5d6d9250", "size": 2406, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/GUI/DMachineSetup/PMSlot/test_PMSlot18.py", "max_stars_repo_name": "tobsen2code/pyleecan", "max_stars_repo_head_hexsha": "5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9", "max_stars_repo_licenses"...
import numpy as np class Pilha: def __init__(self, capacidade): self.__capacidade = capacidade self.__topo = -1 self.__valores = np.chararray(self.__capacidade, unicode=True) def __pilha_cheia(self): if self.__topo == self.__capacidade - 1: return True else: return False def ...
{"hexsha": "2fd0be5d98bb51020c1d8d1205fe2ab06a3142ff", "size": 1331, "ext": "py", "lang": "Python", "max_stars_repo_path": "05_pilha_validador_expressoes.py", "max_stars_repo_name": "AlissonRaphael/algorithm_and_data_structures", "max_stars_repo_head_hexsha": "d970299c40ce779e6826d36ca28ebfb1ec6f8a88", "max_stars_repo_...
from collections import OrderedDict from typing import List, Dict import cma import numpy as np import torch from torch import nn def rnn_adjust_parameters(state_dict: Dict[str, torch.Tensor]) -> OrderedDict: state_dict = { k.replace("model.", ""): v for k, v in state_dict.items() if "vae" not in k }...
{"hexsha": "789fb27819504aeedf9713d08fb8cc2749ae602a", "size": 2783, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pl_modules/controller_utils.py", "max_stars_repo_name": "mikcnt/dlai-project", "max_stars_repo_head_hexsha": "56fa0d1e682d07cd89cb011400b0a4ef92ec9265", "max_stars_repo_licenses": ["MIT"], "ma...
# inspired by https://github.com/drawbridge/keras-mmoe import tensorflow as tf import os import numpy as np import pandas as pd from utils_mod import tf_itr, MAP_at_10 from keras import backend as K from keras.optimizers import Adam from keras.layers import Input, Dense, Concatenate from keras.initializers import Vari...
{"hexsha": "04f0d803b9c583e2e6916cce81c68e72607eee6e", "size": 2810, "ext": "py", "lang": "Python", "max_stars_repo_path": "MMOE/train_mmoe.py", "max_stars_repo_name": "innovator-zero/CS410_AI_Project2", "max_stars_repo_head_hexsha": "2d33eb43274dcf6875f48b656ab7c7504ad2f7fa", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Copyright (c) 2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
{"hexsha": "77fb0f3514fd36d10e75f5c49a87fd7c5f8b0deb", "size": 12310, "ext": "py", "lang": "Python", "max_stars_repo_path": "nncf/tensorflow/quantization/initializers/collectors.py", "max_stars_repo_name": "sarthakpati/nncf", "max_stars_repo_head_hexsha": "29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac", "max_stars_repo_lice...
using SuccessiveConvexProgrammings using LinearAlgebra function my_func_array(x, u, t, k) A = [1 2; 3 4; 5 6] B = Matrix(I, 3, 3) return A*x + B*u end x = [1, 2] u = [3, 4, 5] t = [6, 7] k = [8, 9] jacob = get_jacobian(my_func_array, x, u, t, k)
{"hexsha": "62fd8d9370558bcea4583722ceeb68a99f7051a7", "size": 279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/linearisers.jl", "max_stars_repo_name": "JinraeKim/SuccessiveConvexProgrammings.jl", "max_stars_repo_head_hexsha": "a367a5dac91a459d889a745611227cb14b0152e7", "max_stars_repo_licenses": ["MIT"]...
from random import shuffle, choice, random, sample, randint from typing import List, Type, Set, Dict, Tuple from datetime import datetime import networkx as nx import numpy as np import math from LAMARCK_ML.architectures import DataFlow from LAMARCK_ML.architectures.IOMapping_pb2 import IOMappingProto from LAMARCK_ML...
{"hexsha": "32576376237bd3f90b3248a4fcb2c48f5d736380", "size": 42624, "ext": "py", "lang": "Python", "max_stars_repo_path": "LAMARCK_ML/architectures/neuralNetwork.py", "max_stars_repo_name": "JonasDHomburg/LAMARCK", "max_stars_repo_head_hexsha": "0e372c908ff59effc6fd68e6477d04c4d89e6c26", "max_stars_repo_licenses": ["...
import unittest import numpy as np from matplotlib.pylab import plt from mpl_toolkits.mplot3d import Axes3D as _3d def mean_squared_error(y, t): """均方误差(mean squared error)""" return .5 * np.sum((y - t) ** 2) def cross_entropy_error(y, t): """交叉熵误差(cross entropy error)""" if y.ndim == 1: t =...
{"hexsha": "1a92e3cdc07a64d45c742c95aba845bae6f89c63", "size": 5066, "ext": "py", "lang": "Python", "max_stars_repo_path": "third_party/deep_leaning_from_scratch/c4/test_neural_network_learning.py", "max_stars_repo_name": "KentWangYQ/py3-poc", "max_stars_repo_head_hexsha": "52b993716192acaf13094dc77f3f6347ee580996", "m...
#!/usr/bin/env python from pbpl.common.units import * import numpy as np E0 = 3.5*MeV gamma0 = (me*c_light**2 + E0)/(me*c_light**2) p0 = gamma0 * me * c_light quad_f = 250*mm quad_length = 10*mm quad_gradient = p0 / (quad_f * quad_length * eplus) print('gradient = ', quad_gradient / (tesla/meter)) Ld = quad_f * (np....
{"hexsha": "0e8a37ea8d76fbdf0cf56f05a08e0e5ea8bb17b1", "size": 411, "ext": "py", "lang": "Python", "max_stars_repo_path": "share/double-quad/calc.py", "max_stars_repo_name": "ucla-pbpl/pbpl-gpt", "max_stars_repo_head_hexsha": "783d8ce3e72debed6ab20b1828d99102bfbb9360", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
"""Utilities for performing affine transformations on image data. """ import numpy as np from .utils import array_to_img, img_to_array try: import scipy # scipy.ndimage cannot be accessed until explicitly imported from scipy import ndimage except ImportError: scipy = None try: from PIL import Ima...
{"hexsha": "01b8f52a21cfa4d0fe5a998342ef2ec27e7abed4", "size": 15048, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_preprocessing/image/affine_transformations.py", "max_stars_repo_name": "smedegaard/keras-preprocessing", "max_stars_repo_head_hexsha": "1b36f97450b14ed8a88018891473944be1587b47", "max_stars...
import os import random import numpy as np from PIL import Image import torch.utils.data as data_utils class ImagePairDataset(data_utils.dataset.Dataset): """ """ def __init__(self, data_dir=u'image_data/', view_size=48, train=True, transform=None): self.data_dir = data_dir.replace...
{"hexsha": "3fb24722f9f057b2aeeed81131f3f653818ed079", "size": 6819, "ext": "py", "lang": "Python", "max_stars_repo_path": "pair_datasets.py", "max_stars_repo_name": "minz95/lmvcnn_pytorch", "max_stars_repo_head_hexsha": "ff60996c8fd45ffe370b1ba31533276d6eb6c440", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# -*- coding: utf-8 -*- """This functions are based on my own technical analysis library: https://github.com/bukosabino/ta You should check it if you need documentation of this functions. """ import pandas as pd import numpy as np """ Volatility Indicators """ def bollinger_hband(close, n=20, ndev=2): mavg = ...
{"hexsha": "15046f842f58b09826585fce6e2d9718bc450df2", "size": 3076, "ext": "py", "lang": "Python", "max_stars_repo_path": "ta.py", "max_stars_repo_name": "Abxhor/Coldairarrow", "max_stars_repo_head_hexsha": "3735beec8a6fa7ad9356375081229c68f0e83f3d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 40, "max_star...
/* Copyright Rene Rivera 2011-2012 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) */ #include <string> #include <iostream> #include <set> #define BOOST_PREDEF_INTERNAL_GENERATE_TESTS namespace { struc...
{"hexsha": "d7835e16989e854bff1079ab251c73a9f5f7b2e0", "size": 2245, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/predef/test/info_as_cpp.cpp", "max_stars_repo_name": "Abce/boost", "max_stars_repo_head_hexsha": "2d7491a27211aa5defab113f8e2d657c3d85ca93", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_c...
# measure version 1.8.7 from measure import npfarray,sqrt,ln,exp,arctan,lst,tbl,sig,val,mv,dsto_mv,dsys_mv,dtot_mv,plt,pltext,expreg,pi,curve_fit # Aufgabe 1 R_A1 = npfarray([1,10,1])*1e3 R_A1_dsys = 0.05 * R_A1 C_A1 = npfarray([470,4.7,47])*1e-9 C_A1_dsys = 0.10 * C_A1 g_thalb = npfarray([312,32.6,32.6])*1e-6 g_thalb...
{"hexsha": "53ef4f6f300f56f970b130bf04a1470f97f04c00", "size": 7402, "ext": "py", "lang": "Python", "max_stars_repo_path": "PAP22-241.py", "max_stars_repo_name": "stephanlachnit/PAP", "max_stars_repo_head_hexsha": "13dad27dadac706edaa6ec61a522d5ba0b9b100d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
using DrWatson @quickactivate "PECUZAL_Julia" using DynamicalSystems using DelayEmbeddings using DelimitedFiles using BenchmarkTools include("../../src/pecuzal_method.jl") include("../../src/data_analysis_functions.jl") ## We analyze the computational complexity of the proposed PECUZAL method in # comparison to TDE,...
{"hexsha": "c6d8c2ce34d1ab70ad922854e006f519da3590cf", "size": 2795, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/performance/comm_performance.jl", "max_stars_repo_name": "hkraemer/PECUZAL_Julia", "max_stars_repo_head_hexsha": "f68ae7bc3b3dc6116cbdf9682798345e80c22c0a", "max_stars_repo_licenses": ["MIT...
""" Copyright 2020 Samsung SDS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law ...
{"hexsha": "ecd4098ed92dc831e6e6c517adc422fdc82d0751", "size": 6408, "ext": "py", "lang": "Python", "max_stars_repo_path": "function/python/brightics/function/textanalytics/gsdmm.py", "max_stars_repo_name": "jhpark428/studio", "max_stars_repo_head_hexsha": "539457b3026dda827c1b17b4cb851946e34e3b85", "max_stars_repo_lic...
import csv import json import requests import pandas as pd import time import numpy as np import rawgpy rawg = rawgpy.RAWG("student project for university") date_from = "2019-01-01" date_to = "2019-01-02" results = rawg.get_request("https://api.rawg.io/api/games?dates=" + date_from + "," + date_to + "&platforms=4&sto...
{"hexsha": "c9b76bfde44f0997ebe039fdac65ef0d1f254c36", "size": 8256, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_collection.py", "max_stars_repo_name": "GillinedUp/video-games-data-integration", "max_stars_repo_head_hexsha": "8ed6fd5af3d67dd9ba9154de2ec9e196d121b7ee", "max_stars_repo_licenses": ["Apache...
from __future__ import print_function import runai.mp runai.mp.init(splits=2, method=runai.mp.Method.Cout) #runai.mp.init(splits=2, method=runai.mp.Method.Cin) import keras from keras.applications.resnet50 import ResNet50,preprocess_input from keras.layers import Dense, Conv2D, BatchNormalization, Activation from k...
{"hexsha": "80a779c0fc6b3a77378c5745f715f692e807d36d", "size": 20217, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/mp/keras/cifar10.py", "max_stars_repo_name": "bamps53/runai", "max_stars_repo_head_hexsha": "0c868160f64e1e063c6eb6f660d42917322d40c5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Internal Imports from os import error from alpha import Alpha from learnt_model import LearntModel from model import Model from operations import OPS from util import load_alpha # External Imports from copy import deepcopy from datetime import datetime from lucent.modelzoo import inceptionv1, util from lucent.misc.c...
{"hexsha": "c608ff60db6f9cd3431f78613fd57f3959601208", "size": 10751, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_visualization.py", "max_stars_repo_name": "sjoshi804/neural-architecture-search-project", "max_stars_repo_head_hexsha": "b28c23383dc5d8f9da8023a70786313dc5696cf1", "max_stars_repo_license...
import os,random os.environ["KERAS_BACKEND"] = "tensorflow" os.environ["THEANO_FLAGS"] = "device=gpu%d"%(1) os.environ["MKL_THREADING_LAYER"] = "GNU" import numpy as np from keras.utils import np_utils import keras.models as models from keras.layers.core import Reshape,Dense,Dropout,Activation,Flatten from keras.layer...
{"hexsha": "d903fa37d9c767d4ad5d8eb67af9bf31d44f452c", "size": 2623, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn/network.py", "max_stars_repo_name": "mlcomm/deepsensing", "max_stars_repo_head_hexsha": "ede1b0431b0eb5554b63c35c094eecdf544c4795", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python ############################################################################### # Copyright Kitware Inc. and Contributors # Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0) # See accompanying Copyright.txt and LICENSE files for details ##################################...
{"hexsha": "6a55fe366c3680b389bbb0134bda8bd73ec5aeae", "size": 4240, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/generate_dsm.py", "max_stars_repo_name": "willdunklin/Danesfield", "max_stars_repo_head_hexsha": "686cfd331250c00a93b3778c6faaa646fec65de5", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
/*! \file \brief A timetable_value vocabulary. Copyright (C) 2019-2022 kaoru https://www.tetengo.org/ */ #include <algorithm> #include <any> #include <cassert> #include <istream> #include <iterator> #include <limits> #include <memory> #include <optional> #include <stdexcept> #include <string> ...
{"hexsha": "c4f146906c3a1f45ea0459a7da752a4a3c79f8ba", "size": 20788, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "sample/transfer_trains/src/timetable.cpp", "max_stars_repo_name": "tetengo/tetengo", "max_stars_repo_head_hexsha": "66e0d03635583c25be4320171f3cc1e7f40a56e6", "max_stars_repo_licenses": ["MIT"], "m...
import os from os import listdir from os import makedirs from os.path import join, isdir import json import random import shutil import argparse import numpy as np import pandas as pd import librosa import sox def filter_single_labeled(ann, inter_nodes): # get single-labeled filenames and classes class_to_fil...
{"hexsha": "c938cf9cdfde788518d07e07c92fd11ed679f563", "size": 7820, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/preprocess_foreground_sounds.py", "max_stars_repo_name": "wangyu/rethink-audio-fsl", "max_stars_repo_head_hexsha": "6e9626efc0fddadfe2f032e18d1794066a08c8b1", "max_stars_repo_licenses": ["MIT...
import torch import numpy as np from torch.nn import functional as F import matplotlib.pylab as plt def logsumexp(inputs, dim=None, keepdim=True): # From: https://github.com/YosefLab/scVI/issues/13 return (inputs - F.log_softmax(inputs, dim=dim)).sum(dim, keepdim=keepdim) class VAE(torch.nn.Module): d...
{"hexsha": "b1c275c5ee5b3f6e8164826b38d4e3dd98bdbed7", "size": 2441, "ext": "py", "lang": "Python", "max_stars_repo_path": "vae.py", "max_stars_repo_name": "phuijse/tutorial", "max_stars_repo_head_hexsha": "0b6c6ada8509e4ceff52a2c05d962b6a82f461d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_r...
import numpy as np import torch from model import Actor, Critic class Memory(): def __init__(self,batch_size): # init state, action, reward, state_, done self.state = [] self.action = [] self.reward = [] self.val = [] self.prob = [] self.done = [] se...
{"hexsha": "0fb1a241e57cfb4b0dc6ecf6badc0d7aa3b82676", "size": 4476, "ext": "py", "lang": "Python", "max_stars_repo_path": "ppo.py", "max_stars_repo_name": "dkolosa/carla_pilot", "max_stars_repo_head_hexsha": "05ab3cb50788ad9a9af7c0db06d99307c7454aa6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_star...
from qtpy.QtGui import QGuiApplication from qtpy.QtWidgets import QMenu from qtpy import QtGui import numpy as np import logging from __code._utilities.list_widget import ListWidget from __code._utilities.status_message import StatusMessageStatus, show_status_message from __code.extract_evenly_spaced_files.manual_mode...
{"hexsha": "a8786f2aa206d399bb3b19cebd2d90c99fc438c0", "size": 4660, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/__code/extract_evenly_spaced_files/event_handler.py", "max_stars_repo_name": "mabrahamdevops/python_notebooks", "max_stars_repo_head_hexsha": "6d5e7383b60cc7fd476f6e85ab93e239c9c32330", ...
# Copyright 2019 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
{"hexsha": "d1506fa0db5e872b7dc14e6af47dc1ca5e844a86", "size": 8401, "ext": "py", "lang": "Python", "max_stars_repo_path": "forte/processors/text_generation_processor.py", "max_stars_repo_name": "swapnull7/forte", "max_stars_repo_head_hexsha": "737a72afd440d40c3826c3a7c5e4e44235c0f701", "max_stars_repo_licenses": ["Apa...
// Copyright (C) 2016-2018 T. Zachary Laine // // 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) //[ lazy_vector // Defining this allows the assignment below of an expression to a double // without writing a...
{"hexsha": "70c89d440de7bec636b50da60ed0012a82312efd", "size": 4022, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/yap/example/lazy_vector.cpp", "max_stars_repo_name": "Talustus/boost_src", "max_stars_repo_head_hexsha": "ffe074de008f6e8c46ae1f431399cf932164287f", "max_stars_repo_licenses": ["BSL-1.0"], "max...
[STATEMENT] lemma WS_silent_move: assumes "S,kind \<turnstile> (ms\<^sub>1,s\<^sub>1) -a\<rightarrow>\<^sub>\<tau> (ms\<^sub>1',s\<^sub>1')" and "((ms\<^sub>1,s\<^sub>1),(ms\<^sub>2,s\<^sub>2)) \<in> WS S" shows "((ms\<^sub>1',s\<^sub>1'),(ms\<^sub>2,s\<^sub>2)) \<in> WS S" [PROOF STATE] proof (prove) goal (1 subgo...
{"llama_tokens": 121726, "file": "HRB-Slicing_StaticInter_WeakSimulation", "length": 439}
""" Fourier Reconstruction of RR-Lyrae Templates -------------------------------------------- This figure demonstrates Fourier decomposition using RR-Lyrae templates """ # Author: Jake VanderPlas # License: BSD # The figure produced by this code is published in the textbook # "Statistics, Data Mining, and Machine L...
{"hexsha": "d25d5d1b639ddf47bee65ea99d2b1306982647f2", "size": 2324, "ext": "py", "lang": "Python", "max_stars_repo_path": "book_figures/chapter10/fig_rrlyrae_reconstruct.py", "max_stars_repo_name": "larsmans/astroML", "max_stars_repo_head_hexsha": "01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d", "max_stars_repo_licenses": ...
import os import sys import numpy as np import pandas as pd from pprint import pprint from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from utils import model_methods from utils.data_utils import * from utils.arguments import Arguments from utils.mappings import Mappings, Labe...
{"hexsha": "6f573ac0cce8e0f857d4eb5e6f8f55851bbfb03d", "size": 14133, "ext": "py", "lang": "Python", "max_stars_repo_path": "finetuning.py", "max_stars_repo_name": "jfcann/va-transformer", "max_stars_repo_head_hexsha": "bbf04612770c95d38915f41045cf9f9acb5dad21", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# -*-coding: utf-8-*- from lightgbm import LGBMClassifier from sklearn.metrics import accuracy_score from sklearn.model_selection import cross_val_score from bayes_opt import BayesianOptimization import numpy as np def parm_format(parms, intdeal, middledeal, maxdeal): ''' 整理模型参数的格式,intdeal是int类参数的列表,middl...
{"hexsha": "74122080abbd045eeb2d4286a6c790d0499ce1c5", "size": 3111, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/optimize.py", "max_stars_repo_name": "kaiwang0112006/project_demo", "max_stars_repo_head_hexsha": "4067d245be5139aec236adf2179b5880df507cf0", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma ground_head: "ground s \<Longrightarrow> is_Sym (head s)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ground s \<Longrightarrow> is_Sym (head s) [PROOF STEP] by (cases s rule: tm_exhaust_apps) (auto simp: is_Var_def)
{"llama_tokens": 92, "file": "Lambda_Free_RPOs_Lambda_Free_Term", "length": 1}
__pytorch_version__ = "1.3.0" import logging from datetime import timedelta import numpy as np import torch import torch.distributed as dist from ftlib.commlib.basic_commlib import BasicCommLib from ftlib.commlib.commlib_status import CommLibStatus class PyTorch(BasicCommLib): def __init__( self, grad_...
{"hexsha": "07d1ba8e4c11b4c4b521bad0b92fd3d9c2f47e69", "size": 2861, "ext": "py", "lang": "Python", "max_stars_repo_path": "ftlib/commlib/pytorch/impl.py", "max_stars_repo_name": "terrytangyuan/ftlib", "max_stars_repo_head_hexsha": "7d2862dafe9d338d733300047b03c514d1893201", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np import napari from .utils import * # Shift, Control, Alt, Meta, Up, Down, Left, Right, PageUp, PageDown, Insert, # Delete, Home, End, Escape, Backspace, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, # F11, F12, Space, Enter, Tab KEYS = {"focus_next": "]", "focus_previous": "[", "hide_o...
{"hexsha": "f89b74609a13d5d07a33d234f32d494938fafd39", "size": 5206, "ext": "py", "lang": "Python", "max_stars_repo_path": "impy/viewer/keybinds.py", "max_stars_repo_name": "hanjinliu/impy", "max_stars_repo_head_hexsha": "d35b21be7739c3073ae87486673af68b1cdb2853", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
"""Module with logic for a 1-D signal dataset.""" from typing import Callable, NamedTuple, Union import matplotlib.pyplot as plt import numpy as np import torch from .fourier_feature_models import FourierFeatureMLP class SignalData(NamedTuple("FunctionData", [("x", torch.FloatTensor), ...
{"hexsha": "01bd169e170e801d3a808449d900f8ffc6ce6845", "size": 5406, "ext": "py", "lang": "Python", "max_stars_repo_path": "fourier_feature_nets/signal_dataset.py", "max_stars_repo_name": "matajoh/fourier_feature_nets", "max_stars_repo_head_hexsha": "784140f01464e34a0dd4b813c50d20c4c15a8a59", "max_stars_repo_licenses":...
from __future__ import print_function import argparse, os, copy import numpy as np import torch import torch.nn as nn from tqdm import tqdm import prismnet.model as arch from prismnet.utils import log_print, metrics, datautils def train(args, model, device, train_loader, criterion, optimizer): model.train() ...
{"hexsha": "67a78795ffee76d555d412ce07330f5f261efeee", "size": 7493, "ext": "py", "lang": "Python", "max_stars_repo_path": "prismnet/engine/train_loop.py", "max_stars_repo_name": "kuixu/PrismNet", "max_stars_repo_head_hexsha": "aef6f0bdfef765c2fd431762e27a35625d0bd2d8", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from copy import deepcopy from pathlib import Path import itertools import time import numpy as np import tempfile import os from python.solver import * from python.config import TORCHSCRIPT_MODEL_PATH from python.deploy_model import * SVCOMP_PATH = "" SATCOMP18_PATH = "" BENCHMARKS = [SVCOMP_PATH, SATCOMP18_PATH] ...
{"hexsha": "896d4a6cbd45a19e784166a1ac167e705396e3d8", "size": 9606, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/solver_eval.py", "max_stars_repo_name": "negotiatorvivian/neuro-cadical", "max_stars_repo_head_hexsha": "ea7d052a5e03b33d3fb8e4a47bcecf7b9f99551d", "max_stars_repo_licenses": ["Apache-2.0"]...
import pandas as pd import numpy as np DATA_PATH = "./data/EVconsumption/" d1 = pd.read_csv(DATA_PATH + "data_1_selected.csv") d1.head() ids = np.unique(d1['trip_id']) N = len(ids) N_train = int(N * 0.7) N_val = int(N * 0.8) ids_train = ids[:N_train] ids_val = ids[N_train:N_val] ids_test = ids[N_val:] data_trai...
{"hexsha": "c8ece8236f88b31e77bdf2a070b4f5c75359cf71", "size": 1498, "ext": "py", "lang": "Python", "max_stars_repo_path": "prep_scripts/2_data_split.py", "max_stars_repo_name": "linas-p/EVDPEP", "max_stars_repo_head_hexsha": "2062e20ef784a76eebaf71ebbe4f9006cde5bbd5", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars...
# -*- coding: utf-8 -*- import datetime import pandas as pd import numpy as np from rqdatac.services.calendar import get_previous_trading_date from rqdatac.validators import ( ensure_string_in, ensure_order_book_id, ensure_order_book_ids, ensure_date_range, ensure_list_of_string ) from rqdatac.uti...
{"hexsha": "d18d9128f5bddf6e126d45b4dc9c87806f88a75e", "size": 6938, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/lib/python3.7/site-packages/rqdatac/services/ksh_auction_info.py", "max_stars_repo_name": "CatTiger/vnpy", "max_stars_repo_head_hexsha": "7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b", "max_stars...
import numpy as np import pandas as pd import gc from sklearn import metrics from tqdm import tqdm import torch from tqdm import tqdm from torch.utils.tensorboard import SummaryWriter from sklearn.model_selection import train_test_split from datasets import WakeWordDataset, get_loaders from model import SimpleRNN, Simp...
{"hexsha": "c7ce6e7f94f69bdde5afd6d8207387688afb048f", "size": 4584, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "streamride/wakeworddetection", "max_stars_repo_head_hexsha": "da162a93c90d0c139293f4479da6ed44897f492e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
from pathlib import Path import cv2 import numpy as np from medhack.dataset import CovidImageDataset import albumentations as A import pytorch_lightning as pl from pytorch_lightning.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS from torch.utils.data import DataLoader import torch.distributed as dist fro...
{"hexsha": "9fc70199894edf1cd92023cdc4fd7e2a95e0e319", "size": 5071, "ext": "py", "lang": "Python", "max_stars_repo_path": "medhack/data_loading.py", "max_stars_repo_name": "mibaumgartner/hackathon_health", "max_stars_repo_head_hexsha": "e3ab4971ecb4efd0e43c583104b8485c548320d5", "max_stars_repo_licenses": ["Apache-2.0...
def run_pyexocross(): import numpy as np import argparse import os from .pyexocross import PyExocross from .util import create_grid_res, convert_to_wavenumber parser = argparse.ArgumentParser() parser.add_argument("--linelist",type=str,dest="linelist",required=True) parser.add_argument...
{"hexsha": "d566975a1b2e77dcad44a85a5e6cfa12a093ccb2", "size": 5287, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyexocross/run.py", "max_stars_repo_name": "ucl-exoplanets/pyexocross", "max_stars_repo_head_hexsha": "703341cd0fddafcbb04e935c89ddc9d02dda9f59", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import matplotlib.pyplot as plt import glob import numpy as np def parse_RMSF_file(rmsf_file: str): if glob.glob(rmsf_file): return np.genfromtxt(rmsf_file,skip_header=1,usecols=1,dtype=float) else: print("File not found: ",rmsf_file) return None def rmsf(temp_rmsf_array,ax=None...
{"hexsha": "ff0b335680c085268fe696fa707f2b3655f323c0", "size": 1916, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydrachem/Subplots/rmsf.py", "max_stars_repo_name": "markahix/pydrachem", "max_stars_repo_head_hexsha": "56a55260bbcbb3759629a36625920f4094a49202", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
# pylint: disable=C0103,W0102,R0914 import numpy as np from omnizart.feature.cfp import extract_cfp from omnizart.utils import get_logger logger = get_logger("HCFP Feature") def fetch_harmonic(data, cenf, ith_har, start_freq=27.5, num_per_octave=48, is_reverse=False): ith_har += 1 if ith_har != 0 and is_r...
{"hexsha": "cfd5d318799a7c14d55d91a92d2b0b50e2dab8c5", "size": 1972, "ext": "py", "lang": "Python", "max_stars_repo_path": "omnizart/feature/hcfp.py", "max_stars_repo_name": "nicolasanjoran/omnizart", "max_stars_repo_head_hexsha": "b0e74af39b2e3a312ef32dbf0837626b2e043cb6", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import time import torch import torch.nn as nn # from flair.parser.modules.dropout import SharedDropout from torch.nn.modules.rnn import apply_permutation from torch.nn.utils.rnn import PackedSequence from torch.nn.utils.rnn import (pack_padded_sequence, pad_packed_sequence, pad_sequence) i...
{"hexsha": "183b7cf6737730be32eb70c4b37b94fc5d059621", "size": 23168, "ext": "py", "lang": "Python", "max_stars_repo_path": "flair/models/biaffine_dp.py", "max_stars_repo_name": "db-bionlp/CLNER", "max_stars_repo_head_hexsha": "77910311acf0411252b9fea8c3e6efb7175eb21f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Copyright 2020 NXP # SPDX-License-Identifier: MIT import numpy as np from PIL import Image import argparse import os def imload(filename: str, im_width: int, im_height: int, datatype: str): """Converts an image to a numpy array and resizes. Args: filename (str): Image filename. ...
{"hexsha": "e4c654a10561d3d96cc4d39bf2f4902033512a7c", "size": 2476, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pyarmnn/scripts/image_to_npy.py", "max_stars_repo_name": "PetervdPerk-NXP/pyarmnn-release", "max_stars_repo_head_hexsha": "2008c270f7c7c84a930842c845138628c8b95713", "max_stars_repo_license...
from pprint import pprint import numpy as np from skimage.data import camera from skimage.exposure import rescale_intensity from skimage.metrics import peak_signal_noise_ratio as psnr from skimage.metrics import structural_similarity as ssim from aydin.io.datasets import add_noise from aydin.it.transforms.padding imp...
{"hexsha": "13d2842b2c14045cbc80ad866454c9831edab4fc", "size": 1481, "ext": "py", "lang": "Python", "max_stars_repo_path": "aydin/restoration/denoise/test/test_n2s_fgr.py", "max_stars_repo_name": "royerloic/aydin", "max_stars_repo_head_hexsha": "f9c61a24030891d008c318b250da5faec69fcd7d", "max_stars_repo_licenses": ["BS...
from __future__ import print_function from __future__ import division from sklearn.utils import check_random_state from sklearn import preprocessing as prep from utils.data import load_data, show_data_splits, shape_data from utils.evaluation import evaluate from utils.profiles import select_model, show_design, train,...
{"hexsha": "844aff8b757e567eab04101d17c08cb3e245797f", "size": 8032, "ext": "py", "lang": "Python", "max_stars_repo_path": "profiles_weak.py", "max_stars_repo_name": "andreuvall/HybridPlaylistContinuation", "max_stars_repo_head_hexsha": "6e31e50050c61a2c3ae55183e18b665fd54c7250", "max_stars_repo_licenses": ["BSD-2-Clau...
import numpy as np class Kinematics: def __init__(self): self._l = 0.14 self._w = 0.075 self._hip = 0.04 self._leg = 0.1 self._foot = 0.1 self.y_dist = 0.11 self.x_dist = self._l self.height = 0.15 # frame vectors self._hip_front_righ...
{"hexsha": "2022875ea045399b33707d0016f65a84a383b92f", "size": 6936, "ext": "py", "lang": "Python", "max_stars_repo_path": "rex_gym/model/kinematics.py", "max_stars_repo_name": "elvinaqa/rex-gym", "max_stars_repo_head_hexsha": "a57b5df5f356e228e47d4e0b778617a7f74834c4", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
\chapter{Constructing an formula} \label{chapter:constructingaformula} The class \formulaClass represents SMT formulas, which are defined according to the following abstract grammar \[ \begin{array}{rccccccccccccc} p &\quad ::=\quad & a & | & b & | & x & | & (p + p) & | & (p \cdot p) & | & (p^e) \\ v &\quad ::=\qu...
{"hexsha": "a386713f08ee5608914bf385bda64818ef350a2e", "size": 8958, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/constructingformulas.tex", "max_stars_repo_name": "minemebarsha/smtrat", "max_stars_repo_head_hexsha": "eaada50cdf9bbfe4dd4f6a54776387484c37b0f2", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Fri May 4 21:34:01 2018 @author: 大茄茄 """ #对原始数据进行四阶巴特沃斯滤波 from scipy.signal import butter, lfilter import pandas as pd import os from sklearn.externals.joblib import Parallel, delayed SampFreq = 256 ChannelNum = 22 def butter_bandpass_filter(data, lowcu...
{"hexsha": "a520116991dd80361b958218c340e7a654118bc7", "size": 2069, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_process/band_filter.py", "max_stars_repo_name": "yolle103/eeg-lstm", "max_stars_repo_head_hexsha": "24a236a3ffa4af02b81a5a772f9a1f3130817ad4", "max_stars_repo_licenses": ["MIT"], "max_stars_c...