text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# slc_prj.py import os import os.path as osp import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import astropy.units as au import astropy.constants as ac from matplotlib.colors import Normalize, LogNorm from mpl_toolkits.axes_grid1 import ImageGrid import xarray as xr from ..load_sim import L...
{"hexsha": "c25ede03b630a0a1e586e7cfe54d386d5356ed20", "size": 12406, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyathena/tigress_ncr/slc_prj.py", "max_stars_repo_name": "jeonggyukim/pyathena", "max_stars_repo_head_hexsha": "f3c983d5c0a3f36e28134a4a6d3eb80ac26c2a8e", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from keras_pretrained_models.imagenet_utils import preprocess_input from keras.models import Model from keras.preprocessing import image from keras_pretrained_models.vgg19 import VGG19 base_model = VGG19(weights='imagenet') model = Model(input=base_model.input, output=base_model.get_layer('fc2').ou...
{"hexsha": "f56f284092c849f808dfac76f220b00f503006bd", "size": 690, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract_image_features/keras_pretrained_models/extract_VGG19.py", "max_stars_repo_name": "schen496/auditory-hallucinations", "max_stars_repo_head_hexsha": "31b89df838a9f3c4558c7c3b69dbcd43c7f9de19"...
[STATEMENT] lemma getFresh: "finite V \<Longrightarrow> getFresh V \<in> var \<and> getFresh V \<notin> V" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite V \<Longrightarrow> getFresh V \<in> var \<and> getFresh V \<notin> V [PROOF STEP] by (metis (no_types, lifting) finite_subset getFresh_def infinite_var so...
{"llama_tokens": 124, "file": "Syntax_Independent_Logic_Syntax", "length": 1}
# -*- coding: utf-8 -*- from numpy import pi from ....Methods.Slot.Slot.check import SlotCheckError def check(self): """Check that the HoleM54 object is correct Parameters ---------- self : HoleM54 A HoleM54 object Returns ------- None Raises ------- H54_W0CheckErr...
{"hexsha": "a8542b53f1023fe504bca1879cd8f79f30c0a0ba", "size": 727, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyleecan/Methods/Slot/HoleM54/check.py", "max_stars_repo_name": "helene-t/pyleecan", "max_stars_repo_head_hexsha": "8362de9b0e32b346051b38192e07f3a6974ea9aa", "max_stars_repo_licenses": ["Apache-2....
import json import os import subprocess import sys from contextlib import contextmanager from datetime import datetime from pathlib import Path from time import sleep from typing import List, Union import numpy as np import torch import torch.nn as nn def create_logdir(root: Union[str, Path] = None): if (root i...
{"hexsha": "f7c570c8e0928247da08e94c9dce16712108981a", "size": 4273, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "mil-ad/prospr", "max_stars_repo_head_hexsha": "a92177989f4480f1f2b43a48b3e18a6597ebba6d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_re...
// Copyright Gavin Band 2008 - 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) #ifndef GENFILE_COHORTINDIVIDUALSOURCE_HPP #define GENFILE_COHORTINDIVIDUALSOURCE_HPP #include <string>...
{"hexsha": "4b485022dfe359225cb32dd9fcfd06061844cefd", "size": 5264, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "genfile/include/genfile/CohortIndividualSource.hpp", "max_stars_repo_name": "gavinband/bingwa", "max_stars_repo_head_hexsha": "d52e166b3bb6bc32cd32ba63bf8a4a147275eca1", "max_stars_repo_licenses": [...
import subprocess, operator, random, msgpack, nltk, math, sys, os from prettytable import PrettyTable from nltk.corpus import stopwords from datetime import datetime from tqdm import tqdm from PIL import Image from collections import Counter import numpy as np import dateutil.parser from utils import START_TIME, se...
{"hexsha": "b4b1827fdabeff37edae2dbc09f094cdd6b7f0e2", "size": 8571, "ext": "py", "lang": "Python", "max_stars_repo_path": "mention_graph.py", "max_stars_repo_name": "cfwelch/longitudinal_dialog", "max_stars_repo_head_hexsha": "9f2de780026565df6447301a134a3f2126b0e64b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from unittest import TestCase from esbo_etc.classes.optical_component.Mirror import Mirror from esbo_etc.classes.SpectralQty import SpectralQty from esbo_etc.classes.target.FileTarget import FileTarget import astropy.units as u import numpy as np class TestMirror(TestCase): wl = np.arange(201, 205, 1) << u.nm ...
{"hexsha": "1069283408e7b63cf5fe4aa129a7940e1f4c3056", "size": 1144, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/optical_component/test_Mirror.py", "max_stars_repo_name": "LukasK13/ESBO-ETC", "max_stars_repo_head_hexsha": "d1db999f1670f2777c5227d79629d421f03e5393", "max_stars_repo_licenses": ["Apache-2...
import numpy as np import data_loader import decision_tree ############### # Toy example # ############### ''' Toy example dim_1 ┃ ╋ ○ ┃ ╋ × ○ ┃ ╋ × ┃ ━╋━━━╋━━━╋━━━╋━ dim_0 Print the tree and check the result by yourself! ''' # data features, labels = data_loader.toy_data_3(...
{"hexsha": "a0cf573ab6c8913c32dd00e4ccd113ef80df81f1", "size": 434, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignment-3/decision_tree_check.py", "max_stars_repo_name": "ZhangShiqiu1993/CSCI-567-machine-learning", "max_stars_repo_head_hexsha": "07144b299aeb9f29c304798549ef2d44fe1f4083", "max_stars_repo_l...
import numpy as np import cv2 from .skeleton import _Skeleton class Skeleton2D(_Skeleton): """ Class to visualise 2D skeletons on neutral background or original RGB. """ ########################################################################### # 2D drawing functions #######################...
{"hexsha": "4b8c604adfb74884e4a8a467c291a7cfb3e6195b", "size": 5748, "ext": "py", "lang": "Python", "max_stars_repo_path": "humanpose/visualise/skeleton2d.py", "max_stars_repo_name": "kschlegel/HumanPose", "max_stars_repo_head_hexsha": "2976116bbc276d7c5aa75b3f7f5708284c70d30f", "max_stars_repo_licenses": ["Apache-2.0"...
import os import numpy as np from demo_utils import plot_image import svmbir """ This file demonstrates the generation of a 3D microscopy phantom followed by sinogram projection and reconstruction using MBIR. The phantom, sinogram, and reconstruction are then displayed. """ # Simulated image parameters num_rows = 2...
{"hexsha": "6a0ed8bae09bd5c113982402898cf88e6f11ee2f", "size": 1897, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/demo_3D_microscopy.py", "max_stars_repo_name": "Mohammad-Chowdhury-31/svmbir", "max_stars_repo_head_hexsha": "05665eb2a65b7aa951e26dd3691955e737f16c06", "max_stars_repo_licenses": ["BSD-3-Cla...
#!/usr/bin/env python import _init_paths import os, sys, cv2, json import math, PIL, cairo import numpy as np import pickle, random import os.path as osp from time import time from copy import deepcopy from glob import glob import matplotlib.pyplot as plt from collections import OrderedDict import torch, torchtext fr...
{"hexsha": "948e73bf1da640592066b5ecd9a65e2d2c76afe9", "size": 1010, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/eval_region.py", "max_stars_repo_name": "uvavision/DrillDown", "max_stars_repo_head_hexsha": "58fb4f382afda8460a7d0971c45a76d3d0bbe22d", "max_stars_repo_licenses": ["Unlicense", "MIT"], "max...
using IterTools using ProgressMeter function find_first_invalid_number(input_numbers, window_length) @showprogress for (j, i) in enumerate(window_length + 1:length(input_numbers)) input_subset = input_numbers[j:j + window_length - 1] valid_sums = Set([sum(subset) for subset in subsets(input_subset...
{"hexsha": "821529b9d201e3c8a033b80e838c0646da4e12fa", "size": 1751, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Day9/day9_solution.jl", "max_stars_repo_name": "FedericoV/JuliaAdventOfCode2020", "max_stars_repo_head_hexsha": "30426fdee9f32fa15f4dd219462efff3de2d0fc9", "max_stars_repo_licenses": ["MIT"], "max_...
-- ---------------------------------------------------------------- [ Core.idr ] -- Module : Lightyear.Core -- Description : Central Definitions and Instances -- -- This code is distributed under the BSD 2-clause license. -- See the file LICENSE in the root directory for its full text. -- -------------------------...
{"hexsha": "b6db21ca41f9d47bcf7719e10ff04a5eeb8e2608", "size": 6252, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Lightyear/Core.idr", "max_stars_repo_name": "david-christiansen/lightyear", "max_stars_repo_head_hexsha": "3d4f025a77159af3a2d12c803d783405c9b0a04b", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
import unittest import tensorflow as tf import numpy as np from DeepQNetwork import DeepQnetwork from ExperienceReplay import ExperienceReplay from PreProcessor import PreProcessor from ResultsRecorder import ResultsRecorder # Test the functionality of the Deep Q Network class TestDQN(unittest.TestCase): # Ensur...
{"hexsha": "081e77281223e7f27adca0cce1afa4be58cb76df", "size": 9943, "ext": "py", "lang": "Python", "max_stars_repo_path": "UnitTests.py", "max_stars_repo_name": "ChristopherHaynes/Atari-2600-Deep-Learning-Agent", "max_stars_repo_head_hexsha": "02ccd83701a4eeb7af160b0ff2cdb258a2338048", "max_stars_repo_licenses": ["Unl...
module TestFirstOrder2 using ModiaLang using DifferentialEquations @usingModiaPlot using Test # using RuntimeGeneratedFunctions # RuntimeGeneratedFunctions.init(@__MODULE__) inputSignal(t) = sin(t) FirstOrder1 = Model( T = 0.2, x = Var(init=0.3), equations = :[u = inputSignal(time/u"s"), ...
{"hexsha": "3516cc44ce42884b385466805e723a78c0ef4761", "size": 1841, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/TestFirstOrder2.jl", "max_stars_repo_name": "ModiaSim/ModiaLang", "max_stars_repo_head_hexsha": "6f8fc420f86f9af51eb897cfd9d7069c6ccc9659", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
@testset "benchmark_normals" begin p, q = synthetic_gradient(SynthSphere(50)) p2, q2 = synthetic_gradient(SynthSphere(51)) error = benchmark_normals(p, q, p2, q2) @test error ≈ 1.4866545112360603 end
{"hexsha": "2a5f9f0b725a9a2f6a9b6147bd388fccc00daddf", "size": 216, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/benchmark_normals.jl", "max_stars_repo_name": "betttris13/ShapeFromShading.jl", "max_stars_repo_head_hexsha": "c486ad60d1675a65aacfe61dc1ef4d308bd534e1", "max_stars_repo_licenses": ["MIT"], "ma...
/******************************************************************************* * ARICPP - ARI interface for C++ * Copyright (C) 2017-2021 Daniele Pallastrelli * * This file is part of aricpp. * For more information, see http://github.com/daniele77/aricpp * * Boost Software License - Version 1.0 - August 17th, ...
{"hexsha": "33e7c485f55ac6a5d4d1ce9f0d1d2a4144f274b9", "size": 8881, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "examples/play_and_record.cpp", "max_stars_repo_name": "daniele77/aricpp", "max_stars_repo_head_hexsha": "5af798197ff8bf81619c00cb1c21e9576b853dab", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars...
import os import sys import argparse import torch import numpy as np sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import models import utils from utils import alignment, data, attack import definitions parser = argparse.ArgumentParser(description='Aligns two GoogLeNets using cros...
{"hexsha": "e8d8c94d0074de805bdf0e92ba7e8f68caa8a24b", "size": 5394, "ext": "py", "lang": "Python", "max_stars_repo_path": "alignment/align_googlenet.py", "max_stars_repo_name": "IBM/NeuronAlignment", "max_stars_repo_head_hexsha": "5b82b60666db1fac72e53db07529a3328ee549c4", "max_stars_repo_licenses": ["Apache-2.0"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import numpy from neodroid.utilities.unity_specifications import ( Configuration, Motion, Reaction, ReactionParameters, ) # Motion,; EnvironmentDescription, __author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 9/4...
{"hexsha": "f3befada4dd50fb61251b6188608a7c0d25ac730", "size": 6029, "ext": "py", "lang": "Python", "max_stars_repo_path": "neodroid/factories/configuration_reactions.py", "max_stars_repo_name": "sintefneodroid/neo", "max_stars_repo_head_hexsha": "0999f1dff95c4a8c5880a9b3add532d74f38586a", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- """ Created on Tue Feb 14 15:59:11 2017 @author: af5u13 """ # Usage for debugging from raw Python console #exec(open("/Users/af5u13/dev/visr/src/python/scripts/rsao/reverbObjectBinauralisation.py").read()) #exec(open("/home/andi/dev/visr/src/python/scripts/rsao/reverbObjectBinauralisation...
{"hexsha": "abc151aa54dd326a2a86e59e32f75d39178dd47e", "size": 8637, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/scripts/rsao/reverbObjectBinauralisation_simple.py", "max_stars_repo_name": "s3a-spatialaudio/VISR", "max_stars_repo_head_hexsha": "55f6289bc5058d4898106f3520e1a60644ffb3ab", "max_stars...
// Copyright (c) 2016 // Author: Chrono Law #include <stack> #include <std.hpp> using namespace std; #include <boost/array.hpp> #include <boost/range.hpp> using namespace boost; /////////////////////////////////////// void case1() { assert(has_range_iterator<vector<int>>::value); assert(has_range_iterator<s...
{"hexsha": "bf6abff173a28bd3124b2d5481661307e4b984c7", "size": 816, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "range/traits.cpp", "max_stars_repo_name": "MaxHonggg/professional_boost", "max_stars_repo_head_hexsha": "6fff73d3b9832644068dc8fe0443be813c7237b4", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s...
using AbstractPlotting.PlotUtils, AbstractPlotting.Colors ################################################################################ # Colormap reference # ################################################################################ function colors_...
{"hexsha": "e26849356e74718c5a6b5a627d04aed4016dc097", "size": 3044, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/documentation.jl", "max_stars_repo_name": "pauljurczak/MakieGallery.jl", "max_stars_repo_head_hexsha": "3ba5534180d2314729aeb5a7d2d6a7afa1ffcdff", "max_stars_repo_licenses": ["MIT"], "max_stars...
#!/usr/bin/env python3 PKG = 'tfg' import roslib; roslib.load_manifest(PKG) #import rosbag import numpy as np import rospy from rospy.numpy_msg import numpy_msg from sensor_msgs.msg import Image from sensor_msgs.msg import CompressedImage import os import cv2 from cv_bridge import CvBridge, CvBridgeError from utiliti...
{"hexsha": "7a04cfb2a2fa45404c66706747d8a78cf8810091", "size": 1858, "ext": "py", "lang": "Python", "max_stars_repo_path": "tfg/src/camera_publisher.py", "max_stars_repo_name": "lccatala/tfg_ros", "max_stars_repo_head_hexsha": "d8da2bc6b1e0036e34460d174e708764a3c6f4ca", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
@testset "Covering" begin @testset "Rectangle" begin r = cover(RegularGrid{Float64}(100, 200), RectangleCoverer()) @test r == RectangleRegion((0.,0.), (99.,199.)) r = cover(PointSet([0. 1. 2.; 0. 2. 1.]), RectangleCoverer()) @test r == RectangleRegion((0.,0.), (2.,2.)) end end
{"hexsha": "a4be7a0de6bddcfddb3e61351f358ad148e7a96d", "size": 299, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/covering.jl", "max_stars_repo_name": "briochemc/GeoStatsBase.jl", "max_stars_repo_head_hexsha": "59ce064df9bcdc5c022edd80bd72125c2ca7819d", "max_stars_repo_licenses": ["ISC"], "max_stars_count"...
import argparse import datetime import imutils import time import cv2 import numpy as np import numpy import string, random import os import SkinDetector # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--input", help="path to the video file") ap.add_argument...
{"hexsha": "37c4b52b890f0dd1689107f14e1f5c24995350f7", "size": 3093, "ext": "py", "lang": "Python", "max_stars_repo_path": "redact.py", "max_stars_repo_name": "timothyclemansinsea/bodycamredaction", "max_stars_repo_head_hexsha": "e9917021059aa819be173975076614a2932ca555", "max_stars_repo_licenses": ["Apache-2.0"], "max...
# Implementation of an elementary cellular automata # according to https://mathworld.wolfram.com/ElementaryCellularAutomaton.html # uses random initialization and uses wolfram codes to specify the rule # Asynchronous update of the 1D lattice using Agents, Random using CairoMakie using InteractiveDynamics using CSV ""...
{"hexsha": "5a2011b46d71dc764508d48835ceb6fa343e23d7", "size": 2645, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "elementary_ca_async.jl", "max_stars_repo_name": "astenuz/cellular_automata", "max_stars_repo_head_hexsha": "f98815b9678d308a5bd31e70efa92e2fb5309bf3", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as num from direct.showbase import DirectObject from direct.task.Task import Task from panda3d.core import LVector3f, NodePath, WindowProperties # from Hardware import HardwareHandler # from Meshes import Arrow from Engine.Utils.utils import get_hpr, get_distance TO_RAD = 0.017453293 TO_DEG = 57.29577951...
{"hexsha": "89938a944f2367df1f3b227b4c823a78b53ff160", "size": 11314, "ext": "py", "lang": "Python", "max_stars_repo_path": "Engine/GraphicEngine/Shuttle.py", "max_stars_repo_name": "pdefromont/SpaceBusGame", "max_stars_repo_head_hexsha": "629f6aa58a11756edeb85735a98504d1aadff586", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import scipy.sparse as sparse from typing import Any from torch.utils.checkpoint import checkpoint import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter import scatter_max from .. import register_model, BaseModel from cogdl.utils import mul_edge_softmax, spmm, get_a...
{"hexsha": "4af3d4bb1190be6fbe80860108d9b52cb30ba440", "size": 9165, "ext": "py", "lang": "Python", "max_stars_repo_path": "cogdl/models/nn/pyg_deepergcn.py", "max_stars_repo_name": "xssstory/cogdl", "max_stars_repo_head_hexsha": "ae8de495c365993f19f04774f083960fd282c2a3", "max_stars_repo_licenses": ["MIT"], "max_stars...
'''ShuffleNetV2 in PyTorch. See the paper "ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" for more details. ''' import torch import torch.nn as nn import torch.nn.functional as F import numpy as np ###### CODE_SIZE = 16 SLICE_SHAPE = [16,16,1,1] ######### class ShuffleBlock(nn.Module): ...
{"hexsha": "5262fddd6ae4bbc3185a8daf72b3983dd9726734", "size": 12529, "ext": "py", "lang": "Python", "max_stars_repo_path": "Implementations/CIFAR10/models/shufflenetv2.py", "max_stars_repo_name": "hamedomidvar/associativeconv", "max_stars_repo_head_hexsha": "9930915abd3625871354df676865fc44eb92abf3", "max_stars_repo_l...
[STATEMENT] lemma ucast_s2: "(AND) w 0b00000000000000000000000010000000 = 0 \<Longrightarrow> (((get_S w))::word1) = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. w AND 128 = 0 \<Longrightarrow> get_S w = 0 [PROOF STEP] by (simp add: get_S_def)
{"llama_tokens": 137, "file": "SPARCv8_SparcModel_MMU_Sparc_Properties", "length": 1}
[STATEMENT] lemma LLs_LLq: "t1 \<in> atrm \<Longrightarrow> t2 \<in> atrm \<Longrightarrow> LLs t1 t2 = cnj (LLq t1 t2) (neg (eql t1 t2))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>t1 \<in> atrm; t2 \<in> atrm\<rbrakk> \<Longrightarrow> LLs t1 t2 = cnj (LLq t1 t2) (neg (eql t1 t2)) [PROOF STEP] by (si...
{"llama_tokens": 171, "file": "Syntax_Independent_Logic_Syntax_Arith", "length": 1}
""" compute partial correlation """ import numpy def pcor_from_precision(P,zero_diagonal=1): # given a precision matrix, compute the partial correlation matrix # based on wikipedia page: http://en.wikipedia.org/wiki/Partial_correlat #Using_matrix_inversion pcor=numpy.zeros(P.shape) for i in range(...
{"hexsha": "7c25f566ee1fd8f0f0909c72c892c0a2fb679839", "size": 512, "ext": "py", "lang": "Python", "max_stars_repo_path": "statistics/pcor_from_precision.py", "max_stars_repo_name": "poldrack/poldracklab-base", "max_stars_repo_head_hexsha": "d4c573aca032b67362fc25252779997dacb4a166", "max_stars_repo_licenses": ["Apache...
[STATEMENT] lemma zero_vector_1: "zero_vector x \<longleftrightarrow> (\<forall>y . x * y = x * bot)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. zero_vector x = (\<forall>y. x * y = x * bot) [PROOF STEP] by (metis top_right_mult_increasing zero_vector_def zero_vector_left_zero)
{"llama_tokens": 114, "file": "Correctness_Algebras_Boolean_Semirings", "length": 1}
using Test # using Revise using PolynomialBasis PB = PolynomialBasis function allequal(v1,v2) return all(v1 .≈ v2) end function allequal(v1,v2,tol) np = length(v1) f = length(v2) == np return f && all([isapprox(v1[i],v2[i],atol=tol) for i = 1:np]) end p = [-1.0 1.0] @test_throws AssertionError PB.t...
{"hexsha": "c7136be3a1ec61eaf634db0e85cd38ce7aa1c979", "size": 7891, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_lagrange_tensor_product_basis.jl", "max_stars_repo_name": "ArjunNarayanan/PolynomialBasis.jl", "max_stars_repo_head_hexsha": "09a3479154639c45a285d559508aa0092dfedad6", "max_stars_repo_li...
# -*- coding: utf-8 -*- """ Created on Fri Feb 22 10:46:09 2019 @author: lwg """ # http://www.numpy.org/ import numpy as np import matplotlib.pyplot as plt def relu(x): return np.maximum(0, x) x = np.arange(-5.0, 5.0, 0.1) y = relu(x) plt.plot(x, y) plt.ylim(-1, 6) # y轴范围 plt.show()
{"hexsha": "69cd96e2424ab4db8f1a4ad57ba0a97f796aef76", "size": 296, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeplearning_python/chapter3/ReLU.py", "max_stars_repo_name": "lwg82/DeepLearningPython", "max_stars_repo_head_hexsha": "a36d80a84ff05ea2e7e3cbd5cc868aa2929ebb99", "max_stars_repo_licenses": ["Apac...
# ########################################################################### # # CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) # (C) Cloudera, Inc. 2021 # All rights reserved. # # Applicable Open Source License: Apache 2.0 # # NOTE: Cloudera open source products are modular software products # made up of hun...
{"hexsha": "1c491ddc1083a7330a21f38ee5180e48205db0d8", "size": 5606, "ext": "py", "lang": "Python", "max_stars_repo_path": "vidbench/data/process.py", "max_stars_repo_name": "melaniebeck/video-classification", "max_stars_repo_head_hexsha": "eeb879605f8265ce28a007d5239f0e85aeed0719", "max_stars_repo_licenses": ["Apache-...
@testset "ModelParameters" begin @test mP_1.U ≈ 1.1 @test mP_1.μ ≈ 1.2 @test mP_1.β ≈ 1.3 @test mP_1.n ≈ 1.4 end @testset "SimulationParameters" begin @test sP_1.n_iω == 1 @test sP_1.n_iν == 2 @test sP_1.shift == false @test sP_1.tc_type_f == :nothing @test sP_1.tc_type_b == :nothin...
{"hexsha": "e3b5e4be18fbdfd2b7bd0cf589fafb3f57cb0387", "size": 653, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Config.jl", "max_stars_repo_name": "Atomtomate/LadderDGA.jl", "max_stars_repo_head_hexsha": "8cd39fe2ae2aa1130bff706171266d3cf2d4c8e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5,...
section {* Backwards Compatibility for Version 1 *} theory CollectionsV1 imports Collections begin text {* This theory defines some stuff to establish (partial) backwards compatibility with ICF Version 1. *} (* TODO: Dirty hack to workaround a problem that occurs with sublocale here: When decla...
{"author": "andredidier", "repo": "phd", "sha": "113f7c8b360a3914a571db13d9513e313954f4b2", "save_path": "github-repos/isabelle/andredidier-phd", "path": "github-repos/isabelle/andredidier-phd/phd-113f7c8b360a3914a571db13d9513e313954f4b2/thesis/Collections/ICF/CollectionsV1.thy"}
# -*- coding:utf-8 -*- """ A local image scale tool Licensed under The MIT License Writen by Shaowu Wu, 20190926 """ import cv2.cv2 as cv import numpy as np import os LINE_COLOR = (0, 255, 0) # 获取在原图上画的线的颜色 LINE_WIDTH = 2 # 在原图上线的宽度 SCALE = 2 # 对选取区域的放大倍数 ADD_BBOX = True # 是否对要保存的图像增加边框 BBOX_WIDTH = 4 # 增加的边框的宽度...
{"hexsha": "a2c3253428f5e21102f3ecb0d061d4057e0bbc7d", "size": 5157, "ext": "py", "lang": "Python", "max_stars_repo_path": "scale_tool/enlarge_image_local.py", "max_stars_repo_name": "wshaow/enlarge_local_image_tool", "max_stars_repo_head_hexsha": "11b6eacf69dde5e0c6e06d57401a8c8d7c0dd4b9", "max_stars_repo_licenses": [...
/*! @file Forward declares `boost::hana::Pair`. @copyright Louis Dionne 2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_FWD_PAIR_HPP #define BOOST_HANA_FWD_PAIR_HPP #include <boost/hana/fwd/core/make...
{"hexsha": "b2d7451fedf7a9a3697d7b8132ab2190974789b0", "size": 2606, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/hana/fwd/pair.hpp", "max_stars_repo_name": "josephwinston/hana", "max_stars_repo_head_hexsha": "a8586ec1812e14e43dfd6867209412aa1d254e1a", "max_stars_repo_licenses": ["BSL-1.0"], "max_...
REAL FUNCTION URAND(IY) INTEGER IY C C URAND IS A UNIFORM RANDOM NUMBER GENERATOR BASED ON THEORY AND C SUGGESTIONS GIVEN IN D.E. KNUTH (1969), VOL 2. THE INTEGER IY C SHOULD BE INITIALIZED TO AN ARBITRARY INTEGER PRIOR TO THE FIRST CALL C TO URAND. THE CALLING PROGRAM SHOULD NOT...
{"hexsha": "acd7361d30cd121d30def414abd2159f88111776", "size": 1666, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Modules/ThirdParty/VNL/src/vxl/v3p/netlib/laso/urand.f", "max_stars_repo_name": "nalinimsingh/ITK_4D", "max_stars_repo_head_hexsha": "95a2eacaeaffe572889832ef0894239f89e3f303", "max_stars_repo_lic...
# Copyright (C) 2019-2020 Intel Corporation # # SPDX-License-Identifier: MIT # pylint: disable=exec-used import cv2 import logging as log import numpy as np import os.path as osp import shutil from openvino.inference_engine import IECore from datumaro.components.cli_plugin import CliPlugin from datumaro.components...
{"hexsha": "7c64d6fa44995f7b6976125c0e7161c529ea5950", "size": 7048, "ext": "py", "lang": "Python", "max_stars_repo_path": "datumaro/plugins/openvino_plugin/launcher.py", "max_stars_repo_name": "einstonlabs/datumaro", "max_stars_repo_head_hexsha": "9eb5246febb4b4ae10c321fae80413bb87fb1a7d", "max_stars_repo_licenses": [...
import numpy as np MAX_ROUNDS = 18 RC = np.array([ 0x01, 0x82, 0x8a, 0x00, 0x8b, 0x01, 0x81, 0x09, 0x8a, 0x88, 0x09, 0x0a, 0x8b, 0x8b, 0x89, 0x03, 0x02, 0x80 ], dtype=np.uint8) RHO_OFFSETS = np.array([[0, 1, 6, 4, 3], [4, 4, 6, 7, 4], [3, 2, 3, 1, 7], [1, 5, 7, 5, 0], [2...
{"hexsha": "3e1cd198f3d286dcba86c0e9c341a540b9de83b8", "size": 4147, "ext": "py", "lang": "Python", "max_stars_repo_path": "npcrypto/keccak.py", "max_stars_repo_name": "timoi-Lucypher/npCrypto", "max_stars_repo_head_hexsha": "10156482d70503fa01880421aba4a4a3d171bd98", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Measures of anisotropy """ Au(C) -> au Return the Universal Elastic Anisotropy Index, `au`, of the tensor `C`. See: Ranganathan & Ostoja-Starzewksi, Universal elastic anisotropy index, Phys Rev Lett (2008) vol. 101 (5) pp. 055504 """ function Au(C) Kv, Gv, Kr, Gr = VoigtK(C), VoigtG(C), ReussK(C), Reu...
{"hexsha": "df207394fa98547d7a9c7406ad0f5106ef19458a", "size": 357, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/measures.jl", "max_stars_repo_name": "anowacki/CIJ.jl", "max_stars_repo_head_hexsha": "f6e7b0fac22048f9c20652c6d36c3e4d48d31d39", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
/- Author: E.W.Ayers This should be in mathlib. Some simp and extensionality lemmas for comma and over. -/ import category_theory.comma namespace category_theory section universes v₁ v₂ v₃ u₁ u₂ u₃ -- declare the `v`'s first; see `category_theory.category` for an explanation variables {A : Type u₁} [𝒜 : category...
{"author": "Or7ando", "repo": "lean", "sha": "d41169cf4e416a0d42092fb6bdc14131cee9dd15", "save_path": "github-repos/lean/Or7ando-lean", "path": "github-repos/lean/Or7ando-lean/lean-d41169cf4e416a0d42092fb6bdc14131cee9dd15/.github/workflows/geo/src/comma.lean"}
# --- # title: 424. Longest Repeating Character Replacement # id: problem424 # author: Tian Jun # date: 2020-10-31 # difficulty: Medium # categories: Two Pointers, Sliding Window # link: <https://leetcode.com/problems/longest-repeating-character-replacement/description/> # hidden: true # --- # # Given a string `s` tha...
{"hexsha": "d9346880f583cbb5f28721635285b92f721d2eb2", "size": 1322, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/424.longest-repeating-character-replacement.jl", "max_stars_repo_name": "noob-data-analaysis/LeetCode.jl", "max_stars_repo_head_hexsha": "94d91b295e988948e77e737c10d2f0e3ecb7c2b0", "...
[STATEMENT] lemma sign_r_pos_sgnx_iff: "sign_r_pos p a \<longleftrightarrow> sgnx (poly p) (at_right a) > 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sign_r_pos p a = (0 < sgnx (poly p) (at_right a)) [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals): 1. sign_r_pos p a \<Longrightarrow> 0 < sg...
{"llama_tokens": 2947, "file": "Winding_Number_Eval_Cauchy_Index_Theorem", "length": 35}
#!/usr/bin/env python """ Copyright 2019 Daryl Gohl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
{"hexsha": "5444a7d4b8bc49f0495a378e72a0db33d045dfd6", "size": 13108, "ext": "py", "lang": "Python", "max_stars_repo_path": "ConcatMap_v1.2.py", "max_stars_repo_name": "darylgohl/ConcatMap", "max_stars_repo_head_hexsha": "b00377f772c39f794606d4d1b4455fe5e0437552", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import glob import json import logging import matplotlib.patheffects as path_effects import numpy as np import os import pandas as pd import re import matplotlib as mpl mpl.use('Agg') from os.path import basename from matplotlib import pyplot as plt from shutil import copyfile # Configure logging logging.basicConfi...
{"hexsha": "71fc4001d1fa6b1c569bc8963806797374516cdf", "size": 16747, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment4/experiments/plotting.py", "max_stars_repo_name": "manishmalik/CS-7641-assignments", "max_stars_repo_head_hexsha": "f8a7de0aac0e53931ef7c364b9a752dbb4664d40", "max_stars_repo_licenses"...
import numpy as np import os import matplotlib.pyplot as plt import pandas as pd import seaborn as sns # -------- # overhead # -------- rootdir = 'my/path/somewhere/' subs = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10'] ROI_list = ['ROI1', 'ROI2', 'ROI3', 'ROI4'] condition_list = ['pre', 'post'] hemi_li...
{"hexsha": "e212213c0c1d1898b24531b944507d6ef63cae12", "size": 1163, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_visualization/example_catplot.py", "max_stars_repo_name": "NicoleEic/projects", "max_stars_repo_head_hexsha": "028a4bb4b49539fc98b442f0a2f9434e95c94561", "max_stars_repo_licenses": ["MIT"], "...
""" Simple way to control the torso through a ui Author: Patrick Gmerek """ import sys sys.path.append("../robot_drivers/") import Adafruit_PCA9685 import numpy as np import cv2 as cv import time from hex_walker_driver import * def main(): torso = initialize_torso() slider_names = ["Waist", ...
{"hexsha": "afa48d64731d3ca827ae46838c9d7ca53f1beda8", "size": 2846, "ext": "py", "lang": "Python", "max_stars_repo_path": "resources/robot/project_files/testing/interactive_control_torso.py", "max_stars_repo_name": "ramk94/Thief_Policemen", "max_stars_repo_head_hexsha": "557701909a20f9a50c9bebed8532873a1910e599", "max...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.QuotientRing where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat open import Cubical.Data.FinData open import Cubical.HITs.SetQuotients as SQ renaming (_/_ to _/sq_) open import Cubical.HITs.PropositionalTruncation as PT open import Cubic...
{"hexsha": "057300ee3915a28511c57482b620746d9ea9cc0b", "size": 3555, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Algebra/CommRing/QuotientRing.agda", "max_stars_repo_name": "xekoukou/cubical", "max_stars_repo_head_hexsha": "b6fbca9e83e553c5c2e4a16a2df7f9e9039034dc", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma asEnv_pickE: assumes "goodEnv rho" shows "asEnv (pickE rho) xs x = rho xs x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. asEnv (pickE rho) xs x = rho xs x [PROOF STEP] using assms asTerm_pick [PROOF STATE] proof (prove) using this: goodEnv rho good ?X \<Longrightarrow> asTerm (pick ?X) = ?X go...
{"llama_tokens": 205, "file": "Binding_Syntax_Theory_Transition_QuasiTerms_Terms", "length": 2}
module TestDefComposite using Test using Mimi using MacroTools import Mimi: ComponentPath, build, @defmodel @defcomp Comp1 begin par_1_1 = Parameter(index=[time]) # external input var_1_1 = Variable(index=[time]) # computed foo = Parameter() function run_timestep(p, v, d, t) v.var...
{"hexsha": "7d9ec9ab0876207c26b62b1ba895009159679754", "size": 1512, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_defcomposite.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Mimi.jl-e4e893b0-ee5e-52ea-8111-44b3bdec128c", "max_stars_repo_head_hexsha": "c9336f1076996dca728c30befd561280dfc1...
# Help Document # ------------- # # By convention, variable `i` is used to represent the index (or position) of a # bit vector and `j` is used to represent the count (or cardinality) of a bit # vector. """ rank0(rb, i) Count the number of 0s (`false`s) within `bv[1:i]`. """ rank0 """ rank1(bv, i) Count the ...
{"hexsha": "208ecb4dea810160c31a29864eae1af930fe3b69", "size": 1353, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/help.jl", "max_stars_repo_name": "bicycle1885/IndexedBitVectors.jl", "max_stars_repo_head_hexsha": "5f3a69a85bf9db2e274ca0a470341547711fbdc6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
Han is a badass. Users/HelenWang i love my boyfriend because he is a badass. <3h
{"hexsha": "d05c560bbb8126fc5507b2837360b58a7a92ebc3", "size": 82, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/HanLwin.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
%% LyX 2.2.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass{article} \usepackage[latin9]{inputenc} \usepackage{listings} \renewcommand{\lstlistingname}{Listing} \begin{document} \part{Introduction} CSCN files are easily editable te...
{"hexsha": "0271de3178182e296c60961de64141c3a4f0c483", "size": 42354, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/Castor3D/wiki_scene_files-en.tex", "max_stars_repo_name": "Mu-L/Castor3D", "max_stars_repo_head_hexsha": "7b9c6e7be6f7373ad60c0811d136c0004e50e76b", "max_stars_repo_licenses": ["MIT"], "max_sta...
Require Export Coq.NArith.NArith. Require Export Bedrock.Memory Bedrock.Word. Require Export Fiat.Narcissus.Automation.SolverOpt Fiat.Narcissus.BinLib.Bool Fiat.Narcissus.BinLib.Core Fiat.Narcissus.BinLib.Enum Fiat.Narcissus.BinLib.FixInt Fiat.Narcissus.Common.Compose ...
{"author": "mit-plv", "repo": "fiat", "sha": "4c78284c3a88db32051bdba79202f40c645ffb7f", "save_path": "github-repos/coq/mit-plv-fiat", "path": "github-repos/coq/mit-plv-fiat/fiat-4c78284c3a88db32051bdba79202f40c645ffb7f/src/CertifiedExtraction/Extraction/BinEncoders/Basics.v"}
""" This example of the double integrator demonstrates how to pass constraints to PyTrajectory. """ # imports from pytrajectory import TransitionProblem import numpy as np def f(xx, uu, uuref, t, pp): """ Right hand side of the vectorfield defining the system dynamics :param xx: state :param uu: ...
{"hexsha": "f1f06b246afbf25ebd7c21903de9f68209aef724", "size": 2170, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ex6_ConstrainedDoubleIntegrator.py", "max_stars_repo_name": "TUD-RST/pytrajectory", "max_stars_repo_head_hexsha": "fa3c7e89450748d1d75800f89a831e608cec1d8f", "max_stars_repo_licenses": ["...
for (study in c("SDY212", "SDY400", "SDY404")) { fn.ge = file.path(PROJECT_DIR, "generated_data", "HIPC", paste0(study, "_GE_matrix_gene.txt")) dat = fread(fn.ge, data.table = F) fn.si = file.path(PROJECT_DIR, "generated_data", "HIPC", paste0(study, "_sample_info.txt...
{"hexsha": "116d686e353ec87d92a9b9ded5f5b0aabdef1361", "size": 963, "ext": "r", "lang": "R", "max_stars_repo_path": "R/hipc_dataprep/hipc_sample_filtering.r", "max_stars_repo_name": "niaid/wl-test", "max_stars_repo_head_hexsha": "9ac8aa781ed73b509e1410f147f6799e9a77da86", "max_stars_repo_licenses": ["MIT"], "max_stars_...
"""Training routine for models.""" from os.path import join import json from itertools import chain import numpy as np import tensorflow as tf from typing import Callable from tensorflow.keras.callbacks import ( CSVLogger, EarlyStopping, ModelCheckpoint, ReduceLROnPlateau, TensorBoard) from .callbacks import ( ...
{"hexsha": "b9fc820460bcc13fd667795f3cb43cb1bf9154ab", "size": 12606, "ext": "py", "lang": "Python", "max_stars_repo_path": "seft/training_routine.py", "max_stars_repo_name": "daniel-trejobanos/seft-hypoxia", "max_stars_repo_head_hexsha": "77f46086f44fde696bb18885549d559056a49714", "max_stars_repo_licenses": ["BSD-3-Cl...
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2011 Bryce Lelbach // Copyright (c) 2007-2013 Hartmut Kaiser // // 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) /...
{"hexsha": "f89071bad7a47dee46c5d9602bb9c704b844e060", "size": 5389, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "hpx/runtime/agas/big_boot_barrier.hpp", "max_stars_repo_name": "atrantan/hpx", "max_stars_repo_head_hexsha": "6c214b2f3e3fc58648513c9f1cfef37fde59333c", "max_stars_repo_licenses": ["BSL-1.0"], "max_...
import time import subprocess from io import BytesIO import numpy as np from PIL import Image def cmd(command): subp = subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding="utf-8") subp.wait(100) if subp.poll() == 0: print(subp.communicate()[0]) else: ...
{"hexsha": "2bbd45af3aa0a354e2b631b660ba0e4fa0ffdce8", "size": 503, "ext": "py", "lang": "Python", "max_stars_repo_path": "serve_model_yolov5.py", "max_stars_repo_name": "4nuragk/Yolov5-Facemask", "max_stars_repo_head_hexsha": "dce9c34d5edd092e8082fd00cf9d97748387a602", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
''' new Network definitions using the functional API from keras. first part: model settings like input variables, outputs and transformations second part: model definition, name must be def model(input_shape): ''' import numpy as np import keras import keras.layers from keras import backend as K from keras import regu...
{"hexsha": "fe23a0440fa60b191aca23030628611228f6a020", "size": 6764, "ext": "py", "lang": "Python", "max_stars_repo_path": "i3deepice/models/mu_energy_reco_full_range/model.py", "max_stars_repo_name": "tglauch/DeepIceLearning_Module", "max_stars_repo_head_hexsha": "8c05929ec97226f07ab9e13a1dfc539d0e47a2b1", "max_stars_...
# Copyright (C) 2020 Argonne National Laboratory # Written by Alinson Santos Xavier <axavier@anl.gov> using RELOG, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormats @testset "build" begin basedir = dirname(@__FILE__) instance = RELOG.parsefile("$basedir/../../instances/s1.json") graph = RELOG.build_gr...
{"hexsha": "27d0e7f92c86141bd27adbdec7a4b2db3fa0e804", "size": 1297, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/model/build_test.jl", "max_stars_repo_name": "ANL-CEEESA/RELOG", "max_stars_repo_head_hexsha": "92d30460b9f2c227770dd426415c1ee34dac5300", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import numpy as np from numpy import sqrt, real, conj from glob import glob from apertools.utils import take_looks import apertools.sario as sario from apertools.log import get_log logger = get_log() EPS = np.finfo(np.float32).eps def abs2(x): # Weird, but it seems to be faster... # %timeit np.abs(b)**2 ...
{"hexsha": "f3c1dbdc9b8a2d7b2ce3fb10a7d32691d66e0777", "size": 8234, "ext": "py", "lang": "Python", "max_stars_repo_path": "insar/form_igrams.py", "max_stars_repo_name": "scottstanie/insar", "max_stars_repo_head_hexsha": "61724be3cef7faf1e977e1b0ffad89dcae342761", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
export searchvtx # recursive function for applying search criteria function keycheck(data::Dict{<:Any,<:Any},str::Array{String,1},mode::Array{Symbol,1}) found = false for key in keys(data) if :deps in mode for s in str (key == s) && (found = true) end end...
{"hexsha": "b605be815a270c04241f6537fa843729762f945f", "size": 1886, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/search.jl", "max_stars_repo_name": "UnofficialJuliaMirror/VerTeX.jl-cc48e778-429c-5593-b60f-2bcf41d5649c", "max_stars_repo_head_hexsha": "41ddb48918c789767511ceeaf135790eeab86d68", "max_stars_r...
import argparse import time import numpy as np import os def main(): parser = argparse.ArgumentParser(description = "WGAN-GP") # Saving parameters parser.add_argument("--name", "-n", "-id", type = str, default = str(int(time.time())), help = "Name/ID of the current training model") parser.add_argument("--re...
{"hexsha": "d7497318d119a6f029e99d49c39b8ccdedf38f31", "size": 5845, "ext": "py", "lang": "Python", "max_stars_repo_path": "launcher.py", "max_stars_repo_name": "saundersp/wgan-gp", "max_stars_repo_head_hexsha": "27f1afbee348a71edb0275e2dbb7c57f29b74adf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_s...
#!/usr/bin/env python3 """ Simple exercise to construct a controller that controls the simulated Duckiebot using pose. """ import time import sys import argparse import math import numpy as np import gym from gym_duckietown.envs import DuckietownEnv parser = argparse.ArgumentParser() parser.add_argument('--env-name...
{"hexsha": "0ca4bbfd36593fb28354dec59a8d08498c71b6ab", "size": 1818, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym-duckietown/exercises/basic_control.py", "max_stars_repo_name": "lyf44/CS4278-5478-Project-Materials", "max_stars_repo_head_hexsha": "685419c65847e72450e99586e9e0f3794369b4a3", "max_stars_repo_...
import itertools import operator import numpy as np from sklearn import cross_validation from sklearn import neighbors train = np.load('train.npy') # Remove the labels test = np.load('test_distribute.npy')[:,1:] data = train[:,1:] target = train[:,0] np.set_printoptions(threshold='nan') print target #print neighbo...
{"hexsha": "62c5106f638f3e87763773985d405ff121f5d9bc", "size": 599, "ext": "py", "lang": "Python", "max_stars_repo_path": "Black-Box/opt.py", "max_stars_repo_name": "bcspragu/Machine-Learning-Projects", "max_stars_repo_head_hexsha": "b6832cbb9bb27d7e8253300f97a3ab84b1a555dc", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Licensed under the Unlicense License; you may not use this file except in compliance with the License. You may obtain a copy of the License at https://unlicense.org Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BAS...
{"hexsha": "9124e3de78258a3a2126a65e27a8a30b612a0e04", "size": 7160, "ext": "py", "lang": "Python", "max_stars_repo_path": "LR5/LR5.py", "max_stars_repo_name": "XxOinvizioNxX/NSvZTZiU", "max_stars_repo_head_hexsha": "6eeab20503cddf299c1258969fba6e94915112fb", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count":...
import numpy as np from time import time import datetime import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import h5py import sys from os import listdir, remove from os.path import isfile, join, exists, basename, splitext #from laspy.file import File from random import randint from enum import Enum from math import *...
{"hexsha": "89d058df08112781643cac812829df70e275950d", "size": 6617, "ext": "py", "lang": "Python", "max_stars_repo_path": "imports.py", "max_stars_repo_name": "eglrp/ConvPoint_Keras", "max_stars_repo_head_hexsha": "66c94479ff8dc8ad174ed4da8e6bb1d641a8a8c0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
[STATEMENT] lemma inorder_eq_mset: "mset (inorder t) = relations_mset t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. mset (inorder t) = relations_mset t [PROOF STEP] by(induction t) (auto)
{"llama_tokens": 84, "file": "Query_Optimization_JoinTree", "length": 1}
# -*- coding: utf-8 -*- """ @Time:Created on 2019/5/20 19:40 @author: LiFan Chen @Filename: model_glu.py @Software: PyCharm """ # -*- coding: utf-8 -*- """ @Time:Created on 2019/5/7 13:40 @author: LiFan Chen @Filename: model.py @Software: PyCharm """ import torch import torch.nn as nn import torch.optim as optim import...
{"hexsha": "fe80781ff85830f912f1f4b2b50d08a871664187", "size": 12216, "ext": "py", "lang": "Python", "max_stars_repo_path": "Human,C.elegans/model_glu.py", "max_stars_repo_name": "nepp1d0/transformerCPI", "max_stars_repo_head_hexsha": "a84c1e9b23b35ba3f02ad13621a1413f0ae7c62a", "max_stars_repo_licenses": ["Apache-2.0"]...
from collections import deque from copy import deepcopy from typing import Any, Deque, Dict, List, Optional, Tuple import numpy as np from abides_core import Message, NanosecondTime from abides_core.generators import ConstantTimeGenerator, InterArrivalTimeGenerator from abides_core.utils import str_to_ns from abides_...
{"hexsha": "cb2e032a5085c9671aba01fecb5c65998077669c", "size": 13819, "ext": "py", "lang": "Python", "max_stars_repo_path": "abides-markets/abides_markets/agents/background_v2/core_background_agent.py", "max_stars_repo_name": "jpmorganchase/ABIDES-jpmc-gym", "max_stars_repo_head_hexsha": "198736a1b1316190072356c9804125...
import numpy as np from scipy.optimize import curve_fit def exp_func(x, a, b, c): """ An exponential function. Inputs: x : (1D array) x-values to be input into the exponential function. a : (float) multiplicative factor for the exponential. b : (float) multiplicative factor for the exponentiated x. c...
{"hexsha": "59cbcd0dca5b8ea30b6c7e4da7bee40aabe4916b", "size": 1044, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/template/fit_line.py", "max_stars_repo_name": "arjunsavel/template-repo", "max_stars_repo_head_hexsha": "4dcffb2fe0cd748c76304e872a2fced5ea2b597d", "max_stars_repo_licenses": ["MIT"], "max_sta...
import re import string from math import pi import numpy as np import pandas as pd from bokeh.models import ColumnDataSource, NumeralTickFormatter from bokeh.plotting import figure from bokeh.transform import cumsum from bokeh.palettes import Category10 from numpy import histogram from sklearn import metrics from sklea...
{"hexsha": "c8632628f84c05459260defc31ee0e3b632d136e", "size": 10140, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/graphs.py", "max_stars_repo_name": "profilator/profilator", "max_stars_repo_head_hexsha": "6161efffee00b95216c8d60fcbd637171fae6980", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import cv2 import tensorflow as tf import numpy as np OUTPUT_PATH = "../events/" NUM_FILTERS = 10 FILTER_SIZE = (3, 3) STRIDES = (1, 1) def nn(input_node): with tf.variable_scope('nn'): w = tf.get_variable( name='weight', shape=[FILTER_SIZE[0], FILTER_SIZE[1], 3, NUM_FILTERS], ...
{"hexsha": "81dc4f11e5576ffd637d347eccc3eb3c8593cb6c", "size": 2010, "ext": "py", "lang": "Python", "max_stars_repo_path": "05/conv2d.py", "max_stars_repo_name": "jason9075/ithome_tensorflow_series", "max_stars_repo_head_hexsha": "e8f92de2a73a88e7b03a9ac58ece4c4a604f066e", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
[STATEMENT] lemma is_strict_if: assumes "\<And>f. ide f \<Longrightarrow> f \<star> src f = f" and "\<And>f. ide f \<Longrightarrow> trg f \<star> f = f" and "\<And>a. obj a \<Longrightarrow> ide \<i>[a]" and "\<And>f g h. \<lbrakk>ide f; ide g; ide h; src f = trg g; src g = trg h\<rbrakk> \<Longrightar...
{"llama_tokens": 4317, "file": "Bicategory_Strictness", "length": 44}
import os os.environ['OMP_NUM_THREADS'] = '1' import dgl import sys import numpy as np import time from scipy import sparse as spsp from numpy.testing import assert_array_equal from multiprocessing import Process, Manager, Condition, Value import multiprocessing as mp from dgl.graph_index import create_graph_index from...
{"hexsha": "62c3f69b117167cdebc522346d1837d857cfcf6c", "size": 3704, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/distributed/test_dist_graph_store.py", "max_stars_repo_name": "m30m/dgl", "max_stars_repo_head_hexsha": "2190c39d674f76c65db9ee8da7b43d3021f19c29", "max_stars_repo_licenses": ["Apache-2.0"],...
# -*- coding: utf-8 -*- from zaifapi import ZaifPublicApi, ZaifTradeApi from decimal import Decimal, ROUND_DOWN from TickChanger import Tick_int import numpy import time import traceback import re import datetime class EXCaccess: def __init__(self): self.investment = 10000 # 投資制限額 # 予想利益額の閾値(閾値以上...
{"hexsha": "59d9fc3c02acfcd8dd496358c5283fde3d44b387", "size": 33487, "ext": "py", "lang": "Python", "max_stars_repo_path": "EXCaccess.py", "max_stars_repo_name": "v2okimochi/AutoTA-TriangularArbitrage", "max_stars_repo_head_hexsha": "1b00cc672ed688d833a37611c934da2bb29154ad", "max_stars_repo_licenses": ["MIT"], "max_s...
""" This file constructs the functions to find lower and upper bound of optimal set of sourcing countries according to Jia's algorithm. """ ## Define module and things to be exported module JiaAlgorithm export lowerbound_setup, lowerbound, upperbound_setup, upperbound, optimalset ## Load packages using LinearAlgebr...
{"hexsha": "0ab26d09aed979ae49e35062298d2dfeac85bf21", "size": 4807, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Code/JiaAlgorithm.jl", "max_stars_repo_name": "loforteg/AFT2017-Replication", "max_stars_repo_head_hexsha": "4b2abdc4584550c8c31d210d4cfa8cb7c3d20400", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import time from torch.autograd import Function try: import expansion_penalty except: pass import math import sys from numbers import Number from collections import Set, Mapping, deque def square_distance(src, dst): """ ...
{"hexsha": "f058d4131e3dc9aa303ac5c79dd01b9243dfd880", "size": 9837, "ext": "py", "lang": "Python", "max_stars_repo_path": "loss.py", "max_stars_repo_name": "benedictlee21/FYP_SCSE21_0204", "max_stars_repo_head_hexsha": "b5fdefac0fbec1291def5d47c780e8e7dced3b50", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
from __future__ import division import argparse import os import glob import time from datetime import datetime import torch.distributed as dist import torch import utils import logging import torch.nn as nn import torch.backends.cudnn as cudnn from torch.utils.data.distributed import DistributedSampler import torchvis...
{"hexsha": "54f42456ef2101d14b97370affe2b111d506642b", "size": 7967, "ext": "py", "lang": "Python", "max_stars_repo_path": "DSNAS/eval_imagenet.py", "max_stars_repo_name": "cwlacewe/SNAS-Series", "max_stars_repo_head_hexsha": "92ac8031f718235aecaefb9967851f8f355dbca0", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
!#################################################################################################! !BSD 3-Clause License ! !Copyright (c) 2017, Ricardo Torres !All rights reserved. ! !Redistribution and use in source and binary forms, with or without !modification, are permitted provided that the following conditions ...
{"hexsha": "d48e9c3df391bb6a07945df3b7860221976d062f", "size": 65616, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/H5_OO_mod.f90", "max_stars_repo_name": "rjgtorres/oo_hdf", "max_stars_repo_head_hexsha": "486f7cb0ad6581ed134a9a514da88e58c2f8adf7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
#include <iostream> #include <armadillo> #include <cmath> #include <cstdlib> #include <time.h> #include <fstream> using namespace std; using namespace arma; void RHO_A_FILL(vec &rho, mat &A, int N,double rhoN); //rho, kind of like a linespace //A, Tridiagonal matrix voi...
{"hexsha": "de0292302ec5175b48f8a9c3707eb398a3dc22ce", "size": 4506, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "project2/code-joseph/jacobi_interact.cpp", "max_stars_repo_name": "frxstrem/fys3150", "max_stars_repo_head_hexsha": "35c0310f48fca07444ec5924267bf646d121b147", "max_stars_repo_licenses": ["MIT"], "m...
import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import numpy as np import pandas as pd import datetime import matplotlib.dates as mdates from pandas.plotting import register_matplotlib_converters import sys """ TODO: - Add possibility to color different segments of the time series """...
{"hexsha": "11f274b04f96d2de39efa6c13a439af1ff1d52cc", "size": 26826, "ext": "py", "lang": "Python", "max_stars_repo_path": "bidaf/TimeSeriesVisualizer.py", "max_stars_repo_name": "RI-SE/BIDAF", "max_stars_repo_head_hexsha": "ebb7c2f96ab65cb9cec0859f49d9dd951b93874c", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
#include <boost/metaparse/get_col.hpp>
{"hexsha": "067a541dd8775c1f7f1c9be9643f048e753fa10d", "size": 39, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_metaparse_get_col.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"], ...
from torch.utils.data import Dataset, DataLoader import torch import numpy as np from torch.utils.data import Dataset, DataLoader from transformers import GPT2TokenizerFast, GPT2Model from sklearn.preprocessing import MultiLabelBinarizer from mitnewsclassify2 import tfidf, tfidf_bi, download import os import gc import ...
{"hexsha": "22aa5463592d13a85eb06dca77cc5fb3424e7d64", "size": 3395, "ext": "py", "lang": "Python", "max_stars_repo_path": "NYT/ensemble/vectorize-first.py", "max_stars_repo_name": "kristjanr/ut-mit-news-classify", "max_stars_repo_head_hexsha": "d85e32256f36d4a22d727e678adfaa7e0a4a3108", "max_stars_repo_licenses": ["MI...
export Closed, Partial, Open, closure """ Trait to indicate that a binary operation • is closed over set S. Only methods of • with the signature •(x::S, y::S) are to be considered. The definition of closed is that •(x::S, y::S) shall not throw an error, and •(x::S, y::S) shall return a result of type S. """ abstract ...
{"hexsha": "207d5c551dc5ef92b756e5baa180471ea6b08d1b", "size": 1187, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/closure.jl", "max_stars_repo_name": "TotalVerb/AlgebraicTraits.jl", "max_stars_repo_head_hexsha": "7dc81229d31d2c9afc11003398c6c1fdd3468cde", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/python # -*- coding: utf-8 -*- from scipy import stats from matplotlib import pyplot as plt from pandas import DataFrame import numpy as np from abra.utils import dict_to_object from abra.stats import Samples NPTS = 100 LABEL_Y_OFFSET_FACTOR = 30. COLORS = dict_to_object( { "blue": "#4257B2", ...
{"hexsha": "8936da7c769ae6d29e3659a964aed726bf10e759", "size": 22475, "ext": "py", "lang": "Python", "max_stars_repo_path": "abra/vis.py", "max_stars_repo_name": "quizlet/abracadabra", "max_stars_repo_head_hexsha": "eda599bd02f14b96efdc521f53132d93c9100ede", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24, "m...
from sympy import Eq, expand, Function, solve, symbols from devito import t, time, x, y, z, Dimension from devito.interfaces import DenseData, TimeData, Forward, Backward from devito.foreign import Operator from numpy.random import randint def acoustic_laplacian(v, rho): # Derive stencil from symbolic equation ...
{"hexsha": "295cd8f8a7368e6a39761eab40c90b3a0d4c3dd2", "size": 9570, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/operators/acoustic/Jfwi_operators.py", "max_stars_repo_name": "SINBADconsortium/opesciSLIM", "max_stars_repo_head_hexsha": "8c3af2d8e9809fcd4d53fa160c01dbd624b6bb25", "max_stars_repo_licens...
# Working with Sampling Distributions Most statistical analysis involves working with distributions - usually of sample data. ## Sampling and Sampling Distributions As we discussed earlier, when working with statistics, we usually base our calculations on a sample and not the full population of data. This means we nee...
{"hexsha": "23e6479da4671c3e54019de692ca2505d18378d2", "size": 91264, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Statistics and Probability by Hiren/04-05-Sampling Distributions.ipynb", "max_stars_repo_name": "serkin/Basic-Mathematics-for-Machine-Learning", "max_stars_repo_head_hexsha": "ac0ae9...
#!/usr/bin/env python # /*************************************************************************** # # @package: panda_siimulator_examples # @metapackage: panda_simulator # @author: Saif Sidhik <sxs1412@bham.ac.uk> # # **************************************************************************/ # /**************...
{"hexsha": "2981bd8ba691abca1967085c830d265aca3f97de", "size": 8415, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/simu/scripts/task_space_control.py", "max_stars_repo_name": "Grossbier/simulation_multirobots", "max_stars_repo_head_hexsha": "1fe00bf81932ad6de20709ad85f677f4cf196333", "max_stars_repo_licens...
import numpy as np """ Implementation of the non-separable blending modes as described in https://www.w3.org/TR/compositing-1/#blendingnonseparable """ """ four non-separable utility functions as described on the aforementioned page Lum(C) = 0.3 x Cred + 0.59 x Cgreen + 0.11 x Cblue ClipColor(C) ...
{"hexsha": "7e5dc5bf042ce7414afd9f8cfd32e63a6f7a4d16", "size": 5574, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyora/BlendNonSep.py", "max_stars_repo_name": "FredHappyface/pyora-mirror", "max_stars_repo_head_hexsha": "23d90239183f18be40d1bc47ac89fa4259996cee", "max_stars_repo_licenses": ["MIT"], "max_stars...
import os import matplotlib.pyplot as plt import numpy as np import visdom from tensorboardX import SummaryWriter TENSORBOARD_DIR = 'tensorboard/runs/' class Plotter: def on_new_point(self, label, x, y): pass def on_finish(self): pass class MatplotlibPlotter(Plotter): def __init__(sel...
{"hexsha": "7acccb65d0dca05bbb16fdcd03d18899e66d73dc", "size": 2706, "ext": "py", "lang": "Python", "max_stars_repo_path": "zerogercrnn/lib/visualization/plotter.py", "max_stars_repo_name": "zerogerc/rnn-autocomplete", "max_stars_repo_head_hexsha": "39dc8dd7c431cb8ac9e15016388ec823771388e4", "max_stars_repo_licenses": ...
import numpy as np try: import keplertools.Cyeccanom haveCyeccanom = True except ImportError: haveCyeccanom = False pass def eccanom(M, e, epsmult=4.01, maxIter=100, returnIter=False, noc=False): """Finds eccentric anomaly from mean anomaly and eccentricity This method uses Newton-Raphson i...
{"hexsha": "02baff70ee2a7c272b70f5a9e764c254a02bae38", "size": 16926, "ext": "py", "lang": "Python", "max_stars_repo_path": "keplertools/fun.py", "max_stars_repo_name": "dsavransky/keplertools", "max_stars_repo_head_hexsha": "52de5f7ec6cb57a6363a6fac1925e39c10391b49", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
''' intra_blob recursively evaluates each blob for three forks of extended internal cross-comparison and sub-clustering: - comp_r: incremental range cross-comp in low-variation flat areas of +v--vg: the trigger is positive deviation of negated -vg, - comp_a: angle cross-comp in high-variation edge areas of...
{"hexsha": "81dc72276b2041b06ce127471003d48bfcf86148", "size": 8351, "ext": "py", "lang": "Python", "max_stars_repo_path": "frame_2D_alg/intra_blob.py", "max_stars_repo_name": "aqibmumtaz/CogAlg", "max_stars_repo_head_hexsha": "36009f456be93833dd44038c8adbd99b6037383c", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include "converter.h" #include <string> #include <iostream> #include <sstream> #include <boost/gil/image.hpp> #include <boost/gil/typedefs.hpp> #include <boost/gil/io/io.hpp> #include <boost/gil/extension/io/jpeg.hpp> #include <boost/gil/extension/io/png.hpp> #include "utils.h" using namespace boost::gil; using n...
{"hexsha": "03f910cdd3321cdb7cb81c2a3ed7dc27e5435daa", "size": 2244, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/converter.cpp", "max_stars_repo_name": "kopytjuk/wasm-image-converter", "max_stars_repo_head_hexsha": "5f20492a9ce60e942b6432ce251618908afbc4f2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...