text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import os
import pandas as pd
import numpy as np
from zipfile import ZipFile
import urllib.request
from tempfile import mktemp
# Data needs to be saved outside of project folder
base_path = os.environ['HOMEPATH']
data_folder='data'
# URL to download the sentiment140 dataset
data_url='http://cs.stanford.ed... | {"hexsha": "34ec3dda99874170a0965ce06a04738a66f3d686", "size": 3192, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/01_data_acquisition_and_understanding/01_DataPreparation.py", "max_stars_repo_name": "maelcamerlynck/MachineLearningSamples-TwitterSentimentPrediction", "max_stars_repo_head_hexsha": "a03f251... |
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
# __author__ = 'zd'
import re
import numpy as np
def clean_str(sentence):
"""
清洗数据
:param sentence:
:return:
"""
sentence = re.sub(r"[^A-Za-z0-9(),!?\'\`]", " ", sentence)
sentence = re.sub(r"\'s", " \'s", sentence)
sentence = re.sub(r"\'ve", ... | {"hexsha": "7e2b6783b819518e63717bdbc9e6eddf46b2ef06", "size": 1640, "ext": "py", "lang": "Python", "max_stars_repo_path": "\u6587\u672c\u5206\u7c7b/rnn_binary/data_utils.py", "max_stars_repo_name": "zhangdddong/beautifulNLP", "max_stars_repo_head_hexsha": "295987cc03c9afb52008917d9d141fdb2eb66ba5", "max_stars_repo_lic... |
MODULE InitializationModule_Relativistic
USE KindModule, ONLY: &
DP, &
Zero, &
Half
USE ProgramHeaderModule, ONLY: &
ProgramName, &
nDOFX, &
nNodesX, &
iX_B0, &
iX_B1, &
iX_E0, &
iX_E1
USE MeshModule, ONLY: &
MeshX, &
NodeCoordinate
USE UtilitiesModule, ONLY: &
... | {"hexsha": "b111f2aaa70fde2489d1bc0478860fb842709783", "size": 11422, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "SandBox/GravitationalCollapse_CFA/InitializationModule_Relativistic.f90", "max_stars_repo_name": "endeve/thornado", "max_stars_repo_head_hexsha": "b156bb416ca438771955449ad198034b5ebfe39f", "ma... |
#!/usr/bin/python3
import numpy
import time
import scipy.optimize
from matplotlib import pylab
from frc971.control_loops.python import controls
dt = 0.05
def RungeKutta(f, x, dt):
"""4th order RungeKutta integration of F starting at X."""
a = f(x)
b = f(x + dt / 2.0 * a)
c = f(x + dt / 2.0 * b)
d = f(x + d... | {"hexsha": "fcb3129d5bc641c2750252a7afb97ebee361aa94", "size": 7414, "ext": "py", "lang": "Python", "max_stars_repo_path": "y2018/control_loops/python/arm_mpc.py", "max_stars_repo_name": "Ewpratten/frc_971_mirror", "max_stars_repo_head_hexsha": "3a8a0c4359f284d29547962c2b4c43d290d8065c", "max_stars_repo_licenses": ["BS... |
module FineShiftTests
using Test, FineShift, InterpolationKernels
function randu(T::Type{<:AbstractFloat}; max::Real=1, min::Real=0)
_min = T(min)
_max = T(max)
return (_max - _min)*rand(T) + _min
end
function randu(T::Type{<:AbstractFloat}, dims::Dims; max::Real=1, min::Real=0)
A = rand(T, dims)
... | {"hexsha": "fa338c50475a9b26821b37bd65f0016aa0193d79", "size": 5162, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "emmt/FineShift.jl", "max_stars_repo_head_hexsha": "efff6fdb4be91a8510b67f04be6fee0e4b11f141", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "m... |
import unittest
import numpy
import chainer
from chainer import cuda
from chainer.testing import attr
from deepmark_chainer.net import inception_v3
class TestInceptionV3(unittest.TestCase):
def setUp(self):
self.x = numpy.random.uniform(-1, 1, (1, 3, 299, 299)).astype(numpy.float32)
self.l = i... | {"hexsha": "a8e6cb31c68f956bf817605572219171241af7e5", "size": 623, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/net_tests/test_inception_v3.py", "max_stars_repo_name": "delta2323/chainer-deepmark", "max_stars_repo_head_hexsha": "8147f5169cab06ad8c66a599663f4f0671e5180b", "max_stars_repo_licenses": ["MI... |
#!/usr/bin/env python3
import argparse
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.datasets as dset
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
import torchvision.models... | {"hexsha": "68d68463abf92a629d71f1fd4b280146ae652a44", "size": 835, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute-cifar10-mean.py", "max_stars_repo_name": "zwh930712/densenet.pytorch", "max_stars_repo_head_hexsha": "d1cd5e1957975628286e516512c6d1c14430f810", "max_stars_repo_licenses": ["Apache-2.0"], "... |
import cv2
import numpy as np
import database
from imutils.video import FPS
import argparse
import imutils
import Gui
import sys
class Detector:
def recognize(self):
recognizer = cv2.face.LBPHFaceRecognizer_create()
recognizer.read('trainer/trainer.yml')
cascadePath =... | {"hexsha": "3586662f53a2164747f349b43d6c1c717813dc17", "size": 1998, "ext": "py", "lang": "Python", "max_stars_repo_path": "detector.py", "max_stars_repo_name": "napsterstiffler/faceoff", "max_stars_repo_head_hexsha": "af0c92e3803e74bfd5922ac980457728427d2605", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
# Date: Friday 21 July 2017
# Email: nrupatunga@whodat.com
# Name: Nrupatunga
# Description: Training the tracker
from ..helper import config
import argparse
import setproctitle
from ..logger.logger import setup_logger
from ..loader.loader_imagenet import loader_imagenet
from ..loader.loader_alov import loader_alov
fr... | {"hexsha": "88749852fe04efe660b44040ec5737b6b4393c46", "size": 7602, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_pygo/train.py", "max_stars_repo_name": "theplaineric/GOTURN-Tensorflow", "max_stars_repo_head_hexsha": "ed82defb69c45a5ec43330d4cbf2c9f86fc5b9da", "max_stars_repo_licenses": ["MIT"], "max_st... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Functions for the construction of second-order pose data and regressors
"""
import numpy as np
import pandas as pd
import scipy.stats
from scipy.spatial.distance import pdist, squareform, cdist, euclidean
from sklearn.cluster import AgglomerativeClustering
from psyp... | {"hexsha": "473a451ac3a4b663a1ae3251c2bc6259cde95842", "size": 11169, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/psypose/regressors.py", "max_stars_repo_name": "scraplab/psypose", "max_stars_repo_head_hexsha": "81753e29b78023b8a7c48356ec54c67b7182c183", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
c**********************************************************************
c IO_INIT_TP.F
c**********************************************************************
c Read in test particle data
c
c Input:
c infile ==> File name to read from (character*80)
c
c Output:
c ... | {"hexsha": "f2d089f61b8de7f122c95ff0e726b1dbd10dd4e2", "size": 3062, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/swift_j/io/io_init_tp.f", "max_stars_repo_name": "Simske/exostriker", "max_stars_repo_head_hexsha": "587b0af4c9cadb46637a4ac61a5392a596e966b1", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""
The inference (retrieval) sample file.
Authors: Hamed Zamani (zamani@cs.umass.edu)
"""
from app_logger import logger
logger = logger(__file__)
from allennlp.common import Params, Tqdm
from allennlp.common.util import prepare_environment
prepare_environment(Params({})) # sets the seeds to be fixed
from config im... | {"hexsha": "e5a5f64a298fd60ec35fceea69fb3c31aa27221f", "size": 10548, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/retrieval.py", "max_stars_repo_name": "Bernhard-Steindl/snrm-extension", "max_stars_repo_head_hexsha": "e4a797ff258a15b690b8838a064fbe790ff22b80", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
# coding: utf-8
import os
import sys
import struct
import argparse
import numpy as np
sys.path.append("../")
from colmap_process.colmap_read_write_model import *
from colmap_process.colmap_export_geo import *
def read_orb_traj_text(traj_path):
"""
see: src/base/reconstruction.cc
void Reconstruction::... | {"hexsha": "34af82d2e3b98124247b6dd282f0af6f9da2ef92", "size": 2302, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/sfm_toolkits/ezxr_sfm/trajectory_tools/orbtraj2colmap.py", "max_stars_repo_name": "TxT1212/colmap", "max_stars_repo_head_hexsha": "ee87e7c8b9ee7541be62f45121febd431be134a9", "max_stars_rep... |
#!/usr/bin/env python3
import contextlib
import io
import json
import logging
import sys
from multiprocessing import Pool
import msgpack
import numpy as np
import tqdm
import lzma
import bz2
import openforcefield
from openforcefield.topology.molecule import Molecule
from rdkit import Chem
from rdkit.Chem.EnumerateS... | {"hexsha": "e3cd7530b6a199bcf8ea7571d37636ae5d57fbd9", "size": 16600, "ext": "py", "lang": "Python", "max_stars_repo_path": "offsb/ui/smiles/load.py", "max_stars_repo_name": "MobleyLab/openff-spellbook", "max_stars_repo_head_hexsha": "66a9f2add895034da7949701069b11cf0ab3f817", "max_stars_repo_licenses": ["MIT"], "max_s... |
"""
Regression tests.
"""
import numpy as np
import gym
from .verifier import *
from .levelgen import *
from gym_minigrid.minigrid import *
class Level_TestGoToBlocked(RoomGridLevel):
"""
Go to a yellow ball that is blocked with a lot of red balls.
"""
def __init__(self, room_size=8, seed=None):
... | {"hexsha": "59d5a32b6981fb6394c5d43fcd5fd4bb2cf09d38", "size": 1702, "ext": "py", "lang": "Python", "max_stars_repo_path": "babyai/levels/test_levels.py", "max_stars_repo_name": "MathijsMul/babyai-emergent-guidance", "max_stars_repo_head_hexsha": "9e37535134c89bd019affa51c7f199d1672811b6", "max_stars_repo_licenses": ["... |
[STATEMENT]
lemma fls_deriv_add [simp]: "fls_deriv (f+g) = fls_deriv f + fls_deriv g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. fls_deriv (f + g) = fls_deriv f + fls_deriv g
[PROOF STEP]
by (auto intro: fls_eqI simp: algebra_simps) | {"llama_tokens": 116, "file": null, "length": 1} |
[STATEMENT]
lemma if_mred_heap_read_typedD:
"multithreaded_base.init_fin final_expr (J_heap_base.mred addr2thread_id thread_id2addr spurious_wakeups empty_heap allocate (\<lambda>_ :: 'heap. typeof_addr) (heap_base.heap_read_typed (\<lambda>_ :: 'heap. typeof_addr) heap_read P) heap_write P) t xh ta x'h' \<longleftri... | {"llama_tokens": 1305, "file": "JinjaThreads_MM_JMM_J_Typesafe", "length": 2} |
from __future__ import annotations
from typing import Union
import torch
import numpy as np
from .data import Data
from .data import ACCESSIBLE_KEY
from utils.config import global_config
import copy
class Dataset(object):
"""This is a class for building the dataset in the learning process.
:param buffer_size:... | {"hexsha": "778b57587bfc1cc24ddf72b88e499b084f2ef830", "size": 6352, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/dataset.py", "max_stars_repo_name": "HKUST-JM/iLQR_Traj_Trac", "max_stars_repo_head_hexsha": "c23101a8ddc208d43c210e4c759f28f9b7fb00b7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
SUBROUTINE MB03BD( JOB, DEFL, COMPQ, QIND, K, N, H, ILO, IHI, S,
$ A, LDA1, LDA2, Q, LDQ1, LDQ2, ALPHAR, ALPHAI,
$ BETA, SCAL, IWORK, LIWORK, DWORK, LDWORK,
$ IWARN, INFO )
C
C SLICOT RELEASE 5.7.
C
C Copyright (c) 2002-2020 NICONET e.V.... | {"hexsha": "9999bdebfeee56054d19a3cd6c1591ab93241a17", "size": 74462, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/MB03BD.f", "max_stars_repo_name": "bnavigator/SLICOT-Reference", "max_stars_repo_head_hexsha": "7b96b6470ee0eaf75519a612d15d5e3e2857407d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
function test_failed = test_blockfwt()
test_failed = 0;
disp('-------------TEST_BLOCKFWT--------------');
L = 567;
W = [1,3];
Lb = [78,64,58,1021];
wa = {'dden3','ana:symorth1'};
ws = {'dden3','syn:symorth1'};
J = [5];
for wId = 1:numel(W)
for lId = 1:numel(L)
f = tester_rand(L(lId),W(wId));
for lbId = 1:numel(Lb... | {"author": "ltfat", "repo": "ltfat", "sha": "4496a06ad8dddb85cd2e007216b765dc996ef327", "save_path": "github-repos/MATLAB/ltfat-ltfat", "path": "github-repos/MATLAB/ltfat-ltfat/ltfat-4496a06ad8dddb85cd2e007216b765dc996ef327/testing/test_blockfwt.m"} |
#!/usr/bin/env python
from os.path import join
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import netCDF4 as nc4
from e3sm_case_output import day_str, time_str
NUM_DAYS = 1
TIME_STEP = 1800
assert 86400 % TIME_STEP == 0, "cannot fit even number of time steps in day"
ti... | {"hexsha": "4a399b277cb6fc9b92ecbaa0da21903e865fa34d", "size": 10977, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_water_budget_col.py", "max_stars_repo_name": "quantheory/E3SMTimestepStudy", "max_stars_repo_head_hexsha": "63b5517c2a92dfae7af0cd7aa0eb39058967ed06", "max_stars_repo_licenses": ["BSD-3-Clau... |
import numpy as np
import itertools
from scipy.interpolate import griddata
from .util import Envelope, norm_array
from typing import List, Tuple
_t_DEM = List[Tuple[float, float, float]]
class DEMObject:
_dem: _t_DEM = None
def __init__(self, dem: _t_DEM):
self._dem = np.asarray(dem)
def __r... | {"hexsha": "b60fde08b0cd123c28e187415c23bea7a5cc7d6e", "size": 1848, "ext": "py", "lang": "Python", "max_stars_repo_path": "demutil/processor.py", "max_stars_repo_name": "BetaS/pydemutil", "max_stars_repo_head_hexsha": "c4b5cc5c21e09c9513cdd3836f89e307a05ca55d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
# Copyright 2021 The XMC-GAN Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | {"hexsha": "9741457ce47f02cb4d54fe9786defc20fab05000", "size": 1899, "ext": "py", "lang": "Python", "max_stars_repo_path": "attn_loss/losses.py", "max_stars_repo_name": "StolasIn/Lafite", "max_stars_repo_head_hexsha": "a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
[STATEMENT]
lemma ffd_fbd_conjugation: "(fd\<^sub>\<F> f X \<inter> Y = {}) = (X \<inter> bd\<^sub>\<F> f Y = {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (fd\<^sub>\<F> f X \<inter> Y = {}) = (X \<inter> bd\<^sub>\<F> f Y = {})
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. (fd\<^sub>\... | {"llama_tokens": 1664, "file": "Transformer_Semantics_Kleisli_Transformers", "length": 16} |
% ==============================================================================
%
% F P G A
%
% ==============================================================================
\chapter{FPGA} % ------------------------------------------------------------- %
\label{ch:fpga}
% -----------... | {"hexsha": "a0bfd6b9838afa118092da67e44e9115a69006ac", "size": 19520, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/report/chunks/fpga.tex", "max_stars_repo_name": "alpenwasser/pitaya", "max_stars_repo_head_hexsha": "a6ced99408171ffcd96c9444adfe30d2ba699f48", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
import copy
import numpy as np
import sys
import pandas as pd
sys.path.append('/home/robinmid/repos/hurricanes_hindcasting_remake/analysis')
sys.path.append('/home/robin/repos/hurricanes_hindcasting_remake/analysis')
from analysis.utils import get_index_list, detect_stationarity_and_offset_in_series, WORLD_REGIONS
... | {"hexsha": "c85c0e327104a4a9acbfd26302b5ed60eaa2c67f", "size": 28710, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/dataformat.py", "max_stars_repo_name": "rmiddelanis/harvey_scaling", "max_stars_repo_head_hexsha": "a94064996fb200c26a90482cc63804dcdc3cf6dd", "max_stars_repo_licenses": ["MIT"], "max_st... |
C$Procedure PSV2PL ( Point and spanning vectors to plane )
SUBROUTINE PSV2PL ( POINT, SPAN1, SPAN2, PLANE )
C$ Abstract
C
C Make a SPICELIB plane from a point and two spanning vectors.
C
C$ Disclaimer
C
C THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
C CALIFORNIA INSTITUTE OF TE... | {"hexsha": "3771f852a1fd37bd0582ac51bca8ed5a3b291688", "size": 7879, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "source/nasa_f/psv2pl.f", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma lim_Ref_alloc[simp]: "lim (snd (Ref.alloc x h)) = Suc (lim h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. lim (snd (Ref.alloc x h)) = Suc (lim h)
[PROOF STEP]
unfolding Ref.alloc_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. lim (snd (let l = lim h; r = Ref l in (r, Ref.set r x (h\<lpar... | {"llama_tokens": 184, "file": "Separation_Logic_Imperative_HOL_Tools_Imperative_HOL_Add", "length": 2} |
struct Point{T<:Real}
x::T
y::T
end
Point(x::T) where {T<:Complex} = Point(real(x), imag(x))
Point(p::Point{T}) where {T<:Real} = Point(p.x, p.y)
function Point(x::AbstractVector{T}) where {T}
@assert length(x) == 2
return Point(x[1], x[2])
end
Base.:+(a::Point, b::Point) = Point(a.x + b.x, a.y + b.y)
Base.:-(... | {"hexsha": "d6e5594e938880388053d2d6a63a5da365c32994", "size": 786, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Points.jl", "max_stars_repo_name": "jwscook/WindingNumbers", "max_stars_repo_head_hexsha": "253c697501e309e814a92244260fedbf9dffcfa5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df_main = pd.read_csv('../data/correct_vs_incorrect.csv')
for model_ in ['code2vec', 'code2seq', 'ggnn']:
print(f'Plotting for {model_}...')
df_model = df_main[df_main['model'] == model_]
df_correct = df_model[df_model['type'] == 'cor... | {"hexsha": "07b35226ecb04b542b9325bc2e46849b70c2fab9", "size": 1349, "ext": "py", "lang": "Python", "max_stars_repo_path": "results/plots/correct_vs_incorrect.py", "max_stars_repo_name": "s1530129650/tnpa-generalizability", "max_stars_repo_head_hexsha": "5b1a508a2a6d7296d7a3f84d08cf2c9bb3490004", "max_stars_repo_licens... |
(*===========================================================================
Properties of bit vectors
===========================================================================*)
Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq tuple fintype div zmodp ssralg.
Require Import ZArith.
Require Import tupleh... | {"author": "jbj", "repo": "x86proved", "sha": "d314fa6d23c064a2be4bf686ac7da16a591fda01", "save_path": "github-repos/coq/jbj-x86proved", "path": "github-repos/coq/jbj-x86proved/x86proved-d314fa6d23c064a2be4bf686ac7da16a591fda01/src/bitsprops.v"} |
import numpy as np
import math
from pdb import set_trace
class Landmark():
def __init__(self, id, x, y):
self.id = id
self.x = x
self.y = y
class OdometryData():
def __init__(self, r1, t, r2):
self.r1 = float(r1)
self.t = float(t)
self.r2 = float(r2)
class S... | {"hexsha": "5270384a9c2ac42561a5fdd08eacdff42e515bf5", "size": 1646, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/utils.py", "max_stars_repo_name": "BolunDai0216/EKFSLAM", "max_stars_repo_head_hexsha": "04c9213ce86cb8e2f2a1781950f08d8d2e755b39", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,... |
import pandas as pd
import benchmarks as bm
import cuckoo_search as cs
import particle_swarm_opt as pso
from scipy.stats import ranksums
def cs_tune(opt_func):
lambda_ = [1.1, 1.5, 2, 2.5, 3]
step_size = [0.01, 0.5, 1]
print('| λ | α | Resultado |')
print('|-----|------|-----------|')
for l ... | {"hexsha": "d48781aa7850f3904ea9ac2a9744941759e6b75e", "size": 2448, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab_5/lab_5.py", "max_stars_repo_name": "Fredy/UCSP-Bioinspirada", "max_stars_repo_head_hexsha": "4476ce5c493f47887b61aded12b17d28a1f896a4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from keras.models import Sequential
from keras.layers import LSTM, Dense
import numpy as np
print('Loading data...')
# OISST.shape = (1830, 18400)
OISST = np.loadtxt('data/OISST_19811101-20161116.dat')
# PREC.shape = (1688, 9)
PREC = np.loadtxt('data/zones_Prec_weekly_19811101-20140228.dat')
X = OISST[:PREC.shape[0],... | {"hexsha": "e6f82994f63306157b7b6f16e0574c7ea7b2fc48", "size": 957, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/keras_LSTM_test.py", "max_stars_repo_name": "MajorChina/CPOP", "max_stars_repo_head_hexsha": "03b8056bb3ec6c07500a3ac4fc07cdc495ae8052", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import unittest
import copy
import tensorbackends
import ctf
import numpy as np
from scipy import fft
from tensorbackends.utils import test_with_backend
from koala import Observable, candecomp, Gate, tensors
from experiments.qft import qft_candecomp
@test_with_backend()
class CanonicalDecomp(unittest.TestCase):
... | {"hexsha": "4c27f2eb8d78fb38a04cd2f54873bcfdddf65cc4", "size": 1492, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_candecomp.py", "max_stars_repo_name": "LinjianMa/koala", "max_stars_repo_head_hexsha": "a366af5d109cbcec820827702a4ef7cb0a3a02f3", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"], "max... |
#redirect wiki:woodland:ruby tuesday
| {"hexsha": "45237b33ebe3872fad3aa20be2ec257ca4ba32c9", "size": 37, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Ruby_Tuesday.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
subroutine ch_noqual
!! ~ ~ ~ PURPOSE ~ ~ ~
!! this subroutine performs in-stream nutrient calculations. No transformations
!! are calculated. New concentrations of the nutrients are calculated based
!! on the loading to the reach from upstream.
!! ~ ~ ~ INCOMING VARIABLES ~ ~ ~
!! name ... | {"hexsha": "2fdd84072df96d496c92ed2215ca9f5dc269ed51", "size": 12032, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source_codes_60.5/ch_noqual.f90", "max_stars_repo_name": "ankwasa/wetlands_swatplus", "max_stars_repo_head_hexsha": "3cdf83cc6a4dc68ce4f53ce1d0ebacd7695b54cf", "max_stars_repo_licenses": ["MIT"... |
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 26 15:53:14 2021
@author: vader
"""
import imageio as io
import numpy as np
import torch.utils.data as data
import torch
import torch.nn as nn
import torch.optim as optim
from torchsummary import summary
from helper import *
from dataset import get_dataset
import cv2
da... | {"hexsha": "d6f2b1a63a33000ce74c20765e3172e3d491d49e", "size": 5302, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "giorgosouz/HSI-classification-makantasis-cnn", "max_stars_repo_head_hexsha": "95f18274d7cb67babb971db71f358a73dee2affc", "max_stars_repo_licenses": ["MIT"], "max_... |
import os
from typing import Tuple, List, Dict
import numpy as np
import cv2
import random
import pandas as pd
"""
When an image has it's mask predicted,A user can then click on the save csv file and the mask (or multiple masks)
will have it's properties calculated and then saved to a csv file.
Additionally a user c... | {"hexsha": "394c1d44736a1c37a84fa5c914c3bfe24a7b6d02", "size": 13166, "ext": "py", "lang": "Python", "max_stars_repo_path": "BackEnd/analyze_dimples.py", "max_stars_repo_name": "Mohamab29/FracSegment", "max_stars_repo_head_hexsha": "2cca4e69a82ca3e6733d3b29e0e093fff5e55fe2", "max_stars_repo_licenses": ["Apache-2.0"], "... |
import numpy as np
"""
It is created for using MTC in Mujoco. The dynamics in this model is not continuous. The integration error will be
accumulated overtime. And the system might get unstable if the timestep is too large. It is recommended to set the
timestamp lower than 5e-4 to get decent results.
The model is cre... | {"hexsha": "4fda88e07a7d5763add5321ef0cfe0319e550f49", "size": 7802, "ext": "py", "lang": "Python", "max_stars_repo_path": "mushroom_rl/environments/mujoco_envs/humanoid_gait/_external_simulation/mtc_model.py", "max_stars_repo_name": "PuzeLiu/mushroom-rl", "max_stars_repo_head_hexsha": "99942b425e66b4ddcc26009d7105dde2... |
import gsw
import mixsea as mx
import numpy as np
from munch import Munch
from tqdm import tqdm
import utils
dvn = Munch(
{
"time": "time",
"C": "C",
"SP": "S",
"t": "T",
"lon": "lon",
"lat": "lat",
"depth": "depth",
}
)
def generate_CTD_Munch_from_lis... | {"hexsha": "34e3f344d033a41811677450fa3df0aca182c6ef", "size": 6163, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/CTD.py", "max_stars_repo_name": "jessecusack/LeConte_postprocessing", "max_stars_repo_head_hexsha": "1f1a1dc0541033fc83d5953b0a06c6695ae8036d", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
[STATEMENT]
lemma (in intruder_model) term_variants_pred_wf_trms:
assumes "term_variants_pred P s t"
and "\<And>f g. g \<in> set (P f) \<Longrightarrow> arity f = arity g"
and "wf\<^sub>t\<^sub>r\<^sub>m s"
shows "wf\<^sub>t\<^sub>r\<^sub>m t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. wf\<^sub>t\<^s... | {"llama_tokens": 785, "file": "Automated_Stateful_Protocol_Verification_Term_Variants", "length": 3} |
[STATEMENT]
lemma Gets_B_knows_K:
"\<lbrakk> Gets B \<lbrace>Crypt (shrK B) \<lbrace>Number Tk, Agent A, Key K\<rbrace>,
Crypt K \<lbrace>Agent A, Number Ta\<rbrace>\<rbrace> \<in> set evs;
evs \<in> bankerb_gets \<rbrakk>
\<Longrightarrow> Key K \<in> analz (knows B evs)"
[PROOF STATE]
proof (prov... | {"llama_tokens": 292, "file": null, "length": 2} |
import os
import sys
import numpy
import tensorflow as tf
from joblib import Parallel, delayed
from sklearn.metrics import mean_absolute_error
from model.helper import HPLogger, NumpyEncoder
sys.path.append("..")
import json
import pandas
from sklearn.model_selection import KFold
from skopt import gp_minimize, du... | {"hexsha": "4634f07cea336cb5b2f8a5ac26294ff65af45552", "size": 10317, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/experiment/hp_tuning.py", "max_stars_repo_name": "svpeeters/performance_prediction", "max_stars_repo_head_hexsha": "713e78441d59a5dafccaa43858a0478a29b43e2f", "max_stars_repo_licenses": ["M... |
import torch
from torch.utils.data import Dataset, DataLoader
import scipy.sparse
from contextualized_topic_models.models.ctm import CTM
import pickle, os
from tqdm import tqdm
from utils import load_model
import numpy as np
def get_posteriors(teacher_dataset, teacher_model, contextual_size=512, batch_size=25, num_wor... | {"hexsha": "e41c9c0e2dbbc8da1c1fda2a10acc595caf75034", "size": 5416, "ext": "py", "lang": "Python", "max_stars_repo_path": "knowledge_distillation.py", "max_stars_repo_name": "EMBEDDIA/media_eval_vctm", "max_stars_repo_head_hexsha": "17111065f4a4435485d018cf81586a00cea8afff", "max_stars_repo_licenses": ["MIT"], "max_st... |
# Use stepwise regression and PCA to confirm discriminating questions between groups
rm(list = ls())
source("../project_support.r")
# Check if additional libraries are installed and if they are not installed, install them
packages <- c("MASS", "factoextra", "ggfortify")
install.packages(setdiff(packages, rownames(in... | {"hexsha": "38da3e667577230f2d0f9419e15aaafb12787184", "size": 4112, "ext": "r", "lang": "R", "max_stars_repo_path": "05_cluster_comparison/confirmatory_analysis.r", "max_stars_repo_name": "religionhistory/religion_taxonomy", "max_stars_repo_head_hexsha": "8ddac68fe76da2337d5d4c4ab6787a90cb56c59c", "max_stars_repo_lice... |
import pandas as pd
import os
import numpy as np
import logging
import urllib
import zipfile
from pathlib import Path
AMPLIGRAPH_ENV_NAME = 'AMPLIGRAPH_DATA_HOME'
REMOTE_DATASET_SERVER = 'https://s3-eu-west-1.amazonaws.com/ampligraph/datasets/'
DATASET_FILE_NAME = {'WN18': 'wn18.zip',
'WN18RR': 'w... | {"hexsha": "2d81566b5a0a4ffbe4ffc4f350f1574c59d322b9", "size": 20523, "ext": "py", "lang": "Python", "max_stars_repo_path": "ampligraph/datasets/datasets.py", "max_stars_repo_name": "pyvandenbussche/AmpliGraph", "max_stars_repo_head_hexsha": "ac515bc34c64becc04385797c8b9f0d93b20b58d", "max_stars_repo_licenses": ["Apach... |
# -*- coding: utf-8 -*-
import birl
import utils
import numpy as np
import matplotlib.pyplot as plt
#calculate the policy loss between the hypothesis return and the map return
def calculate_policy_loss(config, hyp_params, map_params):
#calculate reward for optimal placement under hyp_reward
hyp_obj_weights, ... | {"hexsha": "27e6231ce357de44ac8b72e4e41de64435377c77", "size": 2502, "ext": "py", "lang": "Python", "max_stars_repo_path": "gaze_birl/complexreward.py", "max_stars_repo_name": "asaran/gaze-LfD", "max_stars_repo_head_hexsha": "964635d9bf7b208abe35d40b2bf791b05b8a0c3b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# Copyright 2020 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, s... | {"hexsha": "326cd2cd5ad61a5c91a233f81f8955d02545948f", "size": 1609, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_gaussian.py", "max_stars_repo_name": "JZK00/MONAI", "max_stars_repo_head_hexsha": "49e693c4e7df83dc1f8ab87349373de9263188a9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
import numpy as np
from MyDQN.logger import Logger
from MyDQN import vrep
import time
import random
import cv2 as cv
image_pix = 84 # 输入图像的维度 image_pix * image_pix 灰度图
class EnvGrasp(object):
def __init__(self):
self.total_success = 0
self.total_try = 0
self.logger = Logger('./logs_gras... | {"hexsha": "864b0cfa4ffd17fc0064ffd6ad54af2bf0affe39", "size": 17611, "ext": "py", "lang": "Python", "max_stars_repo_path": "environment.py", "max_stars_repo_name": "gouxiangchen/DRL-grasp", "max_stars_repo_head_hexsha": "daf4878e297b4762bd8eee71dca226826784dad1", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
from os import listdir
import json
import pickle
import os, errno
import pandas as pd
from numpy import array
from pandas import DataFrame
from typing import cast
import io
from pathlib import Path
class MpFileUtil:
def save_pickle(self, dir_name: str, file_name: str, obj: object):
self.make_dir(dir_na... | {"hexsha": "e10615ef9542ad59884be970ec141f6068cabed1", "size": 5169, "ext": "py", "lang": "Python", "max_stars_repo_path": "mp_scripts/mp_util/MpFileUtil.py", "max_stars_repo_name": "mpfuff/trackformer", "max_stars_repo_head_hexsha": "d8d970718d3a4adfa89c1430e34dcfaed65b080f", "max_stars_repo_licenses": ["Apache-2.0"],... |
#ifndef MPLLIBS_SAFE_PRINTF_IMPL_MATCHES_HPP
#define MPLLIBS_SAFE_PRINTF_IMPL_MATCHES_HPP
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#incl... | {"hexsha": "cfc488705b41892634d9404b3774a81afadf42c1", "size": 1801, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "mpllibs/safe_printf/v1/impl/matches.hpp", "max_stars_repo_name": "sabel83/mpllibs", "max_stars_repo_head_hexsha": "8e245aedcf658fe77bb29537aeba1d4e1a619a19", "max_stars_repo_licenses": ["BSL-1.0"], ... |
import torch.nn.functional as F
from mmcv.cnn import ConvModule
from mmcv.cnn.bricks import NonLocal2d
from mmcv.runner import BaseModule
from ..builder import NECKS
import torch
from torch import nn
from ..losses import SmoothL1Loss
from ..losses import FocalLoss
import matplotlib.pyplot as plt
from torch.nn.paramet... | {"hexsha": "928bc996579c0f89ecd2424e75ac54ec03b8023e", "size": 14171, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmdet/models/necks/extra_mask.py", "max_stars_repo_name": "w-sugar/mmdetection", "max_stars_repo_head_hexsha": "3f263c496c99827e4c90eb2e2f2be92f061f3b66", "max_stars_repo_licenses": ["Apache-2.0"... |
import numpy as np
__all__ = ['permute']
def permute(a):
"""
Creates all unique combinations of a list a that is passed in.
Function is based off of a function written by John Lettman:
TCHS Computer Information Systems. My thanks to him.
"""
a.sort() # Sort.
## Output the first input s... | {"hexsha": "f6ddd2f28a9a6d5c63f4144d2022f2b81953adac", "size": 1037, "ext": "py", "lang": "Python", "max_stars_repo_path": "interpolation/smolyak/util.py", "max_stars_repo_name": "gboehl/interpolation.py", "max_stars_repo_head_hexsha": "25520556804dd104c5931c8a6bedfff65420025f", "max_stars_repo_licenses": ["BSD-2-Claus... |
import os
import random
import sys
import time
import imageio
import numpy as np
import skimage
import torch
import torchvision
from torch import nn
from torchvision import datasets, transforms
from spn.experiments.RandomSPNs_layerwise.distributions import RatNormal
from spn.experiments.RandomSPNs_layerwise.rat_spn i... | {"hexsha": "104fd439833356053f5015a995dfaf4e2deecb36", "size": 8654, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/spn/experiments/RandomSPNs_layerwise/train_mnist.py", "max_stars_repo_name": "steven-lang/SPFlow", "max_stars_repo_head_hexsha": "be7492d4229857454b4e23596be7ba71d7af5960", "max_stars_repo_lic... |
[STATEMENT]
lemma length_filter_conv_size_filter_mset: "length (filter P xs) = size (filter_mset P (mset xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. length (filter P xs) = size (filter_mset P (mset xs))
[PROOF STEP]
by (induction xs) auto | {"llama_tokens": 99, "file": null, "length": 1} |
\chapter{Conclusion and Further Work}
\label{ch:5}
\section{Conclusion}
This synopsis provides a detailed description of an Practical implementation of Online Biding system which provides Secure Key Exchange and agreement. We have implemented system for
\begin{itemize}
\item Capturing or uploading image;
\item Show st... | {"hexsha": "9f0f20b84cd9d5ff88154af2b9a7459ae45368f2", "size": 967, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/thesis/doc_src/conclusion.tex", "max_stars_repo_name": "TheScienceUniverse/BlockChain", "max_stars_repo_head_hexsha": "03c33fabfa702fad7f6e3a9de5757a2ccda2d909", "max_stars_repo_licenses": ["Apac... |
"""
Embedding pipeline
This script will take a collected list of SMILES, and generate all of the
vector embeddings and perform transformations to prepare it for analysis.
Because we're dealing with potentially large datasets, it's important to
be mindful of the amount of memory you have access to, particularly for th... | {"hexsha": "e0ff4d0a249727927cb360fed0f5203caf7ceea6", "size": 4811, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/embedding_pipeline.py", "max_stars_repo_name": "laserkelvin/umda", "max_stars_repo_head_hexsha": "ec6c77c2ffb179f221fa9914e3e07cdeb4383572", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
module Get_kurtosis
export get_kurtosis
using Distributions, Statistics, Dierckx, SeisIO
"""
get_kurtosis(data::SeisChannel,kurtsis_tw_sparse::Float64; timewinlength::Float64=60)
compute kurtosis at each timewindow
# Input:
- `data::SeisData` : SeisData from SeisIO
- `kurtosis_tw_sparse::Float64... | {"hexsha": "fc80cd9bf640b6d7e4c305debcbf7c734c5db5be", "size": 6245, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/get_kurtosis.jl", "max_stars_repo_name": "jaredbryan881/SeisRemoveEQ.jl", "max_stars_repo_head_hexsha": "589d8d5ff07963b75341db50f9365b98944e83d3", "max_stars_repo_licenses": ["MIT"], "max_star... |
#=
Each complex should have collection of cells per dimension:
- cells::Dict{Int,Vector{C}} or Vector{Vector{C}}
=#
abstract type AbstractComplex end
#
# AbstractComplex Public Interface
#
"""Return a complex boundary given element and dimension"""
boundary(cplx::AbstractComplex, i::Integer, d::Int, ::Type{PID}) where... | {"hexsha": "b09b5aaabaecc15c6ff4d4f7d641b126954a819a", "size": 7282, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/complex.jl", "max_stars_repo_name": "wildart/ComputationalHomology.jl", "max_stars_repo_head_hexsha": "ccf8e4b2aa133d795a76da1197858c7e9f68b261", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
import os
import numpy as np
import pandas as pd
from tqdm import tqdm as tqdmn
from time import time
import multiprocessing
from joblib import Parallel, delayed
import csv
import geopandas as gpd
import sys
import argparse
import pickle
from sklearn.metrics import confusion_matrix, classification_report
from skimage ... | {"hexsha": "77fc71d89af89b708b36d32b4b4b327d5fec26f4", "size": 12651, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/efficientnet_training.py", "max_stars_repo_name": "lisette-espin/SESEfficientCAM", "max_stars_repo_head_hexsha": "54dcce7abf7395ca8c017620541204d667da1b1d", "max_stars_repo_licenses": ["MIT"... |
(* A carrier type for regular predicates. *)
From larith Require Import A_setup B1_utils C2_order C1_norm D1_automaton.
Section A_regular_predicate.
Variable letter : Set.
Variable P : list letter -> Prop.
(* P is regular iff its domain can be decided using a finite automaton. *)
(* An optional proof of determinism... | {"author": "bergwerf", "repo": "linear_integer_arithmetic", "sha": "123b0b02accfbbc3407033b43d74fac5288bf073", "save_path": "github-repos/coq/bergwerf-linear_integer_arithmetic", "path": "github-repos/coq/bergwerf-linear_integer_arithmetic/linear_integer_arithmetic-123b0b02accfbbc3407033b43d74fac5288bf073/D2_regular.v"... |
from keras.applications.resnet50 import ResNet50, preprocess_input as res_preprocess_input
from keras.preprocessing import image
import cv2
from keras.applications.inception_v3 import InceptionV3, preprocess_input as incep_preprocess_input
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePo... | {"hexsha": "2571dcfe59327cd9e91a18630f4b06d156216b7c", "size": 2999, "ext": "py", "lang": "Python", "max_stars_repo_path": "face_dog.py", "max_stars_repo_name": "mccormd1/Dog_Breed_CNN", "max_stars_repo_head_hexsha": "f915dc555075140ebe83ba38e737e5d8ac2a3e6a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import networkx as nx
# Main
G = nx.DiGraph()
G.add_edges_from([("IDLE", "Ruch do ladunku"),
("Ruch do ladunku", "Zgloszenie problemu"),
("Ruch do ladunku", "Zaladowanie ladunku"),
("Zgloszenie problemu", "IDLE"),
("Zaladowanie ladunku", "Ruch do maga... | {"hexsha": "91f03e7c47a414d4054c6d1511a753899bd289f8", "size": 2287, "ext": "py", "lang": "Python", "max_stars_repo_path": "agv/scripts/graphs.py", "max_stars_repo_name": "MicWeg/TS_proj", "max_stars_repo_head_hexsha": "70534063f454762b691799829c3c958cef087cf5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
module modC
use modA
use modB, only : foo, bar
end module modC
| {"hexsha": "3aaeda66a8ca0c9a7073aef7499156ddcf4ed92b", "size": 67, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/test_fortranfile/moduleC.f90", "max_stars_repo_name": "ZedThree/fort_depend.py", "max_stars_repo_head_hexsha": "ea2caf0010765f00de142d168b05665499ffe1ca", "max_stars_repo_licenses": ["MIT"],... |
\chapter{Evaluation and Discussion}
\label{chap:eval}
\ldots
| {"hexsha": "14541cda38ce7db4c8fba56d35dc81cbbe2b95db", "size": 63, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TeX/chapters/chapter6.tex", "max_stars_repo_name": "Kirillfedoseev/dod-gamedev", "max_stars_repo_head_hexsha": "4192447627e204aebea57898540acd7ccf37b756", "max_stars_repo_licenses": ["MIT"], "max_star... |
#!/usr/bin/env python
from nose.tools import *
from nose import SkipTest
import networkx as nx
from networkx.algorithms import bipartite
from networkx.testing.utils import assert_edges_equal
class TestBiadjacencyMatrix:
@classmethod
def setupClass(cls):
global np, sp, sparse, np_assert_equal
tr... | {"hexsha": "6a1ec296813ac09dda8b71a6223eeb087492d744", "size": 3181, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/networkx/algorithms/bipartite/tests/test_matrix.py", "max_stars_repo_name": "MarletteFunding/aws-kube-codesuite", "max_stars_repo_head_hexsha": "ab4e5ce45416b83bffb947ab8d234df5437f4fca", "max... |
from __future__ import absolute_import, division, print_function
import math
import random
import numpy as np
import torch
import torch.nn as nn
from torch.utils.data import TensorDataset, DataLoader
from torch.utils.data import random_split
from scipy.stats import linregress
from ray import tune
a = 270.
... | {"hexsha": "87cdde8bbd5615b44ef58e5c244b56b12aea7476", "size": 9688, "ext": "py", "lang": "Python", "max_stars_repo_path": "wwparrecdl/wwparrecdl.py", "max_stars_repo_name": "Emalude/wwparrecdl", "max_stars_repo_head_hexsha": "47b87a277c33b82594bb975be4e2407b9b122e25", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import math
import centrosome.outline
import numpy
import numpy.testing
import pytest
import skimage.measure
import skimage.segmentation
import cellprofiler_core.image
import cellprofiler_core.measurement
from cellprofiler_core.constants.measurement import (
EXPERIMENT,
COLTYPE_FLOAT,
C_LOCATION,
)
impo... | {"hexsha": "252619ad658e63876da84af2ee734d29fc0c1e19", "size": 20306, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_measureobjectintensitymultichannel.py", "max_stars_repo_name": "BodenmillerGroup/ImcPluginsCP", "max_stars_repo_head_hexsha": "a53bb7e1dea60b859d57677ea9a15281fa84d493", "max_stars_rep... |
module Section10 where
open import Section9 public
-- 10. Conclusions
-- ===============
--
-- We have defined a calculus of proof trees for simply typed λ-calculus with explicit substitutions
-- and we have proved that this calculus is sound and complete with respect to Kripke
-- models. A decision algorithm for c... | {"hexsha": "ee8bb292d1a7eae4a9ba7689e60c596c9931c544", "size": 5237, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/Section10.agda", "max_stars_repo_name": "mietek/coquand", "max_stars_repo_head_hexsha": "7c000654c4f97024d2939c412702f64dc821d4ec", "max_stars_repo_licenses": ["X11"], "max_stars_count": 4, "m... |
//
// MIT License
//
// © ESI Group, 2015
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, pu... | {"hexsha": "44969f44cb41a54e28844093d63496b737a0b32d", "size": 7803, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libinendi/src/PVRangeSubSampler.cpp", "max_stars_repo_name": "inendi-inspector/inspector", "max_stars_repo_head_hexsha": "9b9a00222d8a73cb0817ca56790ee9155db61cc4", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
from nayzakflow.utils import _onehot
def sigmoid(z):
return (1/(1+np.exp(-1*z)))
def _diff_sigmoid(z):
return sigmoid(z)*(1-sigmoid(z))
def tanh(z):
return np.tanh(z)
def _diff_tanh(z):
return 1-np.square(tanh(z))
def relu(z):
return np.maximum(0,z)
def _diff_relu(z):
a... | {"hexsha": "310ad38cdbe7d3c09f484abd69024541aaa8edff", "size": 1185, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/nayzakflow/nn/activation.py", "max_stars_repo_name": "Ahmed-Salah6011/NayzakFlow", "max_stars_repo_head_hexsha": "1fd6bf442a03524d9995e8c77f93c324713c1a35", "max_stars_repo_licenses": ["... |
[STATEMENT]
lemma strip_bot_acom[simp]: "strip(\<bottom>\<^sub>c c) = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. strip (\<bottom>\<^sub>c c) = c
[PROOF STEP]
by(simp add: bot_acom_def) | {"llama_tokens": 85, "file": "Abs_Int_ITP2012_Abs_Int0", "length": 1} |
[STATEMENT]
lemma iso_botf: "mono \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mono \<bottom>
[PROOF STEP]
by (simp add: monoI) | {"llama_tokens": 65, "file": "Transformer_Semantics_Isotone_Transformers", "length": 1} |
import logging
import datetime
import time
import ray
import cupy
from ray.util.collective.collective_group import nccl_util
from ray.util.collective.collective_group.base_collective_group \
import BaseGroup
from ray.util.collective.types import AllReduceOptions, \
BarrierOptions, Backend, ReduceOptions, Broa... | {"hexsha": "4341f8e672ba78742e82ad41b1c123e770976c49", "size": 12598, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/ray/util/collective/collective_group/nccl_collective_group.py", "max_stars_repo_name": "coreylowman/ray", "max_stars_repo_head_hexsha": "d95c8b8a418ef35154ffedecbad1812fcc171db9", "max_sta... |
[STATEMENT]
lemma pdevs_val_degree_cong:
assumes "b = d"
assumes "\<And>i. i < degree b \<Longrightarrow> a i = c i"
shows "pdevs_val a b = pdevs_val c d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. pdevs_val a b = pdevs_val c d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
b = d
?i < deg... | {"llama_tokens": 203, "file": "Affine_Arithmetic_Affine_Form", "length": 2} |
// Copyright 2022 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 la... | {"hexsha": "47346dba74374883c41388bfb9726743a603f5e2", "size": 2944, "ext": "cc", "lang": "C++", "max_stars_repo_path": "python/mujoco/util/func_wrap_test.cc", "max_stars_repo_name": "mfkiwl/mujoco", "max_stars_repo_head_hexsha": "21338e61784eebea1ae850a1cdb3bcf049de5924", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
% =====================================================================================================
%
% EDA - Exploratory Data Analy... | {"hexsha": "d2709c88109bc83c902e16afec3dc5a5c0e3da6c", "size": 29592, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/eda.tex", "max_stars_repo_name": "cbenge509/w203_Final", "max_stars_repo_head_hexsha": "4f8400353d1a3b8aa8f7483951ee7e4b5683f203", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
\documentclass[11pt]{article}
\usepackage{hyperref, graphicx, floatrow}
\usepackage[letterpaper, margin=1.25in]{geometry}
\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{0pt}
\title{Lhyra: Learned HYbrid Recursive Algorithms}
\author{
Josh Gruenstein\\\texttt{jgru@mit.edu} \and Lior Hirschfeld\\\text... | {"hexsha": "5bf445ccb25ff68e95bdb8f6439b5e9e7a2ef486", "size": 17720, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/main.tex", "max_stars_repo_name": "joshuagruenstein/lhyra", "max_stars_repo_head_hexsha": "a8798ff92c44c3188525cc59b21f9525db68b4a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
function pow(a,b)
k = b
t = 1
p = a
while k > 0
if k%2 == 0
k ÷= 2
p *= p
else
k -= 1
t *= p
end
end
return t
end | {"hexsha": "92ba64f5b5b23aead20ac14612b51769e1d7cd2b", "size": 215, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "task_7_1.jl", "max_stars_repo_name": "Litger45/julia-algorithms-2", "max_stars_repo_head_hexsha": "ff8f650b314cc920e0d35238509a0838d4b0a5ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
#!python3
import numpy as np
from magLabUtilities.signalutilities.signals import SignalThread, Signal, SignalBundle
from magLabUtilities.datafileutilities.timeDomain import importFromXlsx
from magLabUtilities.signalutilities.interpolation import Legendre, nearestPoint
from magLabUtilities.signalutilities.hystere... | {"hexsha": "935d8a5d2c4d6751a50750f11897ed5499f6daa1", "size": 9198, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/workflowTests/fit_XExpGedney071720.py", "max_stars_repo_name": "MarkTravers/magLabUtilities", "max_stars_repo_head_hexsha": "e116c8cb627cd82c3b8ba651dd6979b66e568632", "max_stars_repo_licens... |
module Types where
import Level
open import Data.Unit as Unit renaming (tt to ∗)
open import Data.List as List
open import Data.Product
open import Categories.Category using (Category)
open import Function
open import Relation.Binary.PropositionalEquality as PE hiding ([_]; subst)
open import Relation.Binary using (m... | {"hexsha": "3d9d0de31464a2482b9e2b691f17ab084ad8c6d1", "size": 9854, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "TypeTheory/FibDataTypes/Types.agda", "max_stars_repo_name": "hbasold/Sandbox", "max_stars_repo_head_hexsha": "8fc7a6cd878f37f9595124ee8dea62258da28aa4", "max_stars_repo_licenses": ["MIT"], "max_st... |
module Model
!*******************************************************************************
!
! This contains the five main subroutines of UVAFME:
!
! BioGeoClimate: computes daily and yearly site- and plot-level weather and
! soil dynamics
!
! Canopy: computes the plot-level LAI ... | {"hexsha": "574c57d88f95477110a4b6bbffe0d42cfa781221", "size": 107022, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Model.f90", "max_stars_repo_name": "jinyun1tang/UVAFME_model", "max_stars_repo_head_hexsha": "c8b847f07aca934d4c008f3f2cf67855e98274fc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s... |
# ************
# File: Bounds.py
# Top contributors (to current version):
# Panagiotis Kouvaros (panagiotis.kouvaros@gmail.com)
# This file is part of the Venus project.
# Copyright: 2019-2021 by the authors listed in the AUTHORS file in the
# top-level directory.
# License: BSD 2-Clause (see the file LICENSE in the... | {"hexsha": "ce946230d546cf92046a3edad4f588ce8de41711", "size": 1405, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Bounds.py", "max_stars_repo_name": "pkouvaros/venus2_vnncomp21", "max_stars_repo_head_hexsha": "57e9608041d230b5d78c4f2afb890b81035436a1", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta... |
module RowMajorArrays
export RowMajorArray
using LinearAlgebra
"""
Wrapper of a column major array (e.g. `Array` or `CuArray`) to make it a row-major array.
The default constructor takes a column major array as input, it is interpreted as row-major array.
This causes an implicit transpose of the input array, e.g. a... | {"hexsha": "74c3281e2e873fbd08121665c1fcee9e8e3c4217", "size": 4876, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RowMajorArrays.jl", "max_stars_repo_name": "lungben/RowMajorArrays.jl", "max_stars_repo_head_hexsha": "1091427e7584e37cf48db4eb27ebd6bd55a357c4", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Modified from DETR (https://github.com/facebookresearch/detr)
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# ------------------------------------------------------------------------
"""Utilities for bounding box manipulation and GIoU."""
import numpy as np
import torch
# rewrite for tempor... | {"hexsha": "649bc01829801897837c8a209707c3f3a9306756", "size": 3499, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/box_ops.py", "max_stars_repo_name": "tony2016uestc/RTD-Action", "max_stars_repo_head_hexsha": "ae51cf06d1c138bff3a41a3d014939bd409550a8", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
from __future__ import print_function
import sys, os, math, re
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
sys.path.insert(0, os.path.abspath('..'))
import sasmodels
from sasmodels import generate, core
from sasmodels.direct_model import DirectModel, call_profile
from sas... | {"hexsha": "aea810a916557bbdf01b77952029b5172c0c9688", "size": 8879, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/genmodel.py", "max_stars_repo_name": "zattala/sasmodels", "max_stars_repo_head_hexsha": "a547aa73d43145b3bd34770b0ea27ba8882170a3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_coun... |
import numpy as np
import os
from reader import read_cifar10
class Input(object):
def __init__(self, is_training, batch_num=128):
self.is_training = is_training
self.batch_num = batch_num
r = read_cifar10(os.getcwd()+'/cifar10_dataset', is_training=is_training)
d, l = r.load_data()
if self.is... | {"hexsha": "2a6bd74f2ad982dfffd1885b75a9a1360470fdd4", "size": 2716, "ext": "py", "lang": "Python", "max_stars_repo_path": "Input.py", "max_stars_repo_name": "pianomania/cifar10", "max_stars_repo_head_hexsha": "823b86421fbe8be7f94e693b11f71dfb35e22b74", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import (Input, InputSpec, Layer,
Activation, BatchNormalization,
Conv2D, Conv2DTranspose, Add,
Concatenate, Flatten, Reshape)
from tensor... | {"hexsha": "0b2567c0892ca7ddeea8e01994b26f42f4d7d3a2", "size": 7309, "ext": "py", "lang": "Python", "max_stars_repo_path": "nets/head.py", "max_stars_repo_name": "simon108018/Faster-OneNet-tf2", "max_stars_repo_head_hexsha": "091d17ba851c8bbe01090f7d9693aacb5e74fc94", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
/-
Copyright (c) 2020 Dany Fabian. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dany Fabian
-/
import tactic.split_ifs
/-!
# Unfold cases tactic
In Lean, pattern matching expressions are not atomic parts of the syntax, but
rather they are compiled down into s... | {"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/tactic/unfold_cases.lean"} |
[STATEMENT]
lemma isOK_check [simp]:
"isOK (check b e) = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. isOK (check b e) = b
[PROOF STEP]
by (simp add: check_def) | {"llama_tokens": 77, "file": "Certification_Monads_Check_Monad", "length": 1} |
import numpy as np
import cv2
def blur_background(img, mask):
mask[mask < 0.25] = 0
mask[mask >= 0.25] = 1
mask = mask.astype(np.uint8)
person = img * mask[:,:,np.newaxis]
kernel = np.ones((5,5), np.float32)/25
all = cv2.filter2D(img,-1,kernel)
mask = np.logical_not(mask)
back = all * mask[:,:,np.newax... | {"hexsha": "92ce3f27b346eab088e897ac5f2e70aed7e63be1", "size": 1020, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/filters.py", "max_stars_repo_name": "hoopoe/picsart_hackathon", "max_stars_repo_head_hexsha": "d65aeb1432890626e778b9b0232ce3c2f6d4906f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
*
* ------------------------------------------------------------------
* S E T U P m
* ------------------------------------------------------------------
*
SUBROUTINE SETUPm(ish,j1,j2,JA,JB,na,nb)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
*
COMMON/MEDEFN/IHSH,NJ(16),LJ(16),NOSH(16,2),J1QN(31,3,... | {"hexsha": "3dfea6a8744867f3f24e3f2ea2f8f6856c87c86a", "size": 3894, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/appl/density/setupm.f", "max_stars_repo_name": "mansour2014/ATSP2K_plus", "max_stars_repo_head_hexsha": "30842b9f086d1e497aeb778e2a352d1e8e520ec3", "max_stars_repo_licenses": ["BSD-4-Clause-UC... |
import Test
import PredictMD
a = PredictMD.version()
Test.@test( typeof(a) == VersionNumber )
Test.@test( typeof(a) === VersionNumber )
Test.@test( a != VersionNumber(0) )
Test.@test( a > VersionNumber(0) )
Test.@test( a > VersionNumber("0.1.0") )
Test.@test( a < VersionNumber("123456789.0.0") )
| {"hexsha": "3ce823f9c988dac416e589824a16c0b6fe61140c", "size": 299, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/unit/base/test_get_version_number.jl", "max_stars_repo_name": "UnofficialJuliaMirror/PredictMD.jl-3e7d7328-36f8-4388-bd01-4613c92c7370", "max_stars_repo_head_hexsha": "7987993b5900e658c3aa9c568... |
function DCV=plsldadcv(X,y,A,K,method,OPT,order)
%+++ K-fold double cross validation Cross-validation for PLS-LDA
%+++ Input: X: m x n (Sample matrix)
% y: m x 1 (measured property)
% A: The max PC for cross-validation
% K: fold. when K = m, it is leave-one-out CV
% method: pre... | {"author": "viggin", "repo": "domain-adaptation-toolbox", "sha": "2a991816a0ac39043b526c2b0cbe01bc844d8890", "save_path": "github-repos/MATLAB/viggin-domain-adaptation-toolbox", "path": "github-repos/MATLAB/viggin-domain-adaptation-toolbox/domain-adaptation-toolbox-2a991816a0ac39043b526c2b0cbe01bc844d8890/plslda/plslda... |
pdf_file<-"pdf/timeseries_daily.pdf"
cairo_pdf(bg="grey98", pdf_file,width=10,height=8.27)
par(cex.axis=1.1,omi=c(1,0.5,0.95,0.5),mai=c(0.1,1.25,0.1,0.2),mgp=c(5,1,0),family="Lato Light",las=1)
# Import data
christmas<-read.csv(file="myData/allyears.calendar.byday.dat.a",head=F,sep=" ",dec=".")
attach(christmas)
#... | {"hexsha": "861657d5c1ba66f6481ab26566f028bb485402e0", "size": 1515, "ext": "r", "lang": "R", "max_stars_repo_path": "src/scripts/timeseries_daily.r", "max_stars_repo_name": "wilsonify/data-visualization", "max_stars_repo_head_hexsha": "4a4295a59f666625f4a47b2ad6a6f1eb06f9e8d3", "max_stars_repo_licenses": ["MIT"], "max... |
import numpy as np
import torch
def num_params(model) :
parameters = filter(lambda p: p.requires_grad, model.parameters())
parameters = sum([np.prod(p.size()) for p in parameters]) / 1000000
print('Trainable Parameters: %.3f million' % parameters)
# for mulaw encoding and decoding in torch tensors, modif... | {"hexsha": "3d973b369f519a24553029de4b465469cb2ef863", "size": 2494, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "Edresson/WaveRNN-Pytorch", "max_stars_repo_head_hexsha": "f4bcfc0b84ad077eeb5011e24c80349c702f57dd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "m... |
///////////////////////////////////////////////////////////////////////////////
// statistics::survival::model::example::model::exponential.cpp //
// //
// Copyright 2009 Erwann Rogard. Distributed under the Boost //
... | {"hexsha": "5e223b905511bf37ac7f19bef8444239600e0728", "size": 7513, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "survival_model copy/libs/statistics/survival/model/example/exponential.cpp", "max_stars_repo_name": "rogard/boost_sandbox_statistics", "max_stars_repo_head_hexsha": "16aacbc716a31a9f7bb6c535b1c90dc3... |
from itertools import permutations
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from distancematrix.generator import ZNormEuclidean
from distancematrix.consumer import MatrixProfileLR
from distancematrix.calculator import AnytimeCalculator
from distancematrix.ostinato import find_conse... | {"hexsha": "799f617e6997b6bc93470e3c50cab4f680e3ffef", "size": 5371, "ext": "py", "lang": "Python", "max_stars_repo_path": "distancematrix/tests/test_ostinato.py", "max_stars_repo_name": "IDLabResearch/seriesdistancematrix", "max_stars_repo_head_hexsha": "c0e666d036f24184511e766cee9fdfa55f41df97", "max_stars_repo_licen... |
import cv2
from matplotlib import pyplot as plt
import numpy as np
import easygui
import imutils
import easyocr
def read_in_image():
"""
Function that reads a user selected image
:return: image that was selected
"""
easygui.msgbox(
"Select an image with a registration plate t... | {"hexsha": "980674b8cc3c93525296474b2ac3ffbc55e245af", "size": 5354, "ext": "py", "lang": "Python", "max_stars_repo_path": "LicensePlateExtractor.py", "max_stars_repo_name": "Ares2k/Reg-Plate-Extractor", "max_stars_repo_head_hexsha": "4a16139479687de95eb95e6b962bf666e1a3b4a5", "max_stars_repo_licenses": ["MIT"], "max_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.