text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
! Copyright (c) 2005-2010, 2012-2013, Andrew Hang Chen and contributors, ! All rights reserved. ! Licensed under the 3-clause BSD license. program test_meanmax_driver use fruit use test_meanmax use fruit_util call init_fruit !in f95, subroutine name limited to 31 characters call meanmax_test...
{"hexsha": "d294028cc288b655f871c84a6ce6b87b09403053", "size": 418, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "tests/test_meanmax_driver.f95", "max_stars_repo_name": "chtheodoro/Habfuzz", "max_stars_repo_head_hexsha": "486369b3023f626980e86bc5a119dfcfc3a31643", "max_stars_repo_licenses": ["Apache-2.0"], "...
from dm_control import suite from dm_control.suite.wrappers import pixels import numpy as np DOMAIN_NAME = "acrobot" TASK_NAME = "swingup" # Load one task: env = suite.load(domain_name=DOMAIN_NAME, task_name=TASK_NAME) # Wrap the environment to obtain the pixels env = pixels.Wrapper(env, pixels_only=False) # Step t...
{"hexsha": "f6abb7001f48238c78d76aef052e9e80ab0e0aaa", "size": 742, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/dm_control/quick_start.py", "max_stars_repo_name": "Rowing0914/TF_RL", "max_stars_repo_head_hexsha": "68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include <boost/test/unit_test.hpp> #include "types/ds/matrix.hpp" BOOST_AUTO_TEST_SUITE(Matrix) BOOST_AUTO_TEST_CASE(add_wrong_dimensions) { DS::Matrix<int> first(2, 2, 0); DS::Matrix<int> second(2, 3, 0); try { first += second; BOOST_CHECK(false); } catch(const std::excepti...
{"hexsha": "cda7f29d4351f510bd36fa3dc1fcfe87a6bcf21c", "size": 2289, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/types/ds/test_matrix.cpp", "max_stars_repo_name": "iamantony/CppNotes", "max_stars_repo_head_hexsha": "2707db6560ad80b0e5e286a04b2d46e5c0280b3f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy import scidbpy import lookups import utils db = scidbpy.connect() gene_names = ['IL33'] # Set to None to get all genes #gene_names = None icds = ['HC49', 'HC382'] # Set to None to get all ICDs # -- - # -- - M-size Lists - -- # -- - # SciDB lookup # --- gene_variant = lookups.get_gene...
{"hexsha": "7e46d4a4a1874908256a794f1f3759cbbbaec1a1", "size": 1599, "ext": "py", "lang": "Python", "max_stars_repo_path": "gbe_browser/models-example.py", "max_stars_repo_name": "whyrg/GlobalBiobankEngine", "max_stars_repo_head_hexsha": "514f16eaaae16f0459b40cd1080c9243f007ec91", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 8 21:04:40 2021 @author: katie """ import numpy as np import numpy.linalg as la import matplotlib.pyplot as plt import svd_tools_copy as svdt import scipy as sp import scipy.sparse from PIL import Image ''' Embed a watermark in using the Liu & ...
{"hexsha": "aa7829b4dc0914c90f8f0017ea479a88b78c68c7", "size": 5276, "ext": "py", "lang": "Python", "max_stars_repo_path": "katie/SVD_Code_NEW/Watermarking_New/watermark_copy.py", "max_stars_repo_name": "S-I-SVD/Randomized-SVD", "max_stars_repo_head_hexsha": "82108238a53c70938af87417f98aadc7f74b2a87", "max_stars_repo_l...
""" main script to return the descriptor for a single molecule Functions: - get_descriptor: helper function to run all modules involved in calculating RGMolSA descriptor """ import numpy as np from numpy import linalg as la from rdkit.Chem import AllChem from get_inputs import get_mol_info from basesphere import ge...
{"hexsha": "490132ebde3219d90210d6e55219d8d752791008", "size": 5420, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/get_descriptor.py", "max_stars_repo_name": "RPirie96/RGMolSA", "max_stars_repo_head_hexsha": "72648700d3b29aa37414b27b8a213b1c5d377302", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
//============================================================================ // Name : dnaoptions.hpp // Author : Roger Fraser // Contributors : // Version : 1.00 // Copyright : Copyright 2017 Geoscience Australia // // Licensed under the Apache License, Version 2.0 (the "License"...
{"hexsha": "c81deb1708e2e9a3be0fa7d9dc9ef874db9d3bab", "size": 33638, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "dynadjust/include/config/dnaoptions.hpp", "max_stars_repo_name": "dotzhou/DynAdjust", "max_stars_repo_head_hexsha": "5e5918aff7975e2c2cead4f5be16b48d3eee7c76", "max_stars_repo_licenses": ["Apache-2...
[STATEMENT] lemma chain_union_closed': assumes \<open>is_chain f\<close> and \<open>(\<forall>n. f n \<in> C)\<close> and \<open>\<forall>S' \<in> C. \<forall>S \<subseteq> S'. S \<in> C\<close> and \<open>finite S'\<close> and \<open>S' \<subseteq> (\<Union>n. f n)\<close> shows \<open>S' \<in> C\<close> [PROO...
{"llama_tokens": 1133, "file": "FOL-Fitting_FOL_Fitting", "length": 15}
# ======== IMPORTS ======== import os from io import BytesIO import numpy as np from functools import partial import PIL.Image import tensorflow as tf # ========================= # ======== HELPER FUNCTIONS ======== def showarray(a, fmt="jpeg"): a = np.uint8(np.clip(a, 0, 1) * 255) f = BytesIO() img = P...
{"hexsha": "b4ff68f5e51d8e852a05aa117a67487c0f8380da", "size": 4130, "ext": "py", "lang": "Python", "max_stars_repo_path": "simple_dreaming.py", "max_stars_repo_name": "EdCo95/deepdream", "max_stars_repo_head_hexsha": "0f8e2b20d8c42cecec74f746779a40549cd0eb7d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
function [xPred, PPred, yPred, S, Pxy] = KalmanFilterX_Predict(x,P,F,Q,H,R,u,B,O) % KALMANFILTERX_PREDICT Perform the discrete-time KF state and measurement % prediction steps, under the assumption of additive process noise. % % Parameters % ---------- % x: column vector % The (xDim x 1) state estimate at the previou...
{"author": "sglvladi", "repo": "TrackingX", "sha": "f737445c070f0d7d470f52f8a2b5540d5bb682da", "save_path": "github-repos/MATLAB/sglvladi-TrackingX", "path": "github-repos/MATLAB/sglvladi-TrackingX/TrackingX-f737445c070f0d7d470f52f8a2b5540d5bb682da/Filters/Kalman/KalmanFilterX/Functions/Prediction/KalmanFilterX_Predict...
from data.base_unsupervised_image_dataset import BaseUnsupervisedImageDataset import numpy as np import torch from bisect import bisect_left import os.path as osp class PairedFrameDataset(BaseUnsupervisedImageDataset): def __init__(self, opt): super(PairedFrameDataset, self).__init__(opt) def get_pair...
{"hexsha": "49328abc38259283b652356fa70316ea4deac8aa", "size": 3583, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/data/paired_frame_dataset.py", "max_stars_repo_name": "neonbjb/DL-Art-School", "max_stars_repo_head_hexsha": "a6f0f854b987ac724e258af8b042ea4459a571bc", "max_stars_repo_licenses": ["Apache-2...
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
{"hexsha": "3694939a50360d531fd6a5c29baf4148fc9c729e", "size": 13248, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/openms/source/FORMAT/MRMFeatureQCFile.cpp", "max_stars_repo_name": "Amit0617/OpenMS", "max_stars_repo_head_hexsha": "70ef98e32b02721f45fe72bd4de4b4833755a66f", "max_stars_repo_licenses": ["BSL-...
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ // Topper Trading Workbench // // Copyright (C) 2018 Hat Boy Software, Inc. // // @author Matthew Alan Gray - <mgray@hatboysoftware.com> // @author Tony Richards - <trichards@indiezen.com> //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~...
{"hexsha": "3650d7abe22662b059246559ee8912e605f5969f", "size": 4091, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Applications/Topper/plugins/Topper.Workbench/src/Entity.hpp", "max_stars_repo_name": "hatboysoftware/helmet", "max_stars_repo_head_hexsha": "97f26d134742fdb732abc6177bb2adaeb67b3187", "max_stars_rep...
import matplotlib from kid_readout.roach import baseband matplotlib.use('agg') import numpy as np import time from kid_readout.utils import data_block, data_file,sweeps #from sim900 import sim900Client ri = baseband.RoachBasebandWide10() #ri.initialize() ri.set_fft_gain(4) df = data_file.DataFile() #sc = sim900Clie...
{"hexsha": "b4c94f564e1f30bc4e659587246ba053c425c618", "size": 2773, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/data_taking_scripts/old_scripts/simple_noise_script.py", "max_stars_repo_name": "danielflanigan/kid_readout", "max_stars_repo_head_hexsha": "07202090d468669200cab78297122880c1c03e87", "max_st...
""" Code about best uniform approximation (based on distance between CDFs) and its comparison with spline approaches. """ import numpy as np import scipy.stats as ss from scipy.integrate import quad from scipy.interpolate import UnivariateSpline from scipy.optimize import fsolve, least_squares, minimize import matplotl...
{"hexsha": "e0a9ba578781e328802e478ec9c05d492abaeeb7", "size": 3774, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/uniform_approx.py", "max_stars_repo_name": "echasnovski/randomvars", "max_stars_repo_head_hexsha": "15417b0e3ecd27f185b70471102c158f60d51c28", "max_stars_repo_licenses": ["MIT"], "max_...
""" CPIDataBase Librería base para tipos y funcionalidad básica para manejo de los datos desagregados del IPC a nivel de república. """ module CPIDataBase using Dates using DataFrames using PrettyTables # Exportar tipos export IndexCPIBase, VarCPIBase, FullCPIBase export CountryStructure...
{"hexsha": "af5b60faf70fc5509cd036722227ebdeeaf04a96", "size": 3429, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CPIDataBase.jl", "max_stars_repo_name": "DIE-BG/CPIDataBase.jl", "max_stars_repo_head_hexsha": "bc541a4217d4ec30c0959238b38a494548798f39", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
B_data = [ -2.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.26957 -2.45701 -0.812567 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0...
{"hexsha": "e8d3facc5f3ec5eeb9846b7022aa73f0364e58ba", "size": 14389, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_data/Step/rand_model/test_FRAP_B_data.jl", "max_stars_repo_name": "angus-lewis/DiscretisedFluidQueues.jl", "max_stars_repo_head_hexsha": "aa60fa272b61c088695dd29a2fe768fd2f375378", "max_...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <boost/asio.hpp> #include <db/db_entry.h> #include <db/db_table.h> #include <db/db_table_partition.h> #include <ksync/sandesh_ksync.h> #include <ksync/flowtable_ksync.h> #include <ksync/interface_ksync.h> #include <pkt/flowtable.h> #incl...
{"hexsha": "10a5410139da8af4a7c2bfc8b28c1bfe3c8535c3", "size": 4074, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/vnsw/agent/ksync/sandesh_ksync.cc", "max_stars_repo_name": "sysbot/contrail-controller", "max_stars_repo_head_hexsha": "893de3e41aa7b8e40092fba4a5da34284f5ee00f", "max_stars_repo_licenses": ["Apa...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Contains the transformation functions for getting to/from ecliptic systems. """ import erfa from astropy import units as u from astropy.coordinates.baseframe import frame_transform_graph from astropy.coordinates.transformations...
{"hexsha": "8a6b3a801a4606b1253f23bf5eff368668efaf70", "size": 10292, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lib/site-packages/astropy/coordinates/builtin_frames/ecliptic_transforms.py", "max_stars_repo_name": "fochoao/cpython", "max_stars_repo_head_hexsha": "3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9", "...
using RCall R"install.packages('rstan', repos='http://cran.us.r-project.org')"
{"hexsha": "b0317aef7d9d6806ec1ef33891ed01fdeed2450c", "size": 78, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deps/build.jl", "max_stars_repo_name": "JuliaTagBot/RStan.jl", "max_stars_repo_head_hexsha": "f9bf94e329876766cced6b6d837b6fddfc00f0e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""Declaration file for ab_test_model class.""" import numpy as np import matplotlib.pyplot as plt from itertools import combinations from ._ab_test_model_plotting import _ab_test_plotting from ._ab_test_model_sampling import _ab_test_model_sampling from ._ab_test_model_loss_func import _ab_test_loss_functions from ._...
{"hexsha": "73acef80e7b5bb986510dd7db8c2a526b2af19e0", "size": 15252, "ext": "py", "lang": "Python", "max_stars_repo_path": "BayesABTest/ab_test_model.py", "max_stars_repo_name": "bakermoran/BayesABTest", "max_stars_repo_head_hexsha": "b0912caba2696888c4670115b02dee7b4214bf9f", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python import rospy from sensor_msgs.msg import Image import numpy as np import matplotlib import matplotlib.pyplot as plt from cv_bridge import CvBridge, CvBridgeError import cv2 from gazebo_msgs.msg import LinkStates, LinkState from gazebo_msgs.srv import SetLinkState, GetLinkState from std_srvs.srv im...
{"hexsha": "7f2b6370a0f797a020472431853e2cb9c99f45a4", "size": 6122, "ext": "py", "lang": "Python", "max_stars_repo_path": "nodes/dataset_creation/coffin_world_generator.py", "max_stars_repo_name": "mrfmap/mrfmap_ros", "max_stars_repo_head_hexsha": "8c1e108860ff297f39591d97f8f8ce2937b29a51", "max_stars_repo_licenses": ...
import numpy as np from sklearn.utils.extmath import randomized_svd from socialsent import util from socialsent.representations.explicit import Explicit def run(in_file, out_path, dim=300, keep_words=None): base_embed = Explicit.load(in_file, normalize=False) if keep_words != None: base_e...
{"hexsha": "7c733fa245c1c17af8a80a8753cacee1d7ae96f2", "size": 1006, "ext": "py", "lang": "Python", "max_stars_repo_path": "socialsent/representations/makelowdim.py", "max_stars_repo_name": "tjkreutz/socialsent-py3", "max_stars_repo_head_hexsha": "852f27252062b1ebca3e4c089a224b7947d95633", "max_stars_repo_licenses": ["...
#!/usr/bin/env python import rospy # ROS interface import pymap3d as pm # coordinate conversion # msgs from formation.msg import RobotFormationState, FormationPositions from std_msgs.msg import Empty, Int32 from geometry_msgs.msg import Point, PointStamped from sensor_msgs.msg import NavSatFix from mavros_msgs.msg im...
{"hexsha": "67a8d48ad2973645c2132413eec755d9bd6a0bb1", "size": 13861, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/master_node.py", "max_stars_repo_name": "mzahana/formation", "max_stars_repo_head_hexsha": "17c7d4d90532ebb17caadbeba3d85b2965c30cc3", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Abstract supertype. `Objective`s map simulation outputs to predictions that can be compared to target data using a loss function. They must implement [`predictions`](@ref)and [`targets`](@ref) methods. """ abstract type Objective end """ targets(obj::Objective) Returns a targets array given an Objective. The...
{"hexsha": "67bc1b31b277d392f268c8e609441c4b1f74bc48", "size": 1876, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/optimisation/objectives.jl", "max_stars_repo_name": "virgile-baudrot/Dispersal.jl", "max_stars_repo_head_hexsha": "ebd62d5ca404f40c59b76fa4a427563d2f5b00e0", "max_stars_repo_licenses": ["MIT"],...
"""Accessing NumPy arrays.""" import numpy as np def test_run(): a = np.random.rand(5, 4) print("Array:\n", a) # Accessing element at position (3, 2) element = a[3, 2] print(element) # Elements in defined range print(a[0, 1:3]) # Top left corner of array print(a[0:2, 0:2]) ...
{"hexsha": "1c9d5743d2c318b4dbe67a5b8c6d13f353dd9906", "size": 425, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lesson 4/23_access_array_elements.py", "max_stars_repo_name": "srishag/Machine-Learning-For-Trading", "max_stars_repo_head_hexsha": "34ea564c9f1645d5cf1ebf1e4948ada0cfd957b7", "max_stars_repo_licen...
#' @name africountries #' @aliases sfpolygons #' @title African country boundaries #' #' @description a \code{sf} object containing low resolution African country boundaries #' See data-raw/afrilearndata-creation.R for how the data object is created. #' #' @format Formal class 'sf'; 51 rows, 8 columns #' \itemize{ #' ...
{"hexsha": "94f42c29216fd9e7daba443ffb703d9aa9a5ab7b", "size": 1596, "ext": "r", "lang": "R", "max_stars_repo_path": "R/africountries.r", "max_stars_repo_name": "afrimapr/afrilearndata", "max_stars_repo_head_hexsha": "c275fafef4ef03eca5c1b2d7d762010ec0437f86", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count"...
C * * * * * * * * * * * * * * * C --- DRIVER FOR RADAR5 C * * * * * * * * * * * * * * * C Use make command (relevant to Makefile) IMPLICIT REAL*8 (A-H,O-Z) REAL*4 TARRAY(2) INTEGER, PARAMETER :: DP=kind(1D0) C ---> PARAMETERS FOR RADAR5 (FULL JACOBIAN) <--- INTEGER, PARAMETER ...
{"hexsha": "c89de70dce85ef251440859d35ecee119862d2eb", "size": 9653, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "radar5/NEUTLOG/dr-neutlog.f", "max_stars_repo_name": "GColom/pyradar5", "max_stars_repo_head_hexsha": "c2c30fa8c0afa8b7d0efdc19aacdadd1e1ef092d", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_...
""" Tools for measuring emergence of communication """ from typing import Callable, Union from scipy.spatial import distance from scipy.stats import spearmanr import editdistance from collections import Counter, defaultdict import numpy as np from sklearn.metrics import normalized_mutual_info_score import torch de...
{"hexsha": "79855b823426b7dc74df5790e455af1aad85229c", "size": 4947, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/emergence.py", "max_stars_repo_name": "takaratruong/emergent-generalization", "max_stars_repo_head_hexsha": "20de15ee6514dba48b48c76d8cd9289d62966932", "max_stars_repo_licenses": ["MIT"], "ma...
#Python code for chapter 19 DSILT: Statistics import pandas as pd import numpy as np from scipy import stats from sklearn.linear_model import LinearRegression from sklearn.linear_model import Ridge, Lasso, ElasticNet import matplotlib.pyplot as plt d = pd.read_csv('/home/dsilt/Desktop/dsilt-stats-code/17-20 and 22 Ir...
{"hexsha": "d8b8b123299bd5a7488057d1f5d664347babd578", "size": 6598, "ext": "py", "lang": "Python", "max_stars_repo_path": "17-20 and 22 Iris and Motor Trends Cars/19_regularized_regression.py", "max_stars_repo_name": "nlinc1905/dsilt-stats-code", "max_stars_repo_head_hexsha": "22622b3403b9108c68248fff2a97713aaa1fa4c7"...
#include <boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp>
{"hexsha": "6006dad0c43440e529284d642dab2832f9cfd9c8", "size": 57, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_mpl_aux__preprocessed_no_ttp_list_c.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licens...
"""Given a mask and an LULC, create a new LULC with forest on that mask.""" import argparse import logging import ecoshard.geoprocessing import numpy from osgeo import gdal gdal.SetCacheMax(2**27) logging.basicConfig( level=logging.DEBUG, format=( '%(asctime)s (%(relativeCreated)d) %(levelname)s %(...
{"hexsha": "4f4d233d5338245f5544fc77a5dc92be4e36d619", "size": 1580, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/mask_lulc_to_forest.py", "max_stars_repo_name": "therealspring/carbon_edge_model", "max_stars_repo_head_hexsha": "0dcf1107587739ef97c28dc29b5cde878387e041", "max_stars_repo_licenses": ["Apac...
[GOAL] G : Type u_1 H : Type u_2 α : Type u_3 β : Type u_4 E : Type u_5 inst✝⁶ : Group G inst✝⁵ : Group H inst✝⁴ : MulAction G α inst✝³ : MeasurableSpace α inst✝² : MulAction H β inst✝¹ : MeasurableSpace β inst✝ : NormedAddCommGroup E s t : Set α μ : Measure α h_meas : NullMeasurableSet s h_exists : ∀ (x : α), ∃! g, g ...
{"mathlib_filename": "Mathlib.MeasureTheory.Group.FundamentalDomain", "llama_tokens": 33392}
//================================================================================================== /*! @file @copyright 2016 NumScale SAS @copyright 2016 J.T. Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ...
{"hexsha": "9d876202146ffa91566a53ddcfa8362f241a1019", "size": 1462, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/function/rem_pio2_cephes.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_licenses":...
# -*- encoding: utf-8 -*- # pylint: disable=E0203,E1101,C0111 """ @file @brief Runtime operator. """ import numpy from ._op import OpRun class FeatureVectorizer(OpRun): """ Very similar to @see cl Concat. """ def __init__(self, onnx_node, desc=None, **options): OpRun.__init__(self, onnx_node,...
{"hexsha": "07418e1d6b57f19becf1147753ce32c1fdbc9a64", "size": 763, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlprodict/onnxrt/ops_cpu/op_feature_vectorizer.py", "max_stars_repo_name": "Exlsunshine/mlprodict", "max_stars_repo_head_hexsha": "9ea1a0fc85726822cae82c0b27b23b46f9ef351a", "max_stars_repo_license...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 11 13:42:11 2018 @author: Arpit """ from abc import ABC, abstractmethod import numpy as np import copy import logger as lg class Game(ABC): WINNER_R = 1 LOSER_R = -1 DELTAS = { "N":(0, -1), "NE":(1, -1), ...
{"hexsha": "b7623928c045810c65d1f55c066186ad3446d39b", "size": 4788, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/games/game.py", "max_stars_repo_name": "KUTuaNithid/connect4Nithid", "max_stars_repo_head_hexsha": "e96d94dcd162f6dbde0cb041af1cf3277e2a6437", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import pandas as pd import numpy as np import time import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.naive_bayes import GaussianNB df = pd.read_csv('/Users/gympohnpimol/Desktop/machine-learning/naive_bayes/naivebayes.csv') df['Flu'] = np.where(df['Flu'] == 'Y', 1, 0)...
{"hexsha": "36fc033fb2bfcc9835773448057c2e71dc3d5ebe", "size": 1421, "ext": "py", "lang": "Python", "max_stars_repo_path": "naive_bayes/naive_bayes.py", "max_stars_repo_name": "gympohnpimol/machine-learning", "max_stars_repo_head_hexsha": "8aaa9a2966b871ec5e61676f4a21d723465b53a7", "max_stars_repo_licenses": ["MIT"], "...
import cv2 import numpy as np recognizer = cv2.createLBPHFaceRecognizer() recognizer.load('recognizer/trainingData.yml') cascadePath = "haarcascade_frontalface_default.xml" faceCascade = cv2.CascadeClassifier(cascadePath); cam = cv2.VideoCapture(0) font = cv2.cv.InitFont(cv2.cv.CV_FONT_HERSHEY_SIMPLEX, 2, 1, 0, 1, 1...
{"hexsha": "4623cf23d4c1ae328bb9bbadb813c672abca2849", "size": 1037, "ext": "py", "lang": "Python", "max_stars_repo_path": "detector.py", "max_stars_repo_name": "ani8222/facerecognation", "max_stars_repo_head_hexsha": "49c756d19a2b6e53ec8738ec30f42d5ed4b11bdb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#pragma once /* ** Copyright (C) 2016 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QI_ASSERT_HPP_ #define _QI_ASSERT_HPP_ #include <boost/predef/compiler.h> /* TODO: - add assertion variants (assert_if); - add a way to force assert activation whatever the build mode; - add a way to ch...
{"hexsha": "82594c869ec803fd3435a6e0082976e8451c2fac", "size": 1410, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "qi/assert.hpp", "max_stars_repo_name": "arntanguy/libqi", "max_stars_repo_head_hexsha": "7f3e1394cb26126b26fa7ff54d2de1371a1c9f96", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 61...
#!/usr/bin/env python # # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University of Chicago # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://ge...
{"hexsha": "064118fac58283972a2914dc9875789e52364859", "size": 1479, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests_auto/2d/slipdir/TestTri3.py", "max_stars_repo_name": "joegeisz/pylith", "max_stars_repo_head_hexsha": "f74060b7b19d7e90abf8597bbe9250c96593c0ad", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- import scrapy import numpy as np from faker import Factory from douban_movie.dns_cache import _setDNSCache from douban_movie.items import DoubanMovieItem, DoubanMovieCommentItem, DoubanMovieUser try: import urlparse # python2.x except: from urllib import parse as urlparse # python3.x ...
{"hexsha": "c9c239b93a32957f08c010476915356b3487253c", "size": 5920, "ext": "py", "lang": "Python", "max_stars_repo_path": "douban_movie/douban_movie/spiders/movie_item_spider.py", "max_stars_repo_name": "FrozenmChen/yyy", "max_stars_repo_head_hexsha": "0c6734620ce3d06cddd46de5d48ffb7f79fb62ae", "max_stars_repo_license...
module ManeuversWrapper using JavaCall const AbsoluteDate = @jimport org.orekit.time.AbsoluteDate const AbstractConstantThrustPropulsionModel = @jimport org.orekit.forces.maneuvers.propulsion.AbstractConstantThrustPropulsionModel const AbstractDetector = @jimport org.orekit.propagation.events.AbstractDetector const A...
{"hexsha": "19727706ceffffff32ca9381f67bf28008f644e5", "size": 4122, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "gen/OrekitWrapper/ForcesWrapper/ManeuversWrapper/ManeuversWrapper.jl", "max_stars_repo_name": "JuliaAstrodynamics/Orekit.jl", "max_stars_repo_head_hexsha": "e2dd3d8b2085dcbb1d2c75471dab42d6ddf52c99...
import taichi as ti import numpy as np from material import get_texture_value, scatter @ti.data_oriented class Renderer: def __init__(self, image_width, image_height, scene, camera, spp=16, max_depth=10, p_RR=0.8): self.image_width = image_width self.image_height = image_height self.canva...
{"hexsha": "0baffe89ad2f1247ff48265eba80749f45f91a2f", "size": 2843, "ext": "py", "lang": "Python", "max_stars_repo_path": "renderer.py", "max_stars_repo_name": "zhangsz1998/Path-Tracing-Demo", "max_stars_repo_head_hexsha": "07aac17605c68cafde1c6de1552aed44e018b836", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
""" Calls the NWChem executable. """ from decimal import Decimal from typing import Any, Dict, Optional, Tuple import numpy as np import qcelemental as qcel from qcelemental.models import Provenance, Result from qcelemental.util import safe_version, which from ..model import ProgramHarness from ...util import execut...
{"hexsha": "1e59957fc5932a34e03746a60fd34355c7f1339d", "size": 4980, "ext": "py", "lang": "Python", "max_stars_repo_path": "qcengine/programs/nwchem/runner.py", "max_stars_repo_name": "nstair/QCEngine", "max_stars_repo_head_hexsha": "0b64d348adb35836e89b6a3b225d325e700e9e0a", "max_stars_repo_licenses": ["BSD-3-Clause"]...
# Numerické řešení Stokesova problému pomocí MKO Stokesův problém modeluje stacionární velmi pomalé proudění vazké nestlačitelné tekutiny. Je posán následujícími rovnicemi \begin{eqnarray} \nabla\cdot U &=& 0, \\ \nabla p &=& \nabla \cdot(\mu \nabla U). \end{eqnarray} kde $p$ je tlak, $U$ je rychlost (vektor) a $\mu...
{"hexsha": "0697ef6b65626af33129c897ce2cf92ee2c9b791", "size": 552739, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "lessons/03_stokes.ipynb", "max_stars_repo_name": "furstj/NSP", "max_stars_repo_head_hexsha": "4bbfb0eaad3a00943ee596bc0641c3b419db3952", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "1ca6e17f957f035347702909d8fb0e6269d815f2", "size": 2561, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/autogluon_contrib_nlp/base.py", "max_stars_repo_name": "zhilongli/autogluon-contrib-nlp", "max_stars_repo_head_hexsha": "d5b2bb0da7cd860f746fd6bd837210a051988fc8", "max_stars_repo_licenses": [...
import numpy as np from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation, Flatten from keras.layers import Convolution1D from keras.callbacks import ModelCheckpoint, ReduceLROnPlateau from keras.layers.normalization import BatchNormalization from keras.layers.advanced_activations...
{"hexsha": "802bbae16a261e77671f1d0c5f392055b467f921", "size": 2083, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_neural_network.py", "max_stars_repo_name": "smirreee/nnTrader", "max_stars_repo_head_hexsha": "290a0818419f378dec866074e4de86427b0f5010", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/home/fs71386/lkugler/miniconda3/bin/python """Convert `LMU` format to WRF's sounding format.""" import pandas as pd import numpy as np import os, csv, glob def convert_one(f_in, f_out, save_csv=True, debug=False): skiprows = 3 # make sure this is correct with open(f_in) as f: for i, line in enumera...
{"hexsha": "a151c277085c82735e58c6425829cf349185b2eb", "size": 2491, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert_LMU_WRF.py", "max_stars_repo_name": "lkugler/wrf_profile", "max_stars_repo_head_hexsha": "6ccf0b23e3c08012d2f9ccb97a1093482093c7cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # 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...
{"hexsha": "6a35bc7bb91a1f36ff5c612c8b2dac90366017ef", "size": 15482, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_prob.py", "max_stars_repo_name": "KarimAED/pennylane", "max_stars_repo_head_hexsha": "d201dd52def0dfa44efd485e06ea06defda22dc0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import os import torch import logging import numpy as np import pickle from common.speedometer import BatchEndParam from common.utility.image_processing_cv import trans_coords_from_patch_to_org_3d from common.utility.image_processing_cv import rescale_pose_from_patch_to_camera from common_pytorch.common_loss.integral ...
{"hexsha": "b44663f26d20b380c0f1ad882cc71898a17b3241", "size": 17853, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_projects/common_pytorch/net_modules_uncer.py", "max_stars_repo_name": "NiteshBharadwaj/structured_aleatoric_uncertainty_for_human_pose", "max_stars_repo_head_hexsha": "c74fb7384be562f0a0f...
# Copyright (c) Microsoft. All rights reserved. # # Modified by Mary Wahl from work by Patrick Buehler, cf. # https://github.com/Microsoft/CNTK/blob/master/Examples/Image/Detection/FastRCNN/A2_RunCntk_py3.py # # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ==...
{"hexsha": "e09d922ea5c49c5c268cd4b2c1f0e69bff6f5212", "size": 6441, "ext": "py", "lang": "Python", "max_stars_repo_path": "cntk/retrain.py", "max_stars_repo_name": "eggenm/Embarrassingly-Parallel-Image-Classification", "max_stars_repo_head_hexsha": "a4aa44ec757d04e807cfdde936fb3af854818b86", "max_stars_repo_licenses":...
Load LFindLoad. From lfind Require Import LFind. From QuickChick Require Import QuickChick. From adtind Require Import goal4. Derive Show for natural. Derive Arbitrary for natural. Instance Dec_Eq_natural : Dec_Eq natural. Proof. dec_eq. Qed. Derive Show for lst. ...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal4_theorem0_39_lem/lfindconj5synthco...
[STATEMENT] lemma SD_refl' [simp]: "p \<preceq>[SD(le)] p \<longleftrightarrow> p \<in> lotteries_on carrier" [PROOF STATE] proof (prove) goal (1 subgoal): 1. SD le p p = (p \<in> lotteries_on carrier) [PROOF STEP] by (simp add: SD_def carrier_eq)
{"llama_tokens": 107, "file": "Randomised_Social_Choice_Stochastic_Dominance", "length": 1}
# -*- coding: utf-8 -*- """ Created on Thu Feb 8 14:43:34 2018 @author: sreimond """ import numpy as np from copy import deepcopy class Simplex( object ): """ The `Simplex` class holds vertices and optimizes the objective function. """ def __init__( self, objective_function, initial_param...
{"hexsha": "213ade4c39b8631ad5490931c4545ae817597a46", "size": 8004, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/picasso/utils/optimization/downhill_simplex.py", "max_stars_repo_name": "sreimond/picasso", "max_stars_repo_head_hexsha": "89948b1707f44ca03c566da1d4424d9bc208e380", "max_stars_repo_licenses":...
#!/usr/bin/env python2 import cv2 as cv import numpy as np import glob, os from sys import argv kx = 0.1 kx2 = 1 - kx def boundingRect_sel (rect, img_shape): x, y, sw, sh = rect h, w = img_shape if ((kx * w < x) and (kx * h < y) and (kx2 * w > (x + sw)) and ((y + sh) < kx2 * h)): return Tr...
{"hexsha": "43a08a452329f78482939e541016beeb79c0919e", "size": 1954, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute_hu_moments.py", "max_stars_repo_name": "ankey056/curves-hu-moments-analysis", "max_stars_repo_head_hexsha": "78aeadcced25ede23b1f760d487183b5008bcd63", "max_stars_repo_licenses": ["MIT"], ...
import tensorflow as tf from skimage.transform import resize, rescale import cv2 from matplotlib import image from skimage import img_as_ubyte import numpy as np import random import time import glob from model import build_unet import matplotlib.pyplot as plt # Model Configurations input_shape = (256, 256, 3) scale =...
{"hexsha": "342db547a81e3e26f9b4963f032c5e62c20a3ef0", "size": 2742, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "Shanks0465/Localized_SuperResolution_Foreground", "max_stars_repo_head_hexsha": "882fadb6111aefca59c2e2edac335b50abb6abdf", "max_stars_repo_licenses": ["MIT"], "...
""" Copyright 2017 Robin Verschueren This file is part of CVXPY. CVXPY is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CVXPY is distribute...
{"hexsha": "c70294b51c68b9e4c69d539337a1ce1b5a444e6d", "size": 2216, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/reductions/qp2quad_form/qp2symbolic_qp.py", "max_stars_repo_name": "NunoEdgarGFlowHub/cvxpy", "max_stars_repo_head_hexsha": "43270fcc8af8fc4742f1b3519800b0074f2e6693", "max_stars_repo_licens...
# A Python Tour of Data Science: Data Exploitation [Michaël Defferrard](http://deff.ch), *PhD student*, [EPFL](http://epfl.ch) [LTS2](http://lts2.epfl.ch) The data `X.npy` and `y.npy` can be obtained by running the [data acquisition and exploration demo](01_demo_acquisition_exploration.ipynb). ```python # Cross-pla...
{"hexsha": "ec1cf991cf70ec3da1c6046cab0aa3c3789ac1e2", "size": 24359, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "toolkit/02_demo_exploitation.ipynb", "max_stars_repo_name": "vinceHardy/learning", "max_stars_repo_head_hexsha": "941e5979d471567411e7593c36617ef4a8e47f70", "max_stars_repo_licenses"...
from __future__ import print_function import torch import torch.nn as nn import numpy as np from types import MethodType import models from utils.metric import accuracy, AverageMeter, Timer from sklearn.metrics import roc_auc_score from sklearn.metrics import average_precision_score class NormalNN(nn.Module): '''...
{"hexsha": "91bcd59be44c4b333a63f8cde9f0d2f7c894a811", "size": 14956, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/agents/default.py", "max_stars_repo_name": "markozeman/TransformerSuperposition", "max_stars_repo_head_hexsha": "a0638c8cb7a346dc9bd0ac992ce5bf306d44303b", "max_stars_repo_licenses": [...
# -*- coding: utf-8 -*- # Author: Florian Mayer <florian.mayer@bitsrc.org> from __future__ import absolute_import import os import shutil from tempfile import mkdtemp from datetime import datetime import numpy as np import sunpy.data.test from sunpy.data.sample import CALLISTO_IMAGE from sunpy.spectra.sources.cal...
{"hexsha": "09907649f9c10d8c7cb291fec8e5f463dd71f4c4", "size": 4321, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunpy/tests/spectra/test_callisto.py", "max_stars_repo_name": "jslhs/sunpy", "max_stars_repo_head_hexsha": "74fe60e9ffc769c5c493db618f4c81106bdbc7f8", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
[STATEMENT] lemma subscene_trans: "\<lbrakk> idem_scene Y; X \<subseteq>\<^sub>S Y; Y \<subseteq>\<^sub>S Z \<rbrakk> \<Longrightarrow> X \<subseteq>\<^sub>S Z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>idem_scene Y; X \<subseteq>\<^sub>S Y; Y \<subseteq>\<^sub>S Z\<rbrakk> \<Longrightarrow> X \<subset...
{"llama_tokens": 176, "file": "Optics_Scenes", "length": 1}
# Common imports import numpy as np import os # To plot pretty figures import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.style as style # style.use('bmh') from mpl_toolkits.mplot3d import Axes3D mpl.rc('axes', labelsize=14) mpl.rc('xtick', labelsize=12) mpl.rc('ytick', labelsize=12) import pa...
{"hexsha": "fc25d5476d40e588cd44893c2ff172849c9329ec", "size": 2808, "ext": "py", "lang": "Python", "max_stars_repo_path": "moons_fixed.py", "max_stars_repo_name": "EllyessB/WGAN-Regression", "max_stars_repo_head_hexsha": "64962b3548abc3b5c853bdc65e4977fc82242571", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
[STATEMENT] lemma match_rderive: "wf_regex r \<Longrightarrow> i \<le> j \<Longrightarrow> (i, Suc j) \<in> match r \<longleftrightarrow> (i, j) \<in> match (rderive r)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>wf_regex r; i \<le> j\<rbrakk> \<Longrightarrow> ((i, Suc j) \<in> match r) = ((i, j) \<in>...
{"llama_tokens": 11625, "file": "VYDRA_MDL_MDL", "length": 21}
cat("Hello world!\n")
{"hexsha": "59c003643f7685de153faa819eed12e974960627", "size": 23, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Hello-world-Text/R/hello-world-text-1.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_stars_repo_licenses":...
// Boost.TypeErasure library // // Copyright 2011 Steven Watanabe // // 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) // // $Id$ #include <boost/type_erasure/any.hpp> #include <boost/type_erasure/tuple.hpp> #inclu...
{"hexsha": "3a1dc9c61cf1d995c6a99e6919792e4c4542ec3f", "size": 2890, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.71.0/libs/type_erasure/test/test_add.cpp", "max_stars_repo_name": "rajeev02101987/arangodb", "max_stars_repo_head_hexsha": "817e6c04cb82777d266f3b444494140676da98e2", "max_stars_rep...
using Plots using Random Random.seed!(1) include_ddp() include(joinpath(pwd(), "models/visualize.jl")) vis = Visualizer() render(vis) function visualize!(vis, model, q; r = 0.025, Δt = 0.1) default_background!(vis) torso = Cylinder(Point3f0(0.0, 0.0, 0.0), Point3f0(0.0, 0.0, model.l_torso), convert(Float...
{"hexsha": "add09c9e39d7e5637060f0e6c6337b4ffdadefd2", "size": 15106, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/differential_dynamic_programming/quadruped_contact_implicit.jl", "max_stars_repo_name": "thowell/motion_planning", "max_stars_repo_head_hexsha": "d42d80e705c1e64e45f5872917b96c6a980398cc"...
# generic lattice plotting in 2D (with fance everything) function plotLattice( lattice :: L ; figsize :: Tuple{<:Real, <:Real} = (8,5), coordinate_system :: Bool = false, kwargs... ) where {LS,LB,N,S<:AbstractSite{LS,2},B<:AbstractBond{LB,N},U,L<:AbstractLat...
{"hexsha": "9da4f20b3407a83b9b3da1253cbd675c85b54407", "size": 1313, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/lattice_plotting_2d.jl", "max_stars_repo_name": "crstnbr/LatPhysPlottingPyPlot.jl", "max_stars_repo_head_hexsha": "fca859946013a905433b870e8f5e7886c81ef43f", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma dnf_ltln_of_dnf_min_dnf: "dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi> [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<p...
{"llama_tokens": 1499, "file": "LTL_Disjunctive_Normal_Form", "length": 17}
import numpy as np import random,os from multiprocessing import Process, Queue, Pool, Lock import sys import traceback import util from util import cprint, bcolors from skimage.transform import resize import copy class DBInterface(): def __init__(self, params): self.params = params self.load_ite...
{"hexsha": "ea9d1f6fe89197eb8b01ee0cb225c54e3e1dd90e", "size": 8994, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/one-shot-seg/ss_datalayer.py", "max_stars_repo_name": "MarcWong/tensorpack", "max_stars_repo_head_hexsha": "51ab279480dc1e3ffdc07884a9e8149dea9651e9", "max_stars_repo_licenses": ["Apache-...
import os import numpy as np import tensorflow as tf from scipy import sparse import sys import getopt import time from load_cf_data import load_tr_te_data, load_train_data from load_text_data import load_data from evaluate import evaluate_all from nb_vae import NegativeBinomialVAE from nb_vae_b import NegativeBinomia...
{"hexsha": "15fb3bbe3a64919b10c572be00487cce4137c71c", "size": 11825, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_nbvae.py", "max_stars_repo_name": "ethanhezhao/NBVAE", "max_stars_repo_head_hexsha": "d546f56e0b3ed39ea3d1421ae929e5f3cbe3c3dd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "ma...
% TODO BY FELIX The following chapter will describe the graphical user interface of Voxie. \subsection{Windows} Voxie is an application built around one main window. It contains all main features like showing visualizers and the runtime configuration in the side panel. \subsubsection{Main Window} \begin{figure}[h]...
{"hexsha": "7e2b811d1dc8964a6617b8aa07a98c297bf358b4", "size": 7830, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/old-manual/ui.tex", "max_stars_repo_name": "voxie-viewer/voxie", "max_stars_repo_head_hexsha": "d2b5e6760519782e9ef2e51f5322a3baa0cb1198", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
module Main import GLCore import JSArrays import Shaders import JSMatrix.JSMatrix -- Save time, just get the canvas directly by id getElemById : String -> IO Element getElemById s = do x <- mkForeign (FFun "document.getElementById(%0)" [FString] FPtr) s return (MkElem x) getElemFloatProp : String -> Element -> ...
{"hexsha": "f3b77120fd1337500ea48bd3cd7b5db6a84e9b9f", "size": 4511, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "3DExample/Main.idr", "max_stars_repo_name": "mankyKitty/idris-webgl", "max_stars_repo_head_hexsha": "78d4ebd51f07db898b0a09e54dca1159eefb5ca7", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python import rospy from geometry_msgs.msg import PoseStamped from styx_msgs.msg import Lane, Waypoint from std_msgs.msg import Int32 from scipy.spatial import KDTree import numpy as np import math ''' This node will publish waypoints from the car's current position to some `x` distance ahead. As me...
{"hexsha": "85716acc7ac8570ed9537913840dcc1b33112b5f", "size": 7880, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros/src/waypoint_updater/waypoint_updater.py", "max_stars_repo_name": "xzho2604/Mr_Robot_Self_Driving", "max_stars_repo_head_hexsha": "abf0e5ddc6ff141aa376c3adb885898793cb2ed6", "max_stars_repo_li...
[STATEMENT] lemma mkM_simps[simp]: "worlds (mkM T) = T" "\<lbrakk> (t, t') \<in> relations (mkM T) a \<rbrakk> \<Longrightarrow> jview a t = jview a t'" "\<lbrakk> (t, t') \<in> relations (mkM T) a \<rbrakk> \<Longrightarrow> t \<in> T" "\<lbrakk> (t, t') \<in> relations (mkM T) a \<rbrakk> \<Longrightarrow> t'...
{"llama_tokens": 731, "file": "KBPs_KBPs", "length": 2}
Require Import Coq.ZArith.ZArith. Require Import Coq.micromega.Lia. Require Import Coq.Strings.String. Require Import Coq.Lists.List. Require Import bedrock2.ProgramLogic. Require Import bedrock2.Syntax. Require Import coqutil.Word.Interface. Require Import Crypto.AbstractInterpretation.AbstractInterpretation. Require ...
{"author": "Veridise", "repo": "Coda", "sha": "d22d56c09ac541f012adae34820850ce6cd10270", "save_path": "github-repos/coq/Veridise-Coda", "path": "github-repos/coq/Veridise-Coda/Coda-d22d56c09ac541f012adae34820850ce6cd10270/BigInt/fiat-crypto/src/Bedrock/Field/Synthesis/Specialized/WordByWordMontgomery.v"}
#!/usr/bin/env python # =============================================================================== # Copyright 2017 Geoscience Australia # # 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 th...
{"hexsha": "a370460cae2a48ba62529bcaecd9ad8e931802fa", "size": 5558, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/conversion/netcdf2segy/conversion_p50.py", "max_stars_repo_name": "Neil-Symington/aem_interp_dash", "max_stars_repo_head_hexsha": "f7c6f385838b455a2c1e9d3a1db5f675a327b8dd", "max_stars_repo_...
function z_callBack_virtualTeachPendant_J3_plus() %% Soft realtime joints control Joint X button callback % Copyright: Mohammad SAFEEA, 27th-July-2018 global virtual_smartPad_w_joints_command; disp('Moving J3 in positive direction'); virtual_smartPad_w_joints_command(3)=1; end
{"author": "Modi1987", "repo": "KST-Kuka-Sunrise-Toolbox", "sha": "9299bed2b46058aeb4105d7fbff6d2290ce68bba", "save_path": "github-repos/MATLAB/Modi1987-KST-Kuka-Sunrise-Toolbox", "path": "github-repos/MATLAB/Modi1987-KST-Kuka-Sunrise-Toolbox/KST-Kuka-Sunrise-Toolbox-9299bed2b46058aeb4105d7fbff6d2290ce68bba/SunriseGUIi...
""" Created on Tuesday, March 19th, 2019. This script plots the following ratio in a similar fashion to plotTest.py 1) Ethane / Methane This code was written in Spyder via Anaconda Distribution [Python 3.7] """ ## Import Libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd from matplotli...
{"hexsha": "b30b8b3827cbfc1424e492fe819ce8edc3c79e8d", "size": 2454, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyses/Outdated/nmhc_YearlyComparisons/ethaneMethane.py", "max_stars_repo_name": "ARLlab/Summit", "max_stars_repo_head_hexsha": "1aa0d85cedebe85fab969df004409cc8f28595b3", "max_stars_repo_licens...
import os import random import tempfile from typing import Tuple import numpy as np import pytest import torch from pytorch_lightning.loggers import CSVLogger from pytorch_lightning.loggers import LoggerCollection from pytorch_lightning.loggers import MLFlowLogger from pytorch_lightning.loggers import TensorBoardLogge...
{"hexsha": "7cc72553e74786dc4d209386fd8e45901410afce", "size": 7486, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/text/test_trainer.py", "max_stars_repo_name": "ignacioct/biome-text", "max_stars_repo_head_hexsha": "e4eab5fd4ea9115bd600f61e97429977053da2a5", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy #Physical constants EPS_0 =8.85418782e-12 # F/m, vacuum permittivity K =1.38064825e-23 # J/K, Boltzmann constant ME =9.10938215e-31 # kg, electron mass QE = -1.602176565e-19 # C, electron charge AMU =1.660538921e-27 # kg, atomic mass unit MP = 1.007276467*AMU # kg, proto...
{"hexsha": "2944e1752e93477c323373438bc9c8cb3e54ef75", "size": 2774, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/2021_12_31/py_files/constants_cm.py", "max_stars_repo_name": "jagarciap/SCSI", "max_stars_repo_head_hexsha": "0972548adf17a27b78ef2865a837bf20aadca3e9", "max_stars_repo_licenses": ["MIT"]...
Require Import Crypto.Arithmetic.PrimeFieldTheorems. Require Import Crypto.Specific.solinas64_2e285m9_5limbs.Synthesis. (* TODO : change this to field once field isomorphism happens *) Definition square : { square : feBW_loose -> feBW_tight | forall a, phiBW_tight (square a) = F.mul (phiBW_loose a) (phiBW_loose a)...
{"author": "anonymous-code-submission-01", "repo": "sp2019-54-code", "sha": "8867f5bed0821415ec99f593b1d61f715ed4f789", "save_path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code", "path": "github-repos/coq/anonymous-code-submission-01-sp2019-54-code/sp2019-54-code-8867f5bed0821415ec99f593b1d61f715ed4f7...
from __future__ import print_function import numpy as np def read_su2(su2_filename, log=None, debug=False): model = SU2Reader(log=log, debug=debug) unused_ndim, nodes, elements, regions = model.read_su2(su2_filename) #model.to_cart3d() return model, nodes, elements, regions class SU2Reader(object): ...
{"hexsha": "7005aa3a3041817e175384fbbceb1b3260504d79", "size": 6769, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNastran/converters/su2/su2_reader.py", "max_stars_repo_name": "jtran10/pyNastran", "max_stars_repo_head_hexsha": "4aed8e05b91576c2b50ee835f0497a9aad1d2cb0", "max_stars_repo_licenses": ["BSD-3-Cl...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // Se...
{"hexsha": "70abd7da2a91eabf6935e5f29807a03fa39e5071", "size": 3370, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/core/elliptic/include/nt2/elliptic/functions/scalar/ellik.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars_repo_...
""" Author Djoffrey some harmonic pattern scanner functions (TODO: calculate using (high+low)/2 or etc, not just close price) (TODO: should return each peak distance) """ import pandas as pd import numpy as np import talib.abstract as ta # from scipy.signal import argrelextrema import mplfinance as mpf MAIN_FIBB_RAT...
{"hexsha": "3b01830a161b5f8d354555ad08dfffa7d6c23d43", "size": 55330, "ext": "py", "lang": "Python", "max_stars_repo_path": "HarmonicPatterns/harmonic_functions.py", "max_stars_repo_name": "kfreskgard/HarmonicPatterns", "max_stars_repo_head_hexsha": "57f15007f5ac78255c588bf78ab64d81b33e2490", "max_stars_repo_licenses":...
import pyclesperanto_prototype as cle import numpy as np def test_subtract_gaussian_background(): test1 = cle.push(np.asarray([ [0, 0], [1, 1], [2, 2] ])) reference = cle.difference_of_gaussian(test1, sigma1_x=0, sigma1_y=0, sigma1_z=0, sigma2_x=5, sigma2_y=5, sigma2_z=5) res...
{"hexsha": "2051367030622b5d64acfd0ca3e25d17034929e0", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_subtract_gaussian_background.py", "max_stars_repo_name": "elsandal/pyclesperanto_prototype", "max_stars_repo_head_hexsha": "7bda828813b86b44b63d73d5e8f466d9769cded1", "max_stars_repo_lic...
program arr2 integer:: a(10,10), b(-10:10) integer:: c = -3 integer:: d = 5 a(d,d) = 10 b(c) = 10 print *,(a(d,d) + b(-3)) end program arr2
{"hexsha": "ffee9ea2c8b01a990e0f1bb256d0d632f7d9f4df", "size": 152, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/stmts/assignments/arrays/arr_assign2.f90", "max_stars_repo_name": "clementval/fc", "max_stars_repo_head_hexsha": "a5b444963c1b46e4eb34d938d992836d718010f7", "max_stars_repo_licenses": ["BSD-...
#include <triumf/nmr/dipole_dipole.hpp> #include <boost/math/constants/constants.hpp> #include <cmath> double dipole_dipole(const double *x, const double *par) { double omega_d = std::abs(par[2] * par[3] * par[0] * par[0]); double factor = par[1] * (3.0 / 10.0); double normalization = factor / omega_d; retur...
{"hexsha": "d221a8c58d529b90bf365b2a66b9753caf9fc305", "size": 2636, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "examples/plot_dipole_dipole.cpp", "max_stars_repo_name": "rmlmcfadden/triumfpp", "max_stars_repo_head_hexsha": "da3911cdf1b0ee4600d27999d484f9a1bdb89b91", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Select a Shortlist of Applicants Based on Uniform Mass Binning (details in the paper). """ import argparse import pickle import numpy as np from train_LR import NoisyLR from utils import calculate_expected_selected, calculate_expected_qualified, transform_except_last_dim class UMBSelect(object): def __init__(...
{"hexsha": "f5e3687aba347da6f8e557c5894c11c494e66b04", "size": 6495, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/umb_ss.py", "max_stars_repo_name": "LequnWang/Improve-Screening-via-Calibrated-Subset-Selection", "max_stars_repo_head_hexsha": "de397a600b7ac1d4a2a844c58bb7ebde29841b2a", "max_stars_repo_lice...
""" https://github.com/opencv/opencv/tree/master/samples/python """ import cv2 import numpy as np MAX_MATCHES = 500 # MAX_FEATURES - max number of ORB features to detect in the two images. GOOD_MATCH_PERCENT = 0.15 def align_img(im1, im2): # Convert images to grayscale im1Gray = cv2.cvtColor(im1, cv2.COLOR...
{"hexsha": "26b1ab0507c4f42f21428c40f6afedd10e55a061", "size": 3153, "ext": "py", "lang": "Python", "max_stars_repo_path": "advanced_fields/computer_vision/image_processing/image_alignment.py", "max_stars_repo_name": "EliorBenYosef/data-science", "max_stars_repo_head_hexsha": "117e5254f63e482c02aff394780bbdc205d492a3",...
import numpy as np from .constants import FILTER_TYPE # transform a dict of <column name -> value range> mappings into a mask def compute_filter(filters, full_df): masks = [] for f in filters: filter_func = lambda x: True if f['key'] in full_df.columns: if f['type'] == FILTER_TYPE...
{"hexsha": "9220366b6d4405dda27536d9f4bb6c57d91ef45b", "size": 1103, "ext": "py", "lang": "Python", "max_stars_repo_path": "bindings/python-compute/utils.py", "max_stars_repo_name": "geekayush/manifold", "max_stars_repo_head_hexsha": "a7195b6c18ea12983f8faf554a5acda517192e94", "max_stars_repo_licenses": ["Apache-2.0"],...
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...
{"hexsha": "07105e672fea327877eab96a081b30e3d78dcfa3", "size": 5136, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpc/kmpc_casadi/utility/casadi-example_pack-v3.4.4/python/direct_collocation.py", "max_stars_repo_name": "se-hwan/MIT_Driverless", "max_stars_repo_head_hexsha": "7674b29887ba518c134cfba805432f9c98...
import numpy as np import pytest from nlp_profiler.granular_features.numbers import \ NaN, gather_whole_numbers, count_whole_numbers # noqa text_with_a_number = '2833047 people live in this area' text_to_return_value_mapping = [ (np.nan, []), (float('nan'), []), (None, []), ] @pytest.mark.parametr...
{"hexsha": "d5cafbbb81088d52bb4c3dbfcd9dd5ab5b5a7444", "size": 1785, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/granular/test_numbers.py", "max_stars_repo_name": "EpcLoler/nlp_profiler", "max_stars_repo_head_hexsha": "bf609457866faf4c4f8e9b57ef2b2e07227cf8e9", "max_stars_repo_licenses": ["Apache-2.0"]...
""" Plot the 1D intraparticle transient heat conduction and pyrolysis kinetics for a solid sphere, cylinder, or slab shape. Assumptions: Convection boundary condition at surface. Moisture content in the biomass particle as free water. Heat transfer via radiation assumed to be negligable. Particle does not shrink or ex...
{"hexsha": "677f0c57bcbc8ff708e804c6a6ff69a8c442a834", "size": 5243, "ext": "py", "lang": "Python", "max_stars_repo_path": "particle_liden.py", "max_stars_repo_name": "ccpcode/low-order-reactor", "max_stars_repo_head_hexsha": "57c33e00e8e4e5f612dd375448df3fbcb635f4a9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#' Create a `listdown` Document Bundle #' #' @description A page bundle encapsulates the computational components, #' R Markdown header, and listdown object. Together, these three objects #' are sufficient to create a document, which can be written with the #' `ld_create_document()` function. #' @seealso ld_create_d...
{"hexsha": "e2cbcd81ffc1117aba67228421482060babd4210", "size": 13583, "ext": "r", "lang": "R", "max_stars_repo_path": "R/build-site.r", "max_stars_repo_name": "joundso/listdown", "max_stars_repo_head_hexsha": "2f589e6b03bc4e178177e7a02573a127dcfc7e55", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 16, "...
[STATEMENT] lemma mset_factors_to_fun_inj: shows "inj_on (mset_factors_to_fun R m) (mset_factors m) " [PROOF STATE] proof (prove) goal (1 subgoal): 1. inj_on (mset_factors_to_fun R m) (mset_factors m) [PROOF STEP] proof [PROOF STATE] proof (state) goal (1 subgoal): 1. \<And>x y. \<lbrakk>x \<in> mset_factors m; y \...
{"llama_tokens": 2556, "file": "Padic_Field_Cring_Multivariable_Poly", "length": 35}
/// @file rainbow-gen-userpk.c /// @brief A command-line tool for generating the user public keys. #include <rainbow_keypair.h> #include <stdlib.h> #include <stdio.h> #include <api.h> #include <utils.h> #include <string.h> #include <blas.h> int main(int argc, char **argv) { printf("%s\n", CRYPTO_ALGNAME); ...
{"hexsha": "c7b6f43178044fbfc1129ebafd72007f35bc3672", "size": 2155, "ext": "c", "lang": "C", "max_stars_repo_path": "Reference_Implementation/rainbow-gen-userpk.c", "max_stars_repo_name": "mnmuser/ibs-rainbow", "max_stars_repo_head_hexsha": "f219cb091f15073c6e7f40fefbe1086f4314aae0", "max_stars_repo_licenses": ["MIT"]...
""" Created on Tue Oct 14 18:52:01 2014 @author: Wasit """ import numpy as np import os from PIL import Image from scipy.ndimage import filters try: import json except ImportError: import simplejson as json rootdir="../dataset" mrec=64 mtran=64 margin=mrec+mtran class dataset: def __init__(self): '...
{"hexsha": "4dd6c032e69b03062c530674cc6c3f1743d666bf", "size": 9743, "ext": "py", "lang": "Python", "max_stars_repo_path": "randomForest_tutorials/_src_1core_1tree/scdataset_image.py", "max_stars_repo_name": "wasit7/cs402", "max_stars_repo_head_hexsha": "5a0f945eb7c9944edc0a423d5c37bc4ef867b950", "max_stars_repo_licens...
# 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 logging import warnings import torch import numpy as np from data import data_utils from data.ofa_dataset import OFADataset logger = ...
{"hexsha": "0aa52f5d8fae2ac85650f40a6d295f3b75c1ccf6", "size": 4672, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/nlu_data/qnli_dataset.py", "max_stars_repo_name": "zhaoguangxiang/OFA", "max_stars_repo_head_hexsha": "cc1719df2713f0a046f34acb0afd8782e08ea6be", "max_stars_repo_licenses": ["Apache-2.0"], "m...
\documentclass[../dissertation.tex]{subfiles} \begin{document} \textit{This should include a description of the project customer (what was the nature of the organisation you were working for), their objectives for the project, and a summary of what was actually achieved. Where appropriate, this section should also ma...
{"hexsha": "916862da2bb338c218b27bb32625db592015a711", "size": 1069, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/dissertation/sections/case_study.tex", "max_stars_repo_name": "Ashwin-MJ/UniCom", "max_stars_repo_head_hexsha": "89d02bd93ba7de6fd774a8a0be9c4b8c12f8ee99", "max_stars_repo_licenses": ["Unlicens...
# -*- coding: utf-8 -*- """ Created on Mon Aug 10 13:17:43 2015 @author: Eric Dodds """ from os import listdir import os import scipy import numpy as np import matplotlib.pyplot as plt from matplotlib.mlab import specgram from librosa.core import constantq from librosa.core import load as wavload from librosa.core im...
{"hexsha": "dd3d31fdb7bf06dbf1d9e5a5808988a98e7d6931", "size": 13279, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing.py", "max_stars_repo_name": "emdodds/audioprep", "max_stars_repo_head_hexsha": "83232076e0c1b485b3585a2f6be60a440dd86530", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...