text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
def analysis(): import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy import stats file = input('Enter the file name ') df = pd.read_csv(file, index_col=0) print('\n') print('\033[1m' + 'Summary Statistic' + '\033[0m') print('\n') print('There are tot...
{"hexsha": "6bcca5b1ec4e9d40957ddcfb60033a7489020361", "size": 2099, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/analytica/__init__.py", "max_stars_repo_name": "d0r1h/Analytica", "max_stars_repo_head_hexsha": "36afee1e2574bd1d3451ebe539b0c7283c3a27cf", "max_stars_repo_licenses": ["MIT"], "max_stars...
from kernel_exp_family.examples.tools import pdf_grid, visualise_array from kernel_hmc.tools.mcmc_convergence import autocorr import matplotlib.pyplot as plt import numpy as np def visualise_trajectory(Qs, acc_probs, log_pdf_q, D, log_pdf=None): assert Qs.ndim == 2 plot_density = log_pdf is not None and D...
{"hexsha": "971ce94b3676385f3eac9cd769b4cfdba5470a92", "size": 3334, "ext": "py", "lang": "Python", "max_stars_repo_path": "kernel_hmc/examples/plotting.py", "max_stars_repo_name": "karlnapf/kernel_hmc", "max_stars_repo_head_hexsha": "8ab93ae0470cc5916d5349b40bae7f91075bc385", "max_stars_repo_licenses": ["BSD-3-Clause"...
\newcommand{\symb}[2]{\makebox[6em][l]{#1} #2}% used to generate the list of symbols \chapter{List of Symbols} \symb{$i$}{Unit imaginary number; or, an index of numbers}\\ \symb{$j$, $ j' $}{Fine-structure angular momentum quantum number of individual atoms in a ground state or excited state (with prime), respectivel...
{"hexsha": "dc453eed5c728b9c809977a8f02812b8a484845a", "size": 5311, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "inputs/listofsymbols.tex", "max_stars_repo_name": "i2000s/PhD_Thesis", "max_stars_repo_head_hexsha": "a9bc6bc4213896c70c90cbb3d9b533782d428761", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import js from RobotRaconteur.Client import * import importlib_resources import traceback import numpy as np import base64 from pyri.webui_browser import util class NewCameraIntrinsicCalibrationDialog: def __init__(self, new_name, core, device_manager): self.vue = None self.core = core sel...
{"hexsha": "b6b312416ef61bbe7db92b1e7a13a1a89f615c01", "size": 6386, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyri/vision_browser/dialogs/new_calibrate_intrinsic_dialog.py", "max_stars_repo_name": "pyri-project/pyri-vision-browser", "max_stars_repo_head_hexsha": "7cd501e4ec0633be16f5f6c62146a6e006163d...
# ---------------------------------------------------------------------------- # # # hdgSolveElas.jl # # Solve convection-diffusion equations (n-dimensional) # # λυτέος # Fall 2017 # # Max Opgenoord # # ---------------------------------------------------------------------------- # """ hdgSolve( master::M...
{"hexsha": "517340716ad46db21d74112a0755711e4667029c", "size": 8975, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/solve/hdgSolveCDR.jl", "max_stars_repo_name": "mopg/luteos.jl", "max_stars_repo_head_hexsha": "05b72e7ab6c905f55a768ae943ac3173dcf980ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import pandas as pd from pathlib import Path import os from lightgbm import LGBMRegressor from sklearn.metrics import mean_squared_error os.makedirs('../output/ensemble') pref = '10' versions = ['051', '052', '074', '076', '078', '079', '080', '081', '082'] for i, version in enumerate(versions): ...
{"hexsha": "3c6e9957df40e6716bdbe64d7ffaa2dd12ac2cb8", "size": 3002, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lgbm_stacking.py", "max_stars_repo_name": "ishikei14k/atma11_1st_solution", "max_stars_repo_head_hexsha": "91d29eb83f3e5470f82470f0434ad0fc75a90c61", "max_stars_repo_licenses": ["MIT"], "max_s...
"""Training a face recognizer with TensorFlow based on the FaceNet paper FaceNet: A Unified Embedding for Face Recognition and Clustering: http://arxiv.org/abs/1503.03832 """ # MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this ...
{"hexsha": "02a33d354ac1d6d168840d21af415e88d486e414", "size": 18072, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/facenet_train_classifier.py", "max_stars_repo_name": "KittenCN/pyFaceNet", "max_stars_repo_head_hexsha": "0804d06a3533a83ff865a3c4343cfca2a5cbe063", "max_stars_repo_licenses": ["MIT"], "max_s...
[STATEMENT] lemma monad_fail_alt_writerT [locale_witness]: assumes "monad_fail_alt return bind fail alt" shows "monad_fail_alt return_writer bind_writer fail_writer alt_writer" [PROOF STATE] proof (prove) goal (1 subgoal): 1. monad_fail_alt local.return_writer local.bind_writer local.fail_writer local.alt_writer [...
{"llama_tokens": 771, "file": "Monomorphic_Monad_Monomorphic_Monad", "length": 11}
########################################## # Some uncertain datasets ########################################## UV = UncertainValueDataset(example_uvals) ########################################## # Apply functions to datasets `n` times ########################################## n = 3 @test resample(median, UV, n) i...
{"hexsha": "d7b0af7064262780cf70e8628828913cb3172929", "size": 411, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/resampling/uncertain_datasets/test_resampling_datasets_uncertainvaluedataset_apply_funcs.jl", "max_stars_repo_name": "JuliaTagBot/UncertainData.jl", "max_stars_repo_head_hexsha": "4d9dc513b97f0...
struct CountingFunction{F} <: AbstractFunction counter::Base.RefValue{Int} f::F end getdim(f::CountingFunction) = getdim(f.f) CountingFunction(f::Function) = CountingFunction(Ref(0), f) function (f::CountingFunction)(x) f.counter[] += 1 return f.f(x) end
{"hexsha": "e0dba427bf5999c5acc322fb674b12e8fb27c3ea", "size": 271, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functions/counting_function.jl", "max_stars_repo_name": "tmigot/Nonconvex.jl", "max_stars_repo_head_hexsha": "688f699ada98844427b9b701422638d533aed313", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import shapely #may need submodules from shapely.geometry import Point, Polygon class Item: """ Parent class for all items """ def __init__(self, polygon): self.polygon = polygon #May need only dimensions self.type = None self.subtype = None self.pos = self.get_position() def get_posi...
{"hexsha": "bb03a9903edd9f0a0e03bcb26931c9b042d56938", "size": 3318, "ext": "py", "lang": "Python", "max_stars_repo_path": "swarm_tasks/utils/item.py", "max_stars_repo_name": "rmvanarse/swarm_tasks", "max_stars_repo_head_hexsha": "3335297ba8fcdbff756ae519002bcce919d54a84", "max_stars_repo_licenses": ["MIT"], "max_stars...
\section{201403-4} \input{problem/1/201403-4-p.tex}
{"hexsha": "2da76ac9a25ebc32d45cc653aa8b234a13adf0a4", "size": 52, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "problem/1/201403-4.tex", "max_stars_repo_name": "xqy2003/CSP-Project", "max_stars_repo_head_hexsha": "26ef348463c1f948c7c7fb565edf900f7c041560", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
from stock.marketdata import * import logging import logging.config from stock.globalvar import * import numpy as np logging.config.fileConfig(LOGCONF) logger = logging.getLogger(__name__) class CoVar: def __init__(self, marketdata): self.marketdata = marketdata def check(self, exsymbols): ba...
{"hexsha": "1325cbb68b662e431180f8c15ad093feffc7f0cd", "size": 2530, "ext": "py", "lang": "Python", "max_stars_repo_path": "stock/quant/covar.py", "max_stars_repo_name": "shenzhongqiang/cnstock_py", "max_stars_repo_head_hexsha": "2bb557657a646acb9d20d3ce78e15cf68390f8ea", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import argparse import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) logger.setLevel(logging.INFO) import os import time import chainer import chainercv import chainer.functions as F import cv2 import numpy as np from predict import prepare_setting, restore_args from food101_da...
{"hexsha": "b6be3a3db79dfcdfe6c40f00846b92427bf5ffeb", "size": 3366, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "terasakisatoshi/chainer-food-101-revised", "max_stars_repo_head_hexsha": "3d84f596f22b6a95e33fe196ed5ebba3d3c573a2", "max_stars_repo_licenses": ["MIT"], "max_star...
from EQTransformer.core.EqT_utils import f1, SeqSelfAttention, FeedForward, LayerNormalization from EQTransformer.core.mseed_predictor import ( mseed_predictor, _mseed2nparry, PreLoadGeneratorTest, _picker, _get_snr, _output_writter_prediction, _plotter_prediction, _resampling, ) impor...
{"hexsha": "552b73840d960daa9168491530323b78f5ca37da", "size": 18226, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/compare.py", "max_stars_repo_name": "Cuda-Chen/EQTransformer-onnx-convertor", "max_stars_repo_head_hexsha": "fe5a72c785da69f8282325c96c01ea79a89f508a", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- """ Created on Sat May 25 23:47:20 2019 @author: YQ """ import tensorflow as tf import tensorflow_probability as tfp import numpy as np from rnn import HyperLSTMCell from rnn import LayerNormLSTMCell as LSTMCell ohc = tfp.distributions.OneHotCategorical seq2seq = tf.contrib.seq2seq w_init = ...
{"hexsha": "cf365419b44616ad0741670856698e8ff0a797c9", "size": 18366, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "y33-j3T/DeepMusicvStyle", "max_stars_repo_head_hexsha": "f1a6b149d8412ad480952e6820708b2b6eaf4b96", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
! ! CalculiX - A 3-dimensional finite element program ! Copyright (C) 1998-2019 Guido Dhondt ! ! 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); ! ! ! ...
{"hexsha": "25e9665c4a206f07157d9ec6500c3cb1a28baec4", "size": 1516, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ccx_prool/CalculiX/ccx_2.16/src/hcrit.f", "max_stars_repo_name": "alleindrach/calculix-desktop", "max_stars_repo_head_hexsha": "2cb2c434b536eb668ff88bdf82538d22f4f0f711", "max_stars_repo_licenses"...
subroutine onepath(phpad, index, nleg, deg, iorder, & cxc, rs, vint, xmu, edge, xkf, rnrmav, gamach, & versn, ipot, rat, iz, & ipol, evec, elpty, xivec, & innnn, ijson, ivrbse, ri, beta, eta, & ne1,col1,col2,col3,col4,col5,col6,col7) implicit double precision (a...
{"hexsha": "3f412b0dcfd4bdb8758c98e746770c6ffdc497f8", "size": 24222, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/GENFMT/onepath.f", "max_stars_repo_name": "bruceravel/feff85exafs", "max_stars_repo_head_hexsha": "9698ce3703a73def4c1a965f276708d689ea5acb", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
# Function to pull python functions # included in spotify.ipynb import time import os import dotenv import requests import pandas as pd import numpy as np def pull_albums(artist_id): global requests global url album_names_dates = {} # for duplicates albs_added = [] to_remove = [] track_info = [] repeat_de...
{"hexsha": "706a92bd3f865d0a0df49c7087496d194f33fc17", "size": 1700, "ext": "py", "lang": "Python", "max_stars_repo_path": "spotify_proj/pull_albums.py", "max_stars_repo_name": "DrakeWagner/projects", "max_stars_repo_head_hexsha": "998ef5ef0320db5167fb1bfcf46085b3a18abc42", "max_stars_repo_licenses": ["MIT"], "max_star...
#include <boost/callable_traits.hpp> #include <functional> #include <iostream> #include <type_traits> template < // typename Derived, // bool IsConst, // bool IsNoexcept, // typename Return, // typename... Args // > class function_ref_impl { private: using erased_fn_type =...
{"hexsha": "62a714acb4aa6888253bfff24e957763e5468529", "size": 10744, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "function_ref.cpp", "max_stars_repo_name": "SuperV1234/Experiments", "max_stars_repo_head_hexsha": "572c94d1afb367c241645b479019f6cb3883f98f", "max_stars_repo_licenses": ["AFL-3.0"], "max_stars_coun...
import tensorflow as tf import numpy as np from RelationNetwork import RN from prepare import SClevrDataset,ClevrDataset from utils import Config, Config_SClevr import argparse import sys def str2bool(s): if s == 'true': return True else: return False class Trainer(object): def __init__(self, config): """ ...
{"hexsha": "b86fed276e3f02d8212cc16bc2fe889a6fbab68c", "size": 2093, "ext": "py", "lang": "Python", "max_stars_repo_path": "Trainer.py", "max_stars_repo_name": "obitto/relation-network", "max_stars_repo_head_hexsha": "2cbea587c9d43d6e02dba8ddd79e9ae18eca5356", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import os import numpy as np from astropy.table import Table # sky_subd_sciences[ap] = [waves,diff,bool_mask] from zestipy.data_structures import waveform from zestipy.plotting_tools import summary_plot from zestipy.sncalc import sncalc from zestipy.z_est import z_est def fit_redshifts_wrapper(input_dict): retu...
{"hexsha": "ce434e76b2f8a52f0ea13bc56228a83cd1bd8e09", "size": 4361, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyM2FS/fit_redshifts.py", "max_stars_repo_name": "akremin/M2FSreduce", "max_stars_repo_head_hexsha": "42092f18aa1e5d7ad6f6528a395ee93e89165b30", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
#!/usr/bin/env python import os import csv import linecache import numpy as np from CP2K_kit.tools import log_info from CP2K_kit.tools import traj_info from CP2K_kit.tools import data_op from CP2K_kit.analyze import check_analyze from CP2K_kit.lib import rmsd_mod from CP2K_kit.lib import statistic_mod def rmsd(atoms_...
{"hexsha": "5feaf4e2377da098ac39b3f0dcb206932ae6eaa2", "size": 5210, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze/rmsd.py", "max_stars_repo_name": "JunboLu/CP2K_kit", "max_stars_repo_head_hexsha": "0950f37f253c3f90d6a0539c57f1be1045e7317d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
import numpy as np from OSIM.Modeling.AbstractComponents.SingleComponent import SingleComponent from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations class Impedance(SingleComponent): def __init__(self, nodes, name, value, superComponent, **kwargs): if complex(value) == 0: p...
{"hexsha": "2879adb759859814e05f2c32651e178746b73d21", "size": 862, "ext": "py", "lang": "Python", "max_stars_repo_path": "OSIM/Modeling/Components/Impedance.py", "max_stars_repo_name": "tmaiwald/OSIM", "max_stars_repo_head_hexsha": "11127aaee61d93bb6f26ca5147a300af05db14ec", "max_stars_repo_licenses": ["BSD-2-Clause"]...
import json import numpy as np """ Format of ecosystem is: { 'last_generation': int, 'times': [float,...], 'improvements': [float,...], 'average_total_improve': [float,...], 'runtime_running_avg': float, 'total_runtime': float, 'need_drift': [False,...], 'drifted_last_generation': [False,...], 'best_...
{"hexsha": "12cca18c9be9ffdb1a103d42395d879d645d949d", "size": 1335, "ext": "py", "lang": "Python", "max_stars_repo_path": "stats.py", "max_stars_repo_name": "ZackYovel/using_genetic_algorithm_for_hyper_parameter_tuning", "max_stars_repo_head_hexsha": "10530c5c3802d65f8a5cb651a5e0245d049d2702", "max_stars_repo_licenses...
\section{Fit}% \label{period.detailed} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Fit folder}% \label{period.folder} \begin{figure}[h] $$\image{0cm;0cm}{PFolder.eps}$$% \caption{The frequency folder}% \label{period.folder.dialog} \end{figure} This folder shows almost ...
{"hexsha": "6eefc4ae05b7ba54f166f2bc8d98ff35a2b86518", "size": 21801, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/src/d_period.tex", "max_stars_repo_name": "msperl/Period", "max_stars_repo_head_hexsha": "da4b4364e8228852cc2b82639470dab0b3579055", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import matplotlib from sigpipes.sigcontainer import SigContainer from sigpipes.sigoperator import ( Print, UfuncOnSignals, Convolution, FeatureExtraction, SampleSplitter) from sigpipes.joiner import JoinChannels from sigpipes.plotting import Plot, GraphOpts import numpy as np from glob import glob for filenam...
{"hexsha": "5d14161a08aec04e536077ed12bb20707c2283a9", "size": 655, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ikon.py", "max_stars_repo_name": "Poselsky/signal-pipes", "max_stars_repo_head_hexsha": "ded180cfce4f25931554e0099330b962c2af4550", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
# coding=utf-8 import logging from typing import List import numpy as np import openeye.oechem as oechem import openeye.oeomega as oeomega import openeye.oeshape as oeshape import utils from .slurmmanager import slurmmanager class rocs_similarity_base(object): def __init__(self, ligand: utils.FilePath, max_tan...
{"hexsha": "abe5240f070653944afaac2399e62d9c049b3ff3", "size": 4169, "ext": "py", "lang": "Python", "max_stars_repo_path": "scoring/rocs_similarity.py", "max_stars_repo_name": "MauriceKarrenbrock/reinvent-memory", "max_stars_repo_head_hexsha": "57860dabb6534daf14fe2ab81d57589a90760442", "max_stars_repo_licenses": ["MIT...
""" Module for specifying output variables as part of the data file. """ import numpy as np from andes.core.model import ModelData, Model from andes.core.param import DataParam class OutputData(ModelData): """ Data for outputs. """ def __init__(self): ModelData.__init__(self, three_params=Fa...
{"hexsha": "23082220a72e9c3c5f7cdccece64b5ec3ee1a4db", "size": 1555, "ext": "py", "lang": "Python", "max_stars_repo_path": "andes/models/misc/output.py", "max_stars_repo_name": "cuihantao/Andes", "max_stars_repo_head_hexsha": "6cdc057986c4a8382194ef440b6e92b8dfb77e25", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import pickle import re import string import pkg_resources from gensim.models import KeyedVectors import numpy as np class Preprocessor(object): char_search = re.compile(r"[^\u0020\u0027\u002b-\u002e\u0030-\u0039\u0041-\u005a\u0061-\u007a]") strip_multi_ws = re.compile(r"( {2,})") word_re = re.compile(r...
{"hexsha": "75f7ab4bbf5d8cf47ec3fbf3a2c2a5049a17141c", "size": 4703, "ext": "py", "lang": "Python", "max_stars_repo_path": "title_graph/title_graph.py", "max_stars_repo_name": "estasney/TitleGraph", "max_stars_repo_head_hexsha": "ad44215849dae7069cad7729c30249a6b87a7dc0", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import numpy as np from emukit.core import ParameterSpace, ContinuousParameter, InformationSourceParameter from emukit.core.loop.user_function import MultiSourceFunctionWrapper def multi_fidelity_forrest...
{"hexsha": "5813147889717c28661ecc036ff12c226c567f44", "size": 2753, "ext": "py", "lang": "Python", "max_stars_repo_path": "emukit/test_functions/forrester.py", "max_stars_repo_name": "ndalchau/emukit", "max_stars_repo_head_hexsha": "eb6754ea016a7cd82b275bb4075676b5ed662634", "max_stars_repo_licenses": ["Apache-2.0"], ...
""" Responsible for providing detiled views about a single stock and closely related views """ from collections import defaultdict from datetime import datetime import pandas as pd import numpy as np from django.contrib.auth.decorators import login_required from django.shortcuts import render from app.models import (va...
{"hexsha": "c41b941f5c5201336e6973a35a378411b096bc50", "size": 8479, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/viewer/app/views/stock.py", "max_stars_repo_name": "mappin/asxtrade", "max_stars_repo_head_hexsha": "2b97ffcdefae642a49ce5bfcc131db17796f1691", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import os import shutil import pandas as pd import numpy as np import tensorflow as tf from sklearn.model_selection import train_test_split from urllib.request import urlopen def clean_run(model_dir='', source_data=''): """Remove model and data files for a clean run""" if model_dir: if os.path.exists...
{"hexsha": "75a275e62bbf72e499a766dfa022865f8681b359", "size": 5998, "ext": "py", "lang": "Python", "max_stars_repo_path": "Project 8 -- Deep Learning for Cancer Classification/dnn_data_classifier/main.py", "max_stars_repo_name": "Vauke/Deep-Neural-Networks-HealthCare", "max_stars_repo_head_hexsha": "a6e0cc9d44e06ab3b3...
# Energy spectrum of oscillations at a fixed point. using FFTW, JLD2, CurveFit, PyPlot using Vlasiator: RE file = "satellites_uniform_sampled.jld2" data = JLD2.load(file) nSatellite = length(data["t"]) nI, nJ = size(data["rho"])[2:3] t = data["t"] # Select spatial point i, j = 5, 5 var = data["rho"][:,i,j] dt =...
{"hexsha": "e505ca97dacc490c4e67fcc99e1a965fc83ac58f", "size": 1194, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/demo_energy_spectrum.jl", "max_stars_repo_name": "alhom/Vlasiator.jl", "max_stars_repo_head_hexsha": "615333705b5346522479ab72398f059cb94ab026", "max_stars_repo_licenses": ["MIT"], "max_st...
%% EVENT OBJECT (event.m) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This class is designed to define a generic agent and import this variables % into the simulation space for the purpose of multi-vehicle control simulation. % Author: James A. Douthwaite classdef eventDefinition %%% EVENT BASE CLASS %%%%%%%...
{"author": "douthwja01", "repo": "OpenMAS", "sha": "962f321f82167db78066b2c88c783423ecc3b73a", "save_path": "github-repos/MATLAB/douthwja01-OpenMAS", "path": "github-repos/MATLAB/douthwja01-OpenMAS/OpenMAS-962f321f82167db78066b2c88c783423ecc3b73a/environment/events/eventDefinition.m"}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Evaluate submissions on kbpo server. """ import pdb import sys import csv import logging from collections import Counter, defaultdict import numpy as np from tqdm import tqdm from kbpo import evaluation_api logger = logging.getLogger(__name__) logger.setLevel(loggi...
{"hexsha": "0fa164c3cae6c5f5a4884d9be20a0ccb1cd7de90", "size": 2089, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaluate.py", "max_stars_repo_name": "arunchaganty/kbp-online", "max_stars_repo_head_hexsha": "9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- from __future__ import absolute_import from PyQt5 import QtCore, QtWidgets import gr from qtgr import GRWidget import csv from util.logger import Logger import sys from statistics.pdf import PDF, Kernels import numpy as np import os logger = Logger("gui.pdf_widget") logger.setstream("defaul...
{"hexsha": "b51b1ae0a53562e3645ef1d8837b1a551501df46", "size": 10235, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gui/pdf_widget.py", "max_stars_repo_name": "sciapp/pyMolDyn", "max_stars_repo_head_hexsha": "fba6ea91cb185f916b930cd25b4b1d28a22fb4c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import torch import numpy as np EPS = 1e-8 class TrajStorage(object): def __init__(self, rollouts, aug_fn=None): trajs = [] num_processes = rollouts.obs.shape[1] for env_index in range(num_processes): env_masks = rollouts.masks[:, env_index] env_obs = rollouts.obs[:, env_index] ...
{"hexsha": "a26c79e74dd7d77408a9f371fe4f0ea119d2073a", "size": 4952, "ext": "py", "lang": "Python", "max_stars_repo_path": "ucb_rl2_meta/algo/contrastive_helpers.py", "max_stars_repo_name": "agarwl/auto-drac", "max_stars_repo_head_hexsha": "d86c480b51929e6e4ec0ae1adba84d9f78e91705", "max_stars_repo_licenses": ["MIT"], ...
// Boost string_algo library std_containers_traits.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // 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 htt...
{"hexsha": "5053380e7652502ad8272193b0eb7e1a53ad1d86", "size": 1027, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/third_party/boost/boost/algorithm/string/std_containers_traits.hpp", "max_stars_repo_name": "benety/mongo", "max_stars_repo_head_hexsha": "203430ac9559f82ca01e3cbb3b0e09149fec0835", "max_stars_r...
""" Helper infrastructure to compile and sample models using `cmdstan`. [`StanModel`](@ref) wraps a model definition (source code), while [`stan_sample`](@ref) can be used to sample from it. [`stan_compile`](@ref) can be used to pre-compile a model without sampling. A [`StanModelError`](@ref) is thrown if this fails,...
{"hexsha": "a166adea21177c19bdac1632c07f0b89ae5d146c", "size": 871, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/StanSample.jl", "max_stars_repo_name": "UnofficialJuliaMirror/StanSample.jl-c1514b29-d3a0-5178-b312-660c88baa699", "max_stars_repo_head_hexsha": "768894f98284a1840f01fd9c6c51c5247bae2ad5", "max_...
# Experiment 2 # Shift in fire regime from small-frequent to large-infrequent # Shift occurs at different times in the past, and between widely divergent regimes and closer regimes ## Launch model library(doParallel) library(foreach) source("cat_face_mortality_pfire_split.r") registerDoParallel(cores=16) #########...
{"hexsha": "27be05c146badeb378b5155648ed2e628e060be7", "size": 4973, "ext": "r", "lang": "R", "max_stars_repo_path": "experiment_2.r", "max_stars_repo_name": "ozjimbob/FireScar", "max_stars_repo_head_hexsha": "da4b1a8c5ef13427e01c057e80c7c09cb3d6882f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_star...
import numpy as np import pytest from brainio.assemblies import BehavioralAssembly from brainscore.benchmarks.objectnet import Objectnet from brainscore.model_interface import BrainModel @pytest.mark.private_access class TestObjectnet: def test_groundtruth(self): benchmark = Objectnet() source = b...
{"hexsha": "a1bce2802a86168bc10e21a52cecbc127ae9bfea", "size": 1417, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_benchmarks/test_objectnet.py", "max_stars_repo_name": "BonnerLab/brain-score", "max_stars_repo_head_hexsha": "8edbbfcdb8efc5112768bfa2b57746f250f3abd4", "max_stars_repo_licenses": ["MIT...
struct LocalVar is_mutable :: Ref{Bool} # mutability is_shared :: Ref{Bool} # shared between different physical scopes/actual functions. sym :: Symbol end GlobalVar = Symbol readable_var(sym::Symbol) = LocalVar(Ref(false), Ref(false), sym) global_var(sym::Symbol) = sym
{"hexsha": "c7f9fe443b7688e6a3b1c12348048d8d3aa1c571", "size": 295, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Variable.jl", "max_stars_repo_name": "devmotion/NameResolution.jl", "max_stars_repo_head_hexsha": "df4997900ea492dfb5bac52278dae4e5e53968ed", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
(* Title: HOL/Imperative_HOL/ex/Linked_Lists.thy Author: Lukas Bulwahn, TU Muenchen *) section {* Linked Lists by ML references *} theory Linked_Lists imports "../Imperative_HOL" "~~/src/HOL/Library/Code_Target_Int" begin section {* Definition of Linked Lists *} setup {* Sign.add_const_constraint (@{c...
{"author": "Josh-Tilles", "repo": "isabelle", "sha": "990accf749b8a6e037d25012258ecae20d59ca62", "save_path": "github-repos/isabelle/Josh-Tilles-isabelle", "path": "github-repos/isabelle/Josh-Tilles-isabelle/isabelle-990accf749b8a6e037d25012258ecae20d59ca62/src/HOL/Imperative_HOL/ex/Linked_Lists.thy"}
__author__ = "Laurence Elliott - 16600748" from capstone import * import pefile, os import numpy as np from matplotlib import pyplot as plt benignPaths = ["../bin-utf8-vec/benignSamples/" + sample for sample in os.listdir("../bin-utf8-vec/benignSamples")] malwarePaths = ["../bin-utf8-vec/malwareSamples/" + sample for...
{"hexsha": "e87545d3326a550777fb0f0d104b93477628966e", "size": 5618, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin-opcodes-vec/bin-opcodes-vec.py", "max_stars_repo_name": "laurencejbelliott/Ensemble_DL_Ransomware_Detector", "max_stars_repo_head_hexsha": "0cae02c2425e787a810513537a47897f3a42e5b5", "max_star...
-- Local Variables: -- idris-load-packages: ("prelude" "effects" "contrib" "base") -- End: import Data.Vect import Data.Fin -- https://en.wikipedia.org/wiki/Netpbm_format -- A little file for writing PPM format. Why? Because I want to do some little image things -- in Idris like the ones in the class I helped with us...
{"hexsha": "6fb974b053b095710c0bcecde3782c74e30ea558", "size": 1682, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "PPM.idr", "max_stars_repo_name": "clarissalittler/idris-practice", "max_stars_repo_head_hexsha": "e307a93fa4ab7bce9f6cf7fef9973c398b3d65ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from pathlib import Path from typing import List import pandas as pd from pandas import DataFrame import matplotlib.pyplot as plt import os import zipfile from src_homework.config import COMMON_COLUMN # data pre processing base_data_folder_path = 'data/HMOG' file_name_to_colume_names = { 'Accelerometer.csv': ['S...
{"hexsha": "e8803d10eb2ac453b4b92d1fabaa284905e2a33d", "size": 8330, "ext": "py", "lang": "Python", "max_stars_repo_path": "src_homework/HW2_starter_files.py", "max_stars_repo_name": "jjkindergarten/Nonlinear-Data-Analysis", "max_stars_repo_head_hexsha": "4ee31f0e9ef231fb0087307b1235558c27586a5a", "max_stars_repo_licen...
""" Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs https://github.com/mys007/ecc https://arxiv.org/abs/1704.02901 2017 Martin Simonovsky """ from __future__ import division from __future__ import print_function from builtins import range import unittest import nu...
{"hexsha": "a7307d2f4ba6fe8dd921013ed1a47942d97da45f", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "learning/ecc/test_GraphConvModule.py", "max_stars_repo_name": "davijo/superpoint_graph", "max_stars_repo_head_hexsha": "0d60fb364bfa37fb70570784899ce46c0296ee22", "max_stars_repo_licenses": ["MIT"...
import numpy as np import pandas as pd import keras.backend as K from keras.layers import multiply from keras.layers.core import Dense, Reshape, Lambda, RepeatVector, Permute, Flatten from keras.layers.recurrent import LSTM from keras.models import Model, Input # plot part. import matplotlib.pyplot as plt # ## Helpe...
{"hexsha": "f21675789278a6dcaa0b38f16e225d0a458b1718", "size": 4225, "ext": "py", "lang": "Python", "max_stars_repo_path": "attention_function.py", "max_stars_repo_name": "deepak-kaji/mimic-lstm", "max_stars_repo_head_hexsha": "4900bb6fa3b4828000a18e35c534bb1b3f23dd05", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
// Copyright Carl Philipp Reh 2009 - 2016. // 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) #include <fcppt/make_int_range_count.hpp> #include <fcppt/tag_type.hpp> #include <fcppt/use.hpp> #...
{"hexsha": "58c95c677fea2c14535fce1b62b52caaa2de8e91", "size": 1568, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/algorithm/loop.cpp", "max_stars_repo_name": "vinzenz/fcppt", "max_stars_repo_head_hexsha": "3f8cc5babdee178a9bbd06ca3ce7ad405d19aa6a", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count":...
C @(#)getyeq.f 20.3 2/13/96 subroutine getyeq(k1, k2, id, ksect, yeq, y1, yxy, y2) C compute the following 2-port Y-matrices: C YEQ - Equivalent parallel 2-port C Y1 - 2-port left of section KSECT C YXY - 2-port for section KSECT C Y2 - 2-port right of section KSECT include 'ipfi...
{"hexsha": "5d45a9ed0f150ba5374462137df56eb17960721c", "size": 5246, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/getyeq.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "...
[STATEMENT] lemma redT_updLns_iff [simp]: "\<And>ln. redT_updLns ls t ln las $ l = upd_threadRs (ln $ l) (ls $ l) t (las $ l)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>ln. redT_updLns ls t ln las $ l = upd_threadRs (ln $ l) (ls $ l) t (las $ l) [PROOF STEP] by(simp add: redT_updLns_def)
{"llama_tokens": 150, "file": "JinjaThreads_Framework_FWLockingThread", "length": 1}
#!conda install -c anaconda seaborn -y #conda install -c anaconda nltk import re import string import numpy as np import pandas as pd from matplotlib import pyplot as plt import seaborn as sns from nltk.corpus import stopwords from nltk.tokenize import word_tokenize # importing data set into dataframes ...
{"hexsha": "ccb4c96312e9d701743669f23a16682c6f2e7454", "size": 4030, "ext": "py", "lang": "Python", "max_stars_repo_path": "NLP Model Code.py", "max_stars_repo_name": "keenanbernard/Data", "max_stars_repo_head_hexsha": "ae3460f02ac913e5482c7b3e63d8760d5d41dbfc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
from amfe.io import AmfeMeshConverter, GidJsonMeshReader from amfe.tools import amfe_dir from amfe.material import KirchhoffMaterial from amfe.component import StructuralComponent from amfe.neumann import FixedDirectionNeumann import logging import numpy as np from amfe.mesh import Mesh # Units: # Length: mm # M...
{"hexsha": "71bdf5847ae2da927b7801f8a81f4d9cce6f30bb", "size": 1305, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/simple_beam/simple_beam.py", "max_stars_repo_name": "ma-kast/AMfe", "max_stars_repo_head_hexsha": "99686cc313fb8904a093fb42e6cf0b38f8cfd791", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import time import numpy as np import pandas as pd import pickle import more_itertools as mit import matplotlib.pyplot as plt plt.switch_backend('agg') import pandas as pd from itertools import combinations from scipy import stats # from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score ...
{"hexsha": "98c723b074c1c0a3c08bc10e1b39b09d2ef5564d", "size": 18669, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts_for_public/FigS8-morphoLateralization-activitySymmetry.py", "max_stars_repo_name": "NeLy-EPFL/Ascending_neuron_screen_analysis_pipeline", "max_stars_repo_head_hexsha": "438b9db15765bf2658...
import numpy as np def np_sma(data): return np.sum(data) / len(data)
{"hexsha": "ed8d69fe4ea110682181005edf32caa06186b1bf", "size": 74, "ext": "py", "lang": "Python", "max_stars_repo_path": "indicators/sma.py", "max_stars_repo_name": "Tiqur/live-crypto-alerts", "max_stars_repo_head_hexsha": "860fe73c9f2a960b398d132c2eb2c3ee333aa968", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
module MLib.Prelude.RelProps where open import MLib.Prelude.FromStdlib import Relation.Binary.Indexed as I open FE using (cong) import Data.Product.Relation.SigmaPropositional as OverΣ Σ-bij : ∀ {a b c} {A : Set a} {B : A → Set b} {C : A → Set c} → (∀ x → B x ↔ C x) → Σ A B ↔ Σ A C Σ-bij pw = record { to = ≡.→-to-...
{"hexsha": "6209fecb1c83bcdc3ebcf0eeac237ade0ae7417b", "size": 1975, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/MLib/Prelude/RelProps.agda", "max_stars_repo_name": "bch29/agda-matrices", "max_stars_repo_head_hexsha": "e26ae2e0aa7721cb89865aae78625a2f3fd2b574", "max_stars_repo_licenses": ["MIT"], "max_st...
@testset "Born-Mayer Unit Tests" begin A = 1.0u"eV" ρ = 0.25u"bohr" σ = 0.25u"bohr" C = 1.0u"eV*Å" D = 1.0u"eV*Å" rcutoff = 2.0u"Å" species = [:Ar, :H] p = BornMayer(A, ρ, σ, C, D, rcutoff, species) @test p isa EmpiricalPotential{NamedTuple{(:A, :ρ, :σ, :C, :D)},NamedTuple{(:rcutoff...
{"hexsha": "4e02d78d8d8dea68f69132c8523a329253069af0", "size": 1430, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/unit/empirical/bm.jl", "max_stars_repo_name": "cesmix-mit/InteratomicPotentials.jl", "max_stars_repo_head_hexsha": "100af9067e69d4e3fa2f4697b4915c93cb08f419", "max_stars_repo_licenses": ["MIT"...
\documentclass[modern]{aastex63} \usepackage{amsmath} \newcommand{\dd}{\ensuremath{\mathrm{d}}} \newcommand{\diff}[2]{\frac{\dd #1}{\dd #2}} % Affiliations \newcommand{\flatironCCA}{Center for Computational Astrophysics, Flatiron Institute, 162 5th Ave, New York NY 10010, United States} \newcommand{\stonybrook}{Depa...
{"hexsha": "af9e584338d8bee27dc064f481317475e0cb11d3", "size": 12760, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "note/reweighting.tex", "max_stars_repo_name": "farr/Reweighting", "max_stars_repo_head_hexsha": "3762a0849c98799bb97d0748d803d05406645518", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
type PiecewiseYieldCurve{B <: BootstrapHelper, DC <: DayCount, P <: Interpolation, T <: BootstrapTrait, BT <: Bootstrap} <: InterpolatedCurve{P, T} lazyMixin::LazyMixin settlementDays::Int referenceDate::Date instruments::Vector{B} dc::DC interp::P trait::T accuracy::Float64 boot::BT times::Vector{F...
{"hexsha": "52e9ab11071fb20327bc14c0aaf7438e0108434a", "size": 1469, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/termstructures/yield/piecewise_yield_curve.jl", "max_stars_repo_name": "JuliaQuant/QuantLib.jl", "max_stars_repo_head_hexsha": "b1a806daa3b15b1f3705e36f716e66cc24c1dd5f", "max_stars_repo_licens...
""" Implement Twin-Delayed DDPG in Addressing Function Approximation Error in Actor-Critic Methods, Fujimoto et al, 2018 The key difference with DDPG lies in 1. Add noise to target policy served as regularization to prevent overfitting to current best policy 2. Use clipped double Q function to avoid overestimation in Q...
{"hexsha": "72d6ad51220ae5a127d0b660303edd1b59c480e4", "size": 7854, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchlib/deep_rl/algorithm/td3/agent.py", "max_stars_repo_name": "vermouth1992/torchlib", "max_stars_repo_head_hexsha": "63b2bedb40f670b2d9fbfc0daeab4a8d44623095", "max_stars_repo_licenses": ["MIT...
#! -*- coding:utf-8 -*- # CLUE评测 # iflytek文本分类 # 思路:取[CLS]然后接Dense+Softmax分类 import json import numpy as np from snippets import * from bert4keras.backend import keras from bert4keras.snippets import sequence_padding, DataGenerator from bert4keras.snippets import open from tqdm import tqdm # 基本参数 num_classes = 119 ma...
{"hexsha": "13f1dbada436e122cfd0376d9089ce4a0980010f", "size": 3982, "ext": "py", "lang": "Python", "max_stars_repo_path": "clue/iflytek.py", "max_stars_repo_name": "dumpmemory/roformer-v2", "max_stars_repo_head_hexsha": "95b71ae03b8bb910998285e194d7752b1e4104c0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
from tkinter import * from tkinter import messagebox from tkinter import filedialog from tkinter import ttk from tkinter.scrolledtext import ScrolledText import xmltodict import uuid import os import shutil import json import copy from cyclus_gui.gui.sim_window import SimulationWindow from cyclus_gui.gui.arche_window i...
{"hexsha": "55b49b7a0add29859508d234d0201ddae7ce6592", "size": 25758, "ext": "py", "lang": "Python", "max_stars_repo_path": "cyclus_gui/gui/gui.py", "max_stars_repo_name": "gonuke/cyclus_gui", "max_stars_repo_head_hexsha": "ef67df351585ab8a476b1577380ec6034bf0753f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
\documentclass[]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \else % if luatex or xelatex \ifxetex \usepackage{mat...
{"hexsha": "aa7f4f9a630d3481d9283f43eb215dcf91912746", "size": 21019, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notebooks/rev5_exploration-2.tex", "max_stars_repo_name": "bjsmith/reversallearning", "max_stars_repo_head_hexsha": "023304731d41c3109bacbfd49d4c850a92353978", "max_stars_repo_licenses": ["Apache-2...
# coding=utf-8 # Copyright 2020 The Google AI Perception Team 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 b...
{"hexsha": "31a250ac726221166b46775a62514c34bca1a94a", "size": 1783, "ext": "py", "lang": "Python", "max_stars_repo_path": "aist_plusplus/visualizer.py", "max_stars_repo_name": "google/aistplusplus_ap", "max_stars_repo_head_hexsha": "83d78d8cbc9b417616cd2200b9afdf37228509e1", "max_stars_repo_licenses": ["Apache-2.0"], ...
"""Identity matrix.""" from scipy import sparse import numpy as np def iden(dim: int, is_sparse: bool = False) -> np.ndarray: r""" Calculate the :code:`dim`-by-:code:`dim` identity matrix [WIKID]_. Returns the :code:`dim`-by-:code:`dim` identity matrix. If :code:`is_sparse = False` then the matrix w...
{"hexsha": "bd68070b41d4e02ad4840cfc88ac6d7927ba3541", "size": 2119, "ext": "py", "lang": "Python", "max_stars_repo_path": "toqito/matrices/iden.py", "max_stars_repo_name": "paniash/toqito", "max_stars_repo_head_hexsha": "ab67c2a3fca77b3827be11d1e79531042ea62b82", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
// // $Id: Exception.hpp 2008 2010-05-29 02:46:49Z brendanx $ // // // Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu> // // Copyright 2010 Vanderbilt University - Nashville, TN 37232 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in complianc...
{"hexsha": "c8680129b10c9780deede757811072a94451c50f", "size": 1840, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cpp/src/pwiz/utility/misc/Std.hpp", "max_stars_repo_name": "toppic-suite/topmsv", "max_stars_repo_head_hexsha": "fef5d1f1f1c00ffdad2c258401d319f1e227c7cb", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma nxtActive_lactive: assumes "\<exists>i\<ge>n. \<parallel>c\<parallel>\<^bsub>t i\<^esub>" and "\<not> (\<exists>i>\<langle>c \<rightarrow> t\<rangle>\<^bsub>n\<^esub>. \<parallel>c\<parallel>\<^bsub>t i\<^esub>)" shows "\<langle>c \<rightarrow> t\<rangle>\<^bsub>n\<^esub>=\<langle>c \<and> t\<...
{"llama_tokens": 2710, "file": "DynamicArchitectures_Configuration_Traces", "length": 18}
using Replace using Test using MacroTools module Sine sine(x) = sin(x) end @testset "Replace" begin @testset "Basic" begin @test 1.0 == @replace sin cos sin(0.0) @test 0.0 == @replace cos sin cos(0.0) # make sure that we haven't clobbered the definition of sin and cos @assert cos(0.0) == 1.0 && sin(0.0) == ...
{"hexsha": "919f624e20417f1aacb35baefb48315eefc6cc92", "size": 1960, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "ScottishCovidResponse/Replace.jl", "max_stars_repo_head_hexsha": "610c1df9007ee0b1328acf3cd4500b63d4478a93", "max_stars_repo_licenses": ["MIT"], "max_star...
from sklearn.tree import DecisionTreeClassifier from sklearn import preprocessing import numpy as np le = preprocessing.LabelEncoder() clf = DecisionTreeClassifier() training = np.array([ [3, "yes", 62, "accept"], [4, "yes", 70, "accept"], [2, "yes", 71, "reject"], [5, "yes", 58, "reject"], [1, "...
{"hexsha": "6ff00d76af086eae544bfe2f1f7d72eba520be05", "size": 727, "ext": "py", "lang": "Python", "max_stars_repo_path": "script.py", "max_stars_repo_name": "ashwinvaidya17/DecisionTree-ScikitLearn", "max_stars_repo_head_hexsha": "a1e9e382a6b3ed96352a96bbe600420139923dc0", "max_stars_repo_licenses": ["MIT"], "max_star...
import argparse import sys sys.path.append('/home/lyan/Documents/tf-pose-estimation/tf_pose/') sys.path.append('/home/lyan/Documents/tf-pose-estimation/') import json import numpy as np import cv2 from tf_pose.estimator import TfPoseEstimator parser = argparse.ArgumentParser(description='inference speed tester') ...
{"hexsha": "56906dd47cf67f76a12d01932ea22d3c56c564e9", "size": 3685, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/evaluate_scores.py", "max_stars_repo_name": "dodler/tf-pose-estimation", "max_stars_repo_head_hexsha": "539d4a1d351ca32d67c1418f5a796a1e69e9075b", "max_stars_repo_licenses": ["Apache-2.0...
import numpy import chainer from chainer import Variable import chainer.functions as F def func_y(w, x, dim): pred_y = sum([w[d] * (x ** d) for d in range(dim + 1)]) return pred_y.reshape(pred_y.shape[0]) def func_J(y, pred_y): return 0.5 * F.sqrt(F.mean_squared_error(y, pred_y)) class LSM(): """ ...
{"hexsha": "618afdfbb1cdaa88fc9a5291ba86d5dccc9f7c8b", "size": 3299, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/likely_chainer/models.py", "max_stars_repo_name": "Atsuto0519/LSMuseSGD", "max_stars_repo_head_hexsha": "ec40572b59f9a4ac2d85e5a690d590434e36fa7c", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma protocol_inverse: assumes "m0 \<in> carrier \<G>" "m1 \<in> carrier \<G>" shows" ((\<^bold>g [^] ((a*b) mod (order \<G>))) [^] (s1 :: nat)) \<otimes> ((\<^bold>g [^] b) [^] (r1::nat)) \<otimes> (if v then m0 else m1) \<otimes> inv (((\<^bold>g [^] a) [^] s1 \<otimes> \<^bold>g [^] r1) [^] b) ...
{"llama_tokens": 6401, "file": "Multi_Party_Computation_Noar_Pinkas_OT", "length": 24}
import os import os.path as osp from tqdm import tqdm import numpy as np import torch import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader from torchnet import meter from model.resnet_deconv import get_deconv_net from model.hourglass import PoseNet from model.loss import My_SmoothL1Loss from d...
{"hexsha": "492ef1964c4ccffbc0b0340ad2f39a5e0548372c", "size": 4941, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Jvictor97/AWR-Adaptive-Weighting-Regression", "max_stars_repo_head_hexsha": "2c29f8ac3d824edfff07465232ffed8e4d837ebf", "max_stars_repo_licenses": ["MIT"], "max_s...
function evol(fitness, lb, ub, numParticles, maxiter, verbose) sr = [(lb[i], ub[i]) for i=1:length(lb)] fopt = 10000 xopt = [] for i=1:15 println(i) result = BlackBoxOptim.bboptimize(fitness; SearchRange = sr, NumDimensions = length(lb), Method = :adaptive_de_ra...
{"hexsha": "ec8ecca634b48dc9e517df694b4da92e47de7e12", "size": 1050, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/evol.jl", "max_stars_repo_name": "rjvial/LotMassing.jl", "max_stars_repo_head_hexsha": "e69d823bc80720b59b3a13c7609cb9dfea0baff6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
// // Created by mbodych on 11.05.18. // #include <v4r/features/types.h> #include <boost/algorithm/string.hpp> namespace v4r { std::istream &operator>>(std::istream &in, FeatureType &t) { std::string token; in >> token; boost::to_upper(token); if (token == "FPFH") t = FeatureType::FPFH; else if (token ...
{"hexsha": "8c6a8aaee2e94e4db6c9db048092710cb36f3218", "size": 2169, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/features/src/types.cpp", "max_stars_repo_name": "v4r-tuwien/v4r", "max_stars_repo_head_hexsha": "ff3fbd6d2b298b83268ba4737868bab258262a40", "max_stars_repo_licenses": ["BSD-1-Clause", "BSD-2...
import lang import normalization import data.set -- V⟦−⟧ : type → PowerSet(ClosedVal) -- V⟦−⟧ : type → (ClosedVal → 2) -- interp_val : type → val → Prop -- open exp typ notation e ` ↦* `:90 e' := is_many_step e e' def irred (e:exp) := ¬(∃ e', e ↦str e') -- Approach to defining inductive relation inspired from Modu...
{"author": "upamanyus", "repo": "pl-experiments", "sha": "ff4434ae9df0c00f50520eac64b87d5ae42991c1", "save_path": "github-repos/lean/upamanyus-pl-experiments", "path": "github-repos/lean/upamanyus-pl-experiments/pl-experiments-ff4434ae9df0c00f50520eac64b87d5ae42991c1/stlc/src/typesafety.lean"}
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Jun 16 17:03:00 2018 @author: jumtsai """ from __future__ import absolute_import from __future__ import division from __future__ import print_function '''Import this part for using Tensor Board to visualizing each nodes in CNN. ''' #DCNN's TensorFlow(G...
{"hexsha": "9570eb931026eab404061bf45a31776ebba279d8", "size": 10959, "ext": "py", "lang": "Python", "max_stars_repo_path": "DCNN.py", "max_stars_repo_name": "caibojun/DeconvolutionalNeuralNetwork", "max_stars_repo_head_hexsha": "7ddf459fcec5b3fb01f2f6f4a074e7a16a9bfca2", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from __future__ import print_function import numpy as np from astropy.table import Table def split_asts(ast_file, sd_map_file, bin_width=1.): """ Split the ASTs into sub-files for each source density bin. Parameters ---------- ast_file : string Name of the file that contains the AST resul...
{"hexsha": "81d9a3c8e22c95da399e92592be16762ebb19a61", "size": 2247, "ext": "py", "lang": "Python", "max_stars_repo_path": "beast/tools/split_asts_by_source_density.py", "max_stars_repo_name": "marthaboyer/beast", "max_stars_repo_head_hexsha": "1ca71fb64ab60827e4e4e1937b64f319a98166c3", "max_stars_repo_licenses": ["BSD...
#include <bitset> #include <sstream> #include <string> #include <thread> #include <boost/beast/core.hpp> #include <boost/beast/websocket.hpp> #include <boost/asio/ip/tcp.hpp> #include <math_nerd/hill_cipher.h> #include "file_handler.h" namespace beast = boost::beast; namespace http = beast::http; namespace websocket ...
{"hexsha": "def46877309b8d2471fae2a6bf473936da9696c5", "size": 5030, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "hill.cpp", "max_stars_repo_name": "JacobSzepsy/Hill-Cipher-Webpage", "max_stars_repo_head_hexsha": "7fb9c7af9fd90af993de992fb0d5f556ecdc6b71", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma lower_higher_commute: "higher (lower p s) t = lower (higher p t) s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. higher (lower p s) t = lower (higher p t) s [PROOF STEP] by (rule poly_mapping_eqI, simp add: lookup_higher lookup_lower)
{"llama_tokens": 103, "file": "Polynomials_MPoly_Type_Class_Ordered", "length": 1}
import math import os from pathlib import Path from typing import Dict, Optional, Tuple, Union import librosa import matplotlib.pyplot as plt import numpy as np import pandas as pd # import pandas as pd import pytorch_lightning as pl import segmentation_models_pytorch as smp import torch import torch.nn.functional as...
{"hexsha": "61a2f15513307e995cdbf833cd56a2f12a619ade", "size": 24307, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modeling/pl_model.py", "max_stars_repo_name": "caoyizhi-filter/kaggle_Google_Smartphone_Decimeter_Challenge-10th-", "max_stars_repo_head_hexsha": "10e6bd6cb3b7222dc141e820daea4fc1db5cabe2", "...
from PIL import Image import numpy as np from ImageProcessing import mediumGaussian def readStack(dir, filted = None): """ dir --- directory of image This method takes input directory of image, and read the image as a numpy stack """ img = Image.open(dir) maxiter = 1000 # large defau...
{"hexsha": "a6a3206e62bf439abc38ca122b8167bb44759a70", "size": 1068, "ext": "py", "lang": "Python", "max_stars_repo_path": "InputOutput/ReadTiffStack.py", "max_stars_repo_name": "jzw0025/Kyber", "max_stars_repo_head_hexsha": "ce2069da469095e6a086f7bbf9cd980f10563b22", "max_stars_repo_licenses": ["Unlicense"], "max_star...
"""Test that the following CLI command returns the expected outputs label-maker package -d integration-od -c test/fixtures/integration/config.integration.object_detection.json""" import unittest from os import makedirs from shutil import copyfile, copytree, rmtree import subprocess import numpy as np class TestObject...
{"hexsha": "acf3e5bccd40f0b64f13f30e105d6ac2afe2d5e0", "size": 1494, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/integration/test_object_package.py", "max_stars_repo_name": "jonaslalin/label-maker", "max_stars_repo_head_hexsha": "c271189fbfd0f0c198184ef45032e16546e25243", "max_stars_repo_licenses": ["MI...
import os import tempfile import unittest import numpy as np from PIL import Image import colortrans np.random.seed(0) class TestColorTrans(unittest.TestCase): """colortrans tests""" def test_colortrans(self): content = np.random.randint(256, size=(20, 30, 3), dtype=np.uint8) reference = n...
{"hexsha": "43cfef2d67c5d19eba972f8f5468dd24b1106b33", "size": 1605, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_colortrans.py", "max_stars_repo_name": "dstein64/colortrans", "max_stars_repo_head_hexsha": "bda872f85733a91c375f138c694d9692f719b7fa", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
############################################################################## # Institute for the Design of Advanced Energy Systems Process Systems # Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2020, by the # software owners: The Regents of the University of California, through # Lawrence Berkeley N...
{"hexsha": "e248e9f538e22f3ac7ebef1238fbde96b42966e5", "size": 18183, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/apps/rankine/simple_rankine_cycle.py", "max_stars_repo_name": "shermanjasonaf/idaes-pse", "max_stars_repo_head_hexsha": "b3c69a9c2a31cfe79683a95161a98112b9059912", "max_stars_repo_licenses"...
import numpy as np from torch.utils.data._utils.collate import default_collate from torch.utils.data.distributed import DistributedSampler from .datasets import get_dataset from .dataloader import FastDataloader from augment import (get_transforms, get_center_crop_transforms, get_simple_transfor...
{"hexsha": "d3195679916e2d34d420d8cc2d307459ea0a617f", "size": 4502, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/getters.py", "max_stars_repo_name": "merlinarer/scrl", "max_stars_repo_head_hexsha": "f5bc426ed6eef130d44dd3a5609dc0772da59613", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
! ! :::::::::::::: BOUND ::::::::::::::::::::::::::::::::::::::::::: ! This routine sets the boundary values for a given grid ! at level level. ! We are setting the values for a strip ng zones wide on ! both borders. ! ! Outputs from this routine: ! The values around the border of the grid are...
{"hexsha": "caa87d2e0e102acbdd4419d62d79af1e7d6a08ca", "size": 2819, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/1d/bound.f90", "max_stars_repo_name": "navravi/amrclaw", "max_stars_repo_head_hexsha": "727d98d243c521267c927f6fe107ba6f1155597b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
from __future__ import print_function import os import scipy from py2gcode import gcode_cmd from py2gcode import cnc_pocket from py2gcode import cnc_boundary from params import params alignTest = False # Cutting parameters safeZ = 0.5 startZ = 0.0 overlap = 0.4 overlapFinish = 0.6 maxCutDepth = 0.05 if alignTest: ...
{"hexsha": "416a1e2f40ad47e1bf41172b3461a5f2080396d1", "size": 3205, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnc/motor_hub/motor_hub/magnet_and_boundary/mill.py", "max_stars_repo_name": "iorodeo/stir_plate_mechanics", "max_stars_repo_head_hexsha": "ad721e708d962afcb14dd69456df4231c83ffed8", "max_stars_re...
''' MIT License Copyright 2019 Oak Ridge National Laboratory 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 use, copy, modify, mer...
{"hexsha": "4d493e189904a7264c7723bd85003cea3588e9f1", "size": 14863, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/faro/FaceGallery.py", "max_stars_repo_name": "reidej/faro", "max_stars_repo_head_hexsha": "b85b1c6ba7cb69fac6cfd62ba64558676de24fd0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9,...
%% brute_force_tune % Code to test the performance of various tuning parameters % Works sorta like RANSAC I guess? % Adam Werries 2016, see Apache 2.0 license. k_max = 50; % Specify ranges accel_bias_PSD = logspace(-10,-4,100); gyro_bias_PSD = logspace(-10,-4,100); % Repeat arrays accel_bias_PSD = repmat(accel_bias_PS...
{"author": "awerries", "repo": "kalman-localization", "sha": "558ca7fae1779aa71da61ec4829299bbbdbf62ff", "save_path": "github-repos/MATLAB/awerries-kalman-localization", "path": "github-repos/MATLAB/awerries-kalman-localization/kalman-localization-558ca7fae1779aa71da61ec4829299bbbdbf62ff/MATLAB/Tuning/tune_bias_psd.m"}
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. # Copyright (c) 2020 jeonsworld # # 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 # ...
{"hexsha": "c651432f332c335b93039868e4a3990ce79b3efd", "size": 2700, "ext": "py", "lang": "Python", "max_stars_repo_path": "applications/pytorch/vit/validation.py", "max_stars_repo_name": "payoto/graphcore_examples", "max_stars_repo_head_hexsha": "46d2b7687b829778369fc6328170a7b14761e5c6", "max_stars_repo_licenses": ["...
import unittest import pycqed as pq import numpy as np import matplotlib.pyplot as plt import os from pycqed.analysis_v2 import measurement_analysis as ma class Test_flipping_analysis(unittest.TestCase): @classmethod def tearDownClass(self): plt.close("all") @classmethod def setUpClass(self):...
{"hexsha": "0744383b09a279190056db6deaf34c6754c68525", "size": 6985, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycqed/tests/analysis_v2/test_timedomain_analysis_v2.py", "max_stars_repo_name": "nuttamas/PycQED_py3", "max_stars_repo_head_hexsha": "1ee35c7428d36ed42ba4afb5d4bda98140b2283e", "max_stars_repo_li...
"""Here special plot scripts are defined, which can be accessed from the config""" from forge.tools import ( customize_plot, config_layout, relabelPlot, reject_outliers, text_box, ) import holoviews as hv from holoviews import opts from holoviews.operation import histogram import logging import pand...
{"hexsha": "e2ddc2b569b0b4fbbfcbccf4661d2705b3b2a213", "size": 15771, "ext": "py", "lang": "Python", "max_stars_repo_path": "COMET/misc_plugins/PlotScripts/forge/specialPlots.py", "max_stars_repo_name": "dallaval5u/COMET", "max_stars_repo_head_hexsha": "8c5793faafe2797dd4100507aa0fe1e71cf9f6c0", "max_stars_repo_license...
import os # hacky, but whatever import sys my_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(my_path, '..')) import mdpsim # noqa: #402 import pytest # noqa: E402 import tensorflow as tf # noqa: E402 import numpy as np # noqa: E402 pytest.register_assert_rewrite('models') from mode...
{"hexsha": "49c085c1e0faa3b8f92412f5e2bc2c1413bdc226", "size": 1608, "ext": "py", "lang": "Python", "max_stars_repo_path": "asnets/tests/tests.py", "max_stars_repo_name": "xf1590281/ASNets", "max_stars_repo_head_hexsha": "5f4b29fb62a5e72004b813228442d06246c9ec33", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import pandas as pd import sklearn import matplotlib.pyplot as plt import seaborn as sns import warnings warnings.simplefilter(action='ignore', category=FutureWarning) ratings = pd.read_csv("https://s3-us-west-2.amazonaws.com/recommender-tutorial/ratings.csv") # a = ratings.head() # print(a) # 1 ...
{"hexsha": "620f5c722e340285a5cc275bd99f47ed35f878e4", "size": 5364, "ext": "py", "lang": "Python", "max_stars_repo_path": "first_test.py", "max_stars_repo_name": "VictorBenoiston/algorithms_testing", "max_stars_repo_head_hexsha": "78ea075d4c49515d2a4ae96901e1c7d66ed7b9f3", "max_stars_repo_licenses": ["MIT"], "max_star...
MODULE params_model USE common, ONLY: r_size IMPLICIT NONE PUBLIC ! Now definable via namelist at runtime: ! MOM4 ncep2012 tripolar converted to spherical #ifdef DYNAMIC INTEGER :: nlon=720 INTEGER :: nlat=410 INTEGER :: nlev=5 #else INTEGER,PARAMETER :: nlon=720 INTEGER,PARAMETER :: nlat=410 INTEG...
{"hexsha": "e43f4eecd057fbbf6968ac267c6e9dd5d812feaa", "size": 4212, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/model_specific/sis/params_model.f90", "max_stars_repo_name": "GEOS-ESM/Ocean-LETKF", "max_stars_repo_head_hexsha": "a7c4bbf86cdbff078212914dcc059d0b1450accf", "max_stars_repo_licenses": ["Ap...
# Invertible network based on Glow (Kingma and Dhariwal, 2018) # Includes 1x1 convolution and residual block # Author: Philipp Witte, pwitte3@gatech.edu # Date: February 2020 export NetworkGlow, NetworkGlow3D """ G = NetworkGlow(n_in, n_hidden, L, K; k1=3, k2=1, p1=1, p2=0, s1=1, s2=1) G = NetworkGlow3D(n_in...
{"hexsha": "8b130ec3ed00254c2b31ba70d87b6dde2b86903e", "size": 7300, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/networks/invertible_network_glow.jl", "max_stars_repo_name": "PetersBas/InvertibleNetworks.jl", "max_stars_repo_head_hexsha": "c53dacf426ecd1381f79f297f6954e6695c515b3", "max_stars_repo_license...
import cv2 import numpy as np import matplotlib.pyplot as plt # Read image img = cv2.imread("imori.jpg").astype(np.float32) H, W, C = img.shape img2 = cv2.imread("thorino.jpg").astype(np.float32) a = 0.6 out = img * a + img2 * (1 - a) out = out.astype(np.uint8) # Save result cv2.imwrite("out.jpg", out) cv2.imsh...
{"hexsha": "7003d5902ab62a4f060edc115b6aa7ccb1358e5d", "size": 377, "ext": "py", "lang": "Python", "max_stars_repo_path": "Question_51_60/answers/answer_60.py", "max_stars_repo_name": "Zpadger/ImageProcessing100Wen", "max_stars_repo_head_hexsha": "993ebc6c16c43b1fc664382833ef7724b439e1ec", "max_stars_repo_licenses": ["...
# Script 2/2 to ensure that corr did the same thing between R and Python (June 2016) import numpy as np import pandas as pd METHOD='spearman' # my_df = pd.DataFrame([[3,2,np.nan], [5,9,3], [1,np.nan],[2,8,2], [4,1,8]]) my_df = pd.DataFrame.from_dict({"a":[3,5,1,2,4], "b":[2,9,np.nan,8,1], "c":[np.nan,3,5,2,8]}) print...
{"hexsha": "148a5e2e9927f2c1ab6e88f0e36d9db56e3f7a7a", "size": 1142, "ext": "py", "lang": "Python", "max_stars_repo_path": "broadinstitute_psp/utils/corr_verification.py", "max_stars_repo_name": "cmap/psp", "max_stars_repo_head_hexsha": "9389e9d86424e460e577dd1d9027f4a1d1f8227a", "max_stars_repo_licenses": ["BSD-3-Clau...