text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
[STATEMENT] lemma star_assnI: assumes "(h,as)\<Turnstile>P" and "(h,as')\<Turnstile>Q" and "as\<inter>as'={}" shows "(h,as\<union>as')\<Turnstile>P*Q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (h, as \<union> as') \<Turnstile> P * Q [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: (h, as) \<...
{"llama_tokens": 344, "file": "Separation_Logic_Imperative_HOL_Assertions", "length": 3}
"""Compute centroids of antenna coverage areas (cells).""" import argparse import numpy import pandas as pd import geopandas as gpd import shapely.geometry import matplotlib.patches import matplotlib.pyplot as plt import mobilib.voronoi parser = argparse.ArgumentParser( description=__doc__, formatter_class=...
{"hexsha": "9f54aa6ec71bba67eb23e1a06c737426cc1f2109", "size": 5044, "ext": "py", "lang": "Python", "max_stars_repo_path": "antenna_centroids.py", "max_stars_repo_name": "simberaj/mobilib", "max_stars_repo_head_hexsha": "ae350d095a34f53704bd4aaaf7f45e573bda779a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import pandas as pd import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader,WeightedRandomSampler from torch.optim.lr_scheduler import ReduceLROnPlateau import torchaudio from settings import data_dir import os import json from models.cnn.networks import groupNorm,resnet1d, wideres...
{"hexsha": "ded068319082ebca0afe243541de08840f69ed0e", "size": 8870, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/baseline.py", "max_stars_repo_name": "pmwaniki/ppg-analysis", "max_stars_repo_head_hexsha": "ae1c76ca8b0eb95a51e3f48eccb8d0a76e7abfbf", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import cv2 as cv import matplotlib.pyplot as plt class annotCats: def __init__(self, image_path=None, label=None, xtickrange=100, ytickrange=100): self.colors = self.cvColor() self.label = label try: self.image = cv.imread(image_path) self.image = ...
{"hexsha": "622737db943488bd657b6534933f99d5b94c3fa4", "size": 4726, "ext": "py", "lang": "Python", "max_stars_repo_path": "config/annots_cv.py", "max_stars_repo_name": "qkrwjdduf159/Waste-Recycling-Image-Segmentation", "max_stars_repo_head_hexsha": "eb84fbeb0aa946c04d2c6eb6254558afaf365abc", "max_stars_repo_licenses":...
from __future__ import annotations from typing import Any, Optional, Dict from typing_extensions import Protocol import numba import numpy as np from sunode.matrix import Sparse from sunode.basic import lib, ffi from sunode.dtypesubset import as_nested, DTypeSubset class Problem(Protocol): params_dtype: np.dty...
{"hexsha": "54d396faf7598cd1c2403f0598329088f02cdecc", "size": 18349, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunode/problem.py", "max_stars_repo_name": "aseyboldt/pysundials-cffi", "max_stars_repo_head_hexsha": "ccdcd0fd0252285a5440c397619c57378a32d33a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) (* License: BSD, terms see file ./LICENSE *) theory ArrayAssertion imports "$L4V...
{"author": "CompSoftVer", "repo": "CSim2", "sha": "b09a4d77ea089168b1805db5204ac151df2b9eff", "save_path": "github-repos/isabelle/CompSoftVer-CSim2", "path": "github-repos/isabelle/CompSoftVer-CSim2/CSim2-b09a4d77ea089168b1805db5204ac151df2b9eff/CParser/tools/c-parser/umm_heap/ArrayAssertion.thy"}
[STATEMENT] lemma dom_sound: "dom i j \<Longrightarrow> dominate i j" [PROOF STATE] proof (prove) goal (1 subgoal): 1. local.dom i j \<Longrightarrow> dominate i j [PROOF STEP] by (fastforce simp add: dominate_def dest:path_entry_dom)
{"llama_tokens": 86, "file": "Dominance_CHK_Dom_Kildall_Correct", "length": 1}
from __future__ import division import numpy as np import fidimag.extensions.clib as clib import fidimag.common.helper as helper import fidimag.common.constant as const from .atomistic_driver import AtomisticDriver class SLLG(AtomisticDriver): """ This class is the driver to solve the Stochastic Landau Lifs...
{"hexsha": "323437f784ae7a71793e161248d677ced2c2d62a", "size": 4297, "ext": "py", "lang": "Python", "max_stars_repo_path": "fidimag/atomistic/sllg.py", "max_stars_repo_name": "computationalmodelling/fidimag", "max_stars_repo_head_hexsha": "07a275c897a44ad1e0d7e8ef563f10345fdc2a6e", "max_stars_repo_licenses": ["BSD-2-Cl...
import random import numpy as np import pytest from pandas import DataFrame from tests.utils import assert_dataframes_equals from weaverbird.backends.pandas_executor.steps.rank import execute_rank from weaverbird.pipeline.steps import RankStep @pytest.fixture def sample_df(): return DataFrame( {'COUNTRY...
{"hexsha": "f126ce66dce68563a0fc82cfe7563db6abae2cee", "size": 1960, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/tests/steps/test_rank.py", "max_stars_repo_name": "JeremyJacquemont/weaverbird", "max_stars_repo_head_hexsha": "e04ab6f9c8381986ab71078e5199ece7a875e743", "max_stars_repo_licenses": ["BSD-3...
/* * BikeInfo.hpp * * Created on: 18.02.2019 * Author: tomlucas */ #ifndef SIXDAYS_BIKEINFO_HPP_ #define SIXDAYS_BIKEINFO_HPP_ #include <Eigen/Core> namespace zavi::sixdays{ struct BikeInfo{ Eigen::Vector3d imu_to_front, imu_to_back; Eigen::Vector3d imuToFront(){ return imu_to_front; } Eigen:...
{"hexsha": "9073a9b0d6a141d820467f2679b944b4122a0964", "size": 415, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "SixdaysCode/Sixdays/BikeInfo.hpp", "max_stars_repo_name": "TomLKoller/ZaVI_TrackCycling", "max_stars_repo_head_hexsha": "7c23bc34e6e58c78ec249f6f55d4e70c7e91d315", "max_stars_repo_licenses": ["MIT"],...
mutable struct TrackedState <: State queues::Vector{Vector{Job}} #A vector of queues holding the jobs waiting in buffer in_transit::BinaryMinHeap{Job} #Jobs in transit between queues left_system::Vector{Job} #Jobs that have left the system params::NetworkParameters #The parameters of the queueing syste...
{"hexsha": "d57bab2efb5a30366e22011b5304ef71b9535dd2", "size": 2747, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/state/tracking/tracked_state.jl", "max_stars_repo_name": "tcleugh/Thomas-Cleugh-and-Jason-Jones-2504-2021-PROJECT2", "max_stars_repo_head_hexsha": "243aa078a3f582c94d154100c0e143d910c264d4", "m...
Require Import Algebra.SetoidCat.PairUtils Algebra.Utils Algebra.SetoidCat Algebra.Monad Algebra.Monoid Algebra.SetoidCat.SetoidUtils Tactics. Require Import RelationClasses Relation_Definitions Morphisms SetoidClass. Require Import Coq.Lists.List. Open Scope type_scope. Definition maybe_equiv {A} {SA : Setoid A} (...
{"author": "xu-hao", "repo": "CertifiedQueryArrow", "sha": "8db512e0ebea8011b0468d83c9066e4a94d8d1c4", "save_path": "github-repos/coq/xu-hao-CertifiedQueryArrow", "path": "github-repos/coq/xu-hao-CertifiedQueryArrow/CertifiedQueryArrow-8db512e0ebea8011b0468d83c9066e4a94d8d1c4/Algebra/SetoidCat/MaybeUtils.v"}
[STATEMENT] lemma prv_scnj_imp: assumes "\<chi> \<in> fmla" and "F \<subseteq> fmla" "finite F" and "\<phi> \<in> F" and "prv (imp \<phi> \<chi>)" shows "prv (imp (scnj F) \<chi>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. prv (imp (scnj F) \<chi>) [PROOF STEP] unfolding scnj_def [PROOF STATE] proof (pr...
{"llama_tokens": 292, "file": "Syntax_Independent_Logic_Deduction", "length": 3}
From Undecidability.TM Require Import Util.Prelim Util.TM_facts. (* * 0-tape Turing machine that does nothing. *) Section Mono_Nop. Variable sig : finType. Definition NullTM : TM sig 0 := {| trans := fun '(q, s) => (q, Vector.nil _); start := tt; halt _ := true; |}. Definition Null ...
{"author": "uds-psl", "repo": "time-invariance-thesis-for-L", "sha": "41f4eb1f788cc4f096d9c7c286c9ca907588859f", "save_path": "github-repos/coq/uds-psl-time-invariance-thesis-for-L", "path": "github-repos/coq/uds-psl-time-invariance-thesis-for-L/time-invariance-thesis-for-L-41f4eb1f788cc4f096d9c7c286c9ca907588859f/theo...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from unittest import mock import numpy as np import pandas as pd from ax.core.arm import Arm from ax.core.data import Data from ax.core.experiment import Experiment from ax.core.metric import Metric from ax.core.objective i...
{"hexsha": "bcee08c39b0ef06df51b1f89dfb47a237f2d434b", "size": 18889, "ext": "py", "lang": "Python", "max_stars_repo_path": "ax/modelbridge/tests/test_base_modelbridge.py", "max_stars_repo_name": "jlin27/Ax", "max_stars_repo_head_hexsha": "5eaa78f783d290027e23ee6b8d659b27eccf2ced", "max_stars_repo_licenses": ["MIT"], "...
''' Implements the WEAT tests ''' import logging import math import itertools as it import numpy as np import scipy.special import scipy.stats # X and Y are two sets of target words of equal size. # A and B are two sets of attribute words. logger = logging.getLogger(__name__) logging.basicConfig(format = '%(asctime...
{"hexsha": "300b572b7ab26aebd2552aee4df0eac6f06bcd2a", "size": 8207, "ext": "py", "lang": "Python", "max_stars_repo_path": "debias-BERT/experiments/weat.py", "max_stars_repo_name": "khatna/sent_debias", "max_stars_repo_head_hexsha": "b444c49475fedbbffa817717b1ff9484348a9fee", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np from nose.tools import assert_true, assert_false, assert_equal, assert_almost_equal, assert_raises from numpy.testing import assert_array_equal, assert_array_almost_equal from dipy.reconst.eit import DiffusionNablaModel, EquatorialInversionModel from dipy.sims.voxel import SticksAndBall from dipy.ut...
{"hexsha": "86a34c9ec28daeeacf490430e0584a340296f09e", "size": 4769, "ext": "py", "lang": "Python", "max_stars_repo_path": "dipy/reconst/tests/test_eit.py", "max_stars_repo_name": "Garyfallidis/dipy", "max_stars_repo_head_hexsha": "4341b734995d6f51ac9c16df26a7de00c46f57ef", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
[STATEMENT] lemma signof_pm_one: "signof p \<in> {1, - 1}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. of_int (sign p) \<in> {1::'a, - (1::'a)} [PROOF STEP] by (simp add: sign_def)
{"llama_tokens": 92, "file": "Jordan_Normal_Form_Missing_Misc", "length": 1}
#!/usr/bin/python3 from os import path import sys import json from matplotlib import pyplot, dates from dateutil import parser from datetime import timedelta from scipy.optimize import curve_fit from math import log import numpy as np DATA_DIR = "../COVID-19/dati-json/" FILE_STATO = "dpc-covid19-ita-andamento-naziona...
{"hexsha": "ed7ce56862609ca6d49e4a63e643e7f4aa422f63", "size": 5705, "ext": "py", "lang": "Python", "max_stars_repo_path": "read_data.py", "max_stars_repo_name": "alexmogavero/py-COVID-19", "max_stars_repo_head_hexsha": "541554655de5a53c67c34ec0b3b28e51e867f739", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# Power calculations for a binomial proportion ## Background In an ideal statistical world no hypothesis test would be run before a [power analysis](https://en.wikipedia.org/wiki/Power_of_a_test) has been carried out to determine a reasonable [sample size](https://en.wikipedia.org/wiki/Sample_size_determination). Mos...
{"hexsha": "67d83fb190c05766dff3a366427d2423b979528b", "size": 287312, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "_rmd/extra_binom_power/binomial_power.ipynb", "max_stars_repo_name": "erikdrysdale/erikdrysdale.github.io", "max_stars_repo_head_hexsha": "ff337117e063be7f909bc2d1f3ff427781d29f31",...
function status = test_wfs_iir_prefilter(modus) %TEST_WFS_IIR_PREFILTER tests the IIR WFS pre-equalization filter % % Usage: status = test_wfs_iir_prefilter(modus) % % Input parameters: % modus - 0: numerical % 1: visual (not available) % % Output parameters: % status - true or false...
{"author": "sfstoolbox", "repo": "sfs-matlab", "sha": "02194f0243d1ead26572f760032c40527718919d", "save_path": "github-repos/MATLAB/sfstoolbox-sfs-matlab", "path": "github-repos/MATLAB/sfstoolbox-sfs-matlab/sfs-matlab-02194f0243d1ead26572f760032c40527718919d/validation/test_wfs_iir_prefilter.m"}
[STATEMENT] theorem reduce: "valid p \<longleftrightarrow> valid_in {1..card (props p)} p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. valid p = valid_in {1..card (props p)} p [PROOF STEP] using valid_in_valid transfer [PROOF STATE] proof (prove) using this: \<lbrakk>card (props ?p) \<le> card ?U; valid_in ?U ?p\...
{"llama_tokens": 196, "file": "Paraconsistency_Paraconsistency", "length": 2}
from pathlib import Path import pandas as pd import numpy as np import pickle from sklearn.feature_extraction.text import TfidfVectorizer from nltk.corpus import stopwords import argparse def get_features(documents, max_features, min_df, max_df): tfidfconverter = TfidfVectorizer(max_features=max_features, min_df=...
{"hexsha": "416da6b352f7879c897de3695a48841af0fd4213", "size": 2450, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/TFIDF_feature_extraction.py", "max_stars_repo_name": "nhutlong128/TopicClassification", "max_stars_repo_head_hexsha": "ef4ac58f7b8365a7c64ffa8197195db30de52620", "max_stars_repo_licenses"...
import argparse import os import math from time import time from PIL import Image import align.detect_face as detect_face import cv2 import dlib import numpy as np import tensorflow as tf from lib.face_utils import judge_side_face from lib.utils import Logger, mkdir from project_root_dir import project_dir from src.sor...
{"hexsha": "ccb181a0c2a78b97924acdb1385749b3132e0bd7", "size": 15344, "ext": "py", "lang": "Python", "max_stars_repo_path": "tp1.py", "max_stars_repo_name": "ReignW/FaceDetection", "max_stars_repo_head_hexsha": "0b9f14da8ab866f173198f86a98fedd40db13e76", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
module BifurcationsBase using ..Continuations: AbstractContinuationCache, AbstractProblemCache, AbstractContinuationSolver include("timekind.jl") include("statekind.jl") include("contkind.jl") include("problem.jl") include("solution.jl") include("solver.jl") include("interface.jl") include("tools.jl") include("disp...
{"hexsha": "687319e75f8483dcc4113ac62f8f135b452304b9", "size": 343, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/base/base.jl", "max_stars_repo_name": "jhardenberg/Bifurcations.jl", "max_stars_repo_head_hexsha": "cc1bfe55389efdfa0c4e6a817707c235afe1aea8", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/python import sys, os, argparse import pickle import numpy as np import cv2 ''' CADA NUMERO REPRESENTA UM DEDO menor = 1 anelar = 2 medio = 3 indicador = 4 polegar = 5 ''' parser = argparse.ArgumentParser() parser.add_argument("-nf", "--frames", type=int, default=40) parser...
{"hexsha": "4c3a0abc652e6bd2d8015c3ee437023e43f5db72", "size": 6442, "ext": "py", "lang": "Python", "max_stars_repo_path": "old/detmao.py", "max_stars_repo_name": "juniorfarrapo/Hand-Detector", "max_stars_repo_head_hexsha": "5e3bd0be63fd87e469dc6d9ddea4c822a6ba2c99", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
function complex_example_AD() % A basic example that shows how to define the cost funtion for % optimization problems on complex manifolds. % % Note that automatic differentiation for complex numbers is not supported % for Matlab R2021a or earlier. To fully exploit the convenience of AD, % please update to the latest ...
{"author": "NicolasBoumal", "repo": "manopt", "sha": "b8b54a6af8b965f7ae572972ba0d15787427744b", "save_path": "github-repos/MATLAB/NicolasBoumal-manopt", "path": "github-repos/MATLAB/NicolasBoumal-manopt/manopt-b8b54a6af8b965f7ae572972ba0d15787427744b/manopt/autodiff/basic_examples_AD/complex_example_AD.m"}
#include <unsupported/Eigen/MatrixFunctions> #include <Eigen/Eigenvalues> #include "BlockMatrix.h" BlockMatrix::BlockMatrix(int L) { init(L); } BlockMatrix::BlockMatrix(const BlockMatrix& bm) { init(bm._L); for (int i = 0; i < bm.size(); i++) { for (int j = 0; j < bm.size(); j++) { _mats[i][j] = bm._mats[i][j...
{"hexsha": "dc25df2afa326870ba55615f35ff7054dec219b1", "size": 13013, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/BlockMatrix.cpp", "max_stars_repo_name": "gaolichen/otoc4n4sym", "max_stars_repo_head_hexsha": "b504f9eb6efdf52567b3655a2caff6238559ba64", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import os import sys import simulation import numpy as np from multiprocessing import Pool from test_model import * from rational_model import * n_players = 1 pars = 100*(0.97)**np.array(range(500)) light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01'] out_dir = '../../modeling/' try: os.makedirs(out_d...
{"hexsha": "f7b6182cbd2d98b55fddccdcecb02ea7fe475b85", "size": 975, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulations/old/player_model/simulate_parameter_sweep.py", "max_stars_repo_name": "hawkrobe/fish", "max_stars_repo_head_hexsha": "2000e46c397f7c95bba8ecb0c6afd26013929ff8", "max_stars_repo_licenses...
import logging import os import time import unittest import hydra import numpy as np import pytorch_lightning as pl import torch from hydra.core.global_hydra import GlobalHydra from src.lib.config import register_configs from src.utils import utils class TestMainFile(unittest.TestCase): @classmethod def set...
{"hexsha": "b09ece9745900d2d54eba682faee8c689a7816bc", "size": 4013, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_main_functionality.py", "max_stars_repo_name": "judithernandez/hydra_test", "max_stars_repo_head_hexsha": "239207afbaee00a27f8d87ac14905dfff3e1c502", "max_stars_repo_licenses": ["BSD-3-...
from collections import Counter import csv import logging import numpy as np import pandas as pd import random from scipy import stats from sklearn.metrics import f1_score from sklearn.model_selection import GridSearchCV import sys import os __author__ = "Christopher Potts" __version__ = "CS224u, Stanford, Spring 2019...
{"hexsha": "072bcffb6698ac2cfa7768b075751285781d0880", "size": 8468, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "yiyang7/cs224u", "max_stars_repo_head_hexsha": "3e360a15640f3ba5fc24f34ad45fc8284aabd26d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "m...
import argparse import os import toml import tensorflow as tf import numpy as np from ohnomore_seq2seq import read_config from ohnomore_seq2seq import Numberer from ohnomore_seq2seq import read_unique_tokens from ohnomore_seq2seq import py2numpy, sample_n_batches, get_batches from ohnomore_seq2seq import Mode, BasicM...
{"hexsha": "a6726dc8a9ff27026f1f83ee70dbe60cf3c58ee1", "size": 8803, "ext": "py", "lang": "Python", "max_stars_repo_path": "ohnomore_seq2seq_rs/python/train.py", "max_stars_repo_name": "twuebi/ohnomore_seq2seq_rs", "max_stars_repo_head_hexsha": "f9d1517cf4bacefe589ed49118a6ba1921065217", "max_stars_repo_licenses": ["Ap...
\section{Sylvester's Law, Sesquilinear Forms} We start by looking at some immediate corollaries of \ref{bilinear_diag}. \begin{corollary} For a finite dimensional complex vector space $V$ and a symmetric bilinear form $\phi$ on $V$, there is a basis $B$ of $V$ such that $$[\phi]_B=\begin{pmatrix} I...
{"hexsha": "e46827a19949d5960b5d14baf35880eb0e0c0d6e", "size": 4073, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "19/sylvester.tex", "max_stars_repo_name": "david-bai-notes/IB-Linear-Algebra", "max_stars_repo_head_hexsha": "5a499f7ed33ef0110facb27323e13f42883aa0c5", "max_stars_repo_licenses": ["MIT"], "max_star...
from stuff import * import sys,re,argparse,pickle from scipy.optimize import minimize from scipy.stats import norm from scipy.special import gammaln from math import log,exp,sqrt,sin,pi import numpy as np from subprocess import Popen,PIPE from datetime import datetime # (Make it auto download files?) # Get ltla.csv fr...
{"hexsha": "a1fa2ecb6910e236b506bfecc716f7f47ba6e799", "size": 19767, "ext": "py", "lang": "Python", "max_stars_repo_path": "VOCgrowth/vocfit2.py", "max_stars_repo_name": "alex1770/Covid-19", "max_stars_repo_head_hexsha": "0212593bf5d9bcbb7009c7d1fb1710116ad8bf32", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import click import pandas import dendropy import networkx as nx from pathlib import Path from sketchy.sketchy import LineageIndex from sketchy.utils import MutuallyExclusiveOption @click.command() @click.option( '--ssh', '-s', default=None, type=Path, required=True, help...
{"hexsha": "3be4dfda3c68f16a70eabcae7a272f25241b4835", "size": 2715, "ext": "py", "lang": "Python", "max_stars_repo_path": "sketchy/terminal/survey/popmap/commands.py", "max_stars_repo_name": "mbhall88/sketchy", "max_stars_repo_head_hexsha": "5ed26d28f104710f6d425053eae41fd0e99f8760", "max_stars_repo_licenses": ["MIT"]...
(*-------------------------------------------* | CSP-Prover on Isabelle2005 | | February 2006 | | April 2006 (modified) | | March 2007 (modified) | | ...
{"author": "pefribeiro", "repo": "CSP-Prover", "sha": "8967cc482e5695fca4abb52d9dc2cf36b7b7a44e", "save_path": "github-repos/isabelle/pefribeiro-CSP-Prover", "path": "github-repos/isabelle/pefribeiro-CSP-Prover/CSP-Prover-8967cc482e5695fca4abb52d9dc2cf36b7b7a44e/FNF_F/FNF_F_sf_seq.thy"}
function [sx, dsdx, dsdp] = VBA_sparsifyPrior (x, logExponent, smoothness) % // VBA toolbox ////////////////////////////////////////////////////////// % % [sx, dsdx, dsdp] = VBA_sparsifyPrior (x, varargin) % parameter transformation that emulates Laplace priors (L1-norm) % % IN: % - x: input value to be transformed %...
{"author": "MBB-team", "repo": "VBA-toolbox", "sha": "01ff63f43ef7a6473bc5e3f28dd9ffa58fcfb414", "save_path": "github-repos/MATLAB/MBB-team-VBA-toolbox", "path": "github-repos/MATLAB/MBB-team-VBA-toolbox/VBA-toolbox-01ff63f43ef7a6473bc5e3f28dd9ffa58fcfb414/utils/VBA_sparsifyPrior.m"}
# -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' path #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] data = np.genfromtxt(path, delimiter=",", skip_header=1) print("\nData: \n\n", data) print("\nType of data: \n\n", ty...
{"hexsha": "8e2fadd5f0ed77246611ed811d4f0bbb54852cd1", "size": 1676, "ext": "py", "lang": "Python", "max_stars_repo_path": "GreyAto/code.py", "max_stars_repo_name": "maheshgnc2010/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "70933159b1a9f2da6b0953142c615e8a855dced4", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Created on Sun Apr 22 17:24:47 2018 @author: Steven """ from radioxenon_ml.read_in import ml_matrix_composition as mlmc from radioxenon_ml.solve import variance as v import numpy as np #for some reason the following import must occur in order to refresh any changes to variance #if I try to import it earlier it d...
{"hexsha": "c5039b0f2f30da00a054f2ae0b1409d923c51a22", "size": 4380, "ext": "py", "lang": "Python", "max_stars_repo_path": "radioxenon_ml/test_files/test_functions.py", "max_stars_repo_name": "manninosi/radioxenon_ml", "max_stars_repo_head_hexsha": "e901a2465bcbe491184cefc58db021a9321b9555", "max_stars_repo_licenses": ...
from pynq import DefaultIP from pynq import DefaultHierarchy from pynq import Xlnk import numpy as np from scipy import signal import matplotlib.pyplot as plt class BandwidthSelector(DefaultHierarchy): def __init__(self, description, pkt_config=1, pkt_reload=128): # Find out the correct length of config and reloa...
{"hexsha": "493dab8a3ff04c1befba73256e7eec766d88935c", "size": 3302, "ext": "py", "lang": "Python", "max_stars_repo_path": "rfsoc_sam/bandwidth_selector.py", "max_stars_repo_name": "plysaght/rfsoc_sam", "max_stars_repo_head_hexsha": "e299303fce67ba5f682b7fc96c582ec25af739f9", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import json import numpy as np import pkg_resources import random import re import scipy.misc as m from mnist import MNIST from copy import deepcopy SIZE = 28 PARTITIONS = 5 TRAINING_EXAMPLES = 5000 TEST_EXAMPLES = 100 def main(): mndata = MNIST(pkg_resources.resource_filename('fuzzi', 'd...
{"hexsha": "f1e92742dfd33993f3bf57ababf59e1418cd509f", "size": 2045, "ext": "py", "lang": "Python", "max_stars_repo_path": "fuzzi-gen/fuzzi/processing/pate.py", "max_stars_repo_name": "hengchu/fuzzi-impl", "max_stars_repo_head_hexsha": "bcf49c42d2dd4e1e3c1fe8b85fa7f845ea8fd016", "max_stars_repo_licenses": ["BSD-3-Claus...
/- Copyright (c) 2022 Anand Rao, Rémi Bottinelli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anand Rao, Rémi Bottinelli -/ import combinatorics.simple_graph.ends.defs import data.finite.set import data.finset.basic /-! # Properties of the ends of graphs This file ...
{"author": "0art0", "repo": "Freudenthal-Hopf", "sha": "1fefe94a6f0432686f21f97e4916efcbb81fec9d", "save_path": "github-repos/lean/0art0-Freudenthal-Hopf", "path": "github-repos/lean/0art0-Freudenthal-Hopf/Freudenthal-Hopf-1fefe94a6f0432686f21f97e4916efcbb81fec9d/src/properties.lean"}
recursive function evapol(tu,nu,tv,nv,c,rad,x,y) result(e_res) implicit none real*8 :: e_res c function program evacir evaluates the function f(x,y) = s(u,v), c defined through the transformation c x = u*rad(v)*cos(v) y = u*rad(v)*sin(v) c and where s(u,v) is a bicubic spline ( 0<=u<=1 , -p...
{"hexsha": "f02569a4018eb869b9699ab41992a0c0614ecb26", "size": 2719, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "scipy/interpolate/fitpack/evapol.f", "max_stars_repo_name": "jcampbell/scipy", "max_stars_repo_head_hexsha": "a11eef3a29ad200649edd32c0de0d0210001acb4", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import logging import boost_histogram as bh import numpy as np import pytest from cabinetry import histo class ExampleHistograms: """a collection of different kinds of histograms""" @staticmethod def normal(): bins = [1, 2, 3] yields = [1.0, 2.0] stdev = [0.1, 0.2] retur...
{"hexsha": "a1e607fc16dcb9af0bb77697cbc14e9691892411", "size": 8341, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_histo.py", "max_stars_repo_name": "ExternalRepositories/cabinetry", "max_stars_repo_head_hexsha": "2261b603786dd3a5c5963b4e365d04ff250ba012", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import os import sys import h5py import numpy as np import shutil job_repeat_attempts = 5 def check_file(filename): if not os.path.exists(filename): return False # verify the file has the expected data import h5py f = h5py.File(filename, 'r') fkeys = f.keys() f.close() if set(fkeys...
{"hexsha": "63f68e9ce9221a3ff04952eea58eb0e04483e360", "size": 2575, "ext": "py", "lang": "Python", "max_stars_repo_path": "Relabeling/create_global_map.py", "max_stars_repo_name": "Rhoana/rhoana", "max_stars_repo_head_hexsha": "b4027a57451d175ea02c2c7ef472cf9c4e1a0efc", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Matern 5/2 isotropic covariance function """ Mat52Iso <: MaternIso Isotropic Matern 5/2 kernel (covariance) ```math k(x,x') = σ²(1+√5|x-x'|/ℓ + 5|x-x'|²/(3ℓ²))\\exp(- √5|x-x'|/ℓ) ``` with length scale ``ℓ`` and signal standard deviation ``σ``. """ mutable struct Mat52Iso <: MaternIso "Length scale" ℓ::F...
{"hexsha": "3ef155a4e6be944a831555d5dad1da78329508ef", "size": 1186, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/kernels/mat52_iso.jl", "max_stars_repo_name": "jbrea/GaussianProcesses.jl", "max_stars_repo_head_hexsha": "732063745067a803429415100f2b08bb396a1df8", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Multitask Lasso Model Details: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.MultiTaskLasso.html """ from sklearn.linear_model import MultiTaskLasso, Lasso from joblib import Parallel, delayed import numpy as np class LassoMultitask_wo_subx(): """ XGBoost models for ...
{"hexsha": "594e23dc8563a5e763c0694f1c0710fb5ec968dc", "size": 4519, "ext": "py", "lang": "Python", "max_stars_repo_path": "SSF_mip/model/lassomultitask_wo_subx.py", "max_stars_repo_name": "Sijie-umn/SSF-MIP", "max_stars_repo_head_hexsha": "89636846cc11950c9fd851e58ea410cef72d9b90", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np #%matplotlib inline import matplotlib.pyplot as plt from scipy import special np.info(special) x = np.linspace(0,20,100) for ii in range(5): plt.plot(x, special.jn(ii, x)) plt.grid(True)
{"hexsha": "88dc3dc89eb887850455c2203660087901f378c6", "size": 213, "ext": "py", "lang": "Python", "max_stars_repo_path": "MyScripts/030-SciPy.py", "max_stars_repo_name": "diegoomataix/Curso_AeroPython", "max_stars_repo_head_hexsha": "c2cf71a938062bc70dbbf7c2f21e09653fa2cedd", "max_stars_repo_licenses": ["CC-BY-4.0"], ...
map_tt_t(f, tt::Type{<:Tuple}) = Base.tuple_type_cons(f(Base.tuple_type_head(tt)), map_tt_t(f, Base.tuple_type_tail(tt))) map_tt_t(f, tt::Type{Tuple{}}) = Tuple{} function mapreduce_tt(f, op, v0, tt) op(f(Base.tuple_type_head(tt)), mapreduce_tt(f, op, v0, Base.tuple_type_tail(tt))) end mapreduce_tt(f, op, v0, tt::...
{"hexsha": "b3cd052cf81fe33e8902c40bfce7181398f24ef1", "size": 499, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tuple_types.jl", "max_stars_repo_name": "ettersi/IterTools.jl", "max_stars_repo_head_hexsha": "f7dbe509d201098e65c6fc2be18547047d10eeb2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# Copyright 2020 Deepmind Technologies Limited. # # 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 agr...
{"hexsha": "3ef8c5cb192c530c73bdfd51ff2f406cfb8ee705", "size": 3567, "ext": "py", "lang": "Python", "max_stars_repo_path": "adversarial_robustness/jax/eval.py", "max_stars_repo_name": "jamestwebber/deepmind-research", "max_stars_repo_head_hexsha": "2e866f19371695ac351a4f2023ad3987997d7e84", "max_stars_repo_licenses": [...
import numpy as np from scipy import fftpack from scipy import interpolate def fourier_transform(X,Y): ''' Function for determining concentration amplitudes from data. ''' # interpolate axes to get even time steps f = interpolate.interp1d(X, Y, kind = "linear") # get timestep from average of t...
{"hexsha": "88ed7a93a2c0c0a8af867dc1c431b814bf940573", "size": 855, "ext": "py", "lang": "Python", "max_stars_repo_path": "SCRIPTS/helpers/parameter_determination_helper.py", "max_stars_repo_name": "huckgroup/formose-2021", "max_stars_repo_head_hexsha": "f1c5e809e0cbbbc744a4fe636069cdfc83ad6091", "max_stars_repo_licens...
theory AltFlatLemma imports AltDropEnv AltCutEnv begin definition infl_use_env where "infl_use_env r_s r_x = (\<lambda> x. if r_s x = OwnPerm \<and> r_x x = NoPerm then OwnPerm else NoPerm)" lemma infl_disj_use_env: "\<lbrakk> leq_use_env r_ex r_x \<rbrakk> \<Longrightarrow> disj_use_env r_ex (infl_use_...
{"author": "anon-ef", "repo": "perm_lang_ef2", "sha": "0fcb6e4c175193cc7b94f297a8aaa605f502d711", "save_path": "github-repos/isabelle/anon-ef-perm_lang_ef2", "path": "github-repos/isabelle/anon-ef-perm_lang_ef2/perm_lang_ef2-0fcb6e4c175193cc7b94f297a8aaa605f502d711/perm_ref/AltFlatLemma.thy"}
function plotData(X, y) %PLOTDATA Plots the data points X and y into a new figure % PLOTDATA(x,y) plots the data points with + for the positive examples % and o for the negative examples. X is assumed to be a Mx2 matrix. % Create New Figure figure; hold on; % ====================== YOUR CODE HERE ===============...
{"author": "1094401996", "repo": "machine-learning-coursera", "sha": "e53d1021a08b0f2ab7e0840d9807ab14e24ea9bb", "save_path": "github-repos/MATLAB/1094401996-machine-learning-coursera", "path": "github-repos/MATLAB/1094401996-machine-learning-coursera/machine-learning-coursera-e53d1021a08b0f2ab7e0840d9807ab14e24ea9bb/p...
# -*- coding: utf-8 -*- """ Created on Sat Nov 28 13:32:18 2020 @author: qtckp """ import sys sys.path.append('..') import numpy as np from geneticalgorithm2 import geneticalgorithm2 as ga import matplotlib.pyplot as plt dim = 25 def f(X): return np.sum(X) varbound = np.array([[0,10]]*dim) start_ge...
{"hexsha": "34067a32322378c99f6038943fb2f63edf4ca43f", "size": 1015, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/Standard GA vs. Elitist GA.py", "max_stars_repo_name": "mudesire/geneticalgorithm2", "max_stars_repo_head_hexsha": "165d87b182a0b56e035f7a37a17a16950de20ddd", "max_stars_repo_licenses": ["MI...
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm import matplotlib.colors as colors from matplotlib.patches import Polygon from matplotlib import cm from matplotlib import rc __author__ = 'ernesto' # if use latex or mathtext rc('text', usetex=False) rc('mathtext', fontset='cm') # aux...
{"hexsha": "fc71d6690bc52a2714646b390c57b8d6981ad0f4", "size": 7352, "ext": "py", "lang": "Python", "max_stars_repo_path": "figuras/Pycharm_Papoulis_Probability_Report/mean_and_distribution.py", "max_stars_repo_name": "bor9/estudiando_el_papoulis", "max_stars_repo_head_hexsha": "ef40ac18d7aece3415cd9ce72d1f9684c762d6df...
data("USArrests") # Loading the data set df <- scale(USArrests) # Scaling the data # View the firt 3 rows of the data head(df, n = 3) #x: numeric matrix, numeric data frame or a numeric vector #centers: Possible values are the number of clusters (k) or a set of initial (distinct) cluster centers. If a...
{"hexsha": "fb8f06d17ea3ac452559d50783742bac7e7d8852", "size": 1265, "ext": "r", "lang": "R", "max_stars_repo_path": "kmeans.r", "max_stars_repo_name": "sujayr/R_basics", "max_stars_repo_head_hexsha": "06f2cc05fbed7302d9399d40cfeccaf491dede38", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": null, "max_sta...
# Solution {-} A random variable $X$ whose probability density function is given as: \begin{equation*} f_X(x)= \begin{cases} \alpha e^{-\alpha x}, &x \geq 0 \\ 0, &x < 0 \\ \end{cases} \end{equation*} This density function is used to describe the failure of equipment components. The probability that a ...
{"hexsha": "a4300da2bc12b3cd38d8290e86eaa7db9adbb4b5", "size": 2269, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Problem 1.15.ipynb", "max_stars_repo_name": "mfkiwl/GMPE340", "max_stars_repo_head_hexsha": "3602b8ba859a2c7db2cab96862472597dc1ac793", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import gym import numpy as np import pytest from baselines.common.vec_env import DummyVecEnv import gym3 from gym3.types_np import multimap, sample, zeros def gym3_rollout(e): for _ in range(10): rew, ob, done = e.observe() print(multimap(lambda x: x.shape, ob), rew.shape, done.shape) e.a...
{"hexsha": "5bff6601d6581fc2faf479ce62a0e593a0fc7ad8", "size": 1913, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym3/interop_test.py", "max_stars_repo_name": "christopher-hesse/gym3", "max_stars_repo_head_hexsha": "2ed9d344ede8bbd96b6280e9fbbbf55861ea33a9", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Filename:str_format.py "I am : doestr.__doc__" import imp import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import animation from urllib import request from urllib.request import urlopen from bs4 import BeautifulSo...
{"hexsha": "16655e86cb4f814f2d8ca15fe2bfafd1fa828d5a", "size": 4195, "ext": "py", "lang": "Python", "max_stars_repo_path": "hello1.py", "max_stars_repo_name": "8055aa/Python3Code", "max_stars_repo_head_hexsha": "ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
import time from typing import Tuple, List, Dict, Any import cupy as np from dataset import Dataset from dataset_type import DatasetType from plot_drawer import PlotDrawer from simple_framework.layers.dense_layer import DenseLayer from simple_framework.layers.dropout_layer import DropoutLayer from simple_framework.la...
{"hexsha": "035b8ecc107e6c419d68184a9ecb14551d5650dc", "size": 6924, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "VictorAtPL/MNIST_FCDN_NumPy", "max_stars_repo_head_hexsha": "f30e010a3d69afcc19c49e16ed3f004ae64be32d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
# This module will perform the box count algorithm on a BMP image object from m_filter import intensity # should i define this locally? from math import log from statistics import variance from datetime import datetime import numpy as np import matplotlib.pyplot as plt # --------------------------------------------...
{"hexsha": "581d87639f6ed90cb59de2f3115993ff8db8b7c7", "size": 6459, "ext": "py", "lang": "Python", "max_stars_repo_path": "m_boxcount.py", "max_stars_repo_name": "mcm7f/thesis", "max_stars_repo_head_hexsha": "412f35de9b1ce25ed4447d077a2a5292a57063f9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_star...
# Machine Learning: Basic Principles 2018 # Round 2 - Regression ## Learning goals In this exercise you will learn how to use **linear regression**, in order to predict a quantity of interest based on data. The implementation of linear regression amounts to the minimization of a function (**the empirical risk**) whic...
{"hexsha": "5c6abdb66accb16e2d92de5a615973c25e807866", "size": 104623, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Regression - Exercise.ipynb", "max_stars_repo_name": "Oltier/ml-practice-practice2", "max_stars_repo_head_hexsha": "cb66580c1fea447a06674ebb5819ff292114f2fd", "max_stars_repo_licens...
import pytest from astropy.table import Table from b_to_zooniverse.do_upload import manifest TEST_EXAMPLES_DIR = 'python/test_examples' @pytest.fixture() def joint_catalog(): return Table([ { 'nsa_id': 'example_nsa_id', 'iauname': 'example_iauname', 'ra': 147.45674, ...
{"hexsha": "f1a0fcf140ed60ae935b43f129560d54a2e7c9dc", "size": 6277, "ext": "py", "lang": "Python", "max_stars_repo_path": "decals/b_to_zooniverse/do_upload/manifest_test.py", "max_stars_repo_name": "zooniverse/decals", "max_stars_repo_head_hexsha": "ce0086fa7fc3597b12f90d7ce9dd92d1cbcf8e66", "max_stars_repo_licenses":...
#--------------------------------------------------------------- # 03_Run_Regression_and_Suitability.py #--------------------------------------------------------------- import os, pdb import pandas as pd import numpy as np import Urban_Tree_Functions as urbanTreeLib tableDir = r'/Volumes/Seagate Backup Plus Drive/...
{"hexsha": "73e4f81b98fb67f8da9accbc423d4504a1fd6f26", "size": 9001, "ext": "py", "lang": "Python", "max_stars_repo_path": "03_Run_Regression_and_Suitability.py", "max_stars_repo_name": "leahscampbell/CUTI-Scripts", "max_stars_repo_head_hexsha": "9261daa4a2020faa03e7aa61872532cdcbdc0fd7", "max_stars_repo_licenses": ["M...
[STATEMENT] lemma quotient_rep_ex : "H \<in> (carrier (G LMod (stabiliser x))) \<Longrightarrow> rep H \<in> H" [PROOF STATE] proof (prove) goal (1 subgoal): 1. H \<in> carrier (G LMod stabiliser x) \<Longrightarrow> rep H \<in> H [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. H \<in> carrier ...
{"llama_tokens": 1326, "file": "Orbit_Stabiliser_Orbit_Stabiliser", "length": 16}
/* Copyright (c) 2009, Yoav Aviram All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
{"hexsha": "d5c07889b9aaecb5a2f87ad1a288ac0a6ab428db", "size": 4380, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/feedreader/Feed.hpp", "max_stars_repo_name": "thawkins/feed-reader-lib", "max_stars_repo_head_hexsha": "504eb9f95d87757c7044cdac062ed55efb14f849", "max_stars_repo_licenses": ["BSD-3-Clause"]...
#include "stdafx.h" #include "UnistdLoader.h" #include <fstream> #include <sstream> #include <boost/filesystem.hpp> namespace fs = boost::filesystem; inline std::string trim(std::string& str) { str.erase(0, str.find_first_not_of(' ')); //prefixing spaces str.erase(str.find_last_not_of(' ')+1); //sur...
{"hexsha": "2830ca4119c43af3058f6fbb6b596f11010b51d4", "size": 2268, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/ArmSVC/UnistdLoader.cpp", "max_stars_repo_name": "azerg/armsvc-for-ida", "max_stars_repo_head_hexsha": "87a8feff3549f69bc74b06f6eea9d48d83f340f8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import cv2 as cv import numpy as np ### TARGET: reduce noise using erode/dilate img = cv.imread("data/images/sea.jpg") cv.imshow("Image", img) # Transform to HSV to achieve greater accuracy hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV) mask = cv.inRange(hsv, (30, 50, 10), (90, 255, 255)) cv.imshow("Mask", mask) # Fir...
{"hexsha": "237c8644602641b8ca409a229b77cc957fe92f32", "size": 815, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cv/ErodeDilate/main.py", "max_stars_repo_name": "knyazer/lessons", "max_stars_repo_head_hexsha": "2ff0ecc4be53d56d4709f5b0e0de2b5a3cc2d0cc", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[GOAL] M : Type u_1 inst✝¹ : Monoid M X : Type u inst✝ : MulAction M X ⊢ Category.{?u.1482, u} (ActionCategory M X) [PROOFSTEP] dsimp only [ActionCategory] [GOAL] M : Type u_1 inst✝¹ : Monoid M X : Type u inst✝ : MulAction M X ⊢ Category.{?u.1482, u} (Functor.Elements (actionAsFunctor M X)) [PROOFSTEP] infer_instance [...
{"mathlib_filename": "Mathlib.CategoryTheory.Action", "llama_tokens": 10049}
"""Functions for control of LTI systems with multiplicative noise.""" # Author: Ben Gravell import numpy as np from numpy import linalg as la from .matrixmath import is_pos_def, vec, sympart, kron, dlyap, mdot from .extramath import quadratic_formula import warnings from warnings import warn def dlyap_m...
{"hexsha": "572a2ba0ec41abe8155efc2e5a431dde66426aa4", "size": 11555, "ext": "py", "lang": "Python", "max_stars_repo_path": "utility/ltimult.py", "max_stars_repo_name": "TSummersLab/robust-adaptive-control-multinoise", "max_stars_repo_head_hexsha": "4ad22c72f8f45b6ef7cb61c33b5100bea5d88873", "max_stars_repo_licenses": ...
# Copyright 2020-present NAVER Corp. Under BSD 3-clause license """ Colmap database import as basic kapture objects functions """ from kapture.io.tar import TarCollection import logging import numpy as np from tqdm import tqdm from typing import Tuple, Optional # kapture import kapture import kapture.io.features # l...
{"hexsha": "5c8de4633e833d12763654bfda609effd726bcc5", "size": 14767, "ext": "py", "lang": "Python", "max_stars_repo_path": "kapture/converter/colmap/import_colmap_database.py", "max_stars_repo_name": "v-mehta/kapture", "max_stars_repo_head_hexsha": "b95a15b83032d667282ab96fa5be5327b2c99ec7", "max_stars_repo_licenses":...
#include <chrono> #include <string> #include <istream> #include <ostream> #include <iostream> #include <algorithm> #include <boost/asio.hpp> using boost::asio::ip::tcp; template<class T> void check_error(T error) { if(error) { std::stringstream sstream; sstream << error; throw std::runtime...
{"hexsha": "98c4d77981e0623c4ebd380a32b4d0a0deff42fb", "size": 3959, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "asio/async_speed_server/client.cpp", "max_stars_repo_name": "proydakov/cppzone", "max_stars_repo_head_hexsha": "2cee5523df8fadbd087746c16bbf386360c8114a", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import yaml import os, sys import copy from functools import reduce import random from timeloop_env import TimeloopEnv from multiprocessing.pool import Pool from multiprocessing import cpu_count import shutil from functools import cmp_to_key, partial class GammaTimeloopEnv(object): def __init__...
{"hexsha": "a173392b5aff72ab8af19464267b1bce5af17501", "size": 11536, "ext": "py", "lang": "Python", "max_stars_repo_path": "gamma_timeloop_src/gamma_timeloop_env.py", "max_stars_repo_name": "maestro-project/gamma", "max_stars_repo_head_hexsha": "fe4ba02a90d554c8dd49989c986082d27093d964", "max_stars_repo_licenses": ["M...
# LabTrade - A visual tool to support the development of strategies in Quantitative Finance - by fab2112 import sys import numpy as np import pandas as pd import pyqtgraph as pg from PyQt5 import QtCore, QtGui class labtrade: def __init__(self): # Variables Logic self.showplt1 = 1 # Performance /...
{"hexsha": "2ac2b2100311ccf333a8f5f9f23e78808b97fc64", "size": 50632, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/labtrade.py", "max_stars_repo_name": "fab2112/labtrade", "max_stars_repo_head_hexsha": "012e7c56f6992f8510cfcebd9ba38fc5a16565ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
# -*- coding: utf-8 -*- """ @author: M. Grajewski, E. Bertelsmann, FH Aachen University of Applied Sciences """ import numpy as np import pypoman as pp from scipy.optimize import minimize from numba import jit, float64, int32, boolean def hrep_from_ranking(P, ranking): """ We assume a decision model m of th...
{"hexsha": "d2372819652f2cf1a2c8c56e4275307f87d9a5d2", "size": 37194, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/weights_from_rankings.py", "max_stars_repo_name": "mgrajewski/pysmaa", "max_stars_repo_head_hexsha": "7034ed98f587c30f3649c780b0c14d5033b53756", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import tensorflow as tf gpus = tf.config.experimental.list_physical_devices(device_type='GPU') for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) ''' tensorflow drop layer in training phase: output = input / survival prob survival prob = 1 - drop rate i.e., 全1的輸入進入drop layer(假設drop rate = 0.4) 則...
{"hexsha": "57ac8bf87eba9b1bf17523ee0c79926995db41c9", "size": 2998, "ext": "py", "lang": "Python", "max_stars_repo_path": "dropblock.py", "max_stars_repo_name": "qwerasdf887/TF2_DropBlock", "max_stars_repo_head_hexsha": "13e04cfab605ac32dd3e72685dd3c8c30fcdd7ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import logging import multiprocessing as mp from dataclasses import dataclass from typing import Dict, Tuple import gym import jax import numpy as np import rjax.networks.policies as policies from rjax.agents.learner import Learner from rjax.agents.model import Model from rjax.common import PRNGKey def _sample_acti...
{"hexsha": "8c6fb22f6fc72b670f919c4facb8e5ced7aae426", "size": 1939, "ext": "py", "lang": "Python", "max_stars_repo_path": "rjax/experiment/evaluation.py", "max_stars_repo_name": "charlesjsun/rjax", "max_stars_repo_head_hexsha": "8b56f78b34f593f442db3cc0315a3b6f22191442", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma finite_divisor_set [simp]: "finite(divisor_set n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite (divisor_set n) [PROOF STEP] using divisor_def divisor_set [PROOF STATE] proof (prove) using this: ?n divisor ?m \<equiv> 1 \<le> ?n \<and> ?n \<le> ?m \<and> ?n dvd ?m divisor_set ?m = {n. n di...
{"llama_tokens": 180, "file": "Amicable_Numbers_Amicable_Numbers", "length": 2}
import time import numbers import threading import argparse import numpy as np try: from p5 import * # pip install p5 except Exception as e: print(str(e)) print("Failed to import p5") import matplotlib.pyplot as plt import tqdm import pickle from policy import Policy from policy_simplified_boids import P...
{"hexsha": "ec9aac5b08c32f1a49416eea3a3b0c4d5399111b", "size": 8522, "ext": "py", "lang": "Python", "max_stars_repo_path": "prototype_0/main.py", "max_stars_repo_name": "liusida/pocs", "max_stars_repo_head_hexsha": "c5e0f5bbae5298fe6e78353661790094e4ca03f9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
""" sunbeam.py ----------- (S)pectral (N)on-(B)acktracking (E)mbedding (A)nd Pseudo-(M)etric. This module contains functions related to using the eigenvalues of the non-backtracking matrix to perform graph mining tasks such as graph distance and graph embedding. The functions found here are grouped under the following...
{"hexsha": "efcff02f66075975d123f1ebe88112a663d91788", "size": 19738, "ext": "py", "lang": "Python", "max_stars_repo_path": "sunbeam.py", "max_stars_repo_name": "psuarezserrato/sunbeam", "max_stars_repo_head_hexsha": "22233f84258f23b4c0ea3c78f0e031506e6c105c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 13, ...
###################################################################### ## ################################################################ ## ## ## SCRIPT FROM ../elecReturns/code/incumbents.r *STARTS* HERE ## ## ## ## 1aug2020 ## ## ## #################################...
{"hexsha": "f656138dd13f10a2233d0b946191a037167b54cb", "size": 151541, "ext": "r", "lang": "R", "max_stars_repo_path": "code/incumbent-reelection.r", "max_stars_repo_name": "emagar/reelec", "max_stars_repo_head_hexsha": "7f2793f55e5dd705e1a7ca0b953797de50929b2a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
%===================================== CHAP 2 ================================= \chapter{Literature Review} \section{Reproducibility Terminology} ### Fehr 2016 Best Practices for Replicability, Reproducibility and Reusability of Computer-Based Experiments Exemplified by Model Reduction Software: https://arxiv.org/ab...
{"hexsha": "8f7d6ec73126a2ecf323e2e60d6f2a9d3754e38a", "size": 5055, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/report/chapters/chapter2.tex", "max_stars_repo_name": "sidgek/msoppgave", "max_stars_repo_head_hexsha": "b67192b0d57703e8205a48dda2632d56c9872fba", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np import os import matplotlib.pyplot as plt def preprocess_save_data(file): path = "/atlas/u/jiaxuan/data/google_drive/img_output/" if file.endswith(".npy"): path_current=os.path.join(path, file) image_temp = np.load(path_current) image_temp=np.reshape(image_temp,(imag...
{"hexsha": "edc29e77f0ae154d6aa44aea02778c8cf52b353c", "size": 1632, "ext": "py", "lang": "Python", "max_stars_repo_path": "6_result_analysis/corr.py", "max_stars_repo_name": "tommylees112/crop_yield_prediction", "max_stars_repo_head_hexsha": "43299b6d6a1f22e4431e23bf92f9cff87c6f5073", "max_stars_repo_licenses": ["MIT"...
\section{Introduction} \label{sec:intro} \paragraph{Domain of application.} `Simple' robots which can easily be manufactured using DYI tools and off-the-shelf electronic. \paragraph{Target audience.} Students or prosumer hobbyists wanting to learn robotic. We assume some basic technical/programming knowledge. The use...
{"hexsha": "5518f64a397389f6b2402f47a2e59a8c66882f5f", "size": 3092, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/draft/intro.tex", "max_stars_repo_name": "aleksandarmilicevic/react-lang", "max_stars_repo_head_hexsha": "18041bbf1f43668b3f600c2d6daa994264915881", "max_stars_repo_licenses": ["Apache-2.0"], "m...
""" qtools.py - some unassociated random tools for working with QuTiP """ import numpy as np import qutip as qt import math def ketify(ket, M, LaTeX=False): """ Given a state vector of N dimensions and composed of M subspaces, transform into an expression of bra, kets :param M: number of subspaces to ...
{"hexsha": "b6199a13501122aa2cf24ca9ee0ce57e99241cb5", "size": 3522, "ext": "py", "lang": "Python", "max_stars_repo_path": "qtools.py", "max_stars_repo_name": "peterse/transmon_simulations", "max_stars_repo_head_hexsha": "364e898de96c10987bd4a8588bdecf54ea28f9ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import math from collections import defaultdict class Agent: def __init__(self, nA=6, epsilon=0.08926, gamma=0.8597, epsilon_divisor = 17.87): """ Initialize agent. Params ====== - nA: number of actions available to the agent """ self.nA = nA ...
{"hexsha": "49710eadcb212dc3e51c66e1f9d0d032fb087c3e", "size": 1923, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab-taxi/agent.py", "max_stars_repo_name": "faisman/deep-reinforcement-learning", "max_stars_repo_head_hexsha": "1e8fd9ed9e155b1939384ccb6dbba20624836d0d", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- from __future__ import print_function from acq4.util import Qt from acq4.analysis.AnalysisModule import AnalysisModule from collections import OrderedDict import pyqtgraph as pg from pyqtgraph.metaarray import MetaArray import numpy as np from six.moves import range class ImageAnalysis(Analysis...
{"hexsha": "1bec0c5745a141c381b2e19bc6051d1917f19695", "size": 8627, "ext": "py", "lang": "Python", "max_stars_repo_path": "acq4/analysis/modules/ImageAnalysis/ImageAnalysis.py", "max_stars_repo_name": "campagnola/acq4", "max_stars_repo_head_hexsha": "09699c07d8949950f6df149cf17892aaa3a37402", "max_stars_repo_licenses"...
Add LoadPath "..". Require Import L_Substitution. Require Import PermutLib. Require Import LibTactics. Require Import L_OkLib. Require Import Relations. Open Scope is5_scope. Open Scope labeled_is5_scope. Open Scope permut_scope. Global Reserved Notation " Omega ';' Gamma '|-' M ':::' A '@' w " (at level 70). Induct...
{"author": "Ayertienna", "repo": "IS5", "sha": "3bfd1b8510f269071d59d77818f8936d194364bc", "save_path": "github-repos/coq/Ayertienna-IS5", "path": "github-repos/coq/Ayertienna-IS5/IS5-3bfd1b8510f269071d59d77818f8936d194364bc/src/Labeled/L_Semantics.v"}
import cv2 import numpy as np import colors import position from twophase import solve import threading from cube3d import RubiksCube def show_scramble_2d(text=None, img=None): cv2.imshow(text, img) cv2.waitKey(0) def create_cube(solution, start_position): game = RubiksCube(solution, start_position) ...
{"hexsha": "6a99097fc2a134fd9abece89a76bc33570932e02", "size": 8064, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Sheshkon/CubeRecognition", "max_stars_repo_head_hexsha": "0d65831a9c43ce7231f8758bf57a75f49ea2aca2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
#!/usr/bin/python import sys import os import numpy import pickle as pkl import re from collections import OrderedDict sys.setrecursionlimit(1000) def build_dictionary_wordnet(filepaths, dst_path=None, lowercase=False, remove_phrase=True): word_id_num = OrderedDict() id_word = OrderedDict() id_num_word = ...
{"hexsha": "144676f06b57c8feba2b515bcb358bcbc781517b", "size": 13671, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/preprocess_data.py", "max_stars_repo_name": "ksboy/NLP_External_knowledge", "max_stars_repo_head_hexsha": "989cf4debce2bc1040c0d95a46e4307336624917", "max_stars_repo_licenses": ["Apache-2.0"...
import numpy as np import torch from torch.autograd import Variable from neural_net import HVVNet class Predictor(): def __init__(self, insize, outsize, model_path): self.model = HVVNet(insize, outsize) self.model.load_state_dict(torch.load(model_path)) self.model.eval() def predic...
{"hexsha": "08c7c2cbacbec068ef2cfc896ec4ad1087e74443", "size": 1146, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict.py", "max_stars_repo_name": "BlueHC/TTHack-2018--Traffic-Guide-1", "max_stars_repo_head_hexsha": "6a720e268d18c8e090c12b874336d17e89a183bb", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np a = np.ndarray((2,6,7,3)) copy01 = np.abs(a) copy02 = np.arcos(a) copy03 = np.arcosh(a) copy04 = np.arcsin(a) copy05 = np.arcsinh(a) copy06 = np.arctan(a) copy07 = np.arctanh(a) copy08 = np.cos(a) copy09 = np.floor(a) copy10 = np.zeros_like(a) # show_store()
{"hexsha": "a01b5212a2962fd6fa3c0d0cc18919a058157d41", "size": 280, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/inputs/numpy-lib/52-np-functions-that-dont-modify-array.py", "max_stars_repo_name": "helq/pytropos", "max_stars_repo_head_hexsha": "497ed5902e6e4912249ca0a46b477f9bfa6ae80a", "max_stars_repo_...
## simple interactive edge finding using locator() pupil.pars <- function(im=NULL, obstructed=FALSE) { if (!is.null(im)) image(1:nrow(im), 1:ncol(im), im, col=grey256, asp=1, xlab="", ylab="", useRaster=TRUE) cat("click on edge of pupil; right click to exit\n") flush.console() edge <- locator(type="p", col="gree...
{"hexsha": "bd628bba01165c38aba71b3d64750f0dd1d8ee98", "size": 5186, "ext": "r", "lang": "R", "max_stars_repo_path": "R/circle.pars.r", "max_stars_repo_name": "gmke/zernike", "max_stars_repo_head_hexsha": "0880b0ae43cbb051afb54aa5decc246252467a8d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_re...
import os import pandas as pd import numpy as np from Utility import countLabelCorrespondMovieNum, countSingleLabelCorrespondMovieNum strProjectFolder = os.path.dirname(os.path.dirname(__file__)) DataUser = pd.read_csv(os.path.join(strProjectFolder, "01-Data/users.csv"), sep="::", engine="python", usecols=["UserID",...
{"hexsha": "32f1131f400a7d8e8ac8801131feec62681600e5", "size": 1517, "ext": "py", "lang": "Python", "max_stars_repo_path": "Homework/HW5/Base/DataProcessing.py", "max_stars_repo_name": "zhufyaxel/ML_SaltyFish", "max_stars_repo_head_hexsha": "84b839fa236c471e1fa8600093f0096ff79e4097", "max_stars_repo_licenses": ["MIT"],...
using ReversibleJumpMCMC using Test @testset "ReversibleJumpMCMC.jl" begin # Write your tests here. @test 1==1 end
{"hexsha": "9b3bb27ce0dab32c13c3d9a4de91fd492d4026c9", "size": 124, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "LidkeLab/RJMCMC.jl", "max_stars_repo_head_hexsha": "2b430726f061332a06f44399471abbb7910ed5ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import os, sys import pickle import inspect import numpy as np import time from copy import copy from psana import dgram from psana.dgrammanager import DgramManager from psana.detector.detector_impl import MissingDet from psana.event import Event from psana.psexp import * class DetectorNameError(Exception): pass de...
{"hexsha": "86db65a0c012a2cb73e6fbfbd7b91043b11c079d", "size": 12203, "ext": "py", "lang": "Python", "max_stars_repo_path": "psana/psana/psexp/run.py", "max_stars_repo_name": "ZhenghengLi/lcls2", "max_stars_repo_head_hexsha": "94e75c6536954a58c8937595dcac295163aa1cdf", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], ...
[STATEMENT] lemma map_onws_sb_owned:"\<And>j. j < length ts \<Longrightarrow> map \<O>_sb ts ! j = (\<O>\<^sub>j,sb\<^sub>j) \<Longrightarrow> map owned ts ! j = \<O>\<^sub>j" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<And>j. \<lbrakk>j < length ts; map \<O>_sb ts ! j = (\<O>\<^sub>j, sb\<^sub>j)\<rbrakk> \<Lo...
{"llama_tokens": 1416, "file": "Store_Buffer_Reduction_ReduceStoreBufferSimulation", "length": 8}
import os import torch import numpy as np import torch.optim as optim from torch.autograd import Variable from utils.meta import META # we build here on premmise, that batch contains multi-task experience!! # therefore we will take few grad steps in 'inner-loop' and then one FOMAML step in here class FOML(META): ...
{"hexsha": "bf0cbb2b0572c045bfe06186d0875762044f00d0", "size": 1001, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/foml.py", "max_stars_repo_name": "rezer0dai/bnpo", "max_stars_repo_head_hexsha": "e32f2b013d28714530c46c2f1084a14385af1ce9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import numpy as np import matplotlib.pyplot as plt def moving_average(interval, window_size): window= np.ones(int(window_size))/float(window_size) return np.apply_along_axis(lambda m: np.convolve(m, window, 'valid'), axis=0, arr=interval) def plot_moving_average_scores(scores, ...
{"hexsha": "cfd84ab299d8171e6098afb9b51902c5e57c4ccd", "size": 430, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting.py", "max_stars_repo_name": "mvelax/wizard-python", "max_stars_repo_head_hexsha": "a2695861eee07746a9b3d7dbbee4b471e2675b20", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
"""NOTE: This file may be difficult to run from the railrl-private environment! I started with a fresh python2 env (bairdataset) and installed tensorflow 0.11.2 off a random stack overflow post, adjusted TF calls to match that API https://stackoverflow.com/questions/41626830/pip-only-install-cpu-tensorflow-of-tensorfl...
{"hexsha": "81df97fb6664b4a9b2c4268440e9577d83815870", "size": 18953, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlkit/data_management/external/bair_dataset/bair_dataset_tensorflow.py", "max_stars_repo_name": "Asap7772/railrl_evalsawyer", "max_stars_repo_head_hexsha": "baba8ce634d32a48c7dfe4dc03b123e18e96e0...