text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np def get_activation(name, inplace=True): if name == 'lrelu': return nn.LeakyReLU(0.2, inplace=inplace) if name == 'relu': return nn.ReLU(inplace) if name == 'tanh': return nn.Tanh() if name == 'sigmoid': return nn.Sig...
{"hexsha": "9d11afbc7c213973b5f6fcd8e6512bfda869ca3b", "size": 7210, "ext": "py", "lang": "Python", "max_stars_repo_path": "implementations/EigenGAN/model.py", "max_stars_repo_name": "STomoya/animeface", "max_stars_repo_head_hexsha": "37b3cd26097d7874559d4c152e41e5712b7a1a42", "max_stars_repo_licenses": ["MIT"], "max_s...
import sys import numpy as np from itertools import islice import matplotlib.pyplot as plt from itertools import izip plt.rcParams.update({'font.size': 60}) plt.rcParams.update({'axes.linewidth' : 3}) plt.rcParams.update({'lines.linewidth' : 3}) plt.rcParams.update({'lines.markersize' : 10}) def get_K(n): return ...
{"hexsha": "9d6fabbbe00075c34dddb86081e72ba66da11478", "size": 9274, "ext": "py", "lang": "Python", "max_stars_repo_path": "ExperimentsOld/Results/BEARBh/process_ingestion.py", "max_stars_repo_name": "rdfostrich/cobra", "max_stars_repo_head_hexsha": "b65ec1aa7b10e990a3b40d86636050377ff2d2d6", "max_stars_repo_licenses":...
[STATEMENT] lemma conf_heap_ops_mono: assumes "P,h \<turnstile> v :\<le> T" shows conf_allocate_mono: "(h', a) \<in> allocate h hT \<Longrightarrow> P,h' \<turnstile> v :\<le> T" and conf_heap_write_mono: "heap_write h a al v' h' \<Longrightarrow> P,h' \<turnstile> v :\<le> T" [PROOF STATE] proof (prove) goal (1 ...
{"llama_tokens": 357, "file": "JinjaThreads_Common_Conform", "length": 2}
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Conversion functions for test statistic <-> significance <-> probability. """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np # TODO: make all the other methods private? # need to transfer the info ...
{"hexsha": "a4eb7319891f59d782a0105e3167428bc0ceeee3", "size": 10902, "ext": "py", "lang": "Python", "max_stars_repo_path": "gammapy/stats/significance.py", "max_stars_repo_name": "gabemery/gammapy", "max_stars_repo_head_hexsha": "99e5c5d38e4920dddd7bca41fb1539ccda8bea2d", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import nibabel import numpy import spire from .. import entrypoint from ..cli import * class ASLBOLDToASL(spire.TaskFactory): """ Separate ASL signal from ASL-BOLD based on Fourier analysis. References: - Mapping resting-state functional connectivity using perfusion MRI. ...
{"hexsha": "6a759d3b6add40cac508f383ada49754c22e6c4f", "size": 2403, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/erwin/cbf/asl_bold_to_asl.py", "max_stars_repo_name": "lamyj/erwin", "max_stars_repo_head_hexsha": "a2a7c945827a54c1e89dbedb31c82e34363bf7d1", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import pytest from docarray import DocumentArray, Document from docarray.math import ndarray @pytest.mark.parametrize( 'storage, config', [ ('memory', None), ('weaviate', {'n_dim': 32}), ('annlite', {'n_dim': 32}), ('qdrant', {'n_dim': 32}), ('elasti...
{"hexsha": "f68dafb63b753d05a4b2eef86e049da78e4d727f", "size": 6466, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/array/mixins/test_find.py", "max_stars_repo_name": "jina-ai/docarray", "max_stars_repo_head_hexsha": "24301254d95fd755fb6e821df6bc2c6b977b138b", "max_stars_repo_licenses": ["Apache-2.0"...
import tensorflow as tf import tensorflow_probability as tfp print(f"Tensorflow API Version: {tf.version.VERSION}") print(f"Tensorflow API Compiler Version: {tf.version.COMPILER_VERSION}") import numpy as np import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import os import da...
{"hexsha": "9c823e8975089565313932b4049b4e192bf0b1de", "size": 13291, "ext": "py", "lang": "Python", "max_stars_repo_path": "NNmodels/Model.py", "max_stars_repo_name": "peiyan1234/PA_radiomics_research", "max_stars_repo_head_hexsha": "bf127ad791c10f2abd40942970f052472c931006", "max_stars_repo_licenses": ["Apache-2.0"],...
""" RDKit IO. """ import numpy as np try: from rdkit import Chem import rdkit except ModuleNotFoundError as e: print("Module rdkit was not found, it must be installed to use rdkit IO") raise from .. import TinyGraph def from_rdkit_mol(mol, use_charge=False, use_chiral=False, u...
{"hexsha": "fdf53f05a022fc9df32c8db20ab407d73fbc0e64", "size": 4492, "ext": "py", "lang": "Python", "max_stars_repo_path": "tinygraph/io/rdkit.py", "max_stars_repo_name": "thejonaslab/tinygraph", "max_stars_repo_head_hexsha": "f1638168ed084dbb0515cafbf69282b38c4b5810", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import numpy as np from pytorch_grad_cam.base_cam import BaseCAM # https://arxiv.org/abs/1710.11063 class GradCAMPlusPlus(BaseCAM): def __init__(self, model, target_layers, use_cuda=False, reshape_transform=None): super(GradCAMPlusPlus, self).__init__(model, target_layers, use_c...
{"hexsha": "0afd7abbf6694dc64d4e3936081135f9e71a2411", "size": 1262, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_grad_cam/grad_cam_plusplus.py", "max_stars_repo_name": "hddlovefxx/-pytorch-grad-cam", "max_stars_repo_head_hexsha": "6eb5bd3a41bcd661c6acc53853258282286768fe", "max_stars_repo_licenses": ...
(* Author: Nan Jiang *) section \<open>Soundness and completeness\<close> theory Dom_Kildall_Correct imports Dom_Kildall_Property begin context dom_sl begin lemma entry_dominate_dom: assumes "i \<in> set (g_V G)" and "dominate i 0" shows "dom i 0" using assms proof- from assms(1) entry0_dominates_...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Dominance_CHK...
from .handler import function_handler import yaml import pytest import pandas as pd import numpy as np from packaging import version def merge_setup(): # read in file infos with open("tests/test_yamls/test_sql_merge.yml", "r") as stream: file_infos = yaml.safe_load(stream) merge_infos = [] fo...
{"hexsha": "8cf369d5e7473cc027b4771997310601bbc79acd", "size": 1564, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_merge.py", "max_stars_repo_name": "rainyjonne/airbnb-pipeline", "max_stars_repo_head_hexsha": "5e07e26519ac86dc5a58cc4b34710818edd241ae", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from sklearn.cluster import AgglomerativeClustering as skAgglomerative import numpy as np from .base import Clustering from ..similarity.pairwise import pairwise_similarity class AgglomerativeClustering(Clustering): """Hierarchical Agglomerative Clustering. Parameters ---------- n_clusters : int ...
{"hexsha": "624a799d851e06d9361233446dd4eb1d0c43c6ea", "size": 1496, "ext": "py", "lang": "Python", "max_stars_repo_path": "trajminer/clustering/agglomerative.py", "max_stars_repo_name": "ybj94/trajminer", "max_stars_repo_head_hexsha": "7355344be8fe763ba2583b6f508fefc3290c9849", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import torch import drr_projector_function from torch import nn from torch.autograd import Function class DRRProject(Function): @staticmethod def forward(ctx, volume, detector_shape, ray_mat, source, step_size, voxel_size, interp): ctx.save_for_backward(ray_mat, source, step_size, v...
{"hexsha": "30c93b2cb703728ad59de56634910165ebf129fc", "size": 21043, "ext": "py", "lang": "Python", "max_stars_repo_path": "xraysyn/networks/drr_projector_new.py", "max_stars_repo_name": "cpeng93/XraySyn", "max_stars_repo_head_hexsha": "7309b2fbc28bceddbc80a03c2279540da391782a", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma none_MT_rulessubset[rule_format]: "none_MT_rules C a \<longrightarrow> set b \<subseteq> set a \<longrightarrow> none_MT_rules C b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. none_MT_rules C a \<longrightarrow> set b \<subseteq> set a \<longrightarrow> none_MT_rules C b [PROOF STEP] by (indu...
{"llama_tokens": 130, "file": "UPF_Firewall_FWNormalisation_NormalisationIntegerPortProof", "length": 1}
# approval ratings helper scripts from nltk.tokenize import word_tokenize, sent_tokenize import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import datetime as datetime xls_file = pd.ExcelFile('data/approval_ratings.xls') sheet_list = [] for sheet in xls_file.sheet_names: ...
{"hexsha": "e7ccba5c1d1b08eb75d63fbb56b82df9d3e44a6c", "size": 1222, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/approval.py", "max_stars_repo_name": "ratulesrar3/sotu-approval-analysis", "max_stars_repo_head_hexsha": "4e4575e81795d09ce951ae289eb30158392ef37d", "max_stars_repo_licenses": ["MIT"], "ma...
Our work broadly falls under the category of semi-supervised sequence learning for natural language. There are four recent trends to pay attention to: deep contextual embeddings, pre-trained language models, a reduction in task-specific architectures, and task- and domain-specific fine-tuning. Because of their ability...
{"hexsha": "6e7b89e2799f6fec8af59caf77524ef8b959ae4a", "size": 4883, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/literature_review.tex", "max_stars_repo_name": "elinsky/fiqa", "max_stars_repo_head_hexsha": "0caa0fdb3a684c06bea2ba97d96b928d737c8146", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from math import cos, sin, sqrt, atan2 from triangle import triangulate from Meshes.quaternion import quat_from_axis, quat_mult...
{"hexsha": "e3ed0e883152035ee8f2d334a171698e32c1f69f", "size": 11232, "ext": "py", "lang": "Python", "max_stars_repo_path": "Meshes/sphere.py", "max_stars_repo_name": "patriciogonzalezvivo/Meshes", "max_stars_repo_head_hexsha": "8efdaf23d03e4608d662d234d7ae84a6f3cf69e3", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
# -*- coding:utf-8 -*- # author:平手友梨奈ii # e-mail:1353593259@qq.com # datetime:1993/12/01 # filename:configs.py # software: PyCharm import numpy as np import tensorflow as tf import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model from keras.optimizers import Adam from keras.call...
{"hexsha": "463e69bb8fdf246adb737b3ab008b90089c59786", "size": 19743, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "HirataYurina/yoloV4-keras-techi", "max_stars_repo_head_hexsha": "825be030b1bf13c6d16e54f2f7741ffc736302da", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# multivariate.py import numpy as np from numba import njit, jit, prange from scipy import stats from tqdm import tqdm import warnings import matplotlib import matplotlib.pyplot as plt from ts_analysis.dataframes import rdm from ts_analysis.utilities import aux from ts_analysis.utilities import matop from ts_analysis...
{"hexsha": "53babcbb8017fd5b00a9c7086eafe5559e67df41", "size": 17163, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ts_analysis/imaging/multivariate.py", "max_stars_repo_name": "tedchengf/ts_analysis", "max_stars_repo_head_hexsha": "b1ed127b5392d177c51bd136107aa0fec4a1759c", "max_stars_repo_licenses": ["MI...
using DataStructures: OrderedDict abstract type Tabulation{V} end value(t::Tabulation) = getfield(t, :value) Base.adjoint(t::Tabulation) = value(t) Base.getproperty(t::Tabulation, k::Symbol) = value(t)[k] Base.getindex(t::Tabulation, k::Symbol) = getproperty(t, k) Base.iterate(t::Tabulation) = iterate(value(t)) Base....
{"hexsha": "ddb1beb89449dcc3692a13d5be3c441cdbbd3076", "size": 2233, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/state/tabulate.jl", "max_stars_repo_name": "cropbox/Cropbox.jl", "max_stars_repo_head_hexsha": "072c3c2664688fbe9a9dae41833ba2ce6a559f67", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
function d = degree(varargin) F = varargin{1}; F = flatten(F); d = subdegree(F.clauses); function d = subdegree(clauses) d = -inf; for i = 1:length(clauses) d = max(d,degree(sdpvar(clauses{i}.data))); end
{"author": "yalmip", "repo": "YALMIP", "sha": "f6d5a6d4222a4d722de30bffb43cae4b3e13b860", "save_path": "github-repos/MATLAB/yalmip-YALMIP", "path": "github-repos/MATLAB/yalmip-YALMIP/YALMIP-f6d5a6d4222a4d722de30bffb43cae4b3e13b860/extras/@lmi/degree.m"}
import numba import numpy as np # error: Untyped decorator makes function "is_monotonic_increasing" untyped @numba.jit( # type: ignore[misc] numba.boolean(numba.int64[:]), nopython=True, nogil=True, parallel=False ) def is_monotonic_increasing(bounds: np.ndarray) -> bool: """Check if int64 values are monoton...
{"hexsha": "7c2e7636c7d81c052ebcbcb557f8e7e0789fb584", "size": 550, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/core/_numba/kernels/shared.py", "max_stars_repo_name": "IamJasonBian/pandas", "max_stars_repo_head_hexsha": "21024d5a8e05f611d0fef5ddf884ffa237643772", "max_stars_repo_licenses": ["BSD-3-Cla...
ALL_TASK_OFFSETS[("linux-x86_64", v"1.6.1")] = Dict( :END => 312, :_isexception => 58, :_state => 56, :bufsz => 288, :copy_stack => 296, :ctx => 80, :donenotify => 24, :eh => 72, :excstack => 64, :gcstack => 304, :logstate => 40, :next => 0, :prio => 62, :queue =>...
{"hexsha": "adbe2774fca45cfaaef3f11cc09816cd6e776b23", "size": 489, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/memlayout/linux-x86_64-v1_6_1.jl", "max_stars_repo_name": "TuringLang/Libtask.jl", "max_stars_repo_head_hexsha": "7c404c4823eab2088df8aa05862b72b0f2638358", "max_stars_repo_licenses": ["MIT"], "...
"""Unit tests for madis_io.py.""" import copy import unittest import numpy import pandas from gewittergefahr.gg_io import raw_wind_io from gewittergefahr.gg_io import madis_io from gewittergefahr.gg_utils import longitude_conversion as lng_conversion COLUMN_NAME = raw_wind_io.TIME_COLUMN COLUMN_NAME_ORIG = madis_io.T...
{"hexsha": "a76ff61fe8fbb285814374de6cdcca1709240d47", "size": 12946, "ext": "py", "lang": "Python", "max_stars_repo_path": "gewittergefahr/gg_io/madis_io_test.py", "max_stars_repo_name": "dopplerchase/GewitterGefahr", "max_stars_repo_head_hexsha": "4415b08dd64f37eba5b1b9e8cc5aa9af24f96593", "max_stars_repo_licenses": ...
#!/usr/bin/env python2 ############################################################################### # ------------------------- Description --------------------------------------- ############################################################################### # This script is designed to create a mask of stagnatio...
{"hexsha": "e0bfe32bd0dc2f5af846e397ed2b416a10b57143", "size": 8540, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/find_era_interim_stagnation_days.py", "max_stars_repo_name": "stevenjoelbrey/PMFutures", "max_stars_repo_head_hexsha": "8c6ba7576d6c3a1f0279ec8aff446478c495d184", "max_stars_repo_licenses":...
""" spaceprint() functions can draw a tree of AbstractDelayed objects in the terminal. """ module SpacePrint using Dates using DocStringExtensions export spaceprint function cornerchar(final::Bool)::String if final return "└" end return "├" end function fillerchar(final::Bool)::String if fin...
{"hexsha": "92181a2af91426d81873e140ef716e717e96085d", "size": 2688, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SpacePrint.jl", "max_stars_repo_name": "lhnguyen-vn/TreeParzen.jl", "max_stars_repo_head_hexsha": "d6b4181a45167663e8844330220f0c62c715c75f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
""" Valence, Coordination_number, Pi electron_num and c/r^2 representation (VCP) of atom in molecule, where c, r are the column and row number of the corresponding element in periodic table VCP is designed for prediction of melting & boiling points of molecule """ from openeye.oechem import * import aqml.cheminfo.O...
{"hexsha": "d26db9d212f2f31eef12892d0f9d3bb8912af61e", "size": 7556, "ext": "py", "lang": "Python", "max_stars_repo_path": "coreml/cml/representation/vcp.py", "max_stars_repo_name": "binghuang2018/aqml", "max_stars_repo_head_hexsha": "4901f3bd85db968fb3fc7ab97fd443421909d89d", "max_stars_repo_licenses": ["MIT"], "max_s...
using Statistics @testset "penalties" begin A = [-1 2; -3 4] lambda = 1 # 100% L2: alpha = 0 penalty = MLJFlux.Penalizer(lambda, alpha) @test penalty(A) ≈ 1 + 4 + 9 + 16 # 100% L1: alpha = 1 penalty = MLJFlux.Penalizer(lambda, alpha) @test penalty(A) ≈ 1 + 2 + 3 + 4 # no...
{"hexsha": "bbc677205d69e26c4d56e5694712fb196d7d6d93", "size": 967, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/penalized_losses.jl", "max_stars_repo_name": "john-waczak/MLJFlux.jl", "max_stars_repo_head_hexsha": "56a4d03fe87b15fb7672131aa0612510a9573559", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import numpy.testing as npt from .. import bs2051 from ..point_source import Triplet, VirtualNgon, StereoPanDownmix, PointSourcePanner, configure, AllocentricPanner from ..geom import cart, azimuth, PolarPosition from ..layout import Speaker import pytest def test_virtual(): positions = np.arra...
{"hexsha": "5393a7567ec7ee7dabba862ffde8347d57ee5930", "size": 17909, "ext": "py", "lang": "Python", "max_stars_repo_path": "ear/core/test/test_point_source.py", "max_stars_repo_name": "tomjnixon/ebu_adm_renderer", "max_stars_repo_head_hexsha": "625254a6430a4f6fc093bfd51802cfe8152dcb42", "max_stars_repo_licenses": ["BS...
/* * ResourceFactory.h * * Created on: 2012-06-10 * Author: leo */ #ifndef RESOURCEFACTORY_H_ #define RESOURCEFACTORY_H_ #include <fruitpunch/Resources/Resource.h> #include <boost/shared_ptr.hpp> #include <string> #include <map> namespace fp_core { /** * Allows clients to associate file extensions with ...
{"hexsha": "3b9f16e2be9b5cf8e6de95654d2c60ec3ad79d0e", "size": 2172, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "fp_core/src/main/include/fruitpunch/Resources/ResourceFactory.hpp", "max_stars_repo_name": "submain/fruitpunch", "max_stars_repo_head_hexsha": "31773128238830d3d335c1915877dc0db56836cd", "max_stars_...
program main !*****************************************************************************80 ! !! MAIN is the main program for FEM1D_HEAT_STEADY_PRB. ! ! Discussion: ! ! FEM1D_HEAT_STEADY_PRB tests the FEM1D_HEAT_STEADY library. ! ! Licensing: ! ! This code is distributed under the GNU LGPL license. ! ! Modi...
{"hexsha": "dcbae5fffe97c05028599271ec396c31023112fe", "size": 4153, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fem1d_heat_steady/fem1d_heat_steady_prb.f90", "max_stars_repo_name": "mjasher/computation", "max_stars_repo_head_hexsha": "63d83e476af5c6da5361a6bc8a7692372931a220", "max_stars_repo_licenses": [...
! { dg-do run } ! { dg-options "-std=gnu" } ! PR38439 I/O PD edit descriptor inconsistency ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org> character(len=25) :: str character(len=132) :: msg, line str = '(1pd24.15e6)' line = "initial string" x = 555.25 write (line...
{"hexsha": "1d677509e37e5a722e518c3691a5bf7e89d0a8fa", "size": 1058, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/fmt_error_9.f", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_license...
# -*- coding: utf-8 -*- """ computeKey computes a simple beat histogram Args: afAudioData: array with floating point audio data. f_s: sample rate afWindow: FFT window of length iBlockLength (default: hann) iBlockLength: internal block length (default: 4096 samples) iHopLength: internal ...
{"hexsha": "187eaad437f8e6adc98002a1bf4411f8e6da5232", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyACA/computeBeatHisto.py", "max_stars_repo_name": "ruohoruotsi/pyACA", "max_stars_repo_head_hexsha": "339e9395b65a217aa5965638af941b32d5c95454", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
function add!(n::NetworkP,extra::Extracellular) extra.v=zeros(Float64,length(n.t)) coeffs=Array(Extra_coeffs,0) for j=1:length(fieldnames(n.neur))-4 mycoeffs=add_extra(getfield(n.neur,j),extra) append!(coeffs,mycoeffs) end add_extra_(n,extra,coeffs) end function add!(n::Netw...
{"hexsha": "5e45ef5e2bae66241bd896362f9903af5861f38a", "size": 3989, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/parallel.jl", "max_stars_repo_name": "paulmthompson/JNeuron", "max_stars_repo_head_hexsha": "d6a389506e27df1955ac59eb08376795d20bb1b6", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
#!/usr/bin/env python # coding: utf-8 #copyRight by heibanke import numpy as np from matplotlib import pyplot as plt from scipy import interpolate x = np.linspace(0, 2*np.pi+np.pi/4, 10) y = np.sin(x) x_new = np.linspace(0, 2*np.pi+np.pi/4, 100) f_linear = interpolate.interp1d(x, y) para_bspline = int...
{"hexsha": "9cec45f86e05ea6c07e09582086976584f837e10", "size": 591, "ext": "py", "lang": "Python", "max_stars_repo_path": "misc/numpy_ex2.py", "max_stars_repo_name": "dineshkumar2509/learning-python", "max_stars_repo_head_hexsha": "e8af11ff0b396da4c3f2cfe21d14131bae4b2adb", "max_stars_repo_licenses": ["MIT"], "max_star...
Require Import Coq.Strings.String Coq.Vectors.Vector. Require Import Fiat.Common.SumType Fiat.Common.BoundedLookup Fiat.Common.ilist Fiat.Computation Fiat.QueryStructure.Specification.Representation.Notations Fiat.QueryStructure.Specification.Representati...
{"author": "proofskiddie", "repo": "CoqStuff", "sha": "fc8ecdf8045bc835bb10b2e4791f041d82451b5d", "save_path": "github-repos/coq/proofskiddie-CoqStuff", "path": "github-repos/coq/proofskiddie-CoqStuff/CoqStuff-fc8ecdf8045bc835bb10b2e4791f041d82451b5d/idontevnkno/src/BinEncoders/Env/Examples/UDP_Packet.v"}
program BasicImageTests use RCImageBasic use RCImageIO use RCImagePrimitive implicit none type(rgbimage) :: animage integer :: x, y call alloc_img(animage, 200, 200) call fill_img(animage, rgb(255,255,255)) call draw_line(animage, point(0,0), point(199,199), rgb(0,0,0)) do y=0,219,20 call ...
{"hexsha": "f9973d82d7a04f399e7863d3f579ecbbbf930f9e", "size": 562, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Task/Bitmap-Bresenhams-line-algorithm/Fortran/bitmap-bresenhams-line-algorithm-2.f", "max_stars_repo_name": "mullikine/RosettaCodeData", "max_stars_repo_head_hexsha": "4f0027c6ce83daa36118ee8b67915...
__author__ = 'john' from astropy import units as u from astropy import constants as const import math class AstroPhysics: sun_absolute_magnitude = 4.77 def __init__(self): pass def getParsecFromParalex(self, plx): return 1 / plx def getAbsoluteMagnitudeFromParalex(self, vMag, plx):...
{"hexsha": "da1990ed5da333a2d1bc766d70dc11d55ec71d6a", "size": 1617, "ext": "py", "lang": "Python", "max_stars_repo_path": "LightCurves/LightCurve/helpers/astrophysics.py", "max_stars_repo_name": "TohoMonster/LightCurves", "max_stars_repo_head_hexsha": "a941af9eb50ef4ebd06bbfb8028630244a85e783", "max_stars_repo_license...
import cv2 from darkflow.net.build import TFNet import numpy as np import time import tensorflow as tf config = tf.ConfigProto(log_device_placement=True) config.gpu_options.allow_growth = True with tf.Session(config=config) as sess: options = { 'model': 'cfg/yolov2-1c.cfg', 'load...
{"hexsha": "29407adb5cae3d379cb142206c99d917a86a4530", "size": 1378, "ext": "py", "lang": "Python", "max_stars_repo_path": "Computer vision/yolov2_custom_object_cam.py", "max_stars_repo_name": "zbs881314/Deep-Learning-and-Computer-Vision", "max_stars_repo_head_hexsha": "a5965ea1562d2adbba381d3e411ad2b0a7a14d30", "max_s...
from __future__ import absolute_import, division, print_function, unicode_literals import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import tensorflow_datasets as tfds import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from src.data import ...
{"hexsha": "336871871e8b4f3c1229f3edefdd87b3bd47e150", "size": 2802, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/embeddings.py", "max_stars_repo_name": "Aelvangunduz/phd_code", "max_stars_repo_head_hexsha": "b8dc7d8cfe647e791820519ff51f10d9b0f42845", "max_stars_repo_licenses": ["FTL"], "max_stars_...
\subsection{The Aggregate Demand - Aggregate Supply (AD-AS) model}
{"hexsha": "f172459cfd9ec378823564370e0cc05aa98d5e59", "size": 70, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/pug/theory/economics/neoKeynesian/03-03-AD-AS.tex", "max_stars_repo_name": "adamdboult/nodeHomePage", "max_stars_repo_head_hexsha": "266bfc6865bb8f6b1530499dde3aa6206bb09b93", "max_stars_repo_lice...
import socketserver as ss import socket import json import numpy as np from display_util import print_error, print_info, print_notification, print_warning def get_local_ip(): """Finds the localhost ip address used for connecting to the LAN.""" hostname = socket.gethostname() ip = socket.gethostbyname(hos...
{"hexsha": "c509e50367856acfdce7579dac12e256fb7aa163", "size": 1243, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyCharm/TCP_Socket_Chatroom/depth_video_streaming/web_socket_util.py", "max_stars_repo_name": "iggy12345/emerson_seed_object_detection", "max_stars_repo_head_hexsha": "121c6fe55fb4c903cb2c05f12077...
[STATEMENT] lemma foundation6: "\<tau> \<Turnstile> P \<Longrightarrow> \<tau> \<Turnstile> \<delta> P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<tau> \<Turnstile> P \<Longrightarrow> \<tau> \<Turnstile> \<delta> P [PROOF STEP] by(simp add: OclNot_def OclValid_def true_def false_def defined_def ...
{"llama_tokens": 152, "file": "Featherweight_OCL_UML_Logic", "length": 1}
#赋值 import torch import numpy as np a = torch.arange(24).reshape(2,3,4) """1、basic, 可以赋值, 可以广播赋值 """ a[1,2] = 100 # 下一维度自动广播 a[1, 2, 3] = 1000 # 没有广播 print("basic\n", a) print("-"*20) """2、选择多个, 这里的0, 1表示该维度以及下一维度是否选择""" b = torch.from_numpy(np.array([[0,0,0], [0,0,0]])) b = b.type(torch...
{"hexsha": "387530e5f4a77bc69209999adc1a4906ce798624", "size": 767, "ext": "py", "lang": "Python", "max_stars_repo_path": "script_python/learn/how_to_assign_an_array.py", "max_stars_repo_name": "yunshangyue71/mycodes", "max_stars_repo_head_hexsha": "54b876004c32d38d9c0363fd292d745fee8dff3c", "max_stars_repo_licenses": ...
# -*- coding: utf-8 -*- """ @author: syahr """ import gc import sys import csv import glob import os import pandas as pd import traceback from os.path import basename, dirname from datetime import datetime from pkg_resources import resource_filename import argparse from PyQt5.QtWidgets import QApplication, QFileDialo...
{"hexsha": "59b0691659bda5f3d7ecf3e369c81110f7c8405c", "size": 62354, "ext": "py", "lang": "Python", "max_stars_repo_path": "octavvs/mcr_als.py", "max_stars_repo_name": "S73ph4n/octavvs", "max_stars_repo_head_hexsha": "adbfa3f489b1928281a55de640c64d20afb4f9e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/env python3 """ Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ from queue import Queue from typing import Dict, List, Optional, Tuple import numpy as np import torch import torch.nn...
{"hexsha": "8d4f4b20e9f52f08d1461dc6405cdfebae65b1f0", "size": 2917, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "yutingye/FRL-Distributed-ML-Scaffold", "max_stars_repo_head_hexsha": "717e46bef2be17e9e4ef9e542a8d7d10669950b4", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma (in Ring) coprime_n_idealsTr0:"\<lbrakk>ideal R A; ideal R B; ideal R C; coprime_ideals R A C; coprime_ideals R B C \<rbrakk> \<Longrightarrow> coprime_ideals R (A \<diamondsuit>\<^sub>r B) C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>ideal R A; ideal R B; idea...
{"llama_tokens": 4771, "file": "Group-Ring-Module_Algebra5", "length": 15}
import numpy as np import utils from collections import defaultdict # ==================================================================================================================== # Read data in format of array (n_samples, n_features) # =========================================================================...
{"hexsha": "1f3bab8d203fda71b1af6f4ce98620a9941e0782", "size": 1743, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/causality/randomExperiments/evaluatorUsage.py", "max_stars_repo_name": "AnverK/VK_Graduation", "max_stars_repo_head_hexsha": "a8d457d1fcb677d417a5ea82011393160762c0b1", "max_stars_repo_license...
""" Este módulo contém as funções comuns para equações diferenciais parciais em estados estacionários. """ import numpy as np def set_u(x, y, bound_x0, bound_xf, bound_y0, bound_yf): """Inicializa a matriz 'u' com as condições de contorno.""" u = np.empty((x.size, y.size)) u[0, :] = bound_x0 u[-1, :...
{"hexsha": "f0b4766f5b68df479ff545f34c438800302e546c", "size": 394, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdepy/steady.py", "max_stars_repo_name": "OliverTso/PDE", "max_stars_repo_head_hexsha": "b65fd92f0d62d4160ef93e2a29762025ba869012", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "max_s...
[STATEMENT] lemma partial_evaluation_is_saturated : assumes "saturated_binary_rule resolvent S" shows "saturated_binary_rule ordered_resolvent (partial_evaluation S C)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. saturated_binary_rule ordered_resolvent (partial_evaluation S C) [PROOF STEP] proof (rule ccontr...
{"llama_tokens": 7165, "file": "PropResPI_Prime_Implicates", "length": 63}
#!/usr/bin/env python # encoding: utf-8 # # This file is part of pydc1394. # # pydc1394 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later v...
{"hexsha": "e0820c853714eb2f4ae60e35c65b3fc3aceb5fc1", "size": 38667, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydc1394/camera.py", "max_stars_repo_name": "joristork/milovision", "max_stars_repo_head_hexsha": "aeb09b9c75f7bc0900cb513079bbe08b3c439bbc", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import CommutativeRings: pseudo_ideal @testset "basics" begin R = ZZ{Int} RX = R[:x] RYZ = R[:y,:z] @test iszero(Ideal(0)) @test isone(Ideal(-1)) @test Ideal(15, 21) == Ideal(3) @test Ideal([3, 5]) == R @test R == Ideal(-1) @test Ideal(3, ZZ(15)) == Ideal(3) x, = generators(RX...
{"hexsha": "4c3a1bf43fd95fca59d19b19a1a034cfc2f188de", "size": 1898, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ideal.jl", "max_stars_repo_name": "KlausC/CommutativeRings.jl", "max_stars_repo_head_hexsha": "2b6027c126b90f61bbad4ea230a34367522c3e52", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Olivia Model for studying the vulnerability of package dependency networks. Olivia stands for 'Open-source Library Indexes Vulnerability Identification and Analysis'. Includes tools for the analysis of package dependency networks vulnerability to failures and attacks. """ import networkx as nx import gzip import ...
{"hexsha": "b1c60eeb789485cc5ea2a811fea0fb93d06bef71", "size": 9093, "ext": "py", "lang": "Python", "max_stars_repo_path": "olivia/model.py", "max_stars_repo_name": "dsr0018/olivia", "max_stars_repo_head_hexsha": "8b7de3a512848c5d313bbc848ac9c7b667c2f6ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import numpy as np import logging from mtrack.evaluation.dda3 import DDA3 from mtrack.graphs import G1 from mtrack.preprocessing import g1_to_nml logger = logging.getLogger(__name__) class VoxelSkeleton(object): def __init__(self, g1_cc, voxel_size, subsample=1): """ Interpolate a g1 graph connec...
{"hexsha": "154a1edea112f0bffc6e617a5ebacd2ef163b478", "size": 5208, "ext": "py", "lang": "Python", "max_stars_repo_path": "mtrack/evaluation/voxel_skeleton.py", "max_stars_repo_name": "nilsec/mtrack", "max_stars_repo_head_hexsha": "76652c468417c7e3ac9903586c0127b884d6b032", "max_stars_repo_licenses": ["MIT"], "max_sta...
import gensim import pickle import os import data import numpy as np import argparse import tensorflow as tf from transformers import BertTokenizer, TFBertModel from tqdm import tqdm import time parser = argparse.ArgumentParser(description='The Embedded Topic Model') ### data and file related arguments parser.add_arg...
{"hexsha": "6173b3fd0c37a5993f30c43ecf956540e95e61fc", "size": 2929, "ext": "py", "lang": "Python", "max_stars_repo_path": "bert.py", "max_stars_repo_name": "jdenes/ETM", "max_stars_repo_head_hexsha": "dda02ce65e1d7ef22fbc0a869e6f91833adf8244", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_rep...
import numpy as np from growth_procs import unit_sample_on_sphere,\ direction_to,\ normalize_length,\ get_entity,\ prepare_next_front L_NORM=2.0 def extend_front(front,seed,constellation) : # attract by a different neuron, get information other_entities = get_entity("substance_x",constell...
{"hexsha": "2fe7ef59d96d9197eb69533ebb4693c34fde9802", "size": 827, "ext": "py", "lang": "Python", "max_stars_repo_path": "hackathon/HePing/neuromac-master/examples/update_environment/Attracted_by.py", "max_stars_repo_name": "zzhmark/vaa3d_tools", "max_stars_repo_head_hexsha": "3ca418add85a59ac7e805d55a600b78330d7e53d"...
\documentclass[output=collectionpaper]{langsci/langscibook} \ChapterDOI{10.5281/zenodo.3462772} \title{Gender typology and gender (in)stability in Hindu Kush Indo-Aryan languages} \shorttitlerunninghead{Gender in Hindu Kush Indo-Aryan} \author{Henrik Liljegren\affiliation{Stockholm University}} \abstract{This paper ...
{"hexsha": "aa0971e3242f7be883ef74be683c45a2f89c745b", "size": 111534, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/10.tex", "max_stars_repo_name": "langsci/223", "max_stars_repo_head_hexsha": "ea6237c615cb72a22455fdf221866093c7c5b5c3", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": null,...
__precompile__() """ $(DocStringExtensions.README) """ module ParameterizedFunctions using DocStringExtensions using DataStructures, DiffEqBase, Latexify using Reexport @reexport using ModelingToolkit using ModelingToolkit: Sym, FnType, tosymbol import LinearAlgebra import Base: getindex include("od...
{"hexsha": "aa2c1a6c6cc9055fb04728963a3245a01149fd2c", "size": 1968, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ParameterizedFunctions.jl", "max_stars_repo_name": "anandijain/ParameterizedFunctions.jl", "max_stars_repo_head_hexsha": "f71ef21b75a246ae3aaae0c4325d40ca0e6f899e", "max_stars_repo_licenses": [...
""" Adjust weekday effects via Poisson model. """ # third party import cvxpy as cp import numpy as np from sklearn.model_selection import LeaveOneOut class Weekday: """Class to handle weekday effects.""" @staticmethod def get_params(sig, lam=10): """ Estimate the fitted parameters of th...
{"hexsha": "0e5481bd7d0627c32167e71d3fb9957eede07a0f", "size": 4752, "ext": "py", "lang": "Python", "max_stars_repo_path": "case_deconv/code/weekday.py", "max_stars_repo_name": "dfarrow0/covidcast-nowcast", "max_stars_repo_head_hexsha": "8d9dfc56c643c4f47b72a58dc3e8811ddeb1a6c8", "max_stars_repo_licenses": ["MIT"], "ma...
#include <boost/filesystem.hpp> #include "KAI/Core/File.h" #include "KAI/Core/Object.h" #include "KAI/Core/Exception.h" using namespace boost::filesystem; using namespace std; KAI_BEGIN namespace File { namespace fs = boost::filesystem; // return a vector of all files that have the given extension, startin...
{"hexsha": "445bd249b784bce7edfd9f435aa2e5568173f493", "size": 2097, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Source/Library/Core/Source/File.cpp", "max_stars_repo_name": "cschladetsch/KAI", "max_stars_repo_head_hexsha": "b7078bc73817f0f76805c9330dbaf45584d86a22", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (c) 2021 Mira Geoscience Ltd. # # This file is part of geoapps. # # geoapps is distributed under the terms and conditions of the MIT License # (see LICENSE file at the root of this source code package). from __future__ import annotations from typing import Any from uuid import UUID import numpy as np...
{"hexsha": "0df8e11e89a38a1c6707cfe911566892719359e1", "size": 13719, "ext": "py", "lang": "Python", "max_stars_repo_path": "geoapps/io/validators.py", "max_stars_repo_name": "MiraGeoscience/geoapps", "max_stars_repo_head_hexsha": "74568414f8eb7342ad68473e2edc3a799f2fdca4", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np from pathlib import Path import codecs import pysrt from matplotlib import pyplot as plt """ All thresholds """ TRANSCRIPT_DELAY = 0 # 6 for unaligned videos MIN_TRANSCRIPT = 0.3 MIN_BLACKFRAME = 0.99 MIN_BLACKWINDOW = 1 MIN_BLANKWINDOW = 30 MAX_BLANKWINDOW = 270 MIN_LOWERTEXT = 0.5 MIN_LOWERWI...
{"hexsha": "5b8eb0356edecf8cf501330a0b4ce9cf2d71bf97", "size": 16488, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/esper/commercial_detection.py", "max_stars_repo_name": "scanner-research/esper-tv", "max_stars_repo_head_hexsha": "179ef57d536ebd52f93697aab09bf5abec19ce93", "max_stars_repo_licenses": ["Apac...
import numpy as np import tensorflow as tf from tensorflow import keras # define iou or jaccard loss function def iou_loss (y_true, y_pred): y_true = tf.reshape (y_true, [-1]) y_pred = tf.reshape (y_pred, [-1]) intersection = tf.reduce_sum (y_true * y_pred) score = (intersection + 1.) / (tf.reduce_s...
{"hexsha": "7e1bcbf16c45c4988a5a4d6e9bc68f37aa6f0a36", "size": 1088, "ext": "py", "lang": "Python", "max_stars_repo_path": "resources/Object Detection/train.py", "max_stars_repo_name": "miladlink/Streamlit_Flask", "max_stars_repo_head_hexsha": "23340eeab192f0ccae9a6cc03f7eb9b7b8985f6a", "max_stars_repo_licenses": ["MIT...
import os import random from tqdm import trange from scipy.misc import imsave import tensorflow as tf import numpy as np from generator import Generator from discriminator import Discriminator from utils import logger class HistoryQueue(object): def __init__(self, shape=[128,128,3], size=50): self._size...
{"hexsha": "f47c599e70952a607daa7f3f5349ed470926d523", "size": 10606, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "ngc92/CycleGAN-Tensorflow", "max_stars_repo_head_hexsha": "cd3cf625c1b81581bbf8a7ca821eb50b6f681311", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24,...
# This method give you 0.6924224, adn 75% of confidence. import fcntl import time import numpy as np import pandas as pd import xgboost as xgb from sklearn.metrics import log_loss # random search # Best: 0.509408 using {'subsample': 0.7, 'reg_alpha': 0.005, 'n_estimators': 100, 'min_child_weight': 5, 'max_depth': 3, ...
{"hexsha": "7a332ab42b599ed4e11895623f883eb2f2ce3264", "size": 4164, "ext": "py", "lang": "Python", "max_stars_repo_path": "XGBoost_method.py", "max_stars_repo_name": "Nawter/numer.ai", "max_stars_repo_head_hexsha": "5a07fe8bf10eb8bdbbaea1e0ab20940d6fbc21af", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
20080808 19:14:12 nbsp How about adding a link or two to other pages on the wiki so that this page is less of a dead end? Users/JasonAller
{"hexsha": "edef0cd6b39dcc38b49413107936396fcd6a3911", "size": 140, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/JasonHammons.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
eltype_or(::Type{G}, or) where G <: (AbstractGeometry{N, T} where N) where T = T eltype_or(::Type{G}, or) where G <: (AbstractGeometry{N, T} where {N, T}) = or ndims_or(::Type{G}, or) where G <: (AbstractGeometry{N, T} where T) where N = N ndims_or(::Type{G}, or) where G <: (AbstractGeometry{N, T} where {N, T}) = or ...
{"hexsha": "33c74dd27c0a101b987646785fc9edaa61a294e8", "size": 2679, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "jw3126/GeometryBasics.jl", "max_stars_repo_head_hexsha": "3c4d3da2b93f11adab85f0d4d0c6051e9fe5625a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 81...
import numpy as np import pandas as pd import os import time import shutil from numpy import array from numpy import argmax from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder import indoor_location.getWordVector as getWordVector import indoor_location.globalConfig as globalCo...
{"hexsha": "ab8fe26243e8e560fb1a3a00168d50894888c1f1", "size": 21121, "ext": "py", "lang": "Python", "max_stars_repo_path": "indoor_location/dataProcess.py", "max_stars_repo_name": "WQAQs/keras-bert", "max_stars_repo_head_hexsha": "17a08c2b727eda7381bc815b0983ca27021f5041", "max_stars_repo_licenses": ["MIT"], "max_star...
module adjtest_obs !$$$ module documentation block ! . . . . ! module: adjtest_obs ! prgmmr: Syed RH Rizvi, NCAR/NESL/MMM/DAS ! ! abstract: Performs adjoint test for linear observation operator ! ! program history log: ! 2012-09-14 Rizvi, NCAR/NESL/MMM/DAS -...
{"hexsha": "67e2ff0cdd84978c84fbce36a860a6238fbf2085", "size": 5793, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "GEOSaana_GridComp/GSI_GridComp/adjtest_obs.f90", "max_stars_repo_name": "GEOS-ESM/GEOSana_GridComp", "max_stars_repo_head_hexsha": "cf33607613754313a2383bb7e7b3d29c856b9daf", "max_stars_repo_lic...
import threading import time import os import logging from scipy.spatial.distance import euclidean #import numpy as np #from peon import BlockTypes log = logging.getLogger(__name__) def start_afk_thread(bot): def do_afk_thread(bot, pid): i = 0 while True: if time.time() - bot.last_ke...
{"hexsha": "087d22dd14f3ea8d36af9fa2aed9674c78d8e457", "size": 2354, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Rexkh/mcpython", "max_stars_repo_head_hexsha": "31a4af448d740b4625556ceb927f514717de266a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 30, "max_stars_...
mutable struct Lorentz σ::Float64 ρ::Float64 β::Float64 x::Float64 y::Float64 z::Float64 end function step!(l::Lorentz, dt::Float64) dx = l.σ*(l.y - l.x) dy = l.x*(l.ρ - l.z) - l.y dz = l.x*l.y - l.β*l.z l.x += dt*dx l.y += dt*dy l.z += dt*dz end attractor = Lorentz(10....
{"hexsha": "4162d423a8a4a247849c870ddcfc5d850605ef10", "size": 729, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "slides2021/day3/lorentz.jl", "max_stars_repo_name": "oist/skillpill-julia", "max_stars_repo_head_hexsha": "eb719677ae84bd26c1e3fdb889cf2b54f65d47ae", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
function solve_boundary_condition(ω::T, k_eff::Complex{T}, eigenvectors::Array{Complex{T}}, psource::PlaneSource{T,2,1,Acoustic{T,2}}, material::Material{2,Halfspace{T,2}}; basis_order::Int = 2, kws... ) where T if size(eigenvectors)[end] > 1 @warn "The effective wavenumber: $k_eff has ...
{"hexsha": "b4429bad88717dfe2b7f55a40116b96200541a58", "size": 5525, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/acoustics/effective_wave/planewaves/boundary_condition.jl", "max_stars_repo_name": "JuliaWaveScattering/EffectiveWaves.jl", "max_stars_repo_head_hexsha": "6c11a212761934e72f691ad19b29cf2f8d426e...
import matplotlib import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator import numpy as np import openmdao.api as om from mach import MachSolver from motor_current import MotorCurrent num_magnets_true = 40 num_magnets = 40 mag_pitch = num_magnets // num_magnets_true num...
{"hexsha": "9e4ef900c91308a46d4fea2a68533191f357dd9c", "size": 8273, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_motor_ac_loss.py", "max_stars_repo_name": "tuckerbabcock/MotorModel", "max_stars_repo_head_hexsha": "3eef2a855594daa330b63aca651d918bd4cfbe46", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
export L2Loss, Regularization, LogLikeLoss, prior_loss struct Regularization{L,P} <: DiffEqBase.DECostFunction λ::L penalty::P end Regularization(λ) = Regularization{typeof(λ),typeof(L2Penalty())}(λ,L2Penalty()) function (f::Regularization)(p) f.λ*value(f.penalty, p) end function prior_loss(prior,p) ll = 0.0...
{"hexsha": "619b1bf4fa50cf58fe1dde977052c44325617946", "size": 5358, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/cost_functions.jl", "max_stars_repo_name": "Vaibhavdixit02/DiffEqParamEstim.jl", "max_stars_repo_head_hexsha": "d68ac5e139eb1005064d1b5f404870c008889d03", "max_stars_repo_licenses": ["MIT"], "m...
% !Mode:: "TeX:UTF-8" \chapter{The Theory of FDTD} \section{Yee Cell} Maxwell's equations are a set of equations which can be written in differential form or integral form. They are the foundation of macroscopic electromagnetic phenomenas. There are two kinds of numerical solver to Maxwell's equation. One kind of solv...
{"hexsha": "47ba941c2a9b8dc17dc11ccdc1d14cb4674c711c", "size": 22593, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "latex-en/chapters/chapter2.tex", "max_stars_repo_name": "obserthinker/bachelorgraduatethesis", "max_stars_repo_head_hexsha": "445351447c95a48b5f8af4b1081c3dcf0018045c", "max_stars_repo_licenses": [...
[STATEMENT] lemma closed_segment_eq_sing: "closed_segment a b = {c} \<longleftrightarrow> a = c \<and> b = c" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (closed_segment a b = {c}) = (a = c \<and> b = c) [PROOF STEP] by auto
{"llama_tokens": 96, "file": null, "length": 1}
#!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np import math z_one = None z_two = None def without_resampling(): # Plot the axes in grey. plt.axhline(linewidth=1, color='#bbbbbb') plt.axvline(linewidth=1, color='#bbbbbb') # The X domain here is modeled with 100 sample frames ...
{"hexsha": "0f6a3825e0c69fad18283c046a3b4a733d55e26a", "size": 4149, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots/resampling.py", "max_stars_repo_name": "nick-thompson/neuro", "max_stars_repo_head_hexsha": "fa06f1de6bb38279ea360ebc19057bb2e39e5665", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np nx,ny,nr,nt=50,100,30,1 # double prec ieee-be wt64 = np.ones((nt,nr,ny,nx),dtype='>f8') wt64.tofile('ones_64b.bin')
{"hexsha": "cdbde599d04994887729d210f6130e34dc60252f", "size": 137, "ext": "py", "lang": "Python", "max_stars_repo_path": "verification/isomip/input_ad/genweights.py", "max_stars_repo_name": "mitgcm/mitgcm", "max_stars_repo_head_hexsha": "20a156cdcefcb000006123cf7ddac8fc997cb603", "max_stars_repo_licenses": ["MIT"], "m...
Require Import bigstep. Require Import coinduction. Require Import datatypes. Require Import MminusNoo. Require Import Ndiv2oo. Require Import streams_vs_lists. Require Import UndefNoo. (* Function undef(n) = undefined for any n Example machine: 1 1 -> 1 R 1 B -> 2 1 2 1 -> 2 L 2 B -> 1 1 ...
{"author": "asr", "repo": "tm-coinduction", "sha": "599083b74ffdf0c1032c5c2495fef9bf23a4058c", "save_path": "github-repos/coq/asr-tm-coinduction", "path": "github-repos/coq/asr-tm-coinduction/tm-coinduction-599083b74ffdf0c1032c5c2495fef9bf23a4058c/animation/examples/UndefNoo_unguarded.v"}
function [K, sK] = indexKernCompute(kern, x, x2) % INDEXKERNCOMPUTE Compute the INDEX kernel given the parameters and X. % FORMAT % DESC computes the kernel parameters for the index based covariance function % kernel given inputs associated with rows and columns. % ARG kern : the kernel structure for which the matrix ...
{"author": "SheffieldML", "repo": "GPmat", "sha": "4b5914a38ecbad9fb7a13a3392970bfc28c9d911", "save_path": "github-repos/MATLAB/SheffieldML-GPmat", "path": "github-repos/MATLAB/SheffieldML-GPmat/GPmat-4b5914a38ecbad9fb7a13a3392970bfc28c9d911/kern/indexKernCompute.m"}
#!/usr/bin/env python # Copyright 2020 The PySCF Developers. 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...
{"hexsha": "6a6c0cea0310c3fc9d5d8eff122255f3728bc118", "size": 57033, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/solvent/_ddcosmo_tdscf_grad.py", "max_stars_repo_name": "QuESt-Calculator/pyscf", "max_stars_repo_head_hexsha": "0ed03633b699505c7278f1eb501342667d0aa910", "max_stars_repo_licenses": ["Apac...
import numpy as np import pytest from pandas import ( DataFrame, DatetimeIndex, PeriodIndex, Series, date_range, period_range, ) import pandas._testing as tm class TestToPeriod: def test_to_period(self): rng = date_range("1/1/2000", "1/1/2001", freq="D") t...
{"hexsha": "bc4053a313da41851ff3be671f5524af25056831", "size": 1811, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/pandas/tests/series/methods/test_to_period.py", "max_stars_repo_name": "OliviaNabbosa89/Disaster_Responses", "max_stars_repo_head_hexsha": "1e66d77c303cec685dfc2ca94f4fca4cc...
C * * * * * * * * * * * * * * * * * * * * * * * * * C --- DRIVER FOR RADAU5 ON E5 PROBLEM C * * * * * * * * * * * * * * * * * * * * * * * * * IMPLICIT REAL*8 (A-H,O-Z) C --- PARAMETERS FOR RADAU5 (FULL JACOBIAN) PARAMETER (ND=4,LWORK=4*ND*ND+12*ND+20,LIWORK=3*ND+20) DIMENSION Y(ND),WORK(LWORK),I...
{"hexsha": "c738539dd310c490e3c20af963b6d0a4cbe7b114", "size": 2797, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "tests/e5_radau5.f", "max_stars_repo_name": "cpmech/hwode", "max_stars_repo_head_hexsha": "7a6c033ace96b8b8dcf564ba0f38dd501fe2f60d", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count":...
#include <boost/test/unit_test.hpp> #include "Werk/Utility/Counter.hpp" BOOST_AUTO_TEST_SUITE(CounterTest) BOOST_AUTO_TEST_CASE(TestAdd) { Werk::Counter<> c; BOOST_REQUIRE_EQUAL(c.value(), 0); c.increment(); BOOST_REQUIRE_EQUAL(c.value(), 1); c.increment(); BOOST_REQUIRE_EQUAL(c.value(), 2); c.reset(); ...
{"hexsha": "beddc81618ef8c73374041af8c1ce2cbfdbc5c99", "size": 970, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/WerkTest/Utility/Counter.cpp", "max_stars_repo_name": "mish24/werk", "max_stars_repo_head_hexsha": "2f8822842fb8f68a4402775d1d3b41021b5a9945", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from numpy import array from pybimstab.bim import BlocksInMatrix slopeCoords = array([[0, 1, 1, 0, 0], [0, 0, 1, 1, 0]]) bim = BlocksInMatrix(slopeCoords=slopeCoords, blockProp=0.5, tileSize=0.1, seed=123) fig = bim.plot()
{"hexsha": "2f6ad990f5eab337242a7bdb70854df384b54463", "size": 244, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/figuresScripts/bim_example1.py", "max_stars_repo_name": "eamontoyaa/pybimstab", "max_stars_repo_head_hexsha": "ca13d23379c60453e1df53c6d3849902e3c600e0", "max_stars_repo_licenses": ["BSD-2...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
{"hexsha": "f90bbb3dac44a11935db7b2d98ef8df6192802d2", "size": 1127, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/oecd/regional_demography/clean_geos_resolved_to_dict.py", "max_stars_repo_name": "eftekhari-mhs/data", "max_stars_repo_head_hexsha": "af6dd910be966a657878a68b5a6e7d07342f78a3", "max_stars_...
import numpy as np import pylab as pl from numpy import pi, sin, cos # *************************************************** # # TEST 102 # # *************************************************** eps = 1.e-1 m = 2 ; n = 1 f = lambda y : sin( n*pi * ( 4*y*(1-y) ) ) df = lambda y : (-4*pi*n*y + 4*pi...
{"hexsha": "d570b2ed9d88b7f8ecd775fdc0f1c4bfc6d69fe6", "size": 2514, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/manual/include/approximation/anidiff_tests_potential.py", "max_stars_repo_name": "NegriLuca/pigasus", "max_stars_repo_head_hexsha": "d5057b771f81cfa05bb08ea4b0fd99088150cd7a", "max_stars_repo_...
from types import SimpleNamespace from enum import Enum import logging import numpy as np import cv2 from .detector import SSDDetector, YOLODetector, PublicDetector from .feature_extractor import FeatureExtractor from .tracker import MultiTracker from .utils import Profiler from .utils.visualization import Visualizer ...
{"hexsha": "165a9874d0385470e145a055d17a1065b52e639f", "size": 8810, "ext": "py", "lang": "Python", "max_stars_repo_path": "fastmot/mot.py", "max_stars_repo_name": "6DammK9/FastMOT", "max_stars_repo_head_hexsha": "ff5febf4f4bac576db6e5846479bdc0891fa740b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
tests = ["testini.jl", "testhttp.jl", "testsimple.jl", "testmerge.jl"] for test in tests include(test) end outfile = joinpath(@__DIR__, "confs", "out.conf") if isfile(outfile) rm(outfile) end
{"hexsha": "377cffa6f3e783dc515a9f8e0af9d9ba1d8be270", "size": 229, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ConfParser.jl-88353bc9-fd38-507d-a820-d3b43837d6b9", "max_stars_repo_head_hexsha": "0b00cacf5e8eaca477ef85cf95c967214184f4cb...
[STATEMENT] lemma less_restrictive_complete: assumes "less_restrictive R1 R2" assumes "Complete R2" shows "Complete R1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Complete R1 [PROOF STEP] using assms less_restrictive_saturated Complete_def [PROOF STATE] proof (prove) using this: less_restrictive R1 R2 Comp...
{"llama_tokens": 255, "file": "PropResPI_Propositional_Resolution", "length": 2}
# -*- coding: utf-8 -*- """ Created on Tue May 22 11:29:02 2018 @author: YSu """ from __future__ import division from sklearn import linear_model from statsmodels.tsa.arima_model import ARIMA from statsmodels.tsa.stattools import acf, pacf from statsmodels.tsa.api import VAR, DynamicVAR import pandas as pd import matp...
{"hexsha": "3f72d49886348dc79f8cb1af9fbb39be85a62010", "size": 11514, "ext": "py", "lang": "Python", "max_stars_repo_path": "Stochastic_engine/Synthetic_weather/Validation.py", "max_stars_repo_name": "romulus97/HYDROWIRES", "max_stars_repo_head_hexsha": "115e534764d8f58d64340d99cf6cb8eb6598c4ee", "max_stars_repo_licens...
#!/usr/bin/env python """ Import lybraries """ from __future__ import print_function import os import os.path import datetime import sys import argparse import time import serial import serial.tools.list_ports import struct import numpy import matplotlib.pyplot as plt from enum import Enum from threading import Threa...
{"hexsha": "2c593fc3221ad5ac4fa07fcb6900bc7698b52638", "size": 6360, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_DataLogger/src/test.py", "max_stars_repo_name": "jonra1993/BLDC_Speed_Control", "max_stars_repo_head_hexsha": "6c211660e829966f5e4943b90ad16840d91b7671", "max_stars_repo_licenses": ["MIT"],...
import os import sys from compute import Config_ini curPath = os.path.abspath(os.path.dirname(__file__)) rootPath = os.path.split(curPath)[0] sys.path.append(os.path.split(rootPath)[0]) from algs.genetic_CNN.utils import Utils from algs.genetic_CNN.genetic.statusupdatetool import StatusUpdateTool from comm.log impor...
{"hexsha": "1bfa7e179d5c06bfdb181b50be85d4791c8f35b6", "size": 5507, "ext": "py", "lang": "Python", "max_stars_repo_path": "BenchENAS_python_package/algs/genetic_CNN/main.py", "max_stars_repo_name": "benchenas/BenchENAS", "max_stars_repo_head_hexsha": "776cd1dd035d73c4af369d0106d010b932f64782", "max_stars_repo_licenses...
import os import json import datetime import pandas as pd import numpy as np import matplotlib.pyplot as plt year_join=2015 month_join=10 def timeAddition(df,timestamp): year=[timeConversion(x).split("-")[0] for x in df[str(timestamp)]] month=[timeConversion(x).split("-")[1] for x in df[str(timestamp)]] ...
{"hexsha": "834d266dd6d978a964256711178617441978e243", "size": 5237, "ext": "py", "lang": "Python", "max_stars_repo_path": "post.py", "max_stars_repo_name": "ujjaldas132/facebook-User-Information", "max_stars_repo_head_hexsha": "eb65e2b098313328bfc83c531f7619a96353e06b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) (* \VV/ **************************************************************) (* // * Th...
{"author": "mattam82", "repo": "Coq-misc", "sha": "60bc3cbe72083f4fa1aa759914936e4fa3d6b42e", "save_path": "github-repos/coq/mattam82-Coq-misc", "path": "github-repos/coq/mattam82-Coq-misc/Coq-misc-60bc3cbe72083f4fa1aa759914936e4fa3d6b42e/theories/Reals/RiemannInt_SF.v"}
import numpy as np import colorsys def get_colors(n): hue = np.arange(0., 360., 360. / n) / 360 lightness = (50 + 10 * np.random.rand(n)) / 100 saturation = (90 + 10 * np.random.rand(n)) / 100 return list(zip(hue, lightness, saturation)) def get_colors_rgb(n): return [colorsys.hls_to_rgb(*hls) for...
{"hexsha": "6962230ac3cee1dddf9b5abfeb46f4091691e89a", "size": 1080, "ext": "py", "lang": "Python", "max_stars_repo_path": "filigree/colors.py", "max_stars_repo_name": "Sweetblood22/filigree", "max_stars_repo_head_hexsha": "f80e7f04e0bbf3e99887c0d52bf4cccd04fc4ce4", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
from . import _utils as utils from ._libs import (string_funcs as _sf, math as _math) import re import numpy as np from numpy import nan, ndarray from typing import (Union, Dict, List, Optional, Tuple, Callable, overload, NoReturn, Set, Iterable, Any, TypeVar, Type, Generator) f...
{"hexsha": "0a0a657799a250da01f1d247aecc05ea7a59f546", "size": 26422, "ext": "py", "lang": "Python", "max_stars_repo_path": "dexplo/_strings.py", "max_stars_repo_name": "dexplo/dexplo", "max_stars_repo_head_hexsha": "2a522437d3bf848260f9772e7a8f705f534c2e2c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
import numpy as np import RPi.GPIO as GPIO import datetime,time,os calibration = 0.2 pin = 23 sleep_time = 58.5 GPIO.setmode(GPIO.BCM) GPIO.setup(pin,GPIO.IN,pull_up_down=GPIO.PUD_UP) rain = 0. def cb(channel): global rain rain += calibration GPIO.add_event_detect(pin,GPIO.FALLING,callback=cb,bouncetime=300...
{"hexsha": "b0e728a7c92c2b71fec53f660138221cd5c95e47", "size": 1149, "ext": "py", "lang": "Python", "max_stars_repo_path": "rpi_scripts/rain.py", "max_stars_repo_name": "AdamTheisen/3DWxSt", "max_stars_repo_head_hexsha": "1a6378eb44477fbd1ad3f8f8a18515e9a2512ef8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
from allennlp.models import Model import torch import numpy as np from allennlp.data import Vocabulary from allennlp.models import Model from allennlp.nn import util from allennlp.training.metrics import CategoricalAccuracy, Metric, F1Measure from pytorch_pretrained_bert.modeling import BertModel from kb.metrics import...
{"hexsha": "d25183bf3f8983fe21a6fc2d9f61bb7407ac3a0f", "size": 9010, "ext": "py", "lang": "Python", "max_stars_repo_path": "kb/evaluation/classification_model.py", "max_stars_repo_name": "shmuelamar/kb", "max_stars_repo_head_hexsha": "b5c26ad11e3f6cb1569187cddef600db04bb4399", "max_stars_repo_licenses": ["Apache-2.0"],...
module Gaussians using LinearAlgebra using SpecialFunctions using Formatting include("sto_ng.jl") export STO_NG, sto_g, KineticOperator, CoulombPotential, ElectronRepulsionIntegrals end
{"hexsha": "dfd16d740c18c31c614124137a268a9daec14f23", "size": 199, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Gaussians.jl", "max_stars_repo_name": "JuliaAtoms/Gaussians.jl", "max_stars_repo_head_hexsha": "e1a7c943d414e289b5f260181b4bcfab3d47511d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...