text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# -*- coding: utf-8 -*- """ Created on Sun Nov 5 21:31:02 2017 @author: thuzhang """ import numpy as np import pandas as pd from matplotlib import pyplot as plt from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestRegressor from sklearn.ensemble import GradientBoostingRegres...
{"hexsha": "80ec147109819e66e84d7d1ec4c6fd44c7807724", "size": 1344, "ext": "py", "lang": "Python", "max_stars_repo_path": "MultiLevelForecast/TwoDayAhead/SeasonalPredict.py", "max_stars_repo_name": "AmateurZhang/EnjoyWithDataOnPowerSystems", "max_stars_repo_head_hexsha": "64227d0505012d2b5650874c65268e85d9751a17", "ma...
(* -------------------------------------------------------------------- * Copyright (c) - 2006--2012 - IMDEA Software Institute * Copyright (c) - 2006--2012 - Inria * Copyright (c) - 2006--2012 - Microsoft Coprporation * * Distributed under the terms of the CeCILL-B-V1 license * ----------------------------------...
{"author": "EasyCrypt", "repo": "certicrypt", "sha": "7b3cd2fe4a317aec38dfff9eec902b265c575587", "save_path": "github-repos/coq/EasyCrypt-certicrypt", "path": "github-repos/coq/EasyCrypt-certicrypt/certicrypt-7b3cd2fe4a317aec38dfff9eec902b265c575587/Examples/Indifferentiability/ECurve/PrimalityTest/PGroup.v"}
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import cv2 class Handler: def __init__(self): self.name = __name__ def predict_transform(self, prediction, inp_dim, anchors, num_classes, CUDA=Tru...
{"hexsha": "24c0ad700cf5e4d0fef36c9ba9c63bc0851f1f2b", "size": 2510, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/core/models/internal/yolo/v3/util.py", "max_stars_repo_name": "romanovacca/detectioncollection", "max_stars_repo_head_hexsha": "98f43ceb4ddd51af39fd6566685a8dc57a1380b4", "max_stars_repo_licen...
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \file genScanNetData.py \brief Code to train a segmentation network on the ScanNet dataset. \copyright Copyright (c) 2018 Visual Computing group of Ulm University, Germany. See the LICENSE file at the top-level...
{"hexsha": "e3cc2e3787c64522fd3b8dd127f2600d4c467adc", "size": 20702, "ext": "py", "lang": "Python", "max_stars_repo_path": "ScanNet/ScanNet.py", "max_stars_repo_name": "chenzhutian/MCCNN", "max_stars_repo_head_hexsha": "e28ca4a2deeecbfd1c8939ca666fcc010554fcbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9...
FUNCTION MV_EI32 ( n, valin, valout ) C************************************************************************ C* MV_EI32 * C* * C* This function converts an array of IEEE 32-bit real numbers to * C* IBM 32-bit real numbers. The input and output arrays may be the * C* same. * C* * C* IN...
{"hexsha": "a0bae328a15919332cf819a08c83ae4695721a2a", "size": 2575, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gemlib/mv/Linux/mvei32.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Claus...
import pytest import pandas as pd import numpy as np #from collections import namedtuple #from collections import OrderedDict import pyactms as ms class TestActMS(object): def test_getProtocol(self): pass
{"hexsha": "f954fcbc8fd929438a5efc8a210ff16dc5165a01", "size": 227, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_actms.py", "max_stars_repo_name": "seblum/pyactms", "max_stars_repo_head_hexsha": "46ddb59a9582b53e5fac805340e7fd56a7d7d133", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
#include <boost/static_string/static_string.hpp> int main() { boost::static_string<5> s1("UVXYZ", 3); return s1 == "UVX" ? 0 : 1; }
{"hexsha": "914860644df7952d37cdfb0f1de7c0a2dbb0386b", "size": 137, "ext": "cc", "lang": "C++", "max_stars_repo_path": "test/static_string_test.cc", "max_stars_repo_name": "wxthon/rules_boost", "max_stars_repo_head_hexsha": "46916bd45a7ed0f1f64f5b5dff0fec5b87870d0a", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
/** * @file VolumeBrickOctree.cpp * @author Sebastian Maisch <sebastian.maisch@uni-ulm.de> * @date 2015.08.17 * * @brief Implementation of the layered octree. */ #include "VolumeBrickOctree.h" #include "gfx/glrenderer/GLTexture3D.h" #include "gfx/glrenderer/GLTexture.h" #include "app/ApplicationBase.h" #inc...
{"hexsha": "64102c0e774d3d96f66fa02544121c2b71ece6d5", "size": 14568, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "OGLFramework_uulm/gfx/volumes/VolumeBrickOctree.cpp", "max_stars_repo_name": "dasmysh/OGLFramework_uulm", "max_stars_repo_head_hexsha": "b067b20ff2fc4350e4eea41493bda2c9a097921d", "max_stars_repo_l...
[STATEMENT] lemma rank_le_if_sorted_from_list: assumes "sorted cmp'' ((v1,e1)#ys)" and "is_subtree (Node r0 {|(t0,e0)|}) (dtree_from_list v1 ys)" shows "rank (rev r0) \<le> rank (rev (root t0))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. rank (rev r0) \<le> rank (rev (dtree.root t0)) [PROOF STEP] proof - [PR...
{"llama_tokens": 1766, "file": "Query_Optimization_IKKBZ", "length": 17}
# Autogenerated wrapper script for Tcl_jll for x86_64-linux-gnu export libtcl using Zlib_jll JLLWrappers.@generate_wrapper_header("Tcl") JLLWrappers.@declare_library_product(libtcl, "libtcl8.6.so") function __init__() JLLWrappers.@generate_init_header(Zlib_jll) JLLWrappers.@init_library_product( libtcl...
{"hexsha": "9086e17175f1b0ef3e86dba6082db841dd075735", "size": 450, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/x86_64-linux-gnu.jl", "max_stars_repo_name": "JuliaBinaryWrappers/Tcl_jll.jl", "max_stars_repo_head_hexsha": "94fce4d69586523974ace7b99a6eea42b17a2f85", "max_stars_repo_licenses": ["MIT...
import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy import stats import arviz as az az.style.use('arviz-darkgrid') μ = 0. σ = 1. X = stats.norm(μ, σ) x = X.rvs(1500) x[0:50] x.mean() mu_params = [-1, 0, 1] sd_params = [0.5, 1, 1.5] x = np.linspace(-7, 7, 2000) _, ax = plt.subplots...
{"hexsha": "18858f828059bf503aa4f18f55ab6b20a0358be5", "size": 3387, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter01/.virtual_documents/01 Thinking Probabilistically.ipynb.py", "max_stars_repo_name": "Vedia-JerezDaniel/Bayesi_py", "max_stars_repo_head_hexsha": "3d598c5b740157eb4761989f3b4e357d1598b7cf"...
# -*- coding: utf-8 -*- import os from pathlib import Path import matplotlib import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import StandardScaler import numpy as np """ Utility functions for loading, saving, processing and visualizing hdf5 timeseries files ""...
{"hexsha": "539f0ec3f512eee32138d060dfe370e64c5d130e", "size": 3727, "ext": "py", "lang": "Python", "max_stars_repo_path": "hdf5/utils_hdf5.py", "max_stars_repo_name": "agrija9/Wind-Turbine-Anomaly-Detection-VRAE", "max_stars_repo_head_hexsha": "91d3c95f2f19cc9a57f5b9ddff5934cabf0cea30", "max_stars_repo_licenses": ["MI...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: layers.py # Author: Qian Ge <geqian1001@gmail.com> import numpy as np import tensorflow as tf def Linear(inputs, out_dim, name='Linear', nl=tf.identity): with tf.variable_scope(name, reuse=tf.AUTO_REUSE): inputs = batch_flatten(inputs) in_dim...
{"hexsha": "bb18b7c77c755f1f4c314948972bca61e0795b86", "size": 1224, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/model/layers.py", "max_stars_repo_name": "kanedo/recurrent-attention-model", "max_stars_repo_head_hexsha": "8da82b7fbeb7c94859a1d4fd428ea112bde9a0c9", "max_stars_repo_licenses": ["MIT"], "max_...
import logging import mlflow import numpy as np import optuna from omegaconf import DictConfig from optuna.integration.mlflow import MLflowCallback from optuna.trial import Trial from sklearn.metrics import accuracy_score, log_loss, roc_auc_score from sklearn.model_selection import TimeSeriesSplit, train_test_split fr...
{"hexsha": "ca5286a8a92a5c8255a4bc04cf6a94f29293b3b3", "size": 3451, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/elo/step.py", "max_stars_repo_name": "AnH0ang/big-data-challenge", "max_stars_repo_head_hexsha": "aa9ba92e2355bc2838a037219d20d387e2eefdbb", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import remote_data from ... import datasets @remote_data def test_load_catalog_atnf(): catalog = datasets.load_cata...
{"hexsha": "d4699f9bae5ac73f393daed3019e719918c9c21d", "size": 942, "ext": "py", "lang": "Python", "max_stars_repo_path": "gammapy/datasets/tests/test_catalogs.py", "max_stars_repo_name": "joleroi/gammapy", "max_stars_repo_head_hexsha": "c4e0c4bd74c79d30e0837559d18b7a1a269f70d9", "max_stars_repo_licenses": ["BSD-3-Clau...
#pragma once #include "Concepts.hpp" #include <boost/hana/tuple.hpp> #include <span> namespace codys { template <typename Tag, typename Unit_> struct State { using Unit = Unit_; using depends_on = boost::hana::tuple<State<Tag, Unit>>; template <class SystemType, std::size_t N> constexpr static do...
{"hexsha": "df4fe66cd2af7f8a07e23890d2135c6bd5cf4851", "size": 467, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/codys/State.hpp", "max_stars_repo_name": "hansepp/codys", "max_stars_repo_head_hexsha": "987af24cca75745916f4dad03f75a3d0a05586fd", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count"...
using Random using MLJ using SigmaRidgeRegression id_design = BlockCovarianceDesign([IdentityCovarianceDesign(), IdentityCovarianceDesign()]) ps = [100; 100] grp = GroupedFeatures(ps) design = set_groups(id_design, grp) αs = [1.0; 1.0] ntest = 20_000 ntrain = 400 ridge_sim = GroupRidgeSimulationSettings(; groups...
{"hexsha": "52ddac92d3a6255c0982cabd36c44e9555691566", "size": 1196, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_simulations.jl", "max_stars_repo_name": "nignatiadis/SigmaRidgeRegression.jl", "max_stars_repo_head_hexsha": "f9dc3300250c87200b66ddae17501e174c221f21", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python import numpy as np from sys import argv class Body: def __init__(self, m, x_init, v_init): self.m = m # in kg self.x = x_init # in m self.v = v_init # in m/s def p_transfer(u1, u2, m1, m2): # from conservation of energy and momentum v1 = ((m1-m2)/(m1+m2))*u1...
{"hexsha": "f8e2ada27e916bf0c101dd88d5703645254deb50", "size": 2759, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python-implementation/collision-sim.py", "max_stars_repo_name": "physicodes/collision-sim", "max_stars_repo_head_hexsha": "aa90d7af9565d95996999b8f2dc4a1fe14d14308", "max_stars_repo_licenses": ["M...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
{"hexsha": "da0f18e77c94a875f589bac0a6bb49c07b3135cb", "size": 4927, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/federatedml/federatedrec/factorization_machine/homo_factorization_machine/homo_fm_arbiter.py", "max_stars_repo_name": "showKstage/fut-fate", "max_stars_repo_head_hexsha": "77ef6fb84e9f8345a...
/* Copyright (C) 2014 InfiniDB, Inc. This program 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; version 2 of the License. This program is distributed in the hope that it will be useful, but W...
{"hexsha": "2df56453e43407262a9afaa11427c953e62d94a0", "size": 2215, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/vendor/mariadb-10.6.7/storage/columnstore/columnstore/dbcon/dmlpackage/gramtest.cpp", "max_stars_repo_name": "zettadb/zettalib", "max_stars_repo_head_hexsha": "3d5f96dc9e3e4aa255f4e6105489758944...
import sys import numpy as np from matplotlib import patches, collections, ticker, pyplot as plt from skimage import io, morphology, measure # width of vacuum opening ROOMBA_WIDTH = 180 SCALING_FACTOR = 10 # mm/pixel class Polygon(): def __init__(self, points, center=[0, 0], snap=90, scaling=1): self.sn...
{"hexsha": "45e771d560e06b57abb239eae41a117a4f0b4743", "size": 14488, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze/polygon.py", "max_stars_repo_name": "henrythasler/roomba", "max_stars_repo_head_hexsha": "ecb021b2726f80d269c463f4709b7910e4d1a229", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python # # // SPDX-License-Identifier: BSD-3-CLAUSE # # (C) Copyright 2018, Xilinx, Inc. # #!/usr/bin/python from __future__ import print_function from progressbar import ProgressBar import numpy as np import tensorflow as tf from xfdnn.rt.xdnn_util import make_list from xfdnn.rt.xdnn_io import loadIm...
{"hexsha": "773d891a625d6c912670e01e14e1133b1d922244", "size": 3958, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/tensorflow/utils.py", "max_stars_repo_name": "yarenty/ml-suite", "max_stars_repo_head_hexsha": "570202d904cf5980c2262b4cfc067eb8428ea8d0", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg from moviepy.editor import VideoFileClip from imgProcessor import * from vehDetectFunc import * import pickle from scipy.ndimage.measurements import label VIS_WINDOWS = False VIS_BBOX = False VIS_HEAT = False TEST_ON_IMAGE =...
{"hexsha": "2232e1f627249e9387b9b7878b0b8c2027289bdb", "size": 11655, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/vehicle_detection_svm/vehicleDetection.py", "max_stars_repo_name": "towardsautonomy/towardsautonomy.github.com", "max_stars_repo_head_hexsha": "54088e8fa87ba265df2c2d660148996767c36668",...
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <math.h> #include <gsl/gsl_integration.h> double f1(double x, void *params) { (void) (params); /* avoid unused parameter warning */ return pow(x, 2); } double fi1(double x) { return pow(x, 3) / 3; } double f2(double x, void *params) { ...
{"hexsha": "34b658de8ad7a7103fa47acc2e6d8d3bdcbeed08", "size": 1714, "ext": "c", "lang": "C", "max_stars_repo_path": "lab4/zad4.c", "max_stars_repo_name": "mistyfiky/agh-mownit", "max_stars_repo_head_hexsha": "d88c21308b863942497c111d044e359ce220d421", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' roslaunch my_pkg ur5_bringup.launch turn on external program on teach pendant!! roslaunch usb_cam usb_cam-test.launch roslaunch my_pkg single.launch rosrun my_pkg ibvs.py yxj 20210826 ''' from numpy import linalg import rospy from rospy.rostime import Duration from s...
{"hexsha": "b29f5b9239e594ee912f69bf98e66b0e041d806a", "size": 9791, "ext": "py", "lang": "Python", "max_stars_repo_path": "ws_icra2022/src/my_pkg/ur5_eyeInhand/ibvs_only_task_space_Nori.py", "max_stars_repo_name": "yanseim/Vision-Based-Control", "max_stars_repo_head_hexsha": "4a92103d99703ac2a45d4ad8d01a663e29c0aa7d",...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # saov.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jan 2017 ''' Contains the Schwarzenberg-Czerny Analysis of Variance period-search algorithm implementation for periodbase. ''' ############# ## LOGGING ## ############# import logging from astrobase import log_su...
{"hexsha": "19ea7f67666b74a5e4f11aec38378385b5a6197d", "size": 19850, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrobase/periodbase/saov.py", "max_stars_repo_name": "pierfra-ro/astrobase", "max_stars_repo_head_hexsha": "b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c", "max_stars_repo_licenses": ["MIT"], "max_st...
"""" # DeepCTR https://github.com/shenweichen/DeepCTR https://deepctr-doc.readthedocs.io/en/latest/Examples.html#classification-criteo DeepCTR is a **Easy-to-use**,**Modular** and **Extendible** package of deep-learning based CTR models along with lots of core components layers which can be used to easily build cust...
{"hexsha": "770f6b5804b9bc6a897592000b9e23c073268893", "size": 23712, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlmodels/model_keras/01_deepctr.py", "max_stars_repo_name": "whitetiger1002/mlmodels", "max_stars_repo_head_hexsha": "f70f1da7434e8855eed50adc67b49cc169f2ea24", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma simple_cg_insert_invar_with_conv : assumes "observable M1" and "observable M2" shows "convergence_graph_insert_invar M1 M2 simple_cg_lookup_with_conv simple_cg_insert" [PROOF STATE] proof (prove) goal (1 subgoal): 1. convergence_graph_insert_invar M1 M2 simple_cg_lookup_with_conv simple_cg_inse...
{"llama_tokens": 694, "file": "FSM_Tests_EquivalenceTesting_Simple_Convergence_Graph", "length": 4}
module scalar_projection_routines use spherepack_precision, only: & wp, & ! working precision ip, & ! integer precision PI, & MACHINE_EPSILON use type_SpherepackUtility, only: & SpherepackUtility use gaussian_latitudes_and_weights_routines, only: & compute_...
{"hexsha": "29a366b44f3695b84a092ee9f72a169e5f53b8a1", "size": 5746, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/scalar_projection_routines.f90", "max_stars_repo_name": "jlokimlin/spherepack4.1", "max_stars_repo_head_hexsha": "e80da29462c5987162a0884baaab7434d0215467", "max_stars_repo_licenses": ["MIT"...
module DataAndPlotting using HDF5 using Plots # Wave parameters const ki = 3 const kj = 3 # Grid size const ni = 300 const nj = 200 # i ranges from 1...ni # i-1 ranges from 0...ni-1 # x ranges from 0...1 function index2coord(i, ni) @assert ni > 1 @assert 1 <= i <= ni (i - 1) / (ni - 1) end # Set up...
{"hexsha": "8422c14bc5421ac3d8896c6d76b19fd7fe3f6435", "size": 999, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/DataAndPlotting.jl", "max_stars_repo_name": "eschnett/DataAndPlotting.jl", "max_stars_repo_head_hexsha": "19e03405a448d13e908b7e5eddd4e05b6287949b", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# Requires: a limb darkening information file (with fits of intensity w.r.t surface inclination) # Outputs: a plot that compares different gravity interpolation schemes import math import numpy as np import pickle import pa.lib.star as st import pa.lib.util as ut import matplotlib.pyplot as plt import matplotlib from ...
{"hexsha": "a32eb82f38a39cfd07fa4658f1dbde4f5b279b5e", "size": 5389, "ext": "py", "lang": "Python", "max_stars_repo_path": "pa/usr/05b_gravity_interpolation.py", "max_stars_repo_name": "mlipatov/paint_atmospheres", "max_stars_repo_head_hexsha": "75b494010a728e0682645de739752ff20a47d717", "max_stars_repo_licenses": ["MI...
subroutine pl_nupd !! ~ ~ ~ PURPOSE ~ ~ ~ !! This subroutine calculates plant nitrogen demand !! ~ ~ ~ INCOMING VARIABLES ~ ~ ~ !! name |units |definition !! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ !! bio_n1(:) |none |1st shape ...
{"hexsha": "c712577ee4d03b56beb08fd8210dd4d5b62aca2f", "size": 2633, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/data/program_analysis/multifile_multimod/mfmm_02/pl_nupd.f90", "max_stars_repo_name": "mikiec84/delphi", "max_stars_repo_head_hexsha": "2e517f21e76e334c7dfb14325d25879ddf26d10d", "max_star...
# -*- coding: utf-8 -*- #to get these to print all threads in spyder : # Run > Configuration per file > Execute in an external system terminal # And then add a read at the end of the program to prevent the console of closing """ Created on Fri Jan 10 16:19:58 2020 This script uses the Amadeus framework on an artificia...
{"hexsha": "accdf90eb0eedbe1409c74f038e57708fa3b75c4", "size": 5957, "ext": "py", "lang": "Python", "max_stars_repo_path": "Main_averageModelScript.py", "max_stars_repo_name": "DannyVanpoucke/Amadeus", "max_stars_repo_head_hexsha": "6604cbdca43a1e2c8c0df72d251dcfbbd116e11e", "max_stars_repo_licenses": ["Apache-2.0"], "...
function u = poisson(varargin) %POISSON Poisson solver in the unit ball with Dirichlet or Neumann % boundary conditions. % U = POISSON(F, BC, M, N, P) is the solution to the Poisson equation in % the unit ball with right-hand side F and Dirichlet boundary data % U(1,lambda,theta) = @(lambda,theta) BC(l...
{"author": "chebfun", "repo": "chebfun", "sha": "8c49396a55e46ddd57a1d108c6a8f32e37536d54", "save_path": "github-repos/MATLAB/chebfun-chebfun", "path": "github-repos/MATLAB/chebfun-chebfun/chebfun-8c49396a55e46ddd57a1d108c6a8f32e37536d54/@ballfun/poisson.m"}
""" Module for unit tests that check if estimated embeddings for toy examples satisfy basic intuitions @author Siddharth Reddy <sgr45@cornell.edu> """ import unittest import logging import pandas as pd import numpy as np from lentil import models from lentil import est from lentil import toy logging.basicConfig()...
{"hexsha": "3ab5bb06409ff9849caf6a7358ec5164b5411aa6", "size": 13865, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_models.py", "max_stars_repo_name": "Knewton/lentil", "max_stars_repo_head_hexsha": "957227de8c48b6c3c5dfd754da30a259b7409084", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
requiredTypes = [ "AbstractLevel" ] for reqType in requiredTypes if !isdefined( Symbol( uppercase( string( reqType[ 1 ] ) ) * reqType[ 2:end ] ) ) include( reqType * ".jl" ) end # if !isdefined( Symbol( ... end export SubJob type SubJob <: AbstractLevel # Name of the SubJob ex: X, A, B Na...
{"hexsha": "5f078212dd5acbaf37cee1333d8794596cc18126", "size": 732, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/types/SubJob.jl", "max_stars_repo_name": "Omazaria/CareerPathBeDef", "max_stars_repo_head_hexsha": "da5b1cc1a70382444a348da82725d4cfe670d3c9", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import time import numpy as np import py_aca import pytest from test_tde import setup_matrix_test import cutde.fullspace as FS import cutde.halfspace as HS from cutde.aca import call_clu_aca @pytest.mark.slow @pytest.mark.parametrize("dtype", [np.int32, np.int64, np.float32, np.float64]) @pytest.mark.parametrize("F...
{"hexsha": "66d489f29f76e189686655eea27459943b58cf0b", "size": 4898, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_aca.py", "max_stars_repo_name": "tbenthompson/cutde", "max_stars_repo_head_hexsha": "7b263e2ac16de536d23d8e4d3165705e2ec9a31f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17...
#version 330 core in vec2 uvCoords; in vec3 normalCameraSpace; in vec3 toEye; in vec3 lightDirection; in float distance; out vec3 color; uniform sampler2D albedoTex; uniform sampler2D metallicTex; uniform sampler2D roughnessTex; uniform sampler2D iblbrdf; const vec3 lightColor = vec3(1.0,1.0,1.0); const float light...
{"hexsha": "75da120e96343b367f89c0c59440634eff230040", "size": 2410, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "shaders/pbr.f", "max_stars_repo_name": "Faaux/cbLib", "max_stars_repo_head_hexsha": "968f327cee0f92d06724b493c3745f3f35d64038", "max_stars_repo_licenses": ["BSD-3-Clause", "MIT-0", "MIT"], "max_st...
""" Solver for a Quordle puzzle https://www.quordle.com/#/ """ import os import pickle import numpy as np import helper import solver __author__ = "Z Feng" max_attempts = 9 def accept_quordle_test_result(): """ Let the user input the word guessed and the results as 4 matching patterns :return: guess, ...
{"hexsha": "3e1c28479203e1fee8da706ee72b08f40e761f3c", "size": 4692, "ext": "py", "lang": "Python", "max_stars_repo_path": "quordle_solver.py", "max_stars_repo_name": "fxh90/WordleSolver", "max_stars_repo_head_hexsha": "7467093b19f09811596fe53a8dad1beedb4c8d09", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import pandas as pd from random import random flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100 pdata = pd.DataFrame({"a":flow, "b":flow}) pdata.b = pdata.b.shift(9) data = pdata.iloc[10:] * random() # some noise import numpy as np def _load_data(data, n_prev = 100): """ data should be pd.DataFrame() ...
{"hexsha": "4bb4a13bb24798984b89603ceaf4ad28e694868a", "size": 1767, "ext": "py", "lang": "Python", "max_stars_repo_path": "Ground-Truth-Skeletons/Uddeshya/LSTM_test1.py", "max_stars_repo_name": "93TEI/3D_Action_Recognition", "max_stars_repo_head_hexsha": "b648f4cd8e479872c0cd9488120ada18bc64e5ad", "max_stars_repo_lice...
type FractalDict data::Dict{AbstractString,Function} end FractalDict()=FractalDict(Dict{AbstractString,Function}()) const frac_dict=FractalDict() function add_frac!(fracname::AbstractString,f::Function) frac_dict.data[fracname]=f end fractal_names() = keys(frac_dict.data) function create_fractal(fractal_name::Abstr...
{"hexsha": "1be98f98e5bcef3a9bcef3c2dd700cc732d2199f", "size": 3699, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fractal_variations.jl", "max_stars_repo_name": "jblondin/Fractal", "max_stars_repo_head_hexsha": "b2ff056dd747f81400e687d0091b3b120f113b22", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
/* * test_NDFileHDF5ExtraDimensions.cpp * * Created on: 10 Nov 2015 * Author: gnx91527 */ #include <stdio.h> #include "boost/test/unit_test.hpp" // AD dependencies #include <NDPluginDriver.h> #include <NDArray.h> #include <asynDriver.h> #include <string.h> #include <stdint.h> #include <deque> #include <...
{"hexsha": "037a2fc434edfb59a6df63af66aadd59767ac52c", "size": 25487, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ADApp/pluginTests/test_NDFileHDF5ExtraDimensions.cpp", "max_stars_repo_name": "gregoryrd/ADCore", "max_stars_repo_head_hexsha": "b4be366dec26efa362a2675521123446d90b961a", "max_stars_repo_licenses"...
# -*- coding: utf-8 -*- """Unit tests for sktime classifier compatability with sklearn interfaces.""" __author__ = ["MatthewMiddlehurst"] __all__ = [ "test_sklearn_cross_validation", "test_sklearn_cross_validation_iterators", "test_sklearn_parameter_tuning", "test_sklearn_composite_classifiers", ] imp...
{"hexsha": "4dd6025db53e41d65b111e71180c935daad483d5", "size": 4816, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/classification/tests/test_sklearn_compatability.py", "max_stars_repo_name": "biologioholic/sktime", "max_stars_repo_head_hexsha": "9d0391a04b11d22bd783b452f01aa5b4529b41a2", "max_stars_repo...
/** * The MIT License (MIT) * * Copyright © 2019 Ruben Van Boxem * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to us...
{"hexsha": "9286be102837112c957c8b89fb5642cf1d8e72e7", "size": 3631, "ext": "h++", "lang": "C++", "max_stars_repo_path": "css/grammar/position.h++", "max_stars_repo_name": "rubenvb/skui", "max_stars_repo_head_hexsha": "5bda2d73232eb7a763ba9d788c7603298767a7d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19....
//================================================================================================== /*! @file @copyright 2016 NumScale SAS 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": "0b48f3bdaedf4c199280117f601f3a7dc4746970", "size": 1187, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/function/log2.hpp", "max_stars_repo_name": "xmar/pythran", "max_stars_repo_head_hexsha": "dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592", "max_stars_repo_licenses": ["BSD-3-Clause"...
%!TEX root = ../thesis.tex %******************************************************************************* %****************************** Second Chapter ********************************* %******************************************************************************* \chapter{Results of Modification of Physical Prop...
{"hexsha": "515236e7022a8a87318093b73aefb17f875a7ebd", "size": 130042, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter5/chapter5.tex", "max_stars_repo_name": "ErpanArkin/phd-thesis", "max_stars_repo_head_hexsha": "155d4f8f8c4e87dea894403cdc58739ba5580aef", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import logging import numpy as np import math import psutil import time from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor from autogluon.core.constants import REGRESSION from autogluon.core.utils.exceptions import NotEnoughMemoryError from .knn_utils import FAISSNeighborsClassifier, FAISSNeighb...
{"hexsha": "7ca7bb1c7c276436dab6cdc0d1172130a9e106c0", "size": 7492, "ext": "py", "lang": "Python", "max_stars_repo_path": "tabular/src/autogluon/tabular/models/knn/knn_model.py", "max_stars_repo_name": "jrzaurin/autogluon", "max_stars_repo_head_hexsha": "b7dbed302c4181f9160b2f8f88f73c1fa37941cd", "max_stars_repo_licen...
# -*- coding: utf-8 -*- """ Created on Sat Sep 7 19:50:39 2019 @author: Brandon """ import numpy as np import numpy.random as rand import matplotlib.pyplot as plt def walk(N): rand.seed() x = [0.0] y = [0.0] for n in range(N): x.append(x[-1] + (rand.random() - 0.5)*2.0)...
{"hexsha": "a4adcb45af59385d5bb81ae2c86166c62d4daa1b", "size": 1653, "ext": "py", "lang": "Python", "max_stars_repo_path": "Week 03/Exercise_06_Q4_BSW.py", "max_stars_repo_name": "bswood9321/PHYS-3210", "max_stars_repo_head_hexsha": "d780cac166688338ce91099cba4a4f6628430647", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python import cv2 import numpy as np #listdir:for fetching data from a directory from os import listdir from os.path import isfile, join from flask import render_template import warnings data_path = 'C:\\Users\\hp\\PycharmProjects\\faces\\' onlyfiles = [f for f in listdir(data_path) if isfile(join(data...
{"hexsha": "cd8647c57b58f0129f661414c80083db518ce1a5", "size": 4464, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera.py", "max_stars_repo_name": "akshaya26/face_recognition", "max_stars_repo_head_hexsha": "f81b68f86c63b0364aa1c44056183a3ef82257e2", "max_stars_repo_licenses": ["Unlicense"], "max_stars_coun...
[STATEMENT] lemma partition_on_mset_add_single: assumes "partition_on_mset A P" shows "partition_on_mset (add_mset a A) (add_mset {#a#} P)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. partition_on_mset (add_mset a A) (add_mset {#a#} P) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: partition...
{"llama_tokens": 209, "file": "Design_Theory_Multisets_Extras", "length": 2}
import numpy as np import pandas as pd from pandas.api.types import is_numeric_dtype import plotnine as pn from scipy.stats import skew from pandas.api.types import CategoricalDtype from sklearn.base import BaseEstimator, TransformerMixin from minepy import MINE from scipy import stats from dcor import distance_correla...
{"hexsha": "fd9a28676719f9455afe29f5a6fd660bf771126c", "size": 30156, "ext": "py", "lang": "Python", "max_stars_repo_path": "exploretransform/_exploretransform.py", "max_stars_repo_name": "bxp151/exploretransform", "max_stars_repo_head_hexsha": "f67039f22f30319586c8b4861d21b7bf147cecb9", "max_stars_repo_licenses": ["MI...
import numpy as np import nept task_times = dict() task_times['on_track'] = nept.Epoch(np.array([2421.1, 4816.9])) experiment_times = dict() experiment_times['left_trials'] = nept.Epoch(np.array([[2436.3, 2487.4], [3398.8, 3423.7], ...
{"hexsha": "aa27758ee13e57a04c42f24cfc7c3f4291f58d13", "size": 1400, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/r042d5.py", "max_stars_repo_name": "vandermeerlab/hc_hyperalign", "max_stars_repo_head_hexsha": "f140aca8c9b1c4196ea2c63326fbbbded22bbcc1", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# In[1]: import numpy as np import pandas as pd # In[2]: def generate_population(): chromosome = [[i, j, k, l, m, n, o, p] for i in range(1, 9) for j in range(1, 9) for k in range(1, 9) for l in range(1, 9) for m in range(1, 9) for n in range(1...
{"hexsha": "a81c82f1816f0c4b6bcb3fbbc63e59c1fb9698bc", "size": 5550, "ext": "py", "lang": "Python", "max_stars_repo_path": "8_Queens/8queen.py", "max_stars_repo_name": "aminizahra/Evolutionary-Computing", "max_stars_repo_head_hexsha": "0dab8222fccb9bd1efca9141481e5aebc73de5ea", "max_stars_repo_licenses": ["Unlicense"],...
!======================================================================! SUBROUTINE Probe1D !----------------------------------------------------------------------! ! This program finds the coordinate of cell-centers in non-homogeneous ! direction and write them in file name.1D !--------------------------------------...
{"hexsha": "7e8f4b1a83fa2926c50c2ac8b92b1aba8da9a8fe", "size": 2634, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Library/Probe1D.f90", "max_stars_repo_name": "palkinev/T-FlowS-old-compressible", "max_stars_repo_head_hexsha": "7aa7219aa5526ac270b39d52ba8c12847e1d71a2", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np from src.Map.Map import Map from src.StateUtils import pad_centered from src.base.BaseState import BaseState class DHMultiState(BaseState): def __init__(self, map_init: Map, num_agents: int): super().__init__(map_init) self.device_list = None self.device_map = None # Fl...
{"hexsha": "cf824b9f4008a55c155eecd5d901818337e15de5", "size": 5311, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/DHMulti/State.py", "max_stars_repo_name": "fgwy/uavSim", "max_stars_repo_head_hexsha": "a58dc3149a52fc407c288c281eedb176738bd558", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import skimage import skimage.data as data from skimage.viewer import ImageViewer from numpy.testing import assert_equal, assert_allclose def setup_line_profile(image): from skimage.viewer.plugins.lineprofile import LineProfile viewer = ImageViewer(skimage.img_as_float(image)) plugin = LineProfile() v...
{"hexsha": "6b0fd48f017fccf3c188620c7d1025674bba3cf3", "size": 1511, "ext": "py", "lang": "Python", "max_stars_repo_path": "skimage/viewer/tests/test_viewer.py", "max_stars_repo_name": "jeysonmc/scikit-image", "max_stars_repo_head_hexsha": "d652a9ce9a71a3f6f13cb23ee7c5f25148457b24", "max_stars_repo_licenses": ["BSD-3-C...
""" Unit tests for fitness.py""" # Author: Genevieve Hayes # License: BSD 3 clause import unittest import numpy as np from mlrose import (OneMax, FlipFlop, FourPeaks, SixPeaks, ContinuousPeaks, Knapsack, TravellingSales, Queens, MaxKColor, CustomFitness) from mlrose.fitness imp...
{"hexsha": "f7aeb47ad84db5974f92fb76382c93411aeae5ca", "size": 7150, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_fitness.py", "max_stars_repo_name": "dreadn0ught/mlrose", "max_stars_repo_head_hexsha": "2a9d604ea464cccc48f30b8fe6b81fe5c4337c80", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
#ifndef POG_GENERIC_HPP #define POG_GENERIC_HPP #include <cstddef> #include <iostream> #include <type_traits> #include <boost/mpl/range_c.hpp> #include <boost/fusion/include/mpl.hpp> #include <boost/fusion/include/at_c.hpp> #include <boost/fusion/include/value_at.hpp> #include <boost/fusion/include/for_each.hpp> #in...
{"hexsha": "ee8d6e6cd8953acbd872944559bdf3080cabae0b", "size": 2618, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "generic.hpp", "max_stars_repo_name": "daniel-j-h/argparse-generic", "max_stars_repo_head_hexsha": "5746829953cd10ab20c57bf0596549535f73cac6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
//F# Compiler for F# 4.1 open System printfn "Hello, World! How is it going?"
{"hexsha": "a846e1195c36a81e775bcf8fb650ab3d47f324b3", "size": 79, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "HelloWorld(F#).f", "max_stars_repo_name": "sharma18526/Hello-World-1", "max_stars_repo_head_hexsha": "d4e59182b71782e5c5731c4d02b371827ed4b090", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma normalize_positive_dst_ports_normalized_n_primitive: assumes n: "normalized_nnf_match m" and noneg: "\<not> has_disc_negated is_Dst_Ports False m" shows "\<forall>m' \<in> set (normalize_positive_dst_ports m). normalized_dst_ports m'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<fo...
{"llama_tokens": 675, "file": "Iptables_Semantics_Primitive_Matchers_Ports_Normalize", "length": 4}
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.topology.metric_space.emetric_space import Mathlib.PostPort univers...
{"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/topology/G_delta_auto.lean"}
import networkx as nx import itertools G=nx.Graph() import time start_time=time.time() steps=0 def countVertexDegree(matrix): #Crea una lista con los grados de cada vrtice en el grafo que recibe global steps degree=[] deg=0 for row in matrix: for bit in row: if bit==1: ...
{"hexsha": "dd729cfec6a41a9049befec52f290e2732b2f290", "size": 10526, "ext": "py", "lang": "Python", "max_stars_repo_path": "subgraphIsomorphism.py", "max_stars_repo_name": "rJuarez96/subgraph", "max_stars_repo_head_hexsha": "3164e4d6b2dacd670a8f8e158ae1bcace23eff99", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# that's still a very lame function, but might be useful once more sampling # algorithms are implemented (or not...) function sample(model::Model, algorithm) run(algorithm, model) end
{"hexsha": "2aaa9d8950752d9925a61934fb07819cb22daa88", "size": 189, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sampling/sample.jl", "max_stars_repo_name": "matthieubulte/Probabilistic.jl", "max_stars_repo_head_hexsha": "8eb68f7c9372570657efb8362ff5bc7b09bca62b", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python3 import numpy as np import dask.array as da from numcodecs import Zlib from pathlib import Path import argparse def tile_zarr( zarr_pyramid_base, max_level=None, compressor=None, dtype=None, ): img = da.from_zarr(zarr_pyramid_base) pyramid_path = Path(zarr_pyramid_base).parent ...
{"hexsha": "b5ae5e2c60c1c5c802036d130ae4d387c820b9eb", "size": 2341, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tile_zarr_base.py", "max_stars_repo_name": "haniffalab/vitessce-data", "max_stars_repo_head_hexsha": "9f70405bae373783f9e6ca32f88b6b19b7325fea", "max_stars_repo_licenses": ["MIT"], "max_sta...
import csv import numpy as np import os from sklearn.model_selection import train_test_split import urllib.request from sklearn.cluster import MiniBatchKMeans import cv2 def get_filepaths_in_folder(folder): directory = os.fsencode(folder) filenames = [] for file in os.listdir(directory):...
{"hexsha": "1eaf212ed5b7c3a2a6fc1889866960a7e8d3c46d", "size": 4115, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/before2after/preprocessing.py", "max_stars_repo_name": "b-yogesh/pytorch-CycleGAN-and-pix2pix", "max_stars_repo_head_hexsha": "52ceb9b2918ee8cae81ebddfaf38e0f90e85f333", "max_stars_repo_li...
from comsyl.autocorrelation.CompactAFReader import CompactAFReader import numpy as np from srxraylib.plot.gol import plot_image, plot import matplotlib.pylab as plt # # auxiliary functions # def test_equal(af1,af2): np.testing.assert_almost_equal(1e-8*np.real(af1.eigenvalue(5)),1e-8*np.real(af2.eigenvalue(5))...
{"hexsha": "aab25081cbd5adf3f3400a5c2fa56ba4775cbcd8", "size": 6373, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/autocorrelation/CompactAFReaderTest.py", "max_stars_repo_name": "s-sajid-ali/comsyl", "max_stars_repo_head_hexsha": "f2a5d984b1e870d203a9152bbeca804c4304850e", "max_stars_repo_licenses": ["M...
import cv2 import numpy as np from mabopy.config.load_config import LoadConfig import cvlib conf = LoadConfig("config.toml").config capture = cv2.VideoCapture(conf["app"]["camera_uri"]) i = 0 pt1 = (conf["app"]["crop_start"][0],conf["app"]["crop_start"][1]) w = conf["app"]["corp_width"] pt2 = (pt1[0]+w,pt1[1]+w...
{"hexsha": "64d0d37bc8a24773d73261de809c25454488b9b7", "size": 1536, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/vision/vision25/dc4.py", "max_stars_repo_name": "mabotech/mabo.io", "max_stars_repo_head_hexsha": "7f646db9d5ee3cd0b137866bf8eaf295890f134c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types import LibraBFT.Impl.Consensus.Consensus...
{"hexsha": "0d7df635d46c8cce0d46316206a62f825ebff5f9", "size": 3051, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/LibraBFT/Impl/Consensus/ConsensusTypes/ProposalMsg.agda", "max_stars_repo_name": "LaudateCorpus1/bft-consensus-agda", "max_stars_repo_head_hexsha": "a4674fc473f2457fd3fe5123af48253cfb2404ef", ...
import tvm, tvm.relay.testing import tvm.contrib.graph_runtime as runtime import os, argparse import numpy as np from tvm import autotvm, relay, auto_scheduler from tvm.autotvm.graph_tuner import DPTuner, PBQPTuner from tvm.contrib.utils import tempdir from tvm.contrib.debugger import debug_runtime from tvm.relay.testi...
{"hexsha": "b2f3102de96aa66e396cbeeaae13479636474299", "size": 14025, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_test.py", "max_stars_repo_name": "moderato/LayerFusion", "max_stars_repo_head_hexsha": "3acdbe18e9575eee6e4ab3b60293393a40eedac5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
# import the necessary packages import os import cv2 import imutils import numpy as np def align_images(image, template, maxFeatures=700, keepPercent=0.2, debug=False, output_dir=''): ''' Aligns image to template via the steps: 1. ORB keypoint detection 2. Brute force hamming...
{"hexsha": "0fae1c16eba77ad9b589a00f13b358d84884ac64", "size": 4129, "ext": "py", "lang": "Python", "max_stars_repo_path": "vcv/pyimagesearch/alignment/align_images.py", "max_stars_repo_name": "mhudnell/vaccination-card-verification", "max_stars_repo_head_hexsha": "f2db657e80ac77b2845192cc606b0d1e9a66e8a9", "max_stars_...
# -*- coding: utf-8 -*- # ## Grafting models together # Much of scientific thought and scholarship involves reading papers and textbooks with different models and synthesizing a novel model from components found in existing, well studied models. # # We refer to this as model grafting, where a component is taking from o...
{"hexsha": "782e2cf845d35994fca66b3d1c7acaf49ee40951", "size": 6710, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/odegraft.jl", "max_stars_repo_name": "mikiec84/SemanticModels.jl", "max_stars_repo_head_hexsha": "f81baf0789cc547375f300429d0fd49c866d5339", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <asiolink/io_add...
{"hexsha": "b44aba1a305dfd1f8506a42956a52c2c01ad4205", "size": 20638, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/lib/dhcpsrv/tests/ncr_generator_unittest.cc", "max_stars_repo_name": "kphf1995cm/kea", "max_stars_repo_head_hexsha": "2f6940ef5ed697f3f683035ed7a16046253add4d", "max_stars_repo_licenses": ["Apac...
import numpy as np import matplotlib.pyplot as plt def plot_confusion(conf, norm_conf, true_classes, pred_classes, cmap=plt.cm.jet): """ A function to plot the confusion matrix for a given dataset. The number of points given the [i, j] label is the value in each box, and the normali...
{"hexsha": "696b9f6d92bc33f922a18d64a8146e5bf135f35e", "size": 3492, "ext": "py", "lang": "Python", "max_stars_repo_path": "clustering/utils.py", "max_stars_repo_name": "ebridge2/ams_446", "max_stars_repo_head_hexsha": "2c7d8db96c5875ee5b4c0e2d44dad80812ac4140", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
[GOAL] α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 r : α → α → Prop s : β → β → Prop inst✝¹ : IsIrrefl α r inst✝ : IsIrrefl β s ⊢ ∀ (a : α ⊕ β), ¬LiftRel r s a a [PROOFSTEP] rintro _ (⟨h⟩ | ⟨h⟩) [GOAL] case inl α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 r : α → α → Prop s : β → β → Prop inst✝¹ : IsIrre...
{"mathlib_filename": "Mathlib.Data.Sum.Order", "llama_tokens": 24017}
SUBROUTINE MB03OD( JOBQR, M, N, A, LDA, JPVT, RCOND, SVLMAX, TAU, $ RANK, SVAL, DWORK, LDWORK, INFO ) C C SLICOT RELEASE 5.7. C C Copyright (c) 2002-2020 NICONET e.V. C C PURPOSE C C To compute (optionally) a rank-revealing QR factorization of a C real general M-by-N mat...
{"hexsha": "70f6f0d85b6592c0d139a8ee11b30b7211e5bbc2", "size": 11412, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/MB03OD.f", "max_stars_repo_name": "bnavigator/SLICOT-Reference", "max_stars_repo_head_hexsha": "7b96b6470ee0eaf75519a612d15d5e3e2857407d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
import sys sys.path.append("..") import utils from utils import * import numpy as np import matplotlib.pyplot as plt import scipy.sparse as sparse def augment_feature_vector(X): """ Adds the x[i][0] = 1 feature for each data point x[i]. Args: X - a NumPy matrix of n data points, each with d - 1 ...
{"hexsha": "907dc1d12c4e4f966c28bfeddc871d89e9b3bf0c", "size": 8158, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ml_starter/mnist/softmax.py", "max_stars_repo_name": "pi-projects/ml-starter", "max_stars_repo_head_hexsha": "b3de630d68d9fe879cef626189fc07dee8568851", "max_stars_repo_licenses": ["MIT"], "ma...
import torch import librosa import numpy as np import mir_eval import separation_model as md import data_set as dts from shutil import copyfile import os class AudioSeparator: r"""Implements a framework for using a SeparationModel to produce separated source for all files in the validation set and meas...
{"hexsha": "6f7b5287bdaa69ad3c7f2b006fbfc4ad8b0d9db0", "size": 17449, "ext": "py", "lang": "Python", "max_stars_repo_path": "separator.py", "max_stars_repo_name": "4p0pt0Z/Audio_blind_source_separation", "max_stars_repo_head_hexsha": "a91851172680c86f3faea0a7ad31eedb023e172f", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python3 # Copyright <2019> <Chen Wang [https://chenwang.site], Carnegie Mellon University> # 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 copyr...
{"hexsha": "3187a5cef52f91a0cc4eaafdac9db81a130090f9", "size": 7325, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_interest.py", "max_stars_repo_name": "castacks/interestingness", "max_stars_repo_head_hexsha": "b614818ab11dcc15c5fe6b55fe993882add3e8e6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
from __future__ import unicode_literals from __future__ import division from __future__ import print_function from collections import Counter import os import pkg_resources import matplotlib.pyplot as plt import numpy as np import pandas qDiptab_file = pkg_resources.resource_filename('modality', 'data/qDiptab.csv')...
{"hexsha": "1b8d8407b206fc4def1a410fbb57a825089d510c", "size": 16853, "ext": "py", "lang": "Python", "max_stars_repo_path": "modality/diptest.py", "max_stars_repo_name": "tompollard/modality", "max_stars_repo_head_hexsha": "dbe6d407a44fa6b1b93fba1433d62cb0b2c4a132", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(Project_Test_Suite) BOOST_AUTO_TEST_SUITE(Module_Test_Suite) BOOST_AUTO_TEST_CASE(DummyTest_Passes) { BOOST_CHECK_EQUAL(1,1); BOOST_CHECK(true); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()
{"hexsha": "b98dbe53a5dfb6b50c522a13fbd2fcfa7d9e048e", "size": 313, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/module/module_test.cpp", "max_stars_repo_name": "przestaw/Cpp-CMake-template", "max_stars_repo_head_hexsha": "ce71db7b9635bd57e51ec812e0bfe04dac2355be", "max_stars_repo_licenses": ["MIT"], "max_...
# Helper function returning a customized URDF of the 1R planar manipulator import numpy as np def generate_custom_urdf(joint_ang_bias: tuple = (0, 0, 0, 0, 0, 0, 0), joint_pos_bias: tuple = ((0,0,0),(0,0,0),(0,0,0),(0,0,0),(0,0,0), (0,0,0)...
{"hexsha": "0c7ca66879a2bfc22af1393dd38dcef86cb11e50", "size": 13159, "ext": "py", "lang": "Python", "max_stars_repo_path": "crisp/robots/panda_urdf_randomizer.py", "max_stars_repo_name": "traversaro/CRiSP-for-Misspecified-Robot-Model", "max_stars_repo_head_hexsha": "6b5e0c28dc52463ac3b1c72c61fea0c5f7ac21f8", "max_star...
import tensorflow as tf from tensorflow import keras from keras.models import Sequential from keras.layers import Dense from keras.layers import LeakyReLU ## import pandas as pd import pdb import numpy as np import random import math import argparse import tensorflow as tf import matplotlib.pyplot as plt from keras i...
{"hexsha": "23adce8124adb328422444d56f065feccfa5d939", "size": 2920, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nn.py", "max_stars_repo_name": "plug-ml/engine", "max_stars_repo_head_hexsha": "d713a0f4c10690667f68906b6fc6241c77d172a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
# Copyright 2014 Uri Laserson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
{"hexsha": "2b2238427295a70caf4a34b16d537f29e39b4f36", "size": 14490, "ext": "py", "lang": "Python", "max_stars_repo_path": "ulutil/mplextensions.py", "max_stars_repo_name": "churchlab/ulutil", "max_stars_repo_head_hexsha": "7f9a427274acd99ae4d2dfe35123feb7c2dc9625", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# coding: utf-8 """ Name: low_pressure_detecter.py detecting low pressure. Usage: python3 low_pressure_detecter.py Author: Ryosuke Tomita Date: 2021/12/19 """ import argparse from os.path import abspath, dirname, join import sys import numpy as np from scipy import ndimage import japanmap sys.path.append(join(abspat...
{"hexsha": "215fe4b8ffaf81e1a7ce57bf0f89846d0dca3d59", "size": 4159, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze_tool/low_pressure_detecter.py", "max_stars_repo_name": "RyosukeDTomita/cyclone_track", "max_stars_repo_head_hexsha": "91238a7a8af2e23b3ae697c35f3b6c40516dc80a", "max_stars_repo_licenses": ...
import numpy as np from model.filters.dotproduct import DotProduct class Sepia(DotProduct): def __init__(self): pass def apply(self, matrix): kernel = np.array([[0.393, 0.769, 0.189], [0.349, 0.686, 0.168], [0.272, 0.534, 0.131]]) ...
{"hexsha": "e5dc2923bb78cadd0fb74b89659a5f12627ef110", "size": 366, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/filters/sepia.py", "max_stars_repo_name": "DennisPing/image-processor-mvc", "max_stars_repo_head_hexsha": "b687185500404a84f21e16b6c56937be4afc5a1d", "max_stars_repo_licenses": ["MIT"], "max_...
from __future__ import division import os, sys, shutil, time, random, math import argparse import warnings warnings.filterwarnings("ignore") import numpy as np import torch from torch.optim import SGD import torch.backends.cudnn as cudnn import torch.nn.parallel import torch.distributed as dist import torch.multiproc...
{"hexsha": "08eed8391cd5f53e911b94467b6e0b7c752448ed", "size": 20648, "ext": "py", "lang": "Python", "max_stars_repo_path": "reproduction/finetune_face.py", "max_stars_repo_name": "thudzj/BayesAdapter.github.io", "max_stars_repo_head_hexsha": "243b8b8686e2c9f1ea0bcda5ede317ab98405845", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/env python # Software License Agreement (MIT License) # # Copyright (c) 2020, tri_star # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction...
{"hexsha": "a35b6499dcac0e3cf0582224369bd74c40106bf5", "size": 16852, "ext": "py", "lang": "Python", "max_stars_repo_path": "tri_star/src/nodes/simulator_interaction.py", "max_stars_repo_name": "ScazLab/Frontiers_Robot_Tool_Use", "max_stars_repo_head_hexsha": "ebace49e88562c18b3b967ec5360a4cec4f8fe56", "max_stars_repo_...
\documentclass{article} \usepackage{enumitem} \usepackage{hyperref} \usepackage{ulem} \title{Markademic} \author{Mike Chung} \begin{document} \maketitle \section{Introduction} Wouldn't it be great if you can write academic papers using markdown instead of latex? I present markademic, a pipeline for creating an a...
{"hexsha": "b6960fed6b81905e6cef405fd093a4fc5054db08", "size": 810, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/draft.tex", "max_stars_repo_name": "mjyc/markademic", "max_stars_repo_head_hexsha": "c0e6a5e12138fb5f0dd2edc6f6f5f812ef25b778", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % [TITLE] Discussion % % [AUTHOR] Chen Zhang (CSISS, GMU) % [E-MAIL] czhang11@gmu.edu % % [PROJECT PAGE] https://github.com/czhang11/latex-manuscript-template % [PROJECT DESC] ___edit_description_here___ % % [FILE NAME] 4-dis...
{"hexsha": "31973b69b1117f28228afc98ef11fe2f77977664", "size": 1020, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "4-discussion.tex", "max_stars_repo_name": "czhang11/latex-manuscript-template", "max_stars_repo_head_hexsha": "4aaaa4c961db4cb19c97f391ad882baef4380521", "max_stars_repo_licenses": ["MIT"], "max_sta...
import distutils.spawn import numpy as np import pytest from ..yorick import PDBReader SKIP_YORICK = distutils.spawn.find_executable("yorick") is None SKIP_YORICK_REASON = "Could not find yorick executable. Skipping tests." @pytest.fixture def pdb(): return PDBReader("data/galaxies-040.pdb") def walker_helpe...
{"hexsha": "560c2abecea571eb7b99dd5f25a7c68668c9045a", "size": 3236, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrophysics_toolset/io/tests/test_io.py", "max_stars_repo_name": "cphyc/astrophysics_toolset", "max_stars_repo_head_hexsha": "36be3f459a1bbca73af6f39f0957bfac0cb122eb", "max_stars_repo_licenses":...
from __future__ import print_function from clBeergame import * from utilities import * import numpy as np #from clGeneralParameters import generalParameters import random from config import get_config, update_config import tensorflow as tf config = None #def main(config, beerGame): def main(config): random.seed(10...
{"hexsha": "e4c50bc04e1803705da51a1efb61960e174ddd34", "size": 3822, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "OptMLGroup/DeepBeerInventory-RL", "max_stars_repo_head_hexsha": "ca2bb90a5ee3a45fa89cfadf56354369a62bf5a8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
# This file is a part of AstroLib.jl. License is MIT "Expat". """ true_obliquity(jd) -> t_eps ### Purpose ### Return the true obliquity of the ecliptic for a given Julian date ### Explanation ### The function is used by the [`co_aberration`](@ref) procedure. ### Arguments ### * `jd`: Julian date. ### Output...
{"hexsha": "67b4ac92eda2e221230270e3ace06a574e743866", "size": 696, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/true_obliquity.jl", "max_stars_repo_name": "UnofficialJuliaMirror/AstroLib.jl-c7932e45-9af1-51e7-9da9-f004cd3a462b", "max_stars_repo_head_hexsha": "fb2ef587a2ac68a1c864bf251e8d9c3601ec4719", "ma...
function title = p07_title ( title ) %*****************************************************************************80 % %% P07_TITLE returns the title of problem 7. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 06 May 2011 % % Author: % % John Burkardt % % Param...
{"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/test_zero/p07_title.m"}
# encoding: utf-8 """ evolsim.brain ------------- class definition of animal brain from its DNA. """ # imports # built-in from enum import Enum # local # 3rd-party import numpy as np class SensorType(Enum): AGE = 1, XPOS = 2, YPOS = 3, class OutputType(Enum): XMOVE = 1, YMOVE = 2, ATTACK...
{"hexsha": "7cdd981fdf3ce413a8feae58aa8b675e6b53f0f4", "size": 3168, "ext": "py", "lang": "Python", "max_stars_repo_path": "evolsim-source/brain.py", "max_stars_repo_name": "labrunhosarodrigues/evolsim", "max_stars_repo_head_hexsha": "e24288b4ed396d6c80ca7818ef49e2ac56a21d34", "max_stars_repo_licenses": ["MIT"], "max_s...
"""Utilities supporting pydmmt.""" import ast import math import numpy import operator as op import re import string class YAMLError(ValueError): """YAML error""" class TextBased(): def __repr__(self): return self.original_string def __str__(self): return self.original_string def _...
{"hexsha": "4731ca476ad89b9fd7a7efca4cefbb0c84292af2", "size": 10926, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydmmt/util.py", "max_stars_repo_name": "Lordmzn/pydmmt", "max_stars_repo_head_hexsha": "a3155eb480b333023c2da20acf1f11a156387cd2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
from autofit.non_linear.samples.pdf import quantile import autogalaxy as ag import numpy as np def test__quantile_1d_profile(): profile_1d_0 = np.array([1.0, 2.0, 3.0]) profile_1d_1 = np.array([1.0, 2.0, 3.0]) profile_1d_list = [profile_1d_0, profile_1d_1] median_profile_1d = ag.util.er...
{"hexsha": "ea319b174e521eedd1eb8788136bfce6b273b847", "size": 1982, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_autogalaxy/util/test_error_util.py", "max_stars_repo_name": "caoxiaoyue/PyAutoGalaxy", "max_stars_repo_head_hexsha": "ad2b4b27404f5bf0f65ba9a0cd7c3ee6570e2d05", "max_stars_repo_licenses": ["M...
*----------------------------------------------------------------------* subroutine topo_make_unique(ireo,vtx,topo,xlines,nvtx,nj) *----------------------------------------------------------------------* * (unrestricted) sort of vertices, topo matrix, and xline matrix * to ascending sequence as needed for...
{"hexsha": "e084dfca3bb640be8f736e1578f50725817ad3c2", "size": 6826, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "formula/topo_make_unique.f", "max_stars_repo_name": "ak-ustutt/GeCCo-public", "max_stars_repo_head_hexsha": "8d43a6c9323aeba7eb54625b95553bfd4b2418c6", "max_stars_repo_licenses": ["MIT"], "max_sta...
from time import time import cv2 import argparse import matplotlib.pyplot as plt import numpy as np import scipy as sp import pdb from sklearn.feature_extraction.image import extract_patches_2d from sklearn.feature_extraction.image import reconstruct_from_patches_2d from sklearn.linear_model import OrthogonalMatchingPu...
{"hexsha": "5ddee8496aa47858cb3d4e100444d83a2f05ba23", "size": 3352, "ext": "py", "lang": "Python", "max_stars_repo_path": "ImageDenoising/sparse_encoding.py", "max_stars_repo_name": "koriavinash1/ImageDenoising", "max_stars_repo_head_hexsha": "d598cd55ba230f72dca9e800286cccae2dce853b", "max_stars_repo_licenses": ["MIT...
import ..list ..logic data.rat instance rat.inhabited : inhabited rat := ⟨0⟩ inductive term_dlo : Type | var : nat → term_dlo | cst : rat → term_dlo notation `V'` := term_dlo.var notation `C'` r := term_dlo.cst r instance term_dlo.decidable_eq : decidable_eq term_dlo := by tactic.mk_dec_eq_instance -- def term...
{"author": "skbaek", "repo": "cooper", "sha": "812afc6b158821f2e7dac9c91d3b6123c7a19faf", "save_path": "github-repos/lean/skbaek-cooper", "path": "github-repos/lean/skbaek-cooper/cooper-812afc6b158821f2e7dac9c91d3b6123c7a19faf/dlo/formula.lean"}
r""" Solve Poisson equation in 1D with mixed Dirichlet and Neumann bcs \nabla^2 u = f, The equation to solve is (\nabla^2 u, v) = (f, v) Use any combination of Dirichlet and Neumann boundary conditions. """ import os import sympy as sp import numpy as np from shenfun import inner, div, grad, TestFunction,...
{"hexsha": "6bfadcbadbf3d0b48f1ba203db7acc62522447a2", "size": 2717, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/mixedneumanndirichlet_poisson1D.py", "max_stars_repo_name": "jaisw7/shenfun", "max_stars_repo_head_hexsha": "7482beb5b35580bc45f72704b69343cc6fc1d773", "max_stars_repo_licenses": ["BSD-2-Clau...