text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import copy import networkx as nx import os import pathlib import unittest import warnings import zipfile from networkx import DiGraph from networkx.classes.reportviews import NodeView # type: ignore from ..checksum_validator import ChecksumDiff, ValidationCode from ..parse import ( ProvDAG, UnparseableDataError...
{"hexsha": "dcd024a15543587f07aef7d988aa7bb3a0852d66", "size": 44694, "ext": "py", "lang": "Python", "max_stars_repo_path": "provenance_lib/tests/test_parse.py", "max_stars_repo_name": "ChrisKeefe/provenance_py", "max_stars_repo_head_hexsha": "1b0fe98227b11db324c49492200f7241e4405bec", "max_stars_repo_licenses": ["BSD-...
## -------->> [[file:../../nstandr.src.org::*check_standardize_options][check_standardize_options:2]] require("data.table") check_standardize_options <- nstandr:::check_standardize_options get_dots <- nstandr:::get_dots standardize_options <- nstandr:::standardize_options testing_check_arguments <- function(x, ...)...
{"hexsha": "20b939bb953c62f8f31e47e370ea478b67a44803", "size": 1661, "ext": "r", "lang": "R", "max_stars_repo_path": "inst/tinytest/test_check_standardize_options.r", "max_stars_repo_name": "stasvlasov/nstandr", "max_stars_repo_head_hexsha": "2cd418ccd2d11a45b1166a5ae7a54d9590debdc9", "max_stars_repo_licenses": ["MIT"]...
#include <iostream> //#include "snake-ai.h" #include <math.h> #include <vector> #include <deque> #include <dlib/matrix.h> #include <dlib/dnn.h> #include <thread> #include <chrono> #include <sstream> using namespace dlib; using namespace std; using input_matrix_type = matrix<double, 3, 8>; #if 0 using net_type = ...
{"hexsha": "8db4da2e74f94160239ee6ce76fbc573c8cfc7d9", "size": 2239, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "snake-ai/test.cpp", "max_stars_repo_name": "busysteve/dlib-examples", "max_stars_repo_head_hexsha": "cdf51e04b22688b8c8d27a317b9737b445e04db0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
using Dates using TimeSeries using WaterSystems DayAhead = collect(DateTime("1/1/2024 0:00:00", "d/m/y H:M:S"):Hour(1):DateTime("1/1/2024 23:00:00", "d/m/y H:M:S")) junctions = [ Junction(name="J2",elevation=20, head = 20.0, minimum_pressure=1, coordinates = (lat = 0.0,lon = 0.0)), Junction(nam...
{"hexsha": "bb1d1a8cea6caa79d2491f76ce0692ded74024e5", "size": 2256, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/data/test_system.jl", "max_stars_repo_name": "NREL/WaterSystems.jl", "max_stars_repo_head_hexsha": "9bbe1fd752b416820b957c20d47923c54789d480", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
\documentclass[a4paper,11pt,oneside,oldfontcommands]{memoir} \usepackage{mystyle2015} \usepackage{mySpecialTokens} \usepackage[en-GB,datesep={-}]{datetime2} \usepackage{longtable} %\usepackage{amssymb, setspace, rotating, titlesec, adjustbox, array, threeparttable} \usepackage{amssymb, setspace, rotating, titlesec, ad...
{"hexsha": "77bea2f0be5df13e44fa33df57756904c987eee3", "size": 14440, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "templates/pandoc-docstyle.tex", "max_stars_repo_name": "plbt5/ScrivenerTemplate4ScientficPaper", "max_stars_repo_head_hexsha": "ba6a0032d5fc4846cbbb7e68fea47d1e9e7de7ce", "max_stars_repo_licenses":...
import logging import numpy as np class Task: is_recurrent = False def load_training(self, env=None): self.load(env=env) def load_test(self, env=None): self.load(env=env, test=True) def load(self, env=None, test=False): pass def get_data(self, samples, test=False): ...
{"hexsha": "9383f294312ccd5e8d0ad9fa3268b7619b7d769e", "size": 1984, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/wann_genetic/tasks/base.py", "max_stars_repo_name": "plonerma/wann-genetic", "max_stars_repo_head_hexsha": "c4a8a1db81665b2549994d615e1d347dbe00226a", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import cv2 import pickle face_cascade = cv2.CascadeClassifier('cascades/data/haarcascade_frontalface_default.xml') recognizer = cv2.face.LBPHFaceRecognizer_create() recognizer.read("./recognizers/face-trainner.yml") labels = {"person_name": 1} with open("pickles/face-labels.pickle", 'rb') ...
{"hexsha": "6716a3636ab95127a65c21b2a96cb4e5a0081085", "size": 1626, "ext": "py", "lang": "Python", "max_stars_repo_path": "Facial Recognition/face_training.py", "max_stars_repo_name": "YT-Main/HackIR-HackOverflow", "max_stars_repo_head_hexsha": "579cac02c111b56d1462b9050ea76f3975de0c65", "max_stars_repo_licenses": ["M...
import csv import os import re from collections import defaultdict from typing import Any, Callable from datetime import date, datetime, timedelta import logging from pandas import DataFrame import pandas as pd import numpy as np from vnpy.app.cta_strategy import CtaTemplate from vnpy.app.cta_strategy.base import Engi...
{"hexsha": "735eb894cef5f68d8d9a1230472669b5436a643a", "size": 17976, "ext": "py", "lang": "Python", "max_stars_repo_path": "vnpy_pro/app/cta_strategy/template.py", "max_stars_repo_name": "caizhanjin/vnpy", "max_stars_repo_head_hexsha": "c0886dbd8eba7f506634b1700dfd09b0b098ef26", "max_stars_repo_licenses": ["MIT"], "ma...
import gym import coax import jax import jax.numpy as jnp import haiku as hk import optax # pick environment env = gym.make(...) env = coax.wrappers.TrainMonitor(env) def func_pi(S, is_training): # custom haiku function (for continuous actions in this example) mu = hk.Sequential([...])(S) # mu.shape: (batc...
{"hexsha": "e2fa3d1d4f5c47a2434052baa438601c944c12a5", "size": 2637, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/examples/stubs/td3.py", "max_stars_repo_name": "sleepy-owl/coax", "max_stars_repo_head_hexsha": "37c3e667b81537768beb25bb59d0f05124624128", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
// Copyright (c) 2018-2019 Cem Bassoy // // 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) // // The authors gratefully acknowledge the support of // Fraunhofer and Google in producing this work // which sta...
{"hexsha": "3e34047ddc4f71b890c1f5471eac763a43fb82b9", "size": 13627, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/numeric/ublas/test/tensor/test_tensor_matrix_vector.cpp", "max_stars_repo_name": "cpp-pm/boost", "max_stars_repo_head_hexsha": "38c6c8c07f2fcc42d573b10807fef27ec14930f8", "max_stars_repo_licen...
'''Download movie posters and make images from them.''' import math import os import json import shutil import argparse import unicodedata import unidecode import logging import wget import os from pathlib import Path # pillow, fork of PIL from PIL import Image, ImageFont, ImageDraw import pdb import pandas as pd impor...
{"hexsha": "696d0286ccbeded8e10df47772527812cda00a7f", "size": 23490, "ext": "py", "lang": "Python", "max_stars_repo_path": "program.py", "max_stars_repo_name": "RollingStar/movie-poster-download", "max_stars_repo_head_hexsha": "bc5f9bd2243c911018291ee1ce4bb4c8b84b593d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from mpi4py import MPI from parla.array import copy from parla.cuda import gpu from parla.cpu import cpu from parla.ldevice import LDeviceSequenceBlocked from parla.tasks import * import time def main(): comm = MPI.COMM_WORLD print(comm.Get_rank(), comm.Get_size()) a = np.random.rand...
{"hexsha": "66be576c52af8b97502f1ea05e359cd30d6a9df3", "size": 1942, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/backup/inner_mpi.py", "max_stars_repo_name": "UTexas-PSAAP/Parla.py", "max_stars_repo_head_hexsha": "3d92a156be41983e32576940ef6baffd78d4eb84", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import pandas as pd import matplotlib.pyplot as plt import numpy as np import pickle from glob import glob import os from time import sleep import subprocess def get_all_file_paths(root_dir): to_return = [] current_level_dfs = glob(f"{root_dir}/*Df.csv") if len(current_level_dfs) > 0: ...
{"hexsha": "37e1a6e2e1efb3e5af865ae0662b0105e8bd40c9", "size": 5060, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulations_folder/simulation_analysis_scripts/chi_square_adjustment_analysis.py", "max_stars_repo_name": "SIGKDD2021ANON/PaperCodeBandits", "max_stars_repo_head_hexsha": "bf1c3a6cf2de2dc81228bedb...
# TO DO: 1) clean up, thoroughly, the existing code here # 2) write enumerate_pbp, which will be handy if we use # any future models that do rely on order # get set_order is acting screwy import math import numpy as np import pandas as pd from sklearn import linear_model from sklearn.model_selection import KFold from ...
{"hexsha": "3f61d9b061b60cb66c2f07faada695bc57a8075a", "size": 24159, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/helper_functions.py", "max_stars_repo_name": "JingyaXun/tennis_match_prediction", "max_stars_repo_head_hexsha": "6278a5f5898ca68341b80ed7f069b34ed1f61eb3", "max_stars_repo_licenses": ["MI...
# Copyright 2017 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": "86a94cf5de7b8b8d014cffa6128b340e90ccfc00", "size": 18369, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/ops/signal/fft_ops.py", "max_stars_repo_name": "yage99/tensorflow", "max_stars_repo_head_hexsha": "c7fa71b32a3635eb25596ae80d007b41007769c4", "max_stars_repo_licenses": ["Apache...
import gym import numpy as np from PIL import Image import cv2 class Grayscale(gym.ObservationWrapper): def __init__(self, env, crop=True): super(Grayscale, self).__init__(env) self.observation_space = gym.spaces.Box(low=0., high=255., shape=(env.width, env.height, 1), dtype=np.uint8) def obse...
{"hexsha": "a27af0aa8bf495d6bce9c537eb28d9bd017fe695", "size": 865, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlpyt/envs/wrappers/pycolab_wrappers.py", "max_stars_repo_name": "williamd4112/curiosity_baselines", "max_stars_repo_head_hexsha": "45939f3f24c53cfff5153ef012486a6a058660be", "max_stars_repo_licens...
import numpy as np from scipy.ndimage.filters import maximum_filter, minimum_filter, uniform_filter from .. import MaskSeparationBase, SeparationException from ..benchmark import HighLowPassFilter class FT2D(MaskSeparationBase): """ This separation method is based on using 2DFT image processing for source ...
{"hexsha": "86da66e2f0419e7795a5f410fa7344bc0abcbcff", "size": 9686, "ext": "py", "lang": "Python", "max_stars_repo_path": "nussl/separation/primitive/ft2d.py", "max_stars_repo_name": "ZhaoJY1/nussl", "max_stars_repo_head_hexsha": "57aabeabca3b2e75849e1659a522e3c2f77e9172", "max_stars_repo_licenses": ["MIT"], "max_star...
# Variational Autoencoder using ASTModels type LinearLayer <: TypeWithModel W b dict::Model function LinearLayer() @expr x W::Matrix b::Vector new(W, b, Dict("inputs"=>[x], "params" => [W,b], "outputs" => [W*x + b])) end end function (m1::Model)(m2::Model) m1 = convert(Model, m1) m2 = convert(Mo...
{"hexsha": "7571f86c61e7f14ead6118921fd2ae6cf5463955", "size": 908, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/example.jl", "max_stars_repo_name": "schlichtanders/ASTModels.jl", "max_stars_repo_head_hexsha": "47207a687f5f81a59d375be3eeba17b9a38d178a", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_st...
import torch import numpy as np import logging import os import time import segmentation_models_pytorch as smp import torchvision from efficientnet_pytorch import EfficientNet from utils.data_classifier import prep_classification_data, get_augmentations from utils.train import train_model from utils.misc import upload...
{"hexsha": "a74afb9caa263f83d6f91f2c8baef26eb6a284d3", "size": 7157, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_classifier.py", "max_stars_repo_name": "o-hx/CV-Proj", "max_stars_repo_head_hexsha": "46d517f56f589a10a9670502bb4762d0612bb7e8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import numpy as np from scipy.spatial import distance as dist from matplotlib import pyplot as plt from matplotlib.animation import FuncAnimation def visualize_component_plane(X, history, Zeta1, Zeta2): Y = history.Y[-1] U1, U2 = history.U1[-1], history.U2[-1] Z1, Z2 = history.Z1[-1], history.Z2[-1] f...
{"hexsha": "e1a2dc003c2139d47b85d069949991b196de004f", "size": 4335, "ext": "py", "lang": "Python", "max_stars_repo_path": "CCP_with_Dash/component_plane.py", "max_stars_repo_name": "tanacchi/ml_scratch", "max_stars_repo_head_hexsha": "79782ece44f8e742bbc04a83c761da0851360ee5", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright 2021 Rikai Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
{"hexsha": "ab2ff85700e22708464f6b963dece48139e1d1cb", "size": 2109, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tests/types/test_video.py", "max_stars_repo_name": "chunyang/rikai", "max_stars_repo_head_hexsha": "9eb7f0da68e6c1e27e74de324afdbd8b375df0c3", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python # coding: utf-8 # In[ ]: from google.colab import drive drive.mount('/content/drive') # In[ ]: #Pre processing import cv2 import numpy as np from tqdm import tqdm import glob import re def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [ at...
{"hexsha": "0779704329ea23807d09d801cfb7f31488ab021a", "size": 8022, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/classifier.py", "max_stars_repo_name": "mesneym/Classification-Neural-Network", "max_stars_repo_head_hexsha": "4f4b6cc47cd3b4476b322ac30e21a1c72407674b", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2020, The TensorFlow Federated Authors. # Copyright 2020, Ronald Seoh # # 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 # # Unles...
{"hexsha": "49457a96c9f55630d8de2f86ec17b03eadfdcfe8", "size": 4995, "ext": "py", "lang": "Python", "max_stars_repo_path": "fedavg_client.py", "max_stars_repo_name": "ronaldseoh/BERTerated", "max_stars_repo_head_hexsha": "57a7714c0cc491400eea2342e43ff3641e8c721d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
'''Update this file in driftscan/drift/core to be able to run kltransform.py''' # === Start Python 2/3 compatibility from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * # noqa pylint: disable=W0401, W0614 from future.builtins.disabled import * # noqa pyli...
{"hexsha": "19957b368c7265f32697c528c47b0a9217403bbf", "size": 2680, "ext": "py", "lang": "Python", "max_stars_repo_path": "draco_corrcal_pipeline/driftscan/skymodel.py", "max_stars_repo_name": "UKZN-Astronomy/hirax_corrcal", "max_stars_repo_head_hexsha": "49c3627484440f433d500d5a16242aed63d1370b", "max_stars_repo_lice...
[STATEMENT] lemma Join_unless [simp]: "(F\<squnion>G \<in> A unless B) = (F \<in> A unless B & G \<in> A unless B)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (F \<squnion> G \<in> A unless B) = (F \<in> A unless B \<and> G \<in> A unless B) [PROOF STEP] by (simp add: unless_def)
{"llama_tokens": 125, "file": null, "length": 1}
import os import torch import numpy as np def get_datadir(root, dataset): if dataset == 'sun': return os.path.join(root, 'SUN') elif dataset == 'cub': return os.path.join(root, 'CUB') elif dataset == 'awa1': return os.path.join(root, 'AWA1') elif dataset == 'flo': retur...
{"hexsha": "4796c7791a86e15b26ccf6175561e07115497bf4", "size": 2884, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "twuilliam/bias-gzsl", "max_stars_repo_head_hexsha": "4471481bae0f571273c92efe6e428c59a2f5ce2b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "max_st...
import pandas as pd; import numpy as np; data = {'subject' : ['math', 'comp', 'phys', 'chem'], 'score': [100, 95, 80, 90], 'students': [87, 39, 50, 72]}; df = pd.DataFrame(data, columns = ['subject', 'score', 'students', 'class']); print(df); #df['class'] = [1,2,3,4]; df2 = df.copy(); df2.index = ['a','b','c','d']; da...
{"hexsha": "e40cc4048ed980de2c2d83a87dfea2db0e6b525b", "size": 631, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpan/pan10.py", "max_stars_repo_name": "jaywoong/python", "max_stars_repo_head_hexsha": "99daedd5a9418b72b2d5c3b800080e730eb9b3ea", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": n...
import os import wandb from box import Box from lgblkb_tools import logger, Folder import numpy as np import pandas as pd import geopandas as gpd import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from lgblkb_tools.visualize import Plotter from sklearn.model_selection import...
{"hexsha": "04403a866854e987206376402caff374ca07fe0d", "size": 7341, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/train.py", "max_stars_repo_name": "lgblkb/dm_final_project", "max_stars_repo_head_hexsha": "9f09ac731193d3749dbeb12af32ac561f828541a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Docu for profiling Cuda Code in Julia: https://cuda.juliagpu.org/stable/development/profiling/ #using BenchmarkTools using CUDA a = rand(1024,1024,100); ad = CUDA.rand(1024,1024,100); @time sin.(a) sin.(ad); println("Finished")
{"hexsha": "fd1181399c635ddf9126f442bb195624fc645204", "size": 235, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/gpu_benchmarking.jl", "max_stars_repo_name": "neuroevolution-ai/NeuroEvolution.jl", "max_stars_repo_head_hexsha": "316c0d25a4ed140715b2321abe2aa111c9fb80bd", "max_stars_repo_licenses": ["MI...
[STATEMENT] lemma cod_char: shows "cod = Cod" [PROOF STATE] proof (prove) goal (1 subgoal): 1. cod = Cod [PROOF STEP] using cod_def codomains_char codomains_char' null_char [PROOF STATE] proof (prove) using this: cod ?f = (if codomains ?f \<noteq> {} then SOME b. b \<in> codomains ?f else null) codomains ?f = (if ...
{"llama_tokens": 200, "file": "Category3_CategoryWithPullbacks", "length": 2}
import unittest import numpy as np from stattools.utils.validation import validate_samples class TestValidateSamples(unittest.TestCase): def test_one_sample(self): """Try passing a single sample to validate_samples().""" x1 = [0, 1, 2, 3, 4] x2 = [[0, 1, 2], [3, 4, 5]] x3 = 0 ...
{"hexsha": "e3f8f2b91c15ea7fe2d013a5dfb67cd8893c6b54", "size": 2554, "ext": "py", "lang": "Python", "max_stars_repo_path": "stattools/utils/test/test_validate_samples.py", "max_stars_repo_name": "artemmavrin/SLTools", "max_stars_repo_head_hexsha": "04525b5d6777be3ccdc6ad44e4cbfe24a8875933", "max_stars_repo_licenses": [...
import os import numpy as np import pandas as pd from sklearn.externals import joblib from split_clean import load_data, clean, split from sklearn.impute import SimpleImputer from sklearn.preprocessing import OneHotEncoder from sklearn.pipeline import Pipeline from sklearn.pipeline import FeatureUnion from sklearn.comp...
{"hexsha": "438843a5f741a87435d5fabd97cbcf8463676f3d", "size": 1680, "ext": "py", "lang": "Python", "max_stars_repo_path": "src-Svebolle/src/test.py", "max_stars_repo_name": "antelk/master-thesis", "max_stars_repo_head_hexsha": "521883433a0c1ac5991d7876063292b831ef734e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np class GyroErrorCompensation(): def __init__(self): self.correctedOmega = np.array([0,0,0], dtype=np.float64) self.measuredOmega = np.array([0,0,0], dtype=np.float64) self.predictedOmegaError = np.array([0,0,0], dtype=np.float64) self.calculate = True def set...
{"hexsha": "bd1d8922509a38407dd0e94698cafe17bba1d90e", "size": 847, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/redrawing/components/er_ukf_imu_modules/error_compensation.py", "max_stars_repo_name": "ReDrawing/redrawing", "max_stars_repo_head_hexsha": "20743f0c8d64d9d2e15cefa840423c9698c74653", "max_star...
\documentclass[a4paper, 11pt]{article} \input{../preamble.tex} \DeclareMathOperator{\N}{\mathbb{N}} \DeclareMathOperator{\R}{\mathbb{R}} \DeclareMathOperator{\Q}{\mathbb{Q}} \DeclareMathOperator*{\Z}{\mathbb{Z}} \title{Completeness Axiom} \begin{document} \tableofcontents \section{Power Inequality} \begin{theorem...
{"hexsha": "f2d2ac80f4116718074b2b6b0bdd94ca63a8d0b9", "size": 9314, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "analysis/lecture_2.tex", "max_stars_repo_name": "tylertownsend/mathematics", "max_stars_repo_head_hexsha": "de7732a0fffe5cc1a79752a10b0aa21672f3f413", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import math import numpy as np from pyproj import CRS from pyproj import Transformer from pyproj.exceptions import ProjError from .utils import wrap_values __all__ = ["SkyCRS", "PlateCarreeCRS", "McBrydeThomasFlatPolarQuarticCRS", "MollweideCRS", "HammerCRS", "EqualEarthCRS", "LambertAzimuthalEqualAreaCRS...
{"hexsha": "af0199f76011fcb80525a9e4bb57fd4526b114ad", "size": 12042, "ext": "py", "lang": "Python", "max_stars_repo_path": "skyproj/skycrs.py", "max_stars_repo_name": "erykoff/skyproj", "max_stars_repo_head_hexsha": "f00af06df032c6956e9ce191b55b173eb5415b3a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
from latmats.tasks.analogy_testing.data import load_analogies from latmats.pretraining.data_loader import load_file from latmats.pretraining.model import Word2VecPretrainingModel from latmats.utils import example_generator_not_material from gensim.models.keyedvectors import WordEmbeddingsKeyedVectors from mat2vec.proc...
{"hexsha": "02127d8c177426f186a29f884564e16fc532847f", "size": 2933, "ext": "py", "lang": "Python", "max_stars_repo_path": "latmats/tasks/analogy_testing/scoring.py", "max_stars_repo_name": "ardunn/latmats", "max_stars_repo_head_hexsha": "9eabbd404041cd706dac443dda18bf4809835d3b", "max_stars_repo_licenses": ["MIT"], "m...
import math from decimal import Decimal, getcontext import numpy as np import scipy.sparse as sp import scipy.sparse.linalg as LA # # Runge-Kutta IMEX methods of order 1 to 3 # class rk_imex: def __init__(self, M_fast, M_slow, order): assert np.shape(M_fast)[0] == np.shape(M_fast)[1], "A_fast must be squ...
{"hexsha": "f40067b5ca1f591d906e6931a430caf434f5c15d", "size": 15955, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySDC/implementations/problem_classes/acoustic_helpers/standard_integrators.py", "max_stars_repo_name": "brownbaerchen/pySDC", "max_stars_repo_head_hexsha": "31293859d731646aa09cef4345669eac65501...
#!/usr/bin/env python # coding: utf-8 import xml.etree.ElementTree as ET import numpy as np import matplotlib.pyplot as plt import math import sys import os class planView: def __init__(self): pass def setGeometry(self, s, x, y, hdg, length): self.s = s self.x = x self.y = y ...
{"hexsha": "7978d664c0f2a32c64c83bbe8105aabe2fdda32f", "size": 8019, "ext": "py", "lang": "Python", "max_stars_repo_path": "opendrive_viewer.py", "max_stars_repo_name": "FushimaTakesato/opendrive_viewer", "max_stars_repo_head_hexsha": "3d0b9d19ed7e02761b6ba8812fbd3df7bc318f51", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
{"hexsha": "7c723d28f0ae884579343a85ea8d8e7eecf3190a", "size": 4123, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/nntool/quantization/symmetric/kernels/resize.py", "max_stars_repo_name": "bot-motion/gap_sdk", "max_stars_repo_head_hexsha": "bd117a8a4b5384b2b889f72effbfed4f7f938a88", "max_stars_repo_licen...
import numpy as np class Bitset: """ Efficient implementation of a binary matrix. """ def __init__(self, m, n): self.inverted = False self.rows = m self.columns = n if m > n: self.inverted = True if self.inverted: n, m = m, n sel...
{"hexsha": "3c7ee796eb8e13243456bcc15cd78d20d604afba", "size": 2927, "ext": "py", "lang": "Python", "max_stars_repo_path": "bitset.py", "max_stars_repo_name": "abeagomez/nonograms_solver", "max_stars_repo_head_hexsha": "639cbeed38e755a4381eb23bbc31c3d10e52b2fc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
"""Definitions of causal structures in causal diagrams.""" import networkx as nx from oyster.utils.graph_utils import observable_nodes, observable_pairs, De def paths(DAG, X, Y, directed=False): """Return a generator of all paths in DAG from X to Y. """ def reorient_path(DAG, path_list): """Map a ...
{"hexsha": "bdd25e5c6e35592894c986a25b7643ffb2728e62", "size": 3211, "ext": "py", "lang": "Python", "max_stars_repo_path": "oyster/structures.py", "max_stars_repo_name": "BrennanBarker/oyster", "max_stars_repo_head_hexsha": "37e487fbc8cc66081dcc939de8aa05bc96dee889", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# -*- coding: utf-8 -*- """Cost predictor function for forecasting base model training and prediction cost. """ # Author: Yue Zhao <zhaoy@cmu.edu> # License: MIT import sys import os import numpy as np import pandas as pd from joblib import dump from scipy.stats import pearsonr from scipy.stats import spearmanr from ...
{"hexsha": "c5f88313dc0c9c6675d107c0bfbef41ed5feaac3", "size": 3443, "ext": "py", "lang": "Python", "max_stars_repo_path": "suod/models/cost_predictor.py", "max_stars_repo_name": "rbeauchemin/SUOD", "max_stars_repo_head_hexsha": "3a88f967a505a1f82a090c8f81b33e27594525d6", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
[STATEMENT] lemma braun_del_lo: "braun t \<Longrightarrow> braun(del_lo t)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. braun t \<Longrightarrow> braun (del_lo t) [PROOF STEP] by (cases t) (simp_all add: braun_merge)
{"llama_tokens": 91, "file": null, "length": 1}
{-# OPTIONS --cubical-compatible #-} module Common.Unit where open import Agda.Builtin.Unit public renaming (⊤ to Unit; tt to unit)
{"hexsha": "784ddb1dcc623a68a1612678765762506d32e1b5", "size": 134, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Common/Unit.agda", "max_stars_repo_name": "KDr2/agda", "max_stars_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count":...
"""Functions to read information from files. Supports UCTE format and PSSE format. For more information on UCTE format, see http://cimug.ucaiug.org/Groups/Model%20Exchange/UCTE-format.pdf For more information on PSSE format, see PSSE documentation """ import math import numpy as np import itertools import logging fro...
{"hexsha": "dfccb975c3ba27ed2cd5683d58674d12a4f0583c", "size": 24061, "ext": "py", "lang": "Python", "max_stars_repo_path": "project_code/read_grid.py", "max_stars_repo_name": "statnett/relevant_assets", "max_stars_repo_head_hexsha": "3b29c64677b63c485c09fbef14d933fe49fd7fc0", "max_stars_repo_licenses": ["Apache-2.0"],...
# This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # DEAP is distributed ...
{"hexsha": "bd8d5ef24207f74a72ea8b3489d466ed867506bf", "size": 2789, "ext": "py", "lang": "Python", "max_stars_repo_path": "helps/deap/deap-master/examples/eda/pbil.py", "max_stars_repo_name": "GrimRanger/GeneticAlgorithm", "max_stars_repo_head_hexsha": "93fa476e82d610f8622276526baa269303a058e0", "max_stars_repo_licens...
""" Self play loop for training and evaluating ai player 1. Starts self play and collects data 2. (need to implement data augmentation) 3. Uses data and train_step function on DQN to train network for better policy eval 4. Evaluates progress by comparing DQNMCTS to pure MCTS decision AI 5. Repeat 6. Profit ...
{"hexsha": "8a43c533d8e8f2041abf4171f95c72435d378bb3", "size": 8757, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/trainer.py", "max_stars_repo_name": "SirMammingtonham/alphastone", "max_stars_repo_head_hexsha": "06e633b4b750c002d2d488334aa75b292482651d", "max_stars_repo_licenses": ["Unlicense"], "max_star...
import numpy as np from numpy import linalg as la import matplotlib.pyplot as plt import matplotlib.axes as ax #matplotlib inline import psyneulink as pnl import psyneulink.core.components.functions.transferfunctions from psyneulink.core.components.functions.learningfunctions import BackPropagation nouns = ['oak', 'pi...
{"hexsha": "7cae4f3ecb4667825af225c79fdeb5f96450b887", "size": 11515, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Examples/Lena Rumelhart script.py", "max_stars_repo_name": "SamKG/PsyNeuLink", "max_stars_repo_head_hexsha": "70558bcd870868e1688cb7a7c424d29ca336f2df", "max_stars_repo_licenses": ["Apach...
# To plot distance error vs. distance # Errors are calcualted by a simple error propagation. import ebf import math import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from scipy import constants as const from FortranFile import FortranFile import struct # input parameters # for distance...
{"hexsha": "e32d29ad37a1517b6973e502437c143898bf38ad", "size": 3095, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/plotde_d.py", "max_stars_repo_name": "kawatadaisuke/galaxia_gaia", "max_stars_repo_head_hexsha": "f402887b268026d70269000dbb8fb626cb295206", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
using Test, LinearMaps, LinearAlgebra, BlockArrays @testset "Non-traditional axes" begin A = rand(ComplexF64,2,4) B = PseudoBlockMatrix{ComplexF64}(undef, [2,3], [3,4]) ax1 = axes(B)[1] ax2 = axes(B)[2] fill!(B,0) B[Block(1),Block(2)] .= A N = @inferred LinearMap(B) @test axes(N) == ...
{"hexsha": "bf0dff5973408d5d885b720471af0896166cff5b", "size": 1211, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/nontradaxes.jl", "max_stars_repo_name": "Jutho/LinearMaps.jl", "max_stars_repo_head_hexsha": "e575b5f6c866df7fe0e78088f287adbfabba001d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import pandas as pd import os import matplotlib.pyplot as plt from matplotlib.patches import Circle, Rectangle, RegularPolygon from matplotlib.patheffects import withStroke from matplotlib.ticker import AutoMinorLocator, MultipleLocator import numpy as np import json def ReadSolution(datadir, file): ''' Read a...
{"hexsha": "a82d0b60556823dae41cbca3ebdeaee853b28256", "size": 2818, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/utils.py", "max_stars_repo_name": "ojopiojo/TwoEchellon", "max_stars_repo_head_hexsha": "ca8dc66873e53b8758fc9dafb7aee517440c2851", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# Copyright 2018 Google Inc. 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 applicable law or ...
{"hexsha": "f4ccd15dfa60acae7876422e59a723e6b89bcea5", "size": 5447, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/training_mentornet/data_generator.py", "max_stars_repo_name": "mlaai/mentornet", "max_stars_repo_head_hexsha": "76d6be2db1be39714dec6db6bb3bcbb77855ce6e", "max_stars_repo_licenses": ["Apache-...
// (C) Copyright Raffi Enficiaud 2017. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. //[example_code #define BOOST_TEST_MODULE fixture_04 ...
{"hexsha": "c41d3f48be87e8a6ab4388bcc56335b2015e8f0e", "size": 1067, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "thirdparty/boost_1_71_0/libs/test/doc/examples/fixture_04.run-fail.cpp", "max_stars_repo_name": "anonymouscode1/djxperf", "max_stars_repo_head_hexsha": "b6073a761753aa7a6247f2618977ca3a2633e78a", "m...
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from scipy.special import erf # gelu/swish/softplus 对 relu 的光滑逼近 def psi(x): return 0.5 * (1 + erf(x / np.sqrt(2))) def swish(x, a=1.1702): return x / (1 + np.exp(-a * x)) def relu(x): return np.maximum(x, 0.0) def g...
{"hexsha": "b29049b6d7111bad7c833c5f48f198b654cf367b", "size": 1087, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/activations_relu_swish_gelu.py", "max_stars_repo_name": "allenwind/tf2bert", "max_stars_repo_head_hexsha": "9820223559543529d4dcc703e2742ab8fd14d58e", "max_stars_repo_licenses": ["Apache-2.0...
[STATEMENT] lemma fresh_star_Un_elim: "((as \<union> bs) \<sharp>* x \<Longrightarrow> PROP C) \<equiv> (as \<sharp>* x \<Longrightarrow> bs \<sharp>* x \<Longrightarrow> PROP C)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ((as \<union> bs) \<sharp>* x \<Longrightarrow> PROP C) \<equiv> (\<lbrakk>as \<sharp>* ...
{"llama_tokens": 670, "file": "Nominal2_Nominal2_Base", "length": 5}
using MAT using Random include("../src/HyperLocal.jl") include("../include/FlowSeed.jl") ## Read in the matrix, if it isn't read in already s = time() @time M = matread("../data/stackoverflow_answer_H.mat") LabelMatrix = M["LabelMatrix"] LabelNames = M["LabelNames"] MainLabels = M["MainLabels"] H = M["H"] order = rou...
{"hexsha": "135487f461803c6d97c17310b9fe595ec8ec6e67", "size": 6426, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Exp-Stackoverflow/Stack_LargeDelta_Experiments.jl", "max_stars_repo_name": "nveldt/HypergraphFlowClustering", "max_stars_repo_head_hexsha": "b1213c63c75ffd2ea065afe222ff282cdabc18d1", "max_stars_re...
import json import numpy as np from shapely.geometry import shape def create_toolchain(tools, aoi=None, inventory_gdf=None, anchor_image_id=None): # toolchain art for adding ndvi to a 4 band image ndvi = { "bandmath": { "b1": "b1", "b2": "b2", "b3": "b3", ...
{"hexsha": "f2c434e82e8e74bf1a43b59f787a6af732e6d4e7", "size": 2749, "ext": "py", "lang": "Python", "max_stars_repo_path": "seplanet/helpers/tools.py", "max_stars_repo_name": "BuddyVolly/seplanet", "max_stars_repo_head_hexsha": "f3f43c89fb8f6cd763fe1649c52ab3b4d403b02c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from __future__ import division import imp, os, signal, datetime, random import importData import models import numpy as np from operator import itemgetter mydir = os.path.expanduser("~/github/MicroMETE/") importS = imp.load_source('predictS', mydir + 'lognormal/predictS.py') simLogNormFile = imp.load_source('sim_logn...
{"hexsha": "e2c833338ee98c5b7145a310e6be1ffb7fb8fdaf", "size": 3901, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/generateData.py", "max_stars_repo_name": "klocey/MicroMETE", "max_stars_repo_head_hexsha": "5bac4e039be75f4528ccfd8b7ba85500a5495b96", "max_stars_repo_licenses": ["Unlicense", "MIT"], "max_...
{-# OPTIONS --cubical --safe --no-import-sorts #-} module Cubical.Data.FinSet.Binary.Small where open import Cubical.Data.FinSet.Binary.Small.Base public open import Cubical.Data.FinSet.Binary.Small.Properties public
{"hexsha": "0897a9e080d76c8cc6cf78b8efe98599d13a5ee0", "size": 219, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Data/FinSet/Binary/Small.agda", "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": ["MIT"], "...
! ! 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": "7ee2164b80d73f691855afa21835ae4ad30750cb", "size": 2625, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ccx_prool/CalculiX/ccx_2.16/src/transition.f", "max_stars_repo_name": "alleindrach/calculix-desktop", "max_stars_repo_head_hexsha": "2cb2c434b536eb668ff88bdf82538d22f4f0f711", "max_stars_repo_lice...
[STATEMENT] lemma step_augmenter_eval : assumes steph : "\<And>xs var L F \<Gamma>. length xs = var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (step var L F) (xs @ x # \<Gamma>))" assumes heuristic: "\<And>n var L F. heuristic n L F = var \<Longrig...
{"llama_tokens": 39974, "file": "Virtual_Substitution_HeuristicProofs", "length": 171}
! <calc_gammatisop_days.for - A component of the City-scale ! Chemistry Transport Model EPISODE-CityChem> !*****************************************************************************! !* !* CITY-scale CHEMistry Transport Extension !* !* Copyright (C) 2018 Matthias Steffen Karl !* !* ...
{"hexsha": "1daac4e22d35d4795be435759a75ae7888caf59b", "size": 10037, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "JPS_CITY_CHEM/citychem-1.3/preproc/uect2.3/src/calc_gammatisop_days.for", "max_stars_repo_name": "mdhillmancmcl/TheWorldAvatar-CMCL-Fork", "max_stars_repo_head_hexsha": "011aee78c016b76762eaf51...
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Muhammad Bilal Shaikh" __copyright__ = "Copyright 2021, AR-ResNetX" __license__ = "GPL" __version__ = "1.0.1" __email__ = "mbs.techy@gmail.com" __status__ = "Production" import pickle import os import torch import torch.nn as nn import torch.nn.functional as F ...
{"hexsha": "9c801c06f8c0828b7918cb6fe2f231910ed07087", "size": 7926, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "mbilalshaikh/AR-ResNetX", "max_stars_repo_head_hexsha": "2e324bc006b774d480b5de8dd229eb6c41eab136", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
using Documenter using Models using Models.TestUtils makedocs(; modules=[Models], format=Documenter.HTML(; prettyurls=false, assets=[ "assets/invenia.css", ], ), pages=[ "Index" => "index.md", "Design" => "design.md", "API" => "api.md", ...
{"hexsha": "9ca85ba1d72b24ef0eabef4e8edbef7a1e425bc0", "size": 641, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "invenia/Models.jl", "max_stars_repo_head_hexsha": "f511d0557c43d5f4cee317b16dd8114ec76010c3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
abstract type Quadcopter <: Multicopter end include("GoodarziQuadcopter.jl") include("IslamQuadcopter.jl")
{"hexsha": "4a34fbad30d4900b291c4fe13ab2a6803e83a074", "size": 108, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/environments/multicopters/quadcopters.jl", "max_stars_repo_name": "JinraeKim/FSimZoo.jl", "max_stars_repo_head_hexsha": "3409a94e4f192008bc40d0edfec24e05ae9a5dc5", "max_stars_repo_licenses": ["M...
# !/usr/bin/env python ''' =============================================================================== Interactive Image Segmentation using GrabCut algorithm. This application shows interactive image segmentation using grabcut algorithm. USAGE : python grabcut.py <filename> README FIRST: Two windows will...
{"hexsha": "4fc41a53e2fa27fa9065158f794e9e57507db844", "size": 6254, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/grabcut.py", "max_stars_repo_name": "longtengj/color_recognition", "max_stars_repo_head_hexsha": "c080d3bb9e44d5aecf17dd4061b49d2d3ccf8438", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma not_eq_newpkt_rreq [simp]: "\<not>eq_newpkt (Rreq hops rreqid dip dsn dsk oip osn sip)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> eq_newpkt (Rreq hops rreqid dip dsn dsk oip osn sip) [PROOF STEP] unfolding eq_newpkt_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> (case Rreq...
{"llama_tokens": 193, "file": "AODV_Aodv_Message", "length": 2}
import logging import numpy as np import torch.utils.data as data from torchvision import transforms from FedML.fedml_core.non_iid_partition.noniid_partition import record_data_stats, \ non_iid_partition_with_dirichlet_distribution from .dataset import PascalVocAugmentedSegmentation import data_preprocessing.pas...
{"hexsha": "ad609abdf0121d8863a8689c5d83ea66b8ebe12d", "size": 10031, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_preprocessing/pascal_voc_augmented/data_loader.py", "max_stars_repo_name": "RicardLake/FedDetection", "max_stars_repo_head_hexsha": "a4004593a4d07126447db73b98b53a7e56e0472b", "max_stars_rep...
from keras.models import load_model import cv2 import numpy as np from mtcnn.mtcnn import MTCNN cap=cv2.VideoCapture(1) detector=MTCNN() model1=load_model('mask_trained.h5') labels_dict={0:'NO MASK',1:'WITH MASK'} color_dict={1:(0,255,0),0:(0,0,255)} while True: ret,frame=cap.read() faces=detector.detect_face...
{"hexsha": "159d6baccd7bc937cd7c75aa03a705cc71942a12", "size": 999, "ext": "py", "lang": "Python", "max_stars_repo_path": "webcam.py", "max_stars_repo_name": "sd2001/Mask-Detection", "max_stars_repo_head_hexsha": "be5397020b6e9d9493a9fa65fb86c5789598bb61", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 2...
/* * File: oset.r * Contents: compl, diff, inter, union */ "~x - complement cset x." operator{1} ~ compl(x) /* * x must be a cset. */ if !cnv:tmp_cset(x) then runerr(104, x) abstract { return cset } body { register int i; struct b_cset *cp, *cpx; /* ...
{"hexsha": "1699a309a34da0690882d508de2d8a5a66f3cf3b", "size": 15526, "ext": "r", "lang": "R", "max_stars_repo_path": "src/runtime/oset.r", "max_stars_repo_name": "MatthewCLane/unicon", "max_stars_repo_head_hexsha": "29f68fb05ae1ca33050adf1bd6890d03c6ff26ad", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_coun...
Require Import RelationClasses. From Paco Require Import paco. Require Import sflib. Require Import Axioms. Require Import Basic. Require Import DataStructure. Require Import Language. Require Import Loc. Require Import Time. Require Import Event. Require Import View. Require Import Cell. Require Import Memory. Requi...
{"author": "Hughshine", "repo": "promising-comp", "sha": "bd8e0f0463c8cdec1efa69320b1e137f6450f373", "save_path": "github-repos/coq/Hughshine-promising-comp", "path": "github-repos/coq/Hughshine-promising-comp/promising-comp-bd8e0f0463c8cdec1efa69320b1e137f6450f373/src/promising/prop/Trace.v"}
### Wrapper function for TCL # # this code is adapted from: https://github.com/hirosm/TCL # # import os import numpy as np import tensorflow as tf from sklearn.decomposition import FastICA from .tcl_core import inference from .tcl_core import train_gpu as train from .tcl_eval import get_tensor, calc_accuracy from .t...
{"hexsha": "c034920aad455651101992bfc8f2055582125d1c", "size": 4621, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/tcl/tcl_wrapper_gpu.py", "max_stars_repo_name": "noahcao/icebeem", "max_stars_repo_head_hexsha": "202b0cae8d98d45428c1a08d14c07a67184e3ca6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from tqdm import tqdm import scipy.io as sio try: import emcee from scipy.interpolate import NearestNDInterpolator except: print('running without emcee') from .priors import * from .gp_sfh import * from .plotter import * from .sed_fitter import * def get_mcmc_variables(atlas): mod...
{"hexsha": "3d7cbcc95683a81cdd69dad9a9eef90661167433", "size": 3493, "ext": "py", "lang": "Python", "max_stars_repo_path": "dense_basis/mcmc.py", "max_stars_repo_name": "gbrammer/dense_basis", "max_stars_repo_head_hexsha": "ebb5d143caf66fcd716af5c0fb2cc56c7618d516", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma ldrop_enat [code]: "ldrop (enat n) xs = ldropn n xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ldrop (enat n) xs = ldropn n xs [PROOF STEP] proof(induct n arbitrary: xs) [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>xs. ldrop (enat 0) xs = ldropn 0 xs 2. \<And>n xs. (\<And>xs. ldro...
{"llama_tokens": 525, "file": "Coinductive_Coinductive_List", "length": 5}
from pytorch_lightning.callbacks import ModelCheckpoint import os import argparse import gc import datetime import numpy as np import pandas as pd import numpy as np import torch import pytorch_lightning as pl from lightning_module import LitModel from pytorch_lightning.loggers.tensorboard import TensorBoardLogger S...
{"hexsha": "dc3e763df04a4f1aae6cd921dbcf2190d66b2708", "size": 3827, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "hyllios/dftb_jax", "max_stars_repo_head_hexsha": "035058d8c0aac4ef610f5ef82afcdadc6d2fdab9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, ...
### ### Bitparallel ### """ A generator for efficient bitwise sequence operations. """ function compile_bitpar(funcname::Symbol; arguments::Tuple = (), init_code::Expr = :(), head_code::Expr = :(), body_code::Expr ...
{"hexsha": "5b8df173757d0cc9ae63fb924301188709f7585f", "size": 8571, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/bit-manipulation/bitpar-compiler.jl", "max_stars_repo_name": "cjprybol/BioSequences.jl", "max_stars_repo_head_hexsha": "01fbc26dc6209e86ec13cdee5f8598469e98ff35", "max_stars_repo_licenses": ["M...
import time from os.path import exists import scipy.io import scipy.stats from joblib import Parallel from joblib import delayed from tqdm import trange from experiments.exp_setup import SDCIT_RESULT_DIR, PARALLEL_JOBS from experiments.exp_utils import * from sdcit.kcipt import c_KCIPT from sdcit.utils import * def...
{"hexsha": "714bd64470c5e853b887436c89603bf694052f5a", "size": 3277, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/run_KCIPT.py", "max_stars_repo_name": "sanghack81/SDCIT", "max_stars_repo_head_hexsha": "00d060dde733fde9345154a494f81e97fb395ca7", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
module MakeFshared export printout, calc, foo, moo import Libdl const depsjl_path = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") if !isfile(depsjl_path) error("shared library not installed properly; run Pkg.build(\"MakeFshared\"), restart Julia, and try again.") end include(depsjl_path) function __ini...
{"hexsha": "158679448206ecf30028cd934bb2e8c09dbf7316", "size": 775, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/MakeFshared.jl", "max_stars_repo_name": "mkatase/MakeFshared.jl", "max_stars_repo_head_hexsha": "13579407ff946a9e8431a5d5276fe2a98dce5532", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python import glob import numpy as np import astropy.io.fits as fits from scipy import optimize import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['font.family'] = 'Times New Roman' mpl.rcParams['font.size'] = '15' mpl.rcParams['mathtext.default'] = 'regular' #mpl.rcParams['xtick....
{"hexsha": "0ffce1f868d438ff44970325c66e9bbff612e4f2", "size": 4736, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/181116/plot_random_check.py", "max_stars_repo_name": "tenoto/giantradiopulse", "max_stars_repo_head_hexsha": "77a0035c1950020daeaac4509e40288c91e8beb0", "max_stars_repo_licenses": ["MIT"], ...
using Distances type KMeans centers::Matrix{Float64} clusters::Vector{Int64} end function fit(::Type{KMeans}, X::Matrix{Float64}, k=5, n_iter=20) centers = X[:, randcycle(size(X)[2])[1:k]] closest = zeros(Int64, size(X)[2]) dists = zeros(size(X)[2], k) for i=1:n_iter pairwise!(dists,S...
{"hexsha": "ff23d9e1b72eb9b816499598ca97cef3ac4df0f5", "size": 531, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/clustering/kmeans.jl", "max_stars_repo_name": "mathewlee11/ML.jl", "max_stars_repo_head_hexsha": "997bd211c4b9f94fe6993d578fd81d6eb5106981", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma fv_delete_subset: "fv (delete v \<Gamma>) \<subseteq> fv \<Gamma>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fv (delete v \<Gamma>) \<subseteq> fv \<Gamma> [PROOF STEP] using fresh_delete [PROOF STATE] proof (prove) using this: ?a \<sharp> ?\<Gamma> \<Longrightarrow> ?a \<sharp> delete ?v ?\...
{"llama_tokens": 274, "file": "Launchbury_AList-Utils-Nominal", "length": 3}
import os from tensorflow.keras.layers import Dropout, Concatenate, BatchNormalization from tensorflow.keras.layers import LeakyReLU, Conv2DTranspose, ZeroPadding2D from tensorflow.keras.layers import Dense, Reshape, Flatten, ReLU from tensorflow.keras.layers import Input, Conv2D from tensorflow.keras import Model from...
{"hexsha": "71a5a9e7e74742da298216fb3eb482425f457712", "size": 24150, "ext": "py", "lang": "Python", "max_stars_repo_path": "simplegan/gan/cyclegan.py", "max_stars_repo_name": "grohith327/EasyGAN", "max_stars_repo_head_hexsha": "cbbff0283eda08f2d056215574f798e976d3ece0", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# -*- coding: utf-8 -*- # Author: Arthur Imbert <arthur.imbert.pro@gmail.com> # License: BSD 3 clause """ Functions used to read data from various sources and store them in a multidimensional tensor (numpy.ndarray). """ import mrc import warnings import numpy as np import pandas as pd from skimage import io from .u...
{"hexsha": "20d56540f261de221072435a771555a192cd8390", "size": 12866, "ext": "py", "lang": "Python", "max_stars_repo_path": "bigfish/stack/io.py", "max_stars_repo_name": "4DNucleome/big-fish", "max_stars_repo_head_hexsha": "5512b6e3274872793ef4365a6dc423c72add91f9", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import os import io import cv2 import time import glob import base64 import numpy as np from celery import Celery from functools import reduce from datetime import datetime, timedelta from importlib import import_module from picamera.array import PiRGBArray from picamera import PiCamera from dotenv import load_dotenv f...
{"hexsha": "e5e16726d3d5096f9901220fa01f923ff58dda2e", "size": 6881, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/camera_pi.py", "max_stars_repo_name": "violenil/object-detection", "max_stars_repo_head_hexsha": "3bdd271ed6254aefe17983ad3b3b684b9873ceb1", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Author: Mathieu Blondel # License: Simplified BSD import pathlib as path import numpy as np from tslearn.metrics import dtw, dtw_path from tqdm import tqdm from modules.barycenter import sdtw_barycenter from modules.barycenter import gfsdtw_barycenter from auxiliary.dataset import load_ucr import time import fsdtw im...
{"hexsha": "288c0747456131d909db9382e1cf70d0720a6f3b", "size": 2891, "ext": "py", "lang": "Python", "max_stars_repo_path": "barycenter.py", "max_stars_repo_name": "actcwlf/gdtw_exp", "max_stars_repo_head_hexsha": "17d80a0e02ecce081ae4d4c1c3c3d779a844ceec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_...
import time import tensorflow as tf from tflite_support import flatbuffers from tflite_support import metadata as _metadata from tflite_support import metadata_schema_py_generated as _metadata_fb from keras_vggface import VGGFace from keras_vggface.preprocessing import create_preprocessing_model from keras_vggface.st...
{"hexsha": "08ac6c20e52fce2f62a98209a0a3938678566b5c", "size": 10970, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_vggface/android_model_creation.py", "max_stars_repo_name": "popsa-hq/keras-vggface", "max_stars_repo_head_hexsha": "ed40b687c1669a2aed2f216dd5670520c0a9a08f", "max_stars_repo_licenses": ["M...
import pickle import os.path as osp import os import glob import pickle import gzip import numpy as np from gym.envs.mujoco.mujoco_env import MujocoEnv from serializable import Serializable from softlearning.misc.utils import PROJECT_PATH from softlearning.environments.helpers import random_point_in_circle class Pus...
{"hexsha": "86c67983f661aa9d3a001c1d23a25d14743d786d", "size": 4259, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiworld/envs/mujoco/pusher2d_test.py", "max_stars_repo_name": "justinvyu/multiworld", "max_stars_repo_head_hexsha": "df54462ef373155ad34a1f9c84f26adbff1a49c1", "max_stars_repo_licenses": ["Apac...
# Copyright 2017 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": "e5773cb82e5db2f88dab8a836dd9ce63527d5a05", "size": 13193, "ext": "py", "lang": "Python", "max_stars_repo_path": "framework-integration/openvino-dev-latest/openvino-tensorflow/object-detection/object_detection_sample_video_image.py", "max_stars_repo_name": "intel/intel-devcloud-samples", "max_stars_repo_head...
# Databricks notebook source import os import pandas as pd import numpy as np from pyspark import SparkConf, SparkContext from pyspark.sql import SparkSession, SQLContext from pyspark.sql.types import * import pyspark.sql.functions as fn from pyspark.sql.functions import col, udf # COMMAND ---------- year1 = (spark.r...
{"hexsha": "24b2d9b05d1def587fbb26a8505b90d5ea903200", "size": 18863, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/Users/disha.goel@rhsmith.umd.edu/Mortality_bigdata.py", "max_stars_repo_name": "manav28/cdc-insights", "max_stars_repo_head_hexsha": "0e31f63a88abdf27935452f61ba6dd0943bfc06a", "max_sta...
#include <elle/bytes.hh> #include <cmath> #include <boost/algorithm/string/case_conv.hpp> #include <elle/err.hh> #include <elle/printf.hh> #include <elle/unreachable.hh> namespace elle { std::string human_data_size(double bytes, bool si) { // FIXME: use Boost instead. // http://www.boost.org/doc/libs/...
{"hexsha": "2e795fd172f1f68878003140e0978214c0cf177e", "size": 2609, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/elle/bytes.cc", "max_stars_repo_name": "wk8/elle", "max_stars_repo_head_hexsha": "a66d3c0aeca86bcd13ec14d3797edc660b2496fc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 521.0, "...
from __future__ import annotations import logging import os import pickle from collections import Counter from functools import partial from itertools import groupby from operator import itemgetter from typing import Any, Dict, Iterator, List, Optional, Tuple import click import h5py import numba import numpy as np f...
{"hexsha": "04a06586ae37b9b7d1e1d5c65267fbcf9dce6758", "size": 23171, "ext": "py", "lang": "Python", "max_stars_repo_path": "skelshop/cmd/iden/clus.py", "max_stars_repo_name": "cstenkamp/skelshop", "max_stars_repo_head_hexsha": "6f4b26e28d4aa1050c8c3c15edd39ae072baca54", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" The following variables must be set in the session before running the script. Arguments: Xm (float array): X position of the spots in LOCOS coordinates Ym (float array): Y posiition of the spots in LOCOS coordinates phi_max (float): phi_max*pi is the max phase delay of the pattern reached at th...
{"hexsha": "2435c46a7ed3e078316262002dc279a6fb5020bf", "size": 1736, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pattern_labview_session_script.py", "max_stars_repo_name": "multispot-software/LCOS_LabVIEW", "max_stars_repo_head_hexsha": "bbf5653203bb734d1d2d1b31c7f65f309545de7a", "max_stars_repo_licen...
\documentclass[11pt]{article} \usepackage{texyousei} \usepackage{tabularx} \lhead{} \chead{The Tangent-Point Energy} \rhead{} \usepackage{comment} \excludecomment{oops} \setlength{\leftmargini}{0.3in} \DeclarePairedDelimiter{\inner}{\langle}{\rangle} \newcommand{\ddx}{\frac{d}{dx}} \newcommand{\ddy}{\frac{d}{dy}} ...
{"hexsha": "c6ba6cf80acddb1a6c5aa49d086bceb38c8984ea", "size": 3661, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes/sobolev.tex", "max_stars_repo_name": "Conrekatsu/repulsive-surfaces", "max_stars_repo_head_hexsha": "74d6a16e6ca55c8296fa5a49757c2318bea62a84", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#NOTE: This requires manual task of sorting the data as per the (YrSold, MoSold). we have said the files as train4TS.csv and test4TS.csv import pandas as pd import numpy as np from scipy.stats import skew import xgboost as xgb from sklearn.cross_validation import KFold from sklearn.ensemble import ExtraTreesRegressor ...
{"hexsha": "0f0226aacbaafd962906b09bff987984b9acf6ab", "size": 3387, "ext": "py", "lang": "Python", "max_stars_repo_path": "housingPricePredictions_using_TIME_SERIES_ANALYSIS.py", "max_stars_repo_name": "syeddabeer/machineLearningDataSc", "max_stars_repo_head_hexsha": "1fe1e1fdb76bd7fe6818949fdf4cc62563b39e0e", "max_st...
function [B, tau] = mex_dgeqrf(A) % B = mex_dgeqrf(A) % % Interface to LAPACK's DGEQRF function. % Upper part of B is the triangular factor. % % 6-December 2009, Version 1.3 % Copyright (C) 2009, Haim Avron and Sivan Toledo.
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/25241-blendenpik/blendenpik/mex_dgeqrf.m"}
import numpy as np import pandas as pd # type:ignore import matplotlib.pyplot as plt # type:ignore import tensorflow as tf # type:ignore def plot_all(df, measure, prediction, lim): x2_values = pd.unique(df['gp']) x3_values = pd.unique(df['rp']) _, axs = plt.subplots(len(x2_values),len(x3_values)) for s...
{"hexsha": "dc4ea12a1df84bf6460d37e2c68d309d57133460", "size": 3496, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulator/firing_models/tf_fit.py", "max_stars_repo_name": "truher/FRC2022", "max_stars_repo_head_hexsha": "fb8a39d0212e8460669feb282f8b9977f17fdd93", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import h5py from pdb import set_trace def load_continuous_dataset(filepath): with h5py.File(filepath, 'r') as fh: data_train = fh['train'][:] data_valid = fh['valid'][:] data_test = fh['test'][:] return data_train, data_valid, data_test def load_data(options): ...
{"hexsha": "7d5bd1340b357454fdac9364d8f5b93555c76825", "size": 526, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment/loaders/miniboone.py", "max_stars_repo_name": "LeonDong1993/TractableDE-ContCNet", "max_stars_repo_head_hexsha": "30e050eeef802308f4124bf56a161bae7f2e11c4", "max_stars_repo_licenses": ["...
import os import pytest import numpy as np from parsevasp.eigenval import Eigenval compare_bands = np.array([[[-1.439825, 2.964373, 2.964373, 2.964373, 7.254542, 7.254542, 7.254542, 11.451811, 11.670398, 11.670398]]]) compare_kpoints = np.array([[0.25, 0.25, 0.25, 1.0]]) compare_metadata = {0: [4, 4, 1, 1], 1: [16.484...
{"hexsha": "2fa91fa39102104581500be94870c3640cd58c00", "size": 1734, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_eigenval.py", "max_stars_repo_name": "lan496/parsevasp", "max_stars_repo_head_hexsha": "7b39b9936d9ef5435aba5f09d018a4da095d8a68", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import os import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from tensorflow.keras.models import Model, save_model from tensorflow.keras.layers import LSTM, Dense, BatchNormalization, concatenate, Input from utils import plot_figures class SingleDayNetwork: def _...
{"hexsha": "0ba09f04e4e9bc09b98f4d7649b2a99c16e855d1", "size": 7820, "ext": "py", "lang": "Python", "max_stars_repo_path": "single_day_network.py", "max_stars_repo_name": "toanquachp/dl_stock_prediction", "max_stars_repo_head_hexsha": "9f45c3515fdff71c0365d0dd4c7fe6348b981f5b", "max_stars_repo_licenses": ["Apache-2.0"]...
from __future__ import absolute_import, division, print_function import csv import logging import os import sys import numpy as np from io import open from seq_utils import * #set_type = test #data_dir = ./data/laptop14 def _get_all_tags(data_dir, set_type, tagging_schema): examples = [] print("data_dir =...
{"hexsha": "98e0d483bbfb68e0e290dc9b86a1ec8a330301bd", "size": 1749, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_analysis.py", "max_stars_repo_name": "Worien/BERT-E2E-ABSA", "max_stars_repo_head_hexsha": "36cc6ae5e9d5bb8817cd5521f95013538c1244a5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...