text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma [simp]: "eff i P pc et None = []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. eff i P pc et None = [] [PROOF STEP] (*<*) [PROOF STATE] proof (prove) goal (1 subgoal): 1. eff i P pc et None = [] [PROOF STEP] by (simp add: Effect.eff_def)
{"llama_tokens": 115, "file": "JinjaDCI_Compiler_TypeComp", "length": 2}
from . import common import sys import os def show_cpu_features(): from numpy.lib.utils import _opt_info info = _opt_info() info = "NumPy CPU features: " + (info if info else 'nothing enabled') # ASV wrapping stdout & stderr, so we assume having a tty here if 'SHELL' in os.environ and sys.platform ...
{"hexsha": "7b9f1d3e688d4206e9d7de31f618fc71f86a5736", "size": 1866, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/benchmarks/__init__.py", "max_stars_repo_name": "iam-abbas/numpy", "max_stars_repo_head_hexsha": "2fb5e969fded3cd468f2ca01d5b954c953545dd9", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import sys from pyspark import SparkConf, SparkContext import re import numpy as np # Load and parse the data def parseToFrom(line): data = line.split(":") pageTo = int(data[0]) # check if data[1] is empty if not data[1]: inLinksNum = 0 else: # use unique links in data[1] l...
{"hexsha": "916d5fd102afc1c510445d561655e0f19727f774", "size": 3191, "ext": "py", "lang": "Python", "max_stars_repo_path": "part4-SimRank PageRank/wez311_task2.py", "max_stars_repo_name": "weizh888/mining-massive-dataset", "max_stars_repo_head_hexsha": "d98891023a8a38db5c52512607587a47d7145920", "max_stars_repo_license...
module Data.JSON.ToString import Data.JSON.Value import Data.Scientific -- TODO: check if this is working correctly! private isControlChar : Char -> Bool isControlChar c = or [ cast c >= (0*1) && cast c <= (15*1 + 1*16) , cast c == (15*1 + 7*16) , cast c == (5*1 + 8*16) ] -- TODO: this nice escaped v...
{"hexsha": "9a9d54d48929f58dc279555512f7c059994d857e", "size": 2599, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "src/Data/JSON/ToString.idr", "max_stars_repo_name": "jumper149/idris-json", "max_stars_repo_head_hexsha": "82543f1135011d0ac70a6fcd8f1eb70e1eb40fd4", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
"""Simple loader class that reads any of Carl Olsson's datasets from a folder on disk. Authors: John Lambert """ import glob import os from pathlib import Path from typing import Optional import numpy as np from gtsam import Cal3Bundler, Pose3, Rot3 from scipy.io import loadmat import gtsfm.utils.io as io_utils fro...
{"hexsha": "fe9af4a775eafe82522940803cfbf5fbe4400df7", "size": 5576, "ext": "py", "lang": "Python", "max_stars_repo_path": "gtsfm/loader/olsson_loader.py", "max_stars_repo_name": "PratyushaMaiti/gtsfm", "max_stars_repo_head_hexsha": "0d03dca0b6fb9293c9a3fb619a2141903168269a", "max_stars_repo_licenses": ["Apache-2.0"], ...
%% build_system % Build a system to solve by MaxwellFDFD. %%% Syntax % [osc, grid3d, s_factor_cell, eps_cell, mu_cell, J_cell] = build_system(ge, OSC, DOM, OBJ, SRC, [progmark]) % [..., obj_array, src_array, mat_array] = build_system(ge, OSC, DOM, OBJ, SRC, [pragmark]) % [..., eps_node_array, mu_node_array] = build...
{"author": "wsshin", "repo": "maxwellfdfd", "sha": "f7d583813781694c8a6f0533a91f56c2a78a9ee5", "save_path": "github-repos/MATLAB/wsshin-maxwellfdfd", "path": "github-repos/MATLAB/wsshin-maxwellfdfd/maxwellfdfd-f7d583813781694c8a6f0533a91f56c2a78a9ee5/io/build_system.m"}
from IPython import embed import numpy from synospec.etc.source import OnSkyMoffat, OnSkyGaussian def test_moffat(): fwhm = 0.7 beta = 3.5 sampling = 0.05 size = 5. gau = OnSkyGaussian(fwhm, sampling=sampling, size=size) mean_gau_x = numpy.sum(gau.data*gau.X)/numpy.sum(gau.data) mean_g...
{"hexsha": "8fcec1f11019a613c55301328004151bd64c33d2", "size": 1360, "ext": "py", "lang": "Python", "max_stars_repo_path": "synospec/tests/test_source.py", "max_stars_repo_name": "kbwestfall/synospec", "max_stars_repo_head_hexsha": "1b882b3834b957a14a511db091421166ac24abfb", "max_stars_repo_licenses": ["BSD-3-Clause"],...
#!/usr/bin/env python # coding: utf-8 # ## First Impressions Bayesian Deep Learning # # #### How does Laplace Approximation work in determining accuracy of facial impressions? # In[1]: #import libraries import pandas as pd import numpy as np import os import tensorflow as tf import cv2 import glob as glob from PI...
{"hexsha": "fbf529e9bc69c2b8e5239f3cfa57fc82239f87d4", "size": 6437, "ext": "py", "lang": "Python", "max_stars_repo_path": "FMRI and First Impressions(1).py", "max_stars_repo_name": "markhinds/research", "max_stars_repo_head_hexsha": "bcfb07e4809f8d4b12e9f663d91a82252372737d", "max_stars_repo_licenses": ["MIT"], "max_s...
# Copyright 2020 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": "f7ab34aed3bdfb95a40ac27ff8b3e09a33e12b43", "size": 11486, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/keras/layers/einsum_dense_test.py", "max_stars_repo_name": "yage99/tensorflow", "max_stars_repo_head_hexsha": "c7fa71b32a3635eb25596ae80d007b41007769c4", "max_stars_repo_license...
import numpy as np import matplotlib.pyplot as plt from skimage import io import cv2 def equalize(img): x_max = img.max() s = img.size h = np.zeros(256) for i in range(256): h[i] = np.count_nonzero(img == i) out = np.zeros_like(img) for i in range(256): out[img == i] = x_max /...
{"hexsha": "f195fd9e8478f7feba81149ce730312509b545c6", "size": 677, "ext": "py", "lang": "Python", "max_stars_repo_path": "answers/question23.py", "max_stars_repo_name": "Yamahitsuji/Gasyori100knock", "max_stars_repo_head_hexsha": "62b3f776124c25dfb36e45a647d573b36b45d2b1", "max_stars_repo_licenses": ["MIT"], "max_star...
# Module for running CNN-BiLSTM vad model, # may also be run directly as a script # Author: Nick Wilkinson 2021 import argparse import os import numpy as np import pandas as pd import tensorflow as tf from typing import Tuple from tensorflow.keras import models from voxseg import utils from scipy.signal import medfilt ...
{"hexsha": "f73c8bb84783e010fba58c16673e44bb4d95fadd", "size": 10126, "ext": "py", "lang": "Python", "max_stars_repo_path": "voxseg/run_cnnlstm.py", "max_stars_repo_name": "NickWilkinson37/voxseg", "max_stars_repo_head_hexsha": "6402a67c0b4ee68115070b6aa870199d1f43c5a2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/* * @Description: velocity 数据 * @Author: Ren Qian * @Date: 2019-07-17 18:27:40 */ #ifndef LIDAR_LOCALIZATION_SENSOR_DATA_VELOCITY_DATA_HPP_ #define LIDAR_LOCALIZATION_SENSOR_DATA_VELOCITY_DATA_HPP_ #include <deque> #include <Eigen/Dense> namespace lidar_localization { class VelocityData { public: struct Li...
{"hexsha": "0fe5d1f5d972b390e9652b00feb75b7eb680eebb", "size": 819, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "LiDAR-SLAM/03-mapping-and-matching/src/lidar_localization/include/lidar_localization/sensor_data/velocity_data.hpp", "max_stars_repo_name": "lanqing30/SensorFusionCourse", "max_stars_repo_head_hexsha...
import asyncio import binascii from dataclasses import asdict, dataclass import io import json from pathlib import Path from aiohttp import web from aiohttp_index import IndexMiddleware import numpy as np from PIL import Image MODULE_DIR = Path(__file__).parent.resolve() STATIC_PATH = MODULE_DIR / 'web_static' @da...
{"hexsha": "69a94137ff3cff083d6ca4f5d7c1cda21ba6f304", "size": 3088, "ext": "py", "lang": "Python", "max_stars_repo_path": "web_interface.py", "max_stars_repo_name": "Alienvlg/style_transfer", "max_stars_repo_head_hexsha": "9ec69db05a2522da7e4c88b2a50d8392e2b2e958", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
[STATEMENT] lemma (in is_functor) cat_cf_obj_comma_is_arrI[cat_comma_cs_intros]: assumes "b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>" and "ABF = [A, B, F]\<^sub>\<circ>" and "A = [a, 0, f]\<^sub>\<circ>" and "B = [a', 0, f']\<^sub>\<circ>" and "F = [g, 0]\<^sub>\<circ>" and "g : a \<mapsto>\<^...
{"llama_tokens": 1640, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Comma", "length": 8}
######################### ######## Imports ######## ######################### import matplotlib.pyplot as plt import numpy as np import json import random import networkx as nx ######################### ####### Constants ####### ######################### WEIGHT_MIN_DEFAULT = 0 WEIGHT_MAX_DEFAULT = 10 NUM_NODES_DEFAU...
{"hexsha": "d0e90be64b805d21c2db04dae71300d2fda43237", "size": 6494, "ext": "py", "lang": "Python", "max_stars_repo_path": "generator.py", "max_stars_repo_name": "parmita52/graph-generator", "max_stars_repo_head_hexsha": "670d018d2694778f25c4ee2fa052fc8b33f819b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright (c) 2020 NVIDIA Corporation. All rights reserved. # This work is licensed under a NVIDIA Open Source Non-commercial license import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.modules.utils as utils from torch.utils.checkpoint import ch...
{"hexsha": "2b8796b9f1b3d53f78d5d1a46f6b8d89a4466598", "size": 10987, "ext": "py", "lang": "Python", "max_stars_repo_path": "conv-tt-lstm/code_opt/utils/convlstmcell.py", "max_stars_repo_name": "kidrabit/Data-Visualization-Lab-RND", "max_stars_repo_head_hexsha": "baa19ee4e9f3422a052794e50791495632290b36", "max_stars_re...
# Author: Vincent Arel-Bundock # Contact: varel@umich.edu # License: BSD-3 # Original code from the python statsmodels project # https://github.com/statsmodels/statsmodels function qreg_coef(y, X::Matrix, q::Real, method::IRLS) n, p = size(X) xstar = copy(X) diff = Inf beta0 = zeros(p) beta = zer...
{"hexsha": "9ad5b37b1452f0f637565d4f1d0bd0bde6fb83f7", "size": 1239, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/IRLS.jl", "max_stars_repo_name": "andreasnoack/QuantileRegressions.jl", "max_stars_repo_head_hexsha": "581981d0ee599c43cad8c3917f39018f2ef12720", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import os.path import shutil import unittest import warnings from abc import ABC, abstractmethod from typing import Any, Callable, Dict, Optional, Type, Union import fsspec import numpy as np import xarray as xr import xcube.core.mldataset from test.s3test import MOTO_SERVER_ENDPOINT_URL from test.s3test import S3Tes...
{"hexsha": "c35cf5e7374172c16dbf0cb5e4a787364cc00476", "size": 15411, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/core/store/fs/test_registry.py", "max_stars_repo_name": "bcdev/xcube", "max_stars_repo_head_hexsha": "9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3", "max_stars_repo_licenses": ["MIT"], "max_star...
using Test using Bigsimr using LinearAlgebra using Distributions @testset "Correlation Functions" begin r_negdef = [ 1.00 0.82 0.56 0.44 0.82 1.00 0.28 0.85 0.56 0.28 1.00 0.22 0.44 0.85 0.22 1.00 ] @testset "Nearest positive definite correlation matrix" begin r = ...
{"hexsha": "44ea4535361dbaeb7325d95b3c7e97982cd1f262", "size": 8181, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Correlation.jl", "max_stars_repo_name": "adknudson/MvSim.jl", "max_stars_repo_head_hexsha": "6c3085289a5e23441f5f0db90f2b3cbbb9b49afc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
#!/usr/bin/env python import sys import os import cv2 import numpy as np import matplotlib.pyplot as plt import argparse from matplotlib.patches import Rectangle from sklearn.cluster import KMeans from collections import Counter import math from anti_instagram.calcLstsqTransform import calcTransform from anti_instagram...
{"hexsha": "c8ba72a1780db77ffdff49350ee858c429118054", "size": 18485, "ext": "py", "lang": "Python", "max_stars_repo_path": "catkin_ws/src/10-lane-control/anti_instagram/sandbox/KMeansTrialczuidema.py", "max_stars_repo_name": "johnson880319/Software", "max_stars_repo_head_hexsha": "045894227f359e0a3a3ec5b7a53f8d1ebc06a...
# from fairseq.data import BertDictionary import os import torch import math import numpy as np import logging import itertools from fairseq import search, utils from fairseq.tasks import register_task from fairseq.tasks.translation import TranslationTask from fairseq.data import ( AppendTokenDataset, ConcatD...
{"hexsha": "da121e9daa82b6144ae5304ad550de126d04b79a", "size": 18238, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/translation_segment2.py", "max_stars_repo_name": "a414351664/TRAB-IKE", "max_stars_repo_head_hexsha": "3dd07221e1854c974127d7f6d0d95779a25166c0", "max_stars_repo_licenses": ["MIT"], "max_star...
# Copyright 2020 - 2021 MONAI Consortium # 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": "683cd600bce3888a3749e6eab575bfff6c8ae02a", "size": 9533, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/deepedit/test_transforms.py", "max_stars_repo_name": "IntroAI-termproject/MONAILabel", "max_stars_repo_head_hexsha": "6a0fcc797e24aff1a1582088bae71973b2b6582e", "max_stars_repo_licenses...
from functools import partial from typing import Optional, Dict import datasets import numpy as np import pytorch_lightning as pl import torch from torch.utils.data import DataLoader, RandomSampler, SequentialSampler from transformers import BertTokenizerFast from rouge_score import rouge_scorer class RACEDataModule...
{"hexsha": "f367ba802002656eb97a937ba79702a116d026d6", "size": 5244, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/RACEDataModuleForTinyChoice.py", "max_stars_repo_name": "iamNCJ/bert-race-pytorch-lightning", "max_stars_repo_head_hexsha": "93abcc5d5c80790e16114fb021870593cb60f1f2", "max_stars_repo_license...
# Copyright 2016-2020 The Van Valen Lab at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License");...
{"hexsha": "e89fc800a73404a1babfdd27c80afa283b42f0eb", "size": 13796, "ext": "py", "lang": "Python", "max_stars_repo_path": "caliban_toolbox/reshape_data_test.py", "max_stars_repo_name": "vanvalenlab/deepcell-data-engineering", "max_stars_repo_head_hexsha": "a0dca3839f341841cb4a983923fd0eac21225736", "max_stars_repo_li...
[STATEMENT] lemma max_depth_0: "max_depth \<phi> = 0 = (\<exists>n. \<phi> = Atom n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (max_depth \<phi> = 0) = (\<exists>n. \<phi> = Atom n) [PROOF STEP] by (cases \<phi>) auto
{"llama_tokens": 101, "file": "Abstract_Completeness_Propositional_Logic", "length": 1}
import json import os import numpy as np from utils.FScore import F1Score from Identification.LoadDescriptors import loadDescriptors from Identification.PreprocessingDescriptors import preprocessDescriptors from Identification.svm import trainSVM __author__ = 'andres' format_extension = '.json' # DescribeSounds.get...
{"hexsha": "47d75ed17ff3c0867ac44ebbbe8a718bb17ff056", "size": 1884, "ext": "py", "lang": "Python", "max_stars_repo_path": "Evaluation/testNewSounds.py", "max_stars_repo_name": "andimarafioti/AIAMI", "max_stars_repo_head_hexsha": "37ea2bf61e85bf879a0f4a1014f2e93b87301582", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Predicting the good/bad classification of depth pixels, based solely on the current view. This network returns the depth estimate and the trust both. """ import math import numpy as np import torch from experiment_handler import ExperimentHandler from network_architectures.network import Network, UNet class Dept...
{"hexsha": "4e44d931f367626d0ad2be7fee437d11bcfe03bc", "size": 1951, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/network_architectures/DepthMapInitialTrust.py", "max_stars_repo_name": "simon-donne/defusr", "max_stars_repo_head_hexsha": "fa4275070af4024eea128e99d7c6df2358d129a5", "max_stars_repo_licenses...
from keras.models import Sequential from keras.layers import Dense import numpy as np import sys, os, string characters = string.printable char_indices = dict((c, i) for i, c in enumerate(characters)) indices_char = dict((i, c) for i, c in enumerate(characters)) INPUT_VOCAB_SIZE = len(characters) WINDOW_SIZE = 3 def...
{"hexsha": "6b6e0f1ba0c385b1e103e98d11457bf825b6f3b7", "size": 2646, "ext": "py", "lang": "Python", "max_stars_repo_path": "39-sliding-window/tf-39.py", "max_stars_repo_name": "cyyeh/exercises-in-programming-style", "max_stars_repo_head_hexsha": "70c4c3a346c77eb207c247b8c717d490099cce4f", "max_stars_repo_licenses": ["M...
library(grid) library(extrafont) library(extrafontdb) library(ggthemes) font_import() loadfonts(device = "win") theme_Publication <- function(base_size=14, base_family="Arial") { (theme_foundation(base_size=base_size, base_family=base_family) + theme(plot.title = element_text(face = "bold", ...
{"hexsha": "f54266cdc64eb284bb10e536842591308dcfaf3c", "size": 1984, "ext": "r", "lang": "R", "max_stars_repo_path": "Raw data/publication_theme.r", "max_stars_repo_name": "tshalev/WRC-genome-paper", "max_stars_repo_head_hexsha": "8fbd7d389ee75ea08a0a978f74c4910cd51a4904", "max_stars_repo_licenses": ["CC0-1.0"], "max_s...
(* Copyright 2014 Cornell University Copyright 2015 Cornell University Copyright 2016 Cornell University This file is part of VPrl (the Verified Nuprl project). VPrl 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 Sof...
{"author": "vrahli", "repo": "NuprlInCoq", "sha": "0c3d7723836d3f615ea47f56e58b2ea6173e7d98", "save_path": "github-repos/coq/vrahli-NuprlInCoq", "path": "github-repos/coq/vrahli-NuprlInCoq/NuprlInCoq-0c3d7723836d3f615ea47f56e58b2ea6173e7d98/cequiv/approx_props1.v"}
// smooth_feedback: Control theory on Lie groups // https://github.com/pettni/smooth_feedback // // Licensed under the MIT License <http://opensource.org/licenses/MIT>. // // Copyright (c) 2021 Petter Nilsson // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and asso...
{"hexsha": "24427fd83c01f1ed5332bda669e3f719205a0e2b", "size": 2408, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/test_ocp_flatten.cpp", "max_stars_repo_name": "tgurriet/smooth_feedback", "max_stars_repo_head_hexsha": "1f926cb4269741ddc09ba048af5bea5e0390a053", "max_stars_repo_licenses": ["MIT"], "max_sta...
double precision susycoup common/susycoup/susycoup
{"hexsha": "65b221ec1d7baa5c4a31c48b8135558c44547a7f", "size": 63, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/Inc/susycoup.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# libraries import networkx as nx import matplotlib.pyplot as plt import matplotlib as mpl from src import graphs def run1(): N = 8 K = 2 # Build your graph G = nx.DiGraph() for i in range(1, N + 1): G.add_node(i) A = graphs.generate_n_cycle_d_regular_graph_by_degree(N, K) for ...
{"hexsha": "98cde4740295972213f44fb5a0ad6a9167badf98", "size": 2923, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_plot_graphs.py", "max_stars_repo_name": "gianmarcocalbi/asyncdsm-sym", "max_stars_repo_head_hexsha": "21a82c5fafada360faef340db805a772cec61530", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python import mango import mango.io import mango.image import mango.application.mdss as mdss import mango.mpi as mpi import scipy as sp import logging import re import os import sys haveArgParse = False try: import argparse haveArgParse = True except: import optparse logger, rootLogger =...
{"hexsha": "3ce1b7f67ca7a4e4a7989554cd37f1cae8617240", "size": 16574, "ext": "py", "lang": "Python", "max_stars_repo_path": "misc/python/mango/application/srskull/batchdownsample.py", "max_stars_repo_name": "pymango/pymango", "max_stars_repo_head_hexsha": "b55f831f0194b214e746b2dfb4d9c6671a1abc38", "max_stars_repo_lice...
# Copyright (c) MMEditing Authors. import numpy as np import paddle import paddle.nn as nn import paddle.nn.functional as F from paddle.vision.ops import DeformConv2D from ...utils.download import get_path_from_url from ...modules.init import kaiming_normal_, constant_ from .builder import GENERATORS @paddle.no_gra...
{"hexsha": "73567032d968d42844d9f0010be52248aa8a901b", "size": 22879, "ext": "py", "lang": "Python", "max_stars_repo_path": "paddlers/models/ppgan/models/generators/basicvsr.py", "max_stars_repo_name": "huilin16/PaddleRS", "max_stars_repo_head_hexsha": "ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a", "max_stars_repo_license...
""" Dynamical Systems needed to create the data for the experiments. Gabriele Abbati, Machine Learning Research Group, University of Oxford February 2019 """ # Libraries from abc import ABC, abstractmethod import numpy as np from typing import Union, Tuple from scipy.integrate import ode from scipy.optimize import f...
{"hexsha": "ac73c3616af6dc5ead777e4c1e6ffdf703dcf3a6", "size": 39922, "ext": "py", "lang": "Python", "max_stars_repo_path": "odin/utils/dynamical_systems.py", "max_stars_repo_name": "sdi1100041/SLEIPNIR", "max_stars_repo_head_hexsha": "02dd3eca8574899fd3f0e287b1a050e76e5ba0de", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np # The 'fit.py' module is unchanged from the previous tutorial. class FitDataset: # noinspection PyUnresolvedReferences def __init__(self, masked_dataset, model_data): """Class to fit a dataset with model data. Parameters ----------- masked_dat...
{"hexsha": "a56f4bf5ed2e1c5614380340f39d1735b912c2a8", "size": 7640, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_autofit/integration/src/fit/fit.py", "max_stars_repo_name": "arfon/PyAutoFit", "max_stars_repo_head_hexsha": "5926b13eefd97e089ee468cbec33452766edbd22", "max_stars_repo_licenses": ["MIT"], "m...
(** * imp: a formalisation of the IMP programming language on top of KAT *) (* We formalise the IMP language (whose programs are also known as "while programs"). We give a big step semantics as an inductive predicate, and using KAT, and we show that the two versions actually coincide. We then use the [...
{"author": "damien-pous", "repo": "relation-algebra", "sha": "13b99896782e449c7ca3910e48e18427517c8135", "save_path": "github-repos/coq/damien-pous-relation-algebra", "path": "github-repos/coq/damien-pous-relation-algebra/relation-algebra-13b99896782e449c7ca3910e48e18427517c8135/examples/imp.v"}
import torch import numpy as np import pyredner import torch import enum import math from typing import Optional class Texture: """ Representing a texture and its mipmap. Args ==== texels: torch.Tensor a float32 tensor with size C or [height, width, C] ...
{"hexsha": "3aa94441977c89e5c1e474abf9ea71f13527eabf", "size": 3780, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyredner/texture.py", "max_stars_repo_name": "brownvc/shapefromtracing", "max_stars_repo_head_hexsha": "f89226c8f20f1be9d6c8b7e46405872355accf2b", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma reachable_snapshot_inv_black_heap_no_grey_refs_dequeue_Mutate: assumes sb: "sys_mem_store_buffers (mutator m') s = mw_Mutate r f opt_r' # ws" assumes bh: "black_heap s" assumes ngr: "no_grey_refs s" assumes vri: "valid_refs_inv s" shows "mut_m.reachable_snapshot_inv m (s(sys := s sys\<lparr>...
{"llama_tokens": 3883, "file": "ConcurrentGC_Global_Noninterference", "length": 13}
import time #from pyftdi.ftdi import Ftdi #ft = Ftdi() #url = 'ftdi://ftdi:2232:FT2RTNYW/2' #ft.open_bitbang_from_url(url, 0b00001111) #print(ft.is_connected) #print(ft.bitbang_enabled) #print(ft.device_version) #print(ft.fifo_sizes) #print(ft.get_identifiers(url)) #print(ft.has_mpsse) #print(ft.has_wide_port) #print(f...
{"hexsha": "86fe186133624c909ca1eb6314f9699976682ebc", "size": 14017, "ext": "py", "lang": "Python", "max_stars_repo_path": "platform/ise/xl9_cw/sca_attack.py", "max_stars_repo_name": "kavehshamsi/scadec", "max_stars_repo_head_hexsha": "3cc1e0eba5db12be5b16aea7b7fd4909faf42714", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' **Beartype code-based object validation classes** (i.e., :mod:`beartype`-specific classes enabling callers to define PEP-compliant ...
{"hexsha": "85473ea15452b0a452755acc718d80df167e19bc", "size": 17318, "ext": "py", "lang": "Python", "max_stars_repo_path": "beartype/vale/_valeisobj.py", "max_stars_repo_name": "jonathanmorley/beartype", "max_stars_repo_head_hexsha": "0d1207210220807d5c5848033d13657afa307983", "max_stars_repo_licenses": ["MIT"], "max_...
#include <cctbx/boost_python/flex_fwd.h> #include <cctbx/geometry_restraints/shared_wrapper_pickle.hpp> #include <boost/python/class.hpp> #include <boost/python/def.hpp> #include <boost/python/return_value_policy.hpp> #include <boost/python/copy_const_reference.hpp> #include <boost/python/return_arg.hpp> #include <boo...
{"hexsha": "dbc3e58da4c48053618ee4aa63e7698aa1eacf25", "size": 8861, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cctbx/crystal/pair_tables_bpl.cpp", "max_stars_repo_name": "rimmartin/cctbx_project", "max_stars_repo_head_hexsha": "644090f9432d9afc22cfb542fc3ab78ca8e15e5d", "max_stars_repo_licenses": ["BSD-3-Cla...
""" Exit signals based on a dollar value. """ import numpy as np class DollarExit(): """ Calculate dollar value based exit signals. """ @classmethod def exit_dollar( cls, prices, trigger_value, exit_level): """ Calculate exit based on a dollar amount. Paramet...
{"hexsha": "4ccc9cc4a179d95fc107be63cb1b5b53c67f3c5b", "size": 10216, "ext": "py", "lang": "Python", "max_stars_repo_path": "tradingsystems/dollar_exits.py", "max_stars_repo_name": "GBERESEARCH/tradingsystems", "max_stars_repo_head_hexsha": "5158d41d32b48d35db34a6e132c7fa2f259987c1", "max_stars_repo_licenses": ["MIT"],...
def PlaneWaveEM(Eo, kvec, r): import numpy as np (L, M, N, junk) = r.shape krx = kvec[0] * r[:, :, :, 0] kry = kvec[1] * r[:, :, :, 1] krz = kvec[2] * r[:, :, :, 2] kr = krx + kry + krz expKr = np.exp(1j * kr) Einc = np.zeros((L, M, N, 3), dtype=np.complex128) Einc[:, :, :, ...
{"hexsha": "24749bcdb21b551cd9744486262dd0e1420b026a", "size": 433, "ext": "py", "lang": "Python", "max_stars_repo_path": "vines/fields/plane_wave_em.py", "max_stars_repo_name": "AndrewGibbs/vines", "max_stars_repo_head_hexsha": "4c4f75adc8f601f06e2ab12fbaa95a047ef4354e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
(* (c) Copyright Microsoft Corporation and Inria. All rights reserved. *) Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path div choice. Require Import fintype tuple finfun bigop prime ssralg poly finset. Require Import fingroup morphism perm automorphism quotient finalg action. Require Import gproduct zmod...
{"author": "math-comp", "repo": "mathcomp-history-before-github", "sha": "19ef9415e2b509a2327f9ef704268ce8570b607c", "save_path": "github-repos/coq/math-comp-mathcomp-history-before-github", "path": "github-repos/coq/math-comp-mathcomp-history-before-github/mathcomp-history-before-github-19ef9415e2b509a2327f9ef704268ce...
import sys import os import pandas as pd import numpy as np import scipy as sp import camoco as co import matplotlib.pylab as plt try: from sklearn.neighbors import KernelDensity except ImportError as e: raise ImportError('This command requires sklearn') def cistrans(args): cob = co.COB(args.cob) i...
{"hexsha": "fc4964107e780f00b02e313b7a98f8122926331d", "size": 1827, "ext": "py", "lang": "Python", "max_stars_repo_path": "camoco/cli/commands/cistrans.py", "max_stars_repo_name": "jonahcullen/Camoco", "max_stars_repo_head_hexsha": "2e95950f996329e27c00e5155e3768c0de9b8b7b", "max_stars_repo_licenses": ["MIT"], "max_st...
### # Format and filters # Reader support_filter_all(archive::Reader) = @_la_call(archive_read_support_filter_all, (Ptr{Void},), archive) support_filter_bzip2(archive::Reader) = @_la_call(archive_read_support_filter_bzip2, (Ptr{Void},), archive) support_filter_compress(archive::Reader) = @_la_call(archive...
{"hexsha": "37fd9fdcc2920655b7be19b980e683a3a17be6c6", "size": 8881, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/format.jl", "max_stars_repo_name": "JuliaPackageMirrors/LibArchive.jl", "max_stars_repo_head_hexsha": "74ebbe81ff8f4f6908b38caef58767906c20308d", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" =================== Entropy =================== """ from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk import numpy as np import matplotlib.pyplot as plt # defining a 8- and a 16-bit test images a8 = data.camera() a16 = data.camera().astype(np.uint16)*4 ent8 = e...
{"hexsha": "f019d79c194f3ecfee704cb5fad901f91fa9d882", "size": 899, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/examples/plot_entropy.py", "max_stars_repo_name": "RKDSOne/scikit-image", "max_stars_repo_head_hexsha": "baa67eafcace9cde1b94ad2d467e2f2e0468e759", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
# Copyright 2019-2021 Cambridge Quantum Computing # # 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 a...
{"hexsha": "5a70ae847e54040ee60dffb8b94f742360d24f0b", "size": 32046, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytket/tests/predicates_test.py", "max_stars_repo_name": "NewGitter2017/tket", "max_stars_repo_head_hexsha": "6ff81af26280770bf2ca80bfb2140e8fa98182aa", "max_stars_repo_licenses": ["Apache-2.0"],...
import os import sys import glob import argparse import numpy as np from tensorflow.python.keras import backend as K from tensorflow.python.keras.models import load_model from tensorflow.python.keras.applications.resnet50 import preprocess_input from tensorflow.python.keras.preprocessing import image from flask impor...
{"hexsha": "9bfd1c9b1a4afaf855dcc4c0d4dc926d37979247", "size": 1360, "ext": "py", "lang": "Python", "max_stars_repo_path": "DCrec.py", "max_stars_repo_name": "aditya210/Image-Classification-Cats-vs-Dogs", "max_stars_repo_head_hexsha": "8c96c405180ad8132243a4f00262004d4cbbb272", "max_stars_repo_licenses": ["MIT"], "max_...
# 2D FWI gradient test with 4 sources # The receiver positions and the source wavelets are the same for each of the four experiments. # Author: Philipp Witte, pwitte@eos.ubc.ca # Date: January 2017 # # Mathias Louboutin, mlouboutin3@gatech.edu # Updated July 2020 parsed_args = parse_commandline() nlayer = parsed_args...
{"hexsha": "26958100316a11b0e16f4392e47dd28a3f6e5246", "size": 3751, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_gradient_twri.jl", "max_stars_repo_name": "nogueirapeterson/JUDI", "max_stars_repo_head_hexsha": "cc76e950929f0b7a3cf29c2dff71e432e8ea26f8", "max_stars_repo_licenses": ["MIT"], "max_stars...
# Zero Momentum function lam4piflow(k, m2, T, Npi, lamda4pi) return lamda4pi^2 * (8 + Npi) * (dkF1TildeAll(k, m2, T) + dkF2TildeAll(k, m2, T) ) end function dkVintqs_Zero(q0, k, kprim, m, T, lam4pik, Npi; kwargs...) return lam4pik^2 *(2 + Npi) *( k^3 * (2 + Npi) * (dkF...
{"hexsha": "1b33ed00d69d85f6ad9a460c65cf947d7a1e7a6a", "size": 11640, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/vertexRe.jl", "max_stars_repo_name": "Yangyang-Tan/FRGRealTime.jl", "max_stars_repo_head_hexsha": "6581b783432a5d5d08d00c887b483f9596d12fe3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Comment from 9/14/2019 --> Wow. This is the first neural network program for classifying images. # I was pretty clueless, but I won't touch the original comments just for history! # My experience with the TensorFlow tutorial on "basic" classification. (i found this rly hard) # Website: https://www.tensorflow.org/tut...
{"hexsha": "1141078304712ea161305aa255fffbd3c794e58f", "size": 5360, "ext": "py", "lang": "Python", "max_stars_repo_path": "Neural Networks/Tensorflow/FasionMNIST/fasionMNST_classifier.py", "max_stars_repo_name": "B0kCh01/Machine-Learning-COdes", "max_stars_repo_head_hexsha": "8fc442cd3a139ecd6e6d0a3f352e7bfc8470365e",...
/* * Copyright (c) 2010-2012 Steffen Kieß * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, ...
{"hexsha": "438729c666d23450c74fb23ee47650ffc1b466ce", "size": 2611, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/PluginHDF5/HDF5/Exception.hpp", "max_stars_repo_name": "voxie-viewer/voxie", "max_stars_repo_head_hexsha": "d2b5e6760519782e9ef2e51f5322a3baa0cb1198", "max_stars_repo_licenses": ["MIT"], "max_st...
# Joint TV for multi-contrast MR This demonstration shows how to do a synergistic reconstruction of two MR images with different contrast. Both MR images show the same underlying anatomy but of course with different contrast. In order to make use of this similarity a joint total variation (TV) operator is used as a reg...
{"hexsha": "203d4fa76fd087d4b08f6e43a6c40035268c2af9", "size": 37671, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/Synergistic/cil_joint_tv_mr.ipynb", "max_stars_repo_name": "johannesmayer/SIRF-Exercises", "max_stars_repo_head_hexsha": "772f132ca3639f364189258d558a8f06a8666fb1", "max_st...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Catchment specific water flux plots. ############################################################### runoff_et/catchment_analysis.py Authors ESMValToolV1 Version Philipp Sommer (philipp.sommer@mpimet.mpg.de) Stefan Hagemann (stefan.hagemann@hzg.de) Alexander...
{"hexsha": "3fe8997e0c7ce4d739612a42cb3114bf0ee370a5", "size": 22614, "ext": "py", "lang": "Python", "max_stars_repo_path": "esmvaltool/diag_scripts/runoff_et/catchment_analysis.py", "max_stars_repo_name": "YanchunHe/ESMValTool", "max_stars_repo_head_hexsha": "3d9238a83f11c3f01266c6eca357471b7bb02116", "max_stars_repo_...
#ifndef HTOOL_SPMATRIX_HPP #define HTOOL_SPMATRIX_HPP #include <Eigen/Dense> #include <Eigen/Sparse> #include <cassert> #include <complex> #include <iostream> #include <vector> //#include "point.hpp" namespace htool { //================================// // DECLARATIONS DE TYPE // //========================...
{"hexsha": "0bf7fdaebea57cce3467b8244021a8f7b5d7abe2", "size": 4988, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/htool/types/sparsematrix.hpp", "max_stars_repo_name": "htool-ddm/htool", "max_stars_repo_head_hexsha": "e4dbec7c08c5008e62344fd0d5ebfdf95ef8863f", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma has_field_derivative_powr_right [derivative_intros]: "w \<noteq> 0 \<Longrightarrow> ((\<lambda>z. w powr z) has_field_derivative Ln w * w powr z) (at z)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. w \<noteq> 0 \<Longrightarrow> ((powr) w has_field_derivative Ln w * w powr z) (at z) [PROOF ...
{"llama_tokens": 258, "file": null, "length": 2}
/- Copyright (c) 2022 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Alex J. Best ! This file was ported from Lean 3 source module linear_algebra.quotient_pi ! leanprover-community/mathlib commit 398f60f60b43ef42154bd2bdadf5133daf1577a4 ! Ple...
{"author": "leanprover-community", "repo": "mathlib3port", "sha": "62505aa236c58c8559783b16d33e30df3daa54f4", "save_path": "github-repos/lean/leanprover-community-mathlib3port", "path": "github-repos/lean/leanprover-community-mathlib3port/mathlib3port-62505aa236c58c8559783b16d33e30df3daa54f4/Mathbin/LinearAlgebra/Quoti...
import os, sys import numpy as np execfile('JvM_correction.py') execfile('reduction_utils.py') execfile('ImportMS.py') sys.path.append('../') import diskdictionary as disk # read which disk this is about target = str(np.loadtxt('whichdisk.txt', dtype='str')) # Perform the imaging imagename = 'data/deep_'+target+'_dat...
{"hexsha": "b8d605e8a2c6a895bf0736835079d5163c5091ce", "size": 1648, "ext": "py", "lang": "Python", "max_stars_repo_path": "CSD_modeling/data_imaging.py", "max_stars_repo_name": "seanandrews/DSHARP_CPDs", "max_stars_repo_head_hexsha": "40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2", "max_stars_repo_licenses": ["MIT"], "max_...
from .base import Strategy, Transform from .random import LHS from summit.domain import * from summit.utils.dataset import DataSet import botorch from botorch.models.model import Model from botorch.acquisition.objective import ScalarizedObjective import torch from torch import Tensor from gpytorch.mlls.exact_marginal_...
{"hexsha": "3c3a88030c309bb846fdf059ed9cb55e92c1a42c", "size": 14772, "ext": "py", "lang": "Python", "max_stars_repo_path": "summit/strategies/multitask.py", "max_stars_repo_name": "jezsadler/summit", "max_stars_repo_head_hexsha": "982de7f6424bb94da2084d4d84396b4b2673eeca", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: UTF-8 -*- from typing import Union import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor import numpy as np from .base import TK2Conv2D, TK2Linear class TK2LeNet5(nn.Module): def __init__(self, num_classes: int, rs: Union[list, np.ndarray]): """LeNet...
{"hexsha": "7edf1338dff95b2d18b0b6b1304560851e4255dd", "size": 1687, "ext": "py", "lang": "Python", "max_stars_repo_path": "tednet/tnn/tucker2/tk2_lenet.py", "max_stars_repo_name": "perryuu/tednet", "max_stars_repo_head_hexsha": "9e05d7df3b690518921b3d8c2289ab638dbc221c", "max_stars_repo_licenses": ["MIT"], "max_stars_...
(* Theory: PDF_Compiler.thy Authors: Manuel Eberl The concrete compiler that compiles a PDF expression into a target language expression that describes a density function on the corresponding measure space. *) section \<open>Concrete PDF Compiler\<close> theory PDF_Compiler imports PDF_Compiler_Pred PDF_Targ...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Density_Compiler/PDF_Compiler.thy"}
subroutine unpack_contr(contr,svertex,vtx,topo,xlines,nvtx,nj_res) implicit none include 'stdunit.h' include 'opdim.h' include 'def_contraction.h' include 'ifc_operators.h' integer, intent(in) :: & nj_res, nvtx type(contraction), intent(inout) :: & co...
{"hexsha": "3eb5cb60c86f56a73fd46e2c48fc90ec22b18fc4", "size": 2765, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "formula/unpack_contr.f", "max_stars_repo_name": "ak-ustutt/GeCCo-public", "max_stars_repo_head_hexsha": "8d43a6c9323aeba7eb54625b95553bfd4b2418c6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#include "root_path.hpp" #include "../common/content_format.hpp" #include <pxp-agent/external_module.hpp> #include <pxp-agent/module_type.hpp> #include <pxp-agent/configuration.hpp> #include <pxp-agent/util/process.hpp> #include <cpp-pcp-client/protocol/chunks.hpp> // ParsedChunks #include <leatherman/json_con...
{"hexsha": "b3d6ff9fcc4b56850c29b8aa012ecfe98ea9cd7b", "size": 14150, "ext": "cc", "lang": "C++", "max_stars_repo_path": "lib/tests/unit/external_module_test.cc", "max_stars_repo_name": "nicklewis/pxp-agent", "max_stars_repo_head_hexsha": "12a383fb3403760524008ec81e5c1fcfd9178452", "max_stars_repo_licenses": ["Apache-2...
\section{The dataset} We downloaded data from Kaggle\footnote{\url{https://www.kaggle.com/c/random-acts-of-pizza/download/train.json.zip}}. The dataset includes 4040 requests collected from the Reddit community Random Acts of Pizza between December 8, 2010 and September 29, 2013. Each data object is a request for a fr...
{"hexsha": "ac4c0c85f83862871576673677696e8e11f8a351", "size": 2820, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "project/proposal/data.tex", "max_stars_repo_name": "tamnguyenthe/CS5890Project", "max_stars_repo_head_hexsha": "74446d536074d369af73bf6d88e38f917c7a3ee6", "max_stars_repo_licenses": ["MIT"], "max_st...
#include <glipf/processors/foreground-coverage-processor.h> #include <glipf/gles-utils/shader-builder.h> #include <glipf/gles-utils/glsl-program-builder.h> #include <boost/variant/get.hpp> #include <glm/gtc/type_ptr.hpp> #include <cstring> #define BASE_TEXTURE_WIDTH 320 #define BASE_TEXTURE_HEIGHT 240 using std:...
{"hexsha": "01c55455167fc5e5a013cae2353439b8b17bb124", "size": 13013, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "glipf/src/processors/foreground-coverage-processor.cpp", "max_stars_repo_name": "cognitivesystems/smartcamera", "max_stars_repo_head_hexsha": "5374193260e6385becfe8086a70d21d650314beb", "max_stars_...
import challenge_notations import challenge_prerequisites /-! # Liquid Tensor Experiment ## The main challenge The main challenge of the liquid tensor experiment is a formalisation of the first theorem in Peter Scholze's blogpost https://xenaproject.wordpress.com/2020/12/05/liquid-tensor-experiment/ Theorem 1.1 (Cl...
{"author": "leanprover-community", "repo": "lean-liquid", "sha": "92f188bd17f34dbfefc92a83069577f708851aec", "save_path": "github-repos/lean/leanprover-community-lean-liquid", "path": "github-repos/lean/leanprover-community-lean-liquid/lean-liquid-92f188bd17f34dbfefc92a83069577f708851aec/src/challenge.lean"}
using Test using TestSetExtensions using LinearAlgebra using Qaintessent using SparseArrays using StatsBase ##==---------------------------------------------------------------------------------------------------------------------- isunitary(cg::CircuitGate) = (sparse_matrix(cg) * sparse_matrix(Base.adjoint(cg)) ≈ I...
{"hexsha": "dbf0b7302b07683535f8e2d20bdd656dc9451eb8", "size": 6714, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_circuitgate.jl", "max_stars_repo_name": "oguzcankirmemis/Qaintessent.jl", "max_stars_repo_head_hexsha": "6261dc5d8a9a7ea7d406ea39cac950747583f414", "max_stars_repo_licenses": ["Apache-2.0...
# -*- coding: utf-8 -*- """ Class average finetuning functions. Before using any of these finetuning functions, ensure that the model is set up with nb_classes=2. """ from __future__ import print_function import uuid from time import sleep import numpy as np import torch import torch.nn as nn import torch.optim a...
{"hexsha": "919ac68a8a354a3b0626fad1b6ec465c54dda01a", "size": 12853, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchMoji/torchmoji/class_avg_finetuning.py", "max_stars_repo_name": "UmaTaru/run", "max_stars_repo_head_hexsha": "be29e4d41a4de3dee27cd6796801bfe51382d294", "max_stars_repo_licenses": ["MIT"], "...
using LocalRegistry using LocalRegistry: find_package_path, find_registry_path using Test using Random using Pkg const TEST_GITCONFIG = Dict( "user.name" => "LocalRegistryTests", "user.email" => "localregistrytests@example.com", ) include("utils.jl") # Since these tests will need to modify active registries ...
{"hexsha": "df7f053ecf856ec6179cf8672e433e1f08a7ceeb", "size": 14036, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "EricForgy/LocalRegistry.jl", "max_stars_repo_head_hexsha": "76a02ca3ca126a81f67a0db1d686d3f39d3dbdfe", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# https://github.com/SciML/GalacticOptim.jl/blob/master/test/rosenbrock.jl#L30 using GalacticOptim using ForwardDiff using Ipopt rosenbrock(x,p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2 x0 = zeros(2) p = Dict(1 => 1.0, 2=> 100.0) function con2_c(x,p) [x[1]^2 + x[2]^2, x[2]*sin(x[1])-x[1]] end optprob = Op...
{"hexsha": "15d9b10d9b838cd7d2dfb95930cfd606d9da799f", "size": 551, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "debug/galacticoptim-mwe.jl", "max_stars_repo_name": "lanl-ansi/rosetta-opf", "max_stars_repo_head_hexsha": "09e76f505c04cc788256a4f3f479033ba6abe1f0", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import pandas as pd import numpy as np import sys import os import configparser import skimage from skimage import io sys.path.append(os.path.abspath('../../utils')) import preprocessing config = configparser.ConfigParser() config.read('../../config.ini') vg_json = config['PATHS']['vg-json'] data_dir = config['PATHS'...
{"hexsha": "9601ee6934abf598cc7206c9aedd593e318bf6a7", "size": 3744, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/pixelwise/pixelwise_predict.py", "max_stars_repo_name": "clause-jena/colour-term-grounding", "max_stars_repo_head_hexsha": "af5a32e1511b588a07a5b478885120d271aa7546", "max_stars_repo_licens...
cat('\n---Polygenic Burden (PB) - Large Effect Variant (LEV) SCAN (PB-LEV-SCAN)---\n') cat('---version 1.0---\n') library('ggplot2') library("optparse") options(scipen = 10) option_list = list( #path make_option("--plink_path", action="store", default="plink", type='character', he...
{"hexsha": "3f5f03505d692bb6446bfae026ab34b204d03601", "size": 14895, "ext": "r", "lang": "R", "max_stars_repo_path": "src/PB-LEV-SCAN_1.0.r", "max_stars_repo_name": "gamazonlab/Polygenic_Background_Rare_Variant_Axis", "max_stars_repo_head_hexsha": "f86f3e385ae458e738ce9dcd0c0dbaa6e376fac4", "max_stars_repo_licenses": ...
[STATEMENT] lemma guarantees_imp: "(Y = UNIV guarantees Y) ==> ex_prop(Y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Y = UNIV guarantees Y \<Longrightarrow> ex_prop Y [PROOF STEP] by (auto simp add: guar_def ex_prop_equiv component_of_def dest: sym)
{"llama_tokens": 98, "file": null, "length": 1}
[STATEMENT] lemma iT_Div_assoc:"I \<oslash> a \<oslash> b = I \<oslash> (a * b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. I \<oslash> a \<oslash> b = I \<oslash> a * b [PROOF STEP] by (simp add: iT_Div_def image_image div_mult2_eq)
{"llama_tokens": 115, "file": "Nat-Interval-Logic_IL_IntervalOperators", "length": 1}
import sys import pandas as pd import numpy as np import nltk from joblib import dump from sqlalchemy import create_engine from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.base import BaseEstimator...
{"hexsha": "7942980b6aa13cebcca6b812f2901652441fa6ae", "size": 6483, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/train_classifier.py", "max_stars_repo_name": "jeena72/disaster-response-pipeline", "max_stars_repo_head_hexsha": "4621425a29e7fa2f162c725555787b6fc24f8010", "max_stars_repo_licenses": ["MIT...
# https://arxiv.org/pdf/1301.1071.pdf "Direct TSQR" import os os.environ["OMP_NUM_THREADS"] = "24" # This is the default on my machine (Zemaitis) import sys import argparse import numpy as np import scipy.linalg from time import perf_counter as time # Accepts a matrix and returns a list of its blocks # block_size row...
{"hexsha": "24df71e491b021cae5be9c31517d6f7bc44a55cb", "size": 4037, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/TSQR/qr_simple_blocked.py", "max_stars_repo_name": "UTexas-PSAAP/Parla.py", "max_stars_repo_head_hexsha": "3d92a156be41983e32576940ef6baffd78d4eb84", "max_stars_repo_licenses": ["BSD-3-Cl...
[STATEMENT] lemma trunc_ell2_union_disjoint: \<open>M\<inter>N = {} \<Longrightarrow> trunc_ell2 (M \<union> N) \<psi> = trunc_ell2 M \<psi> + trunc_ell2 N \<psi>\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. M \<inter> N = {} \<Longrightarrow> trunc_ell2 (M \<union> N) \<psi> = trunc_ell2 M \<psi> + trunc_...
{"llama_tokens": 150, "file": "Complex_Bounded_Operators_Complex_L2", "length": 1}
import numpy as np from util import util from config.atlas_config import PnCConfig, WBCConfig from pnc.wbc.wbc import WBC from pnc.wbc.joint_integrator import JointIntegrator class AtlasController(object): def __init__(self, tf_container, robot): self._tf_container = tf_container self._robot = ro...
{"hexsha": "cbdffaacd157c16433b8f98f575f33558350c26c", "size": 2994, "ext": "py", "lang": "Python", "max_stars_repo_path": "pnc/atlas_pnc/atlas_controller.py", "max_stars_repo_name": "junhyeokahn/ASE389", "max_stars_repo_head_hexsha": "a57d668f968da1db56f0dfe8dadad548ad631f33", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding:utf8 -*- r"""Namescope Transformer Transformers that get rid of namescope/nodes which are not needed for inference """ import re from collections import defaultdict from copy import deepcopy import numpy as np import tensorflow as tf from utensor_cgen.frontend.tensorflow import GraphDefParser from uten...
{"hexsha": "e6c668691f28ffee42205f518e050eb307a0e5ff", "size": 16634, "ext": "py", "lang": "Python", "max_stars_repo_path": "utensor_cgen/transformer/ns_transformer.py", "max_stars_repo_name": "dboyliao/utensor_cgen", "max_stars_repo_head_hexsha": "aacd3adf4ee2a521a8eb2e75807fe3c1c0d1e1e5", "max_stars_repo_licenses": [...
# encoding: utf-8 """ IndStateAnalyzer.py """ import sys from lmfit import report_fit import Meta as mt import numba from IndTypes import IndType from ModellingMode import ModellingMode as mm cumsum = lambda series : series.cumsum().iloc[:] movavg_cumulative = lambda n, series : cumsum(series).iloc[:].rolling(window=...
{"hexsha": "7c381b1088e6c95c0c8cf538e6c8e735629953cc", "size": 3241, "ext": "py", "lang": "Python", "max_stars_repo_path": "india-covid19india-py/Ind/IndStateAnalyzer.py", "max_stars_repo_name": "vpt101/covid-19_data_analysis", "max_stars_repo_head_hexsha": "1d02385ad75b650e584e119a8891433aa70e90d8", "max_stars_repo_li...
#include <boost/test/unit_test.hpp> #include <scorum/chain/database/database.hpp> #include <scorum/chain/database_exceptions.hpp> #include <scorum/chain/schema/scorum_objects.hpp> #include <scorum/chain/schema/account_objects.hpp> #include <scorum/chain/services/account.hpp> #include <scorum/chain/services/comment.h...
{"hexsha": "a24d59595e962a4b74ab3fb49dfcac5da4370d91", "size": 6496, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/chain_tests/rewards/comment_beneficiaries_apply_tests.cpp", "max_stars_repo_name": "scorum/scorum", "max_stars_repo_head_hexsha": "1da00651f2fa14bcf8292da34e1cbee06250ae78", "max_stars_repo_li...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module for the Numerov Scrodinger equation solver Description: This module defines all the necessary functions that are used in the main script Numerov.py author: Félix Desrochers email: felix.desrochers@polymtl.ca MIT License Copyright (c) 2017 Félix Desrochers P...
{"hexsha": "fcc8a8ba2419620562ad332e63e2510048c01f28", "size": 36253, "ext": "py", "lang": "Python", "max_stars_repo_path": "Fct_Numerov.py", "max_stars_repo_name": "Guo-Wen-Xiang/Numerov", "max_stars_repo_head_hexsha": "035a301e50697063e0c89d84192729c198803d1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5...
"""VectorSpaceData tests. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. Matthias Rupp 2019-2020, Citrine Informatics. """ import pytest import numpy as np import smlb from test_data import validate_data_interface def test_VectorSpaceData_instantiation...
{"hexsha": "0c6c7220ae61c04f860f3c363941933b1ccf3990", "size": 4320, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_vector_space_data.py", "max_stars_repo_name": "CitrineInformatics/smlb", "max_stars_repo_head_hexsha": "28a3689bd36aa8d51031b4faf7e2331bbd8148a9", "max_stars_repo_licenses": ["Apac...
import numpy def data_generator(celltypes, assays, data, n_positions, batch_size): while True: celltype_idxs = numpy.zeros(batch_size, dtype='int32') assay_idxs = numpy.zeros(batch_size, dtype='int32') genomic_25bp_idxs = numpy.random.randint(n_positions, size=batch_size) genomic_250bp_idxs = ge...
{"hexsha": "2f6f4c79d6865a51701994c472d576dfbc74e50d", "size": 2007, "ext": "py", "lang": "Python", "max_stars_repo_path": "avocado/io.py", "max_stars_repo_name": "luizirber/avocado", "max_stars_repo_head_hexsha": "7551492d6e60ba9cc1ddcc791882d3278e69607c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
#include <boost/test/unit_test.hpp> #include "algorithms/dp/binary_watch_time.hpp" BOOST_AUTO_TEST_SUITE(TestBinaryWatchTime) BOOST_AUTO_TEST_CASE(test_get_possible_time) { { const int num_led_on = 0; const std::vector<std::string> expected = {"0:00"}; BOOST_CHECK(e...
{"hexsha": "db03510eae77e8af74f16b6aa55562e0fbcb5464", "size": 1457, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/algorithms/dp/test_binary_watch_time.cpp", "max_stars_repo_name": "iamantony/CppNotes", "max_stars_repo_head_hexsha": "2707db6560ad80b0e5e286a04b2d46e5c0280b3f", "max_stars_repo_licenses": ["MI...
import skimage import matplotlib import matplotlib.pyplot as plt import numpy as np from imageManipulation import * from arguments import * def main(): args = setupArguments() img = openImage(args.imagePath) for method in args.limiarizationMethods: print('Applying ' + method.name) histogr...
{"hexsha": "3c41a7b1b99f9f5cf6613f47975b9bb956c0e151", "size": 718, "ext": "py", "lang": "Python", "max_stars_repo_path": "limiarization/main.py", "max_stars_repo_name": "giovaninppc/MC920", "max_stars_repo_head_hexsha": "7d46238f4079dabc4769c72cbed44d024fcf5c97", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright (c) 2020 Greg Pintilie - gregp@slac.stanford.edu # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
{"hexsha": "6a444bd72062dc62167d303475b5937449faeab5", "size": 132894, "ext": "py", "lang": "Python", "max_stars_repo_path": "Segger/qscores.py", "max_stars_repo_name": "gregdp/segger", "max_stars_repo_head_hexsha": "d4c112fd43f0b088145e225f976335800874ebe5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "m...
""" marchonintime(W0,Z,B,I) Solve by marching-on-in-time the causal convolution problem defined by `(W0,Z,B)` up to timestep `I`. Here, `Z` is an array of order 3 that contains a discretisation of a time translation invariant retarded potential operator. `W0` is the inverse of the slice `Z[:,:,1]`. """ funct...
{"hexsha": "93101da382d0a4605f46d04b44408e19322b4252", "size": 1689, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/timedomain/motlu.jl", "max_stars_repo_name": "RodVoskamp/BEAST.jl", "max_stars_repo_head_hexsha": "a56309d894dcbab85e514089ddee22e1ae9e53ef", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#include <cmath> #include <iostream> #include <fstream> #include <assert.h> #include <string> #include <vector> #include <map> #include <boost/tokenizer.hpp> #include <boost/algorithm/string/predicate.hpp> #include "parse_speedup.h" // Cores for which speedup data is available. static const size_t NUM_SPEEDUP_POINTS...
{"hexsha": "19880de9a1d9f7f0a2cc1d1cee1de760efa4dcf9", "size": 5089, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "xiosim/pintool/parse_speedup.cpp", "max_stars_repo_name": "s-kanev/XIOSim", "max_stars_repo_head_hexsha": "9673bbd15ba72c9cce15243a462bffb5d9ded9ae", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
[STATEMENT] lemma angle_actrans_conj: "|~ (\<langle>F \<and> G\<rangle>_v) = (\<langle>F\<rangle>_v \<and> \<langle>G\<rangle>_v)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. |~ \<langle>F \<and> G\<rangle>_v = (\<langle>F\<rangle>_v \<and> \<langle>G\<rangle>_v) [PROOF STEP] by (auto simp: angle_actrans_def actr...
{"llama_tokens": 148, "file": "TLA_PreFormulas", "length": 1}
[STATEMENT] lemma clm_decompose: "\<Turnstile>(cl(c) \<^bold>\<rightarrow> cl(c) \<^bold>\<frown> cl(c))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>ts v. 0 < \<parallel>ext v\<parallel> \<and> len v ts c = ext v \<and> restrict v (clm ts) c = lan v \<and> |lan v| = 1 \<longrightarrow> (\<exists>va u. ...
{"llama_tokens": 5831, "file": "Hybrid_Multi_Lane_Spatial_Logic_HMLSL", "length": 35}
#to force cpu use #import os #os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" #os.environ["CUDA_VISIBLE_DEVICES"] = "" import tensorflow as tf from tensorflow import keras from keras.utils import plot_model from keras.models import load_model import _pickle as pickle import matplotlib.pyplot as plt import numpy as np f...
{"hexsha": "ac6338291dfa587f7ae8db1a9f453102f5865b6b", "size": 3536, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn.py", "max_stars_repo_name": "rayanti/frame_interpolation_CNN", "max_stars_repo_head_hexsha": "65fa55886e87cb1c2f1dee0bb315e550b29d9601", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from time import time import numpy as np import tensorflow.compat.v1 as tf import blocksparse.ewops as ew import blocksparse.transformer as trans from tensorflow.python.ops import gradien...
{"hexsha": "228f2871e2d9c1405aad29217c018a56541c32d1", "size": 5114, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/top_k_test.py", "max_stars_repo_name": "AlumiK/blocksparse", "max_stars_repo_head_hexsha": "bc265b5e404f68b27229cb445ea48bf5b5f3bef7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
""" Run preprocessing on the data using this script. See the README.md for more details. """ import sqlite3 import os import datetime import logging import sys import glob import pandas as pd import numpy as np from .utils import create_adjacent_stop_pairs, bank_holidays_2018 logging.basicConfig( filename=f"/home...
{"hexsha": "2bb3d873c884684ba1b7728c13662329ecbceb0d", "size": 7776, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_analytics/preprocessing/run_preprocessing.py", "max_stars_repo_name": "reidy-p/DublinBusPredictions", "max_stars_repo_head_hexsha": "a6b1fc8a5c28500a3292883ea0dfcde1770d78d1", "max_stars_repo...
# Beg et al. (2007): https://doi.org/10.1073/pnas.0609845104. module BegData using DataFrames import ..Chemostat_Heerden2013 const ChH = Chemostat_Heerden2013 import CSV import UtilsJL const UJL = UtilsJL UJL.gen_sub_proj(@__MODULE__) # The average crowding coefficient a was fitted to...
{"hexsha": "3e9f8ae0f675b01ed63ffeba472f459ec3a8816c", "size": 1061, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BegData/BegData.jl", "max_stars_repo_name": "josePereiro/Chemostat_Heerden2013.jl", "max_stars_repo_head_hexsha": "00f97a57a64daf8d175b2eb22871c5fc83d2e6f0", "max_stars_repo_licenses": ["MIT"],...
# 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": "cf2085b60b62eddebde0194df73f97803fb791fb", "size": 5949, "ext": "py", "lang": "Python", "max_stars_repo_path": "mindarmour/adv_robustness/evaluations/defense_evaluation.py", "max_stars_repo_name": "hboshnak/mindarmour", "max_stars_repo_head_hexsha": "0609a4eaea875a84667bed279add9305752880cc", "max_stars_rep...
# RUN: SUPPORTLIB=%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext %PYTHON %s | FileCheck %s import filecmp import numpy as np import os import sys import tempfile _SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) sys.path.append(_SCRIPT_PATH) from tools import mlir_pytaco_api as pt from tools import t...
{"hexsha": "af1c6ba0c4552881e2b015048450437c07f0d321", "size": 1077, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlir/test/Integration/Dialect/SparseTensor/taco/test_SpMM.py", "max_stars_repo_name": "LaudateCorpus1/llvm-project", "max_stars_repo_head_hexsha": "ff2e0f0c1112558b3f30d8afec7c9882c33c79e3", "max_...