text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
Casey likes Willy Wonka and the Chocolate Factory and Paper Clips paperclips. If he wears a fake moustache, he resembles Kurt Vonnegut.
{"hexsha": "d48662727fe37ce0d2b85c60e434a42acbad39f2", "size": 136, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/CaseyMcGrath.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import unittest import numpy as np from stock_data_analysis_module.indicators import stochastic_oscillator class StochasticOscillatorTestCase(unittest.TestCase): def __init__(self, *args): super().__init__(*args) self._empty_sequence = [] self._empty_ndarray = np.zeros((0,))...
{"hexsha": "d17b70cbb507f68518c8f02038fe11a806828fb0", "size": 1110, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/test/stock_data_analysis_module/indicators/test_stochastic_oscillator.py", "max_stars_repo_name": "Freitacr/ML-StockAnalysisProject", "max_stars_repo_head_hexsha": "37411c1204ecf69040ba2a16580...
import os import pickle import numpy as np from numpy.testing import assert_allclose import pandas as pd import pytest from statsmodels.tsa.seasonal import STL cur_dir = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.join(cur_dir, "results", "stl_test_results.csv") results = pd.read_csv(file_path) re...
{"hexsha": "7321e0e781a6de50798fb5053cb80a64863523bc", "size": 11117, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/statsmodels/tsa/tests/test_stl.py", "max_stars_repo_name": "EkremBayar/bayar", "max_stars_repo_head_hexsha": "aad1a32044da671d0b4f11908416044753360b39", "max_stars_repo_lic...
from torch.utils import data import matplotlib.pyplot as plt import numpy as np import cv2 import os import json import train_weak_supervision.config as config from src.utils.data_manipulation import resize, resize_generated, normalize_mean_variance from src.utils.data_manipulation import generate_affinity, generate_t...
{"hexsha": "ae96b044a70f2c70a98e38fece94c94316307c10", "size": 7570, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_weak_supervision/dataloader.py", "max_stars_repo_name": "ds-brx/CRAFT-Remade", "max_stars_repo_head_hexsha": "1d5d990ebdca44582cd5271f13c46a27b79e0249", "max_stars_repo_licenses": ["MIT"], "...
# Adapted from: https://gitlab.tubit.tu-berlin.de/rsim/bigearthnet-19-models/blob/93c3d398341a5ccc2c4f61d64e702901cd9340ab/prep_splits_BigEarthNet-19.py import argparse import os import csv import json import pathlib import gdal import tensorflow as tf import numpy as np # Spectral band names to read related GeoTIFF...
{"hexsha": "20b2ef7f354fd92b3dd6a183a6672f5af3c97624", "size": 4881, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepare_data.py", "max_stars_repo_name": "tommygod3/fyp-scripts", "max_stars_repo_head_hexsha": "603e4f5025f297c2242f23b1ed56991606dff31d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# k-means ## scikit-learn.cluster.kmeans # hierarchical clustering analysis "EMSC" (Extended Multiplicative Scattering Correction) ## https://scikit-learn.org/stable/modules/clustering.html#hierarchical-clustering ## https://github.com/RPCausin/EMSC/blob/master/EMSC.py: (Bassan, Konevskikh) import enum from typing impo...
{"hexsha": "6d534a1b0372ba6d2aa5637623ab600c8b9dc442", "size": 1636, "ext": "py", "lang": "Python", "max_stars_repo_path": "xicam/spectral/operations/clustering.py", "max_stars_repo_name": "lchen23/Xi-cam.spectral", "max_stars_repo_head_hexsha": "db3046f269443a58a6a4958f3092bfad8b71dcfa", "max_stars_repo_licenses": ["B...
### A Pluto.jl notebook ### # v0.14.5 using Markdown using InteractiveUtils # ╔═╡ 774b5c68-c2e8-11eb-0c25-c124276640d6 begin using Revise using Pkg Pkg.activate(tempname()) Pkg.develop(url="https://github.com/manuelbb-upb/RadialBasisFunctionModels.jl.git") Pkg.add("Flux") Pkg.add("MLDatasets") using Flux, MLDa...
{"hexsha": "c61bfaf1f3573ed5a8cb513453a9857b880e5bcd", "size": 5062, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Flux_Notebook.jl", "max_stars_repo_name": "manuelbb-upb/RBFModels.jl", "max_stars_repo_head_hexsha": "d321761fd58c88a1b11f6f1cf0e82b6ab64531e8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np class BatchIterator: def __init__(self, inputs, labels, batch_size): self.inputs = inputs self.labels = labels self.batch_size = batch_size self.size = self.inputs.shape[0] self.epochs = 0 self.cursor = 0 self.shuffle() def shuffl...
{"hexsha": "6edbbbeae1dfd4b86ca991a620f56895db850f92", "size": 880, "ext": "py", "lang": "Python", "max_stars_repo_path": "batch_iterator.py", "max_stars_repo_name": "suleymanaslan/open-set-identification-gan", "max_stars_repo_head_hexsha": "8ffa37790134394aaac9ed87d30d341c02f7228a", "max_stars_repo_licenses": ["MIT"],...
import random from collections import defaultdict import copy import networkx as nx import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from gensim.models.keyedvectors import Vocab from six import iteritems from sklearn.metrics import auc, f1_score, precision_recall_curve, roc_auc_sco...
{"hexsha": "72a82d2509758280dba01e6327e17775c4f9766d", "size": 4378, "ext": "py", "lang": "Python", "max_stars_repo_path": "cogdl/tasks/multiplex_link_prediction.py", "max_stars_repo_name": "awesome-archive/cogdl", "max_stars_repo_head_hexsha": "0a354eaaaf851e7218197508e7e85a81d3fb5753", "max_stars_repo_licenses": ["MI...
library(rstan) library(loo) rstan_options(auto_write = TRUE); options(mc.cores = parallel::detectCores()); plotProfileFit <- function(fit, data, targetSco, numSamples = 10) { true_value = extract(fit,'true_value')$true_value; samplesToPlot = true_value[sample(1:(dim(true_value)[1]),numSamples),]; #Add the ...
{"hexsha": "89e226c1ac890a3a1f773e1a8dde0cca623c391a", "size": 3072, "ext": "r", "lang": "R", "max_stars_repo_path": "stan-experiments/interpolate-funcs.r", "max_stars_repo_name": "cas-bioinf/genexpi-stan", "max_stars_repo_head_hexsha": "1164ff1c44ed967574aace8f629e5315fa70e18b", "max_stars_repo_licenses": ["BSD-3-Clau...
module TimePetriNets using Requires include("base.jl") include("Monoflop.jl") function __init__() # Optional dependency for makie-based plotting @require GraphMakie="1ecd5474-83a3-4783-bb4f-06765db800d2" begin @require GLMakie="e9467ef8-e4e7-5192-8a1a-b1aee30e663a" begin include("plotting...
{"hexsha": "96136384a378957f49ce863852d8169a2397de46", "size": 360, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TimePetriNets/TimePetriNets.jl", "max_stars_repo_name": "jleugeri/TimedAutomata.jl", "max_stars_repo_head_hexsha": "97305371cc4fd150069ea5634663e1b30e3a8987", "max_stars_repo_licenses": ["MIT"],...
// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #ifndef TEST_SUPPORT_SEQ_HPP #define TEST_SUPPORT_SEQ_HPP #include <boost/hana/fwd/at.hpp> #include <boost/hana/fwd/concept/sequen...
{"hexsha": "2819161dfb541349753298fe92722f3a471a001c", "size": 3832, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "thirdparty-cpp/boost_1_62_0/libs/hana/test/_include/support/seq.hpp", "max_stars_repo_name": "nxplatform/nx-mobile", "max_stars_repo_head_hexsha": "0dc174c893f2667377cb2ef7e5ffeb212fa8b3e5", "max_st...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import sys if sys.version_info >= (3,0): xrange = range class MultiFieldPlotter: """ This class tries to make it easier to view functions of mor...
{"hexsha": "7ec4f2ee284e4b8a0ea801e388162c3a2eb0f304", "size": 6894, "ext": "py", "lang": "Python", "max_stars_repo_path": "cosmoTransitions/multi_field_plotting.py", "max_stars_repo_name": "ycwu1030/CosmoTransitions", "max_stars_repo_head_hexsha": "dabf3fe02c05d13458571e84398a148aad5aec4c", "max_stars_repo_licenses": ...
/* Copyright [2017-2020] [IBM Corporation] 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 wri...
{"hexsha": "d9d05113de278f6de927e44fac0e8e261cfcdde4", "size": 26713, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/server/ado/src/ado.cpp", "max_stars_repo_name": "omriarad/mcas", "max_stars_repo_head_hexsha": "f47aab12754c91ebd75b0e1881c8a7cc7aa81278", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
/*++ BDcpp -- Simple Bjontegaard Delta metric implementation for C++. MIT License Copyright (c) 2022 Tim Bruylants 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...
{"hexsha": "dba67f1114390e57ae37931f331e903acb2035fe", "size": 5301, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "bdcpp/bdcpp.cpp", "max_stars_repo_name": "tbr/bjontegaard_cpp", "max_stars_repo_head_hexsha": "d06302497d8af0734d69ce93590acab9a4998817", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
######################################################################################### # WaveformQSRCNN.py: QSRCNN for G711/ADPCM/AMR/EVS using using Waveform features # Author: Huijun Liu # Time: 10.05.2017 # Location: TU Braunschweig IfN #######################################################################...
{"hexsha": "bdf6dbd1774eb6ae48319521169e3b1a485ff2cb", "size": 13097, "ext": "py", "lang": "Python", "max_stars_repo_path": "CepstralCNN/WaveformQSRCNN.py", "max_stars_repo_name": "ansleliu/ConvolutionaNeuralNetworksToEnhanceCodedSpeech", "max_stars_repo_head_hexsha": "2f0852ef2d97338a8cf42fe7e20231f38c0613de", "max_st...
# import numpy as np from keras import backend as K def mean_squared_error(y_true, y_pred): return K.mean(K.square(y_pred - y_true)) def root_mean_square_error(y_true, y_pred): return mean_squared_error(y_true, y_pred) ** 0.5 def rmse(y_true, y_pred): return mean_squared_error(y_true, y_pred) ** 0.5 # a...
{"hexsha": "82438b7d262769522ea2122a7ecc377871c0b076", "size": 397, "ext": "py", "lang": "Python", "max_stars_repo_path": "star/metrics.py", "max_stars_repo_name": "hongnianwang/STAR", "max_stars_repo_head_hexsha": "11cad8a01c6661bbaec7da511a1c9cb960896b00", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "ma...
import numpy as np NG_EXACT = 'exact' NG_BD = 'block_diagonal' NG_BTD = 'block_tri_diagonal' NG_KFAC = 'kfac' __all__ = [ 'batch_analytic_kernel', 'analytic_kernel' ] def batch_analytic_kernel(x1, x2, w_var, ng_type, batch_size): N1 = x1.shape[0] N2 = x2.shape[0] assert N1 % batch_size == 0 and N2 % batc...
{"hexsha": "393197a6c411caf67487c794065becd056182f7c", "size": 2321, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy-based/analytical.py", "max_stars_repo_name": "kazukiosawa/ngd_in_wide_nn", "max_stars_repo_head_hexsha": "1da1a708f8486c16010856d4b43c640b86a14893", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding:utf-8 -*- __author__ = 'boredbird' import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LogisticRegression from datetime import datetime from sklearn.svm import l1_min_c from woe.eval import compute_ks import pickle import time """ Search for optimal hyp...
{"hexsha": "90bb7085359c8182866971e431350e5705f6665b", "size": 9955, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/woe/GridSearch.py", "max_stars_repo_name": "Jie-Yuan/woe", "max_stars_repo_head_hexsha": "335e9ec2a521d3bbccb0ad5d915128119e4d0ca6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" POI_grid -------- POI: probability of instantiation """ import numpy as np import os from .constants import ROW, COL, create_deepcopy import copy from multigrids import TemporalMultiGrid class POIGrid (TemporalMultiGrid): """ Class doc """ def __init__ (self, *args, **kwargs): """This class r...
{"hexsha": "38c77c920c890cca2c4c7892675a5fe84d8d6244", "size": 2306, "ext": "py", "lang": "Python", "max_stars_repo_path": "atm/grids/poi_grid.py", "max_stars_repo_name": "gina-alaska/arctic_thermokarst_model", "max_stars_repo_head_hexsha": "7a3dbedb72b133670bb6e476fc3f5788bbcdbca4", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma term_variants_pred_param: assumes "term_variants_pred P t s" and fg: "f = g \<or> g \<in> set (P f)" shows "term_variants_pred P (Fun f (S@t#T)) (Fun g (S@s#T))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. term_variants_pred P (Fun f (S @ t # T)) (Fun g (S @ s # T)) [PROOF STEP] proof - ...
{"llama_tokens": 994, "file": "Automated_Stateful_Protocol_Verification_Term_Variants", "length": 10}
""" Module to train DBN on MNIST. """ from os import path from pylearn2.config import yaml_parse from pylearn2.utils import serial from theano import config #config.exception_verbosity='high' #config.optimizer='fast_compile' #config.mode='DEBUG_MODE' def train_yaml(yaml_file): train = yaml_parse.load(yaml_file)...
{"hexsha": "8781f41dac482d1fe15c07dd1168f16135f135a8", "size": 1702, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylearn2/scripts/tutorials/dbn_demo/train.py", "max_stars_repo_name": "rdevon/pylearn2", "max_stars_repo_head_hexsha": "f7b9a6ea0e2498176b47202f5bb83aec4976e1dd", "max_stars_repo_licenses": ["BSD-...
[STATEMENT] lemma to_list_tree_single: "v \<in> verts to_list_tree \<Longrightarrow> \<exists>x. v = [x] \<and> x \<in> verts T" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v \<in> verts to_list_tree \<Longrightarrow> \<exists>x. v = [x] \<and> x \<in> verts T [PROOF STEP] unfolding to_list_tree_def [PROOF STATE]...
{"llama_tokens": 248, "file": "Query_Optimization_Directed_Tree_Additions", "length": 2}
import torch import torch.nn as nn import torch.optim as optim import numpy as np from sklearn.metrics import mean_squared_error from datetime import datetime, timedelta import os import time from config import * from dataset.wrapped_dataloader import * from model.seq2seq.encoder import Encoder from model.seq2seq.deco...
{"hexsha": "1502725f78e357fbdf2c1b4dab0d2b459576f80b", "size": 5457, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Aquarium1222/Electricity-Forecasting", "max_stars_repo_head_hexsha": "9f945d3fd8006e5d77da08ff7861577965109ec8", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma fixp_strong_induct_uc: fixes F :: "'c \<Rightarrow> 'c" and U :: "'c \<Rightarrow> 'b \<Rightarrow> 'a" and C :: "('b \<Rightarrow> 'a) \<Rightarrow> 'c" and P :: "('b \<Rightarrow> 'a) \<Rightarrow> bool" assumes mono: "\<And>x. mono_body (\<lambda>f. U (F (C f)) x)" and eq: "f \<...
{"llama_tokens": 796, "file": null, "length": 6}
#!/usr/bin/python from __future__ import division, print_function import h5py from struct import pack import sys import os import numpy as np from glob import glob from argparse import ArgumentParser def convert_ptype(inbase, outbase, ptype='PartType1', overwrite=False, verbose=False): files = glob(inbase+'*') ...
{"hexsha": "0a3881472cbc16385c6b7e6b0853d0f31af12128", "size": 7358, "ext": "py", "lang": "Python", "max_stars_repo_path": "sgklibs/convert_ptype_to_gbin.py", "max_stars_repo_name": "sheagk/sgklibs", "max_stars_repo_head_hexsha": "47e99f7f2e24dfabff039f005847e702a12138b1", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np import pickle class Expert_data(object): def __init__(self, fpath): self.load_data(fpath) self.pointer = 0 def load_data(self, fpath): with open(fpath, 'rb') as f: data = pickle.load(f) self.obs = data['observations'] self.acts = data['actions'] self.acts = self.a...
{"hexsha": "c1abfb89bcc71c64910f49600767109b349007e2", "size": 1418, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw1/data_set.py", "max_stars_repo_name": "AnxietyYoungPoet/CS294-122", "max_stars_repo_head_hexsha": "8e813c62fc1ef0bac18f97f3045d60bec4d02b72", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" ~~~ REDIMENSIONALIZE THE SIMULATION AND DATA FILES ~~~ Re dimensionalizing and plotting the CQ Data (sims AND experimental) will be done in a few steps 1. Read in the 3 experimental data files 2. Read in the 3*4 = 12 simulation data files 3. Dimensionalize P, M, wp, wm, and sb for both the data and the simulatio...
{"hexsha": "0fbe33565366a50b20fef92ae8a562438aec352e", "size": 5520, "ext": "py", "lang": "Python", "max_stars_repo_path": "Old Python Code/ReDim.py", "max_stars_repo_name": "CRZaug/NonlinearWaves", "max_stars_repo_head_hexsha": "2adfc2cc5e0c18576c6b73420a913ef1ce23000d", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import cv2 from google.colab.patches import cv2_imshow from fmd.mark_dataset.util import draw_marks import numpy as np from face_detector.detector import Detector import tensorflow as tf class predictor(): def __init__(self, detector_face_model_path, cnn_model_path, threshold=0.7): self.detector_face_model = Det...
{"hexsha": "d4a285bcfb939208141126913a0f7ed0572efee8", "size": 1771, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "keshav47/cnn-facial-landmark", "max_stars_repo_head_hexsha": "2c4011db2917428ebebf70d7fc9ad59c89002bfc", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from .losses import * from .modules.layers import * from .modules.context_module import * from .modules.attention_module import * from .modules.decoder_module import * from .backbones.Res2Net_v1b import res2net50_v1b_26w_4s class P...
{"hexsha": "5d9181ef47d024e14ff501b336d0f6339187288f", "size": 2275, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/PraNet.py", "max_stars_repo_name": "Inovasyon-ve-Analiz/uacanet", "max_stars_repo_head_hexsha": "4f6567840360ece53868888acd72a16de8279dc2", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python3 # Copyright 2021 by Julian Nubert, Robotic Systems Lab, ETH Zurich. # All rights reserved. # This file is released under the "BSD-3-Clause License". # Please see the LICENSE file that has been included as part of this package. import os import glob import numpy as np import torch import ros_uti...
{"hexsha": "12c01a21d331579da99fcc7aef62de83cc7ef138", "size": 1574, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/rosbag_scans.py", "max_stars_repo_name": "leggedrobotics/DeLORA", "max_stars_repo_head_hexsha": "909948d63a9517e6dd54bedcf099f6b39ded2cb4", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import tensorflow as tf import numpy as np from models import TransWeight from tests import TestBase class TransWeightTest(TestBase): """ This class tests the functionality of the TransWeight model. This test suite can be ran with: python -m unittest -q tests.TransWeightTest """ def setUp...
{"hexsha": "d4cff420573d60bfd9539ab3e609e54dbf138f17", "size": 3974, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_transweight.py", "max_stars_repo_name": "larsvansoest/commix", "max_stars_repo_head_hexsha": "c5629a94d8657e67919fdbb42da99026e85023e2", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Feb 24 14:28:26 2019 @author: Emma """ import numpy as np import os,sys sys.path.append(os.pardir) from dataset.mnist import load_mnist import matplotlib.pylab as plt def cross_entropy_error(y,t): if y.ndim==1: t=t.reshape(1,t.size()) ...
{"hexsha": "b3d81f42886e6f8d04dca76a6d13968994da7238", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch04/practice.py", "max_stars_repo_name": "py0922/deepLearn", "max_stars_repo_head_hexsha": "32d0020ac98c1c9e65acd943087cec6167808c14", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
using LinearAlgebra, Zygote, Optim, IterativeSolvers, Arpack using CSV, DataFrames include("model.jl") function data() abalone = CSV.File(open("warpedgp/abalone.csv")) abalone = DataFrame(abalone) X = Matrix(Matrix(abalone[1:200,2:8])') y = Vector{Float64}(abalone[1:200, 9]) f = Linear() g = I...
{"hexsha": "6a7cfd23b8a7c04d1bacebcb47c30d6df3c3b342", "size": 1911, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "BayesTransformedGaussian/src/various_mle_things/warpedgp/run.jl", "max_stars_repo_name": "dbindel/btg", "max_stars_repo_head_hexsha": "83616be1d1c4d80f385fa95cef38753f39a3a4c3", "max_stars_repo_lic...
[STATEMENT] lemma word_shift_nonzero: "\<lbrakk> (x::'a::len word) \<le> 2 ^ m; m + n < LENGTH('a::len); x \<noteq> 0\<rbrakk> \<Longrightarrow> x << n \<noteq> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x \<le> 2 ^ m; m + n < LENGTH('a); x \<noteq> 0\<rbrakk> \<Longrightarrow> x << n \<noteq> 0...
{"llama_tokens": 1468, "file": "Word_Lib_Word_Lemmas", "length": 10}
""" Copyright 2013 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
{"hexsha": "e1c9998d7fb25319beef04ee215b062a89237814", "size": 2864, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvxpy/atoms/sum_largest.py", "max_stars_repo_name": "jasondark/cvxpy", "max_stars_repo_head_hexsha": "56aaa01b0e9d98ae5a91a923708129a7b37a6f18", "max_stars_repo_licenses": ["ECL-2.0", "Apache-2.0"...
function psnr=compute_psnr(im1,im2) if size(im1, 3) == 3, im1 = rgb2ycbcr(im1); im1 = im1(:, :, 1); end if size(im2, 3) == 3, im2 = rgb2ycbcr(im2); im2 = im2(:, :, 1); end imdff = double(im1) - double(im2); imdff = imdff(:); rmse = sqrt(mean(imdff.^2)); psnr = 20*log10(255/rmse);
{"author": "tyshiwo", "repo": "DRRN_CVPR17", "sha": "cafe98bc73997c10947911de74279d63cb786b8a", "save_path": "github-repos/MATLAB/tyshiwo-DRRN_CVPR17", "path": "github-repos/MATLAB/tyshiwo-DRRN_CVPR17/DRRN_CVPR17-cafe98bc73997c10947911de74279d63cb786b8a/test/evaluation_func/compute_psnr.m"}
import calendar from datetime import datetime as dt from datetime import timedelta import logging import time from time import sleep import sys import numpy as np import requests logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s') LOG = logging.getLogger("main") def utcnow(): ...
{"hexsha": "6dba61caafbf98e65ae5933dda72eb00d3b3601a", "size": 7645, "ext": "py", "lang": "Python", "max_stars_repo_path": "indiana.py", "max_stars_repo_name": "mildbyte/indiana", "max_stars_repo_head_hexsha": "fa35d4f1a08f92b77b698105f92054086ee11883", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_sta...
import os import pickle import uuid import cv2 import keras import matplotlib.pyplot as plt import numpy as np from keras import backend as K from keras.datasets import mnist from keras.layers import (Activation, Conv2D, Dense, Dropout, Flatten, MaxPooling2D) from keras.models import Sequenti...
{"hexsha": "6b243c5a16c2dcafc6e4356193c3a26ca651b092", "size": 2740, "ext": "py", "lang": "Python", "max_stars_repo_path": "predictors/from_webcam.py", "max_stars_repo_name": "marmightygood/image_classifier", "max_stars_repo_head_hexsha": "8dfc94efdb15206a45d6956e115e5291c2485b15", "max_stars_repo_licenses": ["Apache-2...
export Periodic , Bloch, DirichletNeumann , NeumannDirichlet , NeumannNeumann , DirichletDirichlet abstract type BCType end struct Periodic <: BCType end struct Bloch <: BCType end struct DirichletNeumann <: BCType end struct NeumannDirichlet <: BCType end struct NeumannNeumann <: BCType end struct DirichletDirichlet ...
{"hexsha": "846d79b3b3212c47caa5e3951a55f2a10231e441", "size": 333, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Interface/BC.jl", "max_stars_repo_name": "MKAbdElrahman/Photon.jl", "max_stars_repo_head_hexsha": "f75c0b572233094c8a049d3bf572489b6d5d23d9", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import math, cmath import numpy as np from openmdao.api import ImplicitComponent, Group from openmdao.api import DirectSolver, BoundsEnforceLS, NewtonSolver from pyLF.LF_elements.generator import ACgenerator, DCgenerator from pyLF.LF_elements.load import ACload, DCload class InverterCalcs(ImplicitComponent): d...
{"hexsha": "cd2591ad8d4d4bc12fee83408543dabdb8696b22", "size": 13947, "ext": "py", "lang": "Python", "max_stars_repo_path": "zappy/LF_elements/inverter.py", "max_stars_repo_name": "OpenMDAO/zappy", "max_stars_repo_head_hexsha": "2c72048b4c4e0ce0ae83221e4ee5788978254340", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# This Source Code Form is subject to the terms of the MIT # License. If a copy of the same was not distributed with this # file, You can obtain one at # https://github.com/akhilpandey95/scholarlyimpact/blob/master/LICENSE. import numpy as np import pandas as pd from tqdm import tqdm from sklearn.preprocessing import ...
{"hexsha": "686ffc27dec9d30aac5f98d02724579efd281ae0", "size": 4187, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data.py", "max_stars_repo_name": "akhilpandey95/scholarlyimpact", "max_stars_repo_head_hexsha": "215ae832c90f0564fa0301e4c3f1c99525617625", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# using StaticArrays: later package all types as static/mutable fixed size arrays/matrices """ Definition of abstract spatial types to be used across the package """ # todo: make types parametrized: {N(dims), T(type)} # todo: look for packages to depend on: GeometryTypes # todo: quaternions? abstract type AbstractPoin...
{"hexsha": "43546a92d81109967509aeee3f77de1a5655b455", "size": 780, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/spatialmaths/spatial_types.jl", "max_stars_repo_name": "pranshumalik14/RoboticsToolkit.jl", "max_stars_repo_head_hexsha": "652daaafc8f5ab27e2817252007a28ff3427a311", "max_stars_repo_licenses": [...
@testset "1.1.2.3 (a+b x^2)^p (c+d x^2)^q" begin (a, b, c, d, m, p, q, x, ) = @variables a b c d m p q x #= ::Package:: =# #= ::Title:: =# #=Integrands*of*the*form*(a+b*x^2)^p*(c+d*x^2)^q=# #= ::Section::Closed:: =# #=Integrands*of*the*form*(a+b*x^2)^p*(c+d*x^2)^q=# #= ::Subsubsection:...
{"hexsha": "40bb70d08704467b2fddc7705dd36180cc356d95", "size": 126528, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl", "max_stars_repo_name": "gronniger/RubiSymbolics.jl", "max_stars_repo_head_hexsha": "dd117985d...
import numpy as np from scipy.sparse import csr_matrix, csc_matrix, lil_matrix, save_npz, load_npz l = [[0, 1, 2], [3, 0, 4], [0, 0, 0]] csr = csr_matrix(l) csc = csc_matrix(l) save_npz('data/temp/csr.npz', csr) save_npz('data/temp/csc.npz', csc) csr_ = load_npz('data/temp/csr.npz') print(csr_.toarray()) ...
{"hexsha": "43cf33a2f2c819305357334e15d9f0fe8d75a5d4", "size": 969, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebook/scipy_sparse_save_load_npz.py", "max_stars_repo_name": "vhn0912/python-snippets", "max_stars_repo_head_hexsha": "80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038", "max_stars_repo_licenses": ["MIT...
import matplotlib.pyplot as plt from matplotlib.widgets import RadioButtons from matplotlib.colors import ListedColormap, BoundaryNorm import functools from math import floor import numpy as np from src.PathFindingAlgorithms import BFS, Dijkstra, Astar class PathGUI(): def __init__(self, Map, pathFinderType=...
{"hexsha": "54c609fd70c2b19f6792ee5258fbe4db750ae52f", "size": 6343, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GUI.py", "max_stars_repo_name": "Lilweavs/PathFinding", "max_stars_repo_head_hexsha": "56266ab6958473449852b9b47784daded797430d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# Import all the useful libraries import numpy as np import pandas as pd import fancyimpute from sklearn import model_selection from sklearn.model_selection import StratifiedKFold from sklearn.ensemble import AdaBoostClassifier # PROBABILITY from sklearn.tree import DecisionTreeClassifier # PROBABILITY from sklearn....
{"hexsha": "f9469d662c8a394418e1281849c9338717fd6652", "size": 33289, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/LocalModel.py", "max_stars_repo_name": "hades208002/mdp-project", "max_stars_repo_head_hexsha": "c242a8d00412cc3772d298986977f6acc47002ee", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 19 08:15:32 2018 Computes the global extrema metrics for regridded and reference target data @author: jeguerra """ import numpy as np def computeGlobalExtremaMetrics(varS2T, varST): Lden = (np.max(abs(varST)) - np.min(abs(varST))) L_min...
{"hexsha": "d0819aef474400c99d08b41c868c60d12b9ce2e8", "size": 530, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/computeGlobalExtremaMetrics.py", "max_stars_repo_name": "CANGA/MIRA", "max_stars_repo_head_hexsha": "2f1214d34b884790fa8660b5208cd12495800f92", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import pickle import numpy as np import pandas as pd from config.config import DATA_PATH, VECTORIZER_PATH from src.data.preprocess_data import preprocess_data from src.features.vectorize import split_dataset, fit_vectorizer, transform_vectorizer from sklearn.metrics import f1_score, classification_report from sklearn.n...
{"hexsha": "75d24f29f694fb9a2e8e15a8122ef8bbb48f33c0", "size": 1349, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/baseline.py", "max_stars_repo_name": "silencedsre/Fusemachines-AI-Training", "max_stars_repo_head_hexsha": "46ae5be0895fee66ef8a37f1da40a6d3a4bfde5a", "max_stars_repo_licenses": ["Apach...
from skimage import io as sio import skimage import numpy as np import matplotlib import matplotlib.pyplot as plt def reverse_jet(img): img = skimage.img_as_float(sio.imread(img)) jet = plt.cm.jet jet._init() lut = jet._lut[..., :3] z = img - lut[:, None, None, :] z *= z d = z.sum(axis=-...
{"hexsha": "39f6f1fe5bc9be97730b53ab69c6a6fe24660b0d", "size": 796, "ext": "py", "lang": "Python", "max_stars_repo_path": "reverseJet/reverseJet.py", "max_stars_repo_name": "ajpfahnl/labUtils", "max_stars_repo_head_hexsha": "11130f08100809fb9820f6771cb0666e4908a116", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma step_4_push_big_size_ok_1: "\<lbrakk> invar (States dir big small); 4 \<le> remaining_steps (States dir big small); (step^^4) (States dir (Big.push x big) small) = States dir' big' small'; remaining_steps (States dir big small) + 1 \<le> 4 * size small \<rbrakk> \<Longrightarrow> remaining_st...
{"llama_tokens": 351, "file": "Real_Time_Deque_States_Proof", "length": 1}
using Documenter, LearnBase, LossFunctions istravis = "TRAVIS" ∈ keys(ENV) makedocs( format = Documenter.HTML(assets=["assets/style.css","assets/favicon.ico"], prettyurls=istravis), sitename = "LossFunctions.jl", authors = "Christof Stocker, Tom Breloff, Alex Williams", pages = [ hide("Home" =...
{"hexsha": "c3033084d7f6f172ad19ea6512b779f207585f5a", "size": 983, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Evizero/MLModels.jl", "max_stars_repo_head_hexsha": "521ff95e5514329b7c98260df99cfde25d08d3b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 103, "ma...
import numpy as np import nest import matplotlib.pyplot as plt import pylab as pl ################################################################################### # Parameters ################################################################################### # General simulation parameters dt = 0...
{"hexsha": "9eb6ddce0b01cf85243f781c8a4a27c063dae299", "size": 12389, "ext": "py", "lang": "Python", "max_stars_repo_path": "associtive_properties.py", "max_stars_repo_name": "juliavg/assembly-structural-plasticity", "max_stars_repo_head_hexsha": "d00fc61fc6fea625f1f133efbc5847e8c0cc0341", "max_stars_repo_licenses": ["...
[STATEMENT] lemma transpose_mat_plus: assumes wf: "mat nr nc m1" "mat nr nc m2" shows "transpose nr (mat_plusI pl m1 m2) = mat_plusI pl (transpose nr m1) (transpose nr m2)" (is "?l = ?r") [PROOF STATE] proof (prove) goal (1 subgoal): 1. Matrix_Legacy.transpose nr (mat_plusI pl m1 m2) = mat_plusI pl (Matrix_Legacy.tr...
{"llama_tokens": 1558, "file": "Matrix_Matrix_Legacy", "length": 8}
from numba import jit import numpy as np from numpy import pi import matplotlib.pyplot as plt import time # General Constants MASS_E = 9.10938291e-31 # electron mass MASS_P = 1.67262178e-27 # proton mass STEF_BOLT = 5.670373e-8 # Stefan-Boltzmann constant K_BOLT = 1.381e-23 # Boltzmann constant C = 299792458 # sp...
{"hexsha": "398fa1ea70be0d5b50a64db1b5e7dc01ff2857b7", "size": 18716, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Star_Creator.py", "max_stars_repo_name": "iisharankov/Phys375-Stellar-Warming", "max_stars_repo_head_hexsha": "2cf8e81f11701ec4d04752cbdf27805ec187ace7", "max_stars_repo_licenses": ["MIT"], "...
# -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' data = np.genfromtxt(path,delimiter=',',skip_header=1) print(data) #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] census = np.concatenate((data,new_record),axis=0) print(census)...
{"hexsha": "17aea76707478ac2e9cdc5a5aa26c7d15fe1b658", "size": 1682, "ext": "py", "lang": "Python", "max_stars_repo_path": "Numpy/code.py", "max_stars_repo_name": "niketkaria/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "e46e9f902907178712c6756dbb1435daf43d65d5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#import pygame from PIL import Image import numpy as np from raycast import Raycaster from skimage.draw import line_aa #from pygame.constants import K_w, K_a, K_d, K_s, K_SPACE import sys import pdb OBJECT_MAP = { 'open': 0, 'wall': 1, 'food': 2, 'poison': 3, 'agent': 4, 'floor': 5, 'sky': ...
{"hexsha": "9526e756d0e2947eacfba88f9fca61081d035034", "size": 23766, "ext": "py", "lang": "Python", "max_stars_repo_path": "world.py", "max_stars_repo_name": "ScottJordan/waterworld", "max_stars_repo_head_hexsha": "5ad2e670939880944fc0a209c5eef153705afce6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
import numpy as np import scipy.stats as st def theta_init(K): return(np.ones(K)/K) def beta_ber_init(x,K): n,_ = x.shape return(np.ones((K,n))*0.5) def beta_mean_sampleinit(x,K): n,_ = np.shape(x) i_sample = np.random.choice(list(range(n)),size=K, replace=False) x_sample = x[i_sample,:] re...
{"hexsha": "b4fbdc59a62478617b0019ab4015009495527073", "size": 622, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW1/gibbs_sampling/initialization.py", "max_stars_repo_name": "DonghanHe/6701-Foundations-of-Graphical-Models", "max_stars_repo_head_hexsha": "3e9dfd7f85e4bbe4848dc1f4159e193e8193fe4a", "max_stars_...
header {* Optimizations for Code Float *} theory Optimize_Float imports "../ODE_Auxiliarities" Optimize_Integer begin lemma compute_bitlen[code]: "bitlen a = (if a > 0 then log2 a + 1 else 0)" by (simp add: bitlen_def log2_def) lemma compute_real_of_float[code]: "real_of_float (Float m e) = (if e \<ge> 0 then...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/Ordinary_Differential_Equations/Numerics/Optimize_Float.thy"}
//---------------------------------------------------------------------------// //! //! \file tstUniformDistribution.cpp //! \author Alex Robinson //! \brief Uniform distribution unit tests. //! //---------------------------------------------------------------------------// // Std Lib Includes #include <iostream> ...
{"hexsha": "cb66497d146c80933182d4ea5e4b11a9bf0ae233", "size": 36370, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "packages/utility/distribution/test/tstUniformDistribution.cpp", "max_stars_repo_name": "lkersting/SCR-2123", "max_stars_repo_head_hexsha": "06ae3d92998664a520dc6a271809a5aeffe18f72", "max_stars_rep...
import random import re from multiprocessing import Pool from collections import UserList, defaultdict import numpy as np import pandas as pd from matplotlib import pyplot as plt import torch from rdkit import rdBase from rdkit import Chem # https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader def se...
{"hexsha": "a3fb30a0d2afd0850954413efb15b584e398c908", "size": 9163, "ext": "py", "lang": "Python", "max_stars_repo_path": "moses/utils.py", "max_stars_repo_name": "yair-schiff/moses", "max_stars_repo_head_hexsha": "563c364acf6091bf1781f0f98743589ce4eb4195", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# Copyright 2019 Huawei Technologies Co., Ltd # # 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...
{"hexsha": "ba1689c6f913a7b1009363895f951405015b07ec", "size": 8480, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/st/probability/distribution/test_exponential.py", "max_stars_repo_name": "GuoSuiming/mindspore", "max_stars_repo_head_hexsha": "48afc4cfa53d970c0b20eedfb46e039db2a133d5", "max_stars_repo_lic...
# -*- coding: utf-8 -*- # ## copyright (C) 2018 # The Icecube Collaboration # # $Id$ # # @version $Revision$ # @date $LastChangedDate$ # @author Hershal Pandya <hershal@udel.edu> Last changed by: $LastChangedBy$ # from icecube import phys_services, dataclasses, icetray import numpy as np import tables from icecube...
{"hexsha": "b10d728b0abce06ab54ee884e51cda372fa59c93", "size": 17767, "ext": "py", "lang": "Python", "max_stars_repo_path": "icetray_version/releases/V00-00/i3module.py", "max_stars_repo_name": "hershalpandya/airshowerclassification_llhratio_test", "max_stars_repo_head_hexsha": "a2a2ce5234c8f455fe56c332ab4fcc65008e9409...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE HeapTest /* * @author : Ionesio Junior */ #include <boost/test/unit_test.hpp> #include "../BinaryHeap.hpp" #include <cstdlib> #include <iostream> #include <time.h> #include <vector> struct setUp{ BinaryHeap<int> *heap = new BinaryHeap<int>(10); int empty[0] = {...
{"hexsha": "6042cfb2741bb9d5300016d81413a233d3ef2c21", "size": 5551, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Data Structures/Heap/C++/Test/test.cpp", "max_stars_repo_name": "Julian-Mentasti/codezilla", "max_stars_repo_head_hexsha": "ca157d75628f68ab01d589267f26d17751a87e86", "max_stars_repo_licenses": ["MI...
Require Import Bedrock.Platform.Thread Bedrock.Platform.Arrays8 Bedrock.Platform.MoreArrays Bedrock.Platform.Buffers Bedrock.Platform.Io. Local Hint Extern 1 (@eq W _ _) => words. Module Type S. Parameters globalSched globalSock : W. Parameter inbuf_size : nat. Axiom inbuf_size_lower : (inbuf_size >= 2)%nat. ...
{"author": "mit-plv", "repo": "bedrock", "sha": "e3ff3c2cba9976ac4351caaabb4bf7278bb0dcbd", "save_path": "github-repos/coq/mit-plv-bedrock", "path": "github-repos/coq/mit-plv-bedrock/bedrock-e3ff3c2cba9976ac4351caaabb4bf7278bb0dcbd/Bedrock/Platform/tests/EchoServer.v"}
[STATEMENT] lemma register_unit_register[simp]: \<open>is_unit_register U \<Longrightarrow> register U\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. is_unit_register U \<Longrightarrow> register U [PROOF STEP] by (simp add: compatible_def complements_def is_unit_register_def)
{"llama_tokens": 95, "file": "Registers_Laws_Complement", "length": 1}
from typing import List, Dict, Any, Tuple, Union, Optional from collections import namedtuple, deque import torch import numpy as np import copy from ding.torch_utils import Adam, to_device from ding.rl_utils import v_1step_td_data, v_1step_td_error, get_train_sample from ding.model import model_wrap from ding.utils i...
{"hexsha": "e08f23900694a5cf011eab8c8c94a9f5911fa342", "size": 15813, "ext": "py", "lang": "Python", "max_stars_repo_path": "ding/policy/atoc.py", "max_stars_repo_name": "uuid0000/DI-engine", "max_stars_repo_head_hexsha": "cc2713fa01e5288bae21cfeb595729d665e092d1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
"""Class to train a PyTorch model""" import os import json import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.optim.lr_scheduler import ExponentialLR from torch.utils.tensorboard import SummaryWriter from torch.utils.data import DataLoader from ...
{"hexsha": "68db89e9d4252a18a5d77cca4241a9fdcbfc8dda", "size": 9255, "ext": "py", "lang": "Python", "max_stars_repo_path": "rssnet/learners/model.py", "max_stars_repo_name": "ArthurOuaknine/RSS-Net", "max_stars_repo_head_hexsha": "95e5f3df9f0fe4af7d37ff28f786141e48f14937", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import os import pandas as pd import torch import torch.nn as nn from PIL import Image from torch.utils.data import Dataset from torchvision import models, transforms from tqdm import tqdm import numpy as np import pickle data_dir = 'images' metadata_fn = "metadata.json" features_dir = "features" features_file = os.p...
{"hexsha": "c8b87d68a0ad1180811e4607928f9318d3f103ab", "size": 4848, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_prep/featurize_and_match.py", "max_stars_repo_name": "microsoft/art", "max_stars_repo_head_hexsha": "3ea0616a449cc1c03ee49f1777ce6b331c520b57", "max_stars_repo_licenses": ["MIT"], "max_stars_...
% Written by: % * Joachim Trescher % * Hans de Vreught \section{Types} In \Booster\ a {\em type} is specified by an expression in \Language{\NT{Type}} and represents a set of values. \Booster\ uses structural type equivalence: two types are the same if their definitions become the same when expanded; i.e.\ when all ...
{"hexsha": "ace54780e8b2fa6bf44fff22d3bd6a64c0e6ce3c", "size": 11536, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "compiler/frontends/toyfront/doc/Types.tex", "max_stars_repo_name": "CvR42/timber-compiler", "max_stars_repo_head_hexsha": "fcd35f78378dff111902052916f76adb037f2cf1", "max_stars_repo_licenses": ["Na...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn import Parameter old_version = False class GaussianConditional(nn.Module): def __init__(self, dim, clip=False): super(GaussianConditional, self).__init__() self....
{"hexsha": "581096bea9835dbde03cc6b3b1784ce161be3456", "size": 8910, "ext": "py", "lang": "Python", "max_stars_repo_path": "pixelcnn_model.py", "max_stars_repo_name": "zcwang0702/ssl_bad_gan", "max_stars_repo_head_hexsha": "a3d25b852ef5f17ea788b7141f0be0ac4d9fd631", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import pandas as pd import os from sklearn import tree from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score from sklearn.externals.six import StringIO import pydot def get_csv(): if os.path.exists("Update2.csv"): df = pd.read_csv("Update2.csv") ...
{"hexsha": "a9e778a85ae453647e6e08666caf272a49f5adca", "size": 1337, "ext": "py", "lang": "Python", "max_stars_repo_path": "MachineLearning/CSV_Prediction.py", "max_stars_repo_name": "SKravitsky/MachineLearningServer", "max_stars_repo_head_hexsha": "170081fe1ea53be7394e35ce208bd665ae002b73", "max_stars_repo_licenses": ...
# author: Arun Ponnusamy # website: https://www.arunponnusamy.com # import necessary packages from keras.preprocessing.image import img_to_array from keras.models import load_model from keras.utils import get_file import numpy as np import argparse import cv2 import os import cvlib as cv # handle command line argumen...
{"hexsha": "a1f5f114841e45c0cfa17595c5f5e8f0aa2ef007", "size": 2389, "ext": "py", "lang": "Python", "max_stars_repo_path": "detect_gender.py", "max_stars_repo_name": "bekturaitbaev/GenderDetection", "max_stars_repo_head_hexsha": "c7a449879daf8eabc38486c7afbe02f7e667c33a", "max_stars_repo_licenses": ["MIT"], "max_stars_...
\problemname{Arithmetic Decoding} Arithmetic coding is a method to represent a message as a real number $x$ such that $0 \leq x < 1$. We will assume that the message consists only of uppercase `A's and `B's. The two letters have associated probabilities $p_A$ and $p_B = 1 - p_A$ such that $0 < p_A < 1$. The current ...
{"hexsha": "91a1b6ed7053ccc1df631fc84988e51b8d8193f4", "size": 1846, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "problems/arithmeticdecoding/problem_statement/problem.tex", "max_stars_repo_name": "icpc/na-rocky-mountain-2020-public", "max_stars_repo_head_hexsha": "d77cd0dfd9bd707f34497977251c4cc583647fef", "ma...
# Copyright 2016, Iain Dunning, Joey Huchette, Miles Lubin, and contributors # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ########################################...
{"hexsha": "2ee1b54da18460d4eae9d1a113b3e6d42f4636fa", "size": 1646, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "public/.julia/v0.5/JuMP/test/hockschittkowski/hs112.jl", "max_stars_repo_name": "Giarcr0b/MVO_Tool", "max_stars_repo_head_hexsha": "8f3348b8b56968febca8307acea3ebe1817fccae", "max_stars_repo_licens...
\chapter*{Abbreviations} \begin{acronym}[Kurzformsdf] \acro{ECU}{Electrical Control Unit} \acro{VM}{Virtual Machine} \acro{SoC}{System on a Chip} \acro{NIST}{National Institute for Standards and Technology} \acro{IaaS}{Infrastructure-as-a-Service} \acro{PaaS}{Platform-as-a-Service} \acro{Sa...
{"hexsha": "2435946ee6d0ff6e1e51811277284d2c4e8196d5", "size": 1184, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/glossary.tex", "max_stars_repo_name": "MaxMalinowski/BachelorThesis", "max_stars_repo_head_hexsha": "91a5286a3d1cd32e628b85efcc2194a013cc7233", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 16 11:59:55 2020 @author: José Carlos Aradillas jaradillas@us.es """ import numpy as np import matplotlib.pyplot as plt from labcomdig import detectaSBF, simbolobit def load_signal(filename): try: Xt = np.load(filename) except File...
{"hexsha": "b321f8c96c5cff3e0fb6605122444da9fc1c8084", "size": 1638, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "josarajar/labcomdig-extra", "max_stars_repo_head_hexsha": "8c81be58d1edd6a4d88598a88bc4e83c22de6b24", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from numba import njit, generated_jit, vectorize, types import numpy as np from . import settings from .constants import _MAXCOSH @njit('float64(float64)', cache=settings.CACHE) def _dsinpi(x): """Compute sin(pi*x) for real arguments.""" s = 1.0 if x < 0.0: x = -x s = -1.0 r = np.fmo...
{"hexsha": "de6a4b18526b52a76b4abc4d56bd2846f81496c6", "size": 4215, "ext": "py", "lang": "Python", "max_stars_repo_path": "spycial/trig.py", "max_stars_repo_name": "person142/spycial", "max_stars_repo_head_hexsha": "d017048c8c09ee0714f438cb75c2e221e068baee", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
/* * 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) * * (C) Copyright 2007 Anthony Williams * (C) Copyright 2011-2012 Vicente J. Botet Escriba * (C) Copyright 2013 Andrey Semashev */ #ifndef BOOS...
{"hexsha": "4b8f8fb780204ce0352b0eda312a31f8dff1cf24", "size": 965, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/sync/locks/lock_options.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licenses": ["BSL-1.0"], ...
import json from PIL import Image import numpy as np import copy import os class armorstandgeo: def __init__(self, name, alpha = 0.8,offsets=[9,0,0], size=[64, 64, 64], ref_pack="Vanilla_Resource_Pack"): self.ref_resource_pack = ref_pack ## we load all of these items containing the mapping of bloc...
{"hexsha": "cddf6168b552bc1ad6ff7632ad322fdd3c01e7a4", "size": 19849, "ext": "py", "lang": "Python", "max_stars_repo_path": "armor_stand_geo_class.py", "max_stars_repo_name": "AL-Hareth/Structura", "max_stars_repo_head_hexsha": "56b5ea24960fb908f16ef97e82f402fcaf3690f1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
```python %matplotlib inline ``` <style type="text/css"> .reveal h1, .reveal h2 { font-family:"League Gothic" } </style> Hello everyone! My name is Amit Saha and today I am here to talk to about "Doing Math with Python". Thank you for coming to my talk - i know you could have chosen the other talk, so it's good to...
{"hexsha": "7760f707bbfc05213b896561a6e4f7776f2c359d", "size": 52447, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "slides.ipynb", "max_stars_repo_name": "WhitakerLab/slides", "max_stars_repo_head_hexsha": "a1b36f4114ddb1d330795cd9b0967d476c493df2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma keys_empty [simp]: "keys DAList.empty = {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. keys DAList.empty = {} [PROOF STEP] by transfer simp
{"llama_tokens": 64, "file": "Containers_AssocList", "length": 1}
C ********************************************************* C * * C * TEST NUMBER: 09.01.03.02/12 * C * TEST TITLE : Error 113 handled by system * C * * C * PHIGS V...
{"hexsha": "7f327af6c022afd675f0810428e079189c23f1a1", "size": 578, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "third_party/Phigs/PVT/PVT_fort/09/01/03/02/p12.f", "max_stars_repo_name": "n1ckfg/Telidon", "max_stars_repo_head_hexsha": "f4e2c693ec7d67245974b73a602d5d40df6a6d69", "max_stars_repo_licenses": ["MI...
import argparse import copy from io import UnsupportedOperation import json import os import sys import os.path as osp from collections import OrderedDict try: import apex except: print("No APEX!") import numpy as np import torch import yaml from det3d import __version__, torchie from det3d.datasets import bui...
{"hexsha": "9b56fbceb8765892f3b382598c59758685a359bf", "size": 6303, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/convert_voxelnet.py", "max_stars_repo_name": "alsun-oven/CenterPoint", "max_stars_repo_head_hexsha": "cafd89c4008270e648e97202bc256aff968e8109", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import division import numpy as np from scipy.special import erf from ReplicatedFocusingBeliefPropagation import atanherf __author__ = ["Nico Curti", "Daniele Dall'Olio"] __email__ = ['nico.curti2@unibo.it', 'danie...
{"hexsha": "dc97091f331e610e6c4413d335eee579910cffe0", "size": 772, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReplicatedFocusingBeliefPropagation/rfbp/test/test_atanherf.py", "max_stars_repo_name": "DanielLenz/rFBP", "max_stars_repo_head_hexsha": "fc8ae71a8ff58858f6800eeb3a3f25a56c143d18", "max_stars_repo_...
import copy from abc import ABC, abstractmethod import numpy as np import pandas as pd import seaborn as sns import matplotlib as mplt from matplotlib import pyplot as plt from labellines import labelLines from disease_spread_model.config import Directories from disease_spread_model.names import TRANSLATE from model...
{"hexsha": "6127382b480128ffd4659513bd567107c3274522", "size": 10583, "ext": "py", "lang": "Python", "max_stars_repo_path": "disease_spread_model/model/param_stability_tests.py", "max_stars_repo_name": "BartoszBiernacki/ABM", "max_stars_repo_head_hexsha": "6c993356aab86ce3d456e228c0a3aa41b2efa10c", "max_stars_repo_lice...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Generate map plots. Example:: $ python plot_maps.py -c : plot from files from combined output file $ python plot_maps.py -m max_id : plot from files with maximal subset ...
{"hexsha": "ad40e4e8ed5fde41be59a65aad0b09d5dd9e6efd", "size": 46574, "ext": "py", "lang": "Python", "max_stars_repo_path": "AWERA/resource_analysis/plot_maps.py", "max_stars_repo_name": "lthUniBonn/AWERA", "max_stars_repo_head_hexsha": "fa7f210516318bcfcbe1c99abbb5954b0cbaf682", "max_stars_repo_licenses": ["MIT"], "ma...
from math import pow import numpy as np def DEFAULT_ESCORT(x): """Gives Shahshahani metric and KL-divergence.""" return x def twisted_escort(x): l = list(x) return np.array([l[1], l[2], l[0]]) def power_escort(q): """Returns an escort function for the power q.""" def g(x): y = [] ...
{"hexsha": "1342fdaf8233925bf44deddcfaaf9845924526d6", "size": 906, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyed/geometries.py", "max_stars_repo_name": "jsafyan/pyed", "max_stars_repo_head_hexsha": "0d9c2b860a94f5ce0fc89ee48e1e76a86257750c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
% Process from LaTeX via XML to XHTML with % latexml --destination installguide.xml --xml installguide.tex % latexmlpost --destination installguide.xhtml --format=xhtml installguide.xml % % Crude hack to remove ugly symbols: % sed -e 's/[§]//g' -i installguide.xhtml % % Strip off header for pasting into the website at...
{"hexsha": "602d3f2a673b48896969face372c6de184fca1bb", "size": 37402, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "gromacs-4.6.5/admin/installguide/installguide.tex", "max_stars_repo_name": "farajilab/gifs_release", "max_stars_repo_head_hexsha": "ffa674110bcd15de851a8b6a703b4f4bc96fcd2d", "max_stars_repo_licens...
""" Module defining Population class and methods """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import from builtins import map from builtins import range try: basestring except NameError: basestring = str fro...
{"hexsha": "fa0f88640632bfc0f79539a80dfff764b32da6e2", "size": 25337, "ext": "py", "lang": "Python", "max_stars_repo_path": "netpyne/network/pop.py", "max_stars_repo_name": "FernandoSBorges/netpyne", "max_stars_repo_head_hexsha": "e1a7adb56b94aa78f8461397319eb4e9754c2d75", "max_stars_repo_licenses": ["MIT"], "max_stars...
# this follows `markdown.jl` but spurred by bugs/issues function inter(st::String) steps = explore_md_steps(st) return steps[:inter_md].inter_md, steps[:inter_html].inter_html end @testset "issue163" begin st = raw"""A _B `C` D_ E""" * J.EOS imd, ih = inter(st) @test imd == "A _B ##JDINSERT## D_...
{"hexsha": "72604427c2f096f5bf7dcbbefefba8af0c850bf1", "size": 3119, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/converter/markdown2.jl", "max_stars_repo_name": "davidanthoff/JuDoc.jl", "max_stars_repo_head_hexsha": "9435d89859d5e3b434af43aedb482053ba5eef09", "max_stars_repo_licenses": ["MIT"], "max_star...
module a implicit none contains subroutine b() print *, "b()" call c() contains subroutine c() print *, 5 end subroutine c end subroutine b end module program nested_02 use a, only: b implicit none call b() end
{"hexsha": "f3e60f0cd77dafe0966afd6d9aa82acfd9098762", "size": 229, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "integration_tests/nested_02.f90", "max_stars_repo_name": "Thirumalai-Shaktivel/lfortran", "max_stars_repo_head_hexsha": "bb39faf1094b028351d5aefe27d64ee69302300a", "max_stars_repo_licenses": ["BS...
import numpy as np import math import grid_generate as GridGen import estimate_method as EstMeth import frequency_oracle as FreOra import itertools import choose_granularity class AG_Uniform_Grid_1_2_way_optimal: def __init__(self, args = None): self.args = args self.group_attribute_num = 2 # to c...
{"hexsha": "031a077c992e5e52d6be7681ca35d8686fce976f", "size": 15980, "ext": "py", "lang": "Python", "max_stars_repo_path": "HDG.py", "max_stars_repo_name": "YangJianyu-bupt/privmdr", "max_stars_repo_head_hexsha": "c4b68c87aeeb811ae8c42db511704fd3cc258a3c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
import re import os import pandas as pd import numpy as np import datetime # from sklearn.feature_extraction import DictVectorizer # from sklearn.ensemble import GradientBoostingClassifier # from sklearn.preprocessing import Imputer import pyodbc from config import Config conf = Config() INPUT_DIR = conf.input_folder...
{"hexsha": "278293950a2c2b5650a02cda4984924294f26e22", "size": 76674, "ext": "py", "lang": "Python", "max_stars_repo_path": "reference/auto_refresh_final-test-20170818T100421Z-001/auto_refresh_final-test/original_code.py", "max_stars_repo_name": "aniruddhasanyal/auto_wrk", "max_stars_repo_head_hexsha": "970156f7cb5205a...
from multiprocessing import Process import netCDF4 as nc import numpy as np import pandas as pd import sys import json import time import matplotlib.pyplot as plt from urllib.request import urlopen from math import sin, cos, sqrt, atan2, radians # CLASS FOR ORGANIZING THE TOP CITIES class city: def __init__(self, ...
{"hexsha": "e12d043abb87bcd3ef2be1903ee9f817dc5aa1a6", "size": 4253, "ext": "py", "lang": "Python", "max_stars_repo_path": "appendix/adding_cities.py", "max_stars_repo_name": "siddkahal/MastersThesis_Latex_Doc", "max_stars_repo_head_hexsha": "6eff0b7138abd77ab46c7f6149a6bdf1054f7c40", "max_stars_repo_licenses": ["MIT"]...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "8a1d6fdd27a9d8b75beb4bdb6065d672b7922654", "size": 54953, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_estimator/python/estimator/head/multi_label_head_test.py", "max_stars_repo_name": "ziky90/estimator", "max_stars_repo_head_hexsha": "825c02ce244ce21ec4f01360dfdf90cbf92f6bde", "max_sta...
[STATEMENT] lemma MSB_eq0_D: "MSB I = 0 \<Longrightarrow> x < length I \<Longrightarrow> I ! x = {||}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>MSB I = 0; x < length I\<rbrakk> \<Longrightarrow> I ! x = {||} [PROOF STEP] unfolding MSB_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>(if ...
{"llama_tokens": 214, "file": "Formula_Derivatives_WS1S_Prelim", "length": 2}
# -*- coding: utf-8 -*- r'''This module contains a number of classes for modeling neural nets in Theano. Neural networks are really just a concise, computational way of describing a mathematical model of some data. Before getting into the models below, we'll first set up the ideas and notation that are used on this p...
{"hexsha": "725d5c280b18b1085fdb8e0d1270b24257f3ff2e", "size": 35996, "ext": "py", "lang": "Python", "max_stars_repo_path": "theanets/feedforward.py", "max_stars_repo_name": "hknerdgn/theanets", "max_stars_repo_head_hexsha": "64f9f65c3edd8a9bd74e8a414f2812b95557ff79", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np from scipy import optimize class Portfolio: def __init__(self, identifier, exp_ret, exp_vol, exp_cov, weights): self.identifier = identifier self.exp_ret = exp_ret self.exp_vol = exp_vol self.exp_cov = exp_cov self.weights = weights def portfolio_vo...
{"hexsha": "b4e6f8c75f5debb4d0ba606879e5d115b1b725b6", "size": 2580, "ext": "py", "lang": "Python", "max_stars_repo_path": "financier/portfolio.py", "max_stars_repo_name": "JakeVestal/financier", "max_stars_repo_head_hexsha": "0ace41f3b39bb2e4252cb90eeecf316767679e34", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
"""Evaluation utils for BLEU metrics.""" from collections import Counter import math import numpy as np import subprocess import sys def bleu_stats(hypothesis, reference): """Compute statistics for BLEU.""" stats = [] stats.append(len(hypothesis)) stats.append(len(reference)) for n in range(1, 5)...
{"hexsha": "af482050c2a55271554137ecaaa9913c18c748da", "size": 1984, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/bleu.py", "max_stars_repo_name": "dingchaoz/suammarize_radiology", "max_stars_repo_head_hexsha": "7964b00596ced172fd75ad977435d00eef4a8a88", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...