text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
""" Custom JSON serializer for log entries. Handles Module types for now, more can be added later. """ struct LogEntrySerialization <: CommonSerialization end show_json(io::StructuralContext, ::LogEntrySerialization, m::Module) = show_json(io, LogEntrySerialization(), string(m)) show_json(io::StructuralContext, ::LogE...
{"hexsha": "0af22348f1333c367f3f0b037b3f4d040f62c2a9", "size": 5016, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/log_utils.jl", "max_stars_repo_name": "xgdgsc/LogRoller.jl", "max_stars_repo_head_hexsha": "84ea509933f3e4a1c8e04a2f5488d921457ff34d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
from pysumma.pysumma.Plotting import Plotting from pysumma.pysumma.hovmoller import hovmoller from pysumma.pysumma.layers import layers from pysumma.pysumma.spatial import spatial #(4) Display Plotting.py ##1 Display plot from summa_plot created by andrew bennett from UW import pandas as pd import xarray as xr import ...
{"hexsha": "635971c0371b0ab10933c6998ed6b3c642226c14", "size": 1902, "ext": "py", "lang": "Python", "max_stars_repo_path": "pysumma/pysumma/plot_sample.py", "max_stars_repo_name": "DavidChoi76/pysumma_alpha1", "max_stars_repo_head_hexsha": "c526ff85310524d07314ebfdc8699b61f9234087", "max_stars_repo_licenses": ["MIT"], ...
from matplotlib import pyplot as plt, rcParams from numpy import matlib from scipy import signal import json import numpy as np import warnings warnings.filterwarnings("ignore") # Пока matplotlib < 3.3, будет рекомендовать # use_line_collection в stem def xcov(x, lags): mean = np.mean(x) return [ np....
{"hexsha": "e799941a68432733a9fb7abe8321bf07ecefe743", "size": 12043, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lr_07.py", "max_stars_repo_name": "SqrtMinusOne/Digital_Signal_Processing", "max_stars_repo_head_hexsha": "fb746e771a33111e7f3df61beb282883c8d04b85", "max_stars_repo_licenses": ["Apache-2.0"]...
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <yaml-cpp/yaml.h> #include <a_star.hpp> #include <algorithm> #include <boost/functional/hash.hpp> #include <boost/heap/fibonacci_heap.hpp> #include <boost/program_options.hpp> #include <iostream> #include <numeric> #include <vector> using libMultiRobot...
{"hexsha": "6dc95806704dd9c8e4f359b97ee91ab467b86443", "size": 22977, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/train_env.cpp", "max_stars_repo_name": "zijinoier/mater", "max_stars_repo_head_hexsha": "7bdbd885debcaec0048c478187694a30edbc387a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4.0, "...
import numpy as np import pandas as pd from math import modf format_slash = '%d/%m/%Y %H:%M' format_dash = '%Y-%m-%d %H:%M:%S' # 1.10.19 0:25 format_dots = '%d.%m.%Y %H:%M:%S' # 30-11-20 18:59 format_dash_short = '%d-%m-%y %H:%M' # unix epoch epoch = pd.Timestamp("1970-01-01") # just a reminder how to convert from ...
{"hexsha": "ba9d165ca178552eb3766135c79ce5b1425498b7", "size": 8311, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/handy.py", "max_stars_repo_name": "altanova/stuff", "max_stars_repo_head_hexsha": "d55a65e929d95bcb6729ea61f4a655dea6452d0d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
/***************************************************************************** * * Rokko: Integrated Interface for libraries of eigenvalue decomposition * * Copyright (C) 2012-2015 Rokko Developers https://github.com/t-sakashita/rokko * * Distributed under the Boost Software License, Version 1.0. (See accompanying * fi...
{"hexsha": "2881fcbf2123dc437d8135c4d1d68a270ce844c7", "size": 4050, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "rokko/localized_matrix.hpp", "max_stars_repo_name": "wistaria/rokko", "max_stars_repo_head_hexsha": "7cd9d5155e82f038039a46c1dc8f382b3fe7e2b7", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_cou...
(* Cyclone Semantics using TLC/LN in Coq Version 4 *) (* "SAFE PROGRAMMING AT THE C LEVEL OF ABSTRACTION". Daniel Grossman, August 2003 *) (* Lemmas for LN infrastructure *) (* Brian Milnes 2016 *) Set Implicit Arguments. Require Export Cyclone_Type_Substitution Cyclone_LN_FV Cyclone_LN_LC_Body Cyclone_LN_Open_Close...
{"author": "briangmilnes", "repo": "CycloneCoqSemantics", "sha": "190c0fc57d5aebfde244efb06a119f108de7a150", "save_path": "github-repos/coq/briangmilnes-CycloneCoqSemantics", "path": "github-repos/coq/briangmilnes-CycloneCoqSemantics/CycloneCoqSemantics-190c0fc57d5aebfde244efb06a119f108de7a150/4.1/Cyclone_LN_Lemmas.v"}
[STATEMENT] lemma (in Corps) n_eq_val_eq_idealTr: "\<lbrakk>distinct_pds K n P; x \<in> carrier (O\<^bsub>K P n\<^esub>); y \<in> carrier (O\<^bsub>K P n\<^esub>); \<forall>j \<le> n. ((\<nu>\<^bsub>K (P j)\<^esub>) x) \<le> ((\<nu>\<^bsub>K (P j)\<^esub>) y)\<rbrakk> \<Longrightarrow> Rxa (O\<^bsub>K P n\<^esub>) y \...
{"llama_tokens": 13248, "file": "Valuation_Valuation2", "length": 20}
"""Util for analysis of SIS/backselect data.""" import collections import numpy as np import os import torch import inference_util import sis_util from sufficient_input_subsets import sis # Function to sort filenames by image index in path. SR_SORT = lambda s: int(os.path.basename(s).split('_')[-1].split('.')[0]) ...
{"hexsha": "e6e165bd1b989c69c5a73790d8de27f70d990d9d", "size": 4723, "ext": "py", "lang": "Python", "max_stars_repo_path": "sis_analysis_util.py", "max_stars_repo_name": "b-carter/overinterpretation", "max_stars_repo_head_hexsha": "211d25c83d97e3238109e5c611c1af696989d3b6", "max_stars_repo_licenses": ["MIT"], "max_star...
from collections import namedtuple import torch from torch.autograd import Variable import numpy as np from const import * def reps_pad(responses, max_len, evaluation): x = np.array([resp + [PAD] * (max_len - len(resp)) for resp in responses]) if evaluation: with torch.no_grad(): x = Var...
{"hexsha": "ca0f5e3767129199380baaf0decafeaf2dd27a44", "size": 3359, "ext": "py", "lang": "Python", "max_stars_repo_path": "retrieval-based-chatbots/data_loader.py", "max_stars_repo_name": "shinoyuki222/torch-light", "max_stars_repo_head_hexsha": "4799805d9bcae82a9f12a574dcf9fdd838c92ee9", "max_stars_repo_licenses": ["...
CS REAL FUNCTION DAW(XX) DOUBLE PRECISION FUNCTION DAW(XX) C---------------------------------------------------------------------- C C This function program evaluates Dawson's integral, C C 2 / x 2 C -x | t C F(x) = e | e dt C ...
{"hexsha": "e352f1fd315c58e776901c5a38baf132484dc8ff", "size": 13200, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/f2cl/packages/toms/715/daw.f", "max_stars_repo_name": "sbwhitecap/clocc-hg", "max_stars_repo_head_hexsha": "f6cf2591ceef8a3a80e04da9b414cdf60a25a90f", "max_stars_repo_licenses": ["MIT"], "max...
% % Showcase file to demonstrate the abilities of kLabCourse-template. % % \documentclass[ngerman]{kLCReprt} \usepackage{blindtext} \usepackage{kLCTitle} \reportAuthor[Zweiter Autor]{Erster Autor} \reportAuthorMail[zweite.mail@mail.org]{email@mail.org} \reportDate{25.02.2015} \reportSubmissionDate{06.03.2015} \repo...
{"hexsha": "a150ee071a63739f704516ac71cd40bc415ca184", "size": 766, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "showcase.tex", "max_stars_repo_name": "kzoch/kLabCourse-template", "max_stars_repo_head_hexsha": "efaffbde3bea7ea826357398414b35bf54b934c2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
@inline S_inner_to_outer(S_in, u, xi, phi0) = 1/u + xi - u * phi0*phi0/3 * (1 - u * xi) + u*u*u * S_in @inline S_u_inner_to_outer(S_u_in, S_in, u, xi, phi0) = -1/(u*u) - phi0*phi0/3 * (1 - u * xi) + u * xi * phi0*phi0/3 + 3 * u*u * S_in + u*u*u * S_u_in @inline F_inner_to_outer(F_in, u) = u*u * F_in @in...
{"hexsha": "2fb0b57d1828fc825bb4f070abf81f8fc0d078ad", "size": 866, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AdS5_3_1/inner_to_outer.jl", "max_stars_repo_name": "Mikel-Sanchez-Garitaonandia/Jecco.jl", "max_stars_repo_head_hexsha": "d1e030ed0e3534c6bbb7aeaba4e3904fc59a3c35", "max_stars_repo_licenses": [...
import numpy as np import nibabel import pytest from nilearn._utils.testing import write_tmp_imgs from nilearn.decomposition.dict_learning import DictLearning from nilearn.decomposition.tests.test_canica import _make_canica_test_data from nilearn.image import iter_img, get_data from nilearn.input_data import NiftiMask...
{"hexsha": "0cd3d411573f6592ef5c3e2f00306487d4f18fd7", "size": 6375, "ext": "py", "lang": "Python", "max_stars_repo_path": "nilearn/decomposition/tests/test_dict_learning.py", "max_stars_repo_name": "chouhanaryan/nilearn", "max_stars_repo_head_hexsha": "e26312be96fe5c0211da28889ddd3ab1bd0ddc49", "max_stars_repo_license...
# Poisson distribution export Poisson import Base using SpecialFunctions: logfactorial @parameterized Poisson(λ) ≪ CountingMeasure(ℤ[0:∞]) Base.eltype(::Type{P}) where {P<:Poisson} = Int function logdensity(d::Poisson{(:λ,)}, y) λ = d.λ return y * log(λ) - λ - logfactorial(y) end function logdensity(d::Poi...
{"hexsha": "a95d931da1635a5ab08a5bc5b1bd9e287e430f77", "size": 783, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/parameterized/poisson.jl", "max_stars_repo_name": "jw3126/MeasureTheory.jl", "max_stars_repo_head_hexsha": "419d2f2fc3cb27c9b1d969d2e05022f3a4a01f66", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np from PIL import ImageGrab import cv2 import time def auto_canny(image, sigma=0.33): # compute the median of the single channel pixel intensities v = np.median(image) # apply automatic Canny edge detection using the computed median lower = int(max(0, (1.0 - sigma) * v)) upper = int(min...
{"hexsha": "4a7a2579f4250a38824415ea4a9a931ae2462ff1", "size": 1990, "ext": "py", "lang": "Python", "max_stars_repo_path": "FilterTests.py", "max_stars_repo_name": "siddharths067/CNN-Based-Agent-Modelling-for-Humanlike-Driving-Simulaion", "max_stars_repo_head_hexsha": "42d79fc262d60ecc9eebbe0e77a1576a04979501", "max_st...
%% Copyright (C) 2016 Lagu %% Copyright (C) 2016, 2018-2019, 2022 Colin B. Macdonald %% %% This file is part of OctSymPy. %% %% OctSymPy 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 th...
{"author": "cbm755", "repo": "octsympy", "sha": "c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd", "save_path": "github-repos/MATLAB/cbm755-octsympy", "path": "github-repos/MATLAB/cbm755-octsympy/octsympy-c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd/inst/@sym/equationsToMatrix.m"}
function E_slice_plot(E::ScalarField, dir, slice_location, t; issliced=false, save=false, slice_dir=:x, kwargs...) if !issliced E_slice = slice(E, slice_dir, slice_location) else E_slice = E end grid = getdomain(E_slice) cl = ustrip(max(abs.(extrema(E_slice))...)) ...
{"hexsha": "95ccb7c39ebf4e4fdbe18d50bc61e0f6a237c58a", "size": 869, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/plots/fields.jl", "max_stars_repo_name": "ctp-fpub/SDFResultViewer.jl", "max_stars_repo_head_hexsha": "375a4f7a6cf87d32980b4af8a075c235d4e5ed3b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from scipy import stats # --------------------------- # Independent samples ------- # --------------------------- def cles_ind(x1, x2): """Calc common language effect size Interpret as the probability that a score sampled at random from one distribution will be greater than a score...
{"hexsha": "0e1f99837a5e22e89d0ce86e21f967c8a123fd63", "size": 3749, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_exploration/non_param_effect_size.py", "max_stars_repo_name": "0-b1t/spotify_insights", "max_stars_repo_head_hexsha": "a3c50b728c83139c53a21582fe6b867152356b8f", "max_stars_repo_licenses": ["...
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // test_vector.cpp // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www...
{"hexsha": "8aa301945fddd0aad817596ed93dbc482cddd0eb", "size": 2295, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "serialization/private/test/test_string_4g.cpp", "max_stars_repo_name": "hschwane/offline_production", "max_stars_repo_head_hexsha": "e14a6493782f613b8bbe64217559765d5213dc1e", "max_stars_repo_licens...
[STATEMENT] lemma real_sqrt_le_iff': "x \<ge> 0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> sqrt x \<le> y \<longleftrightarrow> x \<le> y ^ 2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> (sqrt x \<le> y) = (x \<le> y\<^sup>2) [PROOF STEP] using real_le_l...
{"llama_tokens": 303, "file": null, "length": 2}
import os import matplotlib import matplotlib.pyplot as plt import numpy as np from .utils import image_and_pickle from .utils import exponential_moving_average def line_graph(values, filename, plotsdir, smoothing=None, title='', xname='', yname='', color='blue'): if smoothing is not None: values = expone...
{"hexsha": "6ab36904ef8437a34e2d026fd305e08d35aeb50e", "size": 962, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualizing/line_graph.py", "max_stars_repo_name": "isaachenrion/jets", "max_stars_repo_head_hexsha": "59aeba81788d0741af448192d9dfb764fb97cf8d", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
"""Event-based representation output interface.""" from operator import attrgetter, itemgetter from typing import TYPE_CHECKING import numpy as np from numpy import ndarray if TYPE_CHECKING: from ..music import Music def to_event_representation( music: "Music", use_single_note_off_event: bool = False, ...
{"hexsha": "b9645875979571596642105b81a1057acad5b373", "size": 4516, "ext": "py", "lang": "Python", "max_stars_repo_path": "muspy/outputs/event.py", "max_stars_repo_name": "jeremyjordan/muspy", "max_stars_repo_head_hexsha": "160cdcad10ece0618c0a71e75c3370622e786d9d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
using ViewerGL GL = ViewerGL points = rand(50,3) GL.VIEW([ GL.GLPoints(points), GL.GLHull(points,GL.Point4d(1,1,1,0.2)), GL.GLAxis(GL.Point3d(0,0,0),GL.Point3d(1,1,1)) ]);
{"hexsha": "c406f77c9b8301112b4c1c07308048ec3f9ccc75", "size": 191, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/Convex.jl", "max_stars_repo_name": "cvdlab/ViewerGL.js", "max_stars_repo_head_hexsha": "ae28d7808699f9c34add4ad265b68a84bfa14842", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ...
""" AutoML : Round 0 __author__ : abhishek thakur """ import numpy as np from libscores import * from sklearn import ensemble, linear_model, preprocessing from sklearn import decomposition, metrics, cross_validation np.set_printoptions(suppress=True) train_data = np.loadtxt('cadata/cadata_train.data') test_data = np...
{"hexsha": "a4209063b2c71ab4e98944d34394bf9bd3a6a726", "size": 962, "ext": "py", "lang": "Python", "max_stars_repo_path": "Phase0/cadata_main.py", "max_stars_repo_name": "abhishekkrthakur/AutoML", "max_stars_repo_head_hexsha": "ffdd8709081e1daecc84e0bce6a21ea32f22eeba", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" KeyGenerator Can be used to generate a pair of matching secret and public keys. In addition, the `KeyGenerator` provides functions to obtain relinearization keys (required after multiplication) and Galois keys (needed for rotation). See also: [`SecretKey`](@ref), [`PublicKey`](@ref), [`RelinKeys`](@ref) """ ...
{"hexsha": "6dc656da83152469fead03318d278bdaf29f19cb", "size": 3247, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/keygenerator.jl", "max_stars_repo_name": "sloede/SEAL.jl", "max_stars_repo_head_hexsha": "68285d72db5c02d8ef692aa989bd02c651fd3ff2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "...
PROGRAM A10Q2 !-- ! A program to implement the `Sieve of Eratosthenes` algorithm !-- IMPLICIT NONE INTEGER, DIMENSION(1:4999) :: S, Sfinal INTEGER :: i, j, jprev, p, pnew REAL :: size PRINT *, "Determines the list of prime numbers from 0-5000 using the 'Sieve of Eratosthenes' method" !- initialize the arrays...
{"hexsha": "dc39dc4d61ef8d647ccd4d4c5547511689a26747", "size": 1090, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Assignment 10/A10Q2.f90", "max_stars_repo_name": "Chris-Drury/COMP3731", "max_stars_repo_head_hexsha": "59d70f4fe8354b7b50fd2911ec2d8e7aad8401bc", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
# coding: utf-8 # In[51]: import cv2 import numpy as np import matplotlib.pyplot as plt import math video_path = "360.mp4" p_frame_thresh = 300000 # You may need to adjust this threshold cap = cv2.VideoCapture(video_path) # Read the first frame. ret, prev_frame = cap.read() alto,ancho,canales=prev_frame.shape de...
{"hexsha": "aa81591877458ea4867a0fc611fab2bad7fa1e8b", "size": 1783, "ext": "py", "lang": "Python", "max_stars_repo_path": "oldies/futbol.py", "max_stars_repo_name": "jrodrigopuca/futbolpy", "max_stars_repo_head_hexsha": "4583e0ce3dfe1521e2f0b6f656407c640bbf3149", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
/* Copyright (C) 2019-2020 Thomas Jespersen, TKJ Electronics. All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the MIT License * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the impli...
{"hexsha": "1d27d218e3e0f579cc5ff603bf6f2b8e7a5a9a5c", "size": 4802, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ros/jetsoncar_driver/src/test_node.cpp", "max_stars_repo_name": "mindThomas/JetsonCar", "max_stars_repo_head_hexsha": "74636d4da1f7f71ca9f2315a1b2347393b081eda", "max_stars_repo_licenses": ["MIT"], ...
#%% %load_ext autoreload %autoreload 2 import jax import jax.numpy as np import numpy as onp import distrax import optax import gym from functools import partial from env import Navigation2DEnv, Navigation2DEnv_Disc import cloudpickle import pathlib import haiku as hk from jax.config import config config.update(...
{"hexsha": "916cb3d5f5d86cfe661925c45b9951221f6e545b", "size": 8100, "ext": "py", "lang": "Python", "max_stars_repo_path": "maml/maml.py", "max_stars_repo_name": "gebob19/rl_with_jax", "max_stars_repo_head_hexsha": "a30df06de3035c460e5339611974664a2130ca6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "ma...
import os import math import shutil import time import collections from pathlib import Path import logging import uuid import numpy as np from fmpy.fmi1 import FMU1Slave, FMU1Model from fmpy.fmi2 import FMU2Slave, FMU2Model from fmpy import read_model_description, extract from energym.envs.env import Env from energym...
{"hexsha": "fadf99d44a0b596dc80caf1030f1af116edb4527", "size": 24264, "ext": "py", "lang": "Python", "max_stars_repo_path": "energym/envs/env_fmu.py", "max_stars_repo_name": "bsl546/energym", "max_stars_repo_head_hexsha": "0133ca7a19d21352a427e1913755e1ebf6fd8bb6", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_c...
module MessageRequest export body_is_a_stream, body_was_streamed, setuseragent!, resource import ..Layer, ..request using ..IOExtras using URIs using ..Messages import ..Messages: bodylength import ..Headers import ..Form, ..content_type """ "request-target" per https://tools.ietf.org/html/rfc7230#section-5.3 """ r...
{"hexsha": "195318f588daadbb6e70fb301981c11a30137339", "size": 3310, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MessageRequest.jl", "max_stars_repo_name": "cmcaine/HTTP.jl", "max_stars_repo_head_hexsha": "7bf03e2f29b8a25eeffd7223a60a6352173fe1da", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import numpy as np import requests from StringIO import StringIO from matplotlib import image as img import geopy import yaml # First hard-code what is needed for correct output of green_between() class Map(object): def __init__(self, latitude, longitude, satellite=True, zoom=10, size=(400, 400)...
{"hexsha": "893e9dac63057a71f53c6ef3c807c319bce02cf0", "size": 3269, "ext": "py", "lang": "Python", "max_stars_repo_path": "greengraph/tests/fixtures/generate_green_between_fixtures.py", "max_stars_repo_name": "ddervs/GreenGraph", "max_stars_repo_head_hexsha": "bb65e5d9f2a34686add644e4fa1851aabf82c3c1", "max_stars_repo...
# Lint as: python3 # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
{"hexsha": "60fb14039f5e358bbe7152529716e95da31321bf", "size": 18283, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_quant_finance/experimental/dates/holiday_calendar.py", "max_stars_repo_name": "rajflume/tf-quant-finance", "max_stars_repo_head_hexsha": "5cb9474f6f2e74617735d38ef26aaef28ce69aff", "max_stars_...
import numpy as np import tensorflow as tf import random import tensorflow.layers as layer from collections import deque import random import datetime import time from multiagent.environment import MultiAgentEnv from multiagent.policy import InteractivePolicy import multiagent.scenarios as scenarios #################...
{"hexsha": "ecbd4eeb8c2fe3d3698258b5b65ffbbedfe0dde6", "size": 7254, "ext": "py", "lang": "Python", "max_stars_repo_path": "maddpg.py", "max_stars_repo_name": "170928/-Review-Multi-Agent-Actor-Critic-for-Mixed-Cooperative-Competitive-Environment", "max_stars_repo_head_hexsha": "db927493c9291686ca11033caf528be9c7a86058"...
[STATEMENT] lemma harm_pos: "n > 0 \<Longrightarrow> harm n > (0 :: 'a :: {real_normed_field,linordered_field})" [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 < n \<Longrightarrow> (0::'a) < harm n [PROOF STEP] unfolding harm_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. 0 < n \<Longrightarrow> (0::'a) < ...
{"llama_tokens": 170, "file": null, "length": 2}
//| This file is a part of the sferes2 framework. //| Copyright 2009, ISIR / Universite Pierre et Marie Curie (UPMC) //| Main contributor(s): Jean-Baptiste Mouret, mouret@isir.fr //| //| This software is a computer program whose purpose is to facilitate //| experiments in evolutionary computation and evolutionary robot...
{"hexsha": "916f456a7dbd58c4f0733ae91f1006d2e32fda3b", "size": 4426, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "sferes/sferes/gen/cmaes.hpp", "max_stars_repo_name": "Evolving-AI-Lab/innovation-engine", "max_stars_repo_head_hexsha": "58c7fcc3cbe3d6f8f59f87d95bdb5f2302f425ba", "max_stars_repo_licenses": ["MIT"]...
import os import sys import click import cv2 import numpy as np from utils.dataset.data_provider import load_annoataion @click.command() @click.option('--input', '-i', default='data/dataset/mlt_cmt') @click.option('--name', '-n') def process(input, name): im_fn = os.path.join(input, "image", name) im = cv2.im...
{"hexsha": "43b1705a88887d093a67451c1bfac49a06b12c70", "size": 980, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_split.py", "max_stars_repo_name": "deeplearningvn/text-detection", "max_stars_repo_head_hexsha": "63f9ec1766b8d66f33e6d073f5ae577402d45b19", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
using Test using QBase @testset "./src/channels.jl" begin @testset "repalacer_channel()" begin @testset "simple qubit examples" begin ρ = State([1 0;0 0]) σ = State([0 0;0 1]) r = replacer_channel(ρ, σ, 0.5) @test r isa State @test r == [0.5 0;0 0.5] end @testset ...
{"hexsha": "a6e0c8b1d91763d3eaa501fb8f3c58e5d48dbfec", "size": 2705, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/unit/channels.jl", "max_stars_repo_name": "ChitambarLab/QBase.jl", "max_stars_repo_head_hexsha": "cb30a84b784c61abdae8b007e1de691f3ccd4e4b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from thyme.trajectories import Trajectories from thyme.trajectory import Trajectory from thyme.filters.distance import e_filter from thyme.filters.energy import sort_e from thyme.routines.dist_plots.energy import multiple_plots as multiple_plots_e from thyme.parsers.vasp import pack_folder_trj, get_childfolders, write ...
{"hexsha": "3772251b6178ea14af6d8f9346653f7e8213c77f", "size": 1236, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/formate_au_vasp/new_poscar.py", "max_stars_repo_name": "nw13slx/thyme", "max_stars_repo_head_hexsha": "b2a16aa1e6b0701adcfd2bd146f85b5c46b35254", "max_stars_repo_licenses": ["MIT"], "max_s...
# @testset "AABB" begin # c = SVector(99.0, 99.0, 99.0) # e = SVector(1.0, 2.0, 3.0) # # aabb = AABB(c, e) # # @test aabb isa AABB # @test aabb.c == c # @test aabb.e == e # @test AABB(aabb) == aabb # end @testset "OBB" begin c = SVector(99.0, 99.0, 99.0) e = SVector(1.0, 2.0, 3.0)...
{"hexsha": "5084b22615ed10845f422c1a7f1fa03b958e3d2f", "size": 651, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_obb/test_box_types.jl", "max_stars_repo_name": "UnofficialJuliaMirror/PressureFieldContact.jl-1a2887a7-38b6-5ebe-8978-3a02049ebf6f", "max_stars_repo_head_hexsha": "55d7b6f85771465de112171c...
# Copyright (c) Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this...
{"hexsha": "4c84a1d377388be208625380e0896ccd5672ca2e", "size": 6541, "ext": "py", "lang": "Python", "max_stars_repo_path": "unlock/state/scope_state.py", "max_stars_repo_name": "NeuralProsthesisLab/unlock", "max_stars_repo_head_hexsha": "0c4d95abdab288d3e657ca2db867b06f755f26ff", "max_stars_repo_licenses": ["BSD-3-Clau...
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
{"hexsha": "76c48a1b83c25501b6100aa3c536b96e50cf7da3", "size": 7228, "ext": "py", "lang": "Python", "max_stars_repo_path": "pynet/transforms.py", "max_stars_repo_name": "HChegraoui/pynet", "max_stars_repo_head_hexsha": "3e26f7992e5b6954f637e3a68e4766f3886e2ce9", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_count...
""" Mathematica (Wolfram Alpha): integral_(-2)^2 sqrt(4 - x^2) (1./2 + x^3 cos(x/2)) dx = 3.14159 python workouts/integration_examples/free_wifi.py > outputs/integration_examples/free_wifi.log """ from qmcpy import * from numpy import * from time import time def pi_problem(abs_tol=.01): t0 = time() distributi...
{"hexsha": "bea1776df1b51c7e0397faabff096f990122e056", "size": 978, "ext": "py", "lang": "Python", "max_stars_repo_path": "workouts/integration_examples/pi_problem.py", "max_stars_repo_name": "kachiann/QMCSoftware", "max_stars_repo_head_hexsha": "0ed9da2f10b9ac0004c993c01392b4c86002954c", "max_stars_repo_licenses": ["A...
#T# improper fraction can be converted to and from mixed numbers #T# to work with improper fractions and mixed numbers, the sympy package is used import sympy #T# create an improper fraction with the Rational constructor num1 = sympy.Rational(7, 4) # 7/4 #T# the p, q attributes of a rational number contain the numer...
{"hexsha": "1ec559d4bf2a65d76f220e6c8f12c738f5583700", "size": 944, "ext": "py", "lang": "Python", "max_stars_repo_path": "Math/A01_Arithmetics_basics/Programs/S02_2/Improper_fractions.py", "max_stars_repo_name": "Polirecyliente/SGConocimiento", "max_stars_repo_head_hexsha": "560b08984236d7a10f50c6b5e6fb28844193d81b", ...
import pandas as pd import numpy as np import operator import collections import logging from sklearn.cluster import KMeans from sklearn.model_selection import train_test_split import sklearn.metrics as metrics class StatisticEstimator: def __init__(self): self.counts = collections.defaultdict(lambda: co...
{"hexsha": "e75b70fd08d942971c2a3d89f77f45adc20696d6", "size": 4062, "ext": "py", "lang": "Python", "max_stars_repo_path": "citibike/stat_models.py", "max_stars_repo_name": "MaxenceHanin/5SDBD-Integ-E3", "max_stars_repo_head_hexsha": "dbf85386451b420da4132b69341155332cf56a53", "max_stars_repo_licenses": ["MIT"], "max_s...
import torch import numpy as np from models.stylegan3.networks_stylegan3 import Generator from utils.common import make_transform class Expander: def __init__(self, G: Generator): self.G = G def generate_expanded_image(self, ws=None, all_s=None, landmark_t=None, pixe...
{"hexsha": "9e2edc43a08d2656ef1613c46db1dcbe4e8f17b4", "size": 5569, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/fov_expansion.py", "max_stars_repo_name": "ohhagr/stylegan3-editing-environment", "max_stars_repo_head_hexsha": "5f3602f4a6bb8036511b35aacc9b332d0ca5fa58", "max_stars_repo_licenses": ["MIT"]...
# Copyright 2015 The TensorFlow 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 applica...
{"hexsha": "631dfdb05b7891c16abac3670b582806cd4c200b", "size": 7546, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/examples/train_cifar10/gen_tf_dnn.py", "max_stars_repo_name": "supernovaremnant/TensorflowOpenCL-GPU", "max_stars_repo_head_hexsha": "8d443c9afb49064c4bdf68fc0c5217986077d24c", "max_sta...
#!/usr/bin/env python '''Utility for testing sinex files equivalence based on comparison of values in the SOLUTION/ESTIMATE blocks. Ignores other blocks and header info. The functionality is based on assert_frame_equal method (https://pandas.pydata.org/docs/reference/api/pandas.testing.assert_frame_equal.html)''' impo...
{"hexsha": "625e4cb2cd3564358dd38a018e8bde5c4ab675c8", "size": 2405, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/diffsnx.py", "max_stars_repo_name": "umma-zannat/ginan", "max_stars_repo_head_hexsha": "a4d1a3bb8696267f23d26e8c6a2f6080b87bb494", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# To run this script: # pkg> build GoogleSheets println("Instalation of GoogleSheets python package dependencies") using PyCall @pyimport pip pip.main(["install","google-api-python-client","google-auth-httplib2","google-auth-oauthlib"])
{"hexsha": "e0736c46245426a25165d9853ea9d972bdcdcc01", "size": 239, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deps/build.jl", "max_stars_repo_name": "Sixzero/GoogleSheets.jl", "max_stars_repo_head_hexsha": "bffecf8110143c8f10dfbc3ca554c3793d81917c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14,...
@recipe function plot(l::AbstractLattice; bondcolor=:grey) markershape --> :circle # if markershape is unset, make it :auto markercolor --> :black markersize --> 5 grid --> false axis --> false legend --> false if ndims(l) == 3 showaxis --> false end # plot sites ...
{"hexsha": "7e0924199b0ee38a3b94907cd75e315bd2afa3f3", "size": 1392, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/recipes.jl", "max_stars_repo_name": "crstnbr/LatPhysPlottingPlots.jl", "max_stars_repo_head_hexsha": "119e1779e96860c430beb81243e58d97075b02ab", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
(** Binary trees the nodes of which are labelled with type A *) Section Some_type_A. Variable A: Type. Inductive tree : Type := | leaf | node (label: A)(left_son right_son : tree). Inductive subtree (t:tree) : tree -> Prop := | subtree1 : forall t' (x:A), subtree t (node x t t') | subtree2 : forall (...
{"author": "raduom", "repo": "coq-art", "sha": "092a8df8e74d7d7a90a2405e4eacf902e528d83a", "save_path": "github-repos/coq/raduom-coq-art", "path": "github-repos/coq/raduom-coq-art/coq-art-092a8df8e74d7d7a90a2405e4eacf902e528d83a/ch15_general_recursion/SRC/btreewf.v"}
import numpy as np import csv import sys fname=str(sys.argv[1]) ofname=str(sys.argv[2]) chr=str(sys.argv[3]) bin_size=int(sys.argv[4]) chr_size = {'chr1':249250621, 'chr2':243199373, 'chr3':198022430, 'chr4':191154276, 'chr5':180915260, 'chr6':171115067, 'chr7':159138663, 'chr8':146364022, 'chr9':141213431, ...
{"hexsha": "a6ec33a13052a71dbc92bad2f33036c8ea43032a", "size": 1578, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert_coo_to_full_matrix2.py", "max_stars_repo_name": "tharvesh/preprocess_script", "max_stars_repo_head_hexsha": "a52d56442c4038a1af567c83773972f10078294e", "max_stars_repo_licenses": ["MIT"], ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Problem statement %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \clearpage \section{Problem Statement} \label{sec:problem} %% intro In this section I will describe the store backend system examined ...
{"hexsha": "7ca11c5812dc4204c546890224fd3fe2f9445309", "size": 12681, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sec3_problem.tex", "max_stars_repo_name": "Sentri/Master-s-Thesis", "max_stars_repo_head_hexsha": "09846d109a45a07e28641891ee3b651228fc049e", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_co...
// // Copyright (c) 2020 Richard Hodges (hodges.r@gmail.com) // // 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) // // Official repository: https://github.com/madmongo1/webclient // // This project was made possible ...
{"hexsha": "48624a351941a436b8a9d8a9fdc9a92cccf84b54", "size": 2620, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/boost/webclient/async/future.spec.cpp", "max_stars_repo_name": "madmongo1/webclient", "max_stars_repo_head_hexsha": "7eb52899443a76ced83b6f286b0e0d688f02fc65", "max_stars_repo_licenses": ["BSL-1...
% To compile this document % graphics.off();rm(list=ls());library('knitr');knit('EDA-lab.Rnw'); for(i in 1:2) system('R CMD pdflatex EDA-lab.tex') %detach(bodyfat); % extract R-code % purl('EDA-lab.Rnw') %setwd("/Volumes/Macintosh Storage/Users/jbinder/Dropbox/Docs/Teaching/isb101/Visualization in R/Tutorial") \d...
{"hexsha": "5c2d3b3a83a06bb749fdfbf38388816ad04cb320", "size": 66724, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "R/Visualization/Visualization in R/Tutorial/EDA-lab.tex", "max_stars_repo_name": "rolandkrause/isb101", "max_stars_repo_head_hexsha": "40be2fa62a6ca986e4ed9f1833382b2c10478039", "max_stars_repo_lic...
import unittest import numpy as np from spartan import expr from spartan.util import Assert from spartan import util import test_common TEST_SIZE = 50 class TestReduce(test_common.ClusterTest): def test_sum_3d(self): x = expr.arange((TEST_SIZE, TEST_SIZE, TEST_SIZE), dtype=np.int64) nx = np.arange(TEST_S...
{"hexsha": "60c539ec18f729b6747b16a427c8253dcc2c2d4b", "size": 3631, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_reduce.py", "max_stars_repo_name": "GabrielWen/spartan", "max_stars_repo_head_hexsha": "ce3bf7f2bb551d7f996a1884acef819b620cc854", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
using myJuliaUtils using Test using LinearAlgebra using DelimitedFiles using Statistics # Testing both lag functions @testset "testing lag functions" begin # if vector T = 100 P = rand(1:T - 1) a = collect(1.0:1.0:T) b = lag0(a, P) @test b[1:P] == zeros(P) @test T - P == b[end] # if ma...
{"hexsha": "0b124edb4b9430fed61be8c433a1262dc8f2ee37", "size": 7920, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/TestingExtfunc.jl", "max_stars_repo_name": "zymbuzz/myJuliaUtils", "max_stars_repo_head_hexsha": "bd18eff600ca8a5052575706dc3a4b494128c4a5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import matplotlib.pyplot as plt import random import seaborn as sns sns.set_style("white") from scipy.stats import norm import time from math import sqrt, log, exp, pi from random import uniform size = 500 set1 = np.random.normal(loc = 1, scale = 0.1, size = size) set2 = np.random.normal(loc = 1.5,...
{"hexsha": "f126d726fe9f62d3b745225c6039cd6cb312e0f5", "size": 4959, "ext": "py", "lang": "Python", "max_stars_repo_path": "gmm.py", "max_stars_repo_name": "prakhardogra921/Clustering-using-Kmeans-Cmeans-and-GMM", "max_stars_repo_head_hexsha": "7fce1527a5362313aa45e5fd41f5369af3087cba", "max_stars_repo_licenses": ["MIT...
From VST Require Import floyd.proofauto. From CertiGC Require Import model.GCGraph. From CertiGC Require Import vst.ast.env_graph_gc. From CertiGC Require Import vst.clightgen.gc. From CertiGC Require Import vst.cmodel.constants. From CertiGC Require Import vst.cmodel.spatial_gcgraph. From CertiGC Require Import vst.s...
{"author": "CertiGraph", "repo": "CertiGC", "sha": "ec0183449d5e7dc66d33c9bc2dd5759de0ebd877", "save_path": "github-repos/coq/CertiGraph-CertiGC", "path": "github-repos/coq/CertiGraph-CertiGC/CertiGC-ec0183449d5e7dc66d33c9bc2dd5759de0ebd877/theories/CertiGC/vst/verif/verif_resume.v"}
import sys from abc import ABC, abstractmethod import glob import os import random import shutil import statistics from imagecorruptions import corrupt import cv2 import numpy as np import pickle from tqdm import tqdm from mean_average_precision import MetricBuilder import yoloPredictor import imageDifferenceCalculat...
{"hexsha": "9141e0871f5d0559623d5c00fac5b1ce291cbefc", "size": 26941, "ext": "py", "lang": "Python", "max_stars_repo_path": "SelectSamples.py", "max_stars_repo_name": "johagge/DeepActiveLearning", "max_stars_repo_head_hexsha": "937b82710f7fa3c6c8e165ab0dc0f4d4d770499d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/python #+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #|R|a|s|p|b|e|r|r|y|P|i|.|c|o|m|.|t|w| #+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ # Copyright (c) 2017, raspberrypi.com.tw # All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # color_space.py ...
{"hexsha": "7283d6a7f29feba3528da9d81ae3e66ca0b50dde", "size": 949, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera-opencv/01-color_space/color_space.py", "max_stars_repo_name": "ReemDAlsh/camera-python-opencv", "max_stars_repo_head_hexsha": "6adb12b682907554645211217e970480685347b0", "max_stars_repo_lice...
#BSD 3-Clause License # #Copyright (c) 2021, Florent Audonnet #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #1. Redistributions of source code must retain the above copyright notice, this # lis...
{"hexsha": "5e5d33bb0e972da6e7df6f5a8c7c7326f731d151", "size": 8972, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple_arm/simple_arm/vr_publish.py", "max_stars_repo_name": "09ubberboy90/lvl4-ros2-sim-comp", "max_stars_repo_head_hexsha": "c197c76b29a9d864a800b81332bc3a549ecaa7c3", "max_stars_repo_licenses":...
[STATEMENT] lemma span_minimal: "S \<subseteq> T \<Longrightarrow> subspace T \<Longrightarrow> span S \<subseteq> T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>S \<subseteq> T; subspace T\<rbrakk> \<Longrightarrow> span S \<subseteq> T [PROOF STEP] by (auto simp: span_explicit intro!: subspace_sum subs...
{"llama_tokens": 115, "file": null, "length": 1}
from shor.gates import Hadamard, PauliX, CCNOT, SWAP, CRZ, CH, S, Sdg, T, Tdg, PauliY, PauliZ, ID, Cx, U1, U3, U2, Rx, Cz, Ry, Rz from shor.layers import Qubits from shor.operations import Measure from shor.quantum import Circuit from shor.backends import QuantumSimulator, QSession import numpy as np import math def ...
{"hexsha": "abe9a24531ce86335ad7e74b3c3d8bc01ea3f9b2", "size": 7986, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration/test_gates_integration.py", "max_stars_repo_name": "jywyq/shor", "max_stars_repo_head_hexsha": "5e38c6875d68207a6d0e492d83f7b1f6ae0afb58", "max_stars_repo_licenses": ["MIT"], "ma...
This organization is a successor to Davis Students Against War Overview Please Note: in the past there has been an organization referred to as the Davis Students Against War, under the leadership of Karl Duesterberg. That organization has since fallen out and become inactive. THIS PAGE is not in reference to the ol...
{"hexsha": "003d261d00896288f42231d6eca5ec23385d2e36", "size": 3700, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Davis_Students_Against_War_Resource.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["...
import numpy as np from typing import Dict, Any from dataset.dataset import Dataset from utils.constants import INPUT_SHAPE, INPUTS, OUTPUT, SAMPLE_ID, INPUT_NOISE, SMALL_NUMBER from utils.constants import INPUT_SCALER, NUM_OUTPUT_FEATURES, NUM_CLASSES, LABEL_MAP class SingleDataset(Dataset): def tensorize(self...
{"hexsha": "0eee1fac4ada0ab321a61e7d8beac621a6d14952", "size": 1296, "ext": "py", "lang": "Python", "max_stars_repo_path": "budget-rnn/src/dataset/single_dataset.py", "max_stars_repo_name": "tejaskannan/ml-models", "max_stars_repo_head_hexsha": "ad5acad2c0ce75773062ffcdff088a6fbe5ffc17", "max_stars_repo_licenses": ["Ap...
from layers import layer, ABC, abstractmethod import numpy as np from numpy.lib.stride_tricks import as_strided eps = 1e-8 class trainable(layer, ABC): """ The base class for layers with trainable parameters """ def set_params(self, *params): """ Generates a unique identifier for each...
{"hexsha": "9e2ca31f600aaa1a9f4222b843a211922dd03125", "size": 8808, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainable.py", "max_stars_repo_name": "nkarve/twistml", "max_stars_repo_head_hexsha": "59e168c0776e9a234037a973b608450c05ffa198", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
""" Unit Tests for CorfuncCalculator class """ from __future__ import division, print_function import os.path import unittest import time import numpy as np from sas.sascalc.corfunc.corfunc_calculator import CorfuncCalculator from sas.sascalc.dataloader.data_info import Data1D def find(filename): return os.pat...
{"hexsha": "3bb3dd9890b61d20333bf35eef274c9767ce6221", "size": 4850, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/corfunc/test/utest_corfunc.py", "max_stars_repo_name": "opendatafit/sasview", "max_stars_repo_head_hexsha": "c470220eecfc9f6d8a0e27e2ea8919dcb1b38e39", "max_stars_repo_licenses": ["BSD-3-Clau...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np class PRUNE(nn.Module): def __init__(self, nodeCount, n_latent=128, n_emb=128, n_prox=64): super(PRUNE, self).__init__() ''' Parameters ---------- n_late...
{"hexsha": "6ec27e001edbab5e005f2f24654bdb475c43e1b9", "size": 2386, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model.py", "max_stars_repo_name": "j40903272/PRUNE-pytorch", "max_stars_repo_head_hexsha": "2494adbda12a0bec8fbf69252d730d32d0f57996", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5,...
// // get_local_deleter_test2.cpp // // Copyright 2002, 2017 Peter Dimov // // 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 <boost/config.hpp> #if defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) || defi...
{"hexsha": "999fffe7465767e672985661f2e35dfeafef19bd", "size": 1993, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/smart_ptr/test/get_local_deleter_array_test2.cpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b444494140676da98e...
import os, sys import numpy as np def norm(v): '''Normalizes a given vector and returns the normalized vector. ========== Parameters v: [array of floats] vector to be normalized ========== ''' # numerical instability # if ray goes through exact center, offset by ...
{"hexsha": "22ed29ef062b7ae83ed50c472a5114acadacb6a9", "size": 4549, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/lens_ray_tracing.py", "max_stars_repo_name": "masoncarney/stepped_luneburg", "max_stars_repo_head_hexsha": "728323f6331cc90cf8d97e9702a958ef553a284e", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy import stats from keras.datasets import imdb from keras.preprocessing.sequence import pad_sequences from keras.models import Sequential from keras.layers.embeddings import Embedding from keras.layers import SimpleRN...
{"hexsha": "025cccd9d356751a7a8c5d7d9af450a17402282f", "size": 4550, "ext": "py", "lang": "Python", "max_stars_repo_path": "temp.py", "max_stars_repo_name": "bedirhanbuyukoz/IMDB-Sentiment-Analysis---Machine-Learning-RNN", "max_stars_repo_head_hexsha": "f6d9d0e4e19c8cf69b3a422ae52e4aaca1ed85e3", "max_stars_repo_license...
# -*- coding: utf-8 -*- """ Created on Mon Aug 17 02:57:47 2015 1. This script plots co-evolution history of galaxy stellar mass growth and lambda_r evolution. Considering abrupt stellar mass growth as a consequence of galaxy merger, the role of merger history on lambda_r might be understood. 2. This script loads l...
{"hexsha": "467c5b7b1c6cebd120ca74300a09f276dbb5b210", "size": 5900, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Rotation/plot_stellarmassgrowth_lambda_growth.py", "max_stars_repo_name": "Hoseung/pyRamAn", "max_stars_repo_head_hexsha": "f9386fa5a9f045f98590039988d3cd50bc488dc2", "max_stars_repo_licen...
import matplotlib.pyplot as plt import pandas as pd import numpy as np import os os.chdir('../Datos//') datos = pd.read_csv('Drug5.csv') barras = pd.value_counts(datos['Drug']) plt.figure() N=len(barras) plt.bar(np.arange(N), barras) # Gráfico de barras plt.title('Drug') # Colocamos el título plt.ylabel('Frecuenc...
{"hexsha": "5dba0058eb6328d82286d41ce291cb4fad71cf4d", "size": 402, "ext": "py", "lang": "Python", "max_stars_repo_path": "01_Diag_Barras.py", "max_stars_repo_name": "JosefinaMedina/Deep-Learning-2021-P1", "max_stars_repo_head_hexsha": "6abd77a55f065e0072a2923f0e395cb2cec11fcc", "max_stars_repo_licenses": ["Apache-2.0"...
import sys import gym import numpy as np from collections import defaultdict, deque import matplotlib.pyplot as plt import check_test from plot_utils import plot_values env = gym.make('CliffWalking-v0') print(env.action_space) print(env.observation_space) # define the optimal state-value function V_opt = np.zeros((4...
{"hexsha": "85a46f2fa41d628290fc6c4afe190d82b035ffd2", "size": 5955, "ext": "py", "lang": "Python", "max_stars_repo_path": "temporal-difference/temporal_difference.py", "max_stars_repo_name": "csggnn/deep-reinforcement-learning", "max_stars_repo_head_hexsha": "73795e831832590d252dd57b95b877715e84e2fc", "max_stars_repo_...
/* This file is part of solidity. solidity 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. solidity is distributed in the hope that i...
{"hexsha": "13ad9f8caf4862eef72d9e1e01c3f224712bada8", "size": 1864, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libyul/Object.cpp", "max_stars_repo_name": "MrChico/solidity", "max_stars_repo_head_hexsha": "5b4ea1eb895d5edc9a24ee5c6f96d8580eceec08", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
"""Tests coreml.data.data_module.py""" from os.path import join, exists import multiprocessing as mp import torch import numpy as np import unittest from coreml.config import DATA_ROOT from coreml.data.data_module import DataModule class DataModuleTestCase(unittest.TestCase): """Class to check the creation of Dat...
{"hexsha": "1ef73a5f879d2187962a8a9a5113c204972ca597", "size": 3985, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/test_data_module.py", "max_stars_repo_name": "core-ml/coreml", "max_stars_repo_head_hexsha": "c983b919ec9041a9a8d71c03829158ed41da7890", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#include <boost/algorithm/string.hpp> #include "Conversion.hpp" #include "ScoreFileEntry.hpp" #include "Serialize.hpp" #include "StringTable.hpp" #include "TextKeys.hpp" #include "TextMessages.hpp" using namespace std; // Default constructor ScoreFileEntry::ScoreFileEntry() : score(0), sex(CreatureSex::CREATURE_SEX_M...
{"hexsha": "faac4ac6f2e7c7ebca9dea6eeae3af3d7d20ef93", "size": 4125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "engine/source/ScoreFileEntry.cpp", "max_stars_repo_name": "sidav/shadow-of-the-wyrm", "max_stars_repo_head_hexsha": "747afdeebed885b1a4f7ab42f04f9f756afd3e52", "max_stars_repo_licenses": ["MIT"], "m...
c c The small main program below is an example of how to compute field c components with T89C. c See GEOPACK.DOC for an example of field line tracing. c dimension parmod(10) 1 print *, ' enter x,y,z,ps,iopt' read*, x,y,z,ps,iopt call t89c(iopt,parmod,ps,x,y,z,bx,by,bz) print *, bx,b...
{"hexsha": "d14aa3a9dfea685ad39706a1cb3065d7bfd06e5f", "size": 15257, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "fortran/T89.f", "max_stars_repo_name": "scivision/tsyganenko", "max_stars_repo_head_hexsha": "416f1366caf745ec28cf15a7263a07a249f5f587", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, ...
#!/usr/bin/env python import argparse parser = argparse.ArgumentParser() parser.add_argument("h5file") parser.add_argument("--pattern") args = parser.parse_args() import h5py import rapprentice.cv_plot_utils as cpu import numpy as np import cv2 import fnmatch hdf = h5py.File(args.h5file,"r") all_imgnames = [(np.asar...
{"hexsha": "89b2a158f9095a8c38afa842e590197f4f3ec090", "size": 833, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/view_demos.py", "max_stars_repo_name": "wjchen84/rapprentice", "max_stars_repo_head_hexsha": "9232a6a21e2c80f00854912f07dcdc725b0be95a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
import numpy as np import datetime import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import matplotlib.dates as mdates import requests import io #hide def load_timeseries(name, base_url='https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covi...
{"hexsha": "82ced2b9e199cc6f46d1c293f966fe2034320c1f", "size": 3535, "ext": "py", "lang": "Python", "max_stars_repo_path": "_notebooks/lib/covid_data.py", "max_stars_repo_name": "caglorithm/notebooks", "max_stars_repo_head_hexsha": "6d9bb0f2e8483c39bc13dd3e435f7f05dd8f3bce", "max_stars_repo_licenses": ["Apache-2.0"], "...
import cv2 import numpy as np import os import glob import math def find(img, cap, DIM, K, D): sift = cv2.xfeatures2d.SIFT_create() kp_image, desc_image = sift.detectAndCompute(img,None) img = cv2.drawKeypoints(img,kp_image,img) #matching index_params = dict(algorithm=0,trees = 5) ...
{"hexsha": "65ca92217a407afbe00f635744a583900794f194", "size": 4418, "ext": "py", "lang": "Python", "max_stars_repo_path": "ObjectFinder.py", "max_stars_repo_name": "thereturn932/Fly-n-Forget", "max_stars_repo_head_hexsha": "44e7585fd52679110a064824f278dab9319b725d", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os import argparse import pickle import numpy as np import random import torch import torch.optim """ Utility functions for handling parsed arguments """ def get_args() -> argparse.Namespace: parser = argparse.ArgumentParser('Train a ProtoTree') parser.add_argument('--dataset', ...
{"hexsha": "6c3c3fd39c79755f52db0b78815889cfb1952cf9", "size": 14801, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/args.py", "max_stars_repo_name": "TristanGomez44/ProtoTree", "max_stars_repo_head_hexsha": "d9e77a90b47cb1efe19f1736c6701872a3c4a62e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Runs a one round screening simulation for experiment 4 - PstP. Initial training data was sampled from PstP dataset using uniform random sampling or diversity (Tanimoto dissimilarity) sampling. Experiment 4 - PstP: prospective screening of PstP target. Usage: python experiment_ors_pstp...
{"hexsha": "f47d117689b419bd5ab6ace58a798a366f439622", "size": 4307, "ext": "py", "lang": "Python", "max_stars_repo_path": "chtc_runners/experiment_ors_pstp_runner.py", "max_stars_repo_name": "gitter-lab/active-learning-drug-discovery", "max_stars_repo_head_hexsha": "b24004a359037b3a1175a61c181ec231b711c797", "max_star...
import math import numpy as np from knn_robustness.utils import top_k_min_indices from knn_robustness.utils import KnnPredictor from knn_robustness.utils import QpSolver class ExactSolver: def __init__( self, X_train, y_train, qp_solver: QpSolver, n_pos_for_screen, bounded, upper=1., low...
{"hexsha": "9cf1da28ea3ccaeff5014962b9a949d6ae7f377f", "size": 4639, "ext": "py", "lang": "Python", "max_stars_repo_path": "knn_robustness/nn_only/exact.py", "max_stars_repo_name": "wangwllu/knn_robustness", "max_stars_repo_head_hexsha": "9a02f92bf00febf900b2817c1b7230284816b21b", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma ClassI [intro, simp]: "(a, b) \<in> E \<Longrightarrow> a \<in> Class b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (a, b) \<in> E \<Longrightarrow> a \<in> Class b [PROOF STEP] unfolding Class_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (a, b) \<in> E \<Longrightarrow> a \<in> (\<l...
{"llama_tokens": 179, "file": "Jacobson_Basic_Algebra_Set_Theory", "length": 2}
import numpy as np import nltk def wordcount_fn(file_uri): nparr_words = open(file_uri, 'r') text_as_str = nparr_words.read() #for small textfiles text_as_list = text_as_str.split() counts = nltk.FreqDist(text_as_list).items() for key, val in counts: print(str(val) + " " + str(key)) ...
{"hexsha": "17b3e687ac48a4380d8c09fd50b9472cf230cedd", "size": 443, "ext": "py", "lang": "Python", "max_stars_repo_path": "term-frequency/wordcounts.py", "max_stars_repo_name": "paulowe/python-data-programming", "max_stars_repo_head_hexsha": "96fdb3f888a554ac66e69e1f6958f3e0ef5b1075", "max_stars_repo_licenses": ["MIT"]...
import numpy as np piOvr4 = np.pi/4 def get_2d_rot(angle=0): return np.array([[np.cos(angle),-np.sin(angle)], [np.sin(angle),np.cos(angle)]]) def get_2d_refl(angle=0): return np.array([[-np.cos(angle),np.sin(angle)], [np.sin(angle),np.cos(angle)]]) def make_ngon(nside...
{"hexsha": "d5e8cd20e39de0c1fafa55fc5aed3d8b6ce0d719", "size": 1262, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/helpers.py", "max_stars_repo_name": "hakonanes/morphops", "max_stars_repo_head_hexsha": "10b77498e444d2e5a64268b418e5c686041868d0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 22,...
import os import numpy as np from pgimp.GimpFile import GimpFile from pgimp.util import file from pgimp.util.TempFile import TempFile if __name__ == '__main__': img_path = file.relative_to(__file__, '../../../doc/source/_static/img') png_file = os.path.join(img_path, 'mask_applied.png') height = 100 ...
{"hexsha": "77ffb883cad3f3c8dddd79ed42e9d6cd67079ed8", "size": 1659, "ext": "py", "lang": "Python", "max_stars_repo_path": "pgimp/doc/examples/multilayer_to_npz.py", "max_stars_repo_name": "netogallo/pgimp", "max_stars_repo_head_hexsha": "bb86254983e1673d702e1fa2ed207166fd15ec65", "max_stars_repo_licenses": ["MIT"], "m...
import pyparsing as pp #from pyparsing import ( #Suppress, Group, Optional, Word, ZeroOrMore, White, Combine, #Dict, Literal, OneOrMore, Regex, #alphas, alphanums, nums, oneOf, delimitedList, quotedString #) pword = pp.Word(pp.alphas).setName('word') pword_underscore = pp.Word(pp.alphas + '_').setName('wor...
{"hexsha": "1429f13167720315e90f3ffa01b9761ae36e7c09", "size": 14371, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNastran/converters/dev/vrml/parsing_help.py", "max_stars_repo_name": "luzpaz/pyNastran", "max_stars_repo_head_hexsha": "939e9eefdc87a3bf67939a23dc09f155b93969a0", "max_stars_repo_licenses": ["B...
""" author: Antoine Spahr date : 04.11.2020 ---------- TO DO : """ import sys sys.path.append('../../') import click import os import pandas as pd import numpy as np import nibabel as nib import skimage import skimage.io from src.utils.ct_utils import window_ct from src.utils.print_utils import print_progessbar @c...
{"hexsha": "59dd9292a8b71a7583d19bdc94080615ce7dd392", "size": 4010, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/scripts/data_preparation/generate_2DBrainDataset.py", "max_stars_repo_name": "antoine-spahr/Label-Efficient-Volumetric-Deep-Semantic-Segmentation-of-ICH", "max_stars_repo_head_hexsha": "61e74...
# import standard modules # import third party modules import numpy as np # import project related modules class CostFunction(object): """ Parent class for all cost Functions within NumpyNet. It is used to reduce the amount of code for initialization since all cost functions share the same attributes. ...
{"hexsha": "bf3bfaceb31706229d5a6a96b8213121e002951c", "size": 2822, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple_numpy_net/loss.py", "max_stars_repo_name": "Perledition/GeneticNumpyNet", "max_stars_repo_head_hexsha": "f175fc71f63e9e4f79c8c63f080c853bb5b96f4a", "max_stars_repo_licenses": ["MIT"], "max_...
import os import albumentations as A import cv2 import numpy as np import pandas as pd import torch from pandas import DataFrame from torch.utils.data import Dataset, DataLoader from constants import DFDC from training.datasets.transform import create_train_transform, create_val_test_transform class DFDCDataset(Dat...
{"hexsha": "3617f982c083055d0e9bd0d4ad633a2356f8365a", "size": 3429, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/datasets/dfdc_dataset.py", "max_stars_repo_name": "joizhang/sifdnet", "max_stars_repo_head_hexsha": "9b3efa8c709bcea502a3989f6c62389f74099bae", "max_stars_repo_licenses": ["MIT"], "max_st...
subroutine qqb_wbjet(p,msq) implicit none c--- R.K. Ellis, 8/3/04 c--- matrix element squared and averaged over initial colours and spins c q(-p1) + b(-p2) --> W^+ + b(p5) + f(p6) c | c --> nu(p3) + e^+(p4) c---or c q(-p1) + b(-p2) --> W^- + b(p5) + f...
{"hexsha": "6a1b3677eaaa139ce28c21f3a9711acd0c6b8fe3", "size": 4838, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/Wbjet/qqb_wbjet.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "...
import abc import numpy as np from sklearn.metrics import mean_squared_error, r2_score from .models import model from .parsers.common_parser import CommonParser from . import checks class Tester: def __init__(self, metric_name="MeanF1Score", border=0.5, invert_list=None): """ ...
{"hexsha": "b1a0f3ef16f768e82f7a0d5c44c0fb5f7ce32f43", "size": 9757, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlalgorithms/tester.py", "max_stars_repo_name": "robot-lab/tinkoff-optimization-of-procurement", "max_stars_repo_head_hexsha": "6f34ede84f8b51520a6a269d4a4cefae4d8f54c1", "max_stars_repo_licenses"...
# # Copyright John Reid 2006 # import numpy, numpy.random from _maths import * def reverse_complement( s ): result = numpy.zeros_like( s ) for i in xrange( len( s ) ): result[ len(s) - i - 1 ] = 3 - s[i] return result class GappedPssm( object ): def __init__( self, phi...
{"hexsha": "4850e2a79c23b43fe54e13e7ed514345ec6f30a4", "size": 6206, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/biopsy/gapped_pssms/_generate.py", "max_stars_repo_name": "JohnReid/biopsy", "max_stars_repo_head_hexsha": "1eeb714ba5b53f2ecf776d865d32e2078cbc0338", "max_stars_repo_licenses": ["MIT"], "m...
import unittest import numpy as np import image_stitching as stit class TestImageStitching(unittest.TestCase): def test_stitching(self): # prepare input files paths_to_input_file = [ '/home/yuthon/Workspace/image-stitching/assets/data/test2/test_cam_1.mp4', '/home/yuthon/Wo...
{"hexsha": "2d80b318e9a9cac09174082aba3087c4a13a2f6e", "size": 2456, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_python_bindings.py", "max_stars_repo_name": "corenel/image-stitching", "max_stars_repo_head_hexsha": "844af322999f47868d71d250b77d9ca0bc8b143f", "max_stars_repo_licenses": ["MIT"], "max...
% ******************************* Thesis Appendix A **************************** \chapter{Source Code} Some of our implementations are originally written and some are modified from previous open source projects. So we upload related codes to GitHub in my personal repositories as \url{https://github.com/SeleneLI}. It i...
{"hexsha": "ef9e77fd5f28feed2752bdb939eec63b8a704c96", "size": 1256, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Appendix1/appendix1.tex", "max_stars_repo_name": "SeleneLI/YueLI_thesis", "max_stars_repo_head_hexsha": "f2ae3525afe1e4f5be42daca2e932addbc66e00d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
module test_julia_int using Test @test UInt8(0b11111111) == 0xff @test UInt8(0b01111111) == 0x7f @test UInt8(0b00111111) == 0x3f @test UInt8(0b00011111) == 0x1f @test UInt8(0b00001111) == 0x0f @test UInt8(0b00000111) == 0x07 @test UInt8(0b00000011) == 0x03 @test UInt8(0b00000001) == 0x01 @test UInt8(0b00000000) == 0x...
{"hexsha": "259c8212828f11ad0c41838ad74c7d9b596198a6", "size": 1515, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/julia/int.jl", "max_stars_repo_name": "wookay/TestJulia07.jl", "max_stars_repo_head_hexsha": "17f139763d96e456fdb4b59fbb7964273523cb00", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...