text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import pybullet as p import math import pybullet_data import time import random import numpy as np import serial def radToPwm(angle): return ((2000 * angle) / math.pi) + 1500 # t in ms; the closer t is to 0, more accuracy but less smooth motion def updateRealServos(ser, t): # right legs ser.write( ...
{"hexsha": "15fd16e9d3467135adb284e509e5af639c37cb94", "size": 19815, "ext": "py", "lang": "Python", "max_stars_repo_path": "hexapodengine4.py", "max_stars_repo_name": "jonathan-sung/Hexapod-GA-Gait", "max_stars_repo_head_hexsha": "5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4", "max_stars_repo_licenses": ["MIT"], "max_star...
from __future__ import absolute_import import numpy as np from math import ceil, floor from keras import backend as K from keras.optimizers import Optimizer from keras.legacy import interfaces from tensorflow.python.ops import variable_scope from tensorflow.python.ops import variables from tensorflow.python.ops impo...
{"hexsha": "0e46f177a1cef7b1bbb0ed10f60da33965746121", "size": 32434, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/utilities/optimizers.py", "max_stars_repo_name": "Neves4/colab-rl", "max_stars_repo_head_hexsha": "ab2fd9126dcf19030ca241a79906f2362a26dd78", "max_stars_repo_licenses": ["MIT"], "max_stars...
//======================================================================= // Copyright 2014-2015 David Simmons-Duffin. // Distributed under the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //======================================================================= #in...
{"hexsha": "c01de2fbaf20da3ad75dd3745de1aac7431149a9", "size": 1905, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "src/sdpb/solve.cxx", "max_stars_repo_name": "suning1985/sdpb", "max_stars_repo_head_hexsha": "9263b89496d1c356f11d08f995825626b60f5b89", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
from __future__ import division, print_function import sys import os import importlib import numpy as np import scipy from scipy import signal from matplotlib.colors import ListedColormap import sys sys.path.insert(0, '../') from mars import config, DeterministicFunction, GridWorld from mars.utils import dict2func imp...
{"hexsha": "cfe42e85c1fdbc76be8fca0df84efa9b22ee7c4b", "size": 29463, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_utils.py", "max_stars_repo_name": "amehrjou/neural_lyapunov_redesign", "max_stars_repo_head_hexsha": "2a4dbb876d897b2bd29bf94e39882869794c4333", "max_stars_repo_licenses": ["MIT"...
// Copyright (c) 2015 John Maddock // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_MATH_ELLINT_JZ_HPP #define BOOST_MATH_ELLINT_JZ_HPP #ifdef _MSC_VER #pragm...
{"hexsha": "a3fa54746e42a13aa0b0146159583993de37f97b", "size": 2273, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "contrib/libboost/boost_1_62_0/boost/math/special_functions/jacobi_zeta.hpp", "max_stars_repo_name": "189569400/ClickHouse", "max_stars_repo_head_hexsha": "0b8683c8c9f0e17446bef5498403c39e9cb483b8", ...
\documentclass{article} \usepackage{enumerate} \usepackage{amsmath, amsthm, amssymb} \usepackage[margin=1in]{geometry} \usepackage[parfill]{parskip} \DeclareMathOperator*{\argmax}{arg\,max} \title{Econ C103 Problem Set 9} \author{Sahil Chinoy} \date{April 18, 2017} \begin{document} \maketitle{} \subsection*{Exercise...
{"hexsha": "a23c1bfdd7e6dd2ccc4f995dede843f9f26d2fa6", "size": 2499, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "hw9/hw9.tex", "max_stars_repo_name": "sahilchinoy/econ103", "max_stars_repo_head_hexsha": "ab2ecbb759eb811e953157e7f04f5a003066a62c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
module Extraction using Logging using LightGraphs, MetaGraphs import JSON # TODO: Create functions for each # Cause - is concept label, Effect - definition label # within a RelationMention with labels "Definition, Entity" """ definitiongraph(dir::String, namefunc) read a directory of json files and ingest all t...
{"hexsha": "abc1bb835272cbb07e87be797663d8b1c20a42e0", "size": 3802, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/definitions.jl", "max_stars_repo_name": "mehalter/SemanticModels.jl", "max_stars_repo_head_hexsha": "e19dd6bcdbc889dfad54daaab7ca54a7c6080a72", "max_stars_repo_licenses": ["MIT"], "max_sta...
from smp_manifold_learning.differentiable_models.ecmnn import EqualityConstraintManifoldNeuralNetwork from smp_manifold_learning.differentiable_models.utils import convert_into_at_least_2d_pytorch_tensor import pickle import numpy as np import matplotlib.pyplot as plt from smp_manifold_learning.motion_planner.feature i...
{"hexsha": "957c2ceec50d4e158c90179e182828fff493bb3e", "size": 5758, "ext": "py", "lang": "Python", "max_stars_repo_path": "smp_manifold_learning/scripts/evaluate_manifold_projection.py", "max_stars_repo_name": "gsutanto/smp_manifold_learning", "max_stars_repo_head_hexsha": "60ef8278942c784c8d3bcd0a09031475f80d96fb", "...
import numpy as np def read_calib_file(path): # taken from https://github.com/hunse/kitti float_chars = set("0123456789.e+- ") data = {} with open(path, 'r') as f: for line in f.readlines(): key, value = line.split(':', 1) value = value.strip() data[key] = v...
{"hexsha": "146f78ae47019b82cde5e15c09f05cbf3bca8c5b", "size": 907, "ext": "py", "lang": "Python", "max_stars_repo_path": "read_calib.py", "max_stars_repo_name": "sandeep-kota/sfmlearner", "max_stars_repo_head_hexsha": "418a2a48f033c124dfbc8d558244a75ec48254f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
function r = logdet(M) % Compute log(det(A)) without the usual numerical inaccuracies. % Copyright (C) Christian Kothe, SCCN, 2011, christian@sccn.ucsd.edu % % 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 F...
{"author": "goodshawn12", "repo": "REST", "sha": "e34ce521fcb36e7813357a9720072dd111edf797", "save_path": "github-repos/MATLAB/goodshawn12-REST", "path": "github-repos/MATLAB/goodshawn12-REST/REST-e34ce521fcb36e7813357a9720072dd111edf797/dependencies/BCILAB/code/misc/logdet.m"}
from os import environ from pprint import pprint import pickle import numpy as np import numpy as np import torch import pandas as pd import seaborn as sns from torch import optim import time from tqdm import tqdm import torch import torch.nn as nn import torch.nn.functional as F import math import copy import random ...
{"hexsha": "43f2d7275d9498f7a86543ac04f7aed7004faf16", "size": 28962, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/CostModels/Recursive_LSTM_v2_MAPE/utils.py", "max_stars_repo_name": "reality95/tiramisu", "max_stars_repo_head_hexsha": "8d6f1053b0086f7e50ee56bf36c86d7cbf334e92", "max_stars_repo_licenses"...
#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http:...
{"hexsha": "4382b0057f61222e1c296c58a607b76a05c23b34", "size": 1308, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/mpl/aux_/config/ttp.hpp", "max_stars_repo_name": "diersma/sick_visionary_cpp_shared", "max_stars_repo_head_hexsha": "f86e647886fb1199a2ed063fcf128ed78c6651db", "max_stars_repo_licenses...
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import ode from mpl_toolkits.mplot3d.axes3d import Axes3D plt.style.use('dark_background') def plot(r): # 3D plot fig = plt.figure(figsize=(10,10)) ax = fig.add_subplot(111, projection='3d') # plot trajectory and starting point ax.plot(...
{"hexsha": "e8b80253bb2503889c03f32a13f36aee347ad0fd", "size": 2473, "ext": "py", "lang": "Python", "max_stars_repo_path": "two_body_problem.py", "max_stars_repo_name": "jasonody/orbital-mechanics", "max_stars_repo_head_hexsha": "abe50da66c1598d1c31f6f3a4faf313e6cdebc7c", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np from .Distances import gower_distances import math from scipy.spatial import distance from sklearn.manifold import Isomap from sklearn.utils import validation from sklearn.metrics import pairwise, pairwise_distances from scipy.spatial.distance import pdist, wminkowski unsquareform = lambda a: a[np.n...
{"hexsha": "f261c3f6d9f5d53261694c68279097b9474d8399", "size": 10205, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GAPS_Explanation.py", "max_stars_repo_name": "aindrila-ghosh/LAPS_and_GAPS", "max_stars_repo_head_hexsha": "1d8ca1ccd301400dbd9ee107b0a232c260c5ce59", "max_stars_repo_licenses": ["MIT"], "max...
SUBROUTINE FDVDLD (IENTRY,IIX,IIY) C C C +-----------------------------------------------------------------+ C | | C | Copyright (C) 1...
{"hexsha": "2fe251853e4817bade513c2f13a1947ce590d918", "size": 33765, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "iraf.v2161/sys/gio/ncarutil/dashsmth.f", "max_stars_repo_name": "ysBach/irafdocgen", "max_stars_repo_head_hexsha": "b11fcd75cc44b01ae69c9c399e650ec100167a54", "max_stars_repo_licenses": ["MIT"], ...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import seaborn as sns sns.set_style("whitegrid", {'axes.grid': False}) import pandas as pd import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection from matplotlib import cm from kvae.utils.movie...
{"hexsha": "ff4ab258150a6eea0d18d6dbc88aa5ee972658cc", "size": 13152, "ext": "py", "lang": "Python", "max_stars_repo_path": "kvae/utils/plotting.py", "max_stars_repo_name": "abeken0713/kvae", "max_stars_repo_head_hexsha": "51262f4311795476b0adfbc29d15e74d3aedb25e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#include <set> #include <ace/Signal.h> #include <boost/algorithm/string_regex.hpp> #include "application/Application.h" #include "application/ApplicationInitialize.h" #include "application/ApplicationUnInitia.h" #include "application/ApplicationPeriodRun.h" #include "Configuration.h" #include "rest/ConsulConnection.h"...
{"hexsha": "069d872341a65b7c65aa9ae111088f82a775cd70", "size": 30264, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/daemon/Configuration.cpp", "max_stars_repo_name": "FrederickHou/app-mesh", "max_stars_repo_head_hexsha": "8f23a1555d3a8da1481d91e1e60464fc197bd6e5", "max_stars_repo_licenses": ["MIT"], "max_sta...
# match citation data with aggregated firm data (to be run before firm_merge.py) import argparse import numpy as np import pandas as pd from tools.tables import read_csv # parse input arguments parser = argparse.ArgumentParser(description='Merge patent citation data.') parser.add_argument('--output', type=str, defaul...
{"hexsha": "66f9ad0ac0ee6e28f51fba575bc642c76be2bce5", "size": 1692, "ext": "py", "lang": "Python", "max_stars_repo_path": "firm_cites.py", "max_stars_repo_name": "iamlemec/patents", "max_stars_repo_head_hexsha": "776b51464dbcdd07aee6554d61434c4d668a2d16", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 100, "ma...
import numpy as np import criteria from datasets.ActivityNet import ActivityNetGCN from datasets.TACOS import TACOSGCN from datasets.Charades import CharadesGCN from datasets.Didemo import DidemoGCN from utils import load_json, generate_anchors def get_dataset(dataset, feature_path, data_path, word2vec, max_num_frame...
{"hexsha": "353e09a87ecf2dd9fa20aba4ee889be5e3b269b9", "size": 19194, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/dataloaders/clip_loader.py", "max_stars_repo_name": "liudaizong/IA-Net", "max_stars_repo_head_hexsha": "f19295d13d1468eb582521131cde3de83dfd18f6", "max_stars_repo_licenses": ["MIT"], "max_st...
from sympy import (Rational, Symbol, Real, I, sqrt, oo, nan, pi, E, Integer, S, factorial, Catalan, EulerGamma, GoldenRatio, cos, exp, Number, zoo, log, Mul) from sympy.core.power import integer_nthroot from sympy.core.numbers import igcd, ilcm, igcdex, ifactorial, seterr, _intcac...
{"hexsha": "b4800c71b6ef5aebe7e8d39fbe0fd4c7679081ff", "size": 25919, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympy/core/tests/test_numbers.py", "max_stars_repo_name": "pernici/sympy", "max_stars_repo_head_hexsha": "5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
""" Simple GUIs using the interactive capabilities of :mod:`matplotlib` **Interactive gravimetric modeling** * :class:`~fatiando.gui.simple.Moulder` * :class:`~fatiando.gui.simple.BasinTrap` * :class:`~fatiando.gui.simple.BasinTri` **Interactive modeling of layered media** * :class:`~fatiando.gui.simple.Lasagne` -...
{"hexsha": "8273bb00b69b00957c87cb5ee0ea2e2453199a4e", "size": 21646, "ext": "py", "lang": "Python", "max_stars_repo_path": "fatiando/gui/simple.py", "max_stars_repo_name": "silky/fatiando", "max_stars_repo_head_hexsha": "5041c6b29758a5e73e9d7b2b906fa5e493fd9aba", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
import torch import math import matplotlib.pyplot as plt from scipy import integrate from scipy.sparse.linalg import LinearOperator from scipy.sparse.linalg import eigs import numpy as np import h5py def beta_function(): file = h5py.File(".\\data\\TNR beta_function 1.hdf5", "r") beta_list = file[("beta_list")]...
{"hexsha": "725d800c9a0ddf03d3c22cb4b01f8040fe424016", "size": 5084, "ext": "py", "lang": "Python", "max_stars_repo_path": "test tnr.py", "max_stars_repo_name": "xwkgch/IsoTensor", "max_stars_repo_head_hexsha": "b08e9753d50f082023d4f516361bc666ee359223", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max_s...
#include <boost/test/unit_test.hpp> #include "Copy.hpp" #include <unordered_map> #include <vector> using namespace json; BOOST_AUTO_TEST_SUITE(TestCopy) std::string do_copy(const std::string &src) { Writer writer; Parser parser(src.data(), src.data() + src.size()); copy(writer, parser); return std::m...
{"hexsha": "aa2337a417ca0633fed8b84007bdf111d83c8a0e", "size": 1751, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/Copy.cpp", "max_stars_repo_name": "wnewbery/cpp-json", "max_stars_repo_head_hexsha": "3f4edf99ca67847c6a32ce09cc9ae48c9477d550", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import os from os import listdir from os.path import isdir, isfile, join from typing import List import numpy as np def np_softmax(x): exp_x = np.exp(x) return exp_x / np.sum(exp_x) def basename(path: str) -> str: """ get '17asdfasdf2d_0_0.jpg' from 'train_folder/train/o/17asdfasdf2d_0_0...
{"hexsha": "715ba813dc40c31c11d9adce446e4679d0a42120", "size": 2197, "ext": "py", "lang": "Python", "max_stars_repo_path": "bert/wtfml/utils/utils.py", "max_stars_repo_name": "jphacks/C_2111", "max_stars_repo_head_hexsha": "df87580614d7e5c225ea30746e5f2cd0576bbc98", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """PyTorch Dataset implementation for CoDraw dataset""" import h5py import numpy as np import torch import torch.nn as nn from ..utils.config import keys class CoDrawDataset(nn.Module): def __init__(self, path, cfg, img...
{"hexsha": "bb73106e5c02967f3d33cc5f939309b095c3bde5", "size": 5390, "ext": "py", "lang": "Python", "max_stars_repo_path": "irgan/data/codraw_dataset.py", "max_stars_repo_name": "Victarry/IR-GAN-Code", "max_stars_repo_head_hexsha": "51a217029e9dc9b0507525c2fabf51f85424fc68", "max_stars_repo_licenses": ["MIT"], "max_sta...
macro memoize(cache_var) filename = String(cache_var) * ".jld2" quote if !isfile( $filename ) @save $filename $cache_var else @load $filename $cache_var end end end macro memoize(cache_var, fn) filename = String(cache_var) * ".jld2" quote ...
{"hexsha": "dbd4f64728744e466a97bd2165e22a2c5779b525", "size": 475, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Memoize.jl", "max_stars_repo_name": "caseykneale/DeltaSugar.jl", "max_stars_repo_head_hexsha": "bf492abddbf3d3e484d5c0a635762375a3bff05f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright 2019 The ROBEL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
{"hexsha": "728b83a6ab26af05b2220133a5a155f29fd995f1", "size": 8890, "ext": "py", "lang": "Python", "max_stars_repo_path": "robel/scripts/rollout.py", "max_stars_repo_name": "Del9fina/robel", "max_stars_repo_head_hexsha": "63dfac65932757134e5766f1e20a339efe281bc7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
import os import time import datetime import tensorflow as tf import numpy as np import data_utils as utils from tensorflow.contrib import learn from text_cnn import TextCNN from data_utils import IMDBDataset import argparse import pandas as pd import pickle from ekphrasis.classes.preprocessor import TextPreProcesso...
{"hexsha": "1a44f1371411ec4639654335bb1ed7a422da6562", "size": 6692, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "manueltonneau/glove-text-cnn", "max_stars_repo_head_hexsha": "dbf9a14c4a6c03fee1b2b065d6587323079301d8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
# -*- coding: utf-8 -*- """GEModelClass Solves an Aiygari model """ ############## # 1. imports # ############## import time import numpy as np from numba import njit, prange # consav from consav import ModelClass, jit # baseline model class and jit from consav import linear_interp # linear interpolation from cons...
{"hexsha": "cc1439701268d0540d4cde22a0dd89faa66ff725", "size": 16431, "ext": "py", "lang": "Python", "max_stars_repo_path": "00. DynamicProgramming/GEModel.py", "max_stars_repo_name": "alanlujan91/ConsumptionSavingNotebooks", "max_stars_repo_head_hexsha": "4455500d17fed4dd1f3f4844aeb5dd5d3b89903f", "max_stars_repo_lice...
import numpy as np import pandas as pd pd.set_option('display.height', 1000) pd.set_option('display.width', 1000) pd.set_option('display.max_columns', 500) pd.set_option('display.max_rows', 500) def xorseq(L,R): result = 0 for n in xrange(L, R+1): if (n-2)% 4 == 0: result = result ^ (n+1) ...
{"hexsha": "e88396fb297aaf5753b1395450628a7f96723ffa", "size": 933, "ext": "py", "lang": "Python", "max_stars_repo_path": "hourrank-5/xor-se/xor-sequence-slow.py", "max_stars_repo_name": "codedsk/challenges", "max_stars_repo_head_hexsha": "bea2e2daef02ca512f67e47bc88519c0940e4be8", "max_stars_repo_licenses": ["MIT"], "...
import tensorflow as tf import kerastuner as kt from utils.generic_utils import print_log import utils.config as config import os import datetime import time from utils.analyzing_data import multiclass_analysis import pickle import cv2 import numpy as np def get_label(file_path): # convert the path to a list of p...
{"hexsha": "5393b41cf1ec6980469dc395139bd4ab0ba7ca09", "size": 18214, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/handle_modes.py", "max_stars_repo_name": "1Stohk1/tami", "max_stars_repo_head_hexsha": "e0aa902bb767631dd2435ed0eac05209b9bd64ed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as onp from optimism.JaxConfig import * from optimism import FunctionSpace from optimism import Mesh from optimism import QuadratureRule from optimism.TensorMath import tensor_2D_to_3D PhaseFieldFunctions = namedtuple('PhaseFieldFunctions', ['compute_internal_energy', ...
{"hexsha": "171c7151b9025d800f0256a192b0cbe6acf27bb2", "size": 8162, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimism/phasefield/PhaseField.py", "max_stars_repo_name": "btalami/optimism", "max_stars_repo_head_hexsha": "6bda77ce33348e9a90bcf5fec135d6f27a4e46ba", "max_stars_repo_licenses": ["MIT"], "max_st...
using MacroTools function Base.convert(::Type{Expression}, ex::Expr) ex.head === :if && (ex = Expr(:call, ifelse, ex.args...)) ex.head === :call || throw(ArgumentError("internal representation does not support non-call Expr")) op = eval(ex.args[1]) # HACK args = convert.(Expression, ex.args[2:end]) ...
{"hexsha": "7776ad8cc1ca5f7d1376c82c1d7f543cad9064fb", "size": 3320, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ModelingToolkit.jl-961ee093-0014-501f-94e3-6117800e7a78", "max_stars_repo_head_hexsha": "b55981646739886ba6e8ad26243873b9ac94dc...
import deepchem as dc smiles = ["C", "O=C=C=C"] featurizer=dc.feat.ConvMolFeaturizer(per_atom_fragmentation=False) featurizer1 = dc.feat.MolGraphConvFeaturizer(use_edges=True) f = featurizer.featurize(smiles) f1 = featurizer1.featurize(smiles) print(f[1].canon_adj_list) print(f1[1].edge_index) from torch_geom...
{"hexsha": "e0dd2f15b1a671dd4c9fe3a07c84e604393d7eb3", "size": 7592, "ext": "py", "lang": "Python", "max_stars_repo_path": "prog/edge.py", "max_stars_repo_name": "kimmo1019/DeepCDR_LCQ", "max_stars_repo_head_hexsha": "633dc5d6925ba086faa63227160b5421c4cffa3a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import pandas as pd df = pd.read_csv('balanced_reviews.csv') df.shape df.columns df.sample(10) #sample will pick random data df['reviewText'][0] df['overall'].value_counts() df.isnull().any(axis = 0) df.dropna(inplace = True) df = df [df['overall'] != 3] import numpy as np df['Positivity'] = np.where(df['...
{"hexsha": "18016158f9b38592fe0950aa38b402a0616b6592", "size": 354, "ext": "py", "lang": "Python", "max_stars_repo_path": "day-48 data preprocessing-making dataset for NLP/Day48.py", "max_stars_repo_name": "itsjaysuthar/DSintern", "max_stars_repo_head_hexsha": "985eb1d13d52d817148fea931597072f9a23fc33", "max_stars_repo...
from fuzzy_asteroids.util import Scenario import numpy as np # "Simple" Scenarios --------------------------------------------------------------------------------------------------# # Threat priority tests threat_test_1 = Scenario( name="threat_test_1", asteroid_states=[{"position": (0, 300), "angle": -90.0, ...
{"hexsha": "b31df60e00166612398f3b8eb16174c35e86d989", "size": 42680, "ext": "py", "lang": "Python", "max_stars_repo_path": "competition/scenarios.py", "max_stars_repo_name": "xfuzzycomp/FuzzyChallenge2021", "max_stars_repo_head_hexsha": "5876450fdb913c6707352bfe9fcc25748f041f52", "max_stars_repo_licenses": ["MIT"], "m...
from typing import Dict, Callable, List, Union from numpy import random from numpy.lib.function_base import append, select import torch import gym import copy from torch.optim import optimizer from torch.serialization import save from tqdm import tqdm import numpy as np import torch.optim as optim import os from collec...
{"hexsha": "5dbdd72dc1e7bd7afad912796dcfcccddb30bf3a", "size": 21816, "ext": "py", "lang": "Python", "max_stars_repo_path": "m3ddpg.py", "max_stars_repo_name": "Sebastian-Griesbach/Minimax-Multi-Agent-Deep-Deterministic-Policy-Gradient", "max_stars_repo_head_hexsha": "c54d2bef7860da03d6be8e23f75648f98deb6141", "max_sta...
#!/usr/bin/env python # coding: utf-8 # In[1]: from numpy import pi, cos, sin, arccos, arange #import mpl_toolkits.mplot3d #import matplotlib.pyplot as pp import numpy as np import copy import open3d as o3d from biopandas.pdb import PandasPdb def dot_sphere(x0,y0,z0,occupancy=0.5, num_pts=1000): num_pts = 1000...
{"hexsha": "38363005f6f189f63c8dd9915ddbbc95d586eedc", "size": 1174, "ext": "py", "lang": "Python", "max_stars_repo_path": "Source Code/pdb_sphere.py", "max_stars_repo_name": "sfernando-BAEN/ELIXIR-A", "max_stars_repo_head_hexsha": "568cba6623d4e953afa18551fcf589d56f092729", "max_stars_repo_licenses": ["Apache-2.0"], "...
from parcels import FieldSet, ParticleSet, JITParticle, AdvectionRK4 from datetime import timedelta as delta from argparse import ArgumentParser import numpy as np import dask as da import dask.array as daArray from glob import glob import time as ostime import matplotlib.pyplot as plt import os import parcels import p...
{"hexsha": "abf9d995edd53549d6c8eaf38d1dc35be6cca921", "size": 11668, "ext": "py", "lang": "Python", "max_stars_repo_path": "performance/example_performanceProfiling.py", "max_stars_repo_name": "noemieplanat/Copy-parcels-master", "max_stars_repo_head_hexsha": "21f053b81a9ccdaa5d8ee4f7efd6f01639b83bfc", "max_stars_repo_...
""" Use Approximate Bayesian Computation (ABC) to parametrize the rate function given a hypothetical experiment timeline. """ import csv from timeit import default_timer as timer import click import numpy as np from pyabc import (ABCSMC, Distribution, RV) from pyabc.populationstrategy import AdaptivePopulationSize f...
{"hexsha": "b29d7f06d63f509a43e585f763d5803b302f2b3b", "size": 10354, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/abc.py", "max_stars_repo_name": "Sandalmoth/dual-adaptation", "max_stars_repo_head_hexsha": "1052b47dbd3c473c406bb72d9ecd0693ca0c1f80", "max_stars_repo_licenses": ["Zlib"], "max_stars_count"...
import tensorflow as tf from libspn.tests.test import argsprod import libspn as spn from libspn.graph.op.conv_sums import ConvSums import numpy as np import random class TestBaseSum(tf.test.TestCase): @argsprod([False, True], [spn.InferenceType.MARGINAL, spn.InferenceType.MPE]) def test_compare_manual_conv(s...
{"hexsha": "ef1f716f216d41162673d3c526f31f4a22c090ee", "size": 9131, "ext": "py", "lang": "Python", "max_stars_repo_path": "libspn/tests/test_graph_convsum.py", "max_stars_repo_name": "pronobis/libspn", "max_stars_repo_head_hexsha": "b98141ea5a609a02706433220758e58f46bd3f5e", "max_stars_repo_licenses": ["MIT"], "max_st...
# Simon Scheidegger, 01/19 # edited by Patrick O'Callaghan, with Cameron Gordon and Josh Aberdeen, 11/2021 # ====================================================================== import solver as solver from parameters import * # parameters of model from variables import * from equations import * import pos...
{"hexsha": "15e82474415a6f04dd08520aef4d48f58bd804f2", "size": 5301, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/_current-vec/main.py", "max_stars_repo_name": "uq-aibe/spir-oz", "max_stars_repo_head_hexsha": "4ae3ff6f230679f21b9c4072529df94187f9e098", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import time import numpy as np import numpy.random as rnd from pymanopt.solvers.solver import Solver from pymanopt.tools import printer class ParticleSwarm(Solver): """Particle swarm optimization (PSO) method. Perform optimization using the derivative-free particle swarm optimization algorithm. Ar...
{"hexsha": "9bc07d833166a9fe52b039bad3001a7fcb61efe8", "size": 6573, "ext": "py", "lang": "Python", "max_stars_repo_path": "solvers/particle_swarm.py", "max_stars_repo_name": "cjyaras/pymanopt", "max_stars_repo_head_hexsha": "447545fd9a6f33f3060a083fde1a2ac643ed340e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import matplotlib.pyplot as plt import lightgbm as lgb import re from sklearn import metrics from sklearn.svm import SVC from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score from sklearn.preprocessing import Labe...
{"hexsha": "dd4c12396eb61eb49ddd4db3e1e0ed99abf9c1d6", "size": 5430, "ext": "py", "lang": "Python", "max_stars_repo_path": "pred.py", "max_stars_repo_name": "debunagoya/GasolineCharge", "max_stars_repo_head_hexsha": "20b4f9476c4f340a62b9ec74e9dc6149327acdb9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from datetime import date from enum import Enum from typing import List, Tuple import numpy as np from dateutil.relativedelta import relativedelta from sqlalchemy import MetaData, Table, and_, create_engine engine = create_engine( 'sqlite:///query/project.db?check_same_thread=False') metadata = MetaData(engine) c...
{"hexsha": "e5b7e10179d69c653f76725a2e185019ae798d5e", "size": 4365, "ext": "py", "lang": "Python", "max_stars_repo_path": "query/query.py", "max_stars_repo_name": "TheLurkingCat/Database-term-project", "max_stars_repo_head_hexsha": "c9fb99151c70fb5c3547051df7b4e478e2681bc7", "max_stars_repo_licenses": ["MIT"], "max_st...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os, matplotlib.pyplot as plt, numpy as np, pandas as pd import seaborn as sns sns.set_theme() sns.set_style("white") from glob import glob from common_functions import load_data from scipy import stats import time from trace_extract_funcs import ( get_nn, ...
{"hexsha": "f953ab2c589caa50b615e4129c6dbd60482bfdc0", "size": 15481, "ext": "py", "lang": "Python", "max_stars_repo_path": "CMC_compare.py", "max_stars_repo_name": "geno-verse/indoC", "max_stars_repo_head_hexsha": "d3541cbae9579a138fdca1f4ecb62c490dec4f9b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import utils import ANN as ann import numpy as np from keras import losses as klosses from functools import reduce import matplotlib.pyplot as plt num_epochs = 5 ensemble_size = 15 mlp_structure = ''' { "input_shape" : [784], "layers" : [ { "type" : "Dense", "units" : 64, ...
{"hexsha": "cc20667a229da23642305b09edbb018482883a06", "size": 6946, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/digits_entropy2.py", "max_stars_repo_name": "Xiaoming94/TIFX05-MScThesis-HenryYang", "max_stars_repo_head_hexsha": "9ab19b8d8bbf328fd3165f0833f4c66a0cfc12b7", "max_stars_repo_licenses": ["MIT"...
{- Groupoid quotients: -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.GroupoidQuotients.Properties where open import Cubical.HITs.GroupoidQuotients.Base open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cu...
{"hexsha": "591b1e66b2f511ff75e7dd9a687de04c5b9b00f3", "size": 4730, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/HITs/GroupoidQuotients/Properties.agda", "max_stars_repo_name": "Schippmunk/cubical", "max_stars_repo_head_hexsha": "c345dc0c49d3950dc57f53ca5f7099bb53a4dc3a", "max_stars_repo_licenses": [...
[STATEMENT] lemma AbstrLevels_A9_A92: assumes "sA9 \<in> AbstrLevel i" shows "sA92 \<notin> AbstrLevel i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sA92 \<notin> AbstrLevel i [PROOF STEP] (*<*) [PROOF STATE] proof (prove) goal (1 subgoal): 1. sA92 \<notin> AbstrLevel i [PROOF STEP] using assms [PROOF STATE...
{"llama_tokens": 245, "file": "ComponentDependencies_DataDependenciesCaseStudy", "length": 3}
*** Start of NAG Library implementation details *** Implementation title: Linux, 64-bit, Intel C/C++ or I...
{"hexsha": "fd4bc95b716df6d267639fca8679517cd9c49387", "size": 1330, "ext": "r", "lang": "R", "max_stars_repo_path": "simple_examples/baseresults/outputexample.r", "max_stars_repo_name": "numericalalgorithmsgroup/NAGJavaExamples", "max_stars_repo_head_hexsha": "f625b3f043c5c14a88d7ecbc04374acf75d63c82", "max_stars_repo...
import os import csv import cv2 import datetime import transform import argparse import numpy as np from network import model from sklearn.utils import shuffle from sklearn.model_selection import train_test_split import tensorflow as tf from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint class Pipelin...
{"hexsha": "abce1803926fd740d60cc4e5307859d62776f84a", "size": 5330, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "zexihan/CarND-Behavioral-Cloning-P3", "max_stars_repo_head_hexsha": "83af606605d66ba9a95b7cc9c911beaa8bd9f59b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Fundamental computation for CTMC """ """ unifstep!(tr, P, poi, range, weight, x, y) Compute the probability vector using the uniformized CTMC. y = exp(tr(Q)*t) * x where Q is unifomed by P = I - Q/qv. In the computation, Poisson p.m.f. with mean qv*t is used. Parameters: - tr: transpose operator - P: The unifo...
{"hexsha": "2dfc23a4e0aeb8b70d6f9963e8f6f444cfb76daa", "size": 3742, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/_forward_backward.jl", "max_stars_repo_name": "JuliaReliab/NMarkov.jl", "max_stars_repo_head_hexsha": "cdaacdfe9801af84ea5f6a9cbb4108d77e2a8a0c", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import tensorflow as tf from simulation import simulation import pickle import os simulation_name = 'NLO_HIG' batch_size = 128 mode = 'IG' learning_rate = 1.0 truncation = 10**-6 inversion = 'HIG' opt = tf.keras.optimizers.SGD seed = 22 Nx = 2 # Number of oscillators Nt = 96 ...
{"hexsha": "5a18ba6725fed72c3a9e849c1ffb56847c112b6b", "size": 1086, "ext": "py", "lang": "Python", "max_stars_repo_path": "Nonlinear_oscillators/submit_HIG.py", "max_stars_repo_name": "tum-pbs/half-inverse-gradients", "max_stars_repo_head_hexsha": "08d38820054569db869c5f5c0e4b20bd2a044e42", "max_stars_repo_licenses": ...
[STATEMENT] lemma top_sorted_abs_mem: assumes "(top_sorted_abs R (h # l))" "(ListMem x l)" shows "(\<not> R x h)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> R x h [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: top_sorted_abs R (h # l) ListMem x l goal (1 subgoal): 1. \<not> R x h ...
{"llama_tokens": 168, "file": "Factored_Transition_System_Bounding_Acyclicity", "length": 2}
#BSD 3-Clause License # #Copyright (c) 2019, The Regents of the University of Minnesota # #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #* Redistributions of source code must retain the above cop...
{"hexsha": "3192b69e038a66fd12ea97bfc5f599b0c7f84ea7", "size": 11204, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/thermalModel.py", "max_stars_repo_name": "VidyaChhabria/TherMOS", "max_stars_repo_head_hexsha": "b2af79d1ecd236699d5304f9af3334d83fe6e78e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
@testset "Composition" begin encodings = (ProjectiveTransforms((5, 5)), ImagePreprocessing(), OneHot()) blocks = (Image{2}(), Label(1:10)) obs = (rand(RGB{N0f8}, 10, 10), 7) testencoding(encodings, blocks, obs) end
{"hexsha": "c1e56e4c625ccf4e58833cac4eafd728f0312012", "size": 232, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Vision/tests.jl", "max_stars_repo_name": "Chandu-4444/FastAI.jl", "max_stars_repo_head_hexsha": "290ae32e7b1ca502fc93e1a86aa250658cf1f72a", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
C23456789012345678901234567890123456789012345678901234567890123456789012 C c Program to compute spline fits to fermi integrals cc Must provide data file 94 subroutine initferm(FilePath) ! use parallel_module ! use mpi implicit double precision (a-h,o-z) parameter (n=201) charact...
{"hexsha": "bd2cb4b9e56c56c6f4a912d2f61109f14cd68bf5", "size": 1355, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "TableCreator/Old/LS/initferm.f", "max_stars_repo_name": "srichers/weaklib", "max_stars_repo_head_hexsha": "4a26ff17d3224d8fe90b922cb55ea9d865200154", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import pandas as pd import numpy as np from .utils.util import filter_entity_type from .uwb_motion_filters import TrayMotionButterFiltFiltFilter, TrayMotionSavGolFilter from process_cuwb_data.utils.log import logger class FeatureExtraction: def __init__(self, frequency="100ms", position_filter=T...
{"hexsha": "28025a7495c0b24dec1d3acdc8f07b6069275c5d", "size": 31231, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_cuwb_data/uwb_motion_features.py", "max_stars_repo_name": "WildflowerSchools/wf-process-cuwb-data", "max_stars_repo_head_hexsha": "8d94eeec82401f0f62ce1e0b7fdefd49e0328921", "max_stars_re...
# ***************************************************************************** # Copyright (c) 2019, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
{"hexsha": "4a363f27962275522fc763e832a3fe2f236fdbcb", "size": 3049, "ext": "py", "lang": "Python", "max_stars_repo_path": "sdc/datatypes/hpat_pandas_getitem_types.py", "max_stars_repo_name": "samir-nasibli/sdc", "max_stars_repo_head_hexsha": "b9144c8799d6454dec3e5c550e305963b24c1570", "max_stars_repo_licenses": ["BSD-...
#!/usr/bin/env python import numpy as np import cv2 fps = 20 capSize = (1028, 720) fourcc = cv2.VideoWriter_fourcc('m', 'j', 'p', 'g') out = cv2.VideoWriter() success = out.open('output.mov', fourcc, fps, capSize, True) capture = cv2.VideoCapture(0) while (capture.isOpened()): ret, frame = capture.read() if ret...
{"hexsha": "584fcd9b87ab1dff12c18bb1ce7fdf8761b4cf96", "size": 580, "ext": "py", "lang": "Python", "max_stars_repo_path": "video-write.py", "max_stars_repo_name": "ultranaut/fuzzy", "max_stars_repo_head_hexsha": "4ad2c4d6516c7540fc42cbeb44f26913e62d501d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
library(randomForest) library(caret) library(doMC) library(mmadsenr) library(futile.logger) library(dplyr) library(ggthemes) # Train and tune random forest classifiers for each of the three data sets coming out of the experiment # "equifinality-4", for binary analysis. # # Assumes that data-preparation.r has previo...
{"hexsha": "76cf01a2421b238b6102b7f8cc265a9c04f2d373", "size": 6096, "ext": "r", "lang": "R", "max_stars_repo_path": "analysis/equifinality-4/modelfitting/population-classification.r", "max_stars_repo_name": "mmadsen/experiment-ctmixtures", "max_stars_repo_head_hexsha": "460fd9f97977a2c6c5d43f6b0f9ca3c0639177f4", "max_...
Require Import Utf8. (* Set definition *) (* In this file, a set is represented by its characteristic function. *) Definition Ens {E : Type} := E -> Prop. Definition In {E : Type} (A :@Ens E) (x:E) := A x. Notation "x ∈ A" := (In A x) (at level 60). Local Hint Unfold In. (* Inclusion relation *) Definition incl {E: ...
{"author": "jnarboux", "repo": "PA_a_priori_analysis", "sha": "c18d834186695ad09f266d7eb069bda780248e48", "save_path": "github-repos/coq/jnarboux-PA_a_priori_analysis", "path": "github-repos/coq/jnarboux-PA_a_priori_analysis/PA_a_priori_analysis-c18d834186695ad09f266d7eb069bda780248e48/Coq/case_study.v"}
import io import os import sys from flask import Flask, request, send_file, jsonify from flask_cors import CORS from PIL import Image import numpy as np import time import logging import u2net_test import json import base64 import shutil import subprocess import re import pytesseract from deskew import determine_skew ...
{"hexsha": "a7d4ff4cf3bcf53a06161267ffb82c4d3bf29c25", "size": 5156, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/main.py", "max_stars_repo_name": "amtam0/u2netscan", "max_stars_repo_head_hexsha": "21b3f1b3fd1f8d462822cd6591b238b0011a80ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st...
import pennylane as qml from pennylane import numpy as np from friqml.utils import eps, sz, sx # EXERCISE 1 (Solution taken from https://pennylane.ai/qml/demos/tutorial_qaoa_maxcut.html) # unitary operator U_B with parameters beta and n def U_B(beta, n): for wire in range(n): qml.RX(2 * beta, wires=wire) ...
{"hexsha": "b907693266b69d674934e975a6f47cb911741be7", "size": 2617, "ext": "py", "lang": "Python", "max_stars_repo_path": "friqml/solutions/qaoa.py", "max_stars_repo_name": "znajob/fri_qml", "max_stars_repo_head_hexsha": "85b448f3907bcc2e7bf5d1cb79c5a562ed2c60ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Created on Fri Sep 6 10:59:32 2019 @author: harish """ from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from sklearn.linear_model import LogisticRegression import numpy as np import requests input_file = "datafiles/castmembers_with_an...
{"hexsha": "5862c83146def2006fb7abe1c33f7bb603316349", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "word_embeddings_analysis/fb_data_classifier.py", "max_stars_repo_name": "usc-isi-i2/dig-wikifier", "max_stars_repo_head_hexsha": "50357fdd1c796f7666f691288d228b5980d97187", "max_stars_repo_license...
import numpy as np from scipy.optimize import curve_fit from scipy.optimize import fsolve, brentq from scipy.interpolate import interp1d import scipy.integrate import sys import os import writeproperties.velociraptor_python_tools as vpt from scipy.spatial import cKDTree import h5py import re from constants import * fro...
{"hexsha": "290d699b5fd0fe25bbc42d5742e4acd52e85d351", "size": 29919, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/writeproperties/writeproperties_old.py", "max_stars_repo_name": "luciebakels/gadgetanalyse", "max_stars_repo_head_hexsha": "63b80b5306ebc4a1fbfd9cfbe3608ca10b8a19a3", "max_stars_repo_licen...
{-# OPTIONS --universe-polymorphism #-} module Categories.Adjunction.Composition where open import Level open import Categories.Category open import Categories.Functor hiding (equiv; assoc; identityˡ; identityʳ; ∘-resp-≡) renaming (id to idF; _≡_ to _≡F_; _∘_ to _∘F_) open import Categories.NaturalTransformation hidi...
{"hexsha": "4f1262fb46f1239f1127db4e408697cc242ebc2a", "size": 5185, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Categories/Adjunction/Composition.agda", "max_stars_repo_name": "copumpkin/categories", "max_stars_repo_head_hexsha": "36f4181d751e2ecb54db219911d8c69afe8ba892", "max_stars_repo_licenses": ["BSD-3...
[STATEMENT] lemma optimize_matches_option_generic: assumes "\<forall> r \<in> set rs. P (get_match r)" and "(\<And>m m'. P m \<Longrightarrow> f m = Some m' \<Longrightarrow> matches \<gamma> m' p = matches \<gamma> m p)" and "(\<And>m. P m \<Longrightarrow> f m = None \<Longrightarrow> \<not> matches \<g...
{"llama_tokens": 10096, "file": "Iptables_Semantics_Matching", "length": 23}
#!/usr/bin/env python3 from pathlib import Path import sys import cv2 import depthai as dai import numpy as np import time import argparse sys.path.append('../../../') from DodgeTheWrench.Avoidance import DodgeWrench from DodgeTheWrench.MoveMotor import MoveMotor import RPi.GPIO as GPIO # Set up LEDs greenLED = 27 re...
{"hexsha": "d8192f79629de7ea97706168f498be30e4e39754", "size": 11391, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/SpatialDetection/dtw-main.py", "max_stars_repo_name": "DodgeTheWrenchTeam/depthai-python", "max_stars_repo_head_hexsha": "57a529cae929a564443721ef8e1e6546bd931542", "max_stars_repo_licen...
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix 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) ...
{"hexsha": "1ae20ab39134ff02af4f6143240500df6a95230f", "size": 4595, "ext": "py", "lang": "Python", "max_stars_repo_path": "orix/plot/orientation_color_keys/euler_color_key.py", "max_stars_repo_name": "bm424/texpy", "max_stars_repo_head_hexsha": "8d78b568209a6da36fc831c6bc9e2b0cb4c740c8", "max_stars_repo_licenses": ["M...
\subsubsection{Threshold Value Determination} \label{subsubsec:threshold} Ideally, the mean absolute difference between two consecutive unchanged frames is zero. This is not the case, however, due to image noise and other environmental influences such as \SI{50}{Hz} flickering of the ambient light intensity. A suitabl...
{"hexsha": "17295c9cdeae92ebff291f15739854401fefd06a", "size": 878, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/report/sections/sw/throw_detection_mechanism/threshold.tex", "max_stars_repo_name": "MuellerDominik/P5-AIonFPGA", "max_stars_repo_head_hexsha": "13fc60fb973a4a87a4af1b49c17d5dd1fd239ed5", "max_st...
section \<open>The Instantiation\<close> (*<*) theory Instance imports Goedel_Incompleteness.Abstract_Second_Goedel Incompleteness.Quote Incompleteness.Goedel_I begin (*>*) definition "Fvars t = {a :: name. \<not> atom a \<sharp> t}" lemma Fvars_tm_simps[simp]: "Fvars Zero = {}" "Fvars (Var a) = {a}" "Fv...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Goedel_HFSet_...
using CayleyMengerDeterminant import InverseFunctions import Static: StaticInt import StaticArrays: Dynamic using Test @testset "CayleyMengerDeterminant.jl" begin InverseFunctions.test_inverse.( binomial2, [1, 2, 3, 4, 5, 6, Dynamic(), StaticInt(2), StaticInt(3)], compare = isequal, ) ...
{"hexsha": "d4889eef1077ddcc7280c7427ecff851150c2184", "size": 2686, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "pthariensflame/CayleyMengerDeterminant.jl", "max_stars_repo_head_hexsha": "f7876369fce4a4c9a46867cfcfc6deca5a00479a", "max_stars_repo_licenses": ["MIT"], ...
/- Copyright (c) 2021 James Arthur, Benjamin Davidson, Andrew Souther. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Arthur, Benjamin Davidson, Andrew Souther -/ import measure_theory.integral.interval_integral import analysis.special_functions.sqrt import analy...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/archive/100-theorems-list/9_area_of_a_circle.le...
!======================================================================= ! ! Determine the list of particles whose abundances need to be updated ! on the current iteration and load their properties into dummy arrays ! to be passed to the chemistry routine. Reset their abundances to the ! appropriate starting values...
{"hexsha": "01005bec0c098a2a402ee0528c1fe848ee163c62", "size": 4911, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/update_abundances.f90", "max_stars_repo_name": "uclchem/uclpdr", "max_stars_repo_head_hexsha": "a1c5ece6f21852af040ddf0af463cff26757d208", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import urllib.request import cv2 import numpy as np import os def store_raw_images(): neg_images_link = "http://www.image-net.org/api/text/imagenet.synset.geturls?wnid=n04096066" #neg_images_link = "http://www.image-net.org/api/text/imagenet.synset.geturls?wnid=n03244388" neg_image_urls = urllib.request.ur...
{"hexsha": "b8552ac7b78a8e981faea8f4d91567556574270f", "size": 900, "ext": "py", "lang": "Python", "max_stars_repo_path": "downloadDatasetNeg.py", "max_stars_repo_name": "Dexter2389/Stop-sign-Haar-cascade", "max_stars_repo_head_hexsha": "109938791f8005b602a4d2a802cfcfbcd4107ffc", "max_stars_repo_licenses": ["MIT"], "ma...
from sage.all import * import numpy as np import momentproblems.moment_functionals from momentproblems.plotting import _eval_Q, _eval_P def generate_plots(ds=(4,8), filename=None): from matplotlib import rc rc('text', usetex=True) rc('font', **{'family':'serif','serif':['Computer Modern']}) points = [...
{"hexsha": "e75caaba834cae907f9b7bf51dccb1f53a169055", "size": 2133, "ext": "py", "lang": "Python", "max_stars_repo_path": "momentproblems/examples/example3.py", "max_stars_repo_name": "mwageringel/momentproblems", "max_stars_repo_head_hexsha": "7b5207d9555be894a6450114c70ed78a04419716", "max_stars_repo_licenses": ["MI...
function r8vec_sort_heap_a_test ( ) %*****************************************************************************80 % %% R8VEC_SORT_HEAP_A_TEST tests R8VEC_SORT_HEAP_A. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 14 April 2009 % % Author: % % John Burkardt % ...
{"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/r8lib/r8vec_sort_heap_a_test.m"}
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import field_theory.minpoly /-! # Power basis This file defines a structure `power_basis R S`, giving a basis of the `R`-algebra `S` as a finite list of powers `1, x, ......
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/ring_theory/power_basis.lean"}
######################################## # MIT License # # Copyright (c) 2020 Miguel Ramos Pernas ######################################## ''' Definition of functions for GPUs. NOTE: All functions in this module accept a single type of value. ''' from . import gpu_cache from .gpu_core import GPU_SRC from ..base import...
{"hexsha": "61337beca602bcc0421fce9376a1d0ae920e61cd", "size": 6730, "ext": "py", "lang": "Python", "max_stars_repo_path": "minkit/backends/gpu_functions.py", "max_stars_repo_name": "mramospe/minkit", "max_stars_repo_head_hexsha": "fa6808a6ca8063751da92f683f2b810a0690a462", "max_stars_repo_licenses": ["MIT-0"], "max_st...
import torch from generative_playground.utils.gpu_utils import to_gpu import numpy as np from collections import OrderedDict from frozendict import frozendict class MixedLoader: def __init__(self, main_loader, valid_ds, invalid_ds): self.main_loader = main_loader self.valid_ds = valid_ds s...
{"hexsha": "509191ffcb8d6a25cee324e84fb4283ef57c7eb1", "size": 4721, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/generative_playground/data_utils/mixed_loader.py", "max_stars_repo_name": "ZmeiGorynych/generative_playground", "max_stars_repo_head_hexsha": "5c336dfbd14235e4fd97b21778842a650e733275", "max_s...
""" Some validation functions. """ from __future__ import division import numpy as np from scipy.stats import norm def smse(y_true, y_pred): """ Standardised mean squared error. Parameters ---------- y_true: ndarray vector of true targets y_pred: ndarray vector of predicted ...
{"hexsha": "22e6ab530577a297ac4c7c0e3a9a775095502751", "size": 3239, "ext": "py", "lang": "Python", "max_stars_repo_path": "revrand/metrics.py", "max_stars_repo_name": "basaks/revrand", "max_stars_repo_head_hexsha": "4c1881b6c1772d2b988518e49dde954f165acfb6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split from sklearn.ensemble import GradientBoostingRegressor from sklearn.preprocessing import StandardScaler import scikitplot as skplt from sklearn.metrics import mean_squared_error n = 1000 maxdegree = 6 # Make data s...
{"hexsha": "d6c1601c7b9f1d1f9b7e18fe9794a4addceaac6f", "size": 1619, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/src/SupportVMachines/Programs/gdreg.py", "max_stars_repo_name": "esleon97/MachineLearningECT", "max_stars_repo_head_hexsha": "97a218c9742b43a53e033a888f8a0b1074a2c48b", "max_stars_repo_license...
import unittest import numpy as np from openaerostruct.geometry.monotonic_constraint import MonotonicConstraint from openaerostruct.utils.testing import run_test class Test(unittest.TestCase): def test_sym1(self): surface = {"symmetry": True, "mesh": np.zeros((1, 5, 3))} comp = Mo...
{"hexsha": "eaa8a84e2007f37d83a1f301a52df3ee3ff78ceb", "size": 1039, "ext": "py", "lang": "Python", "max_stars_repo_path": "openaerostruct/geometry/tests/test_monotonic_constraint.py", "max_stars_repo_name": "lamkina/OpenAeroStruct", "max_stars_repo_head_hexsha": "d30e2626fc1272e7fe3a27386c4c663157e958ec", "max_stars_r...
from abc import ABCMeta import numpy as np from time import time class DotProduct(metaclass = ABCMeta): def naive_dotproduct(self, matrix, kernel): """ A naive approach which uses brute force loops. Very slow. :param matrix: a 3d numpy array of size [width][height][channel] :param ...
{"hexsha": "2089addd9ce255cc41e2f556cc3468791886ea60", "size": 1970, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/filters/dotproduct.py", "max_stars_repo_name": "DennisPing/image-processor-mvc", "max_stars_repo_head_hexsha": "b687185500404a84f21e16b6c56937be4afc5a1d", "max_stars_repo_licenses": ["MIT"],...
theory TreeStream = Main: use tactics method_setup circular_coinduction = "build_tactic (circular_coinduction_fun)" "all" method_setup coinduction = "build_tactic (coinduction_fun)" "rule_tac R=?Rzero in ga_cogenerated, instantiate_tac Rzero %s1.?R,step" method_setup coinduction_test = "build_tactic (coinduction_test...
{"author": "spechub", "repo": "Hets-lib", "sha": "7bed416952e7000e2fa37f0b6071b5291b299b77", "save_path": "github-repos/isabelle/spechub-Hets-lib", "path": "github-repos/isabelle/spechub-Hets-lib/Hets-lib-7bed416952e7000e2fa37f0b6071b5291b299b77/CoCASL/Proof-Support-Examples/TreeStream.thy"}
""" This module covers some tests from chapter 6: Frequentist Methods. """ import numpy as np class MajorityClassifier: """ Selects the majority label from the training data. This classifier only works on random data, with a binary label it's not meant to be used for actually problems. Attributes: ...
{"hexsha": "760d18bc8b0a8a71b454ecfd3dd82dd701825c49", "size": 3799, "ext": "py", "lang": "Python", "max_stars_repo_path": "chapter/six.py", "max_stars_repo_name": "sloscal1/ML-Prob-Perspective", "max_stars_repo_head_hexsha": "3474faf8559cc2229426ab773460000c6c40fbb3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np import matplotlib.pyplot as plt import re # fit = {3:-1, 4:-1, 5:-1, 7:5, 8:5, 9:6, 10:7, 11:7} fit = {12:6, 13:6, 14:9, 15:7, 16:9} for i in [12, 13, 14, 15, 16]: f = open('podaci/n'+str(i)+'.log') lines = f.readlines() f.close() f = open('fitovi/n'+str(i)+'.log', 'w') line = lines[7] line =...
{"hexsha": "5528567ca630af14f8dcba25739f951a7be71674", "size": 1840, "ext": "py", "lang": "Python", "max_stars_repo_path": "'rezultati'/fminsearch_n/plot.py", "max_stars_repo_name": "BogdanRajkov/Petnica2019", "max_stars_repo_head_hexsha": "b0a8abee951ca0e70ee99864145f48b93e2db24a", "max_stars_repo_licenses": ["MIT"], ...
## script to develop neural cell type deconvolution algorithm ## uses houseman method with new ref data for purified brain cell populations ## editted original code from minfi to take a matrix rather than RGset - this means data is not preprocessed together. source("FunctionsForBrainCellProportionsPrediction.r")...
{"hexsha": "e106a8929c66a2a460d3421e8cda0f9215884d82", "size": 1945, "ext": "r", "lang": "R", "max_stars_repo_path": "DNAm/CellularCompositionEstimation/createRefData.r", "max_stars_repo_name": "ejh243/BrainFANS", "max_stars_repo_head_hexsha": "903b30516ec395e0543d217c492eeac541515197", "max_stars_repo_licenses": ["Art...
# Introduction The goal of this tutorial is to develop a memory based model of addition that predicts choices and reaction times. The model illustrates the use of the Lognormal Race model to describe memory retrieval in ACT-R and the use of marginalization to characterize the many-to-one mapping between retrieved chun...
{"hexsha": "f2920938c57dfb815162fc1ed56f09f2ba89cf0e", "size": 595542, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "models/Siegler/Siegler_Model.ipynb", "max_stars_repo_name": "itsdfish/ACTRFundamentalTools.jl", "max_stars_repo_head_hexsha": "0314b4a79c71712d36052a549f577dd4b4bfd065", "max_stars_...
import numpy as np from training_plots import upscale, generated_images_plot, plot_training_loss from training_plots import plot_generated_images_combined from keras.optimizers import Adam from keras import backend as k import matplotlib.pyplot as plt from tqdm import tqdm from GAN import img_generator, img_discrimina...
{"hexsha": "dbf82b9937fe1cc69675f35ee345a2e1093c01ec", "size": 6341, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter13/train_gan.py", "max_stars_repo_name": "Nitin-Mane/Python-Deep-Learning-Projects", "max_stars_repo_head_hexsha": "f4ff04e611ff029bbbd9665fcc4139df935bcad1", "max_stars_repo_licenses": ["M...
import torch import numpy as np import matplotlib.pyplot as plt import os import argparse from tslearn.clustering import TimeSeriesKMeans from sklearn.manifold import TSNE from pytorch3d.transforms import quaternion_apply, quaternion_multiply, quaternion_invert from util.util import dict_map, dict_stack, dict_cat ""...
{"hexsha": "51d249dabf1e813839e1457bab195c10ca496f63", "size": 5302, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualization/tsne_cluster.py", "max_stars_repo_name": "castacks/tartan_drive", "max_stars_repo_head_hexsha": "c731ca65381f4a169a7ce7bcc02e8b1e68c407f4", "max_stars_repo_licenses": ["MIT"], "max_s...
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # Make numpy printouts easier to read. np.set_printoptions(precision=3, suppress=True) import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflo...
{"hexsha": "14540d1e2d5f6be674b90c54dd4db531c84b71c3", "size": 6882, "ext": "py", "lang": "Python", "max_stars_repo_path": "1_Beginner_4_BasicRegression.py", "max_stars_repo_name": "BrunoDatoMeneses/TensorFlowTutorials", "max_stars_repo_head_hexsha": "6430996ed331cf845c2e6eacb0be2f159c41a1d6", "max_stars_repo_licenses"...
SUBROUTINE read_namelist(iunit, io_stat, lc_name) USE vmec_input, ONLY: read_indata_namelist, 1 read_mse_namelist USE vmec_seq, ONLY: vseq IMPLICIT NONE !----------------------------------------------- ! D u m m y A r g u m e n t s !----------------------------------------------- ...
{"hexsha": "d5987ffb0a20b275659255488e56c60063b81ade", "size": 1188, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Sources/LIBSTELL_minimal/read_namelist.f", "max_stars_repo_name": "mbkumar/VMEC2000", "max_stars_repo_head_hexsha": "334e3bd478f2432b6fe8cbb321f0d81d9a952152", "max_stars_repo_licenses": ["MIT"], ...
import pandas as pd import numpy as np import sklearn from sklearn import linear_model from sklearn.utils import shuffle import matplotlib.pyplot as pyplot import pickle from matplotlib import style data = pd.read_csv("student-mat.csv", sep = ";") data = data[["G1", "G2", "G3", "studytime", "failures", "ab...
{"hexsha": "2c9784bfd3218599116a0b0dd41358ad380cd254", "size": 1364, "ext": "py", "lang": "Python", "max_stars_repo_path": "Student Grades/Regression Working File.py", "max_stars_repo_name": "anishs37/ML", "max_stars_repo_head_hexsha": "afb6bcd46b19b682b7fd1afa3dc04587a8a50913", "max_stars_repo_licenses": ["MIT"], "max...
import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import os from numpy import prod from datetime import datetime from model.model import CapsuleNetwork, CapsNet from model.loss import CapsuleLoss from time import time class CapsNetTrainer: """ Wrapper object for handl...
{"hexsha": "ea7bdcbe589c1229bf3d78f111875520422c1c69", "size": 5045, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer/trainer.py", "max_stars_repo_name": "lidq92/pytorch-dynamic-routing-between-capsules", "max_stars_repo_head_hexsha": "4388cd36193348cbb10035008360330e67acdd41", "max_stars_repo_licenses": ...
import numpy as np import torch import pybullet as p from _utils import * from _pybullet import start_bullet_env from _controller import * from _compute import * from _plot import * class Node: def __init__(self, n: list): self.x = n[0] self.y = n[1] self.parent = None def torch2numpy(x): ...
{"hexsha": "941caec462d56855885352c7a8976fa0a53e33ec", "size": 5137, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/cascade_control_dx.py", "max_stars_repo_name": "hjw-1014/Multi-Objective-Reactive-Motion-Planning-in-Mobile-Manipulators", "max_stars_repo_head_hexsha": "9a8801e9c663174b753c4852b2313c5a3f...
#= This file is auto-generated. Do not edit. =# mutable struct LoadZones <: Topology number::Int64 name::String buses::Vector{Bus} maxactivepower::Float64 maxreactivepower::Float64 _forecasts::InfrastructureSystems.Forecasts internal::InfrastructureSystemsInternal end function LoadZones(n...
{"hexsha": "6be8139095e186c45f9719fda24005083a1964c2", "size": 1608, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/generated/LoadZones.jl", "max_stars_repo_name": "Lilyhanig/PowerSystems.jl", "max_stars_repo_head_hexsha": "bea9e464b3cf7ca0c9f950e9325bcb935ac20fa4", "max_stars_repo_licenses": ["BSD-3-...
import numpy as np import matplotlib.pyplot as plt import datetime as dt import matplotlib.dates as md data= np.loadtxt('vmstat_7days_without_header.csv', delimiter=',', dtype={'names': ['time', 'mon','tue','wed','thrs','fri','sat','sun'], 'formats': ['S8','i4','i4','i4','i4','i4','i4','i4']} ) ...
{"hexsha": "8ff24e59bfb450a72d52d1bcd883b72b326dfc98", "size": 1431, "ext": "py", "lang": "Python", "max_stars_repo_path": "cpu_stas_plot.py", "max_stars_repo_name": "kingslair/MatPlotLib", "max_stars_repo_head_hexsha": "66d1accf1a049b901dece69d18edadafbf4b687f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
section \<open>Approximation with Affine Forms\<close> theory Affine_Approximation imports "HOL-Decision_Procs.Approximation" "HOL-Library.Monad_Syntax" "HOL-Library.Mapping" Executable_Euclidean_Space Affine_Form Straight_Line_Program begin text \<open>\label{sec:approxaffine}\<close> lemma convex_on_imp...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Affine_Arithmetic/Affine_Approximation.thy"}