text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import Lean syntax (name := test) "test%" ident : command open Lean.Elab open Lean.Elab.Command @[commandElab test] def elabTest : CommandElab := fun stx => do let id ← resolveGlobalConstNoOverloadWithInfo stx[1] liftTermElabM none do IO.println (repr (← Lean.Meta.Match.getEquationsFor id)) return () def f...
{"author": "Kha", "repo": "lean4-nightly", "sha": "b4c92de57090e6c47b29d3575df53d86fce52752", "save_path": "github-repos/lean/Kha-lean4-nightly", "path": "github-repos/lean/Kha-lean4-nightly/lean4-nightly-b4c92de57090e6c47b29d3575df53d86fce52752/tests/lean/run/matchEqs.lean"}
#! /usr/bin/env python import sys import numpy as np from matplotlib import pyplot as plt import ogr import gdal import geolib import extract_profile #Input DEM dem_fn = sys.argv[1] dem_ds = gdal.Open(dem_fn) dem_srs = geolib.get_srs(dem_ds) #TLS location tls_srs = geolib.wgs_srs tls_coord = (0,0,0) tls_height = 2...
{"hexsha": "1b62be35ef8af26e49d96558c7848e1769329b1b", "size": 1743, "ext": "py", "lang": "Python", "max_stars_repo_path": "tls_planner.py", "max_stars_repo_name": "dshean/tls_tools", "max_stars_repo_head_hexsha": "1bfdb1ea80a8106e797deed046a5cc35d685beb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# # Copyright 2021 Johannes Hörmann # 2020-2021 Lars Pastewka # # ### MIT license # # 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...
{"hexsha": "13515c271987da1bcfeae12fba0ee766ba8b7aa6", "size": 7984, "ext": "py", "lang": "Python", "max_stars_repo_path": "dtool_lookup_gui/widgets/graph_widget.py", "max_stars_repo_name": "IMTEK-Simulation/dtool-lookup-gui", "max_stars_repo_head_hexsha": "60e0824b2e883d756e57d933e4657645dfa7c6d4", "max_stars_repo_lic...
import os import argparse import json import numpy as np from torch import device from torch.cuda import is_available if is_available(): DEVICE = device("cuda") else: DEVICE = device("cpu") from multiml import logger def main(opts): logger.set_level(opts.loglevel) global DEVICE from utils impor...
{"hexsha": "3bf66d953c6f3fc96549411bf3d3611db4c64af2", "size": 7871, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/pytorch/run_multi_connection_asngnas.py", "max_stars_repo_name": "UTokyo-ICEPP/multiml_htautau", "max_stars_repo_head_hexsha": "5f926c2291a55f57419aa0130d07e2a793fc7353", "max_stars_repo_...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Implemetation of the tracker described in paper % "MEEM: Robust Tracking via Multiple Experts using Entropy Minimization", % Jianming Zhang, Shugao Ma, Stan Sclaroff, ECCV, 2014 % % Copyright (C) 2014 Jianming Zhang % % This program is f...
{"author": "flyers", "repo": "drone-tracking", "sha": "c42e1833acfb858ac8f4ec69fa04ab02ac4c19ad", "save_path": "github-repos/MATLAB/flyers-drone-tracking", "path": "github-repos/MATLAB/flyers-drone-tracking/drone-tracking-c42e1833acfb858ac8f4ec69fa04ab02ac4c19ad/trackers/MEEM/expert_ensemble/expertsDo.m"}
# maintained by rajivak@utexas.edu from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np # from mpi4py import MPI import sys import math ###########################################################################################################...
{"hexsha": "33dba23ed516bf17018a5d8a26ee5e8070d824aa", "size": 5607, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mmd/MMD-critic/mmd.py", "max_stars_repo_name": "sthagen/christophM-interpretable-ml-book", "max_stars_repo_head_hexsha": "d8b82b8e6ab82c78d95de784a601e71025621ab2", "max_stars_repo_license...
! test with processor lattice. program cc integer n, i, j parameter (n=100) real a(n,n) !hpf$ dynamic a !hpf$ template t(n,n) !hpf$ processors p(2,2) !hpf$ align with t:: a !hpf$ distribute t(cyclic,cyclic) onto p a(1,1) = 1.0 !hpf$ realign a(i,j) with t(j,i) print *, a(1,1) ...
{"hexsha": "20b556a9c58c78c689ce16213023bc3385a3f90d", "size": 326, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/Hpfc/cc.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses": ["MIT"], "max_st...
#= Copyright (c) 2015, Intel Corporation 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 notice, this list of conditions and the followi...
{"hexsha": "fba023882bff31613e72fbc755dd640cff77dec6", "size": 2692, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constant_fold.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/CompilerTools.jl-98f049d2-a028-5a73-bd4d-a8c50ff59ab5", "max_stars_repo_head_hexsha": "ee7f80e5dc8c6b6dfefc1b8b5b037ea3...
program conditionalStatements implicit none integer a, b, c, result; print *, "Enter value of a :"; read *, a; print *, "Enter value of b :"; read *, b; print *, "Enter value of c :"; read *, c; if( a < b) then if(a < c) then result = a; ...
{"hexsha": "82e4df3c4960d055200f390165ba20a5f480a73b", "size": 570, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "III-sem/NumericalMethod/FortranProgram/Practice/if-else.f95", "max_stars_repo_name": "ASHD27/JMI-MCA", "max_stars_repo_head_hexsha": "61995cd2c8306b089a9b40d49d9716043d1145db", "max_stars_repo_li...
#! Demonstrates the usage of parameterized test fixtures. #:include 'fytest.fypp' #:block TEST_SUITE('parameterized2') use mymath implicit none type :: fact_calc_t integer :: val integer :: expresult end type fact_calc_t #! This will contain the parameters of the tests, once TEST_SUITE_INIT() has ...
{"hexsha": "5b4a581585f0f399d0ee6e894ae6b476e33d356b", "size": 1726, "ext": "fpp", "lang": "FORTRAN", "max_stars_repo_path": "examples/serial/test/test_parameterized2.fpp", "max_stars_repo_name": "aradi/fytest", "max_stars_repo_head_hexsha": "9133d5dab5b582161f4fb4c4b127d7f97133e3e7", "max_stars_repo_licenses": ["BSD-2...
""" This file contains some utility functions for using ImageNet dataset and L-OBS Author: Chen Shangyu (schen025@e.ntu.edu.sg) """ import os import sys import time import math import torch import torch.nn as nn import torch.nn.init as init from torch.autograd import Variable import torch.backends.cudnn as cudnn imp...
{"hexsha": "cf6fabaa6eabb0a4a608dbdbd8384fec7b09f6c1", "size": 7059, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyTorch/ImageNet/utils.py", "max_stars_repo_name": "csyhhu/L-OBS", "max_stars_repo_head_hexsha": "346e67977955f34b10b0461ab4d60ef8d35dc145", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# flake8: noqa import pytest import embedding.training_process import numpy import tempfile from pathlib import Path import unittest import ai_training as ait pytestmark = pytest.mark.asyncio async def mock_w2v_call(payload, endpoint='words'): if endpoint == "words": return {'vectors': {"word1": [1.1, 1...
{"hexsha": "3c7cd95cc149af3c8b1a2108a6a2a912d3f88be8", "size": 6387, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/embedding/tests/test_embedding_training.py", "max_stars_repo_name": "hutomadotAI/qamatcher", "max_stars_repo_head_hexsha": "0ece9bc354aea0c104cce7f3f372aa8e83a7601b", "max_stars_repo_licenses"...
#! /usr/bin/python3 # -*- coding: utf-8 -*- import numpy as np import sys from matplotlib import pyplot as plt """ Change Layout Default Settings""" def setRcParams(): params = {'axes.facecolor' : 'white', 'axes.labelsize' : 'x-large', # xx-large 'axes.titlesize' : 'x-large', # xx-large ...
{"hexsha": "fae47b9aad467b49c40c33a5a15d839b30738e2d", "size": 3339, "ext": "py", "lang": "Python", "max_stars_repo_path": "performanceTests/results/visualize.py", "max_stars_repo_name": "formelfritz/mallocMC", "max_stars_repo_head_hexsha": "d1dba808abf63de39db56587d65b9f497f4e7a41", "max_stars_repo_licenses": ["MIT"],...
#! /usr/bin/python from tools import * import numpy import random import math import time import sys from solvers import dynamicKnapsack ''' Parametric optimizers for 0/1 knapsack - * Simulated annealer * Random Search ''' # Simulated annealer - optimizing solutions to 0/1 # knapsack - climber can get close to opti...
{"hexsha": "7bb8e949bb8fff29d92d8a55ec1a8e41330dfdd9", "size": 1787, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/parametric.py", "max_stars_repo_name": "lbenning/Knapsack", "max_stars_repo_head_hexsha": "1b06409bafc04210837b984fb638804794faada6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ...
import tensorflow as tf import numpy as np EPSILON = 1e-6 class BN_Conv(object): def __init__(self, var_scope, is_training, filter_width, in_channels, out_channels, dilation = 1): self.var_scope = var_scope self.filter_width = filter_width self.in_channels = in_channels self.out_channels = out_channels sel...
{"hexsha": "ed1c014c81f500fd0da0501b2680997a244452fe", "size": 8427, "ext": "py", "lang": "Python", "max_stars_repo_path": "BN_layers.py", "max_stars_repo_name": "wanglabcumc/VariationalHomologEncoder", "max_stars_repo_head_hexsha": "b2ae5244bd651042fbe29e1a3769c07122c8c145", "max_stars_repo_licenses": ["MIT"], "max_st...
from couplib.myreportservice import * from couplib.constants import * from configuration import * from math import * import numpy as np #------------------------------------------------------------------------------- class AtomInterface(): """Interface class for the ionfromation about atoms (primarely read from PDB f...
{"hexsha": "9c3f589d0bc8ae11c54cb56221ffbf854333066e", "size": 9047, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/interfaces.py", "max_stars_repo_name": "DKosenkov/PyFREC", "max_stars_repo_head_hexsha": "a578f649b1309f1e23412e3695cce2b9e48fda3d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import numpy as np def multiclass_accuracy(prediction, ground_truth): """ Computes metrics for multiclass classification Arguments: prediction, np array of int (num_samples) - model predictions ground_truth, np array of int (num_samples) - true labels Returns: accuracy - ratio of accurate...
{"hexsha": "6add0c161a5ae57b20e87863390c4964d2fdb403", "size": 551, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignments/assignment2/metrics.py", "max_stars_repo_name": "DenisYarullin/dlcourse_ai", "max_stars_repo_head_hexsha": "3e29c0c0ae59479424a14c391dca0948682d7fa5", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # nnutil2 - Tensorflow utilities for training neural networks # Copyright (c) 2019, Abdó Roig-Maranges <abdo.roig@gmail.com> # # This file is part of 'nnutil2'. # # This file may be modified and distributed under the terms of the 3-clause BSD # license. See the LICENSE fi...
{"hexsha": "c56f071f33f99f5b560e8d112d59df536553c39a", "size": 1167, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data_merge.py", "max_stars_repo_name": "aroig/nnutil2", "max_stars_repo_head_hexsha": "1fc77df351d4eee1166688e25a94287a5cfa27c4", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun...
[STATEMENT] lemma RSubmodule_RSpan_single : assumes "m \<in> M" shows "RSubmodule (RSpan [m])" [PROOF STATE] proof (prove) goal (1 subgoal): 1. RSubmodule (RSpan [m]) [PROOF STEP] proof (rule RSubmoduleI) [PROOF STATE] proof (state) goal (2 subgoals): 1. VecGroup.Subgroup (RSpan [m]) 2. \<And>r n. \<lbrakk>r \...
{"llama_tokens": 1802, "file": "Rep_Fin_Groups_Rep_Fin_Groups", "length": 20}
# import some common detectron2 utilities from detectron2.engine import DefaultPredictor, DefaultTrainer from detectron2.config import get_cfg from detectron2.utils.visualizer import Visualizer from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.data.datasets import register_coco_instances from ...
{"hexsha": "be251b45e14d0b39587d2e1d3dbed1b6dfaa1ac0", "size": 6166, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo/demo_train_middle_fusion.py", "max_stars_repo_name": "Jamie725/RGBT-detection", "max_stars_repo_head_hexsha": "e7741bf0a8bdfb940794248a6d3247e4a5025dc4", "max_stars_repo_licenses": ["Apache-2...
################################################################################## # Woldenberg a la Bonica # This code runs a Bonica-like algorithm to provide a dynamic view of Woldenberg's # IFE. The first run has already been saved ("posterior-samples/wold23-window-results-compress.RData") # March 19, 2013: Add par...
{"hexsha": "ff2f73f984106fc8d71fac239c54160cc75b960e", "size": 19677, "ext": "r", "lang": "R", "max_stars_repo_path": "code/ifeJagsDynWoldenbergBonica.r", "max_stars_repo_name": "grosasballina/ife-update", "max_stars_repo_head_hexsha": "174e3bfdffa6e84bff9fe70defe1e8afff05c7d6", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import pytest from napari.components.layerlist import LayerList from napari.layers import Image, Points @pytest.fixture def layer_list(): return LayerList() @pytest.fixture def points_layer(): return Points() @pytest.fixture def image_layer(): data = np.ones((10, 10)) data[::2,...
{"hexsha": "b8f0f3efa562b00339650897422361c6530fc0a9", "size": 353, "ext": "py", "lang": "Python", "max_stars_repo_path": "napari/utils/context/_tests/conftest.py", "max_stars_repo_name": "Napari/napari", "max_stars_repo_head_hexsha": "2dc5aa659f875c353bfbde3b20d8f07a664ed8a8", "max_stars_repo_licenses": ["BSD-3-Clause...
import matplotlib matplotlib.use('gtk') import matplotlib.pyplot as plt import numpy as np import gdfmm import skimage.io import pdb rgb = skimage.io.imread('/home/daniel/nyu_label/rgb/r-1294439283.377657-2381571548.png') dep = skimage.io.imread('/home/daniel/nyu_label/rawdepth/r-1294439283.377657-2381571548.png') dep...
{"hexsha": "b074203152da53b9fe6070d33864b8305ca5663b", "size": 433, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/testgdfmm.py", "max_stars_repo_name": "xkjyeah/gifmm", "max_stars_repo_head_hexsha": "78ceeb08136abf902c37260df2366d9e85d156f1", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count...
using CrystallographyBase: Lattice using LinearAlgebra: I export distortby, distort, strainstate # See https://link.springer.com/content/pdf/10.1007%2F978-3-7091-0382-1_7.pdf and https://doi.org/10.2138/am-1997-1-207 distortby(lattice::Lattice, strain::TensorStrain) = Lattice((I + strain.data) * lattice.data) dis...
{"hexsha": "1990bb61cac7b78083d71384df354f2fe732af3e", "size": 559, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/distort.jl", "max_stars_repo_name": "MineralsCloud/LinearElasticity.jl", "max_stars_repo_head_hexsha": "351d7df008063d9445193cc1038840ac64c9b8bf", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# Title : SVM - draw the diagrammatic sketch # Objective : draw the diagrammatic sketch for SVM. Note that it is not the code for SVM # Created by: Wu Shangbin # Created on: 2021/12/8 import numpy as np import matplotlib.pyplot as plt from sklearn.svm import LinearSVC from sklearn.preprocessing import StandardScale...
{"hexsha": "cfa6107bed80aed481ef53a382cd846f597189e0", "size": 1507, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/SVM_draw_diagrammatic_sketch.py", "max_stars_repo_name": "595666666/tripping", "max_stars_repo_head_hexsha": "f448300c31de96089b855ee9774068d748b0cd31", "max_stars_repo_licenses": ["BSD-3-C...
(** * Induced functors between comma categories *) Require Import Category.Core Functor.Core NaturalTransformation.Core. Require Import Category.Dual. Require Import Category.Prod. Require Import NaturalTransformation.Identity. Require Import FunctorCategory.Core Cat.Core. Require Import InitialTerminalCategory.Core In...
{"author": "CPP21-Universal-Algebra-in-HoTT", "repo": "Universal-Algebra-in-HoTT", "sha": "7228b5b88684abff3c26a7eed07e1222b04fd8de", "save_path": "github-repos/coq/CPP21-Universal-Algebra-in-HoTT-Universal-Algebra-in-HoTT", "path": "github-repos/coq/CPP21-Universal-Algebra-in-HoTT-Universal-Algebra-in-HoTT/Universal-A...
# Copyright (c) 2022 PaddlePaddle 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 appli...
{"hexsha": "71a69bf85d98a33ca2cadf8bf6026881a1b4fbd3", "size": 16870, "ext": "py", "lang": "Python", "max_stars_repo_path": "paddlescience/pde/pde_navier_stokes.py", "max_stars_repo_name": "Liu-xiandong/PaddleScience", "max_stars_repo_head_hexsha": "5e667a4fe6138c22e0ff54af81d83a0b7cae4572", "max_stars_repo_licenses": ...
#!/usr/bin/env python '''Ray implementation - for general raytracing David Dunn Jan 2017 - created by splitting off from dGraph ALL UNITS ARE IN METERS ie 1 cm = .01 www.qenops.com ''' __author__ = ('David Dunn') __version__ = '1.6' import numpy as np from numpy import dot, cross from numpy.linalg import norm...
{"hexsha": "719ebb5b90605b323272e1c462473f0ce1ae44a8", "size": 8390, "ext": "py", "lang": "Python", "max_stars_repo_path": "ray.py", "max_stars_repo_name": "qenops/dGraph", "max_stars_repo_head_hexsha": "b67c835bf60f1627a79d3e22183301f34431c5b3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_sta...
# Case I example: Bad diamond II # Claudia January 2015 # types in "types.jl" if !isdefined(:individualtest) individualtest = false; end if(individualtest) include("../src/types.jl") include("../src/functions.jl") end tree = "((((8,10))#H1,7),6,(4,#H1));" # Case I Bad diamond II #f = open("prueba_tree.txt",...
{"hexsha": "db07b4f65f769ec5d2c70e2eb9a6a8a7c8521ebc", "size": 416, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/case_i_example.jl", "max_stars_repo_name": "kwsparks/PhyloNetworks.jl", "max_stars_repo_head_hexsha": "f466c13fa599cd8bc546e5ad4f2f0e5e64756805", "max_stars_repo_licenses": ["MIT"], "max_st...
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import category_theory.abelian.exact import category_theory.over /-! # Pseudoelements in abelian categories A *pseudoelement* of an object `X` in an abelian category ...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/category_theory/abelian/pseudoelements.lean"}
import os import pickle import numpy as np from sklearn.metrics import precision_score, recall_score, f1_score, precision_recall_curve import matplotlib.pyplot as plt from utils.preprocess import down_sample def point_adjust_k(scores, targets, thres, k=20): """ :param scores: anomaly score :param targets...
{"hexsha": "49c26c5d68347c85a3230a7f1fc730f1d9769d09", "size": 6707, "ext": "py", "lang": "Python", "max_stars_repo_path": "pa_k_experiments.py", "max_stars_repo_name": "kj21choi/LATAD", "max_stars_repo_head_hexsha": "80d91e0f251ad0225342ee30e2461a39fa9cca97", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
cc ------------ dpmjet3.4 - authors: S.Roesler, R.Engel, J.Ranft ------- cc -------- phojet1.12-40 - authors: S.Roesler, R.Engel, J.Ranft ------- cc - oct'13 ------- cc ----------- pythia-6.4 - authors: Torbjorn Sjostrand, Lund'10 ------- cc -------------------------...
{"hexsha": "3a13a7bd13803b9571f0c8c6eeb0ed293c288bd0", "size": 1509, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/pythia/pymemx.f", "max_stars_repo_name": "pzhristov/DPMJET", "max_stars_repo_head_hexsha": "946e001290ca5ece608d7e5d1bfc7311cda7ebaa", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
[STATEMENT] lemma rQuot_empty[simp]: "rQuot a {} = {}" and rQuot_epsilon[simp]: "rQuot a {[]} = {}" and rQuot_char[simp]: "rQuot a {[b]} = (if a = b then {[]} else {})" and rQuot_union[simp]: "rQuot a (A \<union> B) = rQuot a A \<union> rQuot a B" and rQuot_inter[simp]: "rQuot a (A \<inter> B) = rQuot ...
{"llama_tokens": 344, "file": "MSO_Regex_Equivalence_Pi_Regular_Set", "length": 1}
[STATEMENT] lemma powser_times_n_limit_0: fixes x :: "'a::{real_normed_div_algebra,banach}" assumes "norm x < 1" shows "(\<lambda>n. of_nat n * x ^ n) \<longlonglongrightarrow> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<lambda>n. of_nat n * x ^ n) \<longlonglongrightarrow> (0::'a) [PROOF STEP] proo...
{"llama_tokens": 3103, "file": null, "length": 32}
""" Tests for constraint module """ import numpy as np import pytest import quta.constraints as cons def test_concatenation(): """ Test for checking that concatenation of sets of linear constraints works. """ C_0 = np.eye(3) b_0 = np.zeros(3) n_0 = 0 C_1 = np.eye(3) * 4 b_1 = np.o...
{"hexsha": "7297406175673b656ec7b0499765d40974a47d59", "size": 2899, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/constraint_test.py", "max_stars_repo_name": "freol35241/quota", "max_stars_repo_head_hexsha": "8fafbe10d474cd18d8d18d48b497ecfe7d786189", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import pandas as pd import scipy as sp from scipy.stats import t import numpy as np # CREDITS: this script is written by github user <glesserd> (https://github.com/glesserd) # Originally available at <https://gist.github.com/glesserd/406519a4a79a49efb2353cfe05bcc6ee> #from: http://www.cookbook-r.com/Graphs/Plotting_...
{"hexsha": "0137abbbd5da17dec089f2b2039f88e624ddfa82", "size": 5540, "ext": "py", "lang": "Python", "max_stars_repo_path": "summary.py", "max_stars_repo_name": "saurabhr/psypy", "max_stars_repo_head_hexsha": "65c5c4a4603dd310d1875c7f2247882e938bc19f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
[GOAL] C : Type u₁ inst✝² : Category.{v, u₁} C D : Type u₂ inst✝¹ : Category.{v, u₂} D e : C ≌ D inst✝ : WellPowered C X : D ⊢ EssentiallySmall (MonoOver ((Equivalence.symm e).functor.obj X)) [PROOFSTEP] infer_instance
{"mathlib_filename": "Mathlib.CategoryTheory.Subobject.WellPowered", "llama_tokens": 109}
[STATEMENT] lemma cs_in_initial_state_implies_not_snapshotted: assumes "trace init t final" and "snd (cs (S t i) cid) = NotStarted" and "channel cid = Some (p, q)" shows "~ has_snapshotted (S t i) q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> ps (S t i) q \<noteq> None [PROOF STEP] pro...
{"llama_tokens": 7093, "file": "Chandy_Lamport_Snapshot", "length": 71}
#= Copyright (c) 2018-2022 Chris Coey, Lea Kapelevich, and contributors This Julia package Hypatia.jl is released under the MIT license; see LICENSE file in the root directory or at https://github.com/chriscoey/Hypatia.jl see description in native.jl =# using SparseArrays struct MatrixCompletionJuMP{T <: Real} <: E...
{"hexsha": "ffd1628391a3ae8dd2e6bf56224b956636c7e55f", "size": 1182, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/matrixcompletion/JuMP.jl", "max_stars_repo_name": "chriscoey/2021.0177-1", "max_stars_repo_head_hexsha": "a3f6258d332d2e2edc9b0e3fcd1ae9614ea9499f", "max_stars_repo_licenses": ["MIT"], "ma...
import pickle import pandas as pd import quandl import matplotlib.pyplot as plt from matplotlib import style import numpy as np from statistics import mean style.use("seaborn-dark-palette") ax1 = plt.subplot(2, 1, 1) ax2 = plt.subplot(2, 1, 2, sharex=ax1) def create_labels(cur_hpi, fut_hpi): if fut_hpi > cur_hp...
{"hexsha": "49bd0e0f8c763549f8f8d1210c2819c614f4fa2f", "size": 1451, "ext": "py", "lang": "Python", "max_stars_repo_path": "sentdex_data_analysis/pandas_mappingFunctions.py", "max_stars_repo_name": "yull1860outlook/Data-Analysis", "max_stars_repo_head_hexsha": "b777d9a75eb1acc4c899946d547e5585469a83ae", "max_stars_repo...
import awkward as ak import numpy as np import fastjet._ext # noqa: F401, E402 class _classsingleevent: def __init__(self, data, jetdef): self.jetdef = jetdef self.data = self.single_to_jagged(data) px, py, pz, E, offsets = self.extract_cons(self.data) px = self.correct_byteorder...
{"hexsha": "4fe2b3139e68f9c9004d147ba2d528b75651d323", "size": 15014, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/fastjet/_singleevent.py", "max_stars_repo_name": "scikit-hep/fastjet", "max_stars_repo_head_hexsha": "e5aebdc66167400472cd29a36f4af0f2a789a992", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
program big_integer !! this gets to 20! with int64 or 12! with int32 use, intrinsic :: iso_fortran_env, only : int64, real128 implicit none (type, external) integer(int64) :: n, i, fac integer :: ios character(2) :: argv n = 10 call get_command_argument(1, argv, status=ios) if (ios==0) read(argv,'(i2)') n if (n<0) ...
{"hexsha": "d65522ab61bd551eda4fb5df2cfbb448d344e3b8", "size": 478, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "standard/big_integer.f90", "max_stars_repo_name": "supershushu/fortran2018-examples", "max_stars_repo_head_hexsha": "f0dc03b80326bc7c06fa31945b6e7406a60c1fa8", "max_stars_repo_licenses": ["MIT"],...
#include "platform/i_platform.h" #include "network/client_system.h" #include <boost/timer.hpp> #include "core/program_state.h" #include "messsage_holder.h" #include <portable_oarchive.hpp> #include <iosfwd> #include "my_name_message.h" #include "engine/engine.h" #include "main/window.h" #include "platform/settings.h" n...
{"hexsha": "8fd706ef41362e83f8521a1d6b9e5e45edc79ae3", "size": 8185, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/network/client_system.cpp", "max_stars_repo_name": "MrPepperoni/Reaping2-1", "max_stars_repo_head_hexsha": "4ffef3cca1145ddc06ca87d2968c7b0ffd3ba3fd", "max_stars_repo_licenses": ["MIT"], "max_st...
Require Export Bedrock.Word. Require Import Fiat.Narcissus.Examples.NetworkStack.EthernetHeader Fiat.Narcissus.Examples.NetworkStack.ARPPacket Fiat.Narcissus.Examples.NetworkStack.IPv4Header Fiat.Narcissus.Examples.NetworkStack.TCP_Packet Fiat.Narcissus.Examples.NetworkStack.UDP...
{"author": "mit-plv", "repo": "fiat", "sha": "4c78284c3a88db32051bdba79202f40c645ffb7f", "save_path": "github-repos/coq/mit-plv-fiat", "path": "github-repos/coq/mit-plv-fiat/fiat-4c78284c3a88db32051bdba79202f40c645ffb7f/src/Narcissus/Examples/NetworkStack/TestInfrastructure.v"}
# !python3 # -*- coding: utf-8 -*- # author: flag import numpy as np import scipy.io # load the data from matlab of .mat def loadMatlabIdata(filename=None): data = scipy.io.loadmat(filename, mat_dtype=True, struct_as_record=True) # variable_names='CATC' return data def get_data2multi_scale(equation_name=N...
{"hexsha": "60f42957bc1b1e6311f687c49e102cadaa77c1ae", "size": 1380, "ext": "py", "lang": "Python", "max_stars_repo_path": "matData2multi_scale.py", "max_stars_repo_name": "xuzhiqin1990/MSDNN2ellipticPDEs", "max_stars_repo_head_hexsha": "ddaee034474c18bc23b51824fb6a00539c07d52c", "max_stars_repo_licenses": ["MIT"], "ma...
/* ** Author(s): ** - Herve Cuche <hcuche@aldebaran-robotics.com> ** ** Copyright (C) 2010, 2012 Aldebaran Robotics */ #include <future> #include <vector> #include <string> #include <gtest/gtest.h> #include <qi/session.hpp> #include <qi/anyobject.hpp> #include <qi/type/dynamicobjectbuilder.hpp> #include <qi/ty...
{"hexsha": "5ec872579265d7f17d0b7499a4b1837b54db136f", "size": 21691, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/messaging/test_service.cpp", "max_stars_repo_name": "yumilceh/libqi", "max_stars_repo_head_hexsha": "f094bcad506bcfd5a8dcfa7688cbcce864b0765b", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
import pandas as pd import os import yaml from yaml.loader import SafeLoader import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d # Open the file and load the file with open('C:\\Users\\jonah\\Desktop\\Projects\\Programming\\Personal\\sliceSLAM\\config.YAML') as f: cfg = yaml.load(f,...
{"hexsha": "dd8fc590267f2c5d0315ae1988366ab4b3daded1", "size": 1981, "ext": "py", "lang": "Python", "max_stars_repo_path": "modelling/plots.py", "max_stars_repo_name": "Jonah1234567/sliceSLAM", "max_stars_repo_head_hexsha": "be64f5bdabfb282cbf128a65d82609b49174750e", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include "graph.hpp" #include <fstream> #include <stack> #include <boost/filesystem.hpp> #include <boost/graph/graphviz.hpp> namespace fs = boost::filesystem; //##################################################################################################################### struct VertexWriter { Ve...
{"hexsha": "77d085167a351e8404e6adedbd0d82261b0081b5", "size": 6432, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "graph.cpp", "max_stars_repo_name": "5cript/include-graph", "max_stars_repo_head_hexsha": "be6b2b1278ec25edfb3c66bbd45be72c9deae3ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
export RBMSplit struct RBMSplit{VT,MT} <: MatrixNeuralNetwork ar::VT ac::VT b::VT Wr::MT Wc::MT end @treelike RBMSplit """ RBMSplit([T=Complex{STD_REAL_PREC}], N, α, [initW, initb, inita]) Constructs a Restricted Bolzmann Machine to encode a vectorised density matrix, with weights of type `T`...
{"hexsha": "d4945a3fadc4f8a4a7e484336fff995c872edb60", "size": 4273, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Networks/RBMSplit.jl", "max_stars_repo_name": "TheorieMPQ/NeuralQuantum.jl", "max_stars_repo_head_hexsha": "e78e2f44f83da2217965e6f4404eb29f1b87d321", "max_stars_repo_licenses": ["MIT"], "max_s...
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, Patrick Massot -/ import tactic.pi_instances import algebra.group.pi import algebra.hom.ring /-! # Pi instances for ring This file defines instances for ring, semiring and ...
{"author": "nick-kuhn", "repo": "leantools", "sha": "567a98c031fffe3f270b7b8dea48389bc70d7abb", "save_path": "github-repos/lean/nick-kuhn-leantools", "path": "github-repos/lean/nick-kuhn-leantools/leantools-567a98c031fffe3f270b7b8dea48389bc70d7abb/src/algebra/ring/pi.lean"}
""" struct CXXScopeSpec <: Any Hold a pointer to a `clang::CXXScopeSpec` object. """ struct CXXScopeSpec ptr::CXCXXScopeSpec end Base.unsafe_convert(::Type{CXCXXScopeSpec}, x::CXXScopeSpec) = x.ptr Base.cconvert(::Type{CXCXXScopeSpec}, x::CXXScopeSpec) = x
{"hexsha": "678645c4fbc66c39e6152ef508f4df99414af874", "size": 266, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/clang/core/Sema/DeclSpec.jl", "max_stars_repo_name": "vchuravy/ClangCompiler.jl", "max_stars_repo_head_hexsha": "47080072b059465f8176349c6e67bc678fa238d2", "max_stars_repo_licenses": ["MIT"], "m...
from torchvision import datasets, transforms from base import BaseDataLoader import numpy as np import cv2 import random from utils import util import torch.utils.data as data import os import torch import torch.utils.data.sampler as sampler def safe_crop(mat, x, y, crop_size=(320, 320)): crop_h, crop_w = crop_si...
{"hexsha": "bfdf69444e0f748e2604822822bc2f7b8762c706", "size": 10767, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loader/data_loaders.py", "max_stars_repo_name": "wyk0517/image-matting-experiment", "max_stars_repo_head_hexsha": "1b86bdf241468f65f3b551b48db72d277b8163db", "max_stars_repo_licenses": ["MIT...
#ifndef SAMPML_INCLUDE_FEATURE_VECTOR_HPP #define SAMPML_INCLUDE_FEATURE_VECTOR_HPP #include <dlib/matrix.h> #include "common.hpp" namespace SAMPML_NAMESPACE { template <typename T, std::size_t N> using feature_vector = dlib::matrix<T, N, 1>; } #endif /* SAMPML_INCLUDE_COMMON_HPP */
{"hexsha": "34d2e620d55beabd8e51895298e817a401ed32f9", "size": 295, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "sampml/sampml/feature_vector.hpp", "max_stars_repo_name": "YashasSamaga/sampml", "max_stars_repo_head_hexsha": "dc84110b53b120caeeb4c0234fcfd6ab16793c59", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Loads the given model and data and predicts (labels and probabilities). import pandas as pd import numpy as np import pickle import joblib import argparse import sys import os from sklearn.ensemble import RandomForestClassifier as RFC ### Configuration _datasettypes = ['covid19_infected_0','hospital_admission_12','i...
{"hexsha": "e92dc2bb2a7fe36405ed658d8364a2d9d1d3d138", "size": 3791, "ext": "py", "lang": "Python", "max_stars_repo_path": "cope.py", "max_stars_repo_name": "StephanLorenzen/Covid19PredictionEngine", "max_stars_repo_head_hexsha": "af9550a01110175989bc295006cfff1bd0babfac", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- # Author: HowkeWayne # Date: 2019/4/18 - 9:11 """ File Description... lenet-5 网络测试实验 LeNet5 implements on tensorflow """ import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector from tensorflow.examples.tutorials...
{"hexsha": "251c4a38de1966b823a9c4488f52bc5c4a5004e9", "size": 11531, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lenet-5.py", "max_stars_repo_name": "HowkeWayne/G-program", "max_stars_repo_head_hexsha": "e96df9d8c890ced88027d5eeb0734fcff7fb7ad7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
# coding: utf-8 # A [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set) is the set of complex numbers c where: # $$ # \begin{array}{c} # c \in \mathbb{C} \\\ # z_0 = 0 \\\ # z_{n+1} = z_n^2 + c \\\ # \lim_{n\to \infty} \lvert z_{n+1}\rvert \le 2 # \end{array} # $$ # # In[1]: get_ipython().magic('matplot...
{"hexsha": "42d20803449fce8088cc65e281e4ddff7686b1d1", "size": 5476, "ext": "py", "lang": "Python", "max_stars_repo_path": "mandelbrot_perf.py", "max_stars_repo_name": "stelmod/python__num_perf", "max_stars_repo_head_hexsha": "44aa6d785c67ec4b2d32638a6aee412fbf9fda6d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma M_ne_policy[intro]: "is_policy p \<Longrightarrow> s \<in> space (prob_algebra Ms) \<Longrightarrow> space M \<noteq> {}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>is_policy p; s \<in> space (prob_algebra Ms)\<rbrakk> \<Longrightarrow> space M \<noteq> {} [PROOF STEP] using space_K0 p...
{"llama_tokens": 322, "file": "MDP-Rewards_MDP_cont", "length": 2}
import cv2 import mediapipe as mp import numpy as np class HandDetector(): def __init__(self, window_shape): self.mpHands = mp.solutions.hands self.hands = self.mpHands.Hands(max_num_hands=2) self.mpDraw = mp.solutions.drawing_utils self.center = {"pitch": (0, 0), ...
{"hexsha": "e6f9f6e9b260bee29d3da32576e0a70254fa14a2", "size": 2316, "ext": "py", "lang": "Python", "max_stars_repo_path": "handdetector.py", "max_stars_repo_name": "realfolkcode/theremin", "max_stars_repo_head_hexsha": "d3694f633c91a493e64e7897ded871a68dfb5ded", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy import pandas import statsmodels.api as sm def custom_heuristic(file_path): ''' You are given a list of Titantic passengers and their associated information. More information about the data can be seen at the link below: http://www.kaggle.com/c/titanic-gettingStarted/data For this exe...
{"hexsha": "55efae8390b08133c43b22a306e42aaabe959cd1", "size": 3096, "ext": "py", "lang": "Python", "max_stars_repo_path": "aula 2/03_quiz_your_custom_heuristic.py", "max_stars_repo_name": "RichardPSilva/Udacity-Intro-to-Data-Science", "max_stars_repo_head_hexsha": "36820b186c670a4b022a623eacc21e4c18a10235", "max_stars...
# Suppress warnings import warnings warnings.filterwarnings('ignore') import pandas as pd import numpy as np import os, sys, gc, random import datetime import dateutil.relativedelta import argparse # Machine learning from sklearn.preprocessing import LabelEncoder from sklearn.impute import SimpleImputer from sklearn...
{"hexsha": "4f7d9ecde5cdd2f0a9e178c8ac49d3756019272b", "size": 7223, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/src/inference.py", "max_stars_repo_name": "bsm8734/BC_stage2_Tabular_data_Classification", "max_stars_repo_head_hexsha": "e421360f3f6f9016c58bfff2dd20485206e4a365", "max_stars_repo_licenses":...
import functools import numpy as np from scipy.stats import norm as ndist import nose.tools as nt from ..lasso import lasso, full_targets from ...tests.instance import gaussian_instance def test_onedim_lasso(n=50000, W=1.5, signal=2., sigma=1, randomizer_scale=1): beta = np.array([signal]) while True: ...
{"hexsha": "df3aea08da908cf48376120a95f767f513fb0b94", "size": 10485, "ext": "py", "lang": "Python", "max_stars_repo_path": "selectinf/randomized/tests/test_selective_MLE_onedim.py", "max_stars_repo_name": "selective-inference/Python-software", "max_stars_repo_head_hexsha": "e906fbb98946b129eb6713e8956bde7a080181f4", "...
import numpy def ToyObjective(objective): def __init__(self): pass def numVar(objective): pass def evaluate(objective): pass class Igo(object): def __init__(self,objective): self.objective = objective self.numVar_ = objective.numVar() self.mean ...
{"hexsha": "d6983730fd1c069d2aca01425251df5575e79c1a", "size": 2899, "ext": "py", "lang": "Python", "max_stars_repo_path": "seglibpython/seglib/igo/igo_opt.py", "max_stars_repo_name": "DerThorsten/seglib", "max_stars_repo_head_hexsha": "4655079e390e301dd93e53f5beed6c9737d6df9f", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from pusion.core.combiner import UtilityBasedCombiner from pusion.util.constants import * class ComplementaryOutputCombiner(UtilityBasedCombiner): """ The :class:`ComplementaryOutputCombiner` combines fully complementary decision outputs by concatenating individual decisions across cl...
{"hexsha": "c1935686495fd702deb9836682ba4ed1aa2da4ba", "size": 2153, "ext": "py", "lang": "Python", "max_stars_repo_path": "pusion/core/complementary_output_combiner.py", "max_stars_repo_name": "IPVS-AS/pusion", "max_stars_repo_head_hexsha": "58ef24b602f611192430f6005ecf5305f878f412", "max_stars_repo_licenses": ["MIT"]...
struct TimeDateZone <: NanosecondBasis timestamp::TimeDate inzone::AkoTimeZone # one of {FixedTimeZone, VariableTimeZone} atzone::FixedTimeZone # ensure other constructors will be give explictly function TimeDateZone(attime::Time, ondate::Date, inzone::VariableTimeZone, atzone::Fixed...
{"hexsha": "0dd18cfc9234417dae0a2f6a2fab95f10769d371", "size": 4295, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TimeDateZone.jl", "max_stars_repo_name": "UnofficialJuliaMirror/TimesDates.jl-bdfc003b-8df8-5c39-adcd-3a9087f5df4a", "max_stars_repo_head_hexsha": "1480b658d20532692e4b19ca70bbe50e701681a6", "m...
from mapoca.trainers.subprocess_env_manager import worker import numpy as np from typing import List, Tuple, Optional, Mapping as MappingType from mlagents_envs.base_env import ( BehaviorSpec, ObservationSpec, DimensionProperty, ObservationType, ActionSpec, DecisionSteps, TerminalSteps, ...
{"hexsha": "d58b88457eda13b8e21a53dc05d704111d471bc1", "size": 7356, "ext": "py", "lang": "Python", "max_stars_repo_path": "ma-poca/mapoca/mapoca/particles_env.py", "max_stars_repo_name": "Unity-Technologies/paper-ml-agents", "max_stars_repo_head_hexsha": "885144ee25e86b929c5acee90b9b8dc059bcb9af", "max_stars_repo_lice...
#include <ripple/app/ledger/LedgerMaster.h> #include <ripple/app/main/Application.h> #include <ripple/app/misc/NetworkOPs.h> #include <ripple/app/misc/SHAMapStore.h> #include <ripple/protocol/jss.h> #include <ripple/rpc/Context.h> #include <ripple/beast/core/LexicalCast.h> #include <boost/algorithm/string/case_conv.h...
{"hexsha": "1463ad699af3f71aea27f691eca567cb55e6193a", "size": 2548, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/ripple/rpc/handlers/CanDelete.cpp", "max_stars_repo_name": "DEEPSPACE007/DsDeFi-Exchange", "max_stars_repo_head_hexsha": "777486b799bae42a4297f9524f3ff30e0b149ef7", "max_stars_repo_licenses": ["...
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University # Berlin, 14195 Berlin, Germany. # 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 ...
{"hexsha": "8cdae65e3882a66f1ccef9dd201ff7948faf151b", "size": 7587, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyemma/coordinates/tests/test_featurereader.py", "max_stars_repo_name": "clonker/PyEMMA", "max_stars_repo_head_hexsha": "a36534ce2ec6a799428dfbdef0465c979e6c68aa", "max_stars_repo_licenses": ["BSD...
# -*- coding: utf-8 -*- """Stacking (meta ensembling). See http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/ for more information. """ # Author: Yue Zhao <zhaoy@cmu.edu> # License: BSD 2 clause import warnings import numpy as np from sklearn.linear_model import LogisticRegression from ...
{"hexsha": "01c681a57f8dbe6fe83792ae7798d75aacb5c746", "size": 10251, "ext": "py", "lang": "Python", "max_stars_repo_path": "combo/models/classifier_stacking.py", "max_stars_repo_name": "vishalbelsare/combo", "max_stars_repo_head_hexsha": "229d578de498b47ae03cf2580472aceebf8c2766", "max_stars_repo_licenses": ["BSD-2-Cl...
#include <iostream> #include <string> #include <vector> #define BOOST_TEST_MAIN #include <boost/test/included/unit_test.hpp> #include "pillowtalk.h" using namespace std; int gNumberOfHeartbeats = 0; static int callback_non_cont(pt_node_t* node) { string document = "http://127.0.0.1:5984/pt_test/"; pt_printout(n...
{"hexsha": "2197903b6bac0b29d56baa653d4006058345dfe4", "size": 1960, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_changes_feed.cpp", "max_stars_repo_name": "kuhlmannmarkus/pillowtalk", "max_stars_repo_head_hexsha": "eb752d148b9bdde6739294e5b30d30523caf4085", "max_stars_repo_licenses": ["MIT"], "max_st...
${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_pkg.sv ${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_types.sv ${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_utils.sv ${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_if.sv ${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_if_connector.sv ${TNOC_HOME}/rtl/axi_adapter/tnoc_axi_byte_counter.sv ${TNOC_HOME}/rtl/axi_adapter/...
{"hexsha": "b9b3fb2c9d843bf8df46e3fb08cdb44231b2b103", "size": 926, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "third_party/tests/Tnoc/cores/tnoc/rtl/axi_adapter/compile.f", "max_stars_repo_name": "little-blue/Surelog", "max_stars_repo_head_hexsha": "1c2459f841f6e6d923b336feacd22ccfb9aea845", "max_stars_repo...
From Coq Require Import Arith.Arith. From Coq Require Import Bool.Bool. From Coq Require Import Arith.PeanoNat. From Coq Require Import micromega.Lia. From Coq Require Import Lists.List. From Coq Require Import Reals.Reals. Import Rdefinitions. Import RIneq. From Coq Require Import ZArith.Int. Import Znat. From Coq Req...
{"author": "ChezJrk", "repo": "verified-scheduling", "sha": "e9876602147114e4378f10ac1402bd5705c0cef0", "save_path": "github-repos/coq/ChezJrk-verified-scheduling", "path": "github-repos/coq/ChezJrk-verified-scheduling/verified-scheduling-e9876602147114e4378f10ac1402bd5705c0cef0/src/Im2col.v"}
from xcal3d import * import numpy if __name__ == "__main__": import sys import os f = sys.argv[1] ext = os.path.splitext(f)[1] if ext != ".xsf": print "unsupported skeleton file, only xsf" source = open(f,"rb") pa = SkelParser() xml.sax.parse(source, pa) sk = pa.target db = dict([(b.name,b) for b in ...
{"hexsha": "49bde1ed589401c373a2d67b12accdfd2c9ff9ec", "size": 919, "ext": "py", "lang": "Python", "max_stars_repo_path": "xcal3d/showbodyinfo.py", "max_stars_repo_name": "eruffaldi/pyxcal3d", "max_stars_repo_head_hexsha": "443fb7c0c9168dbd2dc39816198933172682bde2", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
SUBROUTINE GSTURB ( szturb, ituwid, iret ) C************************************************************************ C* GSTURB * C* * C* This subroutine sets the turbulence symbol attributes. * C* * C* GSTURB ( SZTURB, ITUWID, IRET ) * C* * C* Input parameters: * C* SZTURB RE...
{"hexsha": "82acff732308c9b14f304f8331f2608589aa4e8d", "size": 1355, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gplt/attribute/gsturb.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause...
from pdb import set_trace as st import os import numpy as np import cv2 import argparse from sklearn.model_selection import train_test_split import glob parser = argparse.ArgumentParser('create subdirectories for trainin deblur gan') parser.add_argument('--fold_A', dest='fold_A', help='input directory for image A, ex. ...
{"hexsha": "38dc462b7b66daa60197d70c13aabe32a9338839", "size": 3099, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/split_train_test_val.py", "max_stars_repo_name": "piperod/DeblurGAN", "max_stars_repo_head_hexsha": "a008b9fa94f49b351a68fafaac864619f0b7d569", "max_stars_repo_licenses": ["BSD-3-Clause"]...
from decoding.strategy_utils import generate_step_with_prob, assign_single_value_long, assign_single_value_byte, assign_multi_value_long, convert_tokens import models.Constants as Constants import torch from tqdm import tqdm import numpy as np import json import math import matplotlib.pyplot as plt from matplotlib imp...
{"hexsha": "059ea08906ffd0f53cb04aada0ed87c979beb381", "size": 13299, "ext": "py", "lang": "Python", "max_stars_repo_path": "decoding/decoding/mask_predict.py", "max_stars_repo_name": "ybCliff/VideoCaptioning", "max_stars_repo_head_hexsha": "93fc3b095c970e51e1e24909163a827df98d6ef3", "max_stars_repo_licenses": ["MIT"],...
using MathOptInterface using ParametricOptInterface using BenchmarkTools const MOI = MathOptInterface const POI = ParametricOptInterface import Pkg function moi_add_variables(N::Int) model = MOI.Utilities.Model{Float64}() MOI.add_variables(model, N) return nothing end function poi_add_variables(N::Int) ...
{"hexsha": "0195067bfcc5bd5199713201078111f02ca34e83", "size": 16433, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/run_benchmarks.jl", "max_stars_repo_name": "tomasfmg/ParametricOptInterface.jl", "max_stars_repo_head_hexsha": "9f4a7c969374aa2dd16187d8d8c280684e606577", "max_stars_repo_licenses": ["MI...
[STATEMENT] lemma (in cpx_sq_mat) spectrum_to_pm_idx_bij: assumes "hermitian A" and "A\<in> fc_mats" shows "bij_betw (spectrum_to_pm_idx A) (spectrum A) {..< card (spectrum A)}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. bij_betw (spectrum_to_pm_idx A) (spectrum A) {..<card (spectrum A)} [PROOF STEP] proof - [...
{"llama_tokens": 4381, "file": "Projective_Measurements_Projective_Measurements", "length": 40}
# !/usr/bin/env python3 import os from glob import glob import numpy as np import random import time class Vocabulary(object): def __init__(self, filename, vadidate_file=False): self._id_to_word = [] self._word_to_id = {} self._unk = -1 self._bos = -1 self._eos = -1 ...
{"hexsha": "ae22f7e11bba11883e19ecaaab8507746ec1847e", "size": 7828, "ext": "py", "lang": "Python", "max_stars_repo_path": "subword/bilm/data.py", "max_stars_repo_name": "searobbersduck/ELMo_Chin", "max_stars_repo_head_hexsha": "5d9b2f0759ee3a46a4a1e20c08cc26109b7b90c9", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
module #6 where open import Level open import Data.Bool open import Relation.Binary.PropositionalEquality {- Exercise 1.6. Show that if we define A × B :≡ ∏(x:2) rec2(U, A, B, x), then we can give a definition of indA×B for which the definitional equalities stated in §1.5 hold propositionally (i.e. using equality t...
{"hexsha": "b72a8d0874fdb73cce0fdb715f55eaa80b9ebfbb", "size": 1292, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Chapter1/#6.agda", "max_stars_repo_name": "CodaFi/HoTT-Exercises", "max_stars_repo_head_hexsha": "3411b253b0a49a5f9c3301df175ae8ecdc563b12", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from itertools import combinations import numpy as np class FastCausalInference: def __init__(self, data, conditional_independence_test): self.data = data sample_counts = [len(data[key]) for key in data] for sample_count in sample_counts: if sample_count != sample_counts[0]: ...
{"hexsha": "d336204a251e847bdfe13e90facfa570debc66ca", "size": 12109, "ext": "py", "lang": "Python", "max_stars_repo_path": "causal_inference.py", "max_stars_repo_name": "valerK/causal_discovery", "max_stars_repo_head_hexsha": "e3fbd3d221387f343b2ff0961d0f2faf581daeef", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
/*! \file \brief A node constraint element. Copyright (C) 2019-2021 kaoru https://www.tetengo.org/ */ #include <any> #include <iterator> #include <string_view> #include <utility> #include <vector> #include <boost/preprocessor.hpp> #include <boost/scope_exit.hpp> #include <boost/test/unit_test....
{"hexsha": "f99cd2b0dbed9997080dc232b5258570925e7db1", "size": 9417, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "library/lattice/test/src/test_tetengo.lattice.node_constraint_element.cpp", "max_stars_repo_name": "kaorut/tetengo", "max_stars_repo_head_hexsha": "3360cce3e3f4c92b18154927685986c1fa7b4e8e", "max_st...
from sympy.abc import x from sympy import factor result = factor(x**2 + 3*x) print(result) result1 = factor(x**2 - 9) print(result1) result2 = factor(x**2 - 4 * x + 4) print(result2)
{"hexsha": "3b6b524cf20fbf7b345b7cf455c27dfb4b79f358", "size": 187, "ext": "py", "lang": "Python", "max_stars_repo_path": "fat_polynomial.py", "max_stars_repo_name": "maiconloure/Learning_Python", "max_stars_repo_head_hexsha": "2999508909ace5f8ca0708cdea93b82abaaeafb2", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np from lib import common import matplotlib as mpl mpl.use("Agg") import matplotlib.pyplot as plt Vmax = 10 Vmin = -10 N_ATOMS = 51 DELTA_Z = (Vmax - Vmin) / (N_ATOMS - 1) def save_distr(vec, name): plt.cla() p = np.arange(Vmin, Vmax+DELTA_Z, DELTA_Z) plt.bar(p, vec, width=0.5) plt...
{"hexsha": "514b0cb7d25dabc7bd868fba4803ef18ffc138a5", "size": 3201, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/rainbow/distr_test.py", "max_stars_repo_name": "ChengUVa/ptan", "max_stars_repo_head_hexsha": "f9b3ef2680ff64fad52e600d73ff2bf42eee310d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
from builtins import str from builtins import range import argparse import glob import lsst.afw.image as afwImage import lsst.afw.geom as afwGeom import lsst.afw.display.ds9 as ds9 import lsst.afw.math as afwMath import numpy as np #generate counts vs. exposure time data for a directory of flat fields def linearity(...
{"hexsha": "928dbdbb113a0e8cf92e08da254afee94e61c2b4", "size": 2645, "ext": "py", "lang": "Python", "max_stars_repo_path": "Attic/linearity.py", "max_stars_repo_name": "tguillemLSST/eotest", "max_stars_repo_head_hexsha": "c6f150984fa5dff85b9805028645bf46fc846f11", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "max_...
/* Copyright (c) 2017, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * * All rights reserved. * * The Astrobee platform is licensed under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with t...
{"hexsha": "b4f3ff4cd54d2c1a5b96dbbea7d93017c42b26ad", "size": 16915, "ext": "cc", "lang": "C++", "max_stars_repo_path": "mobility/mobility/tools/teleop.cc", "max_stars_repo_name": "algprasad/astrobee", "max_stars_repo_head_hexsha": "a5697d71e0c86598b3a762cadf94e8da826171c1", "max_stars_repo_licenses": ["Apache-2.0"], ...
[STATEMENT] lemma fls_regpart_of_int [simp]: "fls_regpart (of_int i) = (of_int i :: 'a::ring_1 fps)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. fls_regpart (of_int i) = of_int i [PROOF STEP] by (simp add: fls_of_int fps_of_int)
{"llama_tokens": 115, "file": null, "length": 1}
""" src.py.spad """ import numpy as np def spad_timg(rates, eps=1e-6): return 1.0 / np.clip(rates, eps, None) def spad_logtimg(rates, eps=1e-6): # TODO: see if this name is confusing? # mean(logtimgs) or log(meantimgs)? # and which one do we need? return np.log(spad_timg(rates, eps=eps)) def inve...
{"hexsha": "54085fbc80744b80634b65f04309142a8e72c6fd", "size": 2741, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/py/spad.py", "max_stars_repo_name": "shantanu-gupta/spad-timg-denoise", "max_stars_repo_head_hexsha": "3c9e5ae004dc3175ae796499ac7827e9bc2b4573", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
from scipy.stats import ttest_ind, ttest_1samp, ttest_rel, mannwhitneyu, norm from collections import OrderedDict from numpy.random import randint import matplotlib.gridspec as gridspec from matplotlib.lines import Line2D from matplotlib.ticker import AutoMinorLocator, MultipleLocator, MaxNLocator, FixedLocator, AutoLo...
{"hexsha": "1b0eaa19094dac05c6fca80ba4ce893f2cc74d7d", "size": 23194, "ext": "py", "lang": "Python", "max_stars_repo_path": "bootstrap_contrast/old__/sandbox.py", "max_stars_repo_name": "josesho/bootstrap-contrast", "max_stars_repo_head_hexsha": "94fa42a5dc4622be016e2e522d1f07b19ba23a8d", "max_stars_repo_licenses": ["M...
import ContinuumArrays: apply, MulQuasiMatrix @testset "$(rpad("Bernstein Basis Tests",80))" begin l = Bernstein(2) d = Derivative(axes(l,1)) @test apply(*,d,l) isa BernsteinDerivative @test d*l isa BernsteinDerivative @test l' isa BernsteinDerivative @test basis(l) == l.b @test nbasis(l...
{"hexsha": "77a4bbd137fb6eeca6544503fb6586318df1ad01", "size": 2125, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/bernstein_tests.jl", "max_stars_repo_name": "JuliaGNI/CompactBasisFunctions.jl", "max_stars_repo_head_hexsha": "5a76714aca25c399d0856643aff3683d8e0f103a", "max_stars_repo_licenses": ["MIT"], "...
#! /usr/bin/env python3 """ Full-Monty Python3 and the Holy Grail """ __copyright__ = "Copyright (C) 2009, Innovations Anonymous" __version__ = "4.0" __license__ = "Public Domain" __status__ = "Development" __author__ = "Brahmjot Singh" __maintainer__ = "Brahmjot Singh" __email__ = "InnovAnon-Inc@...
{"hexsha": "1fb62e2b26c45176a943b4eed2e26c5e3c1fa4f5", "size": 64587, "ext": "py", "lang": "Python", "max_stars_repo_path": "cgc.py", "max_stars_repo_name": "InnovAnon-Inc/ProgramSynthesis", "max_stars_repo_head_hexsha": "e7132c144cba34ef167de981c063b71c23075456", "max_stars_repo_licenses": ["Unlicense"], "max_stars_co...
from __future__ import division import pickle, random import numpy as np from itertools import cycle import torch from torch.autograd import Variable all_feature_lengths = {'v_enc_onehot': 100, 'v_enc_embedding': 300, 'v_enc_dim300': 300, 'v_enc_dim2': 2, 'v_enc_dim10':...
{"hexsha": "7bfa672c5f69325048135decce88820e4d40f2a5", "size": 10192, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/science/dataset.py", "max_stars_repo_name": "YilunZhou/path-naturalness-prediction", "max_stars_repo_head_hexsha": "dec384a58297e1cd88f44eb31771d0251e0b06d4", "max_stars_repo_licenses": ["MI...
import csv import os import re from collections import defaultdict, OrderedDict import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np from smartva.data.common_data import MALE, FEMALE, ADULT, CHILD, NEONATE from smartva.grapher_prep import Graphe...
{"hexsha": "ff2c13772d8dcae20508bb7ba01015c162ce7b8d", "size": 5972, "ext": "py", "lang": "Python", "max_stars_repo_path": "smartva/cause_grapher.py", "max_stars_repo_name": "rileyhazard/SmartVA-Analyze-1", "max_stars_repo_head_hexsha": "0573eeff27d03f54e7506db4f1631c0cd9f54bbb", "max_stars_repo_licenses": ["MIT"], "ma...
from abc import abstractmethod from typing import List import numpy as np from reinvent_chemistry.link_invent.linker_descriptors import LinkerDescriptors from reinvent_scoring.scoring.component_parameters import ComponentParameters from reinvent_scoring.scoring.score_components import BaseScoreComponent from reinvent...
{"hexsha": "b7616bdf8923f69af474b3d82a140925f9871d85", "size": 1654, "ext": "py", "lang": "Python", "max_stars_repo_path": "reinvent_scoring/scoring/score_components/link_invent/base_link_invent_component.py", "max_stars_repo_name": "MolecularAI/reinvent-scoring", "max_stars_repo_head_hexsha": "f7e052ceeffd29e17e1672c3...
""" Adapted from the swiss_roll.py example packaged with Scikit-Learn. """ import matplotlib.pyplot as plt import retina.core.axes import retina.nldr as nldr import numpy as np from matplotlib import gridspec from sklearn import manifold, datasets class EventSystem(object): def __init__(self, fig): self.fi...
{"hexsha": "b27ec238bfcc54f45894e75fc8a55b694e8f321a", "size": 2943, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/nldr/swiss_roll.py", "max_stars_repo_name": "mcneela/Retina", "max_stars_repo_head_hexsha": "a2a671f6372848ac3bb3b304e681394cc6d90e85", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
import random as rnd import networkx class GraphGenerator: """ Basic graph generator class. build(size) is to be override by inheritors, called by TheGame class at the initiation There are lots of possible network configuration. The following is implemented: - GraphGeneratorSync.py - GraphG...
{"hexsha": "a32923fd249e2a86430729cc85f4dc96ce65c8a9", "size": 2666, "ext": "py", "lang": "Python", "max_stars_repo_path": "Graph/GraphGenerator.py", "max_stars_repo_name": "wolf-null/resource-network-sim", "max_stars_repo_head_hexsha": "45662a84b03156047ac9441c0e1c8c0b57b6cefe", "max_stars_repo_licenses": ["CC0-1.0"],...
""" SkyLib astrometric reduction package Built around the local Astrometry.net engine binding. Users must create an Astrometry.net solver using :func:`create_solver`, which loads indexes, and then use :func:`solve_field` to obtain an :class:`astropy.wcs.WCS` instance given a list of XY positions of field stars. """ f...
{"hexsha": "3c42ad3270452d842e167e3f86d9b16312d8b99a", "size": 11125, "ext": "py", "lang": "Python", "max_stars_repo_path": "skylib/astrometry/main.py", "max_stars_repo_name": "SkynetRTN/skylib", "max_stars_repo_head_hexsha": "58fe57053db6a048f8a72d7b453ae411a2302545", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
(**************************************************************************) (* This is part of STATES, it is distributed under the terms of the *) (* GNU Lesser General Public License version 3 *) (* (see file LICENSE for more details) *) (* ...
{"author": "ekiciburak", "repo": "impex-on-decorated-logic", "sha": "cdfd22e36e6e0c4b001d23f0cf30c73a2c6867bd", "save_path": "github-repos/coq/ekiciburak-impex-on-decorated-logic", "path": "github-repos/coq/ekiciburak-impex-on-decorated-logic/impex-on-decorated-logic-cdfd22e36e6e0c4b001d23f0cf30c73a2c6867bd/Decorations...
#include "crab_llvm/config.h" /** * Heap abstraction based on sea-dsa (https://github.com/seahorn/sea-dsa). */ #include "llvm/IR/Module.h" #include "llvm/IR/Function.h" #include "llvm/IR/Value.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/InstIterator.h" #include "llvm/Support/raw_ostream.h" #include "sea...
{"hexsha": "406de96007ccded92c6790940ae62890ed9f6b4b", "size": 16168, "ext": "cc", "lang": "C++", "max_stars_repo_path": "lib/CrabLlvm/SeaDsaHeapAbstraction.cc", "max_stars_repo_name": "kuhar/crab-llvm", "max_stars_repo_head_hexsha": "fa548efd6c6c104d509d48d2ae7af09b7b7f1576", "max_stars_repo_licenses": ["Apache-2.0"],...
from keras.applications.resnet50 import ResNet50 from keras import activations from keras.preprocessing import image from keras.layers import Input,Flatten,Dense from keras.models import Model from keras.layers.normalization import BatchNormalization from keras.applications.resnet50 import preprocess_input import numpy...
{"hexsha": "edbf5ffa15be1298b588336e467b183f7359c1a4", "size": 1849, "ext": "py", "lang": "Python", "max_stars_repo_path": "inceptionv3_highfive_model.py", "max_stars_repo_name": "alexandrosstergiou/Inception_v3_TV_Human_Interactions", "max_stars_repo_head_hexsha": "524ad7b5a0630d05b3aa4f2d5636bf097bd4d7a7", "max_stars...
%---------------------------------------------------------------------------------------- % PACKAGES AND THEMES %---------------------------------------------------------------------------------------- \documentclass[aspectratio=169,xcolor=dvipsnames]{beamer} \usetheme{SimplePlus} \usepackage{hyperref} \usepackage{gra...
{"hexsha": "05e57697b9b1b3459458e217e67b9ef9405034e7", "size": 2592, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "slides/figures.tex", "max_stars_repo_name": "Klepac-Ceraj-Lab/ResonanceAnalysis", "max_stars_repo_head_hexsha": "bc29d9a2085b441a7d2ccea5a290cce0b285eec5", "max_stars_repo_licenses": ["MIT"], "max_s...