text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
(* Property from Productive Use of Failure in Inductive Proof, Andrew Ireland and Alan Bundy, JAR 1996. This Isabelle theory is produced using the TIP tool offered at the following website: https://github.com/tip-org/tools This file was originally provided as part of TIP benchmark at the following web...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/UR/TIP_with_Proof/Prod/Prod/TIP_prop_20.thy"}
subroutine choose_model use bio_MOD implicit none integer :: i namelist /Model/ Stn, Model_ID, nutrient_uptake, grazing_formulation character(len=100) :: format_string ! open the namelist file and read station name. open(namlst,file='Model.nml',status='old',action='read') read(namlst,nml=Model) close(...
{"hexsha": "7cb523d2dc5221dc0bd8e0d81dfc1a31c160f4e5", "size": 10713, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "DRAM/NPZDFix_sRun/HOT_g2/KTW/Compile/choose_model.f90", "max_stars_repo_name": "BingzhangChen/NPZDFeCONT", "max_stars_repo_head_hexsha": "0083d46dadc4fb8fed8728816755678da8294e16", "max_stars_r...
from numpy.polynomial.polynomial import Polynomial from functools import reduce class CustomPolynomial(Polynomial): def __init__(self, coefficients): super(CustomPolynomial, self).__init__(coefficients) """ input: coefficients are a list form of [a_0, a_1, ..., a_n] """ # s...
{"hexsha": "910370d94e866c846db335ad257e2d14fdaac34b", "size": 1253, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/share/polynomial.py", "max_stars_repo_name": "bingrao/mapreduce_sss", "max_stars_repo_head_hexsha": "be469b86f3fc133e1586149f0b850a76cb85f216", "max_stars_repo_licenses": ["BSD-2-Clause"], "ma...
/* * This file is part of SRS project. * * SRS 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. * * SRS is distribut...
{"hexsha": "6440e9390befe096d1ed1afce3d577dd5df1a324", "size": 11144, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "SRS/srs.cpp", "max_stars_repo_name": "1flei/lccs-lsh", "max_stars_repo_head_hexsha": "c903e557587de366e6ad67e8681b04061989bd6f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8.0, "max_sta...
from imutils import paths import numpy as np import imutils import cv2 from random import randint new_image = cv2.imread('./dataset/%d.png' %randint(0, 1000)) # loop over the image paths for i in range(1): cv2.imwrite("org.jpg", new_image) # Load the image and convert it to grayscale image = new_image ...
{"hexsha": "a16f21417cf743b9021c6e49918e21d53ba57b57", "size": 3921, "ext": "py", "lang": "Python", "max_stars_repo_path": "contributed/Course-Project_winter96-097/captcha_break/show/contour.py", "max_stars_repo_name": "moh3n9595/class.vision", "max_stars_repo_head_hexsha": "cbcc65fd1f226273d26e44576ca7c3950faea75c", "...
#!/bin/bash # -*- mode: julia -*- #= JULIA="${JULIA:-julia --color=yes --startup-file=no}" export JULIA_PROJECT="$(dirname ${BASH_SOURCE[0]})" set -ex ${JULIA} -e 'using Pkg; Pkg.instantiate()' export JULIA_LOAD_PATH="@" exec ${JULIA} "${BASH_SOURCE[0]}" "$@" =# import BangBang import JSON import Literate import Lit...
{"hexsha": "7ba538e5c6a36199ae4386c851c280493817dcad", "size": 5252, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "maartenvd/Transducers.jl", "max_stars_repo_head_hexsha": "1e5e530241370bda913988417c33d396630182dc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18...
# ------------------------------------------------------------------------------------------------- # scientific import numpy as np # ------------------------------------------------------------------------------------------------- # system from math import sqrt from PyQuantum.Common.html import * from PyQuantum.Bipart...
{"hexsha": "bf8c099ebe6efa4dbb0e34e60ebc2d42776a4114", "size": 4870, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/PyQuantum/Bipartite/Hamiltonian.py", "max_stars_repo_name": "alexfmsu/pyquantum", "max_stars_repo_head_hexsha": "78b09987cbfecf549e67b919bb5cb2046b21ad44", "max_stars_repo_licenses": ["M...
# PyZX - Python library for quantum circuit rewriting # and optimization using the ZX-calculus # Copyright (C) 2018 - Aleks Kissinger and John van de Wetering # 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 ...
{"hexsha": "49ef72ad4acb6bd0159c2f6fe17e52b9ad41a8af", "size": 21566, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyzx/routing/architecture.py", "max_stars_repo_name": "VladMoldoveanu/pyzx", "max_stars_repo_head_hexsha": "8a7d7dabf8492f570fc3f0851bcdb7377144dbc4", "max_stars_repo_licenses": ["Apache-2.0"], "...
import h5py import logging import numpy as np from pybind_isce3.core import LUT2d, DateTime, Orbit, Attitude, EulerAngles from pybind_isce3.product import RadarGridParameters from pybind_isce3.geometry import DEMInterpolator from pybind_nisar.h5 import set_string from pybind_nisar.types import complex32 from pybind_nis...
{"hexsha": "5a846aafbf6b2f6a8adbcc53ab400aceb5cd427b", "size": 19071, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/packages/pybind_nisar/products/writers/SLC.py", "max_stars_repo_name": "isce-framework/isce3", "max_stars_repo_head_hexsha": "59cdd2c659a4879367db5537604b0ca93d26b372", "max_stars_repo_lic...
''' Test Sciris printing functions. ''' import numpy as np import sciris as sc def test_colorize(): sc.heading('Test text colorization') sc.colorize(showhelp=True) print('Simple example:') sc.colorize('green', 'hi') print('More complicated example:') sc.colorize(['yellow', 'bgblack']) pri...
{"hexsha": "f88127afd2cbfc6499e07dd46845200b513c1a6f", "size": 3527, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_printing.py", "max_stars_repo_name": "optimamodel/sciris", "max_stars_repo_head_hexsha": "fc0148fd9352e443a1c9b1a790275bc2904b30b1", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include <boost/fusion/container/vector/vector20.hpp>
{"hexsha": "f6501b4c598f6eb8c7ce212555f1601b78ab02b8", "size": 54, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_container_vector_vector20.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses"...
import numpy as np import matplotlib.pyplot as plt # plt.switch_backend('agg') def plot_sequence_heatmap(data, filename=None, title=None, x_label="Positions", y_label="Nucleotides", y_ticks=None): """ Plots heatmap of sequence matrix (rows corresponds nucleotides, columns correspond to genomic location). """ ...
{"hexsha": "24c816312c8e24bc26efd768cb84122db947f7e3", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "virusnn/plotting.py", "max_stars_repo_name": "Lamicc/Corona_mutants", "max_stars_repo_head_hexsha": "89ab80da65f23e42906e0ab57da6ca50f001cdfb", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
######################################################################################################################## # Module: tests/test_resampling.py # Description: Tests for resampling schemes. # # Web: https://github.com/SamDuffield/bayesian-traffic ##############################################################...
{"hexsha": "9c039df8a7f4895fef06d6e909523c2b94d63064", "size": 2864, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_resampling.py", "max_stars_repo_name": "SamDuffield/bayesian-map-matching", "max_stars_repo_head_hexsha": "f1557f584d4411f1ee77665dae3644111b3a3a42", "max_stars_repo_licenses": ["MIT"],...
(*:maxLineLen=78:*) theory Sessions imports Base begin chapter \<open>Isabelle sessions and build management \label{ch:session}\<close> text \<open> An Isabelle \<^emph>\<open>session\<close> consists of a collection of related theories that may be associated with formal documents (\chref{ch:present}). There is ...
{"author": "m-fleury", "repo": "isabelle-emacs", "sha": "756c662195e138a1941d22d4dd7ff759cbf6b6b9", "save_path": "github-repos/isabelle/m-fleury-isabelle-emacs", "path": "github-repos/isabelle/m-fleury-isabelle-emacs/isabelle-emacs-756c662195e138a1941d22d4dd7ff759cbf6b6b9/src/Doc/System/Sessions.thy"}
# -*- coding: utf-8 -* import numpy as np import preprocess import logging import math import random import io logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger("paddle") logger.setLevel(logging.INFO) class NumpyRandomInt(object): def __init__(self, a, b, buf_siz...
{"hexsha": "92d51706abce63463943189ee1d620248cd07126", "size": 3553, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/quant/quant_embedding/reader.py", "max_stars_repo_name": "ZichaoGuo/PaddleSlim", "max_stars_repo_head_hexsha": "2550fb4ec86aee6155c1c8a2c9ab174e239918a3", "max_stars_repo_licenses": ["Apache-...
# Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import pyeparse as pp fname = '../pyeparse/tests/data/test_raw.edf' raw = pp.read_raw(fname) # visualize initial calibration raw.plot_calibration(title='5-Point Calibration') # creat...
{"hexsha": "a8d4d348ca415ef24037df093d1f3905ba41e84d", "size": 1328, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/plot_from_raw_to_epochs.py", "max_stars_repo_name": "Eric89GXL/pyeparse", "max_stars_repo_head_hexsha": "c1907c39276aacb0fad80034d69b537b07f82786", "max_stars_repo_licenses": ["BSD-3-Clau...
''' Applying Adversarial Auto-encoder for Estimating Human Walking Gait Index BSD 2-Clause "Simplified" License Author: Trong-Nguyen Nguyen''' import argparse, sys, os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec a...
{"hexsha": "b94d2f3eea60966f2ea03874c58826c6adf331e8", "size": 17059, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "nguyetn89/cylindrical-histogram-AAE", "max_stars_repo_head_hexsha": "fa88ef321402d8e7ad6bf6af4a6e86685c2d63f9", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
@testset "parser" begin b = Bobby.fen_to_bitboard( "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") @test b.free == ~b.taken @test_throws ArgumentError Bobby.fen_to_bitboard( "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBN") end
{"hexsha": "696aa905adeee290c14c26d2e0c218b21b5adc25", "size": 265, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_parser.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Bobby.jl-bd34264e-e812-11e8-1ee8-bfb20fea2fb4", "max_stars_repo_head_hexsha": "9814a1d987fcf64e61b1626395e6e221a09b6004",...
function s = spm_existfile(filename) % Check if a file exists on disk - a compiled routine % FORMAT S = SPM_EXISTFILE(FILENAME) % FILENAME - filename (can also be a relative or full pathname to a file) % S - logical scalar, true if the file exists and false otherwise %____________________________________________...
{"author": "leoliuf", "repo": "MRiLab", "sha": "5cdcf1f7b67759700685d3a26ffeb70e55325567", "save_path": "github-repos/MATLAB/leoliuf-MRiLab", "path": "github-repos/MATLAB/leoliuf-MRiLab/MRiLab-5cdcf1f7b67759700685d3a26ffeb70e55325567/External/MatrixUser2.2/External/spm8/spm_existfile.m"}
import json import logging import os import re import string from collections import Counter from scipy.cluster.hierarchy import ward, dendrogram import nltk from nltk.stem.snowball import SnowballStemmer from sklearn.cluster import KMeans from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifo...
{"hexsha": "1728d739f826af0d758ffed486c8473e3ce159cb", "size": 6158, "ext": "py", "lang": "Python", "max_stars_repo_path": "aarhus/sklearn_kmeans_clustering.py", "max_stars_repo_name": "mikedelong/aarhus", "max_stars_repo_head_hexsha": "0c0e94fadd65be8428fe3bd2c92928e1b23fc2a1", "max_stars_repo_licenses": ["Apache-2.0"...
// Copyright 2008 by BBN Technologies Corp. // All Rights Reserved. #include "Generic/common/leak_detection.h" // This must be the first #include #include "Generic/common/SessionLogger.h" #include "Generic/common/NullSessionLogger.h" #include "Generic/common/ConsoleSessionLogger.h" #include "Generic/common/Ou...
{"hexsha": "9316c51f2dbb10065bf9db6a5a933af086781d53", "size": 29921, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Generic/common/SessionLogger.cpp", "max_stars_repo_name": "BBN-E/serif", "max_stars_repo_head_hexsha": "1e2662d82fb1c377ec3c79355a5a9b0644606cb4", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/python2.7 # _*_ coding: utf-8 _*_ """ @Author: MarkLiu """ import matplotlib.pyplot as plt import numpy as np def plotSigmoidTest(): """ 绘制Sigmoid函数 :return: """ figure = plt.figure(figsize=(10, 10), facecolor="white") figure.clear() pltaxes = plt.subplot(111) num = np.li...
{"hexsha": "8a03b0a905311b08bfa08a95df8936db16c11e85", "size": 634, "ext": "py", "lang": "Python", "max_stars_repo_path": "LogisticRegression/plotSigmoid.py", "max_stars_repo_name": "SunnyLQ/Machine_Learning_In_Action_Algorithms", "max_stars_repo_head_hexsha": "8753e0798dd47a210f77306558185a54888e532d", "max_stars_repo...
import unittest from pyalink.alink import * import numpy as np import pandas as pd class TestVectorBiFunctionStreamOp(unittest.TestCase): def test_vectorbifunctionstreamop(self): df = pd.DataFrame([ ["1 2 3", "2 3 4"] ]) data = StreamOperator.fromDataframe(df, schemaStr="vec1 st...
{"hexsha": "7871115abccb4d410281a979c9859336fff20818", "size": 553, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/src/main/python/pyalink/alink/tests/examples/from_docs/test_vectorbifunctionstreamop.py", "max_stars_repo_name": "wenwei8268/Alink", "max_stars_repo_head_hexsha": "c00702538c95a32403985ebd34...
% !TEX root = Main.tex \chapter{Change Log} Changes in Bold were required by the Graduate School \section{Changes in v1.15} \begin{itemize} \end{itemize} \section{Changes in v1.14} \begin{itemize} \item{\bfseries Ensured double spacing in chapter titles.} \item{\bfseries Removed extra space above chapter titles.} \i...
{"hexsha": "f9f5a602be8a4ec1481e192d1b662f566415ab02", "size": 8976, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/AppB.tex", "max_stars_repo_name": "rpspringuel/maine-thesis", "max_stars_repo_head_hexsha": "c0a4c2b600f25e9c33578fe07de1b271bef4a4b0", "max_stars_repo_licenses": ["LPPL-1.3c"], "max_s...
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \copyright Copyright (c) 2022 Visual Computing group of Ulm University, Germany. See the LICENSE file at the top-level directory of this distribution. ''''''''''''''''''''''''''''''''''''''''''''''''''''...
{"hexsha": "a33ef6817df7facc4b4fbc0f1896881e1ba700bd", "size": 7371, "ext": "py", "lang": "Python", "max_stars_repo_path": "code_dl/data_ops/geom_ops_numpy.py", "max_stars_repo_name": "schellmi42/RADU", "max_stars_repo_head_hexsha": "60b86743bb1e6896d1ae7729a19bb263256fd28f", "max_stars_repo_licenses": ["MIT"], "max_st...
(** * Wand: The Magic Wand Operator *) Set Implicit Arguments. From SLF Require Import LibSepReference. From SLF Require Repr. Close Scope trm_scope. Implicit Types h : heap. Implicit Types P : Prop. Implicit Types H : hprop. Implicit Types Q : val->hprop. (* #########################################################...
{"author": "blainehansen", "repo": "coq-playground", "sha": "93619e132a7fabf9d3b796465e253469815a0266", "save_path": "github-repos/coq/blainehansen-coq-playground", "path": "github-repos/coq/blainehansen-coq-playground/coq-playground-93619e132a7fabf9d3b796465e253469815a0266/SLF/Wand.v"}
""" Adapted from https://github.com/john-hewitt/structural-probes """ import numpy as np from collections import namedtuple, defaultdict from argparse import ArgumentParser import os import torch from torch.utils.data import DataLoader, Dataset from tqdm import tqdm from transformers import AutoTokenizer import math a...
{"hexsha": "c88899ed04bc994c64cb7f07141f0a9f3092df2b", "size": 23464, "ext": "py", "lang": "Python", "max_stars_repo_path": "unsupervised_parsing/mutual_info_eval.py", "max_stars_repo_name": "tatsu-lab/mlm_inductive_bias", "max_stars_repo_head_hexsha": "2d99e2477293036949ba356c88513729244dc1f9", "max_stars_repo_license...
subroutine GetTime2(net,n,t_start,t_stop) c c read time interval to estimate a RATE change c c net is input for the time format c n is an index of the rate change c t_start and _stop are output: time span, in days since 1960, to analyze data c character*3 net character*80 string1,string2 do...
{"hexsha": "6247f705ce756cccfa1d9f50f34e1872a3aca20e", "size": 6704, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/GetTime.f", "max_stars_repo_name": "langbein-usgs/est_noise", "max_stars_repo_head_hexsha": "c29e13c3f900310f20cbc808ba30f8b1daade7b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
\chapter{Acknowledgements} This work concludes a long and at times difficult journey. I express my deep gratitude to my supervisors, Nicolas Couffin, for his guidance and knowledge, and Stefano Calzavara, for his patience and valuable comments. My thanks extend to Quarkslab for a challenging internship in an office fu...
{"hexsha": "918f380896b898455a3614a52861b9a966c7ceee", "size": 730, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "content/ack.tex", "max_stars_repo_name": "integeruser/yet-another-latex-thesis-template", "max_stars_repo_head_hexsha": "76ada9c9196a47269f22d1043e5d51c61e9ac4b5", "max_stars_repo_licenses": ["MIT"],...
using Graphs using AtomicLevels type LevelVertex config::Config term::Term calc_props::Dict exp_eng wfn end import Graphs.attributes function attributes(l::LevelVertex, g::AbstractGraph) Dict{UTF8String,Any}("label" => "$(l.config) $(l.term)") end LevelVertex(config::Config, term::Term, ...
{"hexsha": "02202ae560d03ee7bfb6980055afcac393271697", "size": 3579, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/level_graph.jl", "max_stars_repo_name": "mansour2014/AST", "max_stars_repo_head_hexsha": "fcd0026958d0006dba3bde2173e416d683a16201", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m...
[STATEMENT] lemma (in merkle_interface) merkle_interfaceD: "merge_on UNIV h bo m" [PROOF STATE] proof (prove) goal (1 subgoal): 1. merge_on UNIV h bo m [PROOF STEP] using merkle_interface_aux[of h bo m, symmetric] [PROOF STATE] proof (prove) using this: merge_on UNIV h bo m = merkle_interface h bo m goal (1 subgoal):...
{"llama_tokens": 158, "file": "ADS_Functor_Merkle_Interface", "length": 2}
import numpy as np import pytest from py3nj import clebsch_gordan rng = np.random.RandomState(0) # reference values from # https://en.wikipedia.org/wiki/Table_of_Clebsch%E2%80%93Gordan_coefficients CG = ( # j1 = 1/2, j2 = 1/2 ((1, 1, 2, 1, 1, 2), 1), ((1, 1, 2, -1, -1, -2), 1), ((1, 1, 2, 1, -1, 0)...
{"hexsha": "9dc7cf5a2afd529caeed7a7d877a4694ad635b26", "size": 956, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_cg.py", "max_stars_repo_name": "fujiisoup/py3nj", "max_stars_repo_head_hexsha": "15f179ecc21033022b05e27c681a1512e2b0e604", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
import numpy as np def half_hour(t): """ Computes the half-hour of timestamp t as integer between 0 and 47. """ return 2 * t.hour + t.minute // 30 def standardize(x, mean, std): """ Standardizes the input x by subtracting the mean and dividing by the standard deviation. """ return (x...
{"hexsha": "e1a0e349281b453f5fd0a8f42259a2eddabe90b5", "size": 2612, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "kitteltom/probabilistic-energy-forecasting", "max_stars_repo_head_hexsha": "6ebd4130e42d1b0808e5e9499acf3fb401b47315", "max_stars_repo_licenses": ["MIT"], "max_s...
# This file is based on https://github.com/onnx/onnx-tensorflow import json import warnings import sys import onnx from onnx import TensorProto from onnx import numpy_helper from onnx import shape_inference from onnx import ModelProto from onnx import GraphProto from onnx import helper # from onnx_tf.common import da...
{"hexsha": "9e9acbd4c53b1b7137eb3ace4e3beb6939c0df5d", "size": 4837, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/onnx2ln/backend.py", "max_stars_repo_name": "zhaozhixu/LightNet", "max_stars_repo_head_hexsha": "d21f056b6fbc1a241364e7c6797dbdc57e61866b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import tactic -- hide open function nat -- hide /- ## The `assumption` tactic The first tactic that we'll learn is the `assumption` tactic. This can be used when your goal is exactly one of your hypotheses. In the following example, there are three hypotheses, namely the fact that $a$ is $3$ (hypothesis `ha`), the fa...
{"author": "mmasdeu", "repo": "fundamental", "sha": "ef60218d34c089beda66b39a85a4604b3604651f", "save_path": "github-repos/lean/mmasdeu-fundamental", "path": "github-repos/lean/mmasdeu-fundamental/fundamental-ef60218d34c089beda66b39a85a4604b3604651f/src/tutorial_world/00_assumption.lean"}
""" @test_reference filename expr [by] [kw...] Tests that the expression `expr` with reference `filename` using equality test strategy `by`. The pipeline of `test_reference` is: 1. preprocess `expr` 2. read and preprocess `filename` 3. compare the results using `by` 4. if test fails in an interactive session (e....
{"hexsha": "211f510e5e0cd2b91f1354d4bbabf1ef469cbb8f", "size": 4827, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/test_reference.jl", "max_stars_repo_name": "timholy/ReferenceTests.jl", "max_stars_repo_head_hexsha": "cb4125e14656a12ea9660c22e545c5a620f85502", "max_stars_repo_licenses": ["MIT"], "max_stars_...
\section{Packages: a few favourites} \begin{frame}{\href{https://ctan.org/pkg/cleveref?lang=en}% {\text{\color{white} \tb usepackage\{cleveref\}}}} cleveref formats cross-references automatically See \cref{fig:lion}. \begin{figure} \centering \includegraphics[width=0.35\textwidth]{lio...
{"hexsha": "9a44e7eaac1ca8513d6171841a4b9dcebee81ab5", "size": 8611, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "slides/sections/packages.tex", "max_stars_repo_name": "jwalton3141/sage_latex", "max_stars_repo_head_hexsha": "6aed684ad18d4d7b7ae19bb60f99f03b5d95006d", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python3 import sys import math import numpy as np class CountTwitterPartitions(object): def __init__(self, filename, identifier, bits_per_vertex): self.meta_info = { 'twitter_rv': { 'count': 40103281, 'seperator' : '\t' }, '...
{"hexsha": "0b1d122c7674bf50bedb73637b920579e9b5c50b", "size": 4606, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tools/scripts/twitter_hilbertiled_partitions.py", "max_stars_repo_name": "rekords-uw/mosaic", "max_stars_repo_head_hexsha": "6484cc7f5e7918a363d578a89283e94771987d8a", "max_stars_repo_licenses...
import os from os.path import join import numpy as np import pandas as pd import torch from tqdm import tqdm from vae_model import BimodalVAE, CancerSamplesDataset from mmd_vae_model import Bimodal_MMD_VAE if __name__ == "__main__": if not os.path.exists("embeddings"): os.mkdir("embeddings") # Embeddi...
{"hexsha": "679cf6ca35da4fc1ae2d3918507107a610aaa4b2", "size": 1372, "ext": "py", "lang": "Python", "max_stars_repo_path": "embed_cancer_samples.py", "max_stars_repo_name": "gvisona/COSMIC_Embedding", "max_stars_repo_head_hexsha": "ee9d5f50f7ada832a83abf40b9f9ba30fc4a5220", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import cv2 import math import sys if len(sys.argv) < 2: print("Usage: compress.py [video]") print("Note: video must have a resolution lower than or equal to 384x216 px.") exit() totalBytes = 0 video = cv2.VideoCapture(sys.argv[1]) frameCount = int(video.get(cv2.CAP_PROP_FRAME_COUNT)) w...
{"hexsha": "075b9065e560c1ac4dcdeb3a533d04b795bc888e", "size": 2014, "ext": "py", "lang": "Python", "max_stars_repo_path": "compression/compress.py", "max_stars_repo_name": "oxixes/bad-apple-cg50", "max_stars_repo_head_hexsha": "9ef92d25fb723b122f8d7c65fc213e616c850fd2", "max_stars_repo_licenses": ["Unlicense"], "max_s...
import numpy as np from holoviews.element import BoxWhisker from .test_plot import TestMPLPlot, mpl_renderer class TestMPLBoxWhiskerPlot(TestMPLPlot): def test_boxwhisker_simple(self): values = np.random.rand(100) boxwhisker = BoxWhisker(values) plot = mpl_renderer.get_plot(boxwhisker) ...
{"hexsha": "1da9dd2410eaaa544fffde88820eec2c834b4624", "size": 1137, "ext": "py", "lang": "Python", "max_stars_repo_path": "holoviews/tests/plotting/matplotlib/test_boxwhisker.py", "max_stars_repo_name": "TheoMathurin/holoviews", "max_stars_repo_head_hexsha": "0defcef994d6dd6d2054f75a0e332d02d121f8b0", "max_stars_repo_...
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################################################## # ### Miscellaneous Functions # ### Module responsible for storing extra data processing functions, accuracy measures and others. ################################...
{"hexsha": "d211602357bb9f80881a08ae535b7821ded4b9e4", "size": 4099, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/misc.py", "max_stars_repo_name": "pedroananias/abd", "max_stars_repo_head_hexsha": "e5781a05704b3061e382030e8ec65c6030ccd98d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
[STATEMENT] lemma list_assn_simps[simp]: "hn_ctxt (list_assn P) [] l' = (\<up>(l'=[]))" "hn_ctxt (list_assn P) l [] = (\<up>(l=[]))" "hn_ctxt (list_assn P) [] [] = emp" "hn_ctxt (list_assn P) (a#as) (c#cs) = hn_ctxt P a c * hn_ctxt (list_assn P) as cs" "hn_ctxt (list_assn P) (a#as) [] = false" "hn_ctxt (lis...
{"llama_tokens": 1486, "file": "Refine_Imperative_HOL_Sepref_HOL_Bindings", "length": 9}
# Quick and dirty XOR 2-3-1 example network # for an example on /r/MLQuestions # Vanilla gradient descent with no momentum # Adam Smith 1.26.2017 import numpy as np # X are the inputs, Y are the outputs (the XOR truth table) X = np.array([[[1],[1]], [[0],[1]], [[1],[0]], [[0],[0]]]) Y = np.array([0, 1, 1, 0]) #Learni...
{"hexsha": "148c7d3ee17575267f7d94e9f8dfaddb953ed24b", "size": 2094, "ext": "py", "lang": "Python", "max_stars_repo_path": "xor.py", "max_stars_repo_name": "tamlovertt/DenseInL29", "max_stars_repo_head_hexsha": "d6546e3c2f4fa107bd0d34a352257972237b7cfe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import inspect import os import sys currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) import numpy as np from keras.models import Model from keras.layers import Dense, CuDNNLSTM, Bidirectional, Input, Dropout, c...
{"hexsha": "c48d825ac04cae098a999350bb316110c8826816", "size": 3640, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/a_cnn_bilstm.py", "max_stars_repo_name": "etfrenchvcu/DeepPrime2Sec", "max_stars_repo_head_hexsha": "a61146c7c7d8a0f8821717b9f7aed8703cfdb2a1", "max_stars_repo_licenses": ["Apache-2.0"], "m...
""" Implements the Multimedia Self-Supervised Grid-based (proposal-free) CNN framework """ import numpy as np import torch from torch import nn from maskrcnn_benchmark.structures.image_list import to_image_list from ..backbone import build_backbone from ..language_backbone import build_language_backbone from ..mmss_h...
{"hexsha": "67064f763ed642f7cc55bdfc2773efbecfc6ed85", "size": 4946, "ext": "py", "lang": "Python", "max_stars_repo_path": "maskrcnn_benchmark/modeling/detector/mmss_gcnn.py", "max_stars_repo_name": "mmaaz60/ovr-cnn", "max_stars_repo_head_hexsha": "28d125ae51f0216575e12b5d5ded878874131b22", "max_stars_repo_licenses": [...
import numpy as np from sklearn.linear_model import LinearRegression import os import pandas as pd import statsmodels.api as sm # Define working folder out_folder = 'results' if not os.path.exists(out_folder): os.makedirs(out_folder) os.chdir(out_folder) # Define countries and states to loop over file_list = ['A...
{"hexsha": "42e05c5c91881b919c47aa26f040fd15c15b96f7", "size": 4148, "ext": "py", "lang": "Python", "max_stars_repo_path": "req_016_facebook_average_surface_temperature/regression_and_change.py", "max_stars_repo_name": "resource-watch/blog-analysis", "max_stars_repo_head_hexsha": "b1047f0d5bb9eb7ad037f9cb7a41f1bc8d6f3d...
[STATEMENT] lemma 7: "{} \<turnstile> P IFF (Q\<^sub>1 AND Neg (PfP \<guillemotleft>P IMP Q\<^sub>1\<guillemotright>) XOR Q\<^sub>2 AND Neg (PfP \<guillemotleft>P AND Neg Q\<^sub>1 IMP Q\<^sub>2\<guillemotright>))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {} \<turnstile> local.P IFF (Q\<^sub>1 AND N...
{"llama_tokens": 662, "file": "Surprise_Paradox_Surprise_Paradox", "length": 3}
import requests from bs4 import BeautifulSoup import pandas as pd import numpy as np from datetime import date import time def add(): try: df = pd.read_csv('data pool/raw_android.csv', index_col=0) except: df = pd.DataFrame() to_add = dict() month = input('Month: ') if month in df.columns: command = inp...
{"hexsha": "7757c9f7a51d3ef3389c73cf08a0797884498ffd", "size": 3665, "ext": "py", "lang": "Python", "max_stars_repo_path": "android/sensortower_android.py", "max_stars_repo_name": "zachkongoyu/Sensor-Tower", "max_stars_repo_head_hexsha": "4d4ebebde206b11316d8814a89659e1e79a8550a", "max_stars_repo_licenses": ["MIT"], "m...
"""Unit tests for custom dot operation""" import numpy as np import torch from absl.testing import absltest from dlrm.cuda_ext import dotBasedInteract DECIMAL_MATRIX = 0 DECIMAL_LINEAR = 0 MAX_INT_VALUE = 1024 # clip integers larger than `MAX_INT_VALUE` (used in debugging only). SEED = 12345 SCALE = 1 # Scale the r...
{"hexsha": "913d36081051eaba589aec1df7e853e6643cd453", "size": 11175, "ext": "py", "lang": "Python", "max_stars_repo_path": "NVIDIA/benchmarks/dlrm/implementations/pytorch/tests/dot_based_interact.py", "max_stars_repo_name": "goswamig/training_results_v0.7", "max_stars_repo_head_hexsha": "4278ce8a0f3d4db6b5e6054277724c...
from scipy import misc import numpy as np from training import train_net import inception from inference import infere def train(location='./train/'): """ The training procedure is triggered here. OPTIONAL to run; everything that is required for testing the model must be saved to file (e.g., pickle) so t...
{"hexsha": "af06b74404d4a848fe3c856a7f8cf369a621be84", "size": 2411, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Remeus/simage", "max_stars_repo_head_hexsha": "5a81f43288a594d499a894a2311497efc48b151d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_rep...
SUBROUTINE reset_params USE precon2d, ONLY: ictrl_prec2d USE vmec_main, ONLY: iequi, ivac, ftolv, fsqr, fsqz USE vsvd, ONLY: pfac, phifac USE timer_sub, ONLY: timer IMPLICIT NONE ! 2d preconditioner ictrl_prec2d = 0 iequi = 0 ivac = -1 fsqr = 1 f...
{"hexsha": "dd51f6529b3757a74a540afee004858ff54974e6", "size": 434, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/VMEC2000/Sources/Initialization_Cleanup/reset_params.f", "max_stars_repo_name": "jonathanschilling/VMEC_8_49", "max_stars_repo_head_hexsha": "9f1954d83b2db13f4f4b58676badda4425caeeee", "max_sta...
""" pyrad.io.read_data_mxpol ======================== Functions for reading radar mxpol data files .. autosummary:: :toctree: generated/ classes - MXPOL: pyrad_MXPOL classes - MCH: pyrad_MCH utilities - read: row_stack findTimes int2float_radar readMXPOLRa...
{"hexsha": "c8db5e6a5f7700a4bf84b2a63a7247c6274d7867", "size": 37565, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyrad_proc/pyrad/io/read_data_mxpol.py", "max_stars_repo_name": "jfigui/pyrad", "max_stars_repo_head_hexsha": "7811d593bb09a7f8a621c0e8ae3f32c2b85a0254", "max_stars_repo_licenses": ["BSD-3-Cl...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "b8c383e5ae321b29a52959ea2173826dd02ea466", "size": 68655, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/DBImportConfig/common_config.py", "max_stars_repo_name": "Middlecon/DBImport", "max_stars_repo_head_hexsha": "8f19776a5f6a6e5d6eebe5c312432b8058a2e579", "max_stars_repo_licenses": ["Apache-2....
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
{"hexsha": "8d5c46dd9880f301b24271e448741200c6e12a58", "size": 3719, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/neural_networks/test_two_layer_qnn.py", "max_stars_repo_name": "FrankFeenix/qiskit-machine-learning", "max_stars_repo_head_hexsha": "ec800bc8a58b32f3052ff399d54f19a74417fc7d", "max_stars_repo...
#!/usr/bin/env python -O import os import sys import bisect import os.path import json import numpy as np from datetime import date, datetime, timedelta from netCDF4 import Dataset def main(elFile, ncFile): # read all of json in one go fp = open(elFile, "r+") lines = fp.readlines() slines = "".join...
{"hexsha": "8ef1e55f0531b033c484645c01f8d07a0ae9067e", "size": 2644, "ext": "py", "lang": "Python", "max_stars_repo_path": "scratch/EnvironmentLogger2NetCDF.py", "max_stars_repo_name": "terraref/extractors-hyperspectral", "max_stars_repo_head_hexsha": "782e3c62088257bb9c8f0f4f1d8943fa02881dc0", "max_stars_repo_licenses...
function export_protocol(iProtocol, iSubject, OutputFile) % EXPORT_PROTOCOL: Export a protocol into a zip file. % % USAGE: export_protocol(iProtocol, iSubject, OutputFile) % export_protocol(iProtocol, iSubject) : Ask for the output filename % export_protocol(iProtocol) : Expor...
{"author": "brainstorm-tools", "repo": "brainstorm3", "sha": "a892cfaabde1eaa2f9a3ac015c05b73f3739433a", "save_path": "github-repos/MATLAB/brainstorm-tools-brainstorm3", "path": "github-repos/MATLAB/brainstorm-tools-brainstorm3/brainstorm3-a892cfaabde1eaa2f9a3ac015c05b73f3739433a/toolbox/io/export_protocol.m"}
# Utility Functions # Authors: Adam Li # Edited by: Adam Li ''' Used by the user to define channels that are hard coded for analysis. ''' # Imports necessary for this function import numpy as np import re from itertools import combinations def splitpatient(patient): stringtest = patient.find('seiz') if stri...
{"hexsha": "6a9f1fc42031b58ef28519e5270318bad5e2fb93", "size": 41983, "ext": "py", "lang": "Python", "max_stars_repo_path": "datainterface/utils/utils.py", "max_stars_repo_name": "adam2392/eegdatastorage", "max_stars_repo_head_hexsha": "fc6fbaaa4d31df83b45e6d420d023fada62cfa8e", "max_stars_repo_licenses": ["Apache-2.0"...
## @type x : character f <- function(x) x for (i in 1:10) { <warning descr="x expected to be of type character, found type numeric">f(i)</warning> }
{"hexsha": "a7c89d57d82eafb85f44443c503a21b1e5c18700", "size": 151, "ext": "r", "lang": "R", "max_stars_repo_path": "testData/typing/slice.r", "max_stars_repo_name": "ktisha/TheRPlugin", "max_stars_repo_head_hexsha": "be2593c26dee8f6287d5ec0a82aebbca9c74f657", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 19, ...
# # Copyright (c) 2021 The Markovflow Contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
{"hexsha": "825bf0d6f8d8c149a140e7a62e68f038289e4560", "size": 3078, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tools/generate_random_objects.py", "max_stars_repo_name": "prakharverma/markovflow", "max_stars_repo_head_hexsha": "9b7fafc199dae2f7f3207c2945fd43f674386dc1", "max_stars_repo_licenses": ["Ap...
import os,sys import imageio import numpy as np import argparse import math from models import ResNet18 import torchvision.transforms as transforms import torch import cv2 as cv import glob as glob from numpy import clip # GPUID = 0 # os.environ["CUDA_VISIBLE_DEVICES"] = str(GPUID) # print ("PACKAGES LOADED") """ htt...
{"hexsha": "2f31bdaaf6c0891051653f61430c35b57914daaa", "size": 4881, "ext": "py", "lang": "Python", "max_stars_repo_path": "MNIST_score.py", "max_stars_repo_name": "YilongJu/Implicit-Bias-towards-the-Kernel-RegimeCauses-Mode-Collapse-in-GANs", "max_stars_repo_head_hexsha": "983fcfde19c17b4d61223df8d7433c286db6b3db", "m...
# ## Animation z = get_maximal_state(storage) z = [[z[1] for t = 1:100]..., z..., [z[end] for t = 1:100]...] T = length(z) anim = MeshCat.Animation(convert(Int, floor(1.0 / 0.01))) build_robot(mech, vis=vis) for t = 1:T MeshCat.atframe(anim, t) do set_robot(vis, mech, z[t]) end end MeshCat.setanimation!...
{"hexsha": "7296c3c4ce1357fc9c6894c762ed132b2a61b194", "size": 568, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/animations/generate/atlas_drop.jl", "max_stars_repo_name": "mcx/Dojo.jl", "max_stars_repo_head_hexsha": "0d54f76c3458f2eb979af0feb368c9c7b270100e", "max_stars_repo_licenses": ["MIT"], "max_...
import logging import items import networkx as nx import time import socket from typing import List from collections import defaultdict from nodes import BaseNode, ProcessSpec, SingleItemNode, NodeState import basecases from metrics import Metrics log = logging.getLogger() class ClusterBlueprint(object): """ ...
{"hexsha": "12b837d99266e409a75ca4c8384dfd483e26fd82", "size": 10748, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cluster.py", "max_stars_repo_name": "raokrutarth/manufacturing-os", "max_stars_repo_head_hexsha": "3186d5a2f1add5bd87b728056990613f5594148f", "max_stars_repo_licenses": ["CC0-1.0"], "max_star...
import pandas as pd import codecs import matplotlib.pyplot as plt import numpy as np import odf import math import pdfkit from uncertainties import ufloat, ufloat_fromstr from sklearn.linear_model import LinearRegression from lmfit.models import LorentzianModel from IPython.display import display, Latex pd.set_option('...
{"hexsha": "cd6493cc4cb724e4bc61dc5a516f9a91cc3ee4c0", "size": 618, "ext": "py", "lang": "Python", "max_stars_repo_path": "Advanced Physics Lab I/Ultrasonic Waves/test.py", "max_stars_repo_name": "n-khatiwada/Advanced-Physics-Lab", "max_stars_repo_head_hexsha": "61afdcecac37a5ed8ab94bd5b2ca971843dae32f", "max_stars_rep...
########################################################################## # NSAp - Copyright (C) CEA, 2016 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ##########...
{"hexsha": "2da7e42c3f95a51412946144246f6c479020f15e", "size": 7500, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyconnectomist/tests/tests_preproc/test_qspace.py", "max_stars_repo_name": "neurospin/pyconnectomist", "max_stars_repo_head_hexsha": "81881fd88d94b3c2bd401602783261a64e818a05", "max_stars_repo_lic...
from pandas.core.indexes.datetimes import date_range import frappe from frappe.utils import nowdate, add_to_date, cstr, cint, getdate import itertools import pandas as pd import numpy as np import time from frappe import _ import json import multiprocessing import os from multiprocessing.pool import ThreadP...
{"hexsha": "8cfe826b6dab1b259077936ead4daf8018b4e2cd", "size": 43534, "ext": "py", "lang": "Python", "max_stars_repo_path": "one_fm/one_fm/page/roster/roster.py", "max_stars_repo_name": "ks093/One-FM", "max_stars_repo_head_hexsha": "d89b6739f12a8ad527355f7ba31184bb635e1dad", "max_stars_repo_licenses": ["MIT"], "max_sta...
import logging import collections from typing import Dict, List, Optional, Union, Tuple, Any, Callable import numpy from dataclasses import dataclass from cephlib.units import b2ssize, b2ssize_10 from . import html from .cluster_classes import CephInfo, OSDStatus, DiskType, CephVersion, BlueStoreInfo, FileStoreInfo,...
{"hexsha": "332b3c845805db3807f80017f3763562b5308c4b", "size": 22386, "ext": "py", "lang": "Python", "max_stars_repo_path": "ceph_monitoring/visualize_osds.py", "max_stars_repo_name": "izadorozhna/ceph-monitoring", "max_stars_repo_head_hexsha": "71c8c75987ed175b335074db2741d008796078c8", "max_stars_repo_licenses": ["Ap...
import binascii import numpy as np from PIL import Image from encryption import AESCipher import sys class ImageSteganography: def image_to_matrix(self, path): image = Image.open(path) matrix = np.array(image) return matrix def matrix_to_image(self, matrix, output_image): ima...
{"hexsha": "966e4be1ddb24d126e4b1311c420b28cbe9678ed", "size": 4701, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/Steganography.py", "max_stars_repo_name": "MacBox7/Image-Steganography", "max_stars_repo_head_hexsha": "e277afc415960638ce4ecfb25caf0c7c88f0659b", "max_stars_repo_licenses": ["MIT"], "max_...
using ArgParse include("functions_closest.jl") function parse_commandline() s = ArgParseSettings() @add_arg_table! s begin "--target" help = "The alignment to search for closest matches, in fasta format" required = true "--query" help = "The sequence(s) to ...
{"hexsha": "e3e04efbe33f72dd99e30b6a41e014411b23b1c2", "size": 1375, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/closest.jl", "max_stars_repo_name": "cov-ert/julialign", "max_stars_repo_head_hexsha": "6bddd1825b6c5d0205876252fffe252411dadc5b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
\chapter{General Markov Chains} In this chapter we will study Markov chains on a general state space, i.e., state spaces that are not necessarily finite or countable. \section{Markov Chain Monte Carlo} This Section is under \work. The methods described so far are generally unsuitable for complex multivariate or mult...
{"hexsha": "1d04d6d452130b782288d80b2cadd871cadbcb48", "size": 16340, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "matlab/csebook/MCMC.tex", "max_stars_repo_name": "raazesh-sainudiin/computational-statistical-experiments", "max_stars_repo_head_hexsha": "edb33db9a05b32645e8337c03729c0b8d02fa728", "max_stars_repo...
from itertools import chain from itertools import combinations import numpy def powerset(iterable, min_size): s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(min_size, len(s) + 1)) def reduced_combinations(candidate, numbers): max_pos = num...
{"hexsha": "95d98a790179198a6c9fd43e09193b7d12c12846", "size": 1957, "ext": "py", "lang": "Python", "max_stars_repo_path": "201705/peque/main.py", "max_stars_repo_name": "rocasan/vigotech-reto", "max_stars_repo_head_hexsha": "6b45dacb80139121ae6204cc614db8e4441fc444", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
"""Module including useful functions relative to rigid motion. Functions: augment_matrix_coord: returns augmented vector get_rotation_mat_single_axis: computes rotation matrix around specificied axis (x,y or z) get_rigid_motion_mat_from_euler: computes 4X4 rigid transformation matrix, from the specified se...
{"hexsha": "6c9e318ecd4995c00046b2f500dd833a917bdbe5", "size": 3734, "ext": "py", "lang": "Python", "max_stars_repo_path": "3D_2D_Registration/modules/RigidMotionModule.py", "max_stars_repo_name": "lekooooook/Opt-GO-3D-2D-Registration", "max_stars_repo_head_hexsha": "b12f22d99ed1d8a44663c8baf5d18f0bc563388c", "max_star...
#!/usr/bin/env python -W ignore import numpy as np # матриця Леслі L = np.array([ [ 0, 6, 15], [0.5, 0, 0], [ 0, 0.5, 0] ]) # початковий розподіл популяції x0 = np.array([1, 1, 1]) # розподіл через t = 5 кроків обчислюємо як L^t * x0 t = 5 xt = np.dot(np.linalg.matrix_power(L, t), x0) print(f'x({t}) = {xt...
{"hexsha": "2e192d4510eba10bb5f53622e949de438673580e", "size": 986, "ext": "py", "lang": "Python", "max_stars_repo_path": "labs/examples/1/py/2.py", "max_stars_repo_name": "Sky-Nik/ecology-and-economics", "max_stars_repo_head_hexsha": "25dfc7bccc9b8c430eb31729805f75daebda24d0", "max_stars_repo_licenses": ["MIT"], "max_...
using Test; using LinearAlgebra; using SparseArrays; using ParamLevelSet; using Random; n = 10; B = getSpMatBuilder(Int64,Float64,n, n, 30); for k=1:10 setNext!(B,k,k,1.0); end II = getSparseMatrix(B); @test norm(II - SparseMatrixCSC(1.0I,n,n)) < 1e-14 B.V.*=100.0; reset!(B); for i=1:10 JJ = randperm(n)[1:5]; fo...
{"hexsha": "523f7aa725b9f9b487a307b3c33b7359056efbcb", "size": 483, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testSpMatBuilder.jl", "max_stars_repo_name": "JuliaInv/ParamLevelSet.jl", "max_stars_repo_head_hexsha": "d6bd68665080aeb0718e97cc873b2a5e234bd4f8", "max_stars_repo_licenses": ["MIT"], "max_star...
import sys IN_NOSETESTS = False if sys.argv and sys.argv[0].endswith('nosetests'): # pragma: no cover IN_NOSETESTS = True import warnings import re # Make sure that DeprecationWarning within this package always gets printed warnings.filterwarnings('always', category=DeprecationWarning, m...
{"hexsha": "a964584dc77e1c4f5fa736f874dfa89b4f57f46e", "size": 2780, "ext": "py", "lang": "Python", "max_stars_repo_path": "root_numpy/__init__.py", "max_stars_repo_name": "douglasdavis/root_numpy", "max_stars_repo_head_hexsha": "d337ed0bae3d59f096bcd4ea427bf3244a9a34be", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
''' All DUT alignment functions in space and time are listed here plus additional alignment check functions''' from __future__ import division import logging import sys import os from collections import Iterable import math import tables as tb import numpy as np import scipy from matplotlib.backends.backend_pdf impor...
{"hexsha": "b0d92d6ce6ddf1824814e9c83d5a5866b69734bc", "size": 129777, "ext": "py", "lang": "Python", "max_stars_repo_path": "beam_telescope_analysis/dut_alignment.py", "max_stars_repo_name": "SiLab-Bonn/beam-telescope-analysis", "max_stars_repo_head_hexsha": "69a6a79a93ddb5e32064ec61f7c5bc323165bb99", "max_stars_repo_...
import os import warnings import numpy as np import pandas as pd from tensorflow.keras import backend as K from tensorflow.keras import Model from tensorflow.python.keras.utils import tf_utils from tensorflow.python.keras.engine import data_adapter from tensorflow.python.eager import monitoring from tensorflow.pytho...
{"hexsha": "5752f6143e8573e9d6d1fd5501fc53e57a33956b", "size": 4810, "ext": "py", "lang": "Python", "max_stars_repo_path": "top_down_attention/keras_custom/engine/training.py", "max_stars_repo_name": "don-tpanic/CostsBenefitsAttention", "max_stars_repo_head_hexsha": "7221b873283c210cafd54fa895ba10b418d8ca67", "max_star...
# Linear Discriminant Analysis #### Type to represent a linear discriminant functional abstract type Discriminant{T} end struct LinearDiscriminant{T<:Real} <: Discriminant{T} w::Vector{T} b::T end length(f::LinearDiscriminant) = length(f.w) evaluate(f::LinearDiscriminant, x::AbstractVector) = dot(f.w, x) +...
{"hexsha": "46601146e7066e9e13ac6a3d7911f9a3e6ee1e6d", "size": 10150, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/lda.jl", "max_stars_repo_name": "yingqiuz/MultivariateStats.jl", "max_stars_repo_head_hexsha": "b84cbc94c04057297acc42168a58b599a984f87d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology. # SPDX-FileCopyrightText: © 2021 Lee McCuller <mcculler@mit.edu> # NOTICE: authors should document their contributions in concisely in NOTICE # with details inline ...
{"hexsha": "817576b09521c527afccf13d690703f05029eeb9", "size": 12575, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/wavestate/iirrational/representations/zpktf.py", "max_stars_repo_name": "wavestate/wavestate-iirrational", "max_stars_repo_head_hexsha": "01d6dba8b2131fa2a099a74f17e6540f30cee606", "max_stars...
import numpy as np import tensorflow as tf from model import GCN_LPA def print_statistics(features, labels, adj): n_nodes = features[2][0] n_edges = (len(adj[0]) - labels.shape[0]) // 2 n_features = features[2][1] n_labels = labels.shape[1] labeled_node_rate = 20 * n_labels / n_nodes n_intra_...
{"hexsha": "170f6e329cc1064dc67bdb2445128f0989efac20", "size": 2374, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/train.py", "max_stars_repo_name": "hwwang55/GCN-LPA", "max_stars_repo_head_hexsha": "21df23afee0912380ac682b0f80ac244140c33e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 70, "max_...
import sys import pandas as pd import numpy as np import re import nltk import pickle from sqlalchemy import create_engine from sklearn.model_selection import train_test_split from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.multioutput imp...
{"hexsha": "fd4800c3dfd941068bbd9800305444bee7504a3c", "size": 4994, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/train_classifier.py", "max_stars_repo_name": "minhtuan2000/disaster-response-pipeline-project", "max_stars_repo_head_hexsha": "bef0f33e2c5a397e6525d53dc636553edd73d002", "max_stars_repo_lic...
from __future__ import print_function from __future__ import with_statement import os import math import numpy from tqdm import tqdm from PIL import Image from configparser import ConfigParser, Error from tigre.utilities.geometry import Geometry def BrukerDataLoader(filepath, **kwargs): # BrukerDataLoader(filep...
{"hexsha": "c492ffcff48aa1df9b8570de2400eaa139a6b110", "size": 9586, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/tigre/utilities/io/BrukerDataLoader.py", "max_stars_repo_name": "tsadakane/TIGRE", "max_stars_repo_head_hexsha": "a853cd2d4a6bc9509c01414b85ca75b4448fd700", "max_stars_repo_licenses": ["BSD...
# -*- coding: utf-8 -*- """ Created on Thu Jul 2 07:06:17 2020 @author: A. Goulart """ import numpy as np import matplotlib.pyplot as plt from M1_FileReader_v2 import FileReader_1 class Method_1: def __init__(self, foldername, filename): self.it_lim = 1000 self.erro_max...
{"hexsha": "04821209fb94dfd2c60caad3c7a6b2b754509223", "size": 49623, "ext": "py", "lang": "Python", "max_stars_repo_path": "M1/M1_Method_v2.py", "max_stars_repo_name": "alexandrecg/SID", "max_stars_repo_head_hexsha": "2da81a2e18d4faa329e5c722b4b544212cf3530a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# coding: utf-8 """ description: Scikit-learn compatible implementation of the Gibberish detector based on https://github.com/rrenaud/Gibberish-Detector original author: rrenaud@github author: Suraj Iyer """ __all__ = ['GibberishDetectorClassifier'] from sklearn.base import BaseEstimator,...
{"hexsha": "6cfe419d26b1fb196bc3e4d6d89f9b5bb4cc1a08", "size": 3920, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_data_utils/nlp/gibberish_detector.py", "max_stars_repo_name": "surajiyer/python-data-utils", "max_stars_repo_head_hexsha": "d6e9bf81204a01545a3edb165c5724eb24f37c18", "max_stars_repo_licens...
#include <boost/test/unit_test.hpp> #include <boost/algorithm/string/predicate.hpp> #include <enumivo/testing/tester.hpp> #include <enumivo/chain/abi_serializer.hpp> #include <enumivo/chain/wasm_enumivo_constraints.hpp> #include <enumivo/chain/resource_limits.hpp> #include <enumivo/chain/exceptions.hpp> #include <enum...
{"hexsha": "b77afc716b6289919f6bb2435b85dfe690dc17be", "size": 4117, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/get_table_tests.cpp", "max_stars_repo_name": "dvlaicu/enumivo", "max_stars_repo_head_hexsha": "f347de9dde0571b55e3ef2b624377e49a30c6f4e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
sleep <- function(time=1) { message("Sleeping...") flush.console() Sys.sleep(time) message("Awake!") } sleep()
{"hexsha": "12ba992a0db59d172d35b848b78196d4fffff1d5", "size": 124, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Sleep/R/sleep.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_stars_repo_licenses": ["Info-ZIP"], "max_sta...
From Heapster Require Import Permissions PermissionsSpred2. From Coq Require Import Classes.RelationClasses. Section PermSet. Context {config : Type}. Record Perms2 := { in_Perms2 : forall {spred}, @perm { x | spred x } -> Prop; (* Perms_upwards_closed1 : forall (spred1 spred2 : co...
{"author": "GaloisInc", "repo": "heapster-formalization", "sha": "1c5ed40a556a2b45f8f137ba475eb4bca76dcc70", "save_path": "github-repos/coq/GaloisInc-heapster-formalization", "path": "github-repos/coq/GaloisInc-heapster-formalization/heapster-formalization-1c5ed40a556a2b45f8f137ba475eb4bca76dcc70/src/PermS.v"}
import unittest import os from shutil import rmtree import numpy as np import nifty import nifty.graph.rag as nrag class TestAccumulateStacked(unittest.TestCase): shape = (10, 256, 256) # shape = (3, 128, 128) @staticmethod def make_labels(shape): labels = np.zeros(shape, dtype='uint32') ...
{"hexsha": "6439e4c49ee906cd7c0f4e67a756f1e3ec572bd3", "size": 16326, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/test/graph/rag/test_accumulate_stacked.py", "max_stars_repo_name": "konopczynski/nifty", "max_stars_repo_head_hexsha": "dc02ac60febaabfaf9b2ee5a854bb61436ebdc97", "max_stars_repo_licen...
function visualize(states::AbstractArray, states2::AbstractArray; statenames = string.(1:length(states)), statenames2 = string.(1:length(states2)), aspect = false, resolution = (2880, 1080), statistics = false, title = "Field = ", title2 = "Field = ", units1 = ["" for i in eachindex(states)], units2 = ["" for i in eac...
{"hexsha": "ba6d7b198d1317453eb347bfbc9719f2a32e84e5", "size": 9656, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/compare.jl", "max_stars_repo_name": "sandreza/Mesoscale", "max_stars_repo_head_hexsha": "cd3f00d9697ca3c97a51a5bf617edeb3a69e4178", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
C C************************** FXVDMC ************************************ C C calculate derivative of moisture content with respect to pressure C head using extended van Genuchten characteristic equation. C for the extended van Genuchten equation this gives the value of the C overall storage coefficient, or gener...
{"hexsha": "b89a09c590bd399c224d457cb303153fa93ef445", "size": 943, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "examples/weil_exemple_withDA/my_cathy_prj/src/fxvdmc.f", "max_stars_repo_name": "BenjMy/pycathy_wrapper", "max_stars_repo_head_hexsha": "8639713acbb5bc5c5cd293b94bdafe017d03f199", "max_stars_repo_l...
# Copyright 2021 The FastEstimator 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 appl...
{"hexsha": "e17312c24a9ce0cafe32206111db432e05327f67", "size": 13197, "ext": "py", "lang": "Python", "max_stars_repo_path": "apphub/neural_architecture_search/naswot/naswot_torch.py", "max_stars_repo_name": "DwijayDS/fastestimator", "max_stars_repo_head_hexsha": "9b288cb2bd870f971ec4cee09d0b3205e1316a94", "max_stars_re...
from scipy.integrate import solve_dde import matplotlib.pyplot as plt import numpy as np def fun(t,y,Z): if y[0] >= 0.0: return [-1.0] else: return [-10.0] y0 = 1.0 jumps = [1.] tf = 2.0 tspan = [0.0, tf] delays = [] rtol = 1e-5 atol = 1e-10 sol45 = solve_dde(fun, tspan, delays, [y0], [y0]...
{"hexsha": "21290f477d9d982272d6914bd42036cb4ca98093", "size": 2005, "ext": "py", "lang": "Python", "max_stars_repo_path": "DDEs_models_test/discODEex2_RK45.py", "max_stars_repo_name": "jrmejansen/scipy", "max_stars_repo_head_hexsha": "77f4f5172f8e718de96b89bf3f015a8729a7613c", "max_stars_repo_licenses": ["BSD-3-Clause...
# Copyright 2017 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
{"hexsha": "6939ffeb3aca0c2287b26e1f61dbeb21fbaf96f2", "size": 12415, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymqttbench/bench.py", "max_stars_repo_name": "mtreinish/pymqttbench", "max_stars_repo_head_hexsha": "7b3bbd1a4de747492c3803667b2c48f9f432fb2d", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
import matplotlib.pyplot as plt import matplotlib matplotlib.rcParams['text.usetex'] = True import numpy as np # vector field def f(X, Y): U = np.maximum(0.3, X + 1) V = 0.5 * Y return 0.07 * U, 0.07 * V # action of the group def act(X, Y, a, tx=0, ty=0): newX = np.cos(a) * X - np.sin(a) * Y + tx ...
{"hexsha": "a302dd57d2d415c94b653eaa5c8a7c8c0a96f976", "size": 1508, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/image/plots/rotate_field.py", "max_stars_repo_name": "mariogeiger/se3cnn", "max_stars_repo_head_hexsha": "afd027c72e87f2c390e0a2e7c6cfc8deea34b0cf", "max_stars_repo_licenses": ["MIT"], "m...
import json from mpl_toolkits.mplot3d import Axes3D import matplotlib import pandas as pd import numpy as np import scipy.io as sio import _pickle as cPickle import time, os, math import collections from tqdm import tqdm import matplotlib.pyplot as plt import pickle import math #加载数据, 筛选重要的,三个相机都可以用 src_dir = '/media/c...
{"hexsha": "b64aca59dc7a48bbd5b8e8195ab968ebd0f26b89", "size": 11564, "ext": "py", "lang": "Python", "max_stars_repo_path": "watch_all_output_image_NYU_suoluan.py", "max_stars_repo_name": "Chenzhoujia/Mobile_hand_tf-gnn-samples-master", "max_stars_repo_head_hexsha": "56236752bb06bcc60b4befb024cdd100aa9ce9ac", "max_star...
# author : Group 27 # date : 2021-11-25 """Performs some statistical or machine learning analysis and summarizes the results as a figure(s) and a table(s) Usage: preprocess_n_model.py --file_path=<file_path> --out_file=<out_file> Options: --file_path=<file_path> Path to train processed data file for which to perfo...
{"hexsha": "d032c09722116e24b79016ac0200d7d3d21dbe39", "size": 5132, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocess_n_model.py", "max_stars_repo_name": "rezam747/DSCI_522_Spotify_Track_Popularity_Predictor", "max_stars_repo_head_hexsha": "56abceb68a57f72de855e65bdc18bdd02d229311", "max_stars_repo...
Euler Problem 51 ================ By replacing the 1st digit of the 2-digit number \*3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56\*\*3 with the same digit, this 5-digit number is the first example having seven primes among t...
{"hexsha": "84b8522e4872c6835633386fe82d58673a2c3697", "size": 3907, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Euler 051 - Prime digit replacements.ipynb", "max_stars_repo_name": "Radcliffe/project-euler", "max_stars_repo_head_hexsha": "5eb0c56e2bd523f3dc5329adb2fbbaf657e7fa38", "max_stars_rep...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
{"hexsha": "9ad0058f1ab7325e2fc26d3a117473e0d2eb5cbd", "size": 2232, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/mcscf/chkfile.py", "max_stars_repo_name": "crisely09/pyscf", "max_stars_repo_head_hexsha": "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
# -*- coding: utf-8 -*- # # plot_sequence_I_networks_perlin_size.py # # Copyright 2017 Sebastian Spreizer # The MIT License import numpy as np import matplotlib as mpl import pylab as pl from lib.circular_colormap import gen_circular_cmap from lib.panel_label import panel_label from lib.ploscb_formatting import set_f...
{"hexsha": "77de7b2ffe12d48ce7b26e49ae36913a9069316a", "size": 4980, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/plot/sequence_I_networks_perlin_size.py", "max_stars_repo_name": "babsey/spatio-temporal-activity-sequence", "max_stars_repo_head_hexsha": "bb82c7d4d3b2f85e9d2635a5479d0478868d33bb", "max_...
import copy import time import torch import argparse import numpy as np from torch.utils.data import DataLoader from deepsnap.batch import Batch from deepsnap.dataset import GraphDataset from torch_geometric.datasets import TUDataset def arg_parse(): parser = argparse.ArgumentParser(description='Pagerank argument...
{"hexsha": "54f335aaa08f79ee2a345113fcae32ab1d9765eb", "size": 8202, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/transform/ego_net.py", "max_stars_repo_name": "ruth-ann/deepsnap", "max_stars_repo_head_hexsha": "35eeb5abdb304c53b2e0a68cbbeeaa55dca286a0", "max_stars_repo_licenses": ["MIT"], "max_star...