text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
[STATEMENT]
lemma knows'_sub_knows: "knows' A evs <= knows A evs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. knows' A evs \<subseteq> knows A evs
[PROOF STEP]
by (auto simp: knows_decomp) | {"llama_tokens": 81, "file": null, "length": 1} |
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 26 14:44:34 2018
Workdir = F:\jTKount\1226
Filename = feature_sel.py
Describe: Some basic method to select the feature;
Reference: Luo Bin; blog:http://www.cnblogs.com/hhh5460/p/5186226.html
@author: OrenLi1042420545
"""
import numpy as np
import pandas as pd... | {"hexsha": "95f1539d1f23fc6a99efcc9b23585f22e454a8a0", "size": 7239, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature_sel.py", "max_stars_repo_name": "kala-oro/Feature_select", "max_stars_repo_head_hexsha": "611aaa7e4ebfeebdf030a90aced3218fae4bc66c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | {"hexsha": "3fd6fbebc62fc2d310c3fbc601211a283369eab9", "size": 14803, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tvm/topi/cuda/sparse.py", "max_stars_repo_name": "mycpuorg/tvm", "max_stars_repo_head_hexsha": "bf99e9a60818e4cd5bc67a471325fc4fdc92fc82", "max_stars_repo_licenses": ["Apache-2.0"], "max_s... |
abstract type GraphNetwork <: AbstractNetwork end
"""
evaluate(::AbstractNetwork, state)
(nn::AbstractNetwork)(state) = evaluate(nn, state)
Evaluate the neural network as an MCTS oracle on a single state.
Note, however, that evaluating state positions once at a time is slow and so you
may want to use a `Ba... | {"hexsha": "582dd4d948ec395a40304bd79988131ba7f09a7d", "size": 1542, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/networks/graph_network.jl", "max_stars_repo_name": "laurium-labs/AlphaZero.jl", "max_stars_repo_head_hexsha": "60aca46aaf1960258a5fff39a17b6afa021dbb1b", "max_stars_repo_licenses": ["MIT"], "ma... |
using Test, YaoBlocks, YaoArrayRegister
@testset "test constructor" for T in [Float16, Float32, Float64]
# NOTE: type should follow the axis
@test RotationGate(X, 0.1) isa PrimitiveBlock{1}
@test_throws TypeError RotationGate{1, Complex{T}, XGate} # will not accept non-real type
@test Rx(T(0.1)) isa R... | {"hexsha": "f937e986306700ffef21db51fcf3c1fcf1bee61f", "size": 1533, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/primitive/rotation_gate.jl", "max_stars_repo_name": "yihong-zhang/YaoBlocks.jl", "max_stars_repo_head_hexsha": "9bd8f309b5c258968fb5ce4c2f12fc5e854d8b68", "max_stars_repo_licenses": ["Apache-2... |
#' add
#'
#' Add two matrices: \code{ret = alpha*x + beta*y}.
#'
#' @param transx,transy Should x/y be transposed?
#' @param alpha,beta Scalars.
#' @param x,y Input data.
#' @param ret Either \code{NULL} or an already allocated fml matrix of the same
#' class and type as \code{x}.
#' @return Returns the matrix sum.
#... | {"hexsha": "4a2a4c508b6bcd57adff06495b298a263f3bca97", "size": 17680, "ext": "r", "lang": "R", "max_stars_repo_path": "R/linalg.r", "max_stars_repo_name": "fml-fam/fmlr", "max_stars_repo_head_hexsha": "7a9c8030435b9921fc832b27ef5f174a40c7792b", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 5, "max_stars_re... |
from collections import defaultdict
import PIL.Image as Im
import numpy as np
from .constants import *
def extract_table(table, origin):
out = []
for ri in range(num_rows*2):
row = []
for ci in range(num_cols):
x, y = origin[0] + table_offset_x * ci, origin[1] + table_offset_y * r... | {"hexsha": "f2445ae30445f8b2fbba1f9e6693020e275f1c2b", "size": 4401, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver/vision.py", "max_stars_repo_name": "pyrolitic/shenzhen_io_solitaire_solver", "max_stars_repo_head_hexsha": "04c8a32ab6faff215422867bf5c3e7f446dbdb61", "max_stars_repo_licenses": ["BSD-2-Cla... |
[STATEMENT]
lemma Crypt_synth_eq [simp]:
"Key K \<notin> H ==> (Crypt K X \<in> synth H) = (Crypt K X \<in> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Key K \<notin> H \<Longrightarrow> (Crypt K X \<in> synth H) = (Crypt K X \<in> H)
[PROOF STEP]
by blast | {"llama_tokens": 115, "file": "Inductive_Confidentiality_DolevYao_Message", "length": 1} |
import numpy as np
import scipy.signal as signal2
import math
import wave
try:
import pylab
except ImportError:
pass
import operator
from .process import *
from . import *
class ChromagramProcess(SimpleProcess):
"""docstring for Chroma2Process"""
def run(self):
#signal = self.signal.data
... | {"hexsha": "ba8a994f69cd84a9dd0c353f789c92916ed5c311", "size": 5452, "ext": "py", "lang": "Python", "max_stars_repo_path": "SigProc/chromagram.py", "max_stars_repo_name": "nsetzer/SigProc", "max_stars_repo_head_hexsha": "c944d9a21bf90107374fe9d04cad6e44f52c7b0a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
/**
* @file llfloaterflickr.cpp
* @brief Implementation of llfloaterflickr
* @author cho@lindenlab.com
*
* $LicenseInfo:firstyear=2013&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2013, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the... | {"hexsha": "e58709995c964f54429f62ade4e538b2f6ffa229", "size": 32598, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "indra/newview/llfloaterflickr.cpp", "max_stars_repo_name": "SaladDais/LLUDP-Encryption", "max_stars_repo_head_hexsha": "8a426cd0dd154e1a10903e0e6383f4deb2a6098a", "max_stars_repo_licenses": ["ISC"]... |
import FreeCAD
import numpy as np
from array import array
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
def convertToRGBAArray(RGBint):
Blue = RGBint & 255
Green = (RGBint >> 8) & 255
Red = (RGBint >> 16) & 255
return (Red, Green, Blue, 0xff)
class PixelContainer:
... | {"hexsha": "d53a4377aba6703c70080de04025ad286a11925f", "size": 3772, "ext": "py", "lang": "Python", "max_stars_repo_path": "FPPixelContainer.py", "max_stars_repo_name": "dliess/FreeCADFrontPanelSimulation", "max_stars_repo_head_hexsha": "f1ae7dc2b57e19202b479621077e515a59e1beec", "max_stars_repo_licenses": ["MIT"], "ma... |
# standard imports
import matplotlib.pyplot as plt
import numpy as np
# custom imports
from SDCA.sdca4crf.utils import entropy, kullback_leibler, logsubtractexp, subtractexp_scalar
class SequenceMarginals:
"""Represent anything that is decomposable over the nodes and edges of a sequential model.
It can be a... | {"hexsha": "8a6e232487cc300fab9ee577831c5be3da498dcd", "size": 7139, "ext": "py", "lang": "Python", "max_stars_repo_path": "SDCA/sdca4crf/parameters/sequence_marginals.py", "max_stars_repo_name": "Yaakoubi/Struct-CKN", "max_stars_repo_head_hexsha": "fa007fa71310866584bdf2e5b038e6663b94e965", "max_stars_repo_licenses": ... |
function avgNEES = ANEES(trans_err, rot_err, err_sigma)
stateErr = [rot_err;trans_err];
stateVar = err_sigma.^2;
avgNEES = 0;
stepNum = size(stateErr, 2);
for i = 1:stepNum
avgNEES = avgNEES + (1/stepNum)*stateErr(:,i)'*inv(diag(stateVar(:,i)))*stateErr(:,i);
end
end | {"author": "yuzhou42", "repo": "MSCKF", "sha": "d95d90c85b24f27001bd0ecdce8739b6e602b6df", "save_path": "github-repos/MATLAB/yuzhou42-MSCKF", "path": "github-repos/MATLAB/yuzhou42-MSCKF/MSCKF-d95d90c85b24f27001bd0ecdce8739b6e602b6df/KITTI Trials/ANEES.m"} |
import urllib
import urllib.request
import cv2
import os
import numpy as np
from multiprocessing.dummy import Pool as ThreadPool
import itertools
pic_num = 1
def store_raw_images(paths, links):
global pic_num
for link, path in zip(links, paths):
if not os.path.exists(path):
os.makedirs(pa... | {"hexsha": "83861e5226a0638b9d779f1f8da1c759469b8a74", "size": 2392, "ext": "py", "lang": "Python", "max_stars_repo_path": "images/get_images.py", "max_stars_repo_name": "adamshamsudeen/not-jackfruit", "max_stars_repo_head_hexsha": "245a9e6e1cbc1c48ca8050cbc0c87510b50210be", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import numpy as np
class environment():
# this class defines what actions are available, what they do, and how they modify the environment
# this class keeps track of the agents attributes including loss
def __init__(self, agent_position, agent_direction, environment_shape):
# position is a 2 elem... | {"hexsha": "3affc83aa69008ed5dbdd5fe12c6cb02dc6df7f2", "size": 8323, "ext": "py", "lang": "Python", "max_stars_repo_path": "lawn_mowing_environment.py", "max_stars_repo_name": "JacobZuliani/Efficient-Lawn-Mowing-with-Deep-Reinforcement-Learning", "max_stars_repo_head_hexsha": "7c508b242579270cedab354061709fb97355c58a",... |
// (c) Copyright 2008 Samuel Debionne.
//
// Distributed under the MIT Software License. (See accompanying file
// license.txt) or copy at http://www.opensource.org/licenses/mit-license.php)
//
// See http://code.google.com/p/fsc-sdk/ for the library home page.
//
// $Revision: $
// $History: $
/// \fi... | {"hexsha": "0f769089a0e49cc0e928046a815a18c06019a2e8", "size": 16888, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "fsc/include/fsx/sim_connect.hpp", "max_stars_repo_name": "gbucknell/fsc-sdk", "max_stars_repo_head_hexsha": "11b7cda4eea35ec53effbe37382f4b28020cd59d", "max_stars_repo_licenses": ["MIT"], "max_star... |
# Python libraries
import argparse, os
import torch
import sys
root_dir = os.path.abspath(__file__).split('examples')[0]
sys.path.insert(0, root_dir )
# Lib files
import lib.utils as utils
import lib.medloaders as medical_loaders
import lib.medzoo as medzoo
import lib.train as train
from lib.losses3D import DiceLoss,... | {"hexsha": "33b8bf4d48e66aed806e60365f01eccb944c34a0", "size": 11651, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/train_ribfrac_aug.py", "max_stars_repo_name": "eynaij/MedicalZooPytorch_RibFrac", "max_stars_repo_head_hexsha": "720cd2a3b7e62a47ed35b9e41e15db92e802ffb8", "max_stars_repo_licenses": ["M... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.filters import gaussian_filter1d
plt.style.use('seaborn-bright')
savedir = '/scratch/ws/1/haja565a-workspace2/quant/'
expNames = [ '700g12','700g13', '700g14','700g15', '700g16','700g17']#, ]#'700g... | {"hexsha": "d528a6bc9f2e496896c2b55b0b90884fbcc3c2f0", "size": 1404, "ext": "py", "lang": "Python", "max_stars_repo_path": "multiquantorder.py", "max_stars_repo_name": "harishpjain/cell_growth_division", "max_stars_repo_head_hexsha": "2e4b56a443bfd253a2d2b75656cbceb688f5ce04", "max_stars_repo_licenses": ["Apache-2.0"],... |
import numpy as np
from pathlib import Path
from gensim.models.fasttext import FastText as FT_gensim
from gensim.test.utils import datapath
class WordEmbeddingUtils:
"""
This contains utilities to manage words embeddings.
"""
def __init__(self):
super().__init__()
self.read_wv_model()
... | {"hexsha": "846612fd8fcb1b01bc004a51c18deb27556cb091", "size": 2366, "ext": "py", "lang": "Python", "max_stars_repo_path": "topic_modeling/word_embedings_utils.py", "max_stars_repo_name": "espoirMur/balobi_nini", "max_stars_repo_head_hexsha": "b68b9af4c84ec0f5b38ae8ba52d5f0d32b41ead3", "max_stars_repo_licenses": ["Unli... |
import proto.filestream_pb2_grpc as f_pb2_grpc
import proto.filestream_pb2 as f_pb2
import numpy as np
import grpc
def run():
channel = grpc.insecure_channel('127.0.0.1:50000')
stub = f_pb2_grpc.FileStreamServiceStub(channel)
print('Receiver started successfully')
while True:
try:
responses =... | {"hexsha": "6036c6ed7c2c878cfed03251a284b0adc42428ab", "size": 601, "ext": "py", "lang": "Python", "max_stars_repo_path": "local_server/Receiver.py", "max_stars_repo_name": "Birkenpapier/FileTransfer", "max_stars_repo_head_hexsha": "aef42aa6f81419c5cc37b4f513cb7b6450cbd648", "max_stars_repo_licenses": ["MIT"], "max_sta... |
##
## Software PI-Net: Pose Interacting Network for Multi-Person Monocular 3D Pose Estimation
## Copyright Inria and UPC
## Year 2021
## Contact : wen.guo@inria.fr
##
## The software PI-Net is provided under MIT License.
##
import os
import os.path as osp
import sys
import numpy as np
class Config:
trainset = ['... | {"hexsha": "8497160dbbabb7a5ac0052b0f7903a871bbdfc40", "size": 4772, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/config.py", "max_stars_repo_name": "GUO-W/PI-Net", "max_stars_repo_head_hexsha": "0c93a05d3aa277a80101f69ad196e5d6c8edba76", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st... |
# -*- coding: utf-8 -*-
"""
.. module:: skimpy
:platform: Unix, Windows
:synopsis: Simple Kinetic Models in Python
.. moduleauthor:: SKiMPy team
[---------]
Copyright 2020 Laboratory of Computational Systems Biotechnology (LCSB),
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
Licens... | {"hexsha": "d1165f1de31c20ec6d809f27f8ae0590964cbd46", "size": 6057, "ext": "py", "lang": "Python", "max_stars_repo_path": "skimpy/viz/plotting.py", "max_stars_repo_name": "AQ18/skimpy", "max_stars_repo_head_hexsha": "435fc50244f2ca815bbb39d525a82a4692f5c0ac", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
[STATEMENT]
lemma req_neq_pro [iff]: "req A r n I B \<noteq> pro B' ofr A' r' I' (cons M L) J C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. req A r n I B \<noteq> pro B' ofr A' r' I' \<lbrace>M, L\<rbrace> J C
[PROOF STEP]
by (auto simp: req_def pro_def) | {"llama_tokens": 123, "file": null, "length": 1} |
#!/usr/bin/env python
# Copyright (c) 2014, Robot Control and Pattern Recognition Group, Warsaw University of Technology
# 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 o... | {"hexsha": "dbe1659fd16f8fceee1cf792845e66a0e5109f13", "size": 11301, "ext": "py", "lang": "Python", "max_stars_repo_path": "common/locate_camera.py", "max_stars_repo_name": "RCPRG-ros-pkg/control_subsystem", "max_stars_repo_head_hexsha": "fd0b384b9027b43bb8bce3716cbbf6f9b3369d63", "max_stars_repo_licenses": ["BSD-3-Cl... |
from scipy.misc import comb
from math import e
n = 10
r = 0.03
z = 1000
w = 2376.07
R = 0.055
RawPm = open("./Raw/Pm.txt")
RawPw = open("./Raw/Pw.txt")
ResultC = open("./Result/ResultCommittee.txt", "w")
ResultI = open("./Result/ResultInsurer.txt", "w")
dataRow = int(input("Input the total amount data you want to cal... | {"hexsha": "b965b5e02a9ba809fc3177e5d87197b82483281e", "size": 1164, "ext": "py", "lang": "Python", "max_stars_repo_path": "Previous Contests/IMMC2016-master/Q4/Method1/Q4.py", "max_stars_repo_name": "stOOrz-Mathematical-Modelling-Group/IMMC_2022_Autumn", "max_stars_repo_head_hexsha": "4430eec4940055e434d8c6183332fc556... |
import numpy as np
import pandas as pd
import random
dataset = pd.read_csv("datas.csv")
label = pd.read_csv("labels.csv")
def choose_diff(dataset):
add_labels = dataset.apply(lambda x: x.sum(), axis=1).values
diff = []
count = 0
val_length = len(dataset.columns.values)
for item in add_labels:
if abs(item) > 85... | {"hexsha": "e0ebb1071740fe88aea1ec7ee5bb40ed17a556ba", "size": 3932, "ext": "py", "lang": "Python", "max_stars_repo_path": "DQN/true_acc.py", "max_stars_repo_name": "DaniellaAngel/MachineLearning", "max_stars_repo_head_hexsha": "9497278a85e0e097092e82b937e0d69fadd138f5", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
import early_stopping_analysis
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
dataset_orders = ['mrpc', 'rte', 'cola', 'sst']
def main():
unformatted_data = early_stopping_analysis.main()
data = format_data(unformatted_data)
#plt.style.use('ggplot')
plt.r... | {"hexsha": "a1c710173bb4c4ee6f2a3805fa3bf72d7fd6ba93", "size": 4224, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/early_stopping_plot.py", "max_stars_repo_name": "dodgejesse/bert_on_stilts", "max_stars_repo_head_hexsha": "63884f37f519fd1d6eafde43ba213a25a5575a82", "max_stars_repo_licenses": ["Apache-... |
[STATEMENT]
lemma zero_lt_num [simp]: "0 < (numeral n :: _ :: {canonically_ordered_monoid_add, semiring_char_0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (0::'a) < numeral n
[PROOF STEP]
by (metis not_gr_zero zero_neq_numeral) | {"llama_tokens": 104, "file": "Probabilistic_While_Bernoulli", "length": 1} |
#version 120
varying highp vec4 color;
void main(void)
{
gl_FragColor = color;
}
| {"hexsha": "f1bf1fadfa69c963f80a798e213cf8f0e2e51f97", "size": 87, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ext/libigl/external/cgal/src/CGAL_Project/demo/Polyhedron/resources/shader_no_light_no_selection.f", "max_stars_repo_name": "liminchen/OptCuts", "max_stars_repo_head_hexsha": "cb85b06ece3a6d1279863e... |
#%%
#%load_ext autoreload
#%autoreload 2
import os
import sys
import numpy as np
import scipy
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import dash
import dash_core_components as dcc
import dash_html_components as html
pd.set_option('display.max_rows', 800)
pd.set_option('displa... | {"hexsha": "5d1cf7cdcc17699d90be0dae9b769dee1de5d360", "size": 7731, "ext": "py", "lang": "Python", "max_stars_repo_path": "compute_without_app.py", "max_stars_repo_name": "architdatar/AdsVis", "max_stars_repo_head_hexsha": "464f78211901530178683fda39795d6e121ca369", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
class Loss:
def __init__(self):
pass
def get_loss(self, x, y):
pass
class Softmax_cross_entropy_loss(Loss):
def __init__(self):
pass
def get_loss(self, x, y):
shifted_logits = x - np.max(x, axis=1, keepdims=True)
Z = np.sum(np.exp(shifte... | {"hexsha": "bf87101046fe36df9b550d9cd1b07b726d5cae82", "size": 612, "ext": "py", "lang": "Python", "max_stars_repo_path": "FrankNN/losses.py", "max_stars_repo_name": "fpreiswerk/FrankNN", "max_stars_repo_head_hexsha": "66441195acdd6af237f1d780975440477019dbbf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
// Copyright John Maddock 2013.
// Use, modification and distribution are subject to 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)
#ifdef _MSC_VER
# define _SCL_SECURE_NO_WARNINGS
#endif
#include <boost/multiprecision/cpp_bi... | {"hexsha": "1bcb2f81fdcc42a77ae2d92cc83734aa1a1d9baf", "size": 17496, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "3rdParty/boost/1.62.0/libs/multiprecision/test/test_cpp_bin_float.cpp", "max_stars_repo_name": "sita1999/arangodb", "max_stars_repo_head_hexsha": "6a4f462fa209010cd064f99e63d85ce1d432c500", "max_st... |
#!/usr/bin/env python3
from mpl_toolkits.mplot3d import Axes3D
from rasterization import Rasterizer
from transformation import multiply
from transformation import TransformGenerator
import argparse
import DirectLinearTransform
import json
import math
import matplotlib
import matplotlib.image as mpimg
import matplotlib.... | {"hexsha": "324811f886f195dc8925fbe83aaf23b9d5e038a5", "size": 2631, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/homography.py", "max_stars_repo_name": "Pratool/homography", "max_stars_repo_head_hexsha": "c9daeaa3364b7c658b39c225952288dd828c332e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import numpy as np
import chess
import chess.variant
from BughouseEnv import BughouseEnv
# Mini Example for Agent
b = chess.Board()
fen= b.fen()
agent = BughouseEnv(0, 0)
state = agent('a2a3')
agent2 = BughouseEnv(0, 0)
agent2.load_state(state)
moves = agent2.get_legal_moves_dict()
for key, value in moves.items():
... | {"hexsha": "834eb21e8e89481a7493a3f04aff165d8f064634", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "testBHboard.py", "max_stars_repo_name": "MbProg/BughouseAlphaZero", "max_stars_repo_head_hexsha": "25d2f25417713a85b24eac3ce9a3a7f5c55ff5e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
[STATEMENT]
lemma sublist_split_concat:
assumes "a \<in> set (acc @ (as@x#bs))" and "sublist ys a"
shows "(\<exists>a\<in>set (rev acc @ as @ [x]). sublist ys a) \<or> sublist ys (concat bs @ cs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<exists>a\<in>set (rev acc @ as @ [x]). sublist ys a) \<or> sublist... | {"llama_tokens": 1703, "file": "Query_Optimization_IKKBZ_Optimality", "length": 17} |
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 22 15:30:59 2020
@author: JANAKI
"""
import cv2
import dlib
import numpy as np
import argparse
from contextlib import contextmanager
from model import model_choose
def get_args():
parser = argparse.ArgumentParser(description="To detect faces f... | {"hexsha": "e626b6b1cfa3909127c7216871bf22f08e56550b", "size": 4091, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "janu6134/Real-time-Age-Estimation", "max_stars_repo_head_hexsha": "3c0233d5d1b8c505d484592c02c38f2ed8a9f93e", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import numpy as np
import pycuda.autoinit # NOQA:401
import pycuda.gpuarray as gpuarray
from cufinufft import cufinufft
import utils
def _test_type1(dtype, shape=(16, 16, 16), M=4096, tol=1e-3):
complex_dtype = utils._complex_dtype(dtype)
dim = len(shape)
k = utils.gen_nu_pts(M, dim=dim).astype(dtype... | {"hexsha": "bc8257e8a8dcc436b0487bbdbe74d91170e5baf2", "size": 3136, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cufinufft/tests/test_basic.py", "max_stars_repo_name": "elliottslaughter/cufinufft", "max_stars_repo_head_hexsha": "bb1453dfe9dc12159e8e346eae79ad4d71fd566f", "max_stars_repo_licenses": ["A... |
import numpy as np
import h5py
import json
import sys
import csv
import illustris_python as il
def LoadMergHist(simu, subhaloID):
'''
return subhalo's main progenitor and merger history with snapshot
'''
if simu == 'TNG':
ldir = '/Raid0/zhouzb/merg_data/tng_DiskMerTree/%d.json' % su... | {"hexsha": "9f26575a3e69b25b847d330e461200240fc152ec", "size": 5927, "ext": "py", "lang": "Python", "max_stars_repo_path": "new/BarFractionWithRedshift.py", "max_stars_repo_name": "Max-astro/A2Project", "max_stars_repo_head_hexsha": "5d40263742133f214936b06b622d08092e694aed", "max_stars_repo_licenses": ["MIT"], "max_st... |
import equity_risk_model
import numpy
import pandas
from pytest_cases import fixture
@fixture(scope="module")
def factor_model():
universe = numpy.array(["A", "B", "C", "D", "E"])
factors = numpy.array(["foo", "bar", "baz"])
factor_loadings = pandas.DataFrame(
data=numpy.array(
[
... | {"hexsha": "924b4ac6e7eba997ae27b9ba8b5736f63d2a164c", "size": 2592, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/conftest.py", "max_stars_repo_name": "blaahhrrgg/equity-risk-model", "max_stars_repo_head_hexsha": "f94af6126e57597642dbcbf6896beeb52d879936", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
[STATEMENT]
lemma sep_list_conj_Cons [simp]: "\<And>* (x#xs) = (x ** \<And>* xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<And>* x # xs = (x \<and>* \<And>* xs)
[PROOF STEP]
by (simp add: sep_list_conj_def sep.foldl_absorb0) | {"llama_tokens": 111, "file": "Separation_Algebra_Separation_Algebra", "length": 1} |
# bchhun, {2019-12-12}
from ReconstructOrder.workflow.reconstructBatch import reconstruct_batch
import os, glob
import tifffile as tf
import pytest
import numpy as np
from ..testMetrics import mse
def test_reconstruct_source(setup_multidim_src):
"""
Runs a full multidim reconstruction based on supplied conf... | {"hexsha": "9c37e6512e4c5499dde5393eb23d76fc37cf72c8", "size": 2439, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration_tests/multidim_complete_pipeline_tests.py", "max_stars_repo_name": "czbiohub/reconstruct-order", "max_stars_repo_head_hexsha": "e729ae3871aea0a5ec2d42744a9448c7f0a93037", "max_st... |
! { dg-do run }
! PR29936 Missed constraint on RECL=specifier in unformatted sequential WRITE
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
program us_recl
real, dimension(5) :: array = 5.4321
integer :: istatus
open(unit=10, form="unformatted", access="sequential", RECL=16)
write(10, iostat=istatus) ar... | {"hexsha": "cffaa9e1e0d4b042c59d8472531636f213a42776", "size": 400, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/write_check3.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_lic... |
from PIL import Image, ImageEnhance, ImageOps
import numpy as np
import random
random.seed(0)
class BasicPolicy(object):
def __init__(self, mirror_ratio = 0, flip_ratio = 0, color_change_ratio = 0, is_full_set_colors = False, add_noise_peak = 0.0, erase_ratio = -1.0):
# Random color channel order
... | {"hexsha": "7bb70961c1eb297aeb43fedf67f9d5cf3967b76e", "size": 5045, "ext": "py", "lang": "Python", "max_stars_repo_path": "augment.py", "max_stars_repo_name": "kimtaehyeong/msnnff", "max_stars_repo_head_hexsha": "75586be601bbdbfafcdf4038bc08f239e119b417", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
\chapter{ Machine Learning}
% CHAPTER SETTINGS
\graphicspath{{./images/machine_learning/}}
\section{xx}
\subsection{Explaing bagging}
Known more formally as Bootstrapped Aggregation is where the same algorithm has different perspectives on the problem by being trained on different subsets of the training data.
\su... | {"hexsha": "4446dfd4907c10187bbc679bf3c734559630830e", "size": 650, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "main/chapters/machine_learning.tex", "max_stars_repo_name": "romanroson/veritas", "max_stars_repo_head_hexsha": "148c1aea2369beca96bf8929af260c6634ecbe4c", "max_stars_repo_licenses": ["MIT"], "max_st... |
subroutine printPartProp (gsmObj, proj, targ, results, ncas, intel)
! ======================================================================
!
! Prints out a table of emitted particle properties for the first nnnp
! reactions.
! Basically not used in CEM03; except for debugging.
!
! Definition of spt:
! ... | {"hexsha": "93de109ccddc214e6ea6d8f0741d543c24690ab7", "size": 3539, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/GeneralizedSpallation/printPartProp.f90", "max_stars_repo_name": "lanl/generalized-spallation-model", "max_stars_repo_head_hexsha": "4a2f01a873d2e8f2304b8fd1474d43d1ce8d744d", "max_stars_rep... |
import asammdf
import pandas as pd
from scipy import io
import time
import argparse
def parse_arguments():
"""
Parse commandline arguments
"""
parser = argparse.ArgumentParser()
parser.add_argument("--input_file", type=str, help="Path to MF4 file")
parser.add_argument("--output_file", default="... | {"hexsha": "85019e6f3a5f5d60847e7b71b543f205dd94ae11", "size": 1047, "ext": "py", "lang": "Python", "max_stars_repo_path": "mdfconverter2.py", "max_stars_repo_name": "chriswernette/MFDConverter", "max_stars_repo_head_hexsha": "bffe2cb4b09dbbaa22d92f1ecd6c6df48d066f78", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
theorem aodv_loop_freedom:
assumes "wf_net_tree n"
shows "closed (pnet (\<lambda>i. paodv i \<langle>\<langle> qmsg) n) \<TTurnstile> netglobal (\<lambda>\<sigma>. \<forall>dip. irrefl ((rt_graph \<sigma> dip)\<^sup>+))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. closed (pnet (\<lambda>i. paodv i... | {"llama_tokens": 340, "file": "AODV_variants_b_fwdrreps_B_Aodv_Loop_Freedom", "length": 2} |
# This file is part of the bapsflib package, a Python toolkit for the
# BaPSF group at UCLA.
#
# http://plasma.physics.ucla.edu/
#
# Copyright 2017-2018 Erik T. Everson and contributors
#
# License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full
# license terms and contributor agreement.
#
"""Module for t... | {"hexsha": "a7a0ad5cfd0d903da1afbafe1e56ebf92ad86adf", "size": 17703, "ext": "py", "lang": "Python", "max_stars_repo_path": "bapsflib/_hdf/maps/controls/templates.py", "max_stars_repo_name": "BaPSF/bapsflib", "max_stars_repo_head_hexsha": "999c88f813d3a7c5c244a77873850c5c5a4042b8", "max_stars_repo_licenses": ["BSD-3-Cl... |
root = joinpath(@__DIR__, "..")
using Pkg; Pkg.activate(root)
src = joinpath(root, "src")
out = joinpath(root, "notebooks")
using Literate
mkpath(out)
for f in ["Project.toml", "Manifest.toml"]
cp(joinpath(root, f), joinpath(out, f), force = true)
end
function preprocess(s)
s = "using Pkg; Pkg.activate(\".\");... | {"hexsha": "c906d803b6a19705a2a1a59337a4b4a29d35a109", "size": 648, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/notebooks.jl", "max_stars_repo_name": "dhairyagandhi96/diff-zoo", "max_stars_repo_head_hexsha": "20c7d03f2900253880d2c5fd288ed36bb04aa783", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# try modis
# https://e4ftl01.cr.usgs.gov/MOLT/MOD13C1.006/2000.06.09/
# http://hdfeos.org/zoo/NSIDC/MOD10C1_Day_CMG_Snow_Cover.py
import os
import matplotlib as mpl
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import numpy as np
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
i... | {"hexsha": "e28e664eb7704bacad9a885dda9a31c3298d6b14", "size": 2961, "ext": "py", "lang": "Python", "max_stars_repo_path": "gis/hdf_tests/modis_test.py", "max_stars_repo_name": "natelowry/data_visualization", "max_stars_repo_head_hexsha": "8d01b6ae5337ff5c7a4eda59e657a53d19af5f32", "max_stars_repo_licenses": ["MIT"], "... |
(* -------------------------------------------------------------------- *)
(* ------- *) Require Import Setoid Morphisms.
From mathcomp Require Import all_ssreflect all_algebra.
From mathcomp.analysis Require Import boolp reals realseq realsum distr.
From xhl.pwhile Require Import notations inhabited pwhile psemantic p... | {"author": "strub", "repo": "xhl", "sha": "5c4a4c0691438a2be9b650372ba95aca09ba3c56", "save_path": "github-repos/coq/strub-xhl", "path": "github-repos/coq/strub-xhl/xhl-5c4a4c0691438a2be9b650372ba95aca09ba3c56/prhl/prhl.v"} |
!=======================================================================
! RECIPROCAL
!=======================================================================
module reciprocal_inp
! k-space variables :
use controls !KJ 8/06
use struct, nphstr => nph
use kklist,only: nkp,usesym,nkx,nky,nkz,ktype
use... | {"hexsha": "ce282e4e26f8d9bb54a336eaba1a39a1dd951bd7", "size": 3566, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/OPCONSAT/oca_reciprocal_inp.f90", "max_stars_repo_name": "xraypy/feff85exafs", "max_stars_repo_head_hexsha": "ec8dcb07ca8ee034d0fa7431782074f0f65357a5", "max_stars_repo_licenses": ["BSD-2-Cl... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# sys.path.append('/home/dev1/opencv/lib/')
sys.path.append('/usr/local/lib/python2.7/site-packages')
# sys.path.append('/home/frappe/frappe-bench-dimela/env/lib/python2.7/site-packages')
import numpy as np
import cv2
import csv
import glob
class Searcher:
... | {"hexsha": "cfdd6d3b47c319dd323a634a8b7e4f5274bcfabd", "size": 5944, "ext": "py", "lang": "Python", "max_stars_repo_path": "erpbg/erpbg/pyimagesearch/update.py", "max_stars_repo_name": "InspireSoft/erpbg", "max_stars_repo_head_hexsha": "6da33242dc5b6a52e19cd6c17af2262dd33b6b41", "max_stars_repo_licenses": ["MIT"], "max... |
# -*- coding:utf8 -*-
# @TIME : 2021/3/18 10:27
# @Author : SuHao
# @File : model.py
import torch.nn as nn
from utils.parse_config import *
from utils.utils import *
from itertools import chain
def creat_modules(module_defs):
"""
Constructs module list of layer blocks from module configuration in m... | {"hexsha": "fabde9f4e30ff0af8bd61c6d6a406ccaa9429722", "size": 14795, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/modelv5.py", "max_stars_repo_name": "qqsuhao/YOLOv3-YOLOv3-tiny-yolo-fastest-xl--pytorch", "max_stars_repo_head_hexsha": "351023a929afb2109b2233d4c089cb1d3562be52", "max_stars_repo_license... |
import numpy as np
import pandas as pd
import scipy.spatial.distance as sci
import matplotlib.pyplot as plt
from scipy.stats import norm
from matplotlib.ticker import FormatStrFormatter
# Figure 6A
# Determination of Hamming distance
# Python script was used in JupyterLab
# Save figures as . . .
save = 'fig_hamming_... | {"hexsha": "7c3183085b6b35647faee3797e7f8512216195d6", "size": 8174, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deep Sequence Analysis/Hamming.py", "max_stars_repo_name": "HackelLab-UMN/PriSM-Inhibition-and-Seq-Analysis", "max_stars_repo_head_hexsha": "0d863d02e3da8ead4fdf8f6cf42ae1f64b0431b0", "max_stars_r... |
#include <boost/lexical_cast.hpp>
#include <pcl/common/common.h>
#include "global.h"
#include "rosinterface.h"
int
main(int argc, char** argv)
{
// ******************************** Command line parser for arguments *************************************
cv::CommandLineParser parser(argc, argv,
... | {"hexsha": "bdb6f824eb9fc495dec858511d1202d4a3787b22", "size": 4151, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "DetectAndLocalize/src/main.cpp", "max_stars_repo_name": "gopi231091/Object-Pose-Estimation", "max_stars_repo_head_hexsha": "11726fd008447fed3947c893d959b5acb9fd339e", "max_stars_repo_licenses": ["BS... |
import cv2
import numpy as np
import pandas as pd
import time
class Stitcher():
def __init__(self, stitch_mode=0, feature=0, search_ratio=0.75, offset_match=0):
self.stitch_mode = stitch_mode # "0" for translational mode and "1" for homography mode
self.feature = feature # "0" for... | {"hexsha": "d824da9c8a2577bf4eaf28597d7b6d3eab2a50f0", "size": 10430, "ext": "py", "lang": "Python", "max_stars_repo_path": "trad_stitch.py", "max_stars_repo_name": "MATony/DeepStitch", "max_stars_repo_head_hexsha": "650429daa17964d08a0e0e5e4be1f749bdaac847", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m... |
import gym
import numpy as np
from stable_baselines.common.policies import MlpPolicy as common_MlpPolicy
from stable_baselines.ddpg.policies import MlpPolicy as DDPG_MlpPolicy
from stable_baselines.common.vec_env import DummyVecEnv
from stable_baselines.ddpg.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise... | {"hexsha": "d4cb2bc38e4c038b1e0054623b3f664a28490879", "size": 2010, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment_4_pool_train.py", "max_stars_repo_name": "marjanin/tendon_stiffness", "max_stars_repo_head_hexsha": "b1dc379b09bbf9c044410a6bc51afbee0cba2e05", "max_stars_repo_licenses": ["MIT"], "max_... |
import os, sys
import numpy as np
import imageio
import json
import random
import time
import torch
import math
import shutil
import pathlib
from tqdm import tqdm, trange
import matplotlib.pyplot as plt
import argparse
import glob
import torch.nn.functional as F
import torchvision
import yaml
#from torch.utils.tenso... | {"hexsha": "0c11b4f56b548054401887288aed44d663ff5744", "size": 20261, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulate.py", "max_stars_repo_name": "chengine/nerf-pytorch-MPC", "max_stars_repo_head_hexsha": "1844b4f70ce3680a923784816605831abb74bd4a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
"""
Utilities for matplotlib plotting.
"""
from builtins import range
import matplotlib.pyplot as mpl
from . import dictionary, funcargparse
from ..dataproc import waveforms
import numpy as np
class IRecurrentPlot(object):
"""
Recurrent plot.
Can be used to plot multiple similar datasets in the sam... | {"hexsha": "f8cf0778600a75af6be6fc78424367c9c716235e", "size": 10058, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylablib/core/utils/plotting.py", "max_stars_repo_name": "AlexShkarin/pyLabLib-v0", "max_stars_repo_head_hexsha": "1c3c59d4bcbea4a16eee916033972ee13a7d1af6", "max_stars_repo_licenses": ["MIT"], "... |
import numpy as np
import glob
import shutil
import os
import cv2
from PIL import Image, ImageOps
from matplotlib import pyplot as plt
clothes_dir = '/home/ssai1/dhgwag/VITON/VITON-HD/datasets/train/cloth'
clothes_mask_dir = '/home/ssai1/dhgwag/VITON/VITON-HD/datasets/train/cloth-mask'
image_dir = '/home... | {"hexsha": "86c60ddf6f3d06b937150afb93d5a8fd13d31287", "size": 4645, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/clothes_blackenizer.py", "max_stars_repo_name": "choyoungjung/xray-align-AR", "max_stars_repo_head_hexsha": "18847c01008fe5a53bbdea5915a1a4e84e7c7f22", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma lookup_combine [simp]:
"lookup (combine f t1 t2) k = combine_options f (lookup t1 k) (lookup t2 k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. lookup (RBT.combine f t1 t2) k = combine_options f (lookup t1 k) (lookup t2 k)
[PROOF STEP]
by (simp add: combine_altdef) | {"llama_tokens": 119, "file": null, "length": 1} |
import pandas as pd
import numpy as np
from sklearn import preprocessing
import pygeohash as pgh
from copy import deepcopy
from sklearn.decomposition import PCA
import pygeohash as pgh
class Feature_Engineering:
def __init__(self):
self.features = []
def extract_dt_time(self, data):
data['Ho... | {"hexsha": "414331123a6a2b06de2c660296f998af8dd0a995", "size": 9490, "ext": "py", "lang": "Python", "max_stars_repo_path": "Feature_Engineering.py", "max_stars_repo_name": "tanishq1g/San_Francisco_Crime_Classification__kaggle", "max_stars_repo_head_hexsha": "68f46c9b647c366a5bfe0701959bac5faab3cf47", "max_stars_repo_li... |
# -*- coding: utf-8 -*-
"""
analyze and plot results of experiments
"""
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sb
import yaml
#E2: How large can I make my output domain without loosing skill?
E2_results = pd.read_csv('param_optimization/E2_results_t2m_34_t2m.csv',sep... | {"hexsha": "399d3c177bc52f4dc44c7e77e584978ea091393b", "size": 27089, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/param_optimization/plot_parameter_optimization.py", "max_stars_repo_name": "steidani/s2s-ai-challenge-kit-eth-ubern", "max_stars_repo_head_hexsha": "41fca2c6380d5aecfb7b322f005a74ab5333... |
# Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | {"hexsha": "16439363659ef65c20ef0ad8b76cf2419139fac4", "size": 17967, "ext": "py", "lang": "Python", "max_stars_repo_path": "annealed_flow_transport/aft.py", "max_stars_repo_name": "LaudateCorpus1/annealed_flow_transport", "max_stars_repo_head_hexsha": "28f348bb41e3acec5bc925355063d476f2e2aea2", "max_stars_repo_license... |
{-# LANGUAGE FlexibleContexts #-}
module Evaluator.Numerical where
import LispTypes
import Environment
import Evaluator.Operators
import Data.Complex
import Data.Ratio
import Data.Foldable
import Data.Fixed
import Numeric
import Control.Monad.Except
numericalPrimitives :: [(String, [LispVal] -> ThrowsError LispVal... | {"hexsha": "ef5df37af45cac2ec6c15705a3b5064dc87df88b", "size": 18263, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "src/Evaluator/Numerical.hs", "max_stars_repo_name": "zfnmxt/yasih", "max_stars_repo_head_hexsha": "f9afe967439e5ffd70437e94d62491fe5060d2ef", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st... |
[STATEMENT]
lemma parts_insert_subset_impl:
"\<lbrakk>x \<in> parts (insert a G); x \<in> parts G \<Longrightarrow> x \<in> synth (parts H); a \<in> synth (parts H)\<rbrakk>
\<Longrightarrow> x \<in> synth (parts H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>x \<in> parts (insert a G); x \<in> pa... | {"llama_tokens": 556, "file": "IsaNet_infrastructure_Message", "length": 2} |
################################################################################
# HACKATHON PARTICIPANTS -- DO NOT EDIT THIS FILE #
################################################################################
import sys
import time
import pickle
import numpy
import pathlib
testing_da... | {"hexsha": "7aeb4893043b914a77557dafb47c3bd734b42b2e", "size": 3833, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing.py", "max_stars_repo_name": "niwarei/hptbi-hackathon", "max_stars_repo_head_hexsha": "81e1d32ed27b2d79d8bbc40651d79081cee71d02", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
#include <config.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_vector.h>
/* Compile all the inline matrix functions */
#define COMPILE_INLINE_STATIC
#include "build.h"
#include <gsl/gsl_matrix.h>
| {"hexsha": "fe595fa189f61d40e911309e35a30b21f12325a4", "size": 201, "ext": "c", "lang": "C", "max_stars_repo_path": "gsl-an/matrix/matrix.c", "max_stars_repo_name": "juandesant/astrometry.net", "max_stars_repo_head_hexsha": "47849f0443b890c4a875360f881d2e60d1cba630", "max_stars_repo_licenses": ["Net-SNMP", "Xnet"], "ma... |
import numpy as np
import cupy as cp
import pickle
from cupy.sparse import coo_matrix
from cupy.sparse import csr_matrix
class model_saver:
def __init__(self, model):
self._model = model
if self._model._layer_type == 'Sparse':
if self._model._comp_type == 'GPU':
sel... | {"hexsha": "f95d06c9d5a778f184f2dd6282437329a72f1caf", "size": 7043, "ext": "py", "lang": "Python", "max_stars_repo_path": "sparana/saver.py", "max_stars_repo_name": "jngannon/SpaRaNa", "max_stars_repo_head_hexsha": "35d8853ab842681469db08ef92b4f914e81922a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
# =============================================================================
# Authors: PAR Government
# Organization: DARPA
#
# Copyright (c) 2016 PAR Government
# All rights reserved.
# ==============================================================================
import numpy as np
from maskgen.algorithms.optica... | {"hexsha": "54633a9b629135fbe4e2edc5587e4f290c0aa97d", "size": 1377, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/algorithms/tests_optical_flow.py", "max_stars_repo_name": "j-h-m/Media-Journaling-Tool", "max_stars_repo_head_hexsha": "4ab6961e2768dc002c9bbad182f83188631f01bd", "max_stars_repo_licenses": ... |
import pygame
from Play.caracters import Human,Goblin
from Play.environment import Nature
import numpy as np
import random
from Utility import is_member ,Direction,full_file
pygame.init()
clock = pygame.time.Clock()
e = Nature()
#e.play_sound()
g = []
number_of_enemy = 10
for n in range(number_of_enemy):
rand... | {"hexsha": "3a857c4ca47360b4043d659c85492597bbe81d0b", "size": 6177, "ext": "py", "lang": "Python", "max_stars_repo_path": "game_scene.py", "max_stars_repo_name": "orenber/Goblins-War", "max_stars_repo_head_hexsha": "3978095b8c2fd661501daf9bacc272c5e8c5daa1", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_coun... |
[STATEMENT]
lemma map_cond_spmf_fst: "map_spmf f (cond_spmf_fst p x) = cond_spmf_fst (map_spmf (apsnd f) p) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. map_spmf f (cond_spmf_fst p x) = cond_spmf_fst (map_spmf (apsnd f) p) x
[PROOF STEP]
by(auto simp add: cond_spmf_fst_def spmf.map_comp intro!: map_spmf_cong ar... | {"llama_tokens": 181, "file": "Constructive_Cryptography_CM_More_CC", "length": 1} |
Require Import Helix.MSigmaHCOL.MemSetoid.
Require Import Helix.LLVMGen.Correctness_Prelude.
Require Import Helix.LLVMGen.Correctness_Invariants.
Require Import Helix.LLVMGen.Correctness_NExpr.
Require Import Helix.LLVMGen.Correctness_MExpr.
Require Import Helix.LLVMGen.IdLemmas.
Require Import Helix.LLVMGen.StateCount... | {"author": "vzaliva", "repo": "helix", "sha": "5d0a71df99722d2011c36156f12b04875df7e1cb", "save_path": "github-repos/coq/vzaliva-helix", "path": "github-repos/coq/vzaliva-helix/helix-5d0a71df99722d2011c36156f12b04875df7e1cb/coq/LLVMGen/Pure.v"} |
[STATEMENT]
lemma mult_ceiling_le_Ints:
assumes "0 \<le> a" "a \<in> Ints"
shows "(of_int \<lceil>a * b\<rceil> :: 'a :: linordered_idom) \<le> of_int(\<lceil>a\<rceil> * \<lceil>b\<rceil>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. of_int \<lceil>a * b\<rceil> \<le> of_int (\<lceil>a\<rceil> * \<lceil>b\<r... | {"llama_tokens": 210, "file": null, "length": 1} |
#!/usr/bin/env python
import os
import numpy as np
import time
import copy
import sys
import argparse
ang_2_bohr = 1.0/0.52917721067
hart_2_ev = 27.21138602
import cp2k_spm_tools.cp2k_grid_orbitals as cgo
from cp2k_spm_tools import common, cube
from mpi4py import MPI
comm = MPI.COMM_WORLD
mpi_rank = comm.Get_rank(... | {"hexsha": "67dd99e24a32b56051bbb6cc4a2b6b276e28e468", "size": 7954, "ext": "py", "lang": "Python", "max_stars_repo_path": "bader_bond_order.py", "max_stars_repo_name": "eimrek/cp2k-spm-tools", "max_stars_repo_head_hexsha": "94b158e7e93bc4cb76e88d59d31347fafdda5e64", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
% test_all_fbp
% todo:
% cuboid_im test
% cuboid_proj test
list = {
'cbct_back test'
'ct_geom test'
'image_geom test'
'sino_geom test'
'cylinder_proj test'
'df_example1'
'ellipse_im test'
'ellipse_sino test'
'ellipsoid_proj test'
'ellipsoid_im test'
'fbp_fan_arc_example'
'fbp_fan_arc_point'
'fbp_fan_flat_example'
'fb... | {"author": "JeffFessler", "repo": "mirt", "sha": "b7f36cc46916821e8bc8502301b1554ebc7efe1d", "save_path": "github-repos/MATLAB/JeffFessler-mirt", "path": "github-repos/MATLAB/JeffFessler-mirt/mirt-b7f36cc46916821e8bc8502301b1554ebc7efe1d/fbp/test_all_fbp.m"} |
# -*- coding: utf-8 -*-
from FGJumperMaster import FGJumperMaster
from ADBHelper import ADBHelper
from FGVisonUtil import FGVisionUtil as vutil
import cv2
import numpy as np
import time
import datetime
# 初次读入图片
img = ADBHelper.getScreenShotByADB()
vutil.printImgInfo(img)
adb = ADBHelper(1080, 1920)
cv2.namedWindow(... | {"hexsha": "f5024910f093fcb1131aa5215c2e079461a6080c", "size": 3315, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "isoundy000/FGJumperMaster", "max_stars_repo_head_hexsha": "10063f167fbba7d9e16375965f7320a3966169f6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
# Copyright (c) 2016-present, Facebook, Inc.
#
# 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... | {"hexsha": "7fc13aa05801cbe30a34a72fa46f11358f55c60f", "size": 1667, "ext": "py", "lang": "Python", "max_stars_repo_path": "caffe2/python/operator_test/lars_test.py", "max_stars_repo_name": "nrsatish/caffe2", "max_stars_repo_head_hexsha": "a8e7515f33c196e7999277bca2b13aefea8e2573", "max_stars_repo_licenses": ["Apache-2... |
#!/usr/bin/env python3
from sympy import *
from mpmath import *
from matplotlib.pyplot import *
#init_printing() # make things prettier when we print stuff for debugging.
# ************************************************************************** #
# Self-Inductance L of copper coil with massive aluminium cylin... | {"hexsha": "140a38a718eb14897a2b99914562ea869ceb6170", "size": 6912, "ext": "py", "lang": "Python", "max_stars_repo_path": "versuche/skineffect/python/vollzylinder_L.py", "max_stars_repo_name": "alpenwasser/laborjournal", "max_stars_repo_head_hexsha": "1676414fda402c360e713d29ddc79edd0873adb0", "max_stars_repo_licenses... |
# An implementation from "TF_PetroWU"
import scipy.io as scio
import skimage
import numpy as np
import math
from PIL import Image
import os
from skimage import transform, io as skio
mean_rgb = [122.675, 116.669, 104.008]
scales = [0.6, 0.8, 1.2, 1.5]
rorations = [-45, -22, 22, 45]
gammas = [.05, 0.8, 1.2, 1.5]
def g... | {"hexsha": "65239ed706bc958de3244a09435cde24d3730fe6", "size": 2638, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess.py", "max_stars_repo_name": "BigBugX/TensorFlow_MobileNetV2_PortraitMatting", "max_stars_repo_head_hexsha": "2f299900fd50bb32806cd05a725f42e6cc0cd91d", "max_stars_repo_licenses": ["MIT"... |
C This File is Automatically generated by ALOHA
C The process calculated in this file is:
C P(1,2)*P(2,1) - P(-1,1)*P(-1,2)*Metric(1,2)
C
SUBROUTINE MP_VVS4L2P0_1(P2, S3, COUP, M1, W1, P1, COEFF)
IMPLICIT NONE
COMPLEX*32 CI
PARAMETER (CI=(0Q0,1Q0))
COMPLEX*32 TMP2
... | {"hexsha": "fa6e37c10d9666fa72843457c4e570adb8456e84", "size": 8072, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "examples/First_Project/mg_processes/signal1/Source/DHELAS/MP_VVS4L2P0_1.f", "max_stars_repo_name": "JaySandesara/madminer", "max_stars_repo_head_hexsha": "c5fcb9fbbd5d70f7a07114e4ea6afc4e3c4518fb"... |
[STATEMENT]
lemma veval'_closed:
assumes "\<Gamma> \<turnstile>\<^sub>v t \<down> v" "closed_except t (fmdom \<Gamma>)" "closed_venv \<Gamma>"
assumes "wellformed t" "wellformed_venv \<Gamma>"
shows "vclosed v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. vclosed v
[PROOF STEP]
using assms
[PROOF STATE]
proo... | {"llama_tokens": 37209, "file": "CakeML_Codegen_Rewriting_Big_Step_Value_ML", "length": 137} |
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
if cap.isOpened() is False:
print("Capture_Error!")
def nothing(x):
pass
cv2.namedWindow("Blue")
cv2.namedWindow("Red")
cv2.namedWindow("Yellow")
cv2.createTrackbar("H", "Blue", 0, 255, nothing)
cv2.createTrackbar("S", "Blue", 0, 255, nothing)
cv2.createTrac... | {"hexsha": "a46cc13fef0564ba5cba752f43d7258a013621c1", "size": 2314, "ext": "py", "lang": "Python", "max_stars_repo_path": "color.py", "max_stars_repo_name": "tiger0421/GetValOfThereshold3ColoredBall", "max_stars_repo_head_hexsha": "a8a0c0e4d0f54ac5ac34502e5de87916ce6901a8", "max_stars_repo_licenses": ["BSD-2-Clause"],... |
// Copyright (C) 2001-2003
// William E. Kempf
// Copyright (C) 2007-8 Anthony Williams
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/threa... | {"hexsha": "4ba36920d89a0c11961d75cab63020ead7c0e580", "size": 22640, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/boost/1.69.0-r0/boost_1_69_0/libs/thread/src/pthread/thread.cpp", "max_stars_repo_name": "sota... |
import os
import shutil
import time
import numpy as np
import matplotlib.pyplot as plt
import SimpleITK as sitk
input_path = None # ANHIR data path
output_path = None # Output path
original = "ANHIR_Data" # assumes that the last folder is names "ANHIR_Data", otherwise replace
to_replace = "ANHIR_MHA" # assumes t... | {"hexsha": "8f8addd4bfbd69d9b01c1c2218f8c9e25be7ecc8", "size": 2111, "ext": "py", "lang": "Python", "max_stars_repo_path": "parse_to_mha.py", "max_stars_repo_name": "lNefarin/DeepHistReg", "max_stars_repo_head_hexsha": "563dd606899b58e9d220133938d25fd293da15d0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou... |
import game.world8.level7 -- hide
namespace mynat -- hide
/-
# Advanced Addition World
## Level 8: `eq_zero_of_add_right_eq_self`
The lemma you're about to prove will be useful when we want to prove that $\leq$ is antisymmetric.
There are some wrong paths that you can take with this one.
-/
/- Lemma
If $a$ and $b$... | {"author": "ImperialCollegeLondon", "repo": "natural_number_game", "sha": "f29b6c2884299fc63fdfc81ae5d7daaa3219f9fd", "save_path": "github-repos/lean/ImperialCollegeLondon-natural_number_game", "path": "github-repos/lean/ImperialCollegeLondon-natural_number_game/natural_number_game-f29b6c2884299fc63fdfc81ae5d7daaa3219f... |
import torch
import torch.nn as nn
from torch.autograd import Function, Variable
import numpy as np
class GRL(Function):
def __init__(self, beta=1):
self.beta = beta
def forward(self, x):
return x.view_as(x)
def backward(self, grad_output):
output = grad_output*(-1)*self.beta
return output
def grad_rever... | {"hexsha": "b3b46277ccbce2d7bfeb0527c1e863d502da71e5", "size": 2404, "ext": "py", "lang": "Python", "max_stars_repo_path": "domain_adapt.py", "max_stars_repo_name": "Flsahkong/seeDiffDA", "max_stars_repo_head_hexsha": "8c5219b1eb0edb69f24cff03dbbd1a66bdd6cc42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 62,... |
import datetime
import networkx as nx
import numpy as np
import bisect, pickle
import random, argparse
import community
def sample_discrete(dist):
# sample a discrete distribution dist with values = dist.keys() and
# probabilities = dist.values()
i = 0
acc = 0
values = {}
probs = []
for e... | {"hexsha": "46b9d86650b3f54484402afcbf772342398fcbac", "size": 1910, "ext": "py", "lang": "Python", "max_stars_repo_path": "GraphGenerator/models/sbm.py", "max_stars_repo_name": "xiangsheng1325/GraphGenerator", "max_stars_repo_head_hexsha": "0164c7c1ba14fface015425a619053585f471ef3", "max_stars_repo_licenses": ["MIT"],... |
#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <actionlib_tutorials/AveragingAction.h>
#include <robot_arm_aansturing/positionAction.h>
#include <boost/thread.hpp>
void spinThread()
{
ros::spin();
}
int main (int argc, char **argv)
{
r... | {"hexsha": "ca622d07475e0e30ce110bbccb3ec6c7f03503b9", "size": 1459, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "application/src/robot_arm_aansturing/src/Client.cpp", "max_stars_repo_name": "nvg-ict/robot_simulation", "max_stars_repo_head_hexsha": "0d98b21f2c6805a3061c82ef984272baa3343a77", "max_stars_repo_lic... |
#pragma once
#include <iostream>
#include <memory>
#include <unordered_set>
#include <unordered_map>
#include <boost/serialization/set.hpp>
#include <sdm/types.hpp>
#include <sdm/tools.hpp>
#include <sdm/public/boost_serializable.hpp>
namespace sdm
{
/**
* @class GraphNode
*
* @brief Node of gra... | {"hexsha": "c59a10aef715141358dc2704ee4fa5c4a7226f9f", "size": 2768, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/sdm/utils/struct/graph_node.hpp", "max_stars_repo_name": "SDMStudio/sdms", "max_stars_repo_head_hexsha": "43a86973081ffd86c091aed69b332f0087f59361", "max_stars_repo_licenses": ["MIT"], "max_star... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | {"hexsha": "ed3f8e20dc90bb630e99062f375acb4faeb543af", "size": 8288, "ext": "py", "lang": "Python", "max_stars_repo_path": "idaes/models_extra/power_generation/unit_models/tests/test_waterwall.py", "max_stars_repo_name": "OOAmusat/idaes-pse", "max_stars_repo_head_hexsha": "ae7d3bb8e372bc32822dcdcb75e9fd96b78da539", "ma... |
subroutine cal_parm_read
!! ~ ~ ~ PURPOSE ~ ~ ~
!! this function computes new paramter value based on
!! user defined change
use input_file_module
use maximum_data_module
use calibration_data_module
implicit none
integer, dimension (:), allocatable :: elem_c... | {"hexsha": "18984e5733eaee0604c08568dec3175e61d00478", "size": 1834, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/data/program_analysis/multifile_multimod/mfmm_02/cal_parm_read.f90", "max_stars_repo_name": "mikiec84/delphi", "max_stars_repo_head_hexsha": "2e517f21e76e334c7dfb14325d25879ddf26d10d", "ma... |
import argparse
import random
import numpy as np
from sklearn.model_selection import train_test_split
import torch
import torch.nn as nn
from torch import optim
from torch.utils.data import Dataset, DataLoader
import dataLoader as loader
import preprocessing as pproc
import models
device = torch.device("cuda" if torch... | {"hexsha": "6d6b8b2e7bca83fcbee0eb3377c226f88daeec48", "size": 8838, "ext": "py", "lang": "Python", "max_stars_repo_path": "question-answer-matching/train.py", "max_stars_repo_name": "lijian10086/nlp-tutorial", "max_stars_repo_head_hexsha": "4b3773b13d975e7ca812dec6b9409e43dac44534", "max_stars_repo_licenses": ["MIT"],... |
(* begin hide *)
From Coq Require Import
Arith
Lia.
(* Fake dependency due to [eutt_iter'']. To remove once the lemma is moved to the itree library *)
From Vellvm Require Import
Utils.Tactics
Utils.PropT.
From ITree Require Import
ITree
Eq.Eqit.
Set Implicit Arguments.
Set Strict Implic... | {"author": "vellvm", "repo": "vellvm", "sha": "c9b7d6a283c4954b25bf7bcb1b1e54b92b62d699", "save_path": "github-repos/coq/vellvm-vellvm", "path": "github-repos/coq/vellvm-vellvm/vellvm-c9b7d6a283c4954b25bf7bcb1b1e54b92b62d699/src/coq/Utils/TFor.v"} |
from numpy.random import seed
seed(8) #1
import tensorflow
tensorflow.random.set_seed(7)
# tensorflow.random.set_random_seed(7)
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import os
from tensorflow.keras import backend as K
from tensorflow.keras.models ... | {"hexsha": "6fa86d571f6303c40d5073cb60a17142b966384d", "size": 21245, "ext": "py", "lang": "Python", "max_stars_repo_path": "coronet/main2_lps_gradient_quantization.py", "max_stars_repo_name": "sabuj7177/CovidProject", "max_stars_repo_head_hexsha": "b4b7bcfa5ace165520507f489dc74da7b695e2f0", "max_stars_repo_licenses": ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Dict, Iterable, List, Optional, Sized, Tuple, Union
import torch
from numpy import ndarray
from torch import Tensor
from combustion.util import check_dimension, check_dimension_match, check_is_array, check_is_tensor, check_ndim_match
from .convert imp... | {"hexsha": "a622ccf340973a90fd9ecdb054ffb03774cbe32a", "size": 20027, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/combustion/vision/bbox.py", "max_stars_repo_name": "TidalPaladin/combustion", "max_stars_repo_head_hexsha": "69b9a2b9baf90b81ed9098b4f0391f5c15efaee7", "max_stars_repo_licenses": ["Apache-2.0... |
import numpy as np
WAVELENGTH = np.arange(0,12001,1)
WMIN = 3825
WMAX = 9200
MDSPEC = 'm5.active.ha.na.k.fits'
AMS = np.linspace(1.05,1.2,num=6,dtype='float') | {"hexsha": "49a29bd7084089ee20d8cda6e567a40e8737fb6e", "size": 158, "ext": "py", "lang": "Python", "max_stars_repo_path": "config.py", "max_stars_repo_name": "RileyWClarke/flarubin", "max_stars_repo_head_hexsha": "eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
import sys
import numpy as np
import os
import time
import math
from PIL import Image
import cv2
from datetime import datetime
from pynq import Xlnk
from pynq import Overlay
import pynq
import struct
from multiprocessing import Process, Pipe, Queue, Event, Manager
from IoU import Average_IoU
IMG_DIR = '../sample1000/... | {"hexsha": "52cad1dfe95b83914ea95f4fed2a4c3946a33277", "size": 6081, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deploy/run_multiprocess.py", "max_stars_repo_name": "guoyudejin/SkrSkr", "max_stars_repo_head_hexsha": "433aac617b549fcf387c8196c292e211eadffa71", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module Reflective where
record ReflectiveSubuniverse {ℓ} : Type (lsucc ℓ) where
field
P : Type ℓ → Type ℓ
R : Type ℓ → Type ℓ
η : (A : Type ℓ) → A → R A
-- replete : (A B : Type ℓ) → P A → A ≃ B → P B
| {"hexsha": "536bb4c0703ef50be4afc2f2f6efddda5d2533ce", "size": 301, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "theorems/stash/modalities/Reflective.agda", "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": ["MIT"], "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.