text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma dg_prod_Dom_app_component_app[dg_cs_simps]: assumes "f \<in>\<^sub>\<circ> (\<Prod>\<^sub>D\<^sub>Gi\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Arr\<rparr>" and "i \<in>\<^sub>\<circ> I" shows "(\<Prod>\<^sub>D\<^sub>Gi\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Dom\<rparr>\<lparr>f\<rparr>\<lparr>i\<rparr> =...
{"llama_tokens": 582, "file": "CZH_Foundations_czh_digraphs_CZH_DG_PDigraph", "length": 3}
""" Copyright 2016 Erik Jan de Vries Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
{"hexsha": "10bebcb1c839e96abd603589ceef57734b9ee042", "size": 5513, "ext": "py", "lang": "Python", "max_stars_repo_path": "catch.py", "max_stars_repo_name": "erikjandevries/QLearnCatch", "max_stars_repo_head_hexsha": "ddc37f86ec6a57d2b0c1da88207d9880e1de43b7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import cv2 import os import argparse import random from imutils import paths import numpy as np from tqdm import trange provinces = ["皖", "沪", "津", "渝", "冀", "晋", "蒙", "辽", "吉", "黑", \ "苏", "浙", "京", "闽", "赣", "鲁", "豫", "鄂", "湘", "粤", \ "桂", "琼", "川", "贵", "云", "藏", "陕", "甘", "青", "宁", "新"] al...
{"hexsha": "8a217b37f8560d58943eaf81d2e5c528292d0d05", "size": 2788, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/deep_learning/data_process.py", "max_stars_repo_name": "ThreeSRR/License-Plate-Recogonition", "max_stars_repo_head_hexsha": "f2161c8fa0e161b1e03cf2fb1d5a7f4cba4d5449", "max_stars_repo_license...
"""Trains a model, saving checkpoints and tensorboard summaries along the way.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse from datetime import datetime import json import math import os import shutil import sys from timeit import d...
{"hexsha": "54c0f0f1c487b3c648a94d9a41ff07e6dad3c93f", "size": 5813, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute_corr.py", "max_stars_repo_name": "MadryLab/backdoor_data_poisoning", "max_stars_repo_head_hexsha": "c15096fdd79836e3e94a5cab54d50fe97a9c140f", "max_stars_repo_licenses": ["MIT"], "max_star...
# Copyright 2019 Intel Corporation. import functools import inspect import logging import math import os from collections import defaultdict from contextlib import contextmanager import six import numpy as np import scipy.stats import plaidml import plaidml.edsl as edsl import plaidml.exec import plaidml.op as plaid...
{"hexsha": "82caf4f368525cba7398204353f156e10f1f07d3", "size": 55054, "ext": "py", "lang": "Python", "max_stars_repo_path": "plaidml/bridge/keras/__init__.py", "max_stars_repo_name": "hfp/plaidml", "max_stars_repo_head_hexsha": "c86852a910e68181781b3045f5a306d2f41a775f", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
CU SUBROUTINE shoot(n2,v,f) is named "funcv" for use with "newt" SUBROUTINE funcv(n2,v,f) INTEGER n2,nvar,kmax,kount,KMAXX,NMAX REAL f(n2),v(n2),x1,x2,dxsav,xp,yp,EPS PARAMETER (NMAX=50,KMAXX=200,EPS=1.e-6) COMMON /caller/ x1,x2,nvar COMMON /path/ kmax,kount,dxsav,xp(KMAXX),...
{"hexsha": "ab9ac40bc797d3dcdd35de16813c6b57276f6b52", "size": 652, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "NR-Functions/Numerical Recipes- Example & Functions/Functions/shoot.for", "max_stars_repo_name": "DingdingLuan/nrfunctions_fortran", "max_stars_repo_head_hexsha": "37e376dab8d6b99e63f6f1398d0c33d...
!------------------------------------------------------------------------------- !> module ATMOSPHERE / Physics Radiative Transfer !! !! @par Description !! 2-stream, k-distribution broadband radiative transfer scheme mstrnX !! Reference : Nakajima and Tanaka(1986) : J.Quant.Spectrosc.Radiat.Transfe...
{"hexsha": "97222371ea240195e39bb9b7ffd7ff8f9d4cde05", "size": 160345, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "physicskernel_radiation/src/mod_rd_mstrnx.f90", "max_stars_repo_name": "hisashiyashiro/nicam_dckernel_2016", "max_stars_repo_head_hexsha": "a614da10bad7cd1c2eb9a778bd04bad2dc195696", "max_star...
/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that i...
{"hexsha": "c0fdd9e3082d609283db448ca1bbd4f5c1158371", "size": 15325, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libsolidity/analysis/ContractLevelChecker.cpp", "max_stars_repo_name": "step21/solidity", "max_stars_repo_head_hexsha": "2a0d701f709673162e8417d2f388b8171a34e892", "max_stars_repo_licenses": ["MIT"...
import sys import pandas as pd import numpy as np import itertools from sklearn.preprocessing import RobustScaler from sklearn.linear_model import SGDClassifier from evaluate_model import evaluate_model dataset = sys.argv[1] pipeline_components = [RobustScaler, SGDClassifier] pipeline_parameters = {} loss_values = [...
{"hexsha": "b4e55cba53a37eed1e275e931e460e40ed06a2d6", "size": 1597, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_code/grid_search/SGDClassifier.py", "max_stars_repo_name": "lacava/sklearn-benchmarks", "max_stars_repo_head_hexsha": "bec1d5468f40b1fea08b605a11d5f7795fe5bb1b", "max_stars_repo_licenses": [...
\section{Design Stakeholders and Concerns} \subsection{Design Stakeholders} \begin{itemize} \item Light Water Reactor Sustainability (LWRS) program \item Nuclear Energy Advanced Modeling and Simulation Program (NEAMS) \item Nuclear-Renewable Hybrid Energy Systems (NHES) \item Open-source community \end{itemiz...
{"hexsha": "f5e5983d478e0d7f2d6349927c9e0f33ab0e4fc6", "size": 627, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/sqa/sdd/ravenDesignStakeHoldersAndConcerns.tex", "max_stars_repo_name": "rinelson456/raven", "max_stars_repo_head_hexsha": "1114246136a2f72969e75b5e99a11b35500d4eef", "max_stars_repo_licenses": [...
\section{Lineage-based Reuse} \label{sec:reuse} The lineage of an intermediate carries all information to identify and recompute this intermediate. LIMA leverages this characteristic in a lineage-based reuse cache for eliminating fine-grained redundancy (see Section~\ref{sec:redundancy}). Figure~\ref{fig:reuse} gives ...
{"hexsha": "d0d71ea93be4864ad12c6c2f9b006e1176a7219d", "size": 18239, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sigmod2021-LIMA-p32/paper/Reuse.tex", "max_stars_repo_name": "damslab/reproducibility", "max_stars_repo_head_hexsha": "f7804b2513859f7e6f14fa7842d81003d0758bf8", "max_stars_repo_licenses": ["Apache...
from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import pytest import pdb from astropy import units as u from linetools.analysis.absline import aodm, log_clm, linear_clm, photo_cross,\ sum_logN, get_tau0, Wr_from_N_b, Wr_from_N_b_transition, Wr_from_N, Wr_from_...
{"hexsha": "3391c94bc0b7f1c5a1a89b6a3e55fdb109934f28", "size": 5166, "ext": "py", "lang": "Python", "max_stars_repo_path": "linetools/analysis/tests/test_absline.py", "max_stars_repo_name": "jchowk/linetools", "max_stars_repo_head_hexsha": "5a0eafa96ab854c52c070ce756033c0499414dde", "max_stars_repo_licenses": ["BSD-3-C...
```python %matplotlib inline ``` Adversarial Example Generation ============================== **Author:** `Nathan Inkawhich <https://github.com/inkawhich>`__ If you are reading this, hopefully you can appreciate how effective some machine learning models are. Research is constantly pushing ML models to be faster, ...
{"hexsha": "e67d3baadeb9cb7de80c79957906048882e61516", "size": 19697, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "docs/_downloads/8c22803172fb62b19326a346e208ba61/fgsm_tutorial.ipynb", "max_stars_repo_name": "leejh1230/PyTorch-tutorials-kr", "max_stars_repo_head_hexsha": "ebbf44b863ff96c597631e2...
from qiskit.circuit.gate import Gate from qiskit_cold_atom import QiskitColdAtomError, add_gate import numpy as np class LoadGate(Gate): """The load gate.""" def __init__(self,num_atoms:int) -> None: """Create a new gate. Args: params: A list of parameters. """ su...
{"hexsha": "10e7101fec237c26ad8cf2846d9034dda172bb11", "size": 1900, "ext": "py", "lang": "Python", "max_stars_repo_path": "qiskit_synqs/synqs_single_qudit/sqs_gate_library.py", "max_stars_repo_name": "synqs/qiskit-synqs", "max_stars_repo_head_hexsha": "435c3944900963c61aa479f2a13739083f6495a7", "max_stars_repo_license...
Require Import Coqlib. Require Import Asm. Require Import Integers. Require Import PeekTactics. Require Import PeepsLib. Require Import PregTactics. Require Import StepIn. Require Import AsmBits. Require Import Values. Require Import ValEq. Require Import Integers. Require Import PeepsTactics. Definition peep_add_neg_...
{"author": "uwplse", "repo": "peek", "sha": "4943735ed39fd5ddadf2c28fc2ada31504228561", "save_path": "github-repos/coq/uwplse-peek", "path": "github-repos/coq/uwplse-peek/peek-4943735ed39fd5ddadf2c28fc2ada31504228561/compcert/peeps/Peep_AddNeg1ToDec.v"}
\hypertarget{classglite_1_1wms_1_1jdl_1_1AdConverter}{ \section{glite::wms::jdl::Ad\-Converter Class Reference} \label{classglite_1_1wms_1_1jdl_1_1AdConverter}\index{glite::wms::jdl::AdConverter@{glite::wms::jdl::AdConverter}} } utilities for converting classad expression into requestad known classes and to create Job\...
{"hexsha": "70572844a3bbde113ada8e0c7c40e5661388315d", "size": 33494, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "users-guide/WMS/autogen/jdl/classglite_1_1wms_1_1jdl_1_1AdConverter.tex", "max_stars_repo_name": "italiangrid/wms", "max_stars_repo_head_hexsha": "5b2adda72ba13cf2a85ec488894c2024e155a4b5", "max_st...
#Day 1: Data Prepocessing #Step 1: Importing the libraries import numpy as np import pandas as pd #Step 2: Importing dataset dataset = pd.read_csv('../datasets/Data.csv') print(dataset.head()) X = dataset.iloc[ : , :-1].values Y = dataset.iloc[ : , 3].values print("Step 2: Importing dataset") print("X") print(X) prin...
{"hexsha": "b119fec552a63cc507ff7ffecc198a95b40e138f", "size": 1916, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/Day 1_Data_Preprocessing.py", "max_stars_repo_name": "fengdu1127/tmp", "max_stars_repo_head_hexsha": "ecbd3828832ce3c66cd748a6764ed7c1ae19bade", "max_stars_repo_licenses": ["MIT"], "max_stars...
# !usr/bin/env python # coding:utf-8 """ 决策树实践 author: prucehuang email: 1756983926@qq.com date: 2019/01/08 """ import os from matplotlib.colors import ListedColormap from sklearn.datasets import load_iris, make_moons from sklearn.tree import DecisionTreeClassifier, export_graphviz, DecisionTreeRegressor import ...
{"hexsha": "a8b1c4f7896def7a9e6ee286738a5b10b1d0c192", "size": 7603, "ext": "py", "lang": "Python", "max_stars_repo_path": "Hands-On Machine Learning with Scikit-Learn and TensorFlow/code/06_decision_trees.py", "max_stars_repo_name": "prucehuang/quickly-start-python", "max_stars_repo_head_hexsha": "8af5f339b6d324a769d5...
import math from scipy.stats import binom def ncr(n,r): f = math.factorial return f(n) / f(r) / f(n-r) # setting the values # of n and p beta = 10 p = 1.0/(4.3*30*24)#-math.exp(-1/(4.3)) print p # obtaining the mean and variance mean, var = binom.stats(beta, p) # list of pmf values # printing mean an...
{"hexsha": "e70dbf1b69d7c81c218f72c981c5f2af02610854", "size": 1008, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/exp/sstable_availability.py", "max_stars_repo_name": "ruihong123/NovaLSM", "max_stars_repo_head_hexsha": "8a661197ce5b993f2baeef608f34192d1ef0adf5", "max_stars_repo_licenses": ["BSD-3-Clau...
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule x264_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("x264") JLLWrappers.@generate_main_file("x264", UUID("1270edf5-f2f9-52d2-97e9-ab00b5d0237a")) end # module x264_jll
{"hexsha": "b5170b9b072e287703c188b0bd10a37fcda37c22", "size": 294, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/x264_jll.jl", "max_stars_repo_name": "JuliaBinaryWrappers/x264_jll.jl", "max_stars_repo_head_hexsha": "a7ba0419794606a373fa1ac2ef3e7368e75fc493", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/visualization/experiment_visualization.ipynb (unless otherwise specified). __all__ = ['plot_multiple_histories', 'plot_metric_relationship', 'visualize_experiments'] # Cell import numpy as np #import matplotlib.pyplot as plt import os import pickle import pandas as pd f...
{"hexsha": "13ce6fb69fd51bbf9ec86ed8faa0be9224ebfdd5", "size": 8278, "ext": "py", "lang": "Python", "max_stars_repo_path": "hpsearch/visualization/experiment_visualization.py", "max_stars_repo_name": "Jaume-JCI/hpsearch", "max_stars_repo_head_hexsha": "168d81f49e1a4bd4dbab838baaa8ff183a422030", "max_stars_repo_licenses...
# kuramoto_7-27-19.jl # Starting off the day strong with some code from my other project, # grok-the-dot. function f(x) return 2x+1 end function g(x) return x^2 end function h(x) return 4x^2 + 4x + 11 # (2x + 1)^2 = 4x^2 + 4x + 11 end G = collect(1:1_000_000) # You can use underscores to ...
{"hexsha": "a01b8c85672186b8c3a83235a943afe87b301051", "size": 629, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "diary/kuramoto_7-27-19.jl", "max_stars_repo_name": "AndrewQuinn2020/Kuramoto", "max_stars_repo_head_hexsha": "db0d9873b71cb5904f25c8806aaccc62b8dedaaa", "max_stars_repo_licenses": ["MIT"], "max_star...
# Read in a shapefile of a fault and plot river profile morphology along it. # FJC 26/11/18 # set backend to run on server #import matplotlib #matplotlib.use('Agg') # general modules import numpy as np import numpy.ma as ma import pandas as pd import math import matplotlib.pyplot as plt import os import time from mat...
{"hexsha": "29d2ec869f8d4b08b5723b815e04bd926316b9b5", "size": 91387, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting/swath_profile.py", "max_stars_repo_name": "fclubb/fault-swath", "max_stars_repo_head_hexsha": "687b1af26a969b1ed4e94cc597b23762fd1bb3da", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import time import math import numpy as np import scipy import theano import theano.tensor as T class Distance: def __init__(self, norm='l2', verbose=False): """Construct an object, with the primary method transform, there can create a sparse distance matrix. Parameters ---------...
{"hexsha": "d51aa914bc371823d66f7f448e05023e3ee29b64", "size": 3048, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/distance.py", "max_stars_repo_name": "AndreasMadsen/bachelor-code", "max_stars_repo_head_hexsha": "115fd2b955de07f34cdec998ba2a7f103ae253e3", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import ast import numpy as np import scipy as sp import cv2 from pywt import wavedec2, dwt2 from ..third_party.funque_atoms import pyr_features from ..third_party.vmaf_atoms import vmaf_features from ..core.feature_extractor import FeatureExtractor, VmafexecFeatureExtractorMixin from ..tools.reader import YuvReader...
{"hexsha": "2a955054d53e5e30863c5710029bc6eb88d5ea2b", "size": 12368, "ext": "py", "lang": "Python", "max_stars_repo_path": "funque/core/custom_feature_extractors.py", "max_stars_repo_name": "abhinaukumar/funque", "max_stars_repo_head_hexsha": "47f030af78e4e64b9d0e5c7632193373eb94afcd", "max_stars_repo_licenses": ["BSD...
import numpy as np from collections import OrderedDict from gym.spaces import Space, Box, Discrete, MultiDiscrete, MultiBinary, Tuple, Dict _BaseGymSpaces = (Box, Discrete, MultiDiscrete, MultiBinary) __all__ = ["_BaseGymSpaces", "batch_space"] def batch_space(space, n=1): """Create a (batched) space, containin...
{"hexsha": "ac4727de5a08fa3d77e14177bf38b3d94fa5fe4e", "size": 2849, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/gymcore/vector/utils/spaces.py", "max_stars_repo_name": "maxgold/icml22", "max_stars_repo_head_hexsha": "49f026dd2314091639b52f5b8364a29e8000b738", "max_stars_repo_licenses": ["MIT"], "max_st...
######## Webcam hand-digit Detection Using Tensorflow mnist Model ######### # # Author: jihwan Lee # Date: 02/10/20 # Revised by: LUMI # Date: Nov-21,'21 # Description: # This program uses a TensorFlow Lite model to perform object detection on a live webcam feed # # This code is based off the TensorFlow Lite image cl...
{"hexsha": "ff19af8ad183087f8735cca43c6dab5f157318fa", "size": 7735, "ext": "py", "lang": "Python", "max_stars_repo_path": "TFLite_mnist_webcam.py", "max_stars_repo_name": "poohaboy/raspberrypi-mnist", "max_stars_repo_head_hexsha": "ad30766e8ccbefc49e3907b9eb2af6aefd542797", "max_stars_repo_licenses": ["MIT"], "max_sta...
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import data.option.defs import logic.basic import tactic.cache /-! ## Definitions on lists Th...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/data/list/defs.lean"}
import os import numpy as np from pprint import pprint from collections import defaultdict from ..utils import * from .io_base import DataDecoder from pygama import lh5 from .ch_group import * class FlashCamEventDecoder(DataDecoder): """ decode FlashCam digitizer event data. """ def __init__(self, *...
{"hexsha": "d4f74ed7f8b2f65f44a20c6c3ebddc0d642ad617", "size": 14907, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygama/io/fcdaq.py", "max_stars_repo_name": "Kermaidy/pygama", "max_stars_repo_head_hexsha": "d75f3d8d79f78c29f50171e24010a0644684f591", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
import os import tensorflow as tf import gym # Must import gym_powerworld for the environments to get registered. # noinspection PyUnresolvedReferences import gym_powerworld from gym_powerworld.envs.voltage_control_env import OutOfScenariosError import numpy as np import time import shutil from copy import deepcopy imp...
{"hexsha": "717d9562029c2d3aee3a68ea0930b3be3ba84389", "size": 18469, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/train.py", "max_stars_repo_name": "blthayer/drl-powerworld", "max_stars_repo_head_hexsha": "b265dc2e43f2e723f5d6e0aad7ba4946880efa53", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
# *************************************************************** # Copyright (c) 2020 Jittor. Authors: Dun Liang <randonlang@gmail.com>. All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ********************************...
{"hexsha": "b05885fde5c432bd581cdf493c77f61a8acf188c", "size": 3754, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/jittor/test/test_scope.py", "max_stars_repo_name": "xmyqsh/jittor", "max_stars_repo_head_hexsha": "1260e19235e301a67cba57aebbc187a5c1386e1a", "max_stars_repo_licenses": ["Apache-2.0"], "max...
"""Class to run max-product linear programming for linear-programming MAP inference.""" import numpy as np from .MatrixBeliefPropagator import sparse_dot from .MaxProductBeliefPropagator import MaxProductBeliefPropagator class MaxProductLinearProgramming(MaxProductBeliefPropagator): """ Class to run max-prod...
{"hexsha": "3c72315d25c7e0cee9d0c1830abee09a2a502b0e", "size": 1694, "ext": "py", "lang": "Python", "max_stars_repo_path": "mrftools/MaxProductLinearProgramming.py", "max_stars_repo_name": "berty38/mrftools", "max_stars_repo_head_hexsha": "9cd1984a2ff178bd1ee87b678ace8b803111654e", "max_stars_repo_licenses": ["MIT"], "...
/- Copyright (c) 2022 Jun Yoshida. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ import Algdata.Init.Sigma import Algdata.Data.List.Ascending universe u v /-! List of key-value pairs with values dependent on keys The elements are stored as the dependent pair `Sigma β...
{"author": "Junology", "repo": "algdata", "sha": "ef0e552747c3f1004705755a3afc7ccedec92bf6", "save_path": "github-repos/lean/Junology-algdata", "path": "github-repos/lean/Junology-algdata/algdata-ef0e552747c3f1004705755a3afc7ccedec92bf6/Algdata/Data/KVChain/Basic.lean"}
\documentclass[a4paper,12pt]{article} % Font \usepackage[T1]{fontenc} \usepackage{gentium} % Math packages \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{bm} % Define symbol shortcuts \newcommand{\cc}{\mathcal{C}} \newcommand{\dd}{\mathcal{D}} \newcommand{\hh}{\mathca...
{"hexsha": "bf071a686e70bdfa322ee39e0874712c3df7a5d2", "size": 13748, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "lecture_notes/chap08_trees.tex", "max_stars_repo_name": "chagaz/ma2823_2016", "max_stars_repo_head_hexsha": "9a963f800b4eb35ccee4f8fe347f11ea221cad58", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma size_filter_unsat_elem: assumes "x \<in># M" and "\<not> P x" shows "size {#x \<in># M. P x#} < size M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. size (filter_mset P M) < size M [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. size (filter_mset P M) < size M [PROOF ST...
{"llama_tokens": 579, "file": "Lambda_Free_RPOs_Lambda_Free_Util", "length": 8}
\chapter{Experiment and Results} \section{Evaluation Metrics} We evaluate the performance of the model on individual typos through various measures of accuracy. In particular, we compute the \textsc{Top-1 Accuracy}, comparing the intended word and the best candidate predicted by the model. Then we compute the \texts...
{"hexsha": "bc54a2f3f4f2bf31d54aa42b88dc3560c6ffac0c", "size": 22814, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/sections/05-results.tex", "max_stars_repo_name": "GiorgiaAuroraAdorni/hmm-misspelling", "max_stars_repo_head_hexsha": "90f16726d368764edbd94a53c36b3882112ce8c0", "max_stars_repo_licenses": [...
(* Title: HOL/Library/Lattice_Constructions.thy Author: Lukas Bulwahn Copyright 2010 TU Muenchen *) theory Lattice_Constructions imports Main begin subsection \<open>Values extended by a bottom element\<close> datatype 'a bot = Value 'a | Bot instantiation bot :: (preorder) preorder begin defin...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Library/Lattice_Constructions.thy"}
[STATEMENT] lemma ereal_infty_mult[simp]: "(\<infinity>::ereal) * a = (if a = 0 then 0 else if 0 < a then \<infinity> else - \<infinity>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<infinity> * a = (if a = 0 then 0 else if 0 < a then \<infinity> else - \<infinity>) [PROOF STEP] by (cases a) auto
{"llama_tokens": 134, "file": null, "length": 1}
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the rectangle module. """ from astropy.coordinates import Angle, SkyCoord import astropy.units as u import numpy as np import pytest from .test_aperture_common import BaseTestAperture from ..rectangle import (RectangularAperture, Rectangul...
{"hexsha": "ef7aa79dcf263c8e9a0dac631fc2cec2191340a9", "size": 5336, "ext": "py", "lang": "Python", "max_stars_repo_path": "photutils/aperture/tests/test_rectangle.py", "max_stars_repo_name": "rosteen/photutils", "max_stars_repo_head_hexsha": "5821bddc2d3fa2709b8de79c18efe99cff1ecb71", "max_stars_repo_licenses": ["BSD-...
The following are restaurants one can get Fish n Chips Black Bear Diner Carls Jr. De Veres Irish Pub G St. Wunderbar The Dumpling House Fishs Wild The Graduate Outside of Davis http://www.oceanfishandchips.com/ Ocean Fish And Chips wiki:Sacramento:Streets of London I like a nice generous plate of fi...
{"hexsha": "a35db5d9dd48e50097d491ca0a8443ad2351c5e9", "size": 777, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Fish_n_Chips.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import random import numpy import time import evaluation as ev import networkx as nx from deap import algorithms from deap import base from deap import creator from deap import tools # Constants init_pop_size = 300 number_of_nodes = ev.GRAPH_SIZE # squared because that many elements in adj matrix ind_size = number_of...
{"hexsha": "10abb1cc4d454f77cc24d380bc3fded8242ec70d", "size": 8217, "ext": "py", "lang": "Python", "max_stars_repo_path": "EvoFramwork.py", "max_stars_repo_name": "taomsakal/SeymourSearch", "max_stars_repo_head_hexsha": "eb098eab2d73eb36eeedbe7d200ffe10c3a9506f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# Copyright 2019 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": "0fa86c469cc3338296f0e135026ae69d6dd21a41", "size": 12980, "ext": "py", "lang": "Python", "max_stars_repo_path": "opencv/facemask_2.py", "max_stars_repo_name": "vanduc103/coral_examples", "max_stars_repo_head_hexsha": "a514d003a3948cb0888d2dabc0bdd93939f8ddd0", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import torch.nn.functional as F import torch.nn as nn import torch import torch.optim as optim import numpy as np import math from torch.nn import init from torch.distributions.normal import Normal class Flatten(nn.Module): def forward(self, input): return input.view(input.size(0), -1) class CnnActorCrit...
{"hexsha": "f79f351528771e6c169d5e865e3155402866bf55", "size": 9129, "ext": "py", "lang": "Python", "max_stars_repo_path": "models_sep.py", "max_stars_repo_name": "akhandait/curiosity-driven-world-models", "max_stars_repo_head_hexsha": "544326f1ed4274c2e96addebd414f05dead721a9", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python import argparse, os import numpy as np import pickle import matplotlib.pyplot as plt parser = argparse.ArgumentParser("Plot errors") parser.add_argument('--config', dest='config', type=str, default='config.txt', help='config file containing error directories' ...
{"hexsha": "2e3637ac19370de2fcac50a1b4a92529a435823e", "size": 3422, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_errors.py", "max_stars_repo_name": "schinmayee/object-tracking", "max_stars_repo_head_hexsha": "d0c53eb1b059da8456deb1ee0f0f23e96f9099ae", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed ...
{"hexsha": "e740e840c38381bafd7a1a7fcde5f963832ac1fb", "size": 12990, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "3rdparty/libprocess/include/process/address.hpp", "max_stars_repo_name": "zagrev/mesos", "max_stars_repo_head_hexsha": "eefec152dffc4977183089b46fbfe37dbd19e9d7", "max_stars_repo_licenses": ["Apach...
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 def test(): layout = ak._v2.contents.ListOffsetArray( ak._v2.index.Index64(np.array([0, 1], dtype=np.int64)), ak....
{"hexsha": "f6ffc420e1ef7c0270aedc3d3aab867cc470a8cc", "size": 753, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/v2/test_1071-mask-identity-false-should-not-return-option-type.py", "max_stars_repo_name": "douglasdavis/awkward-1.0", "max_stars_repo_head_hexsha": "f00775803a5568efb0a8e2dae3b1a4f23228fa40"...
import numpy as np # Use "new-style" classes for easier inheritance __metaclass__ = type class transformation: def __init__(self): self.matrix = np.zeros((4,4), dtype = np.float64) self.invmatrix = np.zeros((4,4), dtype = np.float64) def getMatrix(self): return self.matrix def getInvMatrix(self): ...
{"hexsha": "8c81669c3c4b815873dc3f5275152532d1cf8497", "size": 4733, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/transformation.py", "max_stars_repo_name": "tinyendian/relativity", "max_stars_repo_head_hexsha": "e6f3812bcbb491beea4d4deff134ee2c874a822e", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np def log_gradient_(x, y_true, y_pred): print(type(y_pred)) print(type(y_true)) if (isinstance(y_true, (list,np.ndarray)) and isinstance(y_pred, (list,np.ndarray))): error = y_pred - y_true nabela = [0] * len(x[0]) print(len(x[0][:])) print(x[0]) for i in range(len(x[0])): # print(x[:...
{"hexsha": "c5eaa14496a699fee674322f3dc615589c3dfa04", "size": 829, "ext": "py", "lang": "Python", "max_stars_repo_path": "day02/log_gradient.py", "max_stars_repo_name": "elbourki1/Machine-Learning-bootcamp-42", "max_stars_repo_head_hexsha": "cf6a987ede555d8d208aed5b915cafe8078dd848", "max_stars_repo_licenses": ["Apach...
#!/usr/bin/env python3 # Programa simple para aprender a usar Qt from __future__ import with_statement import sys import matplotlib matplotlib.use('Qt4Agg') from PyQt4 import QtGui, QtCore from propagator import Ui_MainWindow from polarization_routines import plot_ellipse, getAnglesFromEllipse, getAnglesFromJones fr...
{"hexsha": "a27fa7241a36b62290d34c04462cc9ab7a79d40c", "size": 7638, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_version/propagator_app.py", "max_stars_repo_name": "RomaniukVadim/ellipsometric-calculator", "max_stars_repo_head_hexsha": "629ae5c962dacd4416a180e0904b8ddcf642371a", "max_stars_repo_licens...
!----------------------------------------------------------------------- ! ! Copyright (c) 2016 Tom L. Underwood ! ! 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, inclu...
{"hexsha": "72b240d90e50cc95147b810136bc81308184ee6f", "size": 7189, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "lattices_in_bcc_hcp.f95", "max_stars_repo_name": "tomlunderwood/monteswitch", "max_stars_repo_head_hexsha": "1dd95dd46c0a1301fb4e520d2024e9b70bc71958", "max_stars_repo_licenses": ["MIT"], "max_s...
import torch import numpy.random as np_random from vap_turn_taking.backchannel import Backchannel from vap_turn_taking.hold_shifts import HoldShift from vap_turn_taking.utils import ( time_to_frames, find_island_idx_len, get_dialog_states, get_last_speaker, ) class TurnTakingEvents: def __init__(...
{"hexsha": "ba88746b7a07174746d50b45118233f164187372", "size": 10373, "ext": "py", "lang": "Python", "max_stars_repo_path": "vap_turn_taking/events.py", "max_stars_repo_name": "ErikEkstedt/vad_turn_taking", "max_stars_repo_head_hexsha": "c24e0ddfe9c739328872310e56f4b8c17f82c92c", "max_stars_repo_licenses": ["MIT"], "ma...
#%% import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import phd.viz colors, palette = phd.viz.phd_style() # Load the data. data = pd.read_csv('../../data/ch9_mscl_si/MLG910_electrophysiology.csv') data.columns = ['time', 'pa', 'mmHg'] # Instantiate the fig...
{"hexsha": "de817e952791e2294c4f8b145150d3b8f2bb2406", "size": 1658, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/chapter_09/code/ch9_figS1.py", "max_stars_repo_name": "gchure/phd", "max_stars_repo_head_hexsha": "cf5941e467ee57c6c93c78dda151335cb320f831", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Representable where -- A Presheaf (into Setoids) is representation if it is naturally isomorphic to a Hom functor -- over a particular object A of the base category. open import Level open import Categories.Category using (Category) open import Categories....
{"hexsha": "56f3630c38ec838d02f31100b9ead771c8ecacd4", "size": 740, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Categories/Functor/Representable.agda", "max_stars_repo_name": "MirceaS/agda-categories", "max_stars_repo_head_hexsha": "58e5ec015781be5413bdf968f7ec4fdae0ab4b21", "max_stars_repo_licenses": ["...
import numpy as np def QRDecomposition(A): n = np.shape(A)[0] #pegando o tamanho das linhas de A m = np.shape(A)[1] #pegando o tamanho das colunas de A Q = np.zeros((n,m)) #declarando a matriz Q R = np.zeros((m,m)) #declarando a matriz R for j in range(0, m): A_column = A[:, j] #pegando as colunas da matriz ...
{"hexsha": "e6b56d914513e4b3037f8049b84067c644cd368e", "size": 2431, "ext": "py", "lang": "Python", "max_stars_repo_path": "QRDecomposition.py", "max_stars_repo_name": "igortakeo/Calculo-Numerico", "max_stars_repo_head_hexsha": "96ed1892c3d2ba80039f2f2ce7de4ca834aa6283", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np import tensorflow as tf from models.ops import * from models.Attention import self_attention_layer, multihead_attention, dot_product_attention import tensorflow_probability as tfp lr = 5e-5 beta1 = 0.5 beta2 = 0.999 dtype = tf.float32 jitter = 1e-3 if dtype == tf.float64 else 1e-1 class ResidualN...
{"hexsha": "41cad2097187e8ab70b503a1a26a5f74765c7f6e", "size": 8408, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/toy1d.py", "max_stars_repo_name": "dlqudwns/Anonymous-Repository", "max_stars_repo_head_hexsha": "40e6d68781427268ab21c662f04855cc0e75833d", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
from autograd import numpy as np from autograd import grad, jacobian import numpy.matlib as nm from svgd import SVGD import sys #from mpltools import style #from mpltools import layout from multiprocessing import Process, Manager #style.use('ggplot') import matplotlib.pyplot as plt #-(1.0/(2*observation_variance))...
{"hexsha": "53b176cec7979b19e43d7891d23fd1524f8012e2", "size": 3589, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/llg.py", "max_stars_repo_name": "gcgibson/ssvgd", "max_stars_repo_head_hexsha": "8f47dca7588a3ccbc13069860f342efcd5bbf644", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
[STATEMENT] lemma infsetsum_Un_Int: assumes "f abs_summable_on (A \<union> B)" shows "infsetsum f (A \<union> B) = infsetsum f A + infsetsum f B - infsetsum f (A \<inter> B)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. infsetsum f (A \<union> B) = infsetsum f A + infsetsum f B - infsetsum f (A \<inter> B) [...
{"llama_tokens": 1298, "file": null, "length": 13}
# python regression_randombag_sample.py MSA_NAME LEN_SEEDS NUM_SAMPLE SAMPLE_FRAC # python regression_randombag_sample.py Atlanta 3 NUM_SAMPLE SAMPLE_FRAC import setproctitle setproctitle.setproctitle("covid-19-vac@chenlin") import sys import os import constants import functions import numpy as np impo...
{"hexsha": "2692935ba3f41ccde3b427a3e01f7866ff4883f5", "size": 25208, "ext": "py", "lang": "Python", "max_stars_repo_path": "regression_randombag_sample.py", "max_stars_repo_name": "LinChen-65/utility-equity-covid-vac", "max_stars_repo_head_hexsha": "9194ee0e019b3160254401b84d369900a527da7e", "max_stars_repo_licenses":...
mutable struct FriendSets var::Vector{Symbol} sets::Vector{String} counts::Vector{Int64} items::Vector{Vector{Int64}} FriendSets(var, sets, counts, items) = new(var, sets, counts, items) FriendSets() = new(Symbol[], String[], Int64[], Vector{Vector{Int64}}(undef, 0)) end
{"hexsha": "57a9ad64d60f4c902a7a701e4061cb79bf103462", "size": 296, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structs/constraints/friend_sets_struct.jl", "max_stars_repo_name": "giadasp/ATA.jl", "max_stars_repo_head_hexsha": "8ec4227c418784521e8d14623626e072a348fc79", "max_stars_repo_licenses": ["MIT"],...
import numpy as np import logging from scipy import interpolate def areas(ip): p = ip.tri.points[ip.tri.vertices] q = p[:, :-1, :] - p[:, -1, None, :] areas = abs(q[:, 0, 0] * q[:, 1, 1] - q[:, 0, 1] * q[:, 1, 0]) / 2 return areas def scale(points, xy_mean, xy_scale): points = np.asarray(points,...
{"hexsha": "d00f235ff6a023f5f2787129fee1f83586aaf433", "size": 6558, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycqed/analysis/tools/plot_interpolation.py", "max_stars_repo_name": "nuttamas/PycQED_py3", "max_stars_repo_head_hexsha": "1ee35c7428d36ed42ba4afb5d4bda98140b2283e", "max_stars_repo_licenses": ["M...
!------------------------------------------------------------------------------------------------------------- ! !> \file CompExcessGibbsEnergyQKTO.f90 !> \brief Compute the partial molar excess Gibbs energy of mixing of solution phase constituents in a QKTO !! solution phase. !>...
{"hexsha": "916cacd1207dfc11f66b91cfbaddb7bc14f27016", "size": 10930, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/gem/CompExcessGibbsEnergyQKTO.f90", "max_stars_repo_name": "elementx54/thermochimica", "max_stars_repo_head_hexsha": "ea7bb8f64b03d8583d326f737e9699083c304847", "max_stars_repo_licenses": [...
module trim_test use iso_varying_string, only: char, trim use veggies, only: & input_t, & result_t, & string_input_t, & test_item_t, & assert_equals, & describe, & fail, & it, & ASCII_STRING_GENERATOR ...
{"hexsha": "4177fca07a2e2a37107a63db0f6135376b6b0e59", "size": 1195, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/unit_test/trim_test.f90", "max_stars_repo_name": "everythingfunctional/iso_varying_string", "max_stars_repo_head_hexsha": "f330d7a246d81aacfbf92f8085a4eca9d2506820", "max_stars_repo_license...
[STATEMENT] lemma powr_eventually_exp_ln': assumes "x > 0" shows "eventually (\<lambda>x. (x::real) powr p = exp (p * ln x)) (nhds x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>\<^sub>F x in nhds x. x powr p = exp (p * ln x) [PROOF STEP] proof- [PROOF STATE] proof (state) goal (1 subgoal): 1. \...
{"llama_tokens": 693, "file": "Landau_Symbols_Landau_Library", "length": 9}
import ipywidgets as ipyw import traitlets as t import numpy as np import bqplot as bq import traittypes as tt M = 1e10 MAXIMUM_COST_CURVE_SEGMENTS = 50 MINIMUM_COST_CURVE_SEGMENTS = 1 class Generator(t.HasTraits): '''Generator Model''' name = t.CUnicode(default_value='GenCo0', help='Name of Generator (str...
{"hexsha": "253bfbe9b6231682ebd80e5f027e250033be4cce", "size": 14506, "ext": "py", "lang": "Python", "max_stars_repo_path": "psst/case/generator.py", "max_stars_repo_name": "ayadabd000/psst", "max_stars_repo_head_hexsha": "8c116fb7afd183881ecc605e017dffc87cdc49e6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" Display one shapes layer ontop of one image layer using the add_shapes and add_image APIs. When the window is closed it will print the coordinates of your shapes. """ import numpy as np from skimage import data import napari # create the list of polygons triangle = np.array([[11, 13], [111, 113], [22, 246]]) per...
{"hexsha": "acf08972861f5ccf70588d2ad76a104456027684", "size": 1139, "ext": "py", "lang": "Python", "max_stars_repo_path": "test-examples/add_shapes2.py", "max_stars_repo_name": "tlambert03/image-demos", "max_stars_repo_head_hexsha": "a2974bcc7f040fd4d14e659c4cbfeabcf726c707", "max_stars_repo_licenses": ["BSD-3-Clause"...
from __future__ import print_function, division from itertools import product import numpy as np from scipy.stats import multivariate_normal from ahoy import positions, fields from ahoy.mesh import uniform_mesh_factory import test def get_nearest_cell_ids_manual(f, ps): rs = ps.r_w.T ccs = f.mesh.cellCenters....
{"hexsha": "f586d34293d91e249bb8371798823d21a8eadd68", "size": 4632, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_field.py", "max_stars_repo_name": "eddiejessup/ships", "max_stars_repo_head_hexsha": "acb30dfed5524fa2d20e988d08cef0e66ffcdc60", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
import random import cv2 import numpy as np from augraphy.base.augmentation import Augmentation class Folding(Augmentation): """Emulates folding effect from perspective transformation :param fold count: Number of applied foldings :type fold_count: int, optional :param fold_noise: Level of noise add...
{"hexsha": "9b6414d4ffcc898bedd012df43cfdcc3ec09504c", "size": 9656, "ext": "py", "lang": "Python", "max_stars_repo_path": "augraphy/augmentations/folding.py", "max_stars_repo_name": "kwcckw/augraphy", "max_stars_repo_head_hexsha": "b0e8cc4192eaf827e36fb67ae1b7b9c762f9578b", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{"hexsha": "ebe601b5187403d93fe8ec144486e00864424a62", "size": 1767, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/test_tensor_pyt.py", "max_stars_repo_name": "triton-inference-server/model_navigator", "max_stars_repo_head_hexsha": "ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7", "max_stars_repo_licenses...
/** * @example types/test/quadtree_test.cc */ #include <boost/test/unit_test.hpp> #include <usml/types/quadtree.h> #include <usml/types/test/quadtree_test_support.h> #include <iostream> #include <list> #include <cstdlib> BOOST_AUTO_TEST_SUITE(quadtree_test) using namespace boost::unit_test ; using namespace usml::t...
{"hexsha": "8a6a12e3bd181ce0410d289fc5857573848e3894", "size": 1953, "ext": "cc", "lang": "C++", "max_stars_repo_path": "types/test/quadtree_test.cc", "max_stars_repo_name": "fraclipe/UnderSeaModelingLibrary", "max_stars_repo_head_hexsha": "52ef9dd03c7cbe548749e4527190afe7668ff4e7", "max_stars_repo_licenses": ["BSD-2-C...
"""The ``surfaces`` module provides functions for generating **surfaces**. Surfaces are 2D matrices which act as an elevation map. """ from scipy.ndimage.filters import gaussian_filter import numpy as np DEFAULT_DIMS = (500, 500) def make_noise_surface(dims=DEFAULT_DIMS, blur=10, seed=None): """Makes a surface b...
{"hexsha": "8593b2fec984cbfc3681a58fb27e8d463aa7a8cb", "size": 2089, "ext": "py", "lang": "Python", "max_stars_repo_path": "penkit/surfaces.py", "max_stars_repo_name": "djma/penkit", "max_stars_repo_head_hexsha": "ab0bde49d6045bd09598cf87d3dcb5766e9387bb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_...
#!/usr/bin/python3 #-*- coding: utf-8 -*- import gi, sys, os, signal, stat, warnings, re, time, pathlib import numpy as np import traceback, faulthandler ## Debugging library crashes faulthandler.enable() # https://docs.python.org/3/library/sys.html#sys.settrace gi.require_version('Gtk', '3.0') from gi.repository imp...
{"hexsha": "7dd920d4ce97b7d3b30f9ec52ac1298458844dc1", "size": 81190, "ext": "py", "lang": "Python", "max_stars_repo_path": "nihilnovi.py", "max_stars_repo_name": "FilipDominec/nihilnovi", "max_stars_repo_head_hexsha": "e1af97f500cb1ad5bf08605815803c58b9698cfd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
export ElectronVolt, Torr const ElectronVolt = NonSIUnit{typeof(Joule),:eV}() convert(::Type{SIQuantity},::typeof(ElectronVolt)) = 1.60217656535e-19Joule const Torr = NonSIUnit{typeof(Pascal),:torr}() convert(::Type{SIQuantity},::typeof(Torr)) = 133.322368Pascal
{"hexsha": "ee419730338310ee6f30b81a479cae026615b1ca", "size": 265, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/nonsiunits.jl", "max_stars_repo_name": "mbauman/SIUnits.jl", "max_stars_repo_head_hexsha": "a04d6f94f4f246dce32f6edcd08060fea59673ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import os import numpy as np import scipy.io import requests # ultility functions def load_annotation(file_path): """ Load temporal annotation file (.mat) Input: file_path: *.mat file path Return: a numpy array, temporal interval value pairs (can have more than 1 pair) ex: array([[x,y]]) """ ...
{"hexsha": "e899057c3acf0ea5e13741e1cea251287c54f579", "size": 1910, "ext": "py", "lang": "Python", "max_stars_repo_path": "catalog/utils/utils.py", "max_stars_repo_name": "srichakradhar/DTechtive", "max_stars_repo_head_hexsha": "79cae0b7b702b304bd1e44ed24e084387e760234", "max_stars_repo_licenses": ["CC0-1.0"], "max_st...
#!/usr/bin/env python3 import os import sys import cv2 as cv import numpy as np import open3d as o3d sys.path.append("..") from utils.cache import get_cache, memoize class ICLDataset: def __init__(self, data_source, get_color=False): # Cache self.use_cache = True self.cache = get_cache(d...
{"hexsha": "dc7b9dd3f3067ac037e1cc0853baf9e267b82216", "size": 3652, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/python/datasets/icl.py", "max_stars_repo_name": "nachovizzo/vdbfusion", "max_stars_repo_head_hexsha": "05ebd56b1d9226deee2c5ddc01e72b97ef0b1595", "max_stars_repo_licenses": ["MIT"], "max_...
# Vendor import numpy as np from numpy import tensordot, roll, transpose, stack # Project from gates.Gate import Gate class Add(Gate): def __call__(self, M: np.array, A: np.array = None, B: np.array = None) -> (np.array, np.array): rows = [roll(B[:, ::-1], shift=shift + 1, axis=1) for sh...
{"hexsha": "dcc4053ed1e7cf7977dfa0d87dee5359a6ced6f0", "size": 470, "ext": "py", "lang": "Python", "max_stars_repo_path": "gates/Add.py", "max_stars_repo_name": "DrugoLebowski/nram-executor", "max_stars_repo_head_hexsha": "3abb49b3f28cc1457f246b158167f664eaf37a8e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import print_function from vice.yields.sneia import single from vice.yields.sneia import fractional from vice._globals import _RECOGNIZED_ELEMENTS_ import warnings try: ModuleNotFoundError except NameError: ModuleNotFoundError = ImportError try: import numpy as np _N_ = np.linspace(.001, ...
{"hexsha": "e701f21bceeeebb8774aa77e3fd61efee2effe5a", "size": 2423, "ext": "py", "lang": "Python", "max_stars_repo_path": "vice/tests/test_ia_yields.py", "max_stars_repo_name": "NessMayker/VICE", "max_stars_repo_head_hexsha": "c8862baebf0795e227196800ebce6702e0f75ba0", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include <boost/preprocessor/punctuation.hpp>
{"hexsha": "e688862a006b3becdf5a155ef5b1f0d600919c77", "size": 46, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_preprocessor_punctuation.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-...
mkdir(resultsdir) mkdir(resultsdir*"/tags") mkdir(resultsdir*"/images") fid = open(resultsdir*"/readme.txt", "w") println(fid, currdirtime) println(fid, datafolder) println(fid, camidxs) println(fid, ARGS) close(fid) fid = open(resultsparentdir*"/racecar.log", "a") println(fid, "$(currdirtime), $datafolder, $(camid...
{"hexsha": "276e39229f524dd1a3c9f9d031b18c965e30cd88", "size": 346, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/wheeled/racecar/createResultsDirs.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Caesar.jl-62eebf14-49bc-5f46-9df9-f7b7ef379406", "max_stars_repo_head_hexsha": "8438ee9adf649f3d66493f1e...
#!/usr/bin/env python # # Code to query the VETO mask of objects/randoms # It takes the NOISES extension as an input # It writers a VETO extension. # Usage, see python query_veto.py -h # from __future__ import print_function __author__ = "Yu Feng and Martin White" __version__ = "1.0" __email__ = "yfeng1@berkeley.ed...
{"hexsha": "6150aa4c86be0709bceaea10c0cd77d46a394ca4", "size": 2447, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/imglss-query-tycho-veto.py", "max_stars_repo_name": "desihub/imaginglss", "max_stars_repo_head_hexsha": "09258d20015869fead9bad6020da2bc0d161f670", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/LamSlotMulti.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/LamSlotMulti """ from os import linesep from sys import getsizeof...
{"hexsha": "0ebd11f63c440b9e6dc893180fabec8df47a4e05", "size": 14881, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyleecan/Classes/LamSlotMulti.py", "max_stars_repo_name": "carbon-drive/pyleecan", "max_stars_repo_head_hexsha": "e89d4fe97f23f6182c19127d2c6a2133614e169d", "max_stars_repo_licenses": ["Apache-2....
def f : Fin 2 → Nat | 0 => 5 | 1 => 45 example : f 0 = 5 := rfl example : f 1 = 45 := rfl def g : Fin 11 → Nat | 0 => 5 | 1 => 10 | 2 => 15 | 3 => 2 | 4 => 48 | 5 => 0 | 6 => 87 | 7 => 64 | 8 => 32 | 9 => 64 | 10 => 21 def h : Fin 15 → Nat | 0 => 5 | 1 => 45 | _ => 50
{"author": "leanprover", "repo": "lean4", "sha": "742d053a97bdd109a41a921facd1cd6a55e89bc7", "save_path": "github-repos/lean/leanprover-lean4", "path": "github-repos/lean/leanprover-lean4/lean4-742d053a97bdd109a41a921facd1cd6a55e89bc7/tests/lean/run/finLit.lean"}
# # Copyright (c) 2016, Nikolay Polyarnyi # All rights reserved. # import numpy as np import pyopencl as cl import pyopencl.array from triangulum.utils import support from triangulum.utils.cl import create_context class CentralLineExtractionProcessor: """ This is OpenCL implementation for central line extractio...
{"hexsha": "cf14eea9f2616441cb789639082eadc1cf836e7e", "size": 3713, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/triangulum/algos/central_line_extraction/central_line_extraction.py", "max_stars_repo_name": "PolarNick239/Triangulum3D", "max_stars_repo_head_hexsha": "85c6a44f5c8f620bdc58164bd50ff89e1897f59...
# -*- coding: utf-8 -*- # # hl_api.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (a...
{"hexsha": "77208384f62cdcde2dcb2ed1329384932b2c1ec4", "size": 71159, "ext": "py", "lang": "Python", "max_stars_repo_path": "NEST-14.0-FPGA/topology/pynest/hl_api.py", "max_stars_repo_name": "OpenHEC/SNN-simulator-on-PYNQcluster", "max_stars_repo_head_hexsha": "14f86a76edf4e8763b58f84960876e95d4efc43a", "max_stars_repo...
import logging import sys sys.path.append('./modules/') import time from docopt import docopt from scipy.spatial.distance import cosine as cosine_distance from utils_ import Space def main(): """ Compute cosine distance for targets in two matrices. """ # Get the arguments args = docopt("""Compu...
{"hexsha": "c3d1b7e704f84a45e289eda067ce250ad74d48c3", "size": 3265, "ext": "py", "lang": "Python", "max_stars_repo_path": "measures/cd.py", "max_stars_repo_name": "ichristod/language-drift", "max_stars_repo_head_hexsha": "ebd720afe83dd3e72bc1d389371a1f84393e86ee", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
""" Validate post-ETL FERC Form 1 data and the associated derived outputs. These tests depend on a FERC Form 1 specific PudlTabl output object, which is a parameterized fixture that has session scope. """ import logging import numpy as np import pytest from pudl import validate as pv logger = logging.getLogger(__na...
{"hexsha": "4a57b261336131a357ffb91e96aec8b7b067a954", "size": 3857, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/validate/fbp_ferc1_test.py", "max_stars_repo_name": "cschloer/pudl", "max_stars_repo_head_hexsha": "32705ecc77443eb0d8c1d460df428f6f5f5b5037", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import tensorflow as tf import numpy as np import cv2 import time import argparse import math import random from ffpyplayer.player import MediaPlayer import posenet parser = argparse.ArgumentParser() parser.add_argument('--model', type=int, default=101) parser.add_argument('--cam_id', type=int, default=0) parser.add_...
{"hexsha": "6f0563ec301c91323ec0f15b9bb00e32c75ead64", "size": 5592, "ext": "py", "lang": "Python", "max_stars_repo_path": "webcam_demo_try.py", "max_stars_repo_name": "ShreshthSaxena/posenet-python", "max_stars_repo_head_hexsha": "a974b2db32222f2b88718f31e05f00d4e87863bf", "max_stars_repo_licenses": ["Apache-2.0"], "m...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Theory module cohomology.Sn {i} (OT : OrdinaryTheory i) where open OrdinaryTheory OT C-Sphere-≠ : (n : ℤ) (m : ℕ) → (n ≠ ℕ-to-ℤ m) → C n (⊙Lift (⊙Sphere m)) == Lift-Unit-group C-Sphere-≠ n O neq = C-dimension n ne...
{"hexsha": "76fcca1a137dc97cf374e063f3af451cbb254c66", "size": 1190, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "theorems/cohomology/Sn.agda", "max_stars_repo_name": "cmknapp/HoTT-Agda", "max_stars_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
macro x:ident noWs "(" ys:term,* ")" : term => `($x $ys*) #check id(1) macro "foo" &"only" : tactic => `(trivial) example : True := by foo only
{"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/macroParams.lean"}
import numpy as np import json class NumpyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.integer): return int(obj) if isinstance(obj, np.floating): return float(obj) if isinstance(obj, np.ndarray): return obj.tolist()...
{"hexsha": "18d6a8ccf05c88d99fd37f30bcaa7837e9bb2e67", "size": 456, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/JsonUtil.py", "max_stars_repo_name": "liuyuns/keras-yolo3", "max_stars_repo_head_hexsha": "512a18f39115a203bb65bea627df69eb8133b5bc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
""" MNIST based datasets are not useful benchamrks if the task identity is known at both train and test times. """ from typing import List import numpy as np import torchvision.transforms as transforms from numpy.random import default_rng from datasets.modmnist import ModMNIST from datasets.data import MultiTaskDataH...
{"hexsha": "f1afc094ce4e7cee34550c84874939cd631326be", "size": 7291, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/mnist.py", "max_stars_repo_name": "Laknath1996/modelzoo_continual", "max_stars_repo_head_hexsha": "23f657e9aac428d2ac6233b86bd717cd8960fe83", "max_stars_repo_licenses": ["MIT"], "max_star...
from eval_model import cap from flask import Flask, render_template, request, jsonify,Response import cv2 import numpy as np import jsonpickle app = Flask(__name__) @app.route('/uploads', methods=['POST']) def test(): r = request #filename = secure_filename(file.filename) #file.save(os.path...
{"hexsha": "aecebddeafd6143364867a71c42dec3363f702ab", "size": 1088, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "huyquoctrinh/cap_Flask", "max_stars_repo_head_hexsha": "126044494819e86431bc4dee355176931eae246c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
//////////////////////////////////////////////////////////////////////////////// /// @brief test suite for string utility functions /// /// @file /// /// DISCLAIMER /// /// Copyright 2012 triagens GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this fil...
{"hexsha": "33f58c36ba74b90a50d815e7328db7671f454e4d", "size": 9808, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "UnitTests/Basics/string-utf8-normalize-test.cpp", "max_stars_repo_name": "asaaki/ArangoDB", "max_stars_repo_head_hexsha": "a1d4f6f33c09ffd6f67744dbe748e83dc0fe6b82", "max_stars_repo_licenses": ["Apa...
import numpy as np from nicegui.ui import Ui from nicegui.events import KeyEventArguments import logging from ..actors import Steerer from ..world import Point class KeyboardControl: steerer: Steerer # will be set by rosys.ui.configure ui: Ui # will be set by rosys.ui.configure def __init__(self, *, de...
{"hexsha": "dbe3f64f0fb5c68e20b3a007b09719dd625b5ee1", "size": 2007, "ext": "py", "lang": "Python", "max_stars_repo_path": "rosys/ui/keyboard_control.py", "max_stars_repo_name": "zauberzeug/rosys", "max_stars_repo_head_hexsha": "10271c88ffd5dcc4fb8eec93d46fe4144a9e40d8", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma PK8: "Kh_3 \<phi> \<Longrightarrow> \<forall>A. \<phi>(\<^bold>\<midarrow>(\<phi>(\<phi> A))) \<^bold>\<approx> \<phi>\<^sup>d(\<phi>(\<^bold>\<midarrow>(\<phi> A)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Kh_3 \<phi> \<Longrightarrow> \<forall>A w. \<phi> (\<phi>\<^sup>c (\<phi> A)) w = \...
{"llama_tokens": 2134, "file": "Topological_Semantics_topo_operators_derivative", "length": 18}
# Author(s): Sehoon Ha <sehoon.ha@gmail.com> # : Seungmoon Song <ssm0445@gmail.com> import numpy as np class MusculoTendonUnit(object): """ """ # f_lce W = .56 C = np.log(.05) # f_vce N = 1.5 K = 5 # f_pe E_REF_PE = W # f_be E_REF_BE = .5 * W E_REF_BE2 = ...
{"hexsha": "f130cbc5a3f36c8a0b84ab6a0885ee291f654347", "size": 3223, "ext": "py", "lang": "Python", "max_stars_repo_path": "flappy/envs/fwmav/pydart2/muscle/tendon_unit.py", "max_stars_repo_name": "ArbalestV/flappy", "max_stars_repo_head_hexsha": "9e715cacc842fab6b9dfd4d6f0f7fb65b769204f", "max_stars_repo_licenses": ["...
""" Name: inherent Coder: HaoLing ZHANG (BGI-Research)[V1] Current Version: 1 Function(s): (1) Some inherent concepts. """ import numpy # mapping of integer and char A = 65 # ord('A') B = 66 # ord('B') C = 67 # ord('C') D = 68 # ord('D') E = 69 # ord('E') F = 70 # ord('F') G = 71 # ord('G'...
{"hexsha": "493620e27df70ce08782664a4bfb4206b7ae99b5", "size": 1667, "ext": "py", "lang": "Python", "max_stars_repo_path": "methods/inherent.py", "max_stars_repo_name": "HaolingZHANG/GenomeCompact", "max_stars_repo_head_hexsha": "b118161dc470e3c07f9b3a58d059dbd8c7540981", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#include<iostream> # define BOOST_TEST_MAIN #include <boost/test/included/unit_test.hpp> #include <my_ip_country_detector.hpp> std::string setting_ipv4_cvs_path = "./res/ip2country/IP2LOCATION-LITE-DB1.CSV"; std::string setting_ipv6_cvs_path = "./res/ip2country/IP2LOCATION-LITE-DB1.IPV6.CSV"; BOOST_AUTO_TEST_CASE(te...
{"hexsha": "6252d8e285879344a0ad45058fdf359a5509a2dd", "size": 1141, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test_my_ip_country_detector.cpp", "max_stars_repo_name": "kyorohiro/torrent_chaser", "max_stars_repo_head_hexsha": "b212d51c96de893b3dd4f0f9ad41f66dced377f5", "max_stars_repo_licenses": ["BSD-So...
import random import unittest import datetime from dagger.codec import decode_header, encode_header, EventType, pack_message, unpack_payload class TestProto(unittest.TestCase): def test_decode_and_encode_header(self): max = 2 ** 32 - 1 for i in range(10000): a = random.randint(0, max)...
{"hexsha": "f48b8824f342d785e16634c6e99530c9600eadd5", "size": 2011, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_proto.py", "max_stars_repo_name": "ko-han/dagger", "max_stars_repo_head_hexsha": "839de31f7b23f6bcf14c33d822e23d4ce5323815", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import pickle import re import pandas as pd import numpy as np import math from statsmodels.tsa.stattools import adfuller, kpss from arch.unitroot import PhillipsPerron """ Refs: - https://www.machinelearningplus.com/time-series/time-series-analysis-python/ - https://machinelearningmastery.com/time-series-data-statio...
{"hexsha": "29386e60ff9f8feb639377842ba31af1c5ede782", "size": 5537, "ext": "py", "lang": "Python", "max_stars_repo_path": "matilda/quantitative_analysis/time_series_analysis/forecasting.py", "max_stars_repo_name": "AlainDaccache/Quantropy", "max_stars_repo_head_hexsha": "6cfa06ed2b764471382ebf94d40af867f10433bb", "max...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from tempfile import mkdtemp from shutil import rmtree import numpy as np import nibabel as nb from nipype.testing import (assert_equal, assert_raises, skipif) from nipype.interfaces.base impor...
{"hexsha": "297b80a47d8fc05832a1d490c4085440babd61cc", "size": 15189, "ext": "py", "lang": "Python", "max_stars_repo_path": "nipype/interfaces/fsl/tests/test_maths.py", "max_stars_repo_name": "sebastientourbier/nipype_lts5", "max_stars_repo_head_hexsha": "3b9718d154443574cc6a5d0bbd76ccf7964e6a45", "max_stars_repo_licen...