text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
{"hexsha": "0e8c186caf61e2b369727d1a629975d8164b95c0", "size": 1577, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/sdk/include/boost/simd/sdk/details/io_fix.hpp", "max_stars_repo_name": "psiha/nt2", "max_stars_repo_head_hexsha": "5e829807f6b57b339ca1be918a6b60a2507c54d0", "max_stars_repo_licen...
[STATEMENT] lemma l11_61_bis: assumes "D OrthAt A B C D P" and "D E Perp E Q" and "Coplanar A B C E" and "Coplanar D E P Q" shows "E OrthAt A B C E Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. E OrthAt A B C E Q [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. E OrthAt A B ...
{"llama_tokens": 8711, "file": "IsaGeoCoq_Tarski_Neutral", "length": 106}
DK Kemp started working as the Active Transportation Coordinator in February 2012. His predecessor was users/walkandbike Tara Goddard. Another city bike coordinator before Tara was Tim Bustos. DK is the staff liason for the citys Bicycle Advisory Commission.
{"hexsha": "d627a36420525794f2d620887391a17b0421d5d6", "size": 265, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Dave_DK_Kemp.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/** * 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...
{"hexsha": "9baba1d8ed2ba82e9e44ed76ba08cc411c25faf2", "size": 23342, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "hedwig-client/src/main/cpp/test/pubsubtest.cpp", "max_stars_repo_name": "sijie/bookkeeper-twitter", "max_stars_repo_head_hexsha": "42d5736fd3b13f1dc8aaeb935f7572f23c79538c", "max_stars_repo_license...
import argparse import numpy as np import json import os import torch from torch.utils.data import DataLoader from tqdm import tqdm import cv2 as cv import models import dataloader from utils.metrics import AverageMeter from utils.ComputeSV import SingularValues import math def main(): # get the argument from par...
{"hexsha": "407cabc0627113863f8a7d47541424627eade1cc", "size": 7648, "ext": "py", "lang": "Python", "max_stars_repo_path": "inference.py", "max_stars_repo_name": "sebemery/Lipschitz-constrained-neural-networks", "max_stars_repo_head_hexsha": "79ac2c6f7e7cef692cacf35619baf91beaeba948", "max_stars_repo_licenses": ["MIT"]...
% ========================================= % COMMAND: _REQ % ========================================= \newpage \section{\_REQ} \label{cmd:_REQ} \paragraph{Syntax:} \subparagraph{} \texttt{\_REQ <host> [<SSL>:]<port>[:<tag>] [<cert-file> <key-file> <ca-cert-file>]} \paragraph{Purpose:} \subparagraph{} Opens a new T...
{"hexsha": "9793fa413c56fea9a74674d9a8c78eae7da2ef2e", "size": 1197, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/users-guide/local-commands/cmd_req.tex", "max_stars_repo_name": "ia97lies/httest", "max_stars_repo_head_hexsha": "5bbe912ffde2e74b382405f580ef5963bf792288", "max_stars_repo_licenses": ["Apache-2...
import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator import numpy as np import os def optimizer_init_fn(optimizer_func=tf.keras.optimizers.Adam, lr=1e-3): return optimizer_func(learning_rate=lr) def update_model_weights_from_ckpt(model_to_update, prev_run_path): prev_ch...
{"hexsha": "d262c7f1318fea101dd276895aeaffd21b8f8653", "size": 2724, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_utils/utils/tf_utils.py", "max_stars_repo_name": "AbdelrhmanBassiouny/dl_utils", "max_stars_repo_head_hexsha": "7977a4c92c3430fcd581f8d0ac7aa8dc291cee23", "max_stars_repo_licenses": ["A...
import dask from dask.callbacks import Callback from tqdm import tqdm_notebook import torch.utils.data import numpy as np import dask.array as da import os import zarr import h5py from world_models_sonic import config from .samplers import SequenceInChunkSampler class TQDMDaskProgressBar(Callback): """ A tqd...
{"hexsha": "0e315c1940998158d7ab7c93639e3e67a1dcf84f", "size": 4704, "ext": "py", "lang": "Python", "max_stars_repo_path": "world_models_sonic/helpers/dataset.py", "max_stars_repo_name": "wassname/world-models-sonic-pytorch", "max_stars_repo_head_hexsha": "dadbd6ca1b535758dc10bba45ff80b1ed0332640", "max_stars_repo_lice...
[STATEMENT] lemma Legacy_row_is_Matrix_row: assumes "i < mult.row_length A" shows "row A i = list_of_vec (Matrix.row (mat_of_cols_list (mult.row_length A) A) i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Matrix_Legacy.row A i = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) [PROO...
{"llama_tokens": 1568, "file": "Isabelle_Marries_Dirac_Tensor", "length": 12}
import numpy as np from scipy.spatial.distance import pdist, squareform elements_map = {'H': 0, 'C': 1, 'N': 2, 'O': 3, 'S': 4, 'X': 5} def one_hot_elements_map(x): arr = np.zeros(len(elements_map)) arr[elements_map[x[0]]] = 1 ...
{"hexsha": "94e726eb4925ccdc2ead4119942b1b0ac20958b8", "size": 3166, "ext": "py", "lang": "Python", "max_stars_repo_path": "evolutron/tools/structure_tools.py", "max_stars_repo_name": "thrakar9/Evolutron", "max_stars_repo_head_hexsha": "1b9b4c364fe531e5001fd9010898b96e0f5907d7", "max_stars_repo_licenses": ["MIT"], "max...
import cv2 import numpy as np def main(): #window_name="Cam feed" #cv2.namedWindow(window_name) cap=cv2.VideoCapture(0) #filename = 'F:\sample.avi' #codec=cv2.VideoWriter_fourcc('X','V','I','D') #framerate=30 #resolution = (500,500) # VideoFileOutput = cv2.VideoWriter(filename,codec...
{"hexsha": "b3aa80636a4b1b93ca5d9359adefccad892c68b0", "size": 1253, "ext": "py", "lang": "Python", "max_stars_repo_path": "motion_detection.py", "max_stars_repo_name": "udelblue/cv", "max_stars_repo_head_hexsha": "0bf631451e16ad58207e1c4d6ead0f882d170d29", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
using LibPQ using ..PostgresORMUtil, ..Controller function SchemaInfo.analyse_db_schema(dbconn::LibPQ.Connection) result = Dict() for schema in SchemaInfo.get_schemas(dbconn) result[schema] = Dict() for tbl in SchemaInfo.get_tables(schema, dbconn) result[schema][tbl] = Dict( :p...
{"hexsha": "569e8fc349d083b8f9969a330befb3beddc8601c", "size": 14879, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/SchemaInfo/SchemaInfo-imp.jl", "max_stars_repo_name": "JuliaPostgresORM/PostgresORM.jl", "max_stars_repo_head_hexsha": "ea3cbe36ce35a8f77d71e575d01ed9e56d03f4e6", "max_stars_repo_licenses": ["...
import numpy as np def read_xtb_out(content, property: str = 'energy' ): """Reads gaussian output file - quantity = 'structure' - final structure form output. - quantity = 'energy' - final energy from output. Works with xTB version 6.1. """ if property == 'structure': return read_stru...
{"hexsha": "84ba637d95fc82e49966e813fbf3d37508fed1ea", "size": 2158, "ext": "py", "lang": "Python", "max_stars_repo_path": "elementary_step_om/io/io_xtb.py", "max_stars_repo_name": "jensengroup/elementary_step_om", "max_stars_repo_head_hexsha": "7ae7e5226f6be1f3ace3e3886a0284c4f8923ee9", "max_stars_repo_licenses": ["MI...
# -*- coding: utf-8 -*- import requests import struct import datetime import ftplib import glob import sys import os import tempfile from sshtunnel import SSHTunnelForwarder import pymongo import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from . import wavefuncs import scipy.signal as sign...
{"hexsha": "6f61c49279485f38f985be6081c1cf63a45b9bd7", "size": 15361, "ext": "py", "lang": "Python", "max_stars_repo_path": "unophysics/_ladc.py", "max_stars_repo_name": "micha2718l/unophysics", "max_stars_repo_head_hexsha": "f1d6b135ac21991fcf538e24902701e00b291036", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/env python4 # -*- coding: utf-8 -*- """ YEAR: 2019 - 2021 @author: ADA GJERMUNDSEN This script will reproduce FIGURE 1 in Gjermundsen et. al 2021 The data used for plotting is generated by scripts contained in the same folder as this (FIGURE1) """ import xarray as xr import matplotlib.pyplot as plt imp...
{"hexsha": "ea8f9d9c8d8298f11786adcc5b02b14c688983b4", "size": 12841, "ext": "py", "lang": "Python", "max_stars_repo_path": "FIGURE1/figure1.py", "max_stars_repo_name": "adagj/ECS_SOconvection", "max_stars_repo_head_hexsha": "d1bb935b37380f11e021a463c6a807d7527220a6", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
''' Note: Use centercrop(299) for inception and centercrop(224) for others in 'val'. ''' from __future__ import print_function from __future__ import division import torch import torch.nn as nn import numpy as np from torchvision import datasets, models, transforms import os import argparse # model_names = ['alexnet...
{"hexsha": "85d61756c402abe79a929e0fc7d105a004f8b07d", "size": 7739, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract_pretrained_features.py", "max_stars_repo_name": "arjish/PreTrainedFullLibrary_FewShot", "max_stars_repo_head_hexsha": "c52d3374e5e1d5fe20f428cc2f599cb4b36847ef", "max_stars_repo_licenses":...
import json import os from functools import partial import pandas as pd import scipy.stats import statsmodels.stats.multitest import torch from sklearn.experimental import enable_iterative_imputer # noqa from sklearn.impute import IterativeImputer from sklearn.neighbors import KernelDensity import numpy as np from ...
{"hexsha": "615b81ac87ad99aa0c3f7446e6a3dc802ab2d93a", "size": 23147, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/analyze_results.py", "max_stars_repo_name": "nickswalker/influencing-behavioral-attributions", "max_stars_repo_head_hexsha": "e1fd4e39dcf5cea214e94ffb362079ea3e6bc0b6", "max_stars_repo_li...
import heapq import numpy as np from .matrix_serializer import load_vocabulary class Embedding: """ Base class for all embeddings. SGNS can be directly instantiated with it. """ def __init__(self, path, normalize=True): self.m = np.load(path + '.npy') if normalize: ...
{"hexsha": "b4fe4d20c35b2314ae2126c3515556b6fd277736", "size": 3782, "ext": "py", "lang": "Python", "max_stars_repo_path": "hyperwords/representations/embedding.py", "max_stars_repo_name": "HLTCHKUST/eigenvector-analysis", "max_stars_repo_head_hexsha": "8a90d6d098ec2108e2dccd447b1c19acef53b59e", "max_stars_repo_license...
/* * Copyright (c) CERN 2013-2015 * * Copyright (c) Members of the EMI Collaboration. 2010-2013 * See http://www.eu-emi.eu/partners for details on the copyright * holders. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. *...
{"hexsha": "dc74a8272342ca7cd2291924be04fd532dd413d0", "size": 6259, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/unit/cli/ui/SubmitTransferCliTest.cpp", "max_stars_repo_name": "cern-fts/fts3", "max_stars_repo_head_hexsha": "cf9eb5c9f52728929965edf58a86381eec0c4e88", "max_stars_repo_licenses": ["Apache-2.0...
// Copyright (c) 2005-2007 Andre Merzky // Copyright (c) 2005-2016 Hartmut Kaiser // Copyright (c) 2011 Bryce Lelbach // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // make inspect happy: hpxinspect:n...
{"hexsha": "33b426c0145674bf6ecd296f017e2dbb679c87ae", "size": 33114, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/util/ini.cpp", "max_stars_repo_name": "atrantan/hpx", "max_stars_repo_head_hexsha": "6c214b2f3e3fc58648513c9f1cfef37fde59333c", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 1.0, "...
[STATEMENT] lemma NS_least_least: assumes l: "least f" and NS: "NS (Fun f []) t" shows "\<exists> g. t = Fun g [] \<and> least g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<exists>g. t = Fun g [] \<and> least g [PROOF STEP] proof (cases t) [PROOF STATE] proof (state) goal (2 subgoals): 1. \<And>x1. t ...
{"llama_tokens": 10287, "file": "Knuth_Bendix_Order_KBO", "length": 100}
// http://turtle.sourceforge.net // // Copyright Mathieu Champlon 2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include "mock_error.hpp" #include <turtle/mock.hpp> #include <boost/test/auto_unit_test....
{"hexsha": "970a25fa8fe1b0433d575769ebc1401647328bee", "size": 1293, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_max_args.cpp", "max_stars_repo_name": "sejd0n/turtle", "max_stars_repo_head_hexsha": "ea548668cbff0b2f28594d27afdee3359186e7b0", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": ...
struct Eigenstate{T<:Real,W<:AbstractWfn{T}} wfn::W E::T end function Eigenstate(ee::LinAlg.Eigen, n::Int, WfnType::Type{<:AbstractWfn}, args...) n in eachindex(ee[:values]) || error("Requested eigenstate of invalid n quantum number") wfn = WfnType(vec2mat(Complex, ee[:vectors][:,n]), args...) norm...
{"hexsha": "2b0256d55290264d59b16873cf16fc3e3168b245", "size": 727, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/eigenstates.jl", "max_stars_repo_name": "jagot/Wavefunctions.jl", "max_stars_repo_head_hexsha": "7af702d47bbaa3b112beab199534b999145f8e1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""GNG regressor""" import gng2 from kde import density from __gaussian_custom import norm_pdf_multivariate from numpy import array,diag,matrix import time from pygraph.classes.graph import graph from pygraph.algorithms.accessibility import connected_components import itertools from gks import GKS from copy i...
{"hexsha": "b9f6436863573221f866d6b7e76d45fb04da0547", "size": 6780, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/pygks/reg_gng.py", "max_stars_repo_name": "sbxzy/pygks_package", "max_stars_repo_head_hexsha": "9e2c4910ee0eb83e6fa710f97aa39dde285bc761", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
"""The image module contains functions for plotting""" import numpy as np from IPython import display from matplotlib import pyplot as plt __all__ = ['plt', 'bbox_to_rect', 'semilogy', 'set_figsize', 'show_bboxes', 'show_images', 'show_trace_2d', 'use_svg_display', 'plot', 'set_axes', 'Animator'] def bbox...
{"hexsha": "82de587e21199af30f98eb4e6fa70e8824df54b9", "size": 5546, "ext": "py", "lang": "Python", "max_stars_repo_path": "cvnet/figure.py", "max_stars_repo_name": "shibing624/cvnet", "max_stars_repo_head_hexsha": "5b9032a6d4be731cca92392a6779d56635781169", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
\documentclass[11pt]{scrartcl} \usepackage[sexy]{evan} \usepackage{braket} \usepackage{color} %May be necessary if you want to color links \usepackage{hyperref} \usepackage{tikz} \usepackage[compat=1.1.0]{tikz-feynman} \usepackage{comment} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \hypersetup{ ...
{"hexsha": "5e440161023e327ad46038897aa19a6010e59d58", "size": 119223, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "qft RG.tex", "max_stars_repo_name": "tranphysics/math-physics", "max_stars_repo_head_hexsha": "556f1fdfb769aa884fc0a144977687f141e3454d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Define the IMU sensor used in robotics. 'An inertial measurement unit (IMU) is an electronic device that measures and reports a body's specific force, angular rate, and sometimes the magnetic field surroundings the body, using a combination of accelerometers and gyrosco...
{"hexsha": "38f6d117161b4b483add68979db2186f61299d07", "size": 4030, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrobolearn/robots/sensors/imu.py", "max_stars_repo_name": "Pandinosaurus/pyrobolearn", "max_stars_repo_head_hexsha": "9cd7c060723fda7d2779fa255ac998c2c82b8436", "max_stars_repo_licenses": ["Apach...
# -*- coding: utf-8 -*- """ Reuse the pure python translate from Nicola's F77 code Copy and paste from Austin's repository: https://github.com/zooks97/bieFermi/tree/main/bieFermi/py """ import numpy as np from scipy.special import erfc FDCUT = 30.0 # Fermi-Dirac cutoff HMCUT = 10.0 # Hermite cutoff POSHMA = -0.5634...
{"hexsha": "6860b4b4119edf31f573cc71b456e25ea5ead8a1", "size": 3596, "ext": "py", "lang": "Python", "max_stars_repo_path": "efermi/efermi.py", "max_stars_repo_name": "aiidateam/aiida-sssp-workflow", "max_stars_repo_head_hexsha": "b1815eca405fc8db0c6ff27554fb5e56bccf8ebd", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include <chrono> #include <ctime> #include <string> #include <vector> #include <boost/process/environment.hpp> #include "spdlog/sinks/basic_file_sink.h" #include "spdlog/spdlog.h" auto logo() -> const char * { constexpr const char *data = R"_( ------------------------------------------------- __ __ ...
{"hexsha": "7cc8619cd87446522055ac5a3531e5639e4d1907", "size": 1804, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "apps/debug-worker/main.cpp", "max_stars_repo_name": "maslenitsa93/RocketJoe", "max_stars_repo_head_hexsha": "8733965d4959bb67a5c2986442e0c0296b586791", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
using Test using FastFourierTransform @testset "FFT Recursive Naive" begin for i in 1:5 n = 2 ^ rand(0:10) t = complex(rand(n)) f_direct = dft(t) @test idft(f_direct) ≈ t f_naive = fft_recursive_naive(t) f_recursive = fft_recursive(t) f_iterative = fft_iter...
{"hexsha": "f182554c2c3fc1d7bceafab70e278917af7aa53b", "size": 948, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "FastFourierTransform/test/runtests.jl", "max_stars_repo_name": "gyk/TrivialSolutions", "max_stars_repo_head_hexsha": "dc461ebfca5756ac261576785c227d77d578cb33", "max_stars_repo_licenses": ["WTFPL"],...
import numpy as np from sklearn.cluster import KMeans from relation_embedding import gen_relation_embedding from config import CONFIG as conf np.set_printoptions(threshold=np.inf) #num_clusters = 50 train_data_path = conf['training_file'] relation_path = conf['relation_file'] def cluster_data(num_clusters=20): r...
{"hexsha": "d26b6d5b1b54dd9861262fbdad8e75d2d3ab62b4", "size": 956, "ext": "py", "lang": "Python", "max_stars_repo_path": "baseline/eaemr/data_partition.py", "max_stars_repo_name": "qcw9714/FewShotContinualRE", "max_stars_repo_head_hexsha": "da960ed60e1837130d21504e80d87329846fda2a", "max_stars_repo_licenses": ["MIT"],...
import torch from .adaptive_grid_solver import AdaptiveGridSolver from .autograd_functional import jacobian, hessian from .tuple_to_tensor_wrapper import tuple_to_tensor, tensor_to_tuple, TupleFuncToTensorFunc import numpy as np __all__ = ['ODE23s'] SAFETY = 0.9 MIN_FACTOR = 0.2 # Minimum allowed decrease in a step ...
{"hexsha": "b5da49bc903e72b5fea9bcf9738d7fae6c60dc58", "size": 3495, "ext": "py", "lang": "Python", "max_stars_repo_path": "TorchDiffEqPack/odesolver/stiff_ode_solver.py", "max_stars_repo_name": "caidao22/TorchDiffEqPack", "max_stars_repo_head_hexsha": "5a22bef297633b0d2ee27feee030f1945ae9d7d0", "max_stars_repo_license...
/**TODO: Add copyright*/ #define BOOST_TEST_MODULE ActivationFunction test suite #include <boost/test/included/unit_test.hpp> #include <SmartPeak/ml/ActivationFunction.h> #include <iostream> using namespace SmartPeak; using namespace std; BOOST_AUTO_TEST_SUITE(activationFunction) /** ReLUOp Tests */ BOOST_AUT...
{"hexsha": "a3a415b955c424be37ade625311378b4e5020fa5", "size": 16330, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tests/class_tests/smartpeak/source/ActivationFunction_test.cpp", "max_stars_repo_name": "dmccloskey/EvoNet", "max_stars_repo_head_hexsha": "8d7fafe1069593024e5b63fd6b81a341a3bf33b5", "max_stars...
# Semantic3D Example with ConvPoint # add the parent folder to the python path to access pointnet library import sys import os curPath = os.path.abspath(os.path.dirname(__file__)) rootPath = os.path.split(curPath)[0] sys.path.append(os.path.split(rootPath)[0]) import numpy as np import argparse from datetime import d...
{"hexsha": "b677117ba9cbe673531fd929f10e5186675d17f4", "size": 18811, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/semantic3d/semantic3d_seg.py", "max_stars_repo_name": "fullcyxuc/HPCnet_examples", "max_stars_repo_head_hexsha": "999ef3f33ba73ba1d86f4d5df3f0160b46016be8", "max_stars_repo_licenses": ["...
""" Compose multiple datasets in a single loader. """ import numpy as np from copy import deepcopy from torch.utils.data import Dataset from dataset.wireframe_dataset import WireframeDataset from dataset.holicity_dataset import HolicityDataset class MergeDataset(Dataset): def __init__(self, mode, config=None): ...
{"hexsha": "673584550a918e386882e1499410d3e4c54ae03c", "size": 1408, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/merge_dataset.py", "max_stars_repo_name": "wx-b/SOLD2", "max_stars_repo_head_hexsha": "71c3243f9d3a695788d0a6bfd134b9849425900a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 347...
import pandas as pd from tensorflow import keras import pyhdfe import statsmodels.api as sm import statsmodels.formula.api as smf import numpy as np from linearmodels.iv.absorbing import AbsorbingLS import pyhdfe from utils import add_intercept, get_np_columns # show variable labels #pd.read_stata('/home/abom/Desktop/...
{"hexsha": "c5a0ede1b40e5f5a72fd95d345d044eb20073270", "size": 9457, "ext": "py", "lang": "Python", "max_stars_repo_path": "exploratory/exploratory_nlswork.py", "max_stars_repo_name": "lod531/regPyHDFE", "max_stars_repo_head_hexsha": "7e44f7b859e902d5cb1a53f16f9576d08b507645", "max_stars_repo_licenses": ["MIT"], "max_s...
\section*{Sparse Coding} \subsection*{Orthogonal Basis} Transform: For $\mathbf{x}$ and orthog. mat. $\mathbf{U}$ compute $\mathbf{z} = \mathbf{U}^\top \mathbf{x} $. For compression, can drop small values: $ \mathbf{\hat{x}} = \mathbf{U\hat{z}}$, $\hat{z}_i = z_i$ if $ \lvert z_i \rvert > \epsilon$ else 0. Pros: fast i...
{"hexsha": "62de421edc78a2f37450146d3e2549cbf88afced", "size": 3756, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SparseCoding.tex", "max_stars_repo_name": "anklinv/Computational-Intelligence-Lab-ETH-FS19", "max_stars_repo_head_hexsha": "2ef62f626fa83d1410fbb1b2f8a0501937c0dabe", "max_stars_repo_licenses": ["CC...
import numpy as np from sklearn import model_selection from xgboost import XGBClassifier from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import RandomForestClassifier from mlxtend.classifier import StackingClassifier from sklearn.ensemble import ExtraTreesClassifier import warnings warni...
{"hexsha": "81bda22549d675b5bdfe4c5da6f151de8e03fd3e", "size": 1249, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine Learning & AI/Stacking/stackedClassifier.py", "max_stars_repo_name": "sparkstark03/Awesome-Scripts", "max_stars_repo_head_hexsha": "7326f2480bdeb4d843c50488bc790a5139820c8a", "max_stars_re...
import numpy as np from numba import jit def pml_pad(vel, npml): return np.pad(vel, ((npml, npml), (0, npml)), mode='edge') def pml_cut(vel, npml): return vel[npml:-npml,0:-npml] @jit def pml_damp(npml, v, h): nx, ny = v.shape dampx = np.zeros(nx) dampy = np.zeros(ny) thickness = npml * h ...
{"hexsha": "8ae5564dcf32aba7457e23358a6cc19bac93300f", "size": 550, "ext": "py", "lang": "Python", "max_stars_repo_path": "torchwi/propagator/pml_base.py", "max_stars_repo_name": "pkgpl/TorchWI", "max_stars_repo_head_hexsha": "772f2f26b2faf7487a1eec6b1c4821ebaf6dd44f", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
''' This file includes all the locally differentially private mechanisms we designed for the SIGMOD work. I am aware that this code can be cleaned a bit and there is a redundancy. But this helps keeping the code plug-n-play. I can simply copy a class and use it in a different context. http://dimacs.rutgers.edu/~graha...
{"hexsha": "785cda69ea1766787d97e90d179a602ab08e7668", "size": 44873, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute_marginals.py", "max_stars_repo_name": "Tejasvk/Marginals_Code", "max_stars_repo_head_hexsha": "c5c7608fb8e64fa3c8eb017a8bca3f60d2f72be3", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
SUBROUTINE TANGNS(RHOLEN,Y,YP,TZ,YPOLD,A,QR,LENQR,PIVOT, & PP,RHOVEC,WORK,NFE,N,IFLAG,PAR,IPAR) C C THIS SUBROUTINE BUILDS THE JACOBIAN MATRIX OF THE HOMOTOPY MAP, C AND THEN CALCULATES THE (UNIT) TANGENT VECTOR AND THE NEWTON STEP C USING A PRECONDITIONED CONJUGATE GRADIENT ALGORITHM. C C ON INPUT: C C ...
{"hexsha": "ac8ba2f2b94774a9183c301c016d6d4c2ac34c3b", "size": 5607, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/f2cl/packages/hompack/tangns.f", "max_stars_repo_name": "sbwhitecap/clocc-hg", "max_stars_repo_head_hexsha": "f6cf2591ceef8a3a80e04da9b414cdf60a25a90f", "max_stars_repo_licenses": ["MIT"], "ma...
from __future__ import division import math import numpy as np # More details about evaluation metrics can be found here # https://arxiv.org/pdf/1105.3685.pdf def precision(x): return np.count_nonzero(x) / len(x) def recall(x, freq): return np.count_nonzero(x) / freq def f1score(x, freq): p = precisi...
{"hexsha": "f50824a10e9a57c4da1d77f21073f8ca5c3af0fc", "size": 1070, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/metrics.py", "max_stars_repo_name": "scenenn/shrec17", "max_stars_repo_head_hexsha": "cb3c029e651f96223efd3255b9acadb33a4e9726", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
#pragma once #include <list> #include <memory> #include <set> #include <tuple> #include <vector> #include <boost/lockfree/spsc_queue.hpp> #include <boost/lockfree/queue.hpp> #include "host_data_packet.hpp" #include "stream/stream_info.hpp" #include "general/data_observer.hpp" #include "stream/stream_data.hpp" cla...
{"hexsha": "777fffc59c87228c039ad21e684f35ba3cba214f", "size": 1500, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "host/core/pipeline/host_pipeline.hpp", "max_stars_repo_name": "philnelson/depthai-api", "max_stars_repo_head_hexsha": "a9b3a05729c1923332c7a2ef584245d9c0632a26", "max_stars_repo_licenses": ["MIT"], ...
''' This script is part of the Master Thesis of Damian Durrer (SfS ETH Zürich), submission date 16 December 2021. This script is part of the following project: - Github: https://github.com/dipfi/econ-classifier - Euler: /cluster/work/lawecon/Projects/Ash_Durrer/dev/scripts The data for reproduction can be shared upon...
{"hexsha": "d05fa6fc0b000b89d89f7bb7ec19652ff45ca42f", "size": 13653, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/utils_ortho_hetero.py", "max_stars_repo_name": "dipfi/econ-classifier", "max_stars_repo_head_hexsha": "6ef2a065d09c113a9e5cc604c5f6a904415b63ac", "max_stars_repo_licenses": ["Apache-2.0"], ...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA import gym import gym.spaces import numpy as np class Norm...
{"hexsha": "5814c1803a24d7b18337165d41e639b0c302234f", "size": 2712, "ext": "py", "lang": "Python", "max_stars_repo_path": "wrappers.py", "max_stars_repo_name": "dnishio/DSAC", "max_stars_repo_head_hexsha": "95294a73e4f579bc8a55f41969c2fc72e5c9d3b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, "max_stars...
"""This module contains unit tests for :mod:`~prody.proteins`.""" import os import numpy as np from numpy.testing import * from prody import * from prody import LOGGER from prody.utilities import which from prody.tests import TEMPDIR, unittest from prody.tests.datafiles import * LOGGER.verbosity = 'none' class Tes...
{"hexsha": "865367175477f42f1ed094b689024cd9cd82efbb", "size": 2341, "ext": "py", "lang": "Python", "max_stars_repo_path": "prody/tests/proteins/test_localpdb.py", "max_stars_repo_name": "RuJinlong/ProDy", "max_stars_repo_head_hexsha": "cf23b96f147321e365b2c5fd2a527018c1babb67", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 25 16:39:06 2021 @author: patrice goes through a folder of results and gets the F1 from saved npz files """ import glob import numpy as np from sklearn import metrics import pandas as pd MasterFolder='/media/patrice/DataDrive/SEE_ICE/FullData_Revi...
{"hexsha": "aff17aa955842444478f015aebb4f6ea5061e6bf", "size": 6712, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/Results_Processing/BuildDataFrame.py", "max_stars_repo_name": "MMarochov/SEE_ICE", "max_stars_repo_head_hexsha": "c3b890db9ccd4d78f23fdb08cf9eee4b02bc0d27", "max_stars_repo_licenses": ["MIT"]...
import math import matplotlib.pyplot as plt import numpy as np def principleStresses(stressTensor,method='eigen'): principle_stresses = [] if method=='eigen': principle_stresses = np.linalg.eigvals(stressTensor) elif method=='invariants': I = stressInvariants(stressTensor) principle...
{"hexsha": "1b24f4e51f78d3ef360a3e0fe3350a0e9b508176", "size": 11351, "ext": "py", "lang": "Python", "max_stars_repo_path": "EngineeringToolbox/mechanics/mcnx.py", "max_stars_repo_name": "jhphillips1029/EngineeringToolbox", "max_stars_repo_head_hexsha": "59cf7fbe3f3d9fbd030e15976fd96881bcbc94c2", "max_stars_repo_licens...
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere \PassOptionsToPackage{hyphens}{url} % \documentclass[]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if...
{"hexsha": "e82142dab79dab079f0dd669da44008c924c11a2", "size": 51816, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "R/lpa_analyses.tex", "max_stars_repo_name": "mattdblanchard/covid19_study", "max_stars_repo_head_hexsha": "d98a8e400f5623e3ac3647cb249e659a8ebc0d53", "max_stars_repo_licenses": ["CC0-1.0"], "max_st...
import .filter open set filter lattice universes u v w class topology (α : Type u) := (𝒪 : set (set α)) (top : univ ∈ 𝒪) (i : ∀ U V ∈ 𝒪, U ∩ V ∈ 𝒪) (U : ∀ ℱ ⊆ 𝒪, ⋃₀ ℱ ∈ 𝒪) namespace topology variables {X : Type u} [topology X] variables {Y : Type u} [topology Y] lemma ext {X : Type u} : ∀ {τ₁ τ₂ : topology ...
{"author": "EdAyers", "repo": "edlib", "sha": "78b8c5d91f023f939c102837d748868e2f3ed27d", "save_path": "github-repos/lean/EdAyers-edlib", "path": "github-repos/lean/EdAyers-edlib/edlib-78b8c5d91f023f939c102837d748868e2f3ed27d/topology.lean"}
(* Author: David Sanan Maintainer: David Sanan, sanan at ntu edu sg License: LGPL *) (* Title: LanguageCon.thy Author: Norbert Schirmer, TU Muenchen Author: David Sanan, NTU Copyright (C) 2015-2016 David Sanan Some rights reserved, NTU This library is free software; you ca...
{"author": "CompSoftVer", "repo": "CSim2", "sha": "b09a4d77ea089168b1805db5204ac151df2b9eff", "save_path": "github-repos/isabelle/CompSoftVer-CSim2", "path": "github-repos/isabelle/CompSoftVer-CSim2/CSim2-b09a4d77ea089168b1805db5204ac151df2b9eff/ConCSimpl/LanguageCon-david-ThinkPad-X1-Carbon-5th.thy"}
import cv2 import numpy as np import os from os.path import join from os import mkdir import matplotlib.pyplot as plt from src.data.constants import ( RAW_FILES, START_IDX, MEDIAN_FILTER_KERNEL, SIMPLE_THRESHOLD, DATA_DIR, IMG_DIR, MASK_DIR, FIG_DIR) # Set working directory to script location abspath = os...
{"hexsha": "eb6186dc27ace35e1ee74c64dde8aa9ffe1e06a0", "size": 1179, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/annotate_single.py", "max_stars_repo_name": "gummz/cell", "max_stars_repo_head_hexsha": "a741ca4900a11f1080b7572ac969f765e5ac2ffd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
function post(alg::BOX{N}, ivp::IVP{<:AbstractContinuousSystem}, tspan; Δt0::TimeInterval=zeroI, kwargs...) where {N} @unpack δ, approx_model, static, dim, recursive = alg if haskey(kwargs, :NSTEPS) NSTEPS = kwargs[:NSTEPS] T = NSTEPS * δ else # get time horizon from ...
{"hexsha": "a3efc5e0b4e623e1bd9b6170cb22d2edfb55456b", "size": 1894, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Algorithms/BOX/post.jl", "max_stars_repo_name": "pitmonticone/ReachabilityAnalysis.jl", "max_stars_repo_head_hexsha": "cf7271353bbf20780d1996e824df1859d380daa2", "max_stars_repo_licenses": ["MI...
using CUSPARSE using CUDArt using Base.Test m = 25 n = 35 k = 10 blockdim = 5 @testset "gthr and gthrz" begin @testset for elty in [Float32,Float64,Complex64,Complex128] x = sparsevec(rand(1:m,k), rand(elty,k), m) y = rand(elty,m) @testset "gthr!" begin d_x = CudaSparseVector(x...
{"hexsha": "1d84af5594e4be7a049806538d3f020ad2d76250", "size": 1454, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/gthr.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/CUSPARSE.jl-7ec2a2a8-e61c-5617-972c-ff57ecef9621", "max_stars_repo_head_hexsha": "ee9c852e0d832f20eee7be7e2b2fb70a074d17d5", "m...
[STATEMENT] lemma iterate_size_abort_correct : assumes it: "set_iterator it S0" shows "iterate_size_abort it n = (min n (card S0)) \<and> finite S0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. iterate_size_abort it n = min n (card S0) \<and> finite S0 [PROOF STEP] unfolding iterate_size_abort_def [PROOF STATE] pr...
{"llama_tokens": 2707, "file": "Collections_Iterator_SetIteratorGA", "length": 15}
import json import os import numpy as np import torch from scipy.spatial.distance import squareform, pdist from torch import nn as nn from torch.utils import data as td import config as cfg def tensor_dist_mat(v): # input vector is row vector like # 1, # 2, # 3 n, dims = v.shape # repeat in...
{"hexsha": "4f41a4b7cd3fd38f3349e7f30857f0234508923d", "size": 15328, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/nn.py", "max_stars_repo_name": "browatbn2/MAD", "max_stars_repo_head_hexsha": "2b3f1a9b36ef096db648ede9854c733fd444a2a6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 1, ...
import torch import numpy as np import torch.utils.data as data class EpisodicBatchSampler(data.Sampler): def __init__(self, labels, n_episodes, n_way, n_samples): ''' Sampler that yields batches per n_episodes without replacement. Batch format: (c_i_1, c_j_1, ..., c_n_way_1, c_i_2, c_j_2,...
{"hexsha": "8a0bd07165695ff387d50137bd3030197e3ef5af", "size": 2239, "ext": "py", "lang": "Python", "max_stars_repo_path": "samplers/episodic_batch_sampler.py", "max_stars_repo_name": "TalSchuster/prototypical-networks", "max_stars_repo_head_hexsha": "3fb2a0c4ff8f2a463f01fafa6a2f075afc0688e5", "max_stars_repo_licenses"...
[STATEMENT] lemma independent_vnmD4: assumes "independent_vnm C P" assumes "refl_on C P" assumes "p \<in> C" and "q \<in> C" and "r \<in> C" and "\<alpha> \<in> {0..1}" and "p \<succeq>[P] q" shows "mix_pmf \<alpha> p r \<succeq>[P] mix_pmf \<alpha> q r" [PROOF STATE] proof (prove) goal (1 s...
{"llama_tokens": 374, "file": "Neumann_Morgenstern_Utility_Neumann_Morgenstern_Utility_Theorem", "length": 2}
! -- MODFLOW-2015 utility routines. Note that these are now written in f90 ! fortran style. ! module UTL8MODULE use UTL7MODULE,only:ustop,ulaprw,ucolno,ulstlb contains subroutine freeunitnumber(iu) ! ****************************************************************************** ! Assign a free unopened uni...
{"hexsha": "040a6bb0d91586a50bd4997e1f3a3f4dd04ffc13", "size": 89054, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/MODPATH7/source/utl8.f90", "max_stars_repo_name": "usgs/neversink_workflow", "max_stars_repo_head_hexsha": "acd61435b8553e38d4a903c8cd7a3afc612446f9", "max_stars_repo_licenses": ["CC0-1....
/* * Location - Enumeration of location types known to MkE Client * * Copyright (c) 2017-2021, Magik-Eye Inc. * author: Jan Heller, jan@magik-eye.com */ #include <boost/asio.hpp> #include "mke/error.h" #include "mke/device/location.h" using namespace mke::device; LocationEnum Location::toEnum(const std::stri...
{"hexsha": "052cfd85ee9a90288ba1e778e4b94855c49f7760", "size": 862, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "client/cpp/mkeclient/src/mke/device/location.cpp", "max_stars_repo_name": "MagikEyeInc/SDK", "max_stars_repo_head_hexsha": "e4a3ac92a7ec5bf57978d15d43feb81b1f595653", "max_stars_repo_licenses": ["BSD...
#!/usr/bin/env python from ont_fast5_api.fast5_interface import get_fast5_file import argparse import os import numpy as np import datetime import torch.multiprocessing as mp import sys import gzip import backend import time import queue import multiprocessing def write_output(read_id, basecall, quals, output_file, f...
{"hexsha": "ffd89d20784b6817e537d51ea771f96e49fe18a1", "size": 7507, "ext": "py", "lang": "Python", "max_stars_repo_path": "basecall.py", "max_stars_repo_name": "fmfi-compbio/heron", "max_stars_repo_head_hexsha": "6d643118441e48f01a96fed9d3d9a36f67c0529a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 6...
""" References ---------- Warszycki D, Mordalski S, Kristiansen K, Kafel R, Sylte I, Chilmonczyk Z, et al. (2013) A Linear Combination of Pharmacophore Hypotheses as a New Tool in Search of New Active Compounds – An Application for 5-HT1A Receptor Ligands. PLoS ONE 8(12): e84510. doi:10.1371/jou...
{"hexsha": "d215f19d5773fcfd203ab21d143264843592a283", "size": 11135, "ext": "py", "lang": "Python", "max_stars_repo_path": "fruits/bananas/worlds/_datasets/_WarszyckiBioactivity.py", "max_stars_repo_name": "lesniak43/ananas", "max_stars_repo_head_hexsha": "2b5989dcb21464aa9dcdce0a758d009ee430a076", "max_stars_repo_lic...
/*! * \file bitset.hpp * \brief Provides Boost.Serialization support for std::bitset * \author Brian Ravnsgaard Riis * \author Kenneth Riddile * \date 16.09.2004, updated 04.03.2009 * \copyright 2004 Brian Ravnsgaard Riis * \license Boost Software License 1.0 */ #ifndef BOOST_SERI...
{"hexsha": "107effd610e0ad8cde411088a5bcd64d5ad7f073", "size": 2028, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ios/Pods/boost-for-react-native/boost/serialization/bitset.hpp", "max_stars_repo_name": "rudylee/expo", "max_stars_repo_head_hexsha": "b3e65a7a5b205f14a3eb6cd6fa8d13c8d663b1cc", "max_stars_repo_lice...
import unittest import numpy as np from td_control import * class TestTDn(unittest.TestCase): def setUp(self): pass def test_get_td_target(self): alg = TDn(None, (2,), (2,), n =2) states = [0,0,1,1,0] actions = [1,1,0,1,0] rewards = np.array([1,0,0,1,1]) ''...
{"hexsha": "51412ea9ba30b1a5b44288a413cef07ac8b936e2", "size": 1577, "ext": "py", "lang": "Python", "max_stars_repo_path": "Easy21/test_td_control.py", "max_stars_repo_name": "vuk119/RL", "max_stars_repo_head_hexsha": "2f5309bfff719b2965060492a19d008ed8382856", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import cv2 as cv import logging import numpy as np from .android import capture from .util import debug_pattern, grayscale, log_pattern_result log = logging.getLogger('boxeye') """ defaults = { 'name': 'NOT SET', 'region': None, 'confidence': 0.9, 'needle': cv.imread('a-needl...
{"hexsha": "9fb7e86f6e8a387b7fe0fdab2fffa35007773f6a", "size": 4548, "ext": "py", "lang": "Python", "max_stars_repo_path": "boxeye/imagepattern.py", "max_stars_repo_name": "bot-boi/box-eye", "max_stars_repo_head_hexsha": "1401a5960b854ba0e15fc88ef35d126ce8537960", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
{"hexsha": "b93fa027c5f5dda5ceb15ca89438bc4c117a0581", "size": 60853, "ext": "py", "lang": "Python", "max_stars_repo_path": "imperative/python/megengine/jit/tracing.py", "max_stars_repo_name": "Olalaye/MegEngine", "max_stars_repo_head_hexsha": "695d24f24517536e6544b07936d189dbc031bbce", "max_stars_repo_licenses": ["Apa...
function build_phase(D, k) N = size(D, 1) E = deepcopy(D) CurrMin = [sum(E[:,j]) for j in 1:N] Flags = fill(1, N) medoids = Vector{Int}(undef, k) @inbounds for loop in 1:k TempMin, Idx = CurrMin[1], 1 for Pt in 2:N Flags[Pt] != 1 && continue if Flags[Idx] ...
{"hexsha": "93861872fb77aee192d7e05ef9470ef90fb160e5", "size": 745, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fastPAM.jl", "max_stars_repo_name": "mthelm85/PAM.jl", "max_stars_repo_head_hexsha": "ea92348d5ee55e57d7d1a357aa9e2a319fa07d5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
import game.world10.level7 -- hide namespace mynat -- hide /- # Inequality world. ## Level 8: `succ_le_succ` Another straightforward one. -/ /- Lemma For all naturals $a$ and $b$, if $a\le b$, then $\operatorname{succ}(a)\le\operatorname{succ}(b)$. -/ lemma succ_le_succ (a b : mynat) (h : a ≤ b) : succ a ≤ succ...
{"author": "ImperialCollegeLondon", "repo": "natural_number_game", "sha": "f29b6c2884299fc63fdfc81ae5d7daaa3219f9fd", "save_path": "github-repos/lean/ImperialCollegeLondon-natural_number_game", "path": "github-repos/lean/ImperialCollegeLondon-natural_number_game/natural_number_game-f29b6c2884299fc63fdfc81ae5d7daaa3219f...
(*<*) theory Restrict_Frees imports Restrict_Bounds "HOL-Library.Product_Lexorder" "HOL-Library.List_Lexorder" "HOL-Library.Multiset_Order" begin hide_const (open) SetIndex.index (*>*) section \<open>Restricting Free Variables\<close> definition fixfree :: "(('a, 'b) fmla \<times> nat rel) set \<Rightarrow> ...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Safe_Range_RC...
! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! REQUIRES: shell ! OpenMP Version 5.0 ! 2.10.3 taskloop simd Construct program omp_taskloop_simd integer i , j , k !$omp taskloop simd reduction(+:k) do i=1,10000 do j=1,i k = k + 1 end do end do !$omp end taskloop simd end program omp_taskloop...
{"hexsha": "7cfa384ab2d4910c32854f595c9f55095a1b3b7a", "size": 326, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Semantics/omp-taskloop-simd01.f90", "max_stars_repo_name": "acidburn0zzz/llvm-project", "max_stars_repo_head_hexsha": "7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9", "max_stars_repo_licens...
Frank Lloyd Wright Park is a medium sized, but fairly minimal, parks park in East Davis. It has long stretches of grass, suitable for pickup soccer games or stargazing; and many trees for climbing, but it does not include any play structures. Citizens looking for playgrounds should go to Sandy Motley Park or Slide ...
{"hexsha": "f97b4549f7a2e7a828cc100077cff6b578cb322a", "size": 331, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Frank_Lloyd_Wright_Park.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_s...
# import argparse # parser = argparse.ArgumentParser(description='') # args = parser.parse_args() import detectron2 from pathlib import Path import random, cv2, os import matplotlib.pyplot as plt import numpy as np import torch import pycocotools.mask as mask_util # import some common detectron2 utilities from detect...
{"hexsha": "33df17ef2c88434857e165fda3514dd0a544fd89", "size": 13222, "ext": "py", "lang": "Python", "max_stars_repo_path": "val_ensemble.py", "max_stars_repo_name": "p890040/Sartorius--Cell-Instance-Segmentation-Competition", "max_stars_repo_head_hexsha": "bd101e5cbc8e4f9e06fc1e3731c1720d7b9a9235", "max_stars_repo_lic...
> index <- "1" > env[[index]] <- "rainfed hay" > for (name in ls(env)) { + cat(sprintf('index=%s, value=%s\n', name, env[[name]])) + }
{"hexsha": "cc85edb5ec8425a88d189e9eba59eff2a7e06393", "size": 137, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Associative-array-Iteration/R/associative-array-iteration-2.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "ma...
using spc using Test @testset "spc.jl" begin # Write your tests here. end
{"hexsha": "efc6783524fb7e1cdb339d5c030d3d0f0e7caa62", "size": 79, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "DaanVanHauwermeiren/spc", "max_stars_repo_head_hexsha": "410465ad754590d891b73fa5828e4450ad9801ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\clearpage \subsection{C++ SplashKit Terminal Output} % (fold) \label{sub:c_console_output} The C and C++ programming languages include standard libraries that allow you to write text to the terminal. However, the way the C procedures work is prone to errors (none of which will help you learn about programming) and th...
{"hexsha": "1cf54d446917ff58be4ace55fd37c3406c7d4928", "size": 2336, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "topics/program-creation/c/printf.tex", "max_stars_repo_name": "thoth-tech/programming-arcana", "max_stars_repo_head_hexsha": "bb5c0d45355bf710eff01947e67b666122901b07", "max_stars_repo_licenses": ["...
from predictor import predict from kivy.config import Config Config.set('graphics', 'width', 560) Config.set('graphics', 'height', 560) Config.set('graphics', 'resizable', 0) from kivy.core.window import Window from kivy.app import App from kivy.uix.widget import Widget from kivy.utils import get_color_from_hex from ki...
{"hexsha": "6ca7d2496f2c6e4a8d4ba13c4b385b49010a100b", "size": 3054, "ext": "py", "lang": "Python", "max_stars_repo_path": "kivy/paintApp/main.py", "max_stars_repo_name": "terasakisatoshi/pythonCodes", "max_stars_repo_head_hexsha": "baee095ecee96f6b5ec6431267cdc6c40512a542", "max_stars_repo_licenses": ["MIT"], "max_sta...
import warnings from datetime import datetime from typing import Callable, Dict, NamedTuple, Optional, Tuple import jax from jax import numpy as jnp from tqdm import tqdm from mcx.inference.adaptation import ( StanWarmupState, stan_hmc_warmup, stan_warmup_schedule, ) from mcx.inference.integrators import ...
{"hexsha": "7cc49fa14d11e30a4196f2cfa42a74b6fb69f5a3", "size": 12608, "ext": "py", "lang": "Python", "max_stars_repo_path": "mcx/inference/hmc.py", "max_stars_repo_name": "tblazina/mcx", "max_stars_repo_head_hexsha": "d3529d71d0e302e1c2dcde9cc669fcb0769c71cc", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
''' Attentional Factorization Machines https://arxiv.org/pdf/1708.04617.pdf Format: https://github.com/aicodes/tf-bestpractice Methods represented 1) Inference - Initialize Graph 2) Loss 3) Optimizer ''' import math import os import argparse from time import time import numpy as np import tensorflow as tf from skl...
{"hexsha": "73f5d0198743461f899781bbabcb11213cce499d", "size": 17931, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/intro/model/afm.py", "max_stars_repo_name": "Seraphyx/fm-intro", "max_stars_repo_head_hexsha": "58b25b198712fe7703d1015b82fbdca7e4f1c1ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
from typing import Any from typing import Dict from typing import Type from typing import Union import numpy as np import pandas as pd from .base import BasePreprocessor from .base import ONE_DIM_ARRAYLIKE_TYPE from .base import TWO_DIM_ARRAYLIKE_TYPE class ModifiedSimpleImputer(BasePreprocessor): """Imputation...
{"hexsha": "abac2048ff4674bc93934b94a9c2aaf3c38fb872", "size": 2997, "ext": "py", "lang": "Python", "max_stars_repo_path": "automllib/impute.py", "max_stars_repo_name": "Y-oHr-N/autodl19", "max_stars_repo_head_hexsha": "c83b9cae08e1cee69df362a13794632380cbe0ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
"""Python implementation of Pavel Holoborodko's smooth noise-robust differentiators. See http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/ """ import numpy as np from scipy.special import binom def derivative_n2(data: np.ndarray, dt=1., filter_length=5): if...
{"hexsha": "202b96fbf3f8c72c934d59cbe374d1c5e0a90bfb", "size": 827, "ext": "py", "lang": "Python", "max_stars_repo_path": "noise_robust_differentiator/derivatives.py", "max_stars_repo_name": "mvernacc/noise_robust_differentiator", "max_stars_repo_head_hexsha": "b0d1870a38f8f9eaf11b67915d794fffdca4ff67", "max_stars_repo...
''' Copyright 2018 Alex Dela Cruz & Kaylan Tirdad 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 agree...
{"hexsha": "284b2c91e2de7deec79033fb9070166f72705c31", "size": 6981, "ext": "py", "lang": "Python", "max_stars_repo_path": "util_correlation.py", "max_stars_repo_name": "adelacru33/recsys_2018-spotify", "max_stars_repo_head_hexsha": "c0b8ae8fa1a492c1d3ccb29dafa39e853281c4d6", "max_stars_repo_licenses": ["Apache-2.0"], ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: oesteban # @Date: 2014-11-19 09:46:07 # @Last Modified by: oesteban # @Last Modified time: 2017-10-13 14:56:02 from __future__ import print_function, division, absolute_import, unicode_literals import os import os.path as op from glob import glob import nibab...
{"hexsha": "69f2f08fa707fe20f72e508936cf00441dfb6079", "size": 14019, "ext": "py", "lang": "Python", "max_stars_repo_path": "regseg/interfaces/utility.py", "max_stars_repo_name": "oesteban/pyregseg", "max_stars_repo_head_hexsha": "16639a048a6990465d460bfce65623556b104e51", "max_stars_repo_licenses": ["MIT"], "max_stars...
# # MLDB-174-regression.py # This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. # import unittest, json from mldb import mldb, MldbUnitTest, ResponseException class Mldb174Test(MldbUnitTest): @classmethod def setUpClass(self): # create a dataset for very simple linear regress...
{"hexsha": "798d880bb1cf4bc24e8dfd70bfc2517dcc4a0480", "size": 24197, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/MLDB-174-regression.py", "max_stars_repo_name": "kstepanmpmg/mldb", "max_stars_repo_head_hexsha": "f78791cd34d01796705c0f173a14359ec1b2e021", "max_stars_repo_licenses": ["Apache-2.0"], "m...
from __future__ import division from __future__ import print_function from __future__ import absolute_import import os import pdb import glob from skimage import transform, io import numpy as np from tqdm import tqdm def read_whale_flukes(): """Read whale flukes dataset, save to a single npy file""" train ...
{"hexsha": "de0c2198dafec5d77b4a3c98981f837bc9fbb824", "size": 3221, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "adamocarolli/MobyNet", "max_stars_repo_head_hexsha": "81005d004e3ca6654ad7b9dd728487d10e7b7894", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
{"hexsha": "3f7ee1bf804b5a2d7d6e604b5daffe18e1177d2f", "size": 6552, "ext": "py", "lang": "Python", "max_stars_repo_path": "fully_supervised/lib/data.py", "max_stars_repo_name": "google-research/adamatch", "max_stars_repo_head_hexsha": "83d9a1c86c177fa5c2832db1d0a30168d65b2019", "max_stars_repo_licenses": ["Apache-2.0"...
nt = 1000 m = ABCDQR_simula(nt) y = m["y"] u = m["u"] A = m["A"] B = m["B"] C = m["C"] D = m["D"] Q = m["Q"] R = m["R"] x10 = 0*A[:,1] P10 = 0*A ########################### print("Testing ABCDQR_kfilter: ") xtt,Ptt,xtt1,Ptt1,et,St,Kt,loglik = ABCDQR_kfilter(y,u,A,B,C,D,Q,R,x10,P10) @test sum(xtt.^2) > 1e-6 println("O...
{"hexsha": "6b91eb683c213748ad5882c6141dee90658882b5", "size": 498, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ABCDQR_kfilter_test.jl", "max_stars_repo_name": "javiercara/emABCDQR.jl", "max_stars_repo_head_hexsha": "21e2994d69956a7dbaba3391ad2a293a7d0ec53a", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma GR': \<open>\<turnstile> \<^bold>\<not> \<langle>\<^bold>\<star>a/0\<rangle>p \<^bold>\<longrightarrow> q \<Longrightarrow> a \<notin> params {p, q} \<Longrightarrow> \<turnstile> \<^bold>\<not> (\<^bold>\<forall>p) \<^bold>\<longrightarrow> q\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. ...
{"llama_tokens": 3115, "file": "FOL_Axiomatic_FOL_Axiomatic", "length": 22}
import TimeZones const TIME_ZONE = TimeZones.TimeZone("America/New_York")
{"hexsha": "aef1cd4ff172d1c7c12ff5b2d93da3897e108225", "size": 75, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "config/preferences/time-zone.jl", "max_stars_repo_name": "KristofferC/RepoSnapshots.jl", "max_stars_repo_head_hexsha": "357e12a814309b8b751a2927bf37440357e5cd76", "max_stars_repo_licenses": ["MIT"], ...
import cv2 import numpy as np import tensorflow as tf import os import glob import h5py # Get the Image def imread(path): img = cv2.imread(path) return img def imsave(image, path, config): #checkimage(image) # Check the check dir, if not, create one if not os.path.isdir(os.path.join(os.get...
{"hexsha": "30903fc92a6f8ebe8ac1f4dbdd574525803acb26", "size": 23011, "ext": "py", "lang": "Python", "max_stars_repo_path": "scratch_dir/temp/utils.py", "max_stars_repo_name": "the-spyn-project/spyn-poc", "max_stars_repo_head_hexsha": "8141504b163793ef40fa893598fddfc7c145ec33", "max_stars_repo_licenses": ["MIT"], "max_...
""" Welcome to the second part of the assignment 1! In this section, we will learn how to analyze our trained model and evaluate its performance on predicting neural data. Mainly, you will first learn how to load your trained model from the database and then how to use tfutils to evaluate your model on neural data usin...
{"hexsha": "919197bd986ae0b5bdd43fb1df19ad9f79a77679", "size": 12216, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment2/autoencoder_pooled_bottleneck_imagenet.py", "max_stars_repo_name": "dbirman/cs375", "max_stars_repo_head_hexsha": "7aeac1ed57eff74cbecb3e1091b01f00d34629a8", "max_stars_repo_licenses"...
[STATEMENT] lemma box_right_mult_a_a: "|x](a(y) * a(z)) = |x]a(y) * |x]a(z)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. | x ] (a y * a z) = | x ] a y * | x ] a z [PROOF STEP] using a_dist_sup box_def mult_left_dist_sup tests_dual.sub_sup_demorgan [PROOF STATE] proof (prove) using this: a (?x \<squnion> ?y) = a...
{"llama_tokens": 286, "file": "Correctness_Algebras_Relative_Modal", "length": 2}
# Sympy - Symbolic algebra in Python J.R. Johansson (jrjohansson at gmail.com) The latest version of this [IPython notebook](http://ipython.org/notebook.html) lecture is available at [http://github.com/jrjohansson/scientific-python-lectures](http://github.com/jrjohansson/scientific-python-lectures). The other notebo...
{"hexsha": "672887deb4bb273aa99190b0cd8a04caf4c1c631", "size": 160582, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "tests/python-scientific/Lecture-5-Sympy.ipynb", "max_stars_repo_name": "gopala-kr/ds-notebooks", "max_stars_repo_head_hexsha": "bc35430ecdd851f2ceab8f2437eec4d77cb59423", "max_stars...
[STATEMENT] lemma foldr_length_helper : assumes "length xs = length ys" shows "foldr (\<lambda>_ x . f x) xs b = foldr (\<lambda>a x . f x) ys b" [PROOF STATE] proof (prove) goal (1 subgoal): 1. foldr (\<lambda>_. f) xs b = foldr (\<lambda>a. f) ys b [PROOF STEP] using assms [PROOF STATE] proof (prove) using this:...
{"llama_tokens": 201, "file": "FSM_Tests_Util", "length": 2}
from IPython import display as ipythondisplay from PIL import Image import tensorflow as tf import numpy as np import gym def render_episode(env: gym.Env, model: tf.keras.Model, max_steps: int): screen = env.render(mode="rgb_array") im = Image.fromarray(screen) images = [im] state = tf.constant(env....
{"hexsha": "2b574d9ff0bf919a2a76172e74629df3dfb9e0c5", "size": 837, "ext": "py", "lang": "Python", "max_stars_repo_path": "render.py", "max_stars_repo_name": "sarb9/MyReinforcmentLearningLab", "max_stars_repo_head_hexsha": "6a0f0436e4236962b26b25dec9405b747f89d313", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
// Copyright (c) 2020-2021 Franz Alt // This code is licensed under MIT license (see LICENSE.txt for details). #include <libcvpg/imageproc/scripting/algorithms/histogram_equalization.hpp> #include <chrono> #include <functional> #include <boost/asynchronous/continuation_task.hpp> #include <libcvpg/core/exception.hpp...
{"hexsha": "a7a59922853e3d4e31240b3b6c799a0348ee100e", "size": 6552, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/libcvpg/imageproc/scripting/algorithms/histogram_equalization.cpp", "max_stars_repo_name": "franz-alt/cv-playground", "max_stars_repo_head_hexsha": "d6c3bbdb500bf121c28299d117e459730b2b912d", "m...
############################################################################# #Copyright (c) 2016 Charles Le Losq # #The MIT License (MIT) # #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 withou...
{"hexsha": "646dae33e6b8bacf1a1cd03e3a232d0ca4c1b6e3", "size": 5789, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tlcorrection.jl", "max_stars_repo_name": "JuliaPackageMirrors/Spectra.jl", "max_stars_repo_head_hexsha": "9bc4b7c4d789605e6828365647c34e5861739b52", "max_stars_repo_licenses": ["MIT"], "max_sta...
import os import gc import glob import warnings import numpy as np import pandas as pd import netCDF4 as nc import geopandas as gpd import matplotlib.pyplot as plt from shapely.ops import cascaded_union def MKDIR(path): if os.path.exists(path) == False: os.makedirs(path) class MODIS(): def...
{"hexsha": "1e3e05a953a268695f678b5a624b5879dc0d630f", "size": 7252, "ext": "py", "lang": "Python", "max_stars_repo_path": "Processing.py", "max_stars_repo_name": "a9455/MODIS", "max_stars_repo_head_hexsha": "a4391b7b381224df69411b7dd865c46541060036", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
import numpy as np, time, random, csv import torch, ast, pandas as pd, copy, itertools as it, os, torch.nn as nn from torchvision import transforms import torchvision import scipy.io as sio from tqdm import tqdm from PIL import Image from skimage import io, transform import itertools as it, copy import network as net i...
{"hexsha": "315506c56d20d4e02bc3d05e4debb89cd2a9f342", "size": 19481, "ext": "py", "lang": "Python", "max_stars_repo_path": "behaviorAnalysis/magnification/training/auxiliaries.py", "max_stars_repo_name": "aiporre/uBAM", "max_stars_repo_head_hexsha": "547b842b8dbaa221a2dcb93bf040f5decaacb517", "max_stars_repo_licenses"...
import callhorizons import numpy as np def agrees(x, y, eps=1e-5): if x != 0: return np.abs(x-y)/np.abs(x) < eps else: return np.abs(y) < eps def test_ephemerides(): """ check ephemerides output for one asteroid """ asteroid_targetname = 'Ceres' target = callhorizons.query(astero...
{"hexsha": "84b724ceb30394fa556cf236e3c8de5a430d0660", "size": 9343, "ext": "py", "lang": "Python", "max_stars_repo_path": "callhorizons/tests/test_callhorizons.py", "max_stars_repo_name": "mommermi/callhorizons", "max_stars_repo_head_hexsha": "fdd7ad9e87cac107c1b7f88e594d118210da3b1a", "max_stars_repo_licenses": ["MIT...
# -*- coding: utf-8 -*- """ Created on Sat Dec 28 22:11:41 2019 preproc ISIC18 task 1 segmentation use mask to calc xywh range and train a image localization model @author: cmj """ from pathlib import Path import numpy as np import cv2 from tqdm import tqdm import pandas as pd from preproc.letterbox_resize import let...
{"hexsha": "ebf13986aeb1ebf6b49184a2d8a1097e5c8b8122", "size": 2924, "ext": "py", "lang": "Python", "max_stars_repo_path": "preproc/preproc_segloc.py", "max_stars_repo_name": "zyxwvu321/Classifer_SSL_Longtail", "max_stars_repo_head_hexsha": "e6c09414c49e695b0f4221a3c6245ae3929a1788", "max_stars_repo_licenses": ["MIT"],...