text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import os
import timeit
import pandas
import numpy
import geopandas
import pandas as pd
wd = os.getcwd()
points_path = os.path.join(wd, "data", "points.gpkg")
points = geopandas.read_file(points_path)
polygon_path = os.path.join(wd, "data", "polygon.gpkg")
polygon = geopandas.read_file(polygon_path)
# th... | {"hexsha": "c1b5132650d1923305063aa29345a98eb829390f", "size": 1096, "ext": "py", "lang": "Python", "max_stars_repo_path": "geopandas/intersects.py", "max_stars_repo_name": "kadyb/vector-benchmark", "max_stars_repo_head_hexsha": "66cef2138e76ab3c283b7f93502f379e523d9a7c", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
[STATEMENT]
lemma tensor_unpack_bound1[simp]: "i < A * B \<Longrightarrow> fst (tensor_unpack A B i) < A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i < A * B \<Longrightarrow> fst (tensor_unpack A B i) < A
[PROOF STEP]
unfolding tensor_unpack_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i < A * B \<Lon... | {"llama_tokens": 288, "file": "Registers_Finite_Tensor_Product_Matrices", "length": 4} |
"""
Train and test the onset detector CNN
"""
import numpy as np
import database
import generator
import eda
import os
from glob import glob
import keras
from keras.layers import Conv2D, MaxPooling2D
from keras.layers import Dropout, Flatten, Dense
from keras.models import Sequential
from keras.callbacks import Mode... | {"hexsha": "2a20aeb4cbcc6aa3a5b11d82ebdceb49cff119f3", "size": 10683, "ext": "py", "lang": "Python", "max_stars_repo_path": "onset.py", "max_stars_repo_name": "orgonth/musicscribe", "max_stars_repo_head_hexsha": "ff62a717f655af3856958a34c3a34c753c4f7874", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
#ifndef PERIOR_TREE_POINT_OPERATIONS
#define PERIOR_TREE_POINT_OPERATIONS
#include <periortree/point_traits.hpp>
#include <boost/utility/enable_if.hpp>
namespace perior
{
namespace ops
{
template<typename T>
BOOST_FORCEINLINE typename boost::enable_if<traits::is_point<T>, T>::type
operator+(const T& lhs, const T& rhs... | {"hexsha": "bab8377268cb10508cc819982742f53d562012e6", "size": 4472, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "periortree/point_ops.hpp", "max_stars_repo_name": "ToruNiina/periortree", "max_stars_repo_head_hexsha": "c805c7ee6bb9ff8e92ac74204b1dcbd518fef19d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
from __future__ import print_function
import sys
import vtk
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui, QtWidgets
from PyQt5 import Qt
from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QAction, QTreeView, QFileSystemModel, QTableWidget, QTableWidgetItem, QVBoxLayout
import matplotlib as... | {"hexsha": "265f0de8456f3e5ab1e9f0db542ae36ef191a092", "size": 42947, "ext": "py", "lang": "Python", "max_stars_repo_path": "DipteraTrack.py", "max_stars_repo_name": "jmmelis/DipteraTrack", "max_stars_repo_head_hexsha": "1d267ccd4248635233147f2035b900a433dc4536", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
[STATEMENT]
lemma refine_slg_succs[autoref_rules_raw]:
"(slg_succs_impl,slg_succs)\<in>\<langle>Id\<rangle>slg_rel\<rightarrow>Id\<rightarrow>\<langle>Id\<rangle>list_set_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (slg_succs_impl, slg_succs) \<in> \<langle>Id\<rangle>slg_rel \<rightarrow> Id \<rightarrow... | {"llama_tokens": 344, "file": "Collections_Examples_Autoref_Succ_Graph", "length": 3} |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CS671: Machine Learning
% Copyright 2015 Pejman Ghorbanzade <pejman@ghorbanzade.com>
% Creative Commons Attribution-ShareAlike 4.0 International License
% More info: https://github.com/ghorbanzade/beacon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | {"hexsha": "737bc2ab4c87d106f00e67fe27362ba9dd72fe9b", "size": 4055, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "umb-cs671-2015s/src/tex/hw01/hw01q03.tex", "max_stars_repo_name": "ghorbanzade/beacon", "max_stars_repo_head_hexsha": "c36e3d1909b9e1e47b1ad3cda81f7f33b713adc4", "max_stars_repo_licenses": ["MIT"], ... |
function curandGetVersion()
ver = Ref{Cint}()
curandGetVersion(ver)
return ver[]
end
function curandGetProperty(property::CUDAapi.libraryPropertyType)
value_ref = Ref{Cint}()
curandGetProperty(property, value_ref)
value_ref[]
end
| {"hexsha": "6c8da64fc0afb15e25be9f3acfbcc3c859176352", "size": 249, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rand/wrappers.jl", "max_stars_repo_name": "kraftpunk97/CuArrays.jl", "max_stars_repo_head_hexsha": "9892999533fa4c234516d777c0978576b3b3ff39", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import sys
import torch
import itertools
from util.image_pool import ImagePool
from util.losses import L1_Charbonnier_loss
from .base_model import BaseModel
from . import networks
from torch.autograd import Variable
import numpy as np
import torch.nn.functional as F
import os
from models.vgg_perceptual_loss import VGGP... | {"hexsha": "63b80824ecafb05fd7bfa3dcaf0452d68145c4b3", "size": 41955, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/cycle_gan_semantic_mask_sty2_model.py", "max_stars_repo_name": "jolibrain/pytorch-CycleGAN-and-pix2pix", "max_stars_repo_head_hexsha": "43465d660d445e020067979fa8d592a1b480c869", "max_star... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .jl
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.5.0
# kernelspec:
# display_name: Julia 1.4.2
# language: julia
# name: julia-1.4
# ---
using Plots
# +
plotly()
... | {"hexsha": "0832971fa0927456569e90164310f15178473eb6", "size": 1814, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "experiments/notebook/plotly_surface.jl", "max_stars_repo_name": "hsugawa8651/MyWorkflow.jl", "max_stars_repo_head_hexsha": "48edcbcc3fd9e425895ef91bea833ef1e5d4c3fe", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma noVal2_disj:
assumes "noVal2 Inv1 v" and "noVal2 Inv2 v"
shows "noVal2 (\<lambda> s v. Inv1 s v \<or> Inv2 s v) v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. noVal2 (\<lambda>s v. Inv1 s v \<or> Inv2 s v) v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
noVal2 Inv1 v
noVal2 In... | {"llama_tokens": 429, "file": "Bounded_Deducibility_Security_BD_Security_Unwinding", "length": 3} |
[STATEMENT]
lemma wf_subst1:
fixes \<Gamma>::\<Gamma> and \<Gamma>'::\<Gamma> and v::v and e::e and c::c and \<tau>::\<tau> and ts::"(string*\<tau>) list" and \<Delta>::\<Delta> and b::b and ftq::fun_typ_q and ft::fun_typ and ce::ce and td::type_def
shows wfV_subst: "\<Theta>; \<B>; \<Gamma> \<turnstile>\<^sub>w... | {"llama_tokens": 372065, "file": "MiniSail_WellformedL", "length": 343} |
[STATEMENT]
lemma obligation2: assumes "map_pmf con s = Sum_pmf (8 / 10) Da Db"
and "finite (set_pmf Da)"
and "finite (set_pmf Db)"
shows "T\<^sub>p_on_rand' (COMB []) s qs =
2 / 10 * T\<^sub>p_on_rand' (embed (rTS [])) Db qs +
8 / 10 * T\<^sub>p_on_rand' BIT Da qs"
[PROOF STATE]
proof (prove)
goal (1... | {"llama_tokens": 13720, "file": "List_Update_Comb", "length": 31} |
import tensorflow as tf
from tqdm import tqdm
from Client import Clients
import os
import numpy as np
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def buildClients(num, local_client_number=1):
learning_rate = 0.0001
num_input = 32 # image shape: 32*32
num_input_cha... | {"hexsha": "36b585c36c89cc325c7f87c4a2ae8d658d8fb799", "size": 4960, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Server.py", "max_stars_repo_name": "Gin757306533/aslam_tensorflow_fed_covid_19", "max_stars_repo_head_hexsha": "235f156a5e2b1597f80161231ed22bc424d7bd6c", "max_stars_repo_licenses": ["Apache-2... |
!======================================================================
!======================================================================
! Utility Program for Relabeling Labeled Solutions
! in AUTO97 Data Files
!======================================================================... | {"hexsha": "671c5f15bb3440c844ae175c5846b62689720e8d", "size": 5178, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "07p/util/relabel.f90", "max_stars_repo_name": "st970703/AUTO07P-Update-to-Python-3.0", "max_stars_repo_head_hexsha": "fb2d2aebf2127fa914064d01ed62c0acb5f6421c", "max_stars_repo_licenses": ["Apac... |
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <valgrind/callgrind.h>
#include <gsl/gsl_histogram.h>
#include <gsl/gsl_sort.h>
#include <gsl/gsl_statistics.h>
#include "betree.h"
#include "debug.h"
#... | {"hexsha": "de69b1900a8decfc8ddd89c450633ef5fe8ae829", "size": 8969, "ext": "c", "lang": "C", "max_stars_repo_path": "tests/real_tests.c", "max_stars_repo_name": "jonahharris/be-tree", "max_stars_repo_head_hexsha": "51d7474cce329b6ea392ac873100e3963c23b471", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 29.0, ... |
\section{Conclusion}
This article illustrated the verification method equational reasoning by example. We proved that the monoid law known as left identity holds for a given function definition.
The type class laws provide a specification for the verification process. In addition, we can rely on properties of exist... | {"hexsha": "83f5ffcb09920702bd1bf3ea5121afd1dfd4fa1b", "size": 1524, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "conclusion.tex", "max_stars_repo_name": "Hofmaier/robertson", "max_stars_repo_head_hexsha": "a9659af0af3c5780230e8fe3cb64350f57fc8226", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
%
% revised in Jan, 18th, 2008
% problems left behind:
% 1 whether we can have such extension:
% \begin{equation}\label{GROUPeq:8}
% \hat{O}_{R}[\Psi\Phi] = (\hat{O}_{R}\Psi)(\hat{O}_{R}\Phi)
% \end{equation}
% I am not sure that whether it's correct. 2 vanishing integrals
% is not fully finished, so... | {"hexsha": "3ca527287c1a300c21d0c25930112f26f485f599", "size": 88492, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "theory/chemistry/groups.tex", "max_stars_repo_name": "murfreesboro/fenglai-note", "max_stars_repo_head_hexsha": "7bdf943f681e54948cd68775a31e4c93a53a13f8", "max_stars_repo_licenses": ["MIT"], "max_... |
#include "../agg.hpp"
#include <boost/accumulators/statistics/sum.hpp>
ARRAY_AGGREGATE_FNC(asum, tag::sum);
SQL_AGGREGATE_FNC(v_sum, tag::sum);
| {"hexsha": "594214ff0b968f1262b42604efd0b4d1f1cf0e36", "size": 145, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/math/aggregate/sum.cpp", "max_stars_repo_name": "tarkmeper/numpgsql", "max_stars_repo_head_hexsha": "a5098af9b7c4d88564092c0a4809029aab9f614f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python3
import numpy as np
from neural_net import train_network, predict
def xor():
X = np.array([
[0, 0],
[1, 0],
[0, 1],
[1, 1]
])
y = np.array([
[0],
[1],
[1],
[0]
])
np.random.seed(1)
model = train_network(
... | {"hexsha": "438ee794bd3463e49b17a55cb4c0aa99189a5861", "size": 619, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml/python/xor_net.py", "max_stars_repo_name": "chethanjkulkarni/r", "max_stars_repo_head_hexsha": "b5576449c62ae1b46df2c1d69e5cbc9f8a3719ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
/-
Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Devon Tuma
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.ring_theory.polynomial.basic
import Mathlib.ring_theory.non_zero_divisors
import Math... | {"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/ring_theory/polynomial/scale_roots_auto... |
function pass = test_fevalm( pref )
% Test spherefun/fevalm
if ( nargin == 0)
pref = chebfunpref;
end
tol = 100*pref.cheb2Prefs.chebfun2eps;
rng(2016);
% Check empty spherefun:
f = spherefun;
s = pi*(2*rand(5,1) - 1);
t = pi/2*rand(5,1);
B = fevalm(f, s, t);
pass(1) = isempty( B );
% Check rank 1 sphere... | {"author": "chebfun", "repo": "chebfun", "sha": "8c49396a55e46ddd57a1d108c6a8f32e37536d54", "save_path": "github-repos/MATLAB/chebfun-chebfun", "path": "github-repos/MATLAB/chebfun-chebfun/chebfun-8c49396a55e46ddd57a1d108c6a8f32e37536d54/tests/spherefun/test_fevalm.m"} |
# import the necessary packages
import argparse
import json
import os
import random
import cv2 as cv
import keras.backend as K
import numpy as np
from config import img_size, eval_path, best_model
from model import build_model
from utils import random_crop, preprocess_input, psnr
if __name__ == '__main__':
image... | {"hexsha": "5acd30ac85848fd6096337f755116a9eca6db2ef", "size": 2277, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "foamliu/Super-Resolution-Net", "max_stars_repo_head_hexsha": "684a59f12ed0a0a89f7067c81bfd6fba8090f618", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14... |
"""
Helpers for scripts like run_atari.py.
"""
import gym
import os
import imageio
import numpy as np
import cv2
from baselines import logger
from baselines.bench import Monitor
from baselines.common import set_global_seeds
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.v... | {"hexsha": "c8483c3c9d1364618260efe3c0b645d47fe7ded8", "size": 8458, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselines/common/cmd_util.py", "max_stars_repo_name": "shwetasrsh/MOREL", "max_stars_repo_head_hexsha": "b9daa2a72ad8a33d46c0f87d8b1c3070f61fa784", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
# -*- coding: utf-8 -*-
"""
An example of a simple player widget animating an Image demonstrating
how to connnect a simple HoloViews plot with custom widgets and
combine them into a bokeh layout.
The app can be served using:
bokeh serve --show player.py
"""
import numpy as np
import holoviews as hv
from bokeh.i... | {"hexsha": "47a11a8d5a9463354bfc37590dd75e72db1bb8d9", "size": 1426, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/reference/apps/bokeh/player.py", "max_stars_repo_name": "TheoMathurin/holoviews", "max_stars_repo_head_hexsha": "0defcef994d6dd6d2054f75a0e332d02d121f8b0", "max_stars_repo_licenses": ["BS... |
#! /usr/bin/env python3
#
# Copyright 2018 California Institute of Technology
#
# 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
#
# Unle... | {"hexsha": "b1e8fb3ee46dd455fe729e7fade3e6e6ec64355f", "size": 19565, "ext": "py", "lang": "Python", "max_stars_repo_path": "isofit/fileio_mpi.py", "max_stars_repo_name": "dsconnelly/isofit", "max_stars_repo_head_hexsha": "e05e4b898021ea4d422bdc3f3437424d942d1b2f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_... |
[STATEMENT]
lemma finite_stable_completion:
"[| finite I;
!!i. i \<in> I ==> F \<in> (A i) leadsTo (A' i);
!!i. i \<in> I ==> F \<in> stable (A' i) |]
==> F \<in> (\<Inter>i \<in> I. A i) leadsTo (\<Inter>i \<in> I. A' i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk... | {"llama_tokens": 1160, "file": null, "length": 5} |
# -*- coding: utf-8 -*-
import os
import sys
import copy
import random
import numpy as np
import torch
from torchvision import transforms
from .datasets import register_dataset
import utils
@register_dataset('DomainNet')
class DomainNetDataset:
"""
DomainNet Dataset class
"""
def __init__(self, name, img_dir, LDS... | {"hexsha": "7391a1ec714b1f84c73bbd1940227a01f66362e2", "size": 1706, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/domainnet.py", "max_stars_repo_name": "virajprabhu/SENTRY", "max_stars_repo_head_hexsha": "7d594a54b5d96d317f8c7be5296d8819a7f1644a", "max_stars_repo_licenses": ["CNRI-Python"], "max_star... |
##################################################
## Create Bulge
## 4 cases DoubleShift/SingleShift x Descending/Twisted Q Factorizations
## RFactorization type doesn't enter here
# ## The bulge is created by (A-rho1) * (A - rho2) * e_1 where rho1 and rho2 are eigenvalue or random
# ## for real case, we take the r... | {"hexsha": "c0da841e8dde3a5b6ab12214b500921b6dd4a9da", "size": 6329, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/create-bulge.jl", "max_stars_repo_name": "jverzani/AMRVW.jl", "max_stars_repo_head_hexsha": "049788eb99364531a5417994fdfd6973f89485a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4,... |
using Test
using ITensorsGateEvolution
using ITensors
@testset "apply" begin
@testset "Simple on-site state evolution" begin
N = 3
pos = ProductOps()
pos *= "Z", 3
pos *= "Y", 2
pos *= "X", 1
s = siteinds("qubit", N)
gates = ops(s, pos)
ψ0 = productMPS(s, "0")
# Apply the gate... | {"hexsha": "ac1186bac46f107b5a03cc19ce2a09c35806d2f8", "size": 3619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/apply.jl", "max_stars_repo_name": "mtfishman/ITensorsGateEvolution.jl", "max_stars_repo_head_hexsha": "4deda618b8b20f0322ba53aff2f7210ae863f67f", "max_stars_repo_licenses": ["MIT"], "max_stars... |
"""
Testing plotting tools
----------------------
Module which contains the tests for the plotting utitilies.
"""
import numpy as np
from cooperativegames.plotting_tools.plotting import plotting_power
def test():
colors = ['#00008B', (1, 0.5, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0)]
playerstags = ['... | {"hexsha": "21e8c777a622cc208685c7bb5cb890ded626caa3", "size": 459, "ext": "py", "lang": "Python", "max_stars_repo_path": "cooperativegames/tests/test_plotting.py", "max_stars_repo_name": "josh1924/CooperativeGames", "max_stars_repo_head_hexsha": "7803164281ffc1dbaae70028f448f0250d60fab3", "max_stars_repo_licenses": ["... |
import unittest
import pandas as pd
import numpy as np
from signatureanalyzer.spectra import get_spectra_from_maf
from signatureanalyzer.utils import file_loader
MAF_TEST_FILE = "../../examples/example_luad_maf.tsv"
HG_FILE = "../../examples/hg19.2bit"
class TestSpectra(unittest.TestCase):
"""
Test Spectra C... | {"hexsha": "aad4f4cea5817e71236bf69ad1fb37017087a0d0", "size": 1532, "ext": "py", "lang": "Python", "max_stars_repo_path": "signatureanalyzer/tests/test_spectra.py", "max_stars_repo_name": "julianhess/getzlab-SignatureAnalyzer", "max_stars_repo_head_hexsha": "7f3ce93285c2aaaca88e82fee5a24854c224b453", "max_stars_repo_l... |
from autogluon.tabular_to_image import ImagePredictions,as Task
import autogluon.core as ag
import os
import pandas as pd
import numpy as np
def test_task():
dataset, _, test_dataset = Task.Dataset.from_folders('https://autogluon.s3.amazonaws.com/datasets/shopee-iet.zip')
model_list = Task.list_models()
p... | {"hexsha": "d9c199cacefde11ae9417d2585b72c105502057f", "size": 1436, "ext": "py", "lang": "Python", "max_stars_repo_path": "tabular_to_image/tests/unittests/test_image_regression.py", "max_stars_repo_name": "engsarah2050/autogluon", "max_stars_repo_head_hexsha": "a77d462924dac8f8763635518eadcc523a23e18f", "max_stars_re... |
[STATEMENT]
lemma normalize_raise [simp]:
"normalize (raise f) = raise f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Language.normalize (raise f) = raise f
[PROOF STEP]
by (simp add: raise_def) | {"llama_tokens": 78, "file": "Simpl_Language", "length": 1} |
module Cats.Category.Base where
open import Level
open import Relation.Binary using
(Rel ; IsEquivalence ; _Preserves_⟶_ ; _Preserves₂_⟶_⟶_ ; Setoid)
open import Relation.Binary.EqReasoning as EqReasoning
import Cats.Util.SetoidReasoning as SetoidR
record Category lo la l≈ : Set (suc (lo ⊔ la ⊔ l≈)) where
infix... | {"hexsha": "4eaace3e68c9258d5a49116998fdead0449eb4fb", "size": 1467, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cats/Category/Base.agda", "max_stars_repo_name": "alessio-b-zak/cats", "max_stars_repo_head_hexsha": "a3b69911c4c6ec380ddf6a0f4510d3a755734b86", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
'''
Summary
-------
1. Select best hyperparameters (alpha, beta) of linear regression via a grid search
-- Use the LIKELIHOOD function of MAPEstimator on heldout set (average across K=5 folds).
2. Plot the best likelihood found vs. polynomial feature order.
-- Normalize scale of reported probabilities by dividing by th... | {"hexsha": "447998271ae08b5b167557918c0a0740239ef4df", "size": 4277, "ext": "py", "lang": "Python", "max_stars_repo_path": "cp2/src/run_grid_search_to_maximize_likelihood_on_5fold_heldout.py", "max_stars_repo_name": "leimao007/cs136-22s-assignments", "max_stars_repo_head_hexsha": "4336dcf31c7a5a0105e2c2d057064ba9551401... |
const ybard = [1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1,
3.5e-1, 3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1,
1.34e0, 2.10e0, 4.39e0]
const bard = let res_init=zeros(15), jac_init=zeros(15,3), x_init=[1.0, 1.0, 1.0]
function res(x, r)
for i = 1:15
u = Float64(i)
... | {"hexsha": "47b7ca63a4fe90af92e2aa0acc562f3b56a9fbbb", "size": 1072, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/optests/bard.jl", "max_stars_repo_name": "macd/NL2sol.jl", "max_stars_repo_head_hexsha": "f4826f62438c960404aa59d0c620bd7d158440d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "... |
import cv2
import numpy as np
import imutils
def group_countours(cnts, epsilon=0.1):
"""
Merge multiple contours into a single bounding rectangle using `epsilon`
Args:
cnts (list of contours):
List of countours to be merged.
epsilon (float, optional):
Value decidin... | {"hexsha": "5c387ebd439493fdb9b7aecf5cc24dfcc14f09b2", "size": 11608, "ext": "py", "lang": "Python", "max_stars_repo_path": "boxdetect/rect_proc.py", "max_stars_repo_name": "lukelu0520/boxdetect", "max_stars_repo_head_hexsha": "6a079e38a279f152f5c6cb0f0934e8620f0224ef", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import sys
import numpy as np
import openmoc
# For Python 2.X.X
if sys.version_info[0] == 2:
from log import py_printf
import checkvalue as cv
# For Python 3.X.X
else:
from openmoc.log import py_printf
import openmoc.checkvalue as cv
class IRAMSolver(object):
"""A Solver which uses a Krylov sub... | {"hexsha": "f63af1ceae14d93b0254cfc0ad10d6f07b9cc94a", "size": 9690, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmoc/krylov.py", "max_stars_repo_name": "geogunow/OpenMOC", "max_stars_repo_head_hexsha": "b09e66be269703ca0a08d7a6afced1bc5984112a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
function test_window_functions()
try SPTK.Cwindow(0) catch @test false end
try SPTK.Cwindow(5) catch @test false end
@test_throws ArgumentError SPTK.Cwindow(-1)
@test_throws ArgumentError SPTK.Cwindow(6)
println("test windows functions")
srand(98765)
x = rand(1024)
for f in [blackman, ... | {"hexsha": "2712bdaaedbef97c9e65e0eb3f59893543839007", "size": 680, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/window.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SPTK.jl-877fce51-0832-5d5d-b749-dff746d2f7eb", "max_stars_repo_head_hexsha": "c5b7c3bb3d974d70eeafbb5cc051deed57b8cee5", "max_... |
import unittest
import numpy as np
from jina.executors.crafters.numeric.io import ArrayStringReader, ArrayBytesReader
from tests import JinaTestCase
class MyTestCase(JinaTestCase):
def test_array_reader(self):
size = 8
sample_array = np.random.rand(size).astype('float32')
text = ','.join(... | {"hexsha": "dee64ac77044088f97692d25788e8a6fdb0cb5d8", "size": 1738, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/executors/crafters/numeric/test_io.py", "max_stars_repo_name": "YueLiu-jina/jina", "max_stars_repo_head_hexsha": "f3e860313f26edc6d9f6e6ecc74cf6c2a3c65bff", "max_stars_repo_licenses": [... |
import abc
import inspect
import os
import re
from collections import UserDict
import kwant
import numpy as np
import pandas as pd
import yaml
from scipy.constants import physical_constants as phys_const
# General constants and globals
constants = {
"m_0": phys_const["electron mass energy equivalent in MeV"][0] *... | {"hexsha": "86b53f0a44d5e59c64995b2abfb02e195966d882", "size": 6806, "ext": "py", "lang": "Python", "max_stars_repo_path": "semicon/parameters.py", "max_stars_repo_name": "quantum-tinkerer/semicon", "max_stars_repo_head_hexsha": "3b4fc8c3f9a25553fc181a4cb9e5e4109c59a5e2", "max_stars_repo_licenses": ["BSD-2-Clause"], "m... |
# pylint: disable=R,C,E1101
import torch
import torch.cuda
import numpy as np
from string import Template
from functools import lru_cache
from s2cnn.utils.decorator import cached_dirpklgz
# s2_ft.py
def s2_rft(x, b, grid):
"""
Real Fourier Transform
:param x: [..., beta_alpha]
:param b: output bandwid... | {"hexsha": "11aba95785dd11b0cfbc92998d587dfe727aa389", "size": 15770, "ext": "py", "lang": "Python", "max_stars_repo_path": "s2cnn/s2_op.py", "max_stars_repo_name": "iJinjin/s2cnn", "max_stars_repo_head_hexsha": "b014826290ca970751e33a917a46bc313f686317", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
! { dg-do run }
! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } }
program main
use openacc
implicit none
integer, parameter :: N = 32
real, allocatable :: a(:), b(:), c(:)
integer i
i = 0
allocate (a(N))
allocate (b(N))
allocate (c(N))
a(:) = 3.0
b(:) = 0.0
!$acc parallel copy... | {"hexsha": "e6ab78dc047eb5b09e542db5bf22da013a78818a", "size": 5885, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/libgomp/testsuite/libgomp.oacc-fortran/clauses-1.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a43898c", "... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define COMPEARTH_PRIVATE_UPDOWN_ARGSORT3 1
#define COMPEARTH_PRIVATE_UPDOWN_ABS_ARGSORT3 1
#include "compearth.h"
#ifdef COMPEARTH_USE_MKL
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#pragma clang diag... | {"hexsha": "a482b409c82ac97ff02a4a960b2d7b78bef2c6f2", "size": 5574, "ext": "c", "lang": "C", "max_stars_repo_path": "c_src/CMTdecom.c", "max_stars_repo_name": "OUCyf/mtbeach", "max_stars_repo_head_hexsha": "188058083602cebf1471ea88939b07999c90b655", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9.0, "max_star... |
##########################
#
# Actions used by world (with noise) and agent (without noise)
#
##########################
import math
import copy
import numpy as np
from tools import action as act
from state import State
from naoth.math2d import Vector2 as Vec
class Actions:
# TODO: cleanup
"""
all avai... | {"hexsha": "c760fe6be866bb7e27968ba72e7c67989d191365", "size": 10829, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/py/RL_ActionSelection/env_0/actions.py", "max_stars_repo_name": "BerlinUnited/NaoTH", "max_stars_repo_head_hexsha": "02848ac10c16a5349f1735da8122a64d601a5c75", "max_stars_repo_licenses": ["... |
# Julia wrapper for header: /usr/include/libavcodec/mediacodec.h
# Automatically generated using Clang.jl wrap_c, version 0.0.0
export
av_mediacodec_alloc_context,
av_mediacodec_default_init,
av_mediacodec_default_free,
av_mediacodec_release_buffer,
av_mediacodec_render_buffer_at_time
function a... | {"hexsha": "c757724559b62bec9c35a3d71abf8220817378dc", "size": 1144, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ffmpeg/AVCodecs/v58/mediacodec.jl", "max_stars_repo_name": "jonathan-durbin/VideoIO.jl", "max_stars_repo_head_hexsha": "0cf8d7eca3dc5c9f04dd86f2ac5217e253da36c7", "max_stars_repo_licenses": ["M... |
# Copyright (c) 2022, 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 appli... | {"hexsha": "7591a9b51e582735aebda20c3cb5605cc71d6913", "size": 16348, "ext": "py", "lang": "Python", "max_stars_repo_path": "nemo/collections/asr/models/k2_aligner_model.py", "max_stars_repo_name": "hamjam/NeMo", "max_stars_repo_head_hexsha": "b3484d32e1317666151f931bfa39867d88ed8658", "max_stars_repo_licenses": ["Apac... |
# -*- coding: utf-8 -*-
# pylint#: disable=C0103
"""
http://slideplayer.com/slide/3330177/
"""
import os
from datetime import date
from struct import pack
import numpy as np
from numpy import (array, zeros, ones, arange,
searchsorted, diag)
from numpy.linalg import solve # type: ignore
import scip... | {"hexsha": "4d94c5d3917f9d21a4d78c0b36e713b2d55c3140", "size": 90661, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNastran/dev/bdf_vectorized/solver/solver.py", "max_stars_repo_name": "SteveDoyle2/pynastran", "max_stars_repo_head_hexsha": "14798312ac0419857ce030ee367f924b4924f9fd", "max_stars_repo_licenses"... |
import pandas as pd
import numpy as np
from scipy.stats import poisson
from utils import odds, clean_sheet, score_mtx
from ranked_probability_score import ranked_probability_score, match_outcome
class SPI:
""" Class for the FiveThirtyEight Soccer Power Index. """
def __init__(self, games):
"""
... | {"hexsha": "e330584f2ffd0a827db937f3f96e581ee27a843f", "size": 2940, "ext": "py", "lang": "Python", "max_stars_repo_path": "modeling/fixtures/spi.py", "max_stars_repo_name": "Fournierp/FPL", "max_stars_repo_head_hexsha": "6210c6ab9d872b46a10804ba8ee9f5d0df735308", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
# NanoSciTracker - 2020
# Author: Luis G. Leon Vega <luis@luisleon.me>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to ... | {"hexsha": "9768510e4875cdf3c5e589893b1075faf579ba99", "size": 7446, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/LocalTracker/detector.py", "max_stars_repo_name": "lleon95/NanoSciTracker-Python", "max_stars_repo_head_hexsha": "f682c1f3b9b9f76a6de8ea816df910715539edf1", "max_stars_repo_licenses": ["Apache... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 24 09:37:08 2019
@author: wangpeiyu
"""
import csv
import re
import time
import json
import pickle
import warnings
import random
import numpy as np
np.set_printoptions(threshold=1)
from nltk.tokenize import RegexpTokenizer
from nltk.stem.porter im... | {"hexsha": "431fde884333f70bc96d949f1d545fbc57dfa7f0", "size": 4581, "ext": "py", "lang": "Python", "max_stars_repo_path": "Assignments/Applied Machine Learning for Analytics/HW5/centroid.py", "max_stars_repo_name": "oliviapy960825/oliviapy960825.github.io", "max_stars_repo_head_hexsha": "7a07fd0887e5854b0b92e4cc8e20ff... |
# An MTR is an MTRBasis together with a coefficient vector
# note this is an MTR for one treatment arm (d = 0 or d = 1)
# so in practice we are carrying around 2 element tuples of MTR objects
#
# θ[j,k] corresponds to a_{j}(z)b_{k}(u)
@with_kw struct MTR
basis::MTRBasis
θ::Matrix{<:Real} # coefficient vecto... | {"hexsha": "0b72aeffd5652a4f36c6106513ffa6935ab28ecc", "size": 1043, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mtr.jl", "max_stars_repo_name": "omkarakatta/MarginalTreatmentEffectsWithMultipleInstruments.jl", "max_stars_repo_head_hexsha": "8bc8a7f42817fa3fcc45b6b9a78aaaa11b3092bb", "max_stars_repo_licen... |
from __future__ import print_function, division
import argparse
import os
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
from torch.autograd import Variable
import torchvision.utils as vutils
import torch.nn.functional... | {"hexsha": "915a23f039e374059abb0c7799db3ea5ead5dd19", "size": 3663, "ext": "py", "lang": "Python", "max_stars_repo_path": "save_disp.py", "max_stars_repo_name": "Comet2dh/Baseline_gwc_112", "max_stars_repo_head_hexsha": "ef3efd75ee161086cda26eb92a3ef1c34dc3d58d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma Matrix_row_is_Legacy_row:
assumes "i < dim_row A"
shows "Matrix.row A i = vec_of_list (row (mat_to_cols_list A) i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Matrix.row A i = vec_of_list (Matrix_Legacy.row (mat_to_cols_list A) i)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgo... | {"llama_tokens": 1395, "file": "Isabelle_Marries_Dirac_Tensor", "length": 9} |
(* Author: Sébastien Gouëzel sebastien.gouezel@univ-rennes1.fr
License: BSD
*)
section \<open>Subadditive and submultiplicative sequences\<close>
theory Fekete
imports "HOL-Analysis.Multivariate_Analysis"
begin
text \<open>A real sequence is subadditive if $u_{n+m} \leq u_n+u_m$. This implies the
convergen... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/Ergodic_Theory/Fekete.thy"} |
from sklearn.preprocessing import StandardScaler
from scipy.special import comb
from .linear import find_linear_projections
from .axis_aligned import find_axis_aligned
from .evidence import compute_evidence
from .precision_recall import histogram
from .utils import make_basis
def optimal(X, objective, normalize=True... | {"hexsha": "8489ea8fc7b5092b3c4cd1966a5b1ade591d0eae", "size": 1161, "ext": "py", "lang": "Python", "max_stars_repo_path": "axisproj/optimal.py", "max_stars_repo_name": "yarden-livnat/axisproj", "max_stars_repo_head_hexsha": "b3375ced14721ad5e3613b6a26b8d94cc24c6436", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
include "parse-error.fpp"
| {"hexsha": "063df016e4d67c0c22b9aa12ff8868aedf043c71", "size": 26, "ext": "fpp", "lang": "FORTRAN", "max_stars_repo_path": "compiler/tools/fpp-syntax/test/include-parse-error.fpp", "max_stars_repo_name": "kevin-f-ortega/fpp", "max_stars_repo_head_hexsha": "ee355fc99eb8040157c62e69f58ac6a8435cd981", "max_stars_repo_lice... |
from abc import ABCMeta, abstractmethod, abstractproperty
from collections import Iterable
import logging
import numpy as np
try:
import scipy
import scipy.interpolate
import scipy.linalg
SCIPY_FLAG = True
except Exception:
SCIPY_FLAG = False
from .fourier_fitting import FourierFit
log = logg... | {"hexsha": "6780b4855b0aa9e1a3f2b063110741206f62c863", "size": 10349, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/westpa/westext/stringmethod/string_method.py", "max_stars_repo_name": "jdrusso/westpa", "max_stars_repo_head_hexsha": "676fdafe23b4ae8229d311b01df051ecde5b331c", "max_stars_repo_licenses": ["... |
#pragma once
#include <boost/iostreams/device/mapped_file.hpp>
#include <sys/mman.h>
#include "utils/parsers.hpp"
#include "utils/util_types.hpp"
namespace tongrams {
struct text_lines {
text_lines(const char* filename) : m_pos(0), m_num_words(0), m_eol(false) {
m_file.open(filename);
if (!m_fil... | {"hexsha": "2bb997121b69b5b350f7cc209812511811aa73dc", "size": 3656, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/utils/iterators.hpp", "max_stars_repo_name": "jermp/tongram", "max_stars_repo_head_hexsha": "97f72a5b7a76b40d5a83b55e828ee44e76a305ad", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
[STATEMENT]
lemma SeqQuoteP_Mem_imp_QMem_and_Subset:
assumes "atom i \<sharp> (j,j',i',si,ki,sj,kj)" "atom i' \<sharp> (j,j',si,ki,sj,kj)"
"atom j \<sharp> (j',si,ki,sj,kj)" "atom j' \<sharp> (si,ki,sj,kj)"
"atom si \<sharp> (ki,sj,kj)" "atom sj \<sharp> (ki,kj)"
shows "{SeqQuoteP (Var i) (Var i... | {"llama_tokens": 292450, "file": "Goedel_HFSet_Semanticless_Quote", "length": 232} |
function issingular_convert!(A)
rows, columns = size(A)
for k in 1:columns
imax = findMaxAbsInColumn(A, k)
column_to_zeroes!(A, k, imax)
if A[k, k] == 0
return false
end
end
return true
end
function det(A)
isntDegenerate = issingular_convert!(A)
if i... | {"hexsha": "793ef973b0d4a3c10cd2eca62981d340319b7a4d", "size": 511, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "task_9_8.jl", "max_stars_repo_name": "Litger45/julia-algorithms-2", "max_stars_repo_head_hexsha": "ff8f650b314cc920e0d35238509a0838d4b0a5ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import numpy as np
import sys, os
sys.path.insert(0, '/app/pysource')
from models import Model
from sources import RickerSource, TimeAxis, Receiver
from propagators import *
import segyio as so
from scipy import interpolate, ndimage
from AzureUtilities import read_h5_model, write_h5_model, butter_bandpass_filter, butte... | {"hexsha": "4c103eacb51f692756efe5cf9afa71813286a989", "size": 7314, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/overthrust_3D_limited_offset.py", "max_stars_repo_name": "slimgroup/Azure2019", "max_stars_repo_head_hexsha": "800d3d84883c6e231b62d757526d34f7893499bc", "max_stars_repo_licenses": ["MIT"]... |
[STATEMENT]
lemma nsqn\<^sub>r_lte_dsn [simp]:
"\<And>dsn dsk flag hops nhip pre. nsqn\<^sub>r (dsn, dsk, flag, hops, nhip, pre) \<le> dsn"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>dsn dsk flag hops nhip pre. nsqn\<^sub>r (dsn, dsk, flag, hops, nhip, pre) \<le> dsn
[PROOF STEP]
unfolding nsqn\<^sub>r_d... | {"llama_tokens": 320, "file": "AODV_variants_b_fwdrreps_B_Fresher", "length": 2} |
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <sstream> // stringstream
// evil hack to allow testing of private and protected data
#define private public
#define protected public
#include "niflib.h"
#include "obj/NiNode.h"
#include "obj/NiSkinInstance.h"
#include ... | {"hexsha": "2a8f8b70517836de643b354b8a3c346fad0f0e19", "size": 2122, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/skin_test.cpp", "max_stars_repo_name": "BlazesRus/niflib", "max_stars_repo_head_hexsha": "7e8efb6b2c73a3410135dbd6d73694e29f1e9ce8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
# -*- coding:utf-8 -*-
"""
Description: A python 2.7 implementation of gcForest proposed in [1]. A demo implementation of gcForest library as well as some demo client scripts to demostrate how to use the code. The implementation is flexible enough for modifying the model or
fit your own datasets.
Reference: [1] Z.-H. ... | {"hexsha": "6adf8bc5eec22a0288b206954b954a8655a82038", "size": 7995, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/atecml/gcforest/layers/fg_win_layer.py", "max_stars_repo_name": "ogotaiking/anti_ml", "max_stars_repo_head_hexsha": "bb40f75c918e20c49f27ce54029bc293a2d17f85", "max_stars_repo_licenses": ["MIT... |
program test_caete
! Um exemplo de arquivo para debug o código em fortran. O que esse teste faz é chamar a budget.f90,
! o que se pode fazer é colocar um breakpoint em algum lugar da budget e em seguida rodar esse arquivo.
use types
use global_par
use photo
use water
use soil_dec
use budget
... | {"hexsha": "ffd20d50f19b968fedfd18a73cff4d78b44d30f5", "size": 7509, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Example Files/debug_caete.f90", "max_stars_repo_name": "fmammoli/CAETE-Tutorials", "max_stars_repo_head_hexsha": "c2c7ee4ff8351ddf6ec38515dbc85150f645533e", "max_stars_repo_licenses": ["MIT"], "... |
import backend_cust_svg
import pdb
import re
import numpy
import matplotlib.pyplot as plt
import common_tools as ct
import matplotlib.cm
import matplotlib as mpl
mpl.rcParams['font.size'] = 10
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.serif'] = ['Times']
mpl.rcParams['text.usetex'] = True
# mpl.rcParam... | {"hexsha": "282a28d14766db46067a0a2a88fee48267c98b40", "size": 71743, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/plotting_tools.py", "max_stars_repo_name": "zliobaite/patterns_compex", "max_stars_repo_head_hexsha": "6abe29294b6d1086db74c813506b84de861ca0ba", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma valid_Tree\<^sub>\<alpha>_eqvt (*[eqvt]*):
assumes "valid_Tree\<^sub>\<alpha> P t" shows "valid_Tree\<^sub>\<alpha> (p \<bullet> P) (p \<bullet> t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. valid_Tree\<^sub>\<alpha> (p \<bullet> P) (p \<bullet> t)
[PROOF STEP]
using assms
[PROOF STATE]
pr... | {"llama_tokens": 202, "file": "Modal_Logics_for_NTS_Validity", "length": 2} |
[STATEMENT]
lemma const_vector_cart:"((\<chi> i. d)::real^'n) = (\<Sum>i\<in>Basis. d *\<^sub>R i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<chi>i. d) = sum ((*\<^sub>R) d) Basis
[PROOF STEP]
by (rule vector_cart) | {"llama_tokens": 106, "file": null, "length": 1} |
import logging
import cv2
import constants
import os
import shutil
import numpy as np
from tqdm import tqdm
from Isolator.isolator import Isolator
class Tester:
def __init__(self, model_obj, model_name):
model_path = '{}{}.h5'.format(constants.MODEL_DIR, model_name)
model_obj.create_model(weights... | {"hexsha": "789681884168452077e44125831dbd3a3597e45c", "size": 5779, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tester/tester.py", "max_stars_repo_name": "FabianGroeger96/cnn-number-detection", "max_stars_repo_head_hexsha": "82c34255f45e0d65f9d64e3a291dccf9e3a0a0ae", "max_stars_repo_licenses": ["MIT"], "max... |
import streamlit as st
import pickle
import pandas as pd
import numpy as np
import datetime
import time
import emoji
def main():
e =emoji.emojize(":grinning_face_with_big_eyes:")
st.title("Flight-Price-Prediction")
st.write(" *--Built using StreamLit--* ")
st.write(e)
st.sidebar.subheader("Sele... | {"hexsha": "2ee9d59ed593ecba20c1e7c81de21201c27577c8", "size": 4441, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "BaffledCoder/Predictor02", "max_stars_repo_head_hexsha": "c8b170fea8a1cd5502b2e86502c6c3ee7f97de59", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
#ckwg +28
# Copyright 2015 by Kitware, Inc. All Rights Reserved. Please refer to
# 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 copyrig... | {"hexsha": "96056472f55891f54a177bdec59cb19df45ce301", "size": 2990, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/homography_io.py", "max_stars_repo_name": "kevinsmia1939/TeleSculptor", "max_stars_repo_head_hexsha": "88f50a65d20a02a692900259dab15ed83f69bad4", "max_stars_repo_licenses": ["BSD-3-Clause"... |
C %W% %G%
subroutine solfl(a)
C
C This subroutine calculates the field voltage for IEEE model FL
C
inc... | {"hexsha": "82e6c5d164ed7044e49a59c5e1ce6194f95546d2", "size": 7726, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "libtsp/solfl.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14,... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from ..data.preprocessing import Preprocessor
from ..features.build_features import FeatureBuilder
from ..utils.logger import Logger
from ..features.outliers import Outliers
from .model_factory import ModelFactory
def find_best_result(df: pd.DataF... | {"hexsha": "e1a4d234c81d631d455e49acaaf534634d7d2d5c", "size": 2572, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/train_model.py", "max_stars_repo_name": "ropali/used_bike_price_prediction", "max_stars_repo_head_hexsha": "58232e5631380df93f509d6a6b5c2f364f376e15", "max_stars_repo_licenses": ["MIT"]... |
import os
import unittest
import numpy as np
import shutil
from pylipid.util import check_dir
from pylipid.plot import plot_corrcoef
class TestPlot2d(unittest.TestCase):
def setUp(self):
file_dir = os.path.dirname(os.path.abspath(__file__))
self.save_dir = os.path.join(file_dir, "test_plot1d")
... | {"hexsha": "3993fbca05cd1df3597e3e6b774ab5461a53ee31", "size": 1140, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/plots/test_plot_2d.py", "max_stars_repo_name": "pstansfeld/PyLipID", "max_stars_repo_head_hexsha": "1dc79e5046c68952b6062e6029c95c9eb116aa6c", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
""" Feature extractors for question classification """
from os import path, listdir
from itertools import chain, product
import numpy as np
from nltk import pos_tag
# from nltk.tag.stanford import NERTagger
from sklearn.base import BaseEstimator
from sklearn.feature_extraction.text import TfidfVectorizer, CountVector... | {"hexsha": "ef42ed1f6ccac3a19874de4d16bcd9904667e871", "size": 14614, "ext": "py", "lang": "Python", "max_stars_repo_path": "inquire/classification/features.py", "max_stars_repo_name": "rebeccabilbro/inquire", "max_stars_repo_head_hexsha": "ff47ff46add727a10f14d801ea924d4b0ece6805", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from __future__ import print_function
from typing import Dict, Callable, Optional, List, Tuple, Union
from collections import defaultdict, Counter
import os, sys, ... | {"hexsha": "7983a7ea9e7508d1624a6d2682db4d04d6ea7620", "size": 10919, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/transform.py", "max_stars_repo_name": "s-mizuki-nlp/semantic_specialization", "max_stars_repo_head_hexsha": "4d00a461f18828ee8ebaccf7c737a32ccc11809f", "max_stars_repo_licenses": ["Apache... |
# coding=utf-8
# Copyright 2021 The Trax Authors.
#
# 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 a... | {"hexsha": "863dc00b34f1f36271962ace5f08072f7a68b14d", "size": 15798, "ext": "py", "lang": "Python", "max_stars_repo_path": "trax/optimizers/trainer_test.py", "max_stars_repo_name": "Dithn/trax", "max_stars_repo_head_hexsha": "c6513908602e934e5472f299851d84a53c8afcff", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
import pandas as pd
import numpy as np
import pytest
from .resample_datetime_index_mean import main
def test_date():
pd.testing.assert_series_equal(
main(
data=pd.Series(
{
"2019-08-01T15:20:10": 0.0,
"2019-08-01T15:20:11": 1.0,
... | {"hexsha": "97540aa31fd6f2591e03bdd5cb344b86545339ee", "size": 2166, "ext": "py", "lang": "Python", "max_stars_repo_path": "runtime/components/Time_length_operations/test_resample_datetime_index_mean.py", "max_stars_repo_name": "ulise/hetida-designer", "max_stars_repo_head_hexsha": "a6be8eb45abf950d5498e3ca756ea1d2e46b... |
# Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016
# Original license text is below
# BSD 2-Clause License
#
# Copyright (c) 2016, Bichen Wu
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
... | {"hexsha": "13cffa35871c31775df1c37533f7745e716ed1aa", "size": 19890, "ext": "py", "lang": "Python", "max_stars_repo_path": "program/squeezedet/continuous.py", "max_stars_repo_name": "TITAN-PyCompat/ck-tensorflow", "max_stars_repo_head_hexsha": "6e42c2dc7a98ced05c2e74990b215407f06b542b", "max_stars_repo_licenses": ["BS... |
#! /usr/bin/env python
#Exercise C.2
import numpy as np
def solve(q,dt):
"""Takes in q degree of function, dt time change. Solves
the nonlinear ODE u'(t) = u^q(t). Returns
an array of t_i and u_i."""
if (q == 1):
def u(t): return (np.exp(t))
T = 6
elif (q != 1):
def u(t): ... | {"hexsha": "95aae03e2fc094119cd11d944fadf087f4d74075", "size": 787, "ext": "py", "lang": "Python", "max_stars_repo_path": "nonlinear_ODE.py", "max_stars_repo_name": "chapman-phys220-2016f/cw-07-saktill", "max_stars_repo_head_hexsha": "e6456e66bbb1b7ce338f231d57131c56a39489b1", "max_stars_repo_licenses": ["MIT"], "max_s... |
import numpy as np
import scipy.fft as fft
def IRIS_SG_deconvolve(data_in, psf,
iterations=10,
fft_div=False):
'''
Graham S. Kerr
July 2020
NAME: IRIS_SG_Deconvolve.py
PURPOSE: Deconvolves IRIS SG data using the PSFs from Courrier et al 2018.... | {"hexsha": "ce761a0faee4e9021f4b0a20f04705b9c54ec6fa", "size": 4498, "ext": "py", "lang": "Python", "max_stars_repo_path": "irispreppy/psf/IRIS_SG_deconvolve.py", "max_stars_repo_name": "OfAaron3/irispreppy", "max_stars_repo_head_hexsha": "a826c6cffa4d7ac76f28208dc71befc8601424d2", "max_stars_repo_licenses": ["MIT"], "... |
[STATEMENT]
lemma fpxs_val_diff_ge:
assumes "f \<noteq> g"
shows "fpxs_val (f - g) \<ge> min (fpxs_val f) (fpxs_val g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. min (fpxs_val f) (fpxs_val g) \<le> fpxs_val (f - g)
[PROOF STEP]
using fpxs_val_add_ge[of f "-g"] assms
[PROOF STATE]
proof (prove)
using this:... | {"llama_tokens": 266, "file": "Formal_Puiseux_Series_Formal_Puiseux_Series", "length": 2} |
import numpy as np
from fastNLP import DataSet
from fastNLP.io import CTBLoader, CWSLoader, MsraNERLoader
def fastHan_CWS_Loader(url,chars_vocab,label_vocab):
ds={'raw_words':[],'words':[],'target':[],'seq_len':[],'task_class':[]}
#read file
with open(url, 'r', encoding='utf-8') as f:
for line in ... | {"hexsha": "b746d7a8673fdcbf450347627906930626727582", "size": 11613, "ext": "py", "lang": "Python", "max_stars_repo_path": "fastHan/model/finetune_dataloader.py", "max_stars_repo_name": "ishine/fastHan", "max_stars_repo_head_hexsha": "09550a750bb06b89b81769b8786a7eb3f8ca5713", "max_stars_repo_licenses": ["Apache-2.0"]... |
#####################################################################################
## CTC-34: Autômata e Linguagens Formais ##
## Prof. Forster ##
## ... | {"hexsha": "b6b28f2d9fa8972736db20974978ff495b430654", "size": 4599, "ext": "py", "lang": "Python", "max_stars_repo_path": "Questao3.py", "max_stars_repo_name": "gitoso/CTC-234", "max_stars_repo_head_hexsha": "38a42b51d42d529285fee2786bbe8228ef85cd60", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
from __future__ import division
import itertools
import os
import numpy as np
def batch(iterable, n):
it = iter(iterable)
while True:
chunk = tuple(itertools.islice(it, n))
if not chunk:
return
yield chunk
def build_grid(shape):
r"""
"""
shape = np.asarray(sha... | {"hexsha": "9b92530c08c2b597e760517fa37ca49648077cf3", "size": 1123, "ext": "py", "lang": "Python", "max_stars_repo_path": "DeepAlignmentNetwork/menpofit/base.py", "max_stars_repo_name": "chiawei-liu/DeepAlignmentNetwork", "max_stars_repo_head_hexsha": "52621cd2f697abe372b88c9ea0ee08f0d93b43d8", "max_stars_repo_license... |
using BackwardsLinalg
using Random
using Test
@testset "symeigen real" begin
A = randn(4,4)
A = A+A'
op = randn(4, 4)
op += op'
function f(A)
E, U = symeigen(A)
E |> sum
end
function g(A)
E, U = symeigen(A)
v = U[:,1]
(v'*op*v)[]|>real
end
@te... | {"hexsha": "845944a9a8ae42bcffe0a85eac8cfe9d74bebc32", "size": 759, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/eigen.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/BackwardsLinalg.jl-442b4e1a-8b9d-11e9-03b0-f14b31742153", "max_stars_repo_head_hexsha": "60304c0d2cc97213a221cd6fa84225cd99fd2e... |
from typing import Tuple, List, Union, Optional
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import matplotlib.backends.backend_pdf
# %matplotlib inline
def _compute_nb_steps(power: float, dict_diff_steps: dict, vals: list,
min_val: fl... | {"hexsha": "ea130831c8bcf3e2a4ae1ce8005d07449f700426", "size": 21693, "ext": "py", "lang": "Python", "max_stars_repo_path": "wcs/kraus/__init__.py", "max_stars_repo_name": "raoulvm/wcs", "max_stars_repo_head_hexsha": "688562887db982deee215c1c78effa372d7211ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import numpy as np
try:
from numba import njit
NUMBA = True
except ImportError:
NUMBA = False
class MinCurve:
def __init__(
self,
md,
inc,
azi,
start_xyz=[0., 0., 0.],
unit="meters"
):
"""
Generate geometric data from a well bore surv... | {"hexsha": "01c55c4234dbeaee59ec9a90e185f92726e2e924", "size": 11323, "ext": "py", "lang": "Python", "max_stars_repo_path": "welleng/utils.py", "max_stars_repo_name": "mkamyab/welleng", "max_stars_repo_head_hexsha": "0ab73440e5ac3ad9a67d880658f9cdde33c0e0e7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
[STATEMENT]
lemma alternating_order2_cancel_2left:
"s+s=0 \<Longrightarrow> t+t=0 \<Longrightarrow>
sum_list (t # s # (alternating_list (Suc (Suc n)) s t)) =
sum_list (alternating_list n s t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>s + s = (0::'a); t + t = (0::'a)\<rbrakk> \<Longrightarr... | {"llama_tokens": 426, "file": "Buildings_Algebra", "length": 2} |
import numpy as np
import cv2
def projectOnEyes(image_src, window_name = "projectOnEyes"):
# Import the pre-trained models for face and eye detection
face_cascade = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
eye_cascade = cv2.CascadeClassifier("haarcascade_eye.xml")
# D... | {"hexsha": "0801a7fdf5825d45ceb7bb0bc736e6c4d2df3cbf", "size": 3780, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyEye.py", "max_stars_repo_name": "atudell/PyEye", "max_stars_repo_head_hexsha": "871098734ef7230750c489c9761fbcc5ba8788de", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "ma... |
theory Ex02
imports "~~/src/HOL/IMP/AExp"
"~~/src/HOL/Library/Monad_Syntax"
begin
(* Exercise 2.1 *)
fun subst :: "vname \<Rightarrow> aexp \<Rightarrow> aexp \<Rightarrow> aexp" where
"subst x e (N n) = (N n)"
| "subst x e (V y) = (if x = y then e else V y)"
| "subst x e (Plus n m) = Plus (subst x e n) (subst x ... | {"author": "glimonta", "repo": "Semantics", "sha": "68d3cacdb2101c7e7c67fd3065266bb37db5f760", "save_path": "github-repos/isabelle/glimonta-Semantics", "path": "github-repos/isabelle/glimonta-Semantics/Semantics-68d3cacdb2101c7e7c67fd3065266bb37db5f760/Exercise2/Ex02.thy"} |
import numba
import numpy as np
@numba.jit(nopython=True, nogil=True)
def NoTransform(value_in):
return value_in
@numba.jit(nopython=True, nogil=True)
def AbsValueTransform(value_in):
return np.abs(value_in)
# Interpret stats, turning any compound stats into individual stats.
# Takes a list of stat names ... | {"hexsha": "f7b06c0a4be6d785022892c0908e8421d694b47c", "size": 2441, "ext": "py", "lang": "Python", "max_stars_repo_path": "helios/plato/py/plato/backend/stat_expression.py", "max_stars_repo_name": "debjyoti0891/map", "max_stars_repo_head_hexsha": "abdae67964420d7d36255dcbf83e4240a1ef4295", "max_stars_repo_licenses": [... |
import numpy as np
import sys
import matplotlib.pyplot as plt
# params = np.load("data/ML_Reddit/tbip-fits/params/document_loc.npy")
mu = np.load("data/ML_Reddit-20-100-1000-200/tbip-fits/params/document_loc.npy")
sigma = np.load("data/ML_Reddit-20-100-1000-200/tbip-fits/params/document_scale.npy")
result = np.exp((mu... | {"hexsha": "cc161c298ac3fd14f9529d195f5573f07843ad78", "size": 3443, "ext": "py", "lang": "Python", "max_stars_repo_path": "param_viewer.py", "max_stars_repo_name": "BabakHemmatian/tbip", "max_stars_repo_head_hexsha": "4edfc2bf304d7c045bac009057a70c1af5911910", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
\documentstyle[11pt]{article}
\setlength{\parindent}{0.0in}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0.0in}
\pagestyle{headings}
\begin{document}
{\Large \bf Title }\\
{\tt [ Python Module : swig ] }\\
This is a title comment
\\{\tt \bf foo(int ) }
\\
\makebox[0.5in]{}\begin{minipage}[t]{6in}
{\... | {"hexsha": "001ab9ea6995f1cab9f5b44eea81921e0e702a1a", "size": 3518, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "OOFSWIG/Tests/Doc/before_regr.tex", "max_stars_repo_name": "usnistgov/OOF3D", "max_stars_repo_head_hexsha": "4fd423a48aea9c5dc207520f02de53ae184be74c", "max_stars_repo_licenses": ["X11"], "max_stars... |
import numpy as np
class PostProcessSingleMolecule(object):
def __init__(self):
self.column_names = open("column_names").readlines()[0].split()
self.mean_trajectory = np.loadtxt("mean_traj")
self.lf_indices = self.find_indices("Lf")
self.ls_indices = self.find_indices("Ls")
... | {"hexsha": "96ce62a3fecf557a5d4c4037d72b71b11d0c5e12", "size": 1138, "ext": "py", "lang": "Python", "max_stars_repo_path": "unorganized_code/kp_sm_post_process.py", "max_stars_repo_name": "rganti/Channel_Capacity_T_Cell", "max_stars_repo_head_hexsha": "62b9cba7a4248287598d06c010dcfcc4601a7006", "max_stars_repo_licenses... |
#-----------------------------------#
#### UBeTube Processing R Script ####
## Script can be used to process UBeTube data. See UBeTube_Processing_Guide.pdf for detailed instructions.
## By: Justin Johnson - University of Arizona
## 2020-09-21
# Load necessary packages
#install.packages(readxl)
#install... | {"hexsha": "e07426ef4bc7456e24cddfdcba22b9a06ef87a73", "size": 4174, "ext": "r", "lang": "R", "max_stars_repo_path": "UBeTube_Processing.r", "max_stars_repo_name": "justincjohnson2/UBeTube", "max_stars_repo_head_hexsha": "3e446b9d02224d66e2f94231bb674e80acd2b18f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
Require Import Coq.ZArith.ZArith.
Require Import Coq.FSets.FMapPositive.
Require Import Coq.MSets.MSetPositive.
Require Import Coq.Lists.List.
Require Import Rewriter.Language.Language.
Require Import Rewriter.Language.UnderLets.
Require Import Rewriter.Language.IdentifiersLibrary.
Require Rewriter.Util.PrimitiveProd.
... | {"author": "mit-plv", "repo": "rewriter", "sha": "77c76a43689ce532921ccfa200b44083bc52dc21", "save_path": "github-repos/coq/mit-plv-rewriter", "path": "github-repos/coq/mit-plv-rewriter/rewriter-77c76a43689ce532921ccfa200b44083bc52dc21/src/Rewriter/Rewriter/Rewriter.v"} |
import tkinter
from tkinter import *
import numpy as np
import matplotlib.pyplot as plt
import tkinter.font as tkFont
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import time
import matplotlib.animation as animation
import math
##Begin Default Values
rSliderDefault = 3.3 #Slider for r's default v... | {"hexsha": "6172a7c3022412fea202344a97c5048b232c5f94", "size": 5326, "ext": "py", "lang": "Python", "max_stars_repo_path": "E37U Research/Lyapunov/Lyapunov GUI/Lyapunov GUI x0tolam.py", "max_stars_repo_name": "shaunramsey/FractalExploration", "max_stars_repo_head_hexsha": "a23424b6ae54fab8ff17e2de597d0dec01614254", "ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.