text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
################################### # CALIBRATION DETECTION AND CORRECTION # ################################### # This file includes functionality for identification and correction of calibration events. # Functions include detection based on edges or persistence restricted by day of week and hour of day, identificati...
{"hexsha": "3207021d72dcf99c31dd48e99a6d4491385bb59f", "size": 11257, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyhydroqc/calibration.py", "max_stars_repo_name": "AmberSJones/PyHydroQC", "max_stars_repo_head_hexsha": "9f8992672ce3163eb048964e85680c526b4fd3f3", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
(* Author: Norbert Schirmer Maintainer: Norbert Schirmer, norbert.schirmer at web de License: LGPL *) (* Title: Quicksort.thy Author: Norbert Schirmer, TU Muenchen Copyright (C) 2004-2008 Norbert Schirmer Some rights reserved, TU Muenchen This library is free software; you can red...
{"author": "seL4", "repo": "l4v", "sha": "9ba34e269008732d4f89fb7a7e32337ffdd09ff9", "save_path": "github-repos/isabelle/seL4-l4v", "path": "github-repos/isabelle/seL4-l4v/l4v-9ba34e269008732d4f89fb7a7e32337ffdd09ff9/tools/c-parser/Simpl/ex/Quicksort.thy"}
function catalogobj = associate(obj, maxTimeDiff, sites, source) %ASSOCIATE Associate detections into events % catalogobj = associate(detectionObj, maxTimeDiff) will scan through an % Detection object and look % for times where there are at least 2 detections on % within maxTimeDiff seconds of each other, and declare ...
{"author": "geoscience-community-codes", "repo": "GISMO", "sha": "a4eafca9d2ac85079253510005ef00aa9998d030", "save_path": "github-repos/MATLAB/geoscience-community-codes-GISMO", "path": "github-repos/MATLAB/geoscience-community-codes-GISMO/GISMO-a4eafca9d2ac85079253510005ef00aa9998d030/core/@Detection/associate.m"}
import numpy as np import pytest from latte.functional.disentanglement.modularity import modularity from latte.functional.disentanglement.mutual_info import single_mutual_info class TestModularity: def test_single_attr(self): z = np.random.randn(16, 2) a = np.random.randn(16, 1) with pyte...
{"hexsha": "367df40bffbf30af9d6d3bf6be3f98e467af41cf", "size": 2239, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/functional/disentanglement/test_modularity.py", "max_stars_repo_name": "SoftwareImpacts/SIMPAC-2021-192", "max_stars_repo_head_hexsha": "92c6eb8bb8b1f45b0b86d222b87b2f1e4e949d04", "max_stars...
# -*- coding: utf-8 -*- # @Time : 6/25/2018 4:23 PM # @Author : sunyonghai # @File : generator.py # @Software: ZJ_AI import itertools import json import random import threading from data_processing.fusion import fusion_utils import numpy as np import os data_path = '/home/syh/tf-faster-rcnn/data/fusion/mask' b...
{"hexsha": "cca89ab9eb4af733daaf166385e1fef2b6fa6fb1", "size": 6394, "ext": "py", "lang": "Python", "max_stars_repo_path": "development/server/algorithm/tf_faster_rcnn/data_processing/fusion/generator.py", "max_stars_repo_name": "FMsunyh/re_com", "max_stars_repo_head_hexsha": "1510881bce07a2750c47834b6520d90f2f4ed254",...
from collections import defaultdict import numpy as np import tree # pip install dm_tree from typing import Dict from ray.rllib.utils.annotations import DeveloperAPI from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID from ray.rllib.utils.typing import PolicyID # Instant metrics (keys for metrics.info). LEAR...
{"hexsha": "6f96d6956ef640e425e0878198e615b6a5244d4a", "size": 3977, "ext": "py", "lang": "Python", "max_stars_repo_path": "rllib/utils/metrics/learner_info.py", "max_stars_repo_name": "willfrey/ray", "max_stars_repo_head_hexsha": "288a81b42ef0186ab4db33b30191614a7bdb69f6", "max_stars_repo_licenses": ["Apache-2.0"], "m...
\documentclass{warpdoc} \newlength\lengthfigure % declare a figure width unit \setlength\lengthfigure{0.158\textwidth} % make the figure width unit scale with the textwidth \usepackage{psfrag} % use it to substitute a string in a eps figure \usepackage{subfigure} \usepackage{rotating} \usepacka...
{"hexsha": "4adea5b01f775ea68a3dd13374d45a71bf38d9ac", "size": 27873, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "model/thermo/doc/report.tex", "max_stars_repo_name": "TRPrasanna/CFDWARP", "max_stars_repo_head_hexsha": "505ffeea6c518e462322e2146ffb112d539075d5", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma...
from keras.layers import UpSampling2D import numpy as np import tensorflow as tf x=np.array([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]) x=x.reshape(1,4,4,1) print(x) x=tf.convert_to_tensor(x) y=UpSampling2D(size=(2,2))(x) with tf.Session() as sess: print(y.eval())
{"hexsha": "b67838ed4b6df1ddeab365818e79a1fc977b9e3a", "size": 268, "ext": "py", "lang": "Python", "max_stars_repo_path": "practice.py", "max_stars_repo_name": "jiagnhaiyang/YOLO3-", "max_stars_repo_head_hexsha": "b0f86b214b436bb5cc4fcb40557d78a950c8fdb4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
[STATEMENT] theorem sturm_below: assumes "poly p b \<noteq> 0" shows "card {x. poly p x = 0 \<and> x < b} = changes_le_smods b p (pderiv p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. int (card {x. poly p x = 0 \<and> x < b}) = changes_le_smods b p (pderiv p) [PROOF STEP] using sturm_tarski_below[OF assms, u...
{"llama_tokens": 275, "file": "Sturm_Tarski_Sturm_Tarski", "length": 2}
import math import os import numpy as np from tqdm import tqdm def Spatial_basis_POD(D, PSI_P, Sigma_P, MEMORY_SAVING, N_T, FOLDER_OUT='./', N_PARTITIONS=1, SAVE_SPATIAL_POD=False): """ Given the temporal basis now the POD spatial ones are computed -----------...
{"hexsha": "317752eeb1466de2311b95a93354ec494f8aa98d", "size": 6039, "ext": "py", "lang": "Python", "max_stars_repo_path": "modulo/_pod_space.py", "max_stars_repo_name": "lorenzoschena/modulo_vki_testing", "max_stars_repo_head_hexsha": "dc5dfcf8ecadd2a6410744ae0ca5368a9b5110eb", "max_stars_repo_licenses": ["BSD-3-Claus...
import os import torch import numpy as np import torch.nn.functional as F from tqdm import tqdm import torch.utils.data as data import PIL.Image as Image from torchvision import transforms ## This random crop is important and make the training data easy to learn def resizeImg(I, minSize = 256) : w, h = I.size ...
{"hexsha": "e149b1b5f74024cf58d6fb7003bf5660a5eff2f5", "size": 3008, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/dataloader.py", "max_stars_repo_name": "Pandinosaurus/RANSAC-Flow", "max_stars_repo_head_hexsha": "fd333a1465ec0c537f39bb6f0065bfde4d58a1f5", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/* Copyright 2008 (C) Nicira, Inc. * * This file is part of NOX. * * NOX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * N...
{"hexsha": "8de9623de6505e5217cf0827ac4a94a375087e6a", "size": 8105, "ext": "cc", "lang": "C++", "max_stars_repo_path": "nox/src/nox/netapps/storage/storage.cc", "max_stars_repo_name": "ayjazz/OESS", "max_stars_repo_head_hexsha": "deadc504d287febc7cbd7251ddb102bb5c8b1f04", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
[STATEMENT] lemma FG_consitutents_n0: "of_nat (card G) \<noteq> (0::'f::field) \<Longrightarrow> 0 \<notin> set (FG_constituents::('f,'g) aezfun set list)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. of_nat (card G) \<noteq> (0::'f) \<Longrightarrow> 0 \<notin> set FG_constituents [PROOF STEP] using som...
{"llama_tokens": 818, "file": "Rep_Fin_Groups_Rep_Fin_Groups", "length": 3}
import numpy as np from PIL import Image IMAGE = '/Users/yiws/Desktop/Screen Shot 2018-09-20 at 12.00.46 PM.png' im = Image.open(IMAGE) rgba_im = im.convert('RGBA') data = np.array(rgba_im) for row in data: for pixels in row: if all(pixels == 255): pixels[0] = 0 pixels[1] = 0 ...
{"hexsha": "f85ea7ab8de75eb5d0f7c0e8a57a53f1f9e1385c", "size": 814, "ext": "py", "lang": "Python", "max_stars_repo_path": "img_split2.py", "max_stars_repo_name": "yiwensong/slack-image-splitter", "max_stars_repo_head_hexsha": "2fc9190013986d393372e936a4131883ae0cebb4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/WIP_OCO2_Map.ipynb (unless otherwise specified). __all__ = ['inventory_map_only', 'peaks_capture_map'] # Cell import pandas as pd import geopandas as gpd import numpy as np from numpy import exp, loadtxt, pi, sqrt, log import math # import matplotlib # import matp...
{"hexsha": "431165dc53d6cc4bf53d1aaba3d6881b1f774742", "size": 7027, "ext": "py", "lang": "Python", "max_stars_repo_path": "oco2peak/oco2mapfolium.py", "max_stars_repo_name": "trancept/batch7_satellite_ges", "max_stars_repo_head_hexsha": "31126b398eba4312a245b97bfae35c55fbd5be37", "max_stars_repo_licenses": ["Apache-2....
using Plots, SNN # # N = 1000 # G = SNN.NoisyIF(N; τm=1, Vt=1, Vr=0, El=0, σ=0.8) # fill!(G.I, 1.01) # G.v = -1.5 + rand(N) # SNN.monitor(G, [:fire, :v]) # # SNN.sim!([G], []; duration=3) # # SNN.raster([G]) # # SNN.activity([G]) # SNN.density(G, :v) # # # using Plots, SNN # # N = 1000 G = SNN.NoisyIF(N; τm=1, Vt=1, ...
{"hexsha": "bd4992bd102c481c6e411660b88a69c8a4455d70", "size": 840, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/deprecated/fp_eq.jl", "max_stars_repo_name": "Wenlab/SpikingNeuralNetworks.jl", "max_stars_repo_head_hexsha": "96e8771783db86edc1a6a88f80535c09285a82c6", "max_stars_repo_licenses": ["MIT"],...
""" Test class for 'sslh/graphGenerator' Author: Wolfgang Gatterbauer """ import numpy as np import sys sys.path.append('./../sslh') from graphGenerator import (create_distribution_vector, local_randint, calculate_nVec_from_Xd, calcula...
{"hexsha": "86ab026f274236a175f80c630289ca8d647cde23", "size": 23517, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_sslh/test_graphGenerator.py", "max_stars_repo_name": "northeastern-datalab/factorized-graphs", "max_stars_repo_head_hexsha": "167b0d172c3461f9a75861872ed758c51f4a9aa9", "max_stars_repo_licen...
import dataclasses from abc import ABC, abstractmethod from typing import Any, Iterable, List, Optional, Tuple, Union import nltk import numpy as np class BaseInputExample(ABC): """Parser input for a single sentence (abstract interface).""" # Subclasses must define the following attributes or properties. ...
{"hexsha": "5343e841d3afea916acc1452e9571faa8570f32a", "size": 8054, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/benepar/parse_base.py", "max_stars_repo_name": "speedcell4/self-attentive-parser", "max_stars_repo_head_hexsha": "644a27d07316d1441a62425c85f78128b8dee4fe", "max_stars_repo_licenses": ["MIT"],...
/- Copyright (c) 2019 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import category_theory.limits.concrete_category import group_theory.quotient_group import category_theory.limits.shapes.kernels import algebra.category.Module.basic ...
{"author": "Mel-TunaRoll", "repo": "Lean-Mordell-Weil-Mel-Branch", "sha": "4db36f86423976aacd2c2968c4e45787fcd86b97", "save_path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch", "path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch/Lean-Mordell-Weil-Mel-Branch-4db36f86423976aacd2c2968c4e4...
module Foo using Preferences set!(key, value) = @set_preferences!(key=>value) get(key) = @load_preference(key) end # module
{"hexsha": "0cd72d4280a968b32a9bc87f0aba36d7bdbf9c35", "size": 127, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_packages/Sandbox_PreservePreferences/dev/Foo/src/Foo.jl", "max_stars_repo_name": "barucden/Pkg.jl", "max_stars_repo_head_hexsha": "1c84da1a29b35f2ab0b2715a45a3b8644461a45c", "max_stars_rep...
from matplotlib import pyplot as plt import matplotlib.patches as mpatches import pandas as pd import numpy as np import os colors = ['#60A917', 'cornflowerblue', 'orange', '#D62728'] line_styles = ["-", "--"] def plot_daily(data): fig, ax = plt.subplots(nrows=3, ncols=2, figsize=(12, 12), ) for i, metric in...
{"hexsha": "0655f6220b63c2e7179ece8aad0b1171218cfe76", "size": 2728, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plotting/daily_plot.py", "max_stars_repo_name": "PlanTL-SANIDAD/covid-predictive-model", "max_stars_repo_head_hexsha": "40b74d638825433203079e55dcc6c5cebff785ce", "max_stars_repo_licenses": ["...
/* * Copyright (c) 2011, Mattia Penati <mattia.penati@gmail.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright not...
{"hexsha": "4e25749d848adc597ad670d67ff8fa4e9cc6c494", "size": 4106, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/ama/tensor/iexp/iexp_cwise_binary.hpp", "max_stars_repo_name": "mattiapenati/amanita", "max_stars_repo_head_hexsha": "c5c16d1f17e71151ce1d8e6972ddff6cec3c7305", "max_stars_repo_licenses": ["...
using Test using NeuralAttentionlib using Random using Flux using NNlib using Static using ChainRulesCore using ChainRulesTestUtils const tests = [ "collapseddim", "matmul", "mask", "mha", ] Random.seed!(0) include("old_impl/old_impl.jl") using .Old_Impl using .Old_Impl: batched_triu!, batched_tril!...
{"hexsha": "bc34b44b006ecc5d6807c26e9a1c447bc1a39b44", "size": 498, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "foldfelis/NeuralAttentionlib.jl", "max_stars_repo_head_hexsha": "52cb258807c9b8d308e14db0f99ec0d3492607c9", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import tensorflow as tf from tensorflow.keras import layers class DownResBlock(layers.Layer): def __init__(self, channels, kernel_size, initial_activation=None, normalization=None, downsample_rate=2, regularization=None): super(DownResBlock, self).__init__() self.out_channels = c...
{"hexsha": "f4ca65d5934c7f698a92f264ccd34434e076ee0f", "size": 9376, "ext": "py", "lang": "Python", "max_stars_repo_path": "sources/models/Blocks.py", "max_stars_repo_name": "cwi-dis/affect-gan", "max_stars_repo_head_hexsha": "aea0f7dd7dc412f7e3fc44bc2db3526b09aaf131", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
% As a sample LaTeX document, this is an actual assignment % written in LaTeX with my template for MATH 417, % Honors Real Variables (Measure Theory) at University of Alberta. % This source has been released with permission with the instructor, % Professor John C. Bowman as the solutions are available at % https://ww...
{"hexsha": "de96321b76d09e842e3534646afd8805eb6b345c", "size": 4000, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sample/math417hw3/m417hw3.tex", "max_stars_repo_name": "supakorn-ras/latex-templates", "max_stars_repo_head_hexsha": "94ac5cbb3addc4135db8e33395d4e9ce21716cbc", "max_stars_repo_licenses": ["MIT"], "...
from __future__ import with_statement from collections import OrderedDict import warnings import numpy from StringIO import StringIO from sqlalchemy import (types as satypes, Column, Table, Index, create_engine, MetaData) import string, random #from http://stackoverflow.com/questions/2257441/python-random-string-g...
{"hexsha": "b6bc13df7651027d227d2cee66572f261235e865", "size": 5439, "ext": "py", "lang": "Python", "max_stars_repo_path": "new_showMaf/lsst/sims/maf/db/dblib/utils.py", "max_stars_repo_name": "nanchenchen/lsst-new-showMAF", "max_stars_repo_head_hexsha": "6b30e7c06662ae1970837cba5bc46591acd6d7fe", "max_stars_repo_licen...
# import of the required libraries import numpy as np import timeit from pyGPGO.covfunc import squaredExponential from pyGPGO.surrogates.GaussianProcess import GaussianProcess from pyGPGO.surrogates.RandomForest import RandomForest from pyGPGO.GPGO import GPGO from pyGPGO.acquisition import Acquisition from pyGPGO.co...
{"hexsha": "7941372f855aa71c2579b434b917618f320ed3eb", "size": 4620, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment.py", "max_stars_repo_name": "JeyDi/BayesianMLOptimization", "max_stars_repo_head_hexsha": "ba3ddf5bb9919a5043b4e982dea46425631696d3", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
! ################################################################################################################################## ! Begin MIT license text. ! ___________________________________________________________________________...
{"hexsha": "d2fc4a09a0a6ca19935c1bad6dfe3ad2078ec58d", "size": 8580, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/EMG/EMG6/BBMIN3.f90", "max_stars_repo_name": "JohnDN90/MYSTRAN", "max_stars_repo_head_hexsha": "1dd7dc19e54c1bb2b5235244af65115950e21488", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# This file was generated, do not modify it. # hide r = range(model, :(linear_regressor.lambda), lower=1e-2, upper=100_000, scale=:log10) tm = TunedModel(model=model, ranges=r, tuning=Grid(resolution=50), resampling=CV(nfolds=3, rng=4141), measure=rms) mtm = machine(tm, Xc, y) fit!(mtm, rows=train) be...
{"hexsha": "11b4156ccdc2b71c11780631092f01b6b2e7d284", "size": 411, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "__site/assets/isl/lab-6b/code/ex14.jl", "max_stars_repo_name": "giordano/DataScienceTutorials.jl", "max_stars_repo_head_hexsha": "8284298842e0d77061cf8ee767d0899fb7d051ff", "max_stars_repo_licenses"...
# Copyright (c) 2016 Shunya Sato # Author: Shunya Sato # # 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, mod...
{"hexsha": "d215e707550893c373fc0d9eedcf9a20bb05a2ac", "size": 14141, "ext": "pyw", "lang": "Python", "max_stars_repo_path": "serialLogger.pyw", "max_stars_repo_name": "aerialist/serial_logger", "max_stars_repo_head_hexsha": "feb371de25eb95bc7a924791c4573aa25ac51ab9", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) 2018-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # from itertools import zip_longest import numpy as np from common.arguments.basic_args import parse_args from common.transforma...
{"hexsha": "f8f7e1e594713abf19af416b5db9bf9355231bb1", "size": 16402, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/dataset/data_generators.py", "max_stars_repo_name": "ailingzengzzz/Split-and-Recombine-Net", "max_stars_repo_head_hexsha": "1b6285c9f5b46140832e7e4d24e8e5a7dbb24234", "max_stars_repo_licen...
import os import json import random import numpy as np import pandas as pd from string import punctuation from nltk import word_tokenize from joblib import dump, load from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.feature_extraction.text import TfidfVect...
{"hexsha": "927551cb67641fd9f432b08bdcfcd7e92555bc61", "size": 9185, "ext": "py", "lang": "Python", "max_stars_repo_path": "botmodel.py", "max_stars_repo_name": "kr-prince/VICCI-Python-Chatbot", "max_stars_repo_head_hexsha": "e9ed637a029c314cf30d72172629a9a681c24b39", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
/*-----------------------------------------------------------------------------+ Copyright (c) 2011-2011: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at ...
{"hexsha": "d18a56726d3135282c277e8743a964a16e0536c3", "size": 8051, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/external/boost/boost_1_68_0/libs/icl/test/fix_tickets_/fix_tickets.cpp", "max_stars_repo_name": "Bpowers4/turicreate", "max_stars_repo_head_hexsha": "73dad213cc1c4f74337b905baea2b3a1e5a0266c", "...
# # Copyright (c) 2021, NVIDIA CORPORATION. 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 appl...
{"hexsha": "f47c8c496647422e0dacc7e3b357851ef615cd38", "size": 4947, "ext": "py", "lang": "Python", "max_stars_repo_path": "trt_util/trt_lite.py", "max_stars_repo_name": "yihui8776/TensorRT-DETR", "max_stars_repo_head_hexsha": "1f32e9a2f98e26ec5b2376f9a2695193887430fb", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
program test_free_energy_fft ! nuclear charge: 1 Gaussian ! electronic charge: 1 Gaussian ! calculation: single free energy evaluation ! This test uses FFT and produces the same result as test_free_energy3 use types, only: dp use constants, only: i_ use ofdft, only: read_pseudo use ofdft_fft, only: free_energy, radi...
{"hexsha": "2a94e9159a6cbc8fcfcfa7d507ad1f2712afbe13", "size": 2746, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/tests/fem/test_free_energy_fft.f90", "max_stars_repo_name": "certik/hfsolver", "max_stars_repo_head_hexsha": "b4c50c1979fb7e468b1852b144ba756f5a51788d", "max_stars_repo_licenses": ["BSD-2-Cl...
# **CS224W - Colab 3** In Colab 2 we constructed GNN models by using PyTorch Geometric's built in GCN layer, `GCNConv`. In this Colab we will go a step deeper and implement the **GraphSAGE** ([Hamilton et al. (2017)](https://arxiv.org/abs/1706.02216)) layer directly. Then we will run our models on the CORA dataset, wh...
{"hexsha": "5b6f726735785883d1fe17210a8e31b239be092f", "size": 1003009, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Colab 3/CS224W - Colab3_victor.ipynb", "max_stars_repo_name": "victorcroisfelt/aau-cs224w-ml-with-graphs", "max_stars_repo_head_hexsha": "adb38651be8da98cc574f127763c785ed16dfb5a",...
# ************ # File: NeuralNetwork.py # Top contributors (to current version): # Panagiotis Kouvaros (panagiotis.kouvaros@gmail.com) # This file is part of the Venus project. # Copyright: 2019-2021 by the authors listed in the AUTHORS file in the # top-level directory. # License: BSD 2-Clause (see the file LICENSE ...
{"hexsha": "acf187c204cdadafa46ecbd4bd74047f442263aa", "size": 6369, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/NeuralNetwork.py", "max_stars_repo_name": "pkouvaros/venus2_vnncomp21", "max_stars_repo_head_hexsha": "57e9608041d230b5d78c4f2afb890b81035436a1", "max_stars_repo_licenses": ["BSD-2-Clause"], "...
module vegetables_assert_equals_integer_tensor_m use iso_varying_string, only: varying_string, operator(//), var_str use strff, only: join use vegetables_messages_m, only: & make_equals_failure_message, & make_equals_success_message, & with_user_message use vegetables...
{"hexsha": "bf0dc7c747976d2009953084844fa5c84b17d6ae", "size": 5094, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/vegetables/assert/equals_integer_tensor_m.f90", "max_stars_repo_name": "everythingfunctional/vegetables", "max_stars_repo_head_hexsha": "5625f1f3e318fb301d654e7875e254fa3e0cc4a1", "max_stars...
import warnings import numbers import collections.abc import numpy import numpy.random from logging import getLogger _log = getLogger(__name__) __all__ = ["sample_inputs"] def sample_points(rng, N=None, conc=None, lower=None, upper=None, start=0, ndim=3): """Generate points distributed uniformly. Args: ...
{"hexsha": "c5682377efaa37f86c96cff342d44d9952888eee", "size": 10768, "ext": "py", "lang": "Python", "max_stars_repo_path": "scopyon/sampling.py", "max_stars_repo_name": "ecell/scopyon", "max_stars_repo_head_hexsha": "99436fbfd34bb684966846eba75b206c2806f69c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
import gym import numpy as np class OneHotEncoding(gym.Space): """ {0,...,1,...,0} Example usage: self.observation_space = OneHotEncoding(size=4) Credit: https://stackoverflow.com/questions/54022606/openai-gym-how-to-create-one-hot-observation-space """ def __init__(self, size=None): ...
{"hexsha": "738d23093ae1539b33b19f9a6d0ad71401c43626", "size": 1035, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym-pokemon/gym_pokemon/envs/one_hot.py", "max_stars_repo_name": "Miyooki/Soft-Boiled", "max_stars_repo_head_hexsha": "a1522502a1a665dee2317f03638f1c3b964c57f1", "max_stars_repo_licenses": ["MIT"]...
import csv import base64 import numpy as np from numpy import array dbig = np.dtype('>f8') def decode_float_list(base64_string): bytes = base64.b64decode(base64_string) return np.frombuffer(bytes, dtype=dbig).tolist() def encode_array(arr): base64_str = base64.b64encode(np.array(arr).astype(dbig)).decode...
{"hexsha": "cbbc695119f34620a09aa9452eaada7694a41150", "size": 984, "ext": "py", "lang": "Python", "max_stars_repo_path": "vec2base64.py", "max_stars_repo_name": "harika-24/Image-Processing-and-Machine-Learning-using-Parallel-Computing", "max_stars_repo_head_hexsha": "b13b8f20551a9d5960b146713182b167e35d65e7", "max_sta...
import numpy as np # pip install gym import gym # Using the example # https://gym.openai.com/envs/NChain-v0/ env = gym.make('NChain-v0') def naive_sum_reward_agent(env, num_episodes=500): # this is the table that will hold our summated rewards for # each action in each state r_table = np.zeros((5, 2)) ...
{"hexsha": "e7caaba72e60dc385b8e3a90cb2cd22bf6fdef2a", "size": 3549, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym-nvchain.py", "max_stars_repo_name": "Umberto1988/PythonCourse", "max_stars_repo_head_hexsha": "5adf29111d2d1940af7760d1ba67d7a38f95584f", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
[STATEMENT] lemma amult_eq_eq_r:"\<lbrakk>z \<noteq> 0; a * ant z = b * ant z\<rbrakk> \<Longrightarrow> a = b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>z \<noteq> 0; a * ant z = b * ant z\<rbrakk> \<Longrightarrow> a = b [PROOF STEP] apply (cut_tac less_linear[of "z" "0"], simp, cut_tac mem_a...
{"llama_tokens": 874, "file": "Group-Ring-Module_Algebra1", "length": 4}
// Copyright (c) 2015-2021 Daniel Cooke // Use of this source code is governed by the MIT license that can be found in the LICENSE file. #ifndef individual_caller_hpp #define individual_caller_hpp #include <vector> #include <string> #include <memory> #include <boost/optional.hpp> #include "config/common.hpp" #inclu...
{"hexsha": "f6c9fc51a7cc7d75df5fbaac45e9e41a6184e9fc", "size": 5406, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/core/callers/individual_caller.hpp", "max_stars_repo_name": "iamh2o/octopus", "max_stars_repo_head_hexsha": "09ebd28945026556e77d73f1dcd8f0212265183c", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import from ..data.constants import * from ..data.particles import * from ..api.channel import ProductionChannel from . import hadronic_common as h import numpy as np import scipy.integrate from warnings import warn def normali...
{"hexsha": "c40cf08db2073c790efc54de9abd6ae7b035a8c5", "size": 2801, "ext": "py", "lang": "Python", "max_stars_repo_path": "production/three_body_quartic.py", "max_stars_repo_name": "JLTastet/scalar_portal", "max_stars_repo_head_hexsha": "8d444d72e4c5d31b237a59621935757790c5a0e7", "max_stars_repo_licenses": ["MIT"], "m...
import copy from dataclasses import dataclass import dataclasses import functools import traceback from typing import Any, Dict, List, Optional, Tuple, Union from async_timeout import enum from attr import field from concurrent.futures import ProcessPoolExecutor from transformers import AutoConfig, T5ForConditionalGen...
{"hexsha": "a0e4e396ece136f891ed0a6a34aaf0b40b1bbe19", "size": 27206, "ext": "py", "lang": "Python", "max_stars_repo_path": "rayserve/t5_sst2_composed.py", "max_stars_repo_name": "drunkcoding/model-inference", "max_stars_repo_head_hexsha": "02d2240bc7052fa32223a80fa63625fe681db102", "max_stars_repo_licenses": ["MIT"], ...
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .jl # format_name: light # format_version: '1.5' # jupytext_version: 1.3.4 # kernelspec: # display_name: Julia 1.3.1 # language: julia # name: julia-1.3 # --- # + [markdown] toc=true # <...
{"hexsha": "df6ddff5f417ad5bd849830e22335faa8a1b81c1", "size": 17588, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "experiments/notebook/tangent_vector.jl", "max_stars_repo_name": "yasutak/MyWorkflow.jl", "max_stars_repo_head_hexsha": "99deb349edbbaf6b7f797916fb7afbd1b0d33884", "max_stars_repo_licenses": ["MIT"...
import tensorflow as tf from tensorflow.keras.layers import Dense, LayerNormalization, Reshape, Permute, Dropout, GlobalAveragePooling1D, Embedding from tensorflow.keras.activations import softmax, linear import tensorflow.keras.backend as K import numpy as np def gelu(x): return 0.5*x*(1+tf.tanh(np.sqrt(2/np.pi)*...
{"hexsha": "e7cb0c928c378eb6c46f243f7b6ad0bbb91dd1de", "size": 6524, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/layers.py", "max_stars_repo_name": "kjm1559/vit", "max_stars_repo_head_hexsha": "7bb0c994672cdd22c014dc2b8f65cc341c3f165c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import pyarrow as pa import pandas as pd import numpy as np from ray.experimental.data.deltacat.storage.model.types import DeltaType from typing import Any, Dict, Union def of( stream_position: int, file_index: int, delta_type: DeltaType, table: Union[pa.Table, pd.DataFrame, np.ndarray...
{"hexsha": "5237205622f0c61bde56e33b70a5a4e5305b6885", "size": 1334, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ray/experimental/data/deltacat/compute/compactor/model/delta_file_envelope.py", "max_stars_repo_name": "goswamig/amazon-ray", "max_stars_repo_head_hexsha": "9984ebcdc9d0da0de65363074021e9af...
import numpy as np from hypothesis import given import hypothesis.strategies as st from caffe2.python import core from caffe2.python import workspace import caffe2.python.hypothesis_test_util as hu class TestWeightedSample(hu.HypothesisTestCase): @given( batch=st.integers(min_value...
{"hexsha": "7c6cfbc9d0db4da7f1b502c66ddb7ea37e65138f", "size": 2819, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/caffe2/python/operator_test/weighted_sample_test.py", "max_stars_repo_name": "Westlanderz/AI-Plat1", "max_stars_repo_head_hexsha": "1187c22819e5135e8e8189c99b86a93a0d66b8d8"...
"""Plot the quantiles of an output variable against an input variable.""" import numpy as np import matplotlib.pyplot as plt import wquantiles from scipy import signal def quantile_plot(x, y, quantiles=(0.1, 0.9), ax=None, scatter=True, smooth=True, **kwarg): """ Plot the quantiles of an output variable against ...
{"hexsha": "11ad4ad5485fd057e5a7a85a4bebe31448d120c8", "size": 6167, "ext": "py", "lang": "Python", "max_stars_repo_path": "lvreuse/utils/quantile_plot.py", "max_stars_repo_name": "mvernacc/lvreuse", "max_stars_repo_head_hexsha": "e2ac6aca334b49b0d4f5f881861cb42ce86dd130", "max_stars_repo_licenses": ["MIT"], "max_stars...
import os import torch import numpy as np from .data_ner import BertNERDataBunch from torch import nn from seqeval.metrics import f1_score, precision_score, recall_score from typing import Dict, List, Optional, Tuple from .learner_util import Learner from transformers import ( AutoConfig, AutoModelForTokenClas...
{"hexsha": "8a6c12df35b4d63b670578265fcd29ed955871d9", "size": 10658, "ext": "py", "lang": "Python", "max_stars_repo_path": "fast_bert/learner_ner.py", "max_stars_repo_name": "clairett/fast-bert", "max_stars_repo_head_hexsha": "506771b930aa70e7ca2852e5e8ebb14656d97bfa", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
[STATEMENT] lemma sinh_0 [simp]: "sinh 0 = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sinh (0::'a) = (0::'a) [PROOF STEP] by (simp add: sinh_def)
{"llama_tokens": 80, "file": null, "length": 1}
C LAST UPDATE 16/03/89 C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C SUBROUTINE PLOTON IMPLICIT NONE C C Purpose: Switch graphics on first time only. C COMMON /MYGRAF/ OPENGR LOGICAL OPENGR C C--------------------------------------------------------------...
{"hexsha": "ede294b3a56ca7e6e1ac46e5ae3950de38775e0f", "size": 506, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "otoko/src/ploton.f", "max_stars_repo_name": "scattering-central/CCP13", "max_stars_repo_head_hexsha": "e78440d34d0ac80d2294b131ca17dddcf7505b01", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
[STATEMENT] lemma quasi_isometry_on_perturb: assumes "lambda C-quasi_isometry_on X f" "D \<ge> 0" "\<And>x. x \<in> X \<Longrightarrow> dist (f x) (g x) \<le> D" shows "lambda (C + 2 * D)-quasi_isometry_on X g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lambda (C + 2 * D) -quasi_isometry_...
{"llama_tokens": 2794, "file": "Gromov_Hyperbolicity_Isometries", "length": 21}
import numpy as np import cv2 import matplotlib.pyplot as plt import glob import os import scipy.io from math import sqrt import torch import torch.nn as nn import torchvision from torchvision.transforms import transforms from torch.utils.data import DataLoader from torch.optim import Adam from torch.autograd import Va...
{"hexsha": "a37249cde0ff591c390a0a630458c051cea15801", "size": 5165, "ext": "py", "lang": "Python", "max_stars_repo_path": "vacancy_inference.py", "max_stars_repo_name": "ThomasArtin/VPS-NET", "max_stars_repo_head_hexsha": "e37cafe3698d7a96cfe86b7190aac3a717799d21", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/- Copyright (c) 2015 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis Ported by: Joël Riou ! This file was ported from Lean 3 source module algebra.group_power.ring ! leanprover-community/mathlib commit fc2ed6f838ce7c9b7c71...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/Algebra/GroupPower/Ring.lean"}
#!/usr/bin/python #-*- coding: utf-8 -*- # >.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>. # Licensed under the Apache License, Version 2.0 (the "License") # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # --- File Name: shapes3d.py # --- Creation Date: 16-01-2021 # --- Last Modified: Tue 13 A...
{"hexsha": "1bcf7bc1a1dc49cb3796cf30ba83ab69627ad026", "size": 6158, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/shapes3d.py", "max_stars_repo_name": "zhuxinqimac/CommutativeLieGroupVAE-Pytorch", "max_stars_repo_head_hexsha": "06020834b1ea4abff305d8fb300c3d8fba5b0f27", "max_stars_repo_licenses": ["A...
### A Pluto.jl notebook ### # v0.19.0 using Markdown using InteractiveUtils # ╔═╡ 9ec6149e-6acd-414c-8902-798771573672 function is_notebook(p) startswith(read(p, String), "### A Pluto") end; # ╔═╡ bdf53020-635d-4cc9-8a0e-a612ca470e85 hook_link(p) = replace(p, ".jl" => ".html"); # ╔═╡ 7c852ed0-36b8-43ea-8ee8-c4bd45...
{"hexsha": "402bea1c18fb7d9ff62c9862220f086d457d9889", "size": 1978, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/index.jl", "max_stars_repo_name": "JuliaPluto/PlutoLinks.jl", "max_stars_repo_head_hexsha": "37f61b16c218c88cc8eb85d81413de00dafcfbb9", "max_stars_repo_licenses": ["Unlicense"], "max_stars_cou...
# Copyright 2020 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": "3ba3eb64ed2291a03f1060e405b8d82ef2526ce0", "size": 1283, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ut/python/pipeline/parse/test_if_function.py", "max_stars_repo_name": "GuoSuiming/mindspore", "max_stars_repo_head_hexsha": "48afc4cfa53d970c0b20eedfb46e039db2a133d5", "max_stars_repo_licens...
/*********************************************************************************** * Copyright (c) 2016, UT-Battelle * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions o...
{"hexsha": "ac0994e177757e349424274dccea61a2a33b604a", "size": 13177, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ir/tests/PauliOperatorTester.cpp", "max_stars_repo_name": "czhao39/xacc-vqe", "max_stars_repo_head_hexsha": "4ad1d9308794e28c37772b7ea29cd3923388168a", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
[STATEMENT] lemma LIMSEQ_offset: "(\<lambda>n. f (n + k)) \<longlonglongrightarrow> a \<Longrightarrow> f \<longlonglongrightarrow> a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>n. f (n + k)) \<longlonglongrightarrow> a \<Longrightarrow> f \<longlonglongrightarrow> a [PROOF STEP] unfolding tendsto_def ...
{"llama_tokens": 239, "file": null, "length": 2}
from scipy.spatial import distance def getRelationDistance(entityData, x=650, y=740): location = entityData.info.location loc = location.split() x1 = float(loc[0]) y1 = float(loc[1]) p = (x1, y1) xFixed = getDistanceDictionaryX(p[0], x, y) yFixed = getDistanceDictionaryY(p[1], x, y) pr...
{"hexsha": "19f894675f92d875c1e9a0c281f6ab1ecb46d221", "size": 847, "ext": "py", "lang": "Python", "max_stars_repo_path": "gradiantDescent/EntityDistance.py", "max_stars_repo_name": "perazim-io/layout-bot", "max_stars_repo_head_hexsha": "b01c440aa4ecd266e65596a1bd4cc7fcb722f715", "max_stars_repo_licenses": ["MIT"], "ma...
using jInv.Mesh using jInv.LinearSolvers using Test using KrylovMethods using Multigrid using LinearAlgebra using SparseArrays println("=== Example 2D DivSigGrad ===="); domain = [0.0, 1.0, 0.0, 1.0]; n = [50,50]; Mr = getRegularMesh(domain,n) G = getNodalGradientMatrix(Mr); Ar = G'*G; Ar = Ar ...
{"hexsha": "9f0f1d609d8a92feff1dcce2f7c9eee7d4161964", "size": 995, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Multigrid/testLinSolveMGWrapper.jl", "max_stars_repo_name": "JuliaInv/Multigrid.jl", "max_stars_repo_head_hexsha": "4b759b92eb609d59115e3537b7eb88ba05699fdc", "max_stars_repo_licenses": ["MIT"]...
@testset "construct" begin @test Double64(one(Double64)) === one(Double64) @test Double64(one(Double32)) === one(Double64) @test Double64(one(Double16)) === one(Double64) @test Double32(one(Double64)) === one(Double32) @test Double32(one(Double32)) === one(Double32) @test Double32(one(Double16)) === o...
{"hexsha": "aaa8e8b31ea97e02dc9fdd8ebeaf4d9a85909c09", "size": 3062, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/construct.jl", "max_stars_repo_name": "UnofficialJuliaMirror/DoubleFloats.jl-497a8b3b-efae-58df-a0af-a86822472b78", "max_stars_repo_head_hexsha": "ccf0c6a690f81eec84caf080c99d58d11e72432d", "m...
Require Export Arith. Require Export ArithRing. Require Export Omega. Require Export Wf_nat. Fixpoint div2 (n : nat) : nat := match n with S (S p) => S (div2 p) | _ => 0 end. Theorem div2_ind: forall (P : nat -> Prop), P 0 -> P 1 -> (forall n, P n -> P (S (S n))) -> forall n, P n. Proof. intros P H0 H1 Hstep ...
{"author": "kalfazed", "repo": "Coq---Programming-Language", "sha": "829948eab329a9781b8681249e1f1343f226c5c6", "save_path": "github-repos/coq/kalfazed-Coq---Programming-Language", "path": "github-repos/coq/kalfazed-Coq---Programming-Language/Coq---Programming-Language-829948eab329a9781b8681249e1f1343f226c5c6/Tsinghua ...
""" Copyright (C) 2020, Marek Gagolewski, https://www.gagolewski.com 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, mod...
{"hexsha": "d7c9ae6f99031a0af8a3f76fe289ea5be1d5e23f", "size": 2693, "ext": "py", "lang": "Python", "max_stars_repo_path": "do_benchmark_fastcluster.py", "max_stars_repo_name": "gagolews/clustering_results_v1", "max_stars_repo_head_hexsha": "f3007018a195124433a4bbb5b15259cf8e838334", "max_stars_repo_licenses": ["BSD-3-...
# http://archive.ics.uci.edu/ml/machine-learning-databases/optdigits/ # https://www.datacamp.com/community/tutorials/machine-learning-python#explore # Data Manipulation Library pandas # # digits = pd.read_csv("http://archive.ics.uci.edu/ml/machine-learning-databases/optdigits/optdigits.tra", header=None) # training ...
{"hexsha": "719b1524b6f6d52c4c2aeec558c1ea01953be5e1", "size": 1763, "ext": "py", "lang": "Python", "max_stars_repo_path": "Studies/Study02/Study02.py", "max_stars_repo_name": "yazici/Pamux.MachineLearning", "max_stars_repo_head_hexsha": "25816a9868eff90f849c2ec373e77f567e4a3f5e", "max_stars_repo_licenses": ["MIT"], "m...
# Copyright 2019 the ProGraML authors. # # Contact Chris Cummins <chrisc.101@gmail.com>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
{"hexsha": "0f230900dbc96e561bf6bb22bc8de615b1648c17", "size": 3023, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeplearning/ml4pl/graphs/labelled/dataflow/reachability/reachability.py", "max_stars_repo_name": "Zacharias030/ProGraML", "max_stars_repo_head_hexsha": "cd99d2c5362acd0b24ee224492bb3e8c4d4736fb",...
import os import numpy as np import torch from torch.utils.data import DataLoader from generate_data import generate_vrp_data from utils import load_model from problems import CVRP model, _ = load_model('pretrained/cvrp_50/') torch.manual_seed(1234) dataset = CVRP.make_dataset(size=50, num_samples=10) # Need a data...
{"hexsha": "e2185f921a321a9c1afb0563efd8353e810b94c0", "size": 601, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_vrp.py", "max_stars_repo_name": "asakidaisuke/attention-learn-to-route", "max_stars_repo_head_hexsha": "cb207916a23a56fc2bf28365c9936092c100f1b9", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma singleton_in_conc: "[x] : A @@ B \<longleftrightarrow> [x] : A \<and> [] : B \<or> [] : A \<and> [x] : B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ([x] \<in> A @@ B) = ([x] \<in> A \<and> [] \<in> B \<or> [] \<in> A \<and> [x] \<in> B) [PROOF STEP] by (fastforce simp: Cons_eq_append_conv ap...
{"llama_tokens": 172, "file": "Regular-Sets_Regular_Set", "length": 1}
#include <crow/app.h> #include <ast_jpeg_decoder.hpp> #include <ast_video_puller.hpp> #include <boost/endian/arithmetic.hpp> #include <string> namespace crow { namespace kvm { static const std::string rfb33VersionString = "RFB 003.003\n"; static const std::string rfb37VersionString = "RFB 003.007\n"; static const st...
{"hexsha": "747a137b8728e2768de9c70bda1136f7c3f70888", "size": 15034, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/web_kvm.hpp", "max_stars_repo_name": "hyche/bmcweb", "max_stars_repo_head_hexsha": "ebc692c9d14b59ffea43f6a83d3fc1467fe09aff", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
Inductive natural : Type := Succ : natural -> natural | Zero : natural. Inductive lst : Type := Cons : natural -> lst -> lst | Nil : lst. Inductive tree : Type := Node : natural -> tree -> tree -> tree | Leaf : tree. Inductive Pair : Type := mkpair : natural -> natural -> Pair with Zlst : Type := zcons : Pair -...
{"author": "artifactanon", "repo": "lfind_benchmarks_pldi22", "sha": "7bf78a4e51fede5a63911e82a38f86e61cef2aec", "save_path": "github-repos/coq/artifactanon-lfind_benchmarks_pldi22", "path": "github-repos/coq/artifactanon-lfind_benchmarks_pldi22/lfind_benchmarks_pldi22-7bf78a4e51fede5a63911e82a38f86e61cef2aec/clam/goal...
from __future__ import division import numpy as np import sys sys.path.append('/gpfs/projects/bsc28/tiramisu_semantic_transfer/tiramisu_source/') from tiramisu.tensorflow.core.backend import read_embeddings import os from collections import Counter, OrderedDict import matplotlib matplotlib.use('pdf') import matplotlib....
{"hexsha": "58a55b088c340a084f4f5dcaec14f26aa812c5ad", "size": 8537, "ext": "py", "lang": "Python", "max_stars_repo_path": "plots_and_analysis/on_step3/synset_feat_layer_distrib_thresholded/synset_feat_layer_distrib_fixed/plot_synset_layer_distribution_fixed.py", "max_stars_repo_name": "HPAI-BSC/neural_patterns_abstrac...
#!/usr/bin/env python from control.matlab import * from matplotlib import pyplot as plt from scipy import arange def main(): k=1.0 m=0.1 c=0.1 num = [0, 0,1] den = [m, c, k] sys1 = tf(num, den) print sys1 (y1a, T1a) = initial(sys1,X0 = [0, 1],T = arange(0, 10, 0.01)) plt.axhline(...
{"hexsha": "97376308491892ebcbfb88a230d06d74a38e4be1", "size": 431, "ext": "py", "lang": "Python", "max_stars_repo_path": "responce_initial.py", "max_stars_repo_name": "nnn112358/python-control_test", "max_stars_repo_head_hexsha": "58e1b5e6feec0477fd4bad3683fb8af470faed4f", "max_stars_repo_licenses": ["MIT"], "max_star...
function [VIn,MIn] = partition_distance(Cx,Cy) %PARTITION_DISTANCE Distance between community partitions % % This function quantifies the distance between pairs of community % partitions with information theoretic measures. % % VIn = partition_distance(Cx,Cy) % [VIn MIn] = partition_distance(Cx,Cy) % ...
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/bct/partition_distance.m"}
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{ctex} \usepackage{amsmath} %% This is package for typesetting derivations. \title{test for \LaTeX\ document} \author{thwzjx} \date{\today} \begin{document} \maketitle \tableofcontents \section{chap1} \subsection{Introduction for Real Analysis} \end{documen...
{"hexsha": "dab7ccc6e4323a87cd30c02f01f76cd50e91336c", "size": 322, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/chap1.tex", "max_stars_repo_name": "thwzjx/real-analysis", "max_stars_repo_head_hexsha": "030d44b8b85fb3e6be280dbe8d6f37c4d19bb19a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""ToupCam Camera API. Adjustments have been made to fit this project, but the original source is referenced below""" # =============================================================================== # Copyright 2015 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this f...
{"hexsha": "f8e6b39eb0132536cdcf3d4c95508d7c81b7a39e", "size": 10970, "ext": "py", "lang": "Python", "max_stars_repo_path": "camera.py", "max_stars_repo_name": "dakota0064/Fluorescent_Robotic_Imager", "max_stars_repo_head_hexsha": "423e6df956269fb2d6c438dd5fce1a6cbc947b3d", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# The Leginon software is Copyright 2004 # The Scripps Research Institute, La Jolla, CA # For terms of the license agreement # see http://ami.scripps.edu/software/leginon-license # import leginon.gui.wx.Dialog import leginon.version import sys import wx import numpy import _mysql from PIL import Image class Dialog(l...
{"hexsha": "6134c88aebeae8cf3cec6bbffb69066e3488f49c", "size": 3179, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/python2.7/site-packages/leginon/gui/wx/About.py", "max_stars_repo_name": "leschzinerlab/myami-3.2-freeHand", "max_stars_repo_head_hexsha": "974b8a48245222de0d9cfb0f433533487ecce60d", "max_star...
from __future__ import division, print_function import requests, json requests.packages.urllib3.disable_warnings() from nsepy import get_history from nsetools import Nse import MySQLdb as mysqldb import pandas as pd from StockNest.celery import app from models import company, stockData, companyTweets, predictionData,\...
{"hexsha": "b18e2d60f13ad4a6a6c2af10a010fd6ada29f244", "size": 13963, "ext": "py", "lang": "Python", "max_stars_repo_path": "StockNest/stock_backend/apis.py", "max_stars_repo_name": "vaibhavantil2/Stock-Price-Forecasting-Using-Artificial-Intelligence", "max_stars_repo_head_hexsha": "69192454542432c7120cbf95ea443b567a24...
Require Import lib. Class Size (A : Type) := size : A -> nat. Ltac gen_Size := hnf; match goal with [ |- ?A -> nat] => fix size' 1; intros s; assert(size_inst : Size A);[exact size' | idtac]; destruct s eqn:E; let term := type of s in match goal with [E : s = ?s' |- _] => let rec map s := (match s w...
{"author": "tebbi", "repo": "semantics", "sha": "1fa96bb90694f762b176cdbe15f5be9ed8aecc8c", "save_path": "github-repos/coq/tebbi-semantics", "path": "github-repos/coq/tebbi-semantics/semantics-1fa96bb90694f762b176cdbe15f5be9ed8aecc8c/gen-syntax/Size.v"}
[STATEMENT] lemma USUP_image_eq [simp]: "USUP (\<lambda>i. \<guillemotleft>i\<guillemotright> \<in>\<^sub>u \<guillemotleft>f ` A\<guillemotright>) g = (\<Squnion> i\<in>A \<bullet> g(f(i)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<Squnion> i \<in> f ` A \<bullet> g i) = (\<Squnion> i \<in> A \<bullet> g (...
{"llama_tokens": 170, "file": "UTP_utp_utp_pred_laws", "length": 1}
import torch import torch.nn as nn import torch.nn.functional as F import math import numpy as np class GCELoss(nn.Module): def __init__(self, q=0.7, k=0.5, trainset_size=50000, num_classes=2): super(GCELoss, self).__init__() self.q = q self.k = k self.weight = torch.nn.Parameter(d...
{"hexsha": "ff746569ffebaecdfbe84a97e4175016870c22a7", "size": 1573, "ext": "py", "lang": "Python", "max_stars_repo_path": "GCE/GCEloss.py", "max_stars_repo_name": "yjbang/math6380", "max_stars_repo_head_hexsha": "045bf9dd877b4b387580459fd747a4e428cbe8ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
import torch import torch.nn as nn import torch.nn.functional as f import torch.optim as optim import torch.utils.data as d import numpy as np from summariser.cnn.datasets import Predictionset from summariser.cnn.warp import WARPLoss from summariser.cnn.relative_margin_loss import RelativeMargin from summariser.utils.a...
{"hexsha": "a8f77ffa705bf733ff4a74bdbb5140505168857d", "size": 5611, "ext": "py", "lang": "Python", "max_stars_repo_path": "summariser/cnn/test_cnn.py", "max_stars_repo_name": "UKPLab/ijcai2019-relis", "max_stars_repo_head_hexsha": "8a40762dcfa90c075a4f6591cbdceb468026ef17", "max_stars_repo_licenses": ["MIT"], "max_sta...
""" Test various information theory inequalities. """ from hypothesis import given, settings, unlimited, HealthCheck import pytest import numpy as np from dit.utils.testing import distributions, markov_chains from dit import ScalarDistribution as SD from dit.divergences import (chernoff_information, ...
{"hexsha": "c4c4d197153108e3d3caa98d9c9f20ef56435214", "size": 6690, "ext": "py", "lang": "Python", "max_stars_repo_path": "dit/tests/test_inequalities.py", "max_stars_repo_name": "marwahaha/dit", "max_stars_repo_head_hexsha": "feaa7dfa87b4f6067039be4ac05c7e645fdcec3c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import argparse import sys from rvg import NumPyRVG parser = argparse.ArgumentParser( description='rvg - Random Values Generator', epilog='''NOTE: rvg can be run with no flags, which is equivalent to running `rvg --numpy float32 -limits 0 1` (i.e. sampling of the uniform(0, 1) distribution) ''' ) pars...
{"hexsha": "e5fe5144cf0f2d6c8629d0736e1d7f473b082b94", "size": 1979, "ext": "py", "lang": "Python", "max_stars_repo_path": "rvg/cli.py", "max_stars_repo_name": "zehanort/rvg", "max_stars_repo_head_hexsha": "a7aff2a5f00248e3dac45b45456a2cdb9d7de309", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_r...
"""Emmental learner.""" import collections import copy import logging import math import time from collections import defaultdict from functools import partial from typing import Dict, List, Optional, Union import numpy as np import pickle import torch from numpy import ndarray from torch import optim as optim from to...
{"hexsha": "a3ec331501b97b5daa4e25a4c76aa540687b9a71", "size": 31535, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/emmental/learner.py", "max_stars_repo_name": "mleszczy/emmental", "max_stars_repo_head_hexsha": "879902626ed9e97f43fa42fe471275cbfad52f90", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import torch from tqdm import tqdm import matplotlib.pyplot as plt import seaborn as sns from neural_clf.controllers.clf_qp_net import CLF_QP_Net from models.pvtol import ( control_affine_dynamics, u_nominal, n_controls, n_dims, low_m, high_m, low_I, high_I, ) # Bea...
{"hexsha": "d53dfc553e26ab2e40aca8230894c3a5c8a5a042", "size": 3020, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_clf/plotting/pvtol_robust_clf_qp_V.py", "max_stars_repo_name": "dawsonc/neural_clf_cbf_optimal_control", "max_stars_repo_head_hexsha": "a8fe042504efbe3370e6e7783833986ff20bbb44", "max_stars...
# 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": "e69970c21b38e4e4086daa7aa3664d6234206023", "size": 5872, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/object_detection/models/keras_models/hourglass_network_tf2_test.py", "max_stars_repo_name": "zhaowt96/models", "max_stars_repo_head_hexsha": "03182253673b0e2666ad9a33839759834c0acebd", "m...
! ! This file is released under terms of BSD license ! See LICENSE file for more information ! MODULE mo_column IMPLICIT NONE CONTAINS SUBROUTINE compute(nz, q, t, s) IMPLICIT NONE INTEGER, INTENT(IN) :: nz ! Size of the array field REAL, INTENT(INOUT) :: t(:) ! Field declared as one column only ...
{"hexsha": "57b6834237651b0bed03a783b036e3a60649167f", "size": 1672, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/claw/sca/sca32/mo_column.f90", "max_stars_repo_name": "FrostyMike/claw-compiler", "max_stars_repo_head_hexsha": "e9fe6dbd291454ce34dd58f21d102f7f1bdff874", "max_stars_repo_licenses": ["BSD-...
## Gráfica de T de rocío $f(\psi)=\sum_{i=1}^{c}\frac{z_i[1-k_i]}{1+\psi[k_i-1]}$ Fracciones del problema realizado en clase: $z_{n-Butano}=0.2$ $z_{n-Pentano}=0.25$ $z_{n-Hexano}=0.25$ $z_{n-Heptano}=0.3$ Constantes del problema realizado en clase: $K_{n-Butano}=4$ $K_{n-Pentano}=1.9$ $K_{n-Hexano}=1$ $K_...
{"hexsha": "64c3bce9c6ca66226028ea9bae2e14ab21fdae70", "size": 452216, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Playground Procesos_II.ipynb", "max_stars_repo_name": "RamiroFuentes/Procesos-de-separacion-II", "max_stars_repo_head_hexsha": "d68873f8ee3e9eb081f1040f9510335746b1a0b4", "max_stars...
# Ikeda for many ships ```python # %load imports.py """ These is the standard setup for the notebooks. """ %matplotlib inline %load_ext autoreload %autoreload 2 from jupyterthemes import jtplot jtplot.style(theme='onedork', context='notebook', ticks=True, grid=False) import pandas as pd pd.options.display.max_rows...
{"hexsha": "33ab124bfc147aa4cb6c1b7df2811b036b431cd4", "size": 507294, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "notebooks/10.2_ikeda_many.ipynb", "max_stars_repo_name": "rddaz2013/Prediction-of-roll-motion-using-fully-nonlinear-potential-flow-and-Ikedas-method", "max_stars_repo_head_hexsha": ...
# Copyright 2020 University of Groningen # # 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 i...
{"hexsha": "7193f4010ab8bb67b46ae45356d39cc6293131e2", "size": 11412, "ext": "py", "lang": "Python", "max_stars_repo_path": "polyply/src/generate_templates.py", "max_stars_repo_name": "marrink-lab/polyply_1.0", "max_stars_repo_head_hexsha": "4e48f86fb309b38391c73d8f9bcc1f7c6090d2cf", "max_stars_repo_licenses": ["Apache...
from typing import Dict, Optional, Tuple, Union import cv2 import numpy as np from . import compute, cv2ext, pages, split, unskew from .angle import Angle from .crop import ( crop_around_data, crop_around_page, CropAroundDataInPageParameters, ) from .debug_image import DebugImage, inc_debug from .exceptex...
{"hexsha": "b5f9f4c4a8f1bc9f3c71c41762fd5ee424fb9c0a", "size": 10819, "ext": "py", "lang": "Python", "max_stars_repo_path": "diptych/script.py", "max_stars_repo_name": "bansan85/diptych", "max_stars_repo_head_hexsha": "297e6b291893a6e7abaab16025dc04d7d397a493", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
# -*- coding: utf-8 -*- """ Created on Wed Sep 16 14:45:45 2020 @author: Administrator """ from pycocotools.coco import COCO import numpy as np import skimage.io as io import random import tkinter import os import cv2 from tensorflow.keras.preprocessing.image import ImageDataGenerator from PIL import I...
{"hexsha": "3471f71ebd893ee94ee038b2b46d52f9ced8120a", "size": 7992, "ext": "py", "lang": "Python", "max_stars_repo_path": "cocogen.py", "max_stars_repo_name": "ahirsharan/SegNet", "max_stars_repo_head_hexsha": "3044f5fbc78c98685ba2f1b7d45be6b60d7aaaef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "max_s...
[STATEMENT] lemma option_of_exception_\<I> [simp]: "map_\<I> id option_of_exception (exception_\<I> \<I>) = stop_\<I> \<I>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_\<I> id option_of_exception (exception_\<I> \<I>) = stop_\<I> \<I> [PROOF STEP] by(simp add: exception_\<I>_def o_def id_def[symmetric])
{"llama_tokens": 132, "file": "Constructive_Cryptography_CM_More_CC", "length": 1}
//============================================================================== // Copyright 2003 - 2013 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2013 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
{"hexsha": "33cdd2217f5c346ad967b5f1be6f99d163a53b8c", "size": 3643, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "modules/type/complex/base/unit/arithmetic/simd/min.cpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars_repo_licenses": ["BS...
import numpy as np from dipy.viz import fos from dipy.core import track_performance as pf tracks=[np.array([[0,0,0],[1,0,0,],[2,0,0]]), np.array([[3,0,0],[3.5,1,0],[4,2,0]]), np.array([[3.2,0,0],[3.7,1,0],[4.4,2,0]]), np.array([[3.4,0,0],[3.9,1,0],[4.6,2,0]]), np.arr...
{"hexsha": "359813ac2b1e4630f28656fde274b820e984ef01", "size": 1528, "ext": "py", "lang": "Python", "max_stars_repo_path": "scratch/very_scratch/check_flipping.py", "max_stars_repo_name": "JohnGriffiths/dipy", "max_stars_repo_head_hexsha": "5fb38e9b77547cdaf5eb140730444535733ae01d", "max_stars_repo_licenses": ["BSD-3-C...
[STATEMENT] lemma Levellist_unique_ex_conj_simp [simp]: "Levellist hds next ll \<Longrightarrow> (\<exists>ll. Levellist hds next ll \<and> P ll) = P ll" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Levellist hds next ll \<Longrightarrow> (\<exists>ll. Levellist hds next ll \<and> P ll) = P ll [PROOF STEP] by (aut...
{"llama_tokens": 131, "file": "BDD_LevellistProof", "length": 1}
[STATEMENT] lemma inR4': "\<Gamma> \<Rightarrow> F, G, H, I, \<Delta> \<down> n \<Longrightarrow> \<Gamma> \<Rightarrow> H, I, F, G, \<Delta> \<down> n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Gamma> \<Rightarrow> F, G, H, I, \<Delta> \<down> n \<Longrightarrow> \<Gamma> \<Rightarrow> H, I, F, G, \<Delta> \...
{"llama_tokens": 147, "file": "Propositional_Proof_Systems_SC_Depth", "length": 1}