text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
""" Written by Nawshad. This function outputs f-measures given the predicted preLabels and target label as a list of lists. See the function call """ import numpy as np def CalculateFM(preLabels, targetLabels, threshold=None): # print('PreLabels:', preLabels) # print('targetLabels:', targetLabels) if th...
{"hexsha": "b9cf3b4569f3d1e7b33c39afc4859f83973dea8d", "size": 2542, "ext": "py", "lang": "Python", "max_stars_repo_path": "measurement.py", "max_stars_repo_name": "chenyangh/new_emotion_mining", "max_stars_repo_head_hexsha": "e34c152c879475bee1e446c686c3de0ed90129d8", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
"""Utility functions/classes.""" from collections import deque from struct import pack from itertools import ifilter import numpy as np def ordinal(number): """Returns the string ordinal for the input number. Algorithm from Gareth's solution at: http://codegolf.stackexchange.com/questions/4707/outputting-...
{"hexsha": "3bb977753debb2c7f0afa52ee7a46c419db3954d", "size": 4367, "ext": "py", "lang": "Python", "max_stars_repo_path": "components/util.py", "max_stars_repo_name": "lietk12/robotic-package-sorting", "max_stars_repo_head_hexsha": "081bf93a9efda772d63c4286bb83739d08da7a41", "max_stars_repo_licenses": ["BSD-2-Clause"]...
# 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. import numpy as np import torch from . import BaseWrapperDataset class BeginOfWord(BaseWrapperDataset): def __init__(self, dataset, di...
{"hexsha": "ee96bbcfb8d186d9c8a921c4985e804f12538eb6", "size": 1364, "ext": "py", "lang": "Python", "max_stars_repo_path": "fairseq/data/begin_of_word.py", "max_stars_repo_name": "cindyxinyiwang/fairseq-repo", "max_stars_repo_head_hexsha": "9e6596fdaa8b2cff988439feae66b5fcfad2eb3f", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma card_sumset_le: assumes "finite A" shows "card (sumset A {a}) \<le> card A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. card (sumset A {a}) \<le> card A [PROOF STEP] by (simp add: assms card_mono card_sumset_singleton_eq)
{"llama_tokens": 103, "file": "Pluennecke_Ruzsa_Inequality_Pluennecke_Ruzsa_Inequality", "length": 1}
from PIL import Image import numpy as np import os import argparse import glob def strided_crop(img, mask, label, height, width,name,stride=1): directories = ['Chase_crop','Chase_crop/Images','Chase_crop/Masks','Chase_crop/labels'] for directory in directories: if not os.path.exists(directory): ...
{"hexsha": "e0fbde342e61fa9511af66589feec68359e94819", "size": 3266, "ext": "py", "lang": "Python", "max_stars_repo_path": "strided_crop_CHASE.py", "max_stars_repo_name": "SharifAmit/RVGAN", "max_stars_repo_head_hexsha": "ed66209a24dd0704cb525cf4ee650588a63d4ce8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
module UtilitiesTests import Compat using Compat.Test import Compat: occursin import Compat.Base64: stringmime import Documenter import Documenter: IdDict module UnitTests module SubModule end # Does `submodules` collect *all* the submodules? module A module B module C ...
{"hexsha": "903c451f87d5f43487bd2445ed10667d45863eb2", "size": 8099, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/utilities.jl", "max_stars_repo_name": "zundertj/Documenter.jl", "max_stars_repo_head_hexsha": "8790d387a2cbcc40e67dd2dafeb04778faae2c37", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # tests writing a float tensor from python # then calls torch to read it again #---------- # generate the tensor #---------- import numpy as np sizes = (2,3,4) tensor = np.ndarray(sizes) for i1 in range(sizes[0]): for i2 in range(sizes[1]): for i3 in range(sizes[2]): ...
{"hexsha": "625336040b81a46c4b146ec5fbeb31f222bd5c8d", "size": 878, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/testWriteFloatTensor.py", "max_stars_repo_name": "andreh7/torchio", "max_stars_repo_head_hexsha": "3e62f90b3d56d3d135535134032fe77a85f729e8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
function simon(varargin) %SIMON Do what Simon Says... % SIMON starts the standard game. % SIMON(N) starts the game with N keys. % % Instructions: % - Press the start button (the green triangle pointing to the right) to % start the game. % - Look and listen to what Simon says and repeat it. % - Press t...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/13879-simon/simon.m"}
""" GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. """ __autho...
{"hexsha": "e09dd4b3ac08a117b3f905144287ef6ff6f6489b", "size": 8739, "ext": "py", "lang": "Python", "max_stars_repo_path": "MissileParticleFx.py", "max_stars_repo_name": "yoyoberenguer/Homing-missile-", "max_stars_repo_head_hexsha": "f8baa90f7eeaa068a73d1a1340acf0fbc1838334", "max_stars_repo_licenses": ["MIT"], "max_st...
import geopandas as gpd import numpy as np import pandas as pd from shapely.geometry import Point world=gpd.read_file('/n/home12/drewpendergrass/ne_10m_land.shp') geom=world.geometry[0] gridlabels = ['4.0x5.0','2.0x2.5','1x1','0.5x0.625','0.25x0.3125'] gridlabels_name = ['4x5','2x2p5','1x1','0p5x0p625','0p25x0p3125']...
{"hexsha": "e56290e3644555151184e7762a3684775027da75", "size": 2733, "ext": "py", "lang": "Python", "max_stars_repo_path": "templates/landmask_maker.py", "max_stars_repo_name": "drewpendergrass/CHEEREIO", "max_stars_repo_head_hexsha": "5b286e31542b4dbc762174a6f17a9e4199667088", "max_stars_repo_licenses": ["MIT"], "max_...
!*************************************************************************************************************************** ! This is the code from the section (DYNAMIC == RATE) lines 4643 - 4706 of the original CSCAS code.The names of the ! dummy arguments are the same as in the original CSCAS code and the call st...
{"hexsha": "8ebdda937c2de9e5377e96dd470716d57f327ddf", "size": 2650, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Plant/CSYCA-Cassava/YCA_Growth_Photo.f90", "max_stars_repo_name": "vstocca/dssat-csm-os", "max_stars_repo_head_hexsha": "fec0f313a3b7c1119093e61ad87b392dd3f75863", "max_stars_repo_licenses": ["B...
from __future__ import print_function, absolute_import import os from os.path import join as pjn import sys import pytest import numpy as np import ipywidgets as ipyw from lmfit.lineshapes import lorentzian # Resolve the path to the "external data" this_module_path = sys.modules[__name__].__file__ data_dir = pjn(os.p...
{"hexsha": "ea9f7cc63772f623b30ddc61e68931102d5a9351", "size": 2017, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/conftest.py", "max_stars_repo_name": "jmborr/QeF", "max_stars_repo_head_hexsha": "2c838f77e1efdc5c2e2c830842372e37f65acf6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
[STATEMENT] lemma (in lbv) wtl_pres: assumes pres: "pres_type step (length is) A" assumes cert: "cert_ok c (length is) \<top> \<bottom> A" assumes s: "s \<in> A" assumes all: "wtl is c 0 s \<noteq> \<top>" shows "pc < length is \<Longrightarrow> wtl (take pc is) c 0 s \<in> A" (is "?len pc \<Longrighta...
{"llama_tokens": 3357, "file": null, "length": 38}
import numpy as np import torch import torch.nn.functional as F from codes.d_agents.a0_base_agent import float32_preprocessor from codes.d_agents.on_policy.on_policy_agent import OnPolicyAgent from codes.e_utils import rl_utils, replay_buffer from codes.d_agents.actions import ProbabilityActionSelector from codes.e_ut...
{"hexsha": "0aa50be39d8821cc01c657b693bc988aa6fe4578", "size": 5265, "ext": "py", "lang": "Python", "max_stars_repo_path": "temp/discrete_a2c_agent.py", "max_stars_repo_name": "linklab/link_rl", "max_stars_repo_head_hexsha": "e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
\section{\module{cmd} --- Build line-oriented command interpreters.} \declaremodule{standard}{cmd} \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com} \modulesynopsis{Build line-oriented command interpreters; this is used by module \module{pdb}.} The \class{Cmd} class provides a simple framework for writ...
{"hexsha": "153d7a3bee41708556c0d9ddb029eb211e9373a2", "size": 5045, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Doc/lib/libcmd.tex", "max_stars_repo_name": "1byte2bytes/cpython", "max_stars_repo_head_hexsha": "7fbaeb819ca7b20dca048217ff585ec195e999ec", "max_stars_repo_licenses": ["Unlicense", "TCL", "DOC", "A...
__precompile__(true) module Strategems using Dates using Temporal using Indicators using Random using ProgressMeter export # universe definitions Universe, gather!, get_overall_index, # parameter sets ParameterSet, count_runs, generate_combinations, generate_di...
{"hexsha": "e3a748129e166ad1fa5db019c9690c4c6a8a4dcb", "size": 1251, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Strategems.jl", "max_stars_repo_name": "KenziTrader/Strategems.jl", "max_stars_repo_head_hexsha": "d7126264c7639a611162f98fcf33f69e464dcb8c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 1 14:03:47 2019 @author: Jonathan Schilling (jonathan.schilling@ipp.mpg.de) """ import numpy as np import matplotlib.pyplot as plt def kernel(eps, l): return 1/np.sqrt(eps*eps+l*l) def blend(l,a,b, m): norm_l = np.abs(l)/m if (norm_l...
{"hexsha": "cb54b25f322636630f3a8300ccb968047af808c4", "size": 1305, "ext": "py", "lang": "Python", "max_stars_repo_path": "nsq_0d.py", "max_stars_repo_name": "jonathanschilling/nsq", "max_stars_repo_head_hexsha": "f860b2455d3fde339eaab96fa65922b18ac929cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
from __future__ import absolute_import, division, print_function import os import sys from collections import Counter from typing import List, Text from urllib.request import urlretrieve import numpy as np import pandas as pd import tensorflow as tf from six import string_types from tqdm import tqdm from odin.utils....
{"hexsha": "467b8de7e7c9f43aa2374de158f1a15e6e7c0f26", "size": 7742, "ext": "py", "lang": "Python", "max_stars_repo_path": "odin/fuel/human_genome.py", "max_stars_repo_name": "tirkarthi/odin-ai", "max_stars_repo_head_hexsha": "7900bef82ad8801d0c73880330d5b24d9ff7cd06", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import torch import numpy as np import pandas as pd import matplotlib.pyplot as plt import os, sys, time, datetime, pathlib, random, math from torch.utils.data import Dataset, DataLoader from torchvision import transforms as tvtransforms from skimage import io, transform from PIL import Image # HELPER FUNCTION def ...
{"hexsha": "6e049b0f273484e24a6ffed6f58fa8ab98131734", "size": 10427, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets.py", "max_stars_repo_name": "danielnflam/Deep-Learning-Models-for-bone-suppression-in-chest-radiographs", "max_stars_repo_head_hexsha": "277675830a8bac023d7b8dd3e2f108470050314b", "max_s...
#ifndef ALGOL_STREAM_LINES_RANGE_HPP #define ALGOL_STREAM_LINES_RANGE_HPP #include <iosfwd> #include <string> #include <boost/iterator/iterator_facade.hpp> #include <boost/assert.hpp> namespace algol::stream { class lines_range { std::istream& sin_; mutable std::string obj_; char delim_; bool next ...
{"hexsha": "5cefa1f911b3c5d3334662e4da2d2c951ceec0be", "size": 2015, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/algol/stream/lines_range.hpp", "max_stars_repo_name": "alexbaroni/ALGOL", "max_stars_repo_head_hexsha": "081497e87096308ec0f424ee5a8b6510b0e6ab69", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python import numpy as np import scipy as sp import matplotlib.pyplot as plt from rapidtide.util import valtoindex from rapidtide.filter import noncausalfilter def spectralfilterprops(thefilter, debug=False): lowerstop, lowerpass, upperpass, upperstop = thefilter["filter"].getfreqlimits() lo...
{"hexsha": "1b0488a3057cfb33a7a3fca6439a1b416b12318a", "size": 7002, "ext": "py", "lang": "Python", "max_stars_repo_path": "rapidtide/tests/test_filter.py", "max_stars_repo_name": "dangom/rapidtide", "max_stars_repo_head_hexsha": "ab92bbb612623f8499a16e1e85cea643766f3af8", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy as np import argparse import scipy.optimize as spo import se3 import matplotlib.pyplot as plt import tf.transformations as tform import cma from bag_parser import parse_bag_data gravity_mag = 9.81 xl_scale_tol = 0.1 gyro_bias_tol = 0.1 def compute_xl_scale(data): '''Compute a constant scale factor ...
{"hexsha": "16a5cf64dbb3e1f73622901a685326affad82bdd", "size": 5223, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/calibrate_imu_extrinsics.py", "max_stars_repo_name": "Humhu/fieldtrack", "max_stars_repo_head_hexsha": "78f787e08c14ebbb102efbfb7bf1cffcb81fb099", "max_stars_repo_licenses": ["AFL-3.0"], "...
""" $Id: openCreateData.py 2285 2012-06-24 18:01:49Z dkindig $ Plotting routine for tests in regrid2.ESMF using ginned up data """ # Allow imports from cdat_tests import sys sys.path.append('../cdat_tests') import cdms2,cdat_info import regrid2 import os import numpy as np import ESMF home = os.getenv("HOME") + "/...
{"hexsha": "adc81c2ad077cd27a0b3db0733cd10564b078588", "size": 9824, "ext": "py", "lang": "Python", "max_stars_repo_path": "Test/openCreateData.py", "max_stars_repo_name": "jasonb5/cdms", "max_stars_repo_head_hexsha": "dd41a8dd3b5bac10a4bfdf6e56f6465e11efc51d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
#!/usr/bin/env python3 import cv2 import numpy as np import rospy from scipy.spatial.transform import Rotation import hello_helpers.hello_ros_viz as hr from numba_image_to_pointcloud import numba_image_to_pointcloud import hello_helpers.fit_plane as fp def filter_points(points_array, camera_matrix, box_2d, min_box_s...
{"hexsha": "88e38eac65b6e2cc8b4ff23ad14f4c3d77140a54", "size": 14800, "ext": "py", "lang": "Python", "max_stars_repo_path": "stretch_deep_perception/nodes/detection_2d_to_3d_python3.py", "max_stars_repo_name": "ScazLab/stretch_ros", "max_stars_repo_head_hexsha": "7b7c9e6bea15ab507e87a15d294a1068b9dc4a85", "max_stars_re...
module matrix_module implicit none save real(kind=4) :: phi, theta, alfa2, alfa4, w end module matrix_module
{"hexsha": "f8464cc2cb8656dc8af800709ba2d27635f2ef55", "size": 132, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/matrix_module.f90", "max_stars_repo_name": "MESH-Team/MESH_Code_irregular", "max_stars_repo_head_hexsha": "1edd0b60a8b2ccd95ec92b4fc7e381193cf6b936", "max_stars_repo_licenses": ["MIT"], "max_...
#include <stdlib.h> #include <complex.h> #include <float.h> #include <math.h> #include <string.h> #ifdef _MACOSX #include <Accelerate/Accelerate.h> #else #include <cblas.h> #endif #include "fastsphere.h" #include "spreflect.h" #include "translator.h" #include "scatmat.h" #include "fsht.h" #include "farfield.h" #inclu...
{"hexsha": "a4d1cc2ff184a5c9f7202e7f3461f4fd6d3789e0", "size": 9038, "ext": "c", "lang": "C", "max_stars_repo_path": "scatmat.c", "max_stars_repo_name": "ahesford/fastsphere", "max_stars_repo_head_hexsha": "18d8bd2d73aaabeafe4ead48955c8d8190eddbf2", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": null, ...
import sys import networkx as nx import pandas as pd import numpy as np from collections import defaultdict from tqdm import tqdm import argparse sys.path.append("/home/mattjones/projects/scLineages/SingleCellLineageTracing/Alex_Solver") from data_pipeline import read_and_process_data, convert_network_to_newick_form...
{"hexsha": "1738644f8676eb9533b0dab2191a6268f9d8896c", "size": 3194, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/lineageProfile_2_charmat.py", "max_stars_repo_name": "Lioscro/Cassiopeia", "max_stars_repo_head_hexsha": "fa630e167b3d8e6fb1c88740dff71130224ca54c", "max_stars_repo_licenses": ["MIT"], "ma...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Image tools interfaces ~~~~~~~~~~~~~~~~~~~~~~ """ import os import numpy as np import nibabel as nb import nilearn.image as nli from textwrap import inde...
{"hexsha": "f4697c9c2e3aeee4d1fefcdcee6d8545de163d61", "size": 28871, "ext": "py", "lang": "Python", "max_stars_repo_path": "niworkflows/interfaces/images.py", "max_stars_repo_name": "bpinsard/niworkflows", "max_stars_repo_head_hexsha": "079552128eee6102646d1cc62f83b9a30cc3e3dd", "max_stars_repo_licenses": ["BSD-3-Clau...
// Copyright (C) 2013 Vicente J. Botet Escriba // // 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) // // 2013/10 Vicente J. Botet Escriba // Creation. #ifndef BOOST_CSBL_VECTOR_HPP #define BOOST_CSBL_VECTOR_HPP ...
{"hexsha": "5936f77b095481c1b4ad727c23156bff62c816a5", "size": 855, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "mars/boost/thread/csbl/vector.hpp", "max_stars_repo_name": "jonetomtom/mars", "max_stars_repo_head_hexsha": "3f11714e0aee826eb12bfd52496b59675125204a", "max_stars_repo_licenses": ["BSD-2-Clause", "Ap...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"hexsha": "e06c87d969f4c1146f1636a6402059f82341cff3", "size": 10529, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py", "max_stars_repo_name": "ysh329/Paddle", "max_stars_repo_head_hexsha": "50ad9046c9a440564d104eaa354eb9df83a35678", "max_stars_repo_...
#! /usr/bin/env python3 """Tests the mwa_metadb_utils.py script.""" from vcstools.metadb_utils import mwa_alt_az_za, get_obs_array_phase, get_common_obs_metadata,\ get_files, calc_ta_fwhm, get_channels, obs_max_min from numpy.testing import assert_almost_equal # Can't test singles_sou...
{"hexsha": "83c0a1d3a5d811fe06fc9b8b0c664324d21bf46b", "size": 3262, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mwa_metadb_utils.py", "max_stars_repo_name": "cplee1/vcstools_chris_duplicate", "max_stars_repo_head_hexsha": "e929e01d886e6ce8c113af3b02c2590b441daa03", "max_stars_repo_licenses": ["AF...
""" INITIAL_SCREEN - Rapid screening of univariate variance component models INITIAL_SCREEN screens known covariates for possible filtering before applying the lvreml function. Screening is based on estimating the variance explained by each covariate alone, followed by a pruning step to obtain a set of non-redundant, ...
{"hexsha": "ff37667316c2a9cb544f611efcf3bab6d4601b41", "size": 3075, "ext": "py", "lang": "Python", "max_stars_repo_path": "lvreml/initial_screen.py", "max_stars_repo_name": "michoel-lab/LVREML-Python", "max_stars_repo_head_hexsha": "7e957ed55c2199468756c07a4c68eaa842b316fc", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- # # Copyright 2018 Amir Hadifar. 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 req...
{"hexsha": "a542dff462c402273a4fb5b910e83918e738706b", "size": 2590, "ext": "py", "lang": "Python", "max_stars_repo_path": "lesson10/tfhub.py", "max_stars_repo_name": "hadifar/tensorflow-starter", "max_stars_repo_head_hexsha": "187b6956e3a0cc45a065e753240eced93bc4c592", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np import h5py class HDF5: def __init__(self, dbPath, batchSize, preprocessors=None, aug=None, binarize=True, classes=2): self.batchSize = batchSize self.preprocessors = preprocessors self.aug = aug self.binarize = binarize self.classes = classes se...
{"hexsha": "14aee9d893006319ab6fbe1e81ec50903b540cee", "size": 759, "ext": "py", "lang": "Python", "max_stars_repo_path": "HDF5.py", "max_stars_repo_name": "vascobailao/CNN", "max_stars_repo_head_hexsha": "91b6fdd3732bb3f6419894fcaa99227290b09c7f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars...
# -*- coding: utf-8 -*- # ********************************** # Author: Lizi # Contact: alisonbrielee@gmail.com # ********************************** import torch import numpy as np from torch.autograd import Variable def _concat(xs): return torch.cat([x.view(-1) for x in xs]) class HyperGradient(object): ...
{"hexsha": "8f42be24d7162fcb4066d20d8b8577834545956d", "size": 4434, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/upperoptimizer.py", "max_stars_repo_name": "Alison-brie/AutoReg", "max_stars_repo_head_hexsha": "a23d45a6f7c6e47f61430e1565dda316452a4418", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import paddle import pytest import tensorflow as tf import torch from finetuner.tuner.callback import EarlyStopping from finetuner.tuner.keras import KerasTuner from finetuner.tuner.paddle import PaddleTuner from finetuner.tuner.pytorch import PytorchTuner from finetuner.tuner.state import TunerStat...
{"hexsha": "ef70c5fcc3ac01649dd195bacab25a7b5b5ecdc3", "size": 4505, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/tuner/callback/test_early_stopping.py", "max_stars_repo_name": "jina-ai/finetuner", "max_stars_repo_head_hexsha": "6b8701c6ca372310364e6791c1c2761700dfc150", "max_stars_repo_licenses": ...
% BEGIN LICENSE BLOCK % Version: CMPL 1.1 % % The contents of this file are subject to the Cisco-style Mozilla Public % License Version 1.1 (the "License"); you may not use this file except % in compliance with the License. You may obtain a copy of the License % at www.eclipse-clp.org/license. % % Software distribute...
{"hexsha": "228bf9173bacea2c11cf8d7081e18a5eb29aa3b7", "size": 20045, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "usr/eclipseclp/documents/embedding/embsumc.tex", "max_stars_repo_name": "lambdaxymox/barrelfish", "max_stars_repo_head_hexsha": "06a9f54721a8d96874a8939d8973178a562c342f", "max_stars_repo_licenses"...
using aoc2019.computer input = joinpath(@__DIR__, "input") p = computer.load_program(input) struct NIC stdin::Channel{Int64} stdout::Channel{Int64} end function init(p::Array{Int,1}, stdout::Channel{Int64}) nics = Dict{Int, Channel{Int64}}() for i in 0:49 stdin = Channel{Int64}(Inf) n...
{"hexsha": "798eef8b4d7628444099582c8a5e22c2633fe093", "size": 1753, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bin/twentythree/run.jl", "max_stars_repo_name": "talentdeficit/aoc2019", "max_stars_repo_head_hexsha": "70692f4fd61c3b640ce601bed3afdd74f93a5d73", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
module ECCodes import Base: close,keys,getindex export withmessages const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") if isfile(depfile) include(depfile) else error("libeccodes not properly installed. Please run Pkg.build(\"ECCodes\")") end type GribFile file::Ptr{Void} end function...
{"hexsha": "c81475da7e85eb21c2c0af339c83bcd20c9d3027", "size": 4177, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ECCodes.jl", "max_stars_repo_name": "MetServiceDev/ECCodes.jl", "max_stars_repo_head_hexsha": "1303851922a8bc755fabf445edb1aca90929080f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
#!/usr/bin/env python from __future__ import print_function from builtins import input import sys import numpy import pmagpy.pmag as pmag def main(): """ NAME angle.py DESCRIPTION calculates angle between two input directions D1,D2 INPUT (COMMAND LINE ENTRY) D1_dec D1_inc ...
{"hexsha": "3f6282d92026d1d401e758adb3a369c192ad33f1", "size": 2248, "ext": "py", "lang": "Python", "max_stars_repo_path": "programs/angle.py", "max_stars_repo_name": "yamamon75/PmagPy", "max_stars_repo_head_hexsha": "fa5b189800a239683fc17c6b312cdfdd839a46c3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
function debug_request(req::HTTP.Request) Core.println(req) req.response.status = 200 req.response end # base requests function handle_base_request(req::HTTP.Request) target = req.target if endswith(target, "stop") log_message("stopping server") req.response.status = 200 req.resp...
{"hexsha": "e25cfdadfffdb01fcbf62ff400d1cf397ffa954e", "size": 9199, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/webservice/request_handlers.jl", "max_stars_repo_name": "patrickjae/DrugEfficacyPredictor.jl", "max_stars_repo_head_hexsha": "e69a727cc91585a090a69d231f01a66d9fab90c6", "max_stars_repo_licenses...
[STATEMENT] lemma frequently_eq_eventually: "frequently P F = eventually P F" [PROOF STATE] proof (prove) goal (1 subgoal): 1. frequently P F = eventually P F [PROOF STEP] using eventually_imp_frequently eventually_frequently[OF proper] [PROOF STATE] proof (prove) using this: frequently ?P F \<Longrightarrow> eventual...
{"llama_tokens": 154, "file": null, "length": 2}
# # Copyright 2018 Vineyard # # 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, soft...
{"hexsha": "e6e8e65dd5cf31c5b3224cf0305b5308558b6cb1", "size": 2246, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/vine_acc/vml/classification.py", "max_stars_repo_name": "vineyard2020/MachineLearning", "max_stars_repo_head_hexsha": "5a29b297f31ae7e2cab18d4240fb7674e66ea1cd", "max_stars_repo_licenses": ...
""" KLD-based evaluation of learned structure """ import numpy as np from scipy.optimize import minimize, Bounds, basinhopping def minimize_kld(prec_true, B_support, thresh=1e-6, max_iters= 50, patience=10): """ Find parameters for a fixed graph structure (B_support) in order to minimize KLD with ...
{"hexsha": "80a6a846266d30503cff7c93fe2513a8981e39d5", "size": 1951, "ext": "py", "lang": "Python", "max_stars_repo_path": "dglearn/evaluation/evaluation_kld.py", "max_stars_repo_name": "syanga/dcglearn", "max_stars_repo_head_hexsha": "c3faaed7e04431c86649512813c17968de6803eb", "max_stars_repo_licenses": ["MIT"], "max_...
import unittest import numpy as np import mesostat.utils.matrix as matrix class TestUtilIterSweep(unittest.TestCase): def test_drop_chanels(self): mat5 = np.arange(25).reshape((5, 5)) mDrop = matrix.drop_channels(mat5, [1,2, 4]) np.testing.assert_array_equal(mDrop, np.array([[0, 3], [15,...
{"hexsha": "69a5c309e2137a2eb4d2c75fa96ed5e2c84ddac5", "size": 1406, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils_matrix.py", "max_stars_repo_name": "HelmchenLabSoftware/mesostat-dev", "max_stars_repo_head_hexsha": "8baa7120b892fe0df893cdcf0f20f49876643d75", "max_stars_repo_licenses": ["MIT"]...
function draw_axes(ax::Axis) vlines!(ax, 0.0, color=(:gray40, 0.6), linewidth=1) hlines!(ax, 0.0, color=(:gray40, 0.6), linewidth=1) end @doc raw""" viz_response(data, title="", xlabel="time, t", ylabel="output, y(t)", savename=nothing) plot `data[:, :output]...
{"hexsha": "6e9ce1f31032ac45e70932cd035ba841ed986747", "size": 10255, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/viz.jl", "max_stars_repo_name": "SimonEnsemble/Controlz", "max_stars_repo_head_hexsha": "d09ce3500a954fcb0a7a96001cda1142139fccc5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
#!/usr/bin/env Rscript options(error = function() traceback(2)) #get arguments from the command line (by Yves Bas, Mnhn, France) args <- commandArgs(trailingOnly = TRUE) #Verification que le nombre de paramètre est compatible avec le script if(length(args)!=4 ){ print("usage: ./max.r <file> <nameCol1> <nameCol2> <...
{"hexsha": "dc6f572fb80e67abc108c31125a1ac8616a1b359", "size": 1124, "ext": "r", "lang": "R", "max_stars_repo_path": "tools/max/max.r", "max_stars_repo_name": "sbenateau/Galaxy-E", "max_stars_repo_head_hexsha": "beea770b1a7192a90e22d845bc040c6a0833d6ac", "max_stars_repo_licenses": ["AFL-3.0"], "max_stars_count": 4, "ma...
import sys import pickle as pickle from sklearn.preprocessing import StandardScaler from utils.video_manager import get_auto_video_manager from utils.drawing.collage import create_collage_rows from scipy.spatial.distance import cdist import numpy as np import cv2 from gui.img_grid.img_grid_widget import ImgGridWidget f...
{"hexsha": "ad71d89c673575a5ad63c0d7a1215f65458cd3f9", "size": 1905, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/region/postprocessing.py", "max_stars_repo_name": "Flipajs/FERDA", "max_stars_repo_head_hexsha": "120a9e16d7ab4877f72fadbe4484c8b91adf22c4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# coding=utf-8 # Copyright 2018 The Google Research Authors. # # 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 applicab...
{"hexsha": "2e24b59d06264a3448d38c12b99303f0c4e48319", "size": 5388, "ext": "py", "lang": "Python", "max_stars_repo_path": "interpolation_experiments/paired_random_directions_experiment.py", "max_stars_repo_name": "google-research/policy-learning-landscape", "max_stars_repo_head_hexsha": "96c99bc67ce40559c61bdb6110f625...
import cv2 import numpy as np def Labeling(img, near=4): Ver, Hor = img.shape img = np.pad(img, ([1, 1], [1, 1]), 'constant') label = np.zeros_like(img) lu_table = np.zeros((Ver * Hor) // 2, dtype=np.uint8) dist = 1 for y in range(1, Ver+1): for x in range(1, Hor+1): if ...
{"hexsha": "2e40022fe103bd85c240c6a22483a2e70bf32df4", "size": 1747, "ext": "py", "lang": "Python", "max_stars_repo_path": "Question_51_60/myanswers/myans_58.py", "max_stars_repo_name": "OverHall27/Gasyori100knock", "max_stars_repo_head_hexsha": "341c528eb4c0789034898ee1f7d0a4b2f8b23eff", "max_stars_repo_licenses": ["M...
[STATEMENT] lemma sum_wt_Par[simp]: assumes cl: "properL cl" and n: "n < length cl" shows "sum (wt (Par cl) s) {brnL cl n ..<+ brn (cl!n)} = 1 /(length cl) * sum (wt (cl ! n) s) {..< brn (cl ! n)}" (is "?L = ?W * ?R") [PROOF STATE] proof (prove) goal (1 subgoal): 1. sum (wt (Par cl) s) {brnL cl n..<brnL cl n + ...
{"llama_tokens": 322, "file": "Probabilistic_Noninterference_Language_Semantics", "length": 2}
//---------------------------------------------------------------------------// // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://boos...
{"hexsha": "db2b0eee4f9ca8c1196f4a4673cc0d0713cdab6e", "size": 1176, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ios/Pods/boost-for-react-native/boost/compute/random.hpp", "max_stars_repo_name": "rudylee/expo", "max_stars_repo_head_hexsha": "b3e65a7a5b205f14a3eb6cd6fa8d13c8d663b1cc", "max_stars_repo_licenses":...
""" Utility for 2d rigid body transformations with scaling. References: http://ethaneade.com/lie_groups.pdf https://github.com/borglab/gtsam/blob/develop/gtsam/geometry/Similarity3.h """ import json import os from typing import Union import numpy as np from argoverse.utils.helpers import assert_np_array_sha...
{"hexsha": "2cad7bc5767595ba0605375d21f06154f011d887", "size": 6034, "ext": "py", "lang": "Python", "max_stars_repo_path": "argoverse/utils/sim2.py", "max_stars_repo_name": "gargrohin/argoverse-api", "max_stars_repo_head_hexsha": "6f695673b3ee5783955d0f9c72dedb95a8013fe1", "max_stars_repo_licenses": ["MIT"], "max_stars...
module PayGroups using Dates export Bill, Member, PayGroup export print_member, print_bill, print_soln, print_meta_info, print_bill_today, print_member_today, print_billbyname export add_bills!, add_member!, rm_bill!, rm_member!, ch_bill!, ch_member! export igroupay, cmd_flow, gen_paygrp # ----------------------...
{"hexsha": "eae60f2fad002048c80802c023ab6b384caa20b9", "size": 47950, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PayGroups.jl", "max_stars_repo_name": "zfengg/PayGroups.jl", "max_stars_repo_head_hexsha": "2d76bf1653782716dc228df83e60093ae58e51fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
@testset "legendre correct values edge,origin" begin # legendre == jacobi(a,b=0,0); same function body for n in 1:10 # design of jacobi polynomials is such that edge = 1 @test legendre(n, [1.]) ≈ [1.] correct = [-1.] if iseven(n) correct = [1.] end @t...
{"hexsha": "3a12433bd2e633b96291746968ee603c3fe17112", "size": 1528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/legendre.jl", "max_stars_repo_name": "JuliaOptics/OpticsPolynomials.jl", "max_stars_repo_head_hexsha": "bd7354474ddeea0d93338af06315d4511cc6c30a", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from a2c_ppo_acktr.distributions import Bernoulli, Categorical, DiagGaussian from a2c_ppo_acktr.utils import init device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def tt(ts):...
{"hexsha": "38db8aeee5a0593bab3ce97d6cb05b4a115ce68b", "size": 16721, "ext": "py", "lang": "Python", "max_stars_repo_path": "a2c_ppo_acktr/model.py", "max_stars_repo_name": "soonjune/pytorch-a2c-ppo-acktr-gail", "max_stars_repo_head_hexsha": "6b9384adfc87bc3835faff5b0f0c61e1811e65f9", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python import astropy.io.fits as pyfits import os import glob import numpy as np import math import copy from pkg_resources import resource_filename #import barycenter import onlyreadfilterbank as fr2 import filterbank as fr import logging logger = logging.getLogger(__name__) import pdb;# pdb.set_trac...
{"hexsha": "ef4d21961e6a50f8e6070c3849457d150fb7acf0", "size": 26975, "ext": "py", "lang": "Python", "max_stars_repo_path": "turbo_seti/findoppler/fits_wrapper.py", "max_stars_repo_name": "PetchMa/turbo_seti", "max_stars_repo_head_hexsha": "c9dd39e370a4628c400faa7dfd5be9f50f35e299", "max_stars_repo_licenses": ["MIT"], ...
import nltk import numpy as np from nltk.stem import WordNetLemmatizer from sklearn.linear_model import LogisticRegression from bs4 import BeautifulSoup from sklearn.externals import joblib positive_token = [ ['convenience', 'this', 'product', 'terrific', 'whenever', 'people', 'snap', 'half', "'re", 'amazed', 'ingeni...
{"hexsha": "441c01a359b07f9f5c92e3381ead42174a92765c", "size": 579393, "ext": "py", "lang": "Python", "max_stars_repo_path": "hospital/helpers/machine.py", "max_stars_repo_name": "neilbamb/E-asclepius", "max_stars_repo_head_hexsha": "76177b3da358482857cb64a5ce36b17af739f11b", "max_stars_repo_licenses": ["MIT"], "max_st...
/- Copyright (c) 2020 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import algebra.module.equiv import group_theory.group_action.opposite /-! # Module operations on `Mᵐᵒᵖ` This file contains definitions that build on top of the group acti...
{"author": "Parinya-Siri", "repo": "lean-machine-learning", "sha": "ec610bac246ae7108fc6f0c140b3440f0fbacc52", "save_path": "github-repos/lean/Parinya-Siri-lean-machine-learning", "path": "github-repos/lean/Parinya-Siri-lean-machine-learning/lean-machine-learning-ec610bac246ae7108fc6f0c140b3440f0fbacc52/matlib/algebra/...
/* * Copyright (c) 2017, Doug Smith, KEBA Corp * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list ...
{"hexsha": "a315478109136344aed2e011964d0b62a6967462", "size": 15260, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "rmi_driver-DigitalIO/keba_rmi_plugin/src/commands_keba.cpp", "max_stars_repo_name": "wumin199/KeMotion-ROS-Teach-Pendant", "max_stars_repo_head_hexsha": "dab9141ee9725f288f6cbbf5cbf77a948e02e46b", ...
#!/usr/bin/env python """ @package ForceBalance Executable script for starting ForceBalance. """ from __future__ import print_function from builtins import range import os, sys, re import argparse from forcebalance.parser import parse_inputs from forcebalance.forcefield import FF from forcebalance.objective import ...
{"hexsha": "46020cc3364c5009ce51396579e24e8dff8e753f", "size": 7544, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/ForceBalance.py", "max_stars_repo_name": "yudongqiu/forcebalance", "max_stars_repo_head_hexsha": "9292be2a9ca97781c6b3e0752f71775c778d783a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import numpy as np from math import atan2, fabs, sqrt, floor from collections import namedtuple Axis = namedtuple('Axis', ['point', 'direction', 'cost']) Segment = namedtuple('Segment', ['start', 'end']) def microsymmetry_axis(P11, P12, P21, P22): ''' Given two pairs of segments starting and ending points, co...
{"hexsha": "d981a45b4ee29fa5d8818f1f3e79325818c0b222", "size": 6353, "ext": "py", "lang": "Python", "max_stars_repo_path": "symmetries.py", "max_stars_repo_name": "ezequielp/glyphs", "max_stars_repo_head_hexsha": "278059fcd8ef0fe52798db4333ccd71933d82a61", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
\subsection{WebApp - BackEnd}\label{sec:WebAppBackEnd} WebApp - BackEnd is a Middleware that runs on the server. This Middleware (server-side software) facilitates client-server connectivity, forming a middle layer between the app(s) and the network: the server, the database, the operating system, and more. It receives...
{"hexsha": "74cef75a61de7d248cfdc9bf61bc0214db20531e", "size": 7903, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/3_TECHNICAL_SPECIFICATION/sections/1_applicationArchitecture/modules/02_webAppBackEnd.tex", "max_stars_repo_name": "juniorug/Qualificacao", "max_stars_repo_head_hexsha": "4d866cf73bee77bc51...
from imagepy import IPy from imagepy.core.engine import Free from imagepy.core.manager import ImageManager, RoiManager #from imagepy.core.roi.rectangleroi import RectangleRoi # cant import roi import cv2, MTM import numpy as np methods = {"Square-diff": cv2.TM_SQDIFF_NORMED, "cross-corr": cv2.TM_CCORR_NOR...
{"hexsha": "c1d3ebbfb37b2dbe995bd243ca9033e3180e4f18", "size": 3219, "ext": "py", "lang": "Python", "max_stars_repo_path": "menus/Plugins/Multi-Template-Matching/MultiTemplateMatching_plgs.py", "max_stars_repo_name": "multi-template-matching/MultiTemplateMatching-ImagePy", "max_stars_repo_head_hexsha": "5ef3f8af6d27101...
import numpy as np # noinspection PyUnresolvedReferences from robogym.mujoco.modifiers.timestep import Modifier # noinspection PyAttributeOutsideInit class PerpendicularCubeSizeModifier(Modifier): """ Modify size of a "perpendicular cube" """ def __init__(self, prefix): super().__init__() s...
{"hexsha": "168209596d7725185056d055d96bcd6267166c01", "size": 3155, "ext": "py", "lang": "Python", "max_stars_repo_path": "robogym/envs/dactyl/common/mujoco_modifiers.py", "max_stars_repo_name": "0xflotus/robogym", "max_stars_repo_head_hexsha": "5ec2fcbda9828941fe3072792dd25fb5a915bbbb", "max_stars_repo_licenses": ["M...
function result = ball_unit_f3_nd ( func, n ) %*****************************************************************************80 % %% BALL_UNIT_F3_ND approximates an integral inside the unit ball in ND. % % Integration region: % % Points X(1:N) such that: % % Sum ( X(1:N)**2 ) <= 1. % % Discussion: % % A 2*...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/stroud/ball_unit_f3_nd.m"}
import numpy as np #--------------------------------------------------------------------------------------------- def sigmoid(z): s = 1/(1+np.exp(-1*z)) return s #--------------------------------------------------------------------------------------------- def initialize_with_zeros(dim): w = np.zeros...
{"hexsha": "6b80062cafca00448134942fb731204b408948f0", "size": 3149, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/LR_Functions.py", "max_stars_repo_name": "jrenewhite/pfva_final_project", "max_stars_repo_head_hexsha": "41a36d3561847d36c42a20e2259d986ccdbe03f3", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python """ Main file for a home monitoring system on the Raspberry Pi 2. Requires --conf (JSON) and --car and --face (XML's) arguments. Utilizes the Raspberry Pi 2 camera module and OpenCV framework. Part of ELEC4500 Senior Electronic Design I, Spring 2016 Dept. of Electrical Engineering and Technology ...
{"hexsha": "1433d4e75bb2bc94979808c6a7fa07fc14eef921", "size": 7775, "ext": "py", "lang": "Python", "max_stars_repo_path": "scrying/scrying.py", "max_stars_repo_name": "wodiesan/senior_design_spring", "max_stars_repo_head_hexsha": "a335d8e052fc71250d127ca24755e0e1dad81d30", "max_stars_repo_licenses": ["MIT"], "max_star...
import librosa import numpy as np import pandas as pd import matplotlib.pyplot as plt import librosa.display from typing import List def audio_process(songname: str, mono: bool = True, duration: int = 30) -> pd.DataFrame: """ :return: DataFrame of all the features :rtype: Pandas DataFrame :param mono:...
{"hexsha": "bb5274f0819a49e8598211c6681df72066376e47", "size": 2413, "ext": "py", "lang": "Python", "max_stars_repo_path": "AudioFeaturizer/audio_featurizer.py", "max_stars_repo_name": "N-Harish/AudioFeaturizer", "max_stars_repo_head_hexsha": "99faf5fd826363f109a5419df0b5b0b77284b950", "max_stars_repo_licenses": ["BSD-...
% Figure 6.19: Polynomial fitting % Section 6.5.3 % Boyd & Vandenberghe "Convex Optimization" % Original by Lieven Vandenberghe % Adapted for CVX by Joelle Skaf - 10/03/05 % (a figure is generated) % % Given data u_1,...,u_m and v_1,...,v_m in R, the goal is to fit to the % data a polynomial of the form % p(u) = x_1 + ...
{"author": "cvxr", "repo": "CVX", "sha": "a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd", "save_path": "github-repos/MATLAB/cvxr-CVX", "path": "github-repos/MATLAB/cvxr-CVX/CVX-a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd/examples/cvxbook/Ch06_approx_fitting/fig6_19.m"}
import copy import os.path as osp import tempfile import mmcv import numpy as np import pytest from mmpose.datasets.pipelines import Compose H36M_JOINT_IDX = [14, 2, 1, 0, 3, 4, 5, 16, 12, 17, 18, 9, 10, 11, 8, 7, 6] def get_data_sample(): def _parse_h36m_imgname(imgname): """Parse imgname to get info...
{"hexsha": "fc9efb2777104337098842217ae1457b5df5d7ea", "size": 7950, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pipelines/test_pose3d_transform.py", "max_stars_repo_name": "carolchenyx/mmpose", "max_stars_repo_head_hexsha": "cd74bf1d0b13954188cc678415fd0ef98a74b46b", "max_stars_repo_licenses": ["...
## Questionário - Semana 2 Leia o texto a seguir para responder o questionário. ### Modelos epidemiológicos SEIR Modelos matemáticos epidemiológicos modernos funcionam com base em "estados" que são considerados como "compartimentos". Por exemplo, o modelo SEIR considera que uma população, quando ameaçada por uma ep...
{"hexsha": "99e65abcff6eb37d8d4b904cc38b85b988850f86", "size": 32378, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "_build/jupyter_execute/ipynb/tests/q2-full.ipynb", "max_stars_repo_name": "gcpeixoto/FMECD", "max_stars_repo_head_hexsha": "9bca72574c6630d1594396fffef31cfb8d58dec2", "max_stars_repo...
import numpy as np from scipy.signal import butter, lfilter, freqz, filtfilt # butter_lowpass: create lowpass filter # inputs: # cutoff, double cutoff frequency for filter # fs, double sampling rate for filter # order, integer filter order # outputs: # b,a doulbe filter values for use in lfilter function def butter_lo...
{"hexsha": "b372c5c33f426c4740dafbe9f4395eb21e343217", "size": 1000, "ext": "py", "lang": "Python", "max_stars_repo_path": "filter.py", "max_stars_repo_name": "taylorm7/HeaviNet", "max_stars_repo_head_hexsha": "3ea60ffdee12ff61692e2ed765ad957fc29e91dd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
# encoding: utf-8 # Sample-based Monte Carlo Denoising using a Kernel-Splatting Network # Michaël Gharbi Tzu-Mao Li Miika Aittala Jaakko Lehtinen Frédo Durand # Siggraph 2019 # # Copyright (c) 2019 Michaël Gharbi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
{"hexsha": "e089ee3e0109d19cd965e71297deed74a56771a7", "size": 4532, "ext": "py", "lang": "Python", "max_stars_repo_path": "sbmc/interfaces.py", "max_stars_repo_name": "milebril/Temporal-SBMC-extension", "max_stars_repo_head_hexsha": "57c56b73786e49d233facffde4ba80f212a00fa8", "max_stars_repo_licenses": ["Apache-2.0"],...
using ReachabilityAnalysis, SparseArrays LazySets.set_rtol(Float64, 1e-13) LazySets.set_ztol(Float64, 1e-13) const eₓ = sparsevec([2], [1.], 4) const x0 = 0.05 # model without parameter variation function embrake_no_pv(; Tsample=1.E-4, ζ=1e-6, x0=0.05) # model's constants L = 1.e-3 KP = 10000. KI = 1...
{"hexsha": "465c06428ba45b3f2149df11339d82158ffc79ef", "size": 2638, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "models/EMBrake/embrake.jl", "max_stars_repo_name": "JuliaReach/ARCH2021_AFF_RE", "max_stars_repo_head_hexsha": "205737b30c75404c0a3954c06e882c26fe64ab9b", "max_stars_repo_licenses": ["MIT"], "max_s...
from typing import Optional, Tuple, Union import random import numpy as np from scipy.ndimage import median_filter from ..._transform import Transformer class MedianFilter(Transformer): def __init__( self, filter_size: Union[int, Tuple[int, int]]=(3, 5), ) -> None: self.filter_size = f...
{"hexsha": "f1ec43d18e0217c97dcfd7cbd1d4619ee91c50d9", "size": 1510, "ext": "py", "lang": "Python", "max_stars_repo_path": "vox/transform/transform_3d/color/median_filter.py", "max_stars_repo_name": "DSciLab/voxpy", "max_stars_repo_head_hexsha": "4d06ffc9a52f4a2ae1eaacda7da998e75d0cc4aa", "max_stars_repo_licenses": ["M...
subroutine runCF_00ii(i1,i2,f,Gr,Shat4,N0) C--- Expression for rearrangement of Eq. 5.70 C--- Calculates C00ii C--- Small terms of order f(i)*Cijk,Gr(i,j)*Cijkl implicit none include 'pvCnames.f' include 'pvCv.f' include 'Carraydef.f' include 'Carrays.f' include 'pvweenumber...
{"hexsha": "fa43007bec7d7e9554141b52f2c97a74c8f848c7", "size": 837, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/TensorReduction/recur/smallF/runCF_00ii.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses"...
# 使用hook來打包 import imagehash # adb.py from PIL import ImageGrab import win32gui, win32ui, win32con, win32api import subprocess from threading import Thread # lineageM.py from PIL import Image import cv2 import numpy as np import os,time class Hello: def __init__(self): pass def start(self): ...
{"hexsha": "e96bf41b753859d24c5040240ea047626345e0da", "size": 441, "ext": "py", "lang": "Python", "max_stars_repo_path": "hello.py", "max_stars_repo_name": "digiyang7/LineageM_diary", "max_stars_repo_head_hexsha": "81b826f42faaf0e7b2702ec9db6ced686d2d11a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "ma...
% This function compute the instantaneous frequency from phase spectrogram % Input: % phase: D x T matrix of phase spectrogram, where D is FFT-bin number and % T is number of frames. % Output: % instantaneous frequency of the size size as phase. % The implementation is based on equation (3) of % Krawcz...
{"author": "singaxiong", "repo": "SignalGraph", "sha": "e86d973556ae8796a05ee2adbd665f47c8525a21", "save_path": "github-repos/MATLAB/singaxiong-SignalGraph", "path": "github-repos/MATLAB/singaxiong-SignalGraph/SignalGraph-e86d973556ae8796a05ee2adbd665f47c8525a21/signal/phase/comp_instan_freq.m"}
C @(#)swpari.f 20.3 2/13/96 subroutine swpari (m,n) c c swap arcint(1,*) and arcint (2,*) c include 'ipfinc/parametr.inc' include 'ipfinc/arcntl.inc' c character tempc*10 do 100 i = 1,2 tempc = arcint(i,m) arcint(i,m) = arcint(i,n) arcint(i,n)...
{"hexsha": "64d9de297f8c074844f5d3bcfccad8679b66a701", "size": 454, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/swpari.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "m...
"""In progress. Parag K. Mital, Jan 2016 """ import tensorflow as tf import math import numpy as np from utils import corrupt, weight_variable, bias_variable # %% def VAE(input_shape=[None, 784], n_components_encoder=200, n_components_decoder=200, n_hidden=20, continuous=False, ...
{"hexsha": "136f1069a214ce6f987de8a76fb0b61e1ed8efde", "size": 6225, "ext": "py", "lang": "Python", "max_stars_repo_path": "X_variational_autoencoder.py", "max_stars_repo_name": "phuicy/tensorflow_tutorials", "max_stars_repo_head_hexsha": "224bf9b720cd6cefa4b55cbe42342db7342a0b9f", "max_stars_repo_licenses": ["Apache-2...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ============================================================================= # Created By : Xiaoling Hu # Created Date: Tue June 22 9:00:00 PDT 2021 # ============================================================================= import time import numpy import gudhi a...
{"hexsha": "4ab0e8f222e119731ade737edcc5adb3f84292cf", "size": 11130, "ext": "py", "lang": "Python", "max_stars_repo_path": "topoloss_pytorch.py", "max_stars_repo_name": "onealbao/TopoLoss", "max_stars_repo_head_hexsha": "a479a4cc7af8352c0278b8363cc6a2abb98cdda4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. import numpy as np import matplotlib.pyplot as plt class CStep(object): def __init__(self, threshold): self.threshold = threshold def forward(self, z): ...
{"hexsha": "31f4c5b45acfeeeaf71618c25b2fd73f329be76d", "size": 510, "ext": "py", "lang": "Python", "max_stars_repo_path": "\u57fa\u7840\u6559\u7a0b/A2-\u795e\u7ecf\u7f51\u7edc\u57fa\u672c\u539f\u7406/\u7b2c4\u6b65 - \u975e\u7ebf\u6027\u56de\u5f52/src/ch08-ActivationFunction/Activators/Step.py", "max_stars_repo_name": "...
function x=mdl(m) %MDL Returns Rissanen's Minimum Description Length. % m=model that has been estimated using System Identication toolbox. % This function requires System Identification toolbox to work. % Plug-compatible with built-in functions aic(m) and fpe(m). % MDL can be used like AIC or FPE to compare models of ...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/15210-minimum-description-length/mdl.m"}
#include "CPlayerLogbook.h" #include "core/input/CInput.h" #include "core-ext/input/CInputControl.h" #include "core/system/Screen.h" #include "after/entities/item/CRecipeLibrary.h" #include "after/entities/item/CWeaponItem.h" #include "after/entities/item/system/ItemTerraBlok.h" #include "core/system/io/FileUtils.h"...
{"hexsha": "631201ed438653b76a91e368675f149c71b50d82", "size": 37015, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "oneEngine/oneGame/source/after/entities/hud/player/CPlayerLogbook.cpp", "max_stars_repo_name": "jonting/1Engine", "max_stars_repo_head_hexsha": "f22ba31f08fa96fe6405ebecec4f374138283803", "max_star...
module MachineLearning.UtilsTest ( tests ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.HUnit import Test.HUnit.Approx import Test.HUnit.Plus import MachineLearning.Types (Vector, Matrix) import qualified Numeric.LinearAlgebra as LA import qualified Data.Vector.Storable...
{"hexsha": "5afd2e5e7327d2fee99ac578f0f89c1271213166", "size": 2318, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "test/MachineLearning/UtilsTest.hs", "max_stars_repo_name": "aligusnet/mltool", "max_stars_repo_head_hexsha": "92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b", "max_stars_repo_licenses": ["BSD-3-Clause"...
import numpy as np import random from cost_functions import * from constants import * # TODO - tweak weights to existing cost functions WEIGHTED_COST_FUNCTIONS = [ (time_diff_cost, 1), (s_diff_cost, 1), (d_diff_cost, 1), (efficiency_cost, 1), (max_jerk_cost, 1), (total_jerk...
{"hexsha": "5ff55a8f42ca27381cc2c598d3003de3607625e6", "size": 5018, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ptg.py", "max_stars_repo_name": "hemanthgovindaraj/CarND-P7-Path-Planning-Project", "max_stars_repo_head_hexsha": "c60b937f67e084b6be342ff93c855e8bd26f772c", "max_stars_repo_licenses": ["MIT"]...
# !/usr/bin/env python3 # -*- coding:utf-8 -*- __author__ = 'Zhiquan Wang' __date__ = '2018/10/30 16:09' import numpy as np import matplotlib.pyplot as plt import SimpleLinearModel as slm if __name__ == '__main__': # Problem a dataset_num = 7 dataset = [] plt.figure(figsize=(6, 3)) f...
{"hexsha": "68e00d30b29f47a66da063f1503d134791330003", "size": 2174, "ext": "py", "lang": "Python", "max_stars_repo_path": "Homework-4/main.py", "max_stars_repo_name": "SabreHawk/STA-108", "max_stars_repo_head_hexsha": "02dcb829cd2d3e2885ca8b0b77762348a1632f5c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import numpy #from numpy import * # BJD added 20.11.2020 import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm # Set up grid and test data #nx, ny = 256, 1024 nx, ny = 240, 426 #(426,240) x = range(nx) y = range(ny) #data = numpy.random.random((nx, ny)) data = numpy.loadtxt...
{"hexsha": "d9a45f237b8da072003bdf181c0d153bc2b88402", "size": 718, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/Plotting_2d_Array_with_mplot3d_bjd_1b.py", "max_stars_repo_name": "bjdarrer/tf2-model-g", "max_stars_repo_head_hexsha": "26cf7bba9f1cc13e226834b3565c7b8df5fcc40a", "max_stars_repo_licenses...
# Copyright 2008-2018 pydicom authors. See LICENSE file for details. """Pydicom configuration options.""" # doc strings following items are picked up by sphinx for documentation import logging import os from typing import ( Optional, Callable, Dict, Any, TYPE_CHECKING, List, Union, MutableSequence, Union ) h...
{"hexsha": "fd1b7e3cb04bcd0f90ecb7e771da6aa04d489f3a", "size": 14726, "ext": "py", "lang": "Python", "max_stars_repo_path": "BatchLabelMap/automatic/pydicom/config.py", "max_stars_repo_name": "weras2/BatchLabelMap", "max_stars_repo_head_hexsha": "56af3d20df79f6b10a5d932278a33d02020d1e59", "max_stars_repo_licenses": ["M...
using LoopVectorization, ArrayInterface, OffsetArrays, Test using LoopVectorization: Static # T = Float64; r = -1:1; # T = Float32; r = -1:1; @testset "OffsetArrays" begin function old2d!(out::AbstractMatrix, A::AbstractMatrix, kern) rng1k, rng2k = axes(kern) rng1, rng2 = axes(out) for...
{"hexsha": "984d83cddb88edd2a0b196f04211a191a00c9d64", "size": 11864, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/offsetarrays.jl", "max_stars_repo_name": "danielwe/LoopVectorization.jl", "max_stars_repo_head_hexsha": "ed466fb1ca7e92b70b98d6ee50eb5544b64678e1", "max_stars_repo_licenses": ["MIT"], "max_st...
### A Pluto.jl notebook ### # v0.12.10 using Markdown using InteractiveUtils # ╔═╡ aff6e710-27c0-11eb-1782-91c83dd55c13 using Automata # ╔═╡ c2dd9e00-27c0-11eb-148d-d5fc9de0997f using Images # ╔═╡ 8bd97320-27c0-11eb-0a34-535cdfded71b md" ## Random initial conditions for cellular automata " # ╔═╡ d90af470-27c0-11eb...
{"hexsha": "f8d03185be87ad01a93f82f6eb82b1590e80cdf3", "size": 2263, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/0.0.1/random_initial.jl", "max_stars_repo_name": "cotangent-software/Automata.jl", "max_stars_repo_head_hexsha": "701c0006f7b8667567b17925e58815bf7af709b6", "max_stars_repo_licenses": ["M...
from platform import machine import numpy as np import exploratory import bss_reader import supercosmos_reader import pandas as pd import time def find_closest_obj(catalog, target_coord): """reads a catalog file with args (objid, ra, dec) and the position of a target object (target_ra, target_dec) and finds ...
{"hexsha": "50b6cbcbc6be9bc5daa76fc57aa84466d764000d", "size": 9549, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/crossmatch.py", "max_stars_repo_name": "snpham/jacaranda", "max_stars_repo_head_hexsha": "2a69f699d0a6a936aa4ce80c7561198b7e87f287", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
/- Copyright (c) 2019 Seul Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seul Baek -/ /- Linear integer arithmetic terms in pre-normalized form. -/ import tactic.omega.term namespace omega namespace int /-- The shadow syntax for arithmetic terms. All constan...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/tactic/omega/int/preterm.lean"}
module Render export rendertext, overlay!, shape, ellipse, box, squircle, star, ngon, ellipse_area, box_area, squircle_area, star_area, ngon_area, GIF, generate, parsecolor, rendertextoutlines, colorschemes, torgba, imagemask, outline, padding, dilate, imresize, recolor!, recolor export issvg, save, load, ...
{"hexsha": "a72028fe1143d3c07532b146029471714481c71d", "size": 14161, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rendering.jl", "max_stars_repo_name": "guo-yong-zhi/WordCloud.jl", "max_stars_repo_head_hexsha": "c58359ac0b0470ff385a5b857540c24161f7ae7f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import aggdraw import numpy as np import scipy.misc import warnings def _flat_to_xy(coords_in): coords_in = np.asarray(coords_in) xin = coords_in[0::2] yin = coords_in[1::2] return xin,yin class Xform(object): def transform_image(self,im): arr = scipy.misc.fromimage(im) arr_out = s...
{"hexsha": "ac121cf71940748d7d3fba328148d6b0d118f259", "size": 3417, "ext": "py", "lang": "Python", "max_stars_repo_path": "flydra_analysis/flydra_analysis/a2/aggdraw_coord_shifter.py", "max_stars_repo_name": "liyi2017/flydra", "max_stars_repo_head_hexsha": "9ec83f14514f73e660ae8fbda32a3cc0348d0cb4", "max_stars_repo_li...
/** * Haven Money API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 * * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2. * https://openapi-generator.tech * Do not edit the class manually. *...
{"hexsha": "39724a4c1c20f73ec10217a57613522b818e61de", "size": 85959, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/api/DefaultApi.cpp", "max_stars_repo_name": "havenmoney/platform-clients", "max_stars_repo_head_hexsha": "60a2553bde73c1f8a2b02e76ad7adcdf04283cd3", "max_stars_repo_licenses": ["Apache-2.0"], "...
#!/usr/bin/env python3 """ One-time utility to convert our ipdModel HDF5 files to NumPy's .npz format """ import argparse import re import sys import h5py import numpy as np def run(argv): p = argparse.ArgumentParser(description=__doc__) p.add_argument("file_name", help="Path to hdf5 file") args = p.pa...
{"hexsha": "7270f45021149f050c3688960f109cbab749110a", "size": 710, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/hdf2npz.py", "max_stars_repo_name": "GDelevoye/kineticsTools", "max_stars_repo_head_hexsha": "99a6b8b70ca97d76bafcb082af541e1a6c345ca0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
!> \brief For some variables it is inconvenient to calculate them implicitly, so !! we calculate them explicitly, between timesteps/iterations module explicit_functions use real_kind use mesh implicit none ! FIXME: these are really redundant with the semi-implicit functions, and should probably be integrat...
{"hexsha": "9974e8549ed0a4ab1f7a54703b468daa8e66e3d4", "size": 638, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/amuse/community/evtwin/src/trunk/code/explicit_functions.f90", "max_stars_repo_name": "rknop/amuse", "max_stars_repo_head_hexsha": "85d5bdcc29cfc87dc69d91c264101fafd6658aec", "max_stars_repo_...
/*============================================================================== Copyright (c) 2006 Tobias Schwinger http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www....
{"hexsha": "7525bd9556feb19de16724381a6f86a9cbf5072e", "size": 1788, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "boost/libs/spirit/classic/example/techniques/no_rules_with_typeof/opaque_rule_parser.cpp", "max_stars_repo_name": "randolphwong/mcsema", "max_stars_repo_head_hexsha": "eb5b376736e7f57ff0a61f7e4e5a43...