text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import numpy as np
import cv2
import time
import xlsxwriter
warped = None,
roiPts = []
startTime = 0
endTime = 0
fgbg = None
last =None
warpedAux = None
row = 0
col = 0
worksheet = None
countFrames = 0
countFramesTrain = 0
countAux = 0
countFramesLeftArmAuX = 0
countFramesRightArmAux = 0
countFramesTopArmAux = 0
c... | {"hexsha": "79b21b8c81ba8b6a226ce7399fe9d13f9e9dff83", "size": 20047, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "naidjeldias/GMM_Tracking", "max_stars_repo_head_hexsha": "990a2ac913b051815d12ea7305ae23f79bdad45c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
import copy
import glob
import os
import sys
import pprint
from itertools import groupby
from textwrap import wrap
import numpy as np
import pandas as pd
import pylab as plt
import tqdm
from .. import haven_jobs as hjb
from .. import haven_utils as hu
from .. import haven_share as hd
def get_plot(exp_list, savedir_... | {"hexsha": "fe8b243fd6e7ec594cd89299acb01e69c90e1e48", "size": 16517, "ext": "py", "lang": "Python", "max_stars_repo_path": "haven/haven_results/plots_line.py", "max_stars_repo_name": "mlaradji/haven-ai", "max_stars_repo_head_hexsha": "f785aaa67e4833832e98d5b65480373e52c7460d", "max_stars_repo_licenses": ["Apache-2.0"]... |
using LinearAlgebra
struct BasicTrustRegion{T <: Real}
η1:: T
η2:: T
γ1:: T
γ2:: T
end
function BTRDefaults()
return BasicTrustRegion(0.01,0.9,0.5,0.5)
end
mutable struct BTRState
iter::Int
x::Vector
xcand::Vector
g::Vector
step::Vector
Δ::Float64
ρ::Float64
tol:... | {"hexsha": "ba8ba05d741c39d80769fbed2beae6aad8c840e5", "size": 4564, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "NLP/btr.jl", "max_stars_repo_name": "fbastin/optim", "max_stars_repo_head_hexsha": "07a202fc3af1e061a5580a0308949699b15a39a7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star... |
module Acc where
data Acc ( A : Set ) ( Lt : A -> A -> Set) : A -> Set where
acc : ( b : A )
-> ( ( a : A ) -> Lt a b -> Acc A Lt a )
-> ( Acc A Lt b )
data Nat : Set where
zero : Nat
succ : Nat -> Nat
data Lt : Nat -> Nat -> Set where
ltzero : ( x : Nat ) -> Lt zero (succ x)
ltsucc... | {"hexsha": "e3ec5b648993552555e8d0e7316088178e4bb95a", "size": 2426, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "examples/AccP.agda", "max_stars_repo_name": "andreasabel/miniagda", "max_stars_repo_head_hexsha": "4a674eddcc8950f37fcc723b26f81d5164b05f08", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
[STATEMENT]
lemma ESPEC_rule_iff: "ESPEC \<Phi> \<Psi> \<le> ESPEC \<Phi>' \<Psi>' \<longleftrightarrow> (\<forall>e. \<Phi> e \<longrightarrow> \<Phi>' e) \<and> (\<forall>x. \<Psi> x \<longrightarrow> \<Psi>' x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (ESPEC \<Phi> \<Psi> \<le> ESPEC \<Phi>' \<Psi>') = ((\... | {"llama_tokens": 194, "file": "VerifyThis2019_lib_Exc_Nres_Monad", "length": 1} |
"""
RDKit Optimizers
================
#. :class:`.MMFF`
#. :class:`.UFF`
#. :class:`.ETKDG`
#. :class:`.MetalOptimizer`
Wrappers for optimizers within the :mod:`rdkit` code.
.. code-block:: python
import stk
import stko
# Optimizers work on stk.Molecule.
polymer = stk.ConstructedMolecule(
b... | {"hexsha": "9117bb3108ae9646ce3a412534494ca40aba531a", "size": 29369, "ext": "py", "lang": "Python", "max_stars_repo_path": "stko/optimizers/rdkit.py", "max_stars_repo_name": "SFin94/stko", "max_stars_repo_head_hexsha": "7a913c7f0c4b616ddc52fef7eeb44c539176c351", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
import pyfits
import click
from scipy import ndimage
import os
import numpy as np
@click.command()
@click.argument('filename' )
def fits2fits(filename):
print("------------------")
# hdulist = pyfits.open(filename,mode="update")
hdulist = pyfits.open(filename)
print hdulist.info()
print "----------... | {"hexsha": "3909c6edb9d97b7b08dae16fe67cc137cf6e0a97", "size": 1319, "ext": "py", "lang": "Python", "max_stars_repo_path": "telescope/indi/tools/fits2float32.py", "max_stars_repo_name": "tlemoult/spectroDb", "max_stars_repo_head_hexsha": "0d674e2c7ff3beee0ccda7cfa69c6247ca7f2a2e", "max_stars_repo_licenses": ["MIT"], "m... |
(*
Title: Theory AdvKnowledge.thy
Author: Maria Spichkova <maria.spichkova at rmit.edu.au>, 2014
*)
section \<open>Knowledge of Keys and Secrets\<close>
theory KnowledgeKeysSecrets
imports CompLocalSecrets
begin
text_raw \<open>
~\\
An component $A$ knows a secret $m$ (or some secret expression $m$) that doe... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/CryptoBasedCompositionalProperties/KnowledgeKeysSecrets.thy"} |
from numba import njit, types, typed, prange
from typing import Dict, List
import numpy as np
@njit
def reverse_complement(nucleotides: str, mapping: Dict) -> str:
"""Return reverse complement of given nucletides.
Parameters
--------------------------
nucleotides: str,
Nucleotides whose rever... | {"hexsha": "7acc313e8bb5ca88de4755421b543331b349434b", "size": 2302, "ext": "py", "lang": "Python", "max_stars_repo_path": "ucsc_genomes_downloader/utils/extract_sequence.py", "max_stars_repo_name": "LucaCappelletti94/ucsc_genomes_downloader", "max_stars_repo_head_hexsha": "fdef5fae76a78606279aa3e49e0b009a1b34a436", "m... |
#! python3
import numpy
import time
def main():
matrix = numpy.random.randint(10, size=(10000, 10000))
vector = numpy.random.randint(10, size=(1, 10000))
startTime = time.time()
product = numpy.dot(vector, matrix)
print(product)
endTime = time.time()
totalTime = format(endTime - startTi... | {"hexsha": "72b025be56aefd8118af1619a9220634f6d917f1", "size": 408, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/src/matrix.py", "max_stars_repo_name": "spencerwooo/compilers-lang-recognization", "max_stars_repo_head_hexsha": "bca9d8320e974210fc6ecf46537d37153aba5136", "max_stars_repo_licenses": ["MIT"... |
from tqdm import tqdm
import os
import numpy as np
import torch
from .squad_preprocess import SquadResult
from torch.utils.data import DataLoader, SequentialSampler
from .utils import write_predictions_squad, get_raw_scores, apply_no_ans_threshold, make_eval_dict, merge_eval, find_all_best_thresh_v2
import argparse
imp... | {"hexsha": "81144cacad45c019b8f80c830b6aa0ea124d333b", "size": 10175, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Distiller/evaluate.py", "max_stars_repo_name": "haroldNLP/Distiller", "max_stars_repo_head_hexsha": "f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
using ModelingToolkit, LinearAlgebra, Test
@parameters t k[1:13]
@variables A(t) B(t) C(t) D(t)
rxs = [Reaction(k[1], nothing, [A]), # 0 -> A
Reaction(k[2], [B], nothing), # B -> 0
Reaction(k[3],[A],[C]), # A -> C
Reaction(k[4], [C], [A,B]), ... | {"hexsha": "9be0fd6d23f2704fa581204a90f58c979ea559b5", "size": 2955, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/reactionsystem.jl", "max_stars_repo_name": "adediego/ModelingToolkit.jl", "max_stars_repo_head_hexsha": "192441f42b2e49b264ea5cfceac093d3b44df9be", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#pragma once
#include <petuum_ps_common/storage/abstract_process_storage.hpp>
#include <petuum_ps_common/include/configs.hpp>
#include <petuum_ps_common/include/abstract_row.hpp>
#include <petuum_ps_common/util/vector_clock_mt.hpp>
#include <boost/utility.hpp>
#include <cstdint>
#include <vector>
namespace petuum {
... | {"hexsha": "faaf7dbd94c4a6a83cffa5a8458917bb6ab2d3ac", "size": 3515, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/petuum_ps_common/consistency/abstract_consistency_controller.hpp", "max_stars_repo_name": "alexrenz/bosen-2", "max_stars_repo_head_hexsha": "c61ac4e892ba2f6e02bd4595632b15f9e53450e2", "max_stars... |
"""
Example of train a softmax classifier on MNIST dataset.
"""
import numpy as np
import sys
# easy install package
sys.path.append('../../deuNet/')
from deuNet.utils import np_utils
from deuNet.datasets import mnist
from deuNet.models import NN
from deuNet.layers.core import AffineLayer
import pdb
batch_size = ... | {"hexsha": "e5c1040edb97dfbb169dba56c597dbd0d81e5573", "size": 1383, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/mnist_softmax.py", "max_stars_repo_name": "shenxudeu/deuNN", "max_stars_repo_head_hexsha": "81fcddd4da2be5f46d8e96e1a760a33a7e2579d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
subroutine furrun(
i ii,rwdth,
m itemp,pkrmax,runmax,
o retflg)
c
c + + + PURPOSE + + +
c This subprogram generates runoff information for the current OFE
c and is part of the furrow irrigation component.
c
c Called from FUR... | {"hexsha": "1993db0eb06aea277cca3c53c226cf8c37b72990", "size": 7022, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/wepp2012-src/furrun.for", "max_stars_repo_name": "jarad/dep", "max_stars_repo_head_hexsha": "fe73982f4c70039e1a31b9e8e2d9aac31502f803", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
"""Proximal Policy Optimization (clip objective)."""
from copy import deepcopy
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data.sampler import BatchSampler, SubsetRandomSampler
from torch.distributions import kl_divergence
from torch.nn.uti... | {"hexsha": "a1e48a9b3a057b255ca4dfbd61bd4b08c95599e7", "size": 14966, "ext": "py", "lang": "Python", "max_stars_repo_path": "algos/ppo.py", "max_stars_repo_name": "siekmanj/apex", "max_stars_repo_head_hexsha": "49483c827d8e70302b3e993acf29e9798f4435c1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
#!/usr/bin/env python3
import numpy as np
import os
import time
import gym
import json
import sys
import functools
from tqdm import tqdm, tnrange
from drlnd.core.common.util import is_notebook, count_boundaries
from drlnd.core.agents.base_agent import AgentBase
from drlnd.core.common.ring_buffer import ContiguousRing... | {"hexsha": "6eab66787e84eb8aae4d1008158ae1eee5cddb4d", "size": 7270, "ext": "py", "lang": "Python", "max_stars_repo_path": "drlnd/core/pipeline/train.py", "max_stars_repo_name": "yycho0108/DRLND_Core", "max_stars_repo_head_hexsha": "79117bd933b6cbf9f74e3356f5e1b8b156173cdc", "max_stars_repo_licenses": ["MIT"], "max_sta... |
import datetime
import re
import numpy as np
import pandas as pd
import pygal
from flask import Flask, redirect, url_for, request, render_template
from math import sqrt
from sklearn import metrics
from sklearn.externals import joblib
from selenium import webdriver
from selenium.webdriver.common.keys import Ke... | {"hexsha": "120c2fe3eace742465288a17d1ad42fbe6f8e991", "size": 17603, "ext": "py", "lang": "Python", "max_stars_repo_path": "HotelFinder.py", "max_stars_repo_name": "madhups1992/FindBestFood", "max_stars_repo_head_hexsha": "8b4695e3210b18bb84114450e0c2d7fd24cc2e7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
Require Import compcert.lib.Coqlib.
Require Import compcert.lib.Maps.
Require Import compcert.lib.Integers.
Require Import compcert.lib.Axioms.
Require Import compcert.common.AST.
Require Import compcert.common.Values.
Require Import compcert.common.Memory.
Require Import compcert.common.Events.
Require Import compcer... | {"author": "PrincetonUniversity", "repo": "VST", "sha": "7d3133f3ff626e3c98bec2bd603ac74af2aff6d9", "save_path": "github-repos/coq/PrincetonUniversity-VST", "path": "github-repos/coq/PrincetonUniversity-VST/VST-7d3133f3ff626e3c98bec2bd603ac74af2aff6d9/sepcomp/mem_wd.v"} |
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from torch import nn
import numpy as np
import torch
from scipy.spatial import distance
from sklearn.cluster import DBSCAN
from sklearn.cluster import KMeans
## 数据排序
def sort_data(data, return_order=False):
N = data.shape[0]
# 计算距离
dis... | {"hexsha": "e09f8401ec6dab113c2d3efc50ebe03eb275ee6c", "size": 9088, "ext": "py", "lang": "Python", "max_stars_repo_path": "Algorithms/GNN_Model.py", "max_stars_repo_name": "zibinpan/DL_project", "max_stars_repo_head_hexsha": "df48eb36dad2f45bfd439cef2d50d729dbf4cee4", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
#
# Analysis Repast4Py Performance Testing.
#
#
#
library(data.table)
library(ggplot2)
# Std Err
std <- function(x) sd(x)/sqrt(length(x))
# 95% CI
z <- 1.960
dt <- NULL
table <- NULL
# Load all of the stats files that exist in an experiments dir
files <- list.files (path=".", recursive=FALSE, ... | {"hexsha": "53df8743106810f5a6c82d4ce2051ffbeff82287", "size": 2757, "ext": "r", "lang": "R", "max_stars_repo_path": "paper_data/r4py_scaling_analysis.r", "max_stars_repo_name": "Repast/repast4py", "max_stars_repo_head_hexsha": "e616aab0eae681bbd937de06925e7872e6dc036e", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
from scipy.optimize import fsolve
class Solver(object):
def __init__(self, Ix, Iy, Iz, dt, tau):
self.Ix = Ix
self.Iy = Iy
self.Iz = Iz
self.Jx = 1/Iz - 1/Iy
self.Jy = 1/Ix - 1/Iz
self.Jz = 1/Iy - 1/Ix
self.dt = dt
self.tau = tau
se... | {"hexsha": "8dc9390b25dfd5cfada0474c2825ae1d3c13455b", "size": 1696, "ext": "py", "lang": "Python", "max_stars_repo_path": "solver.py", "max_stars_repo_name": "enaipi/machine-learning-rigid-body", "max_stars_repo_head_hexsha": "92beb1a3c72245e8224e9f2cd6b277ace53241bb", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
from argparse import ArgumentParser
import os
import re
from tqdm import tqdm
import tensorflow as tf
import numpy as np
from preprocess_all import make_example
def process_line(args, line):
try:
text, transcript = line.split(args.delimiter)
inputs = {
'text': text,
'trans... | {"hexsha": "3bd96a846f71338b6d7f3ebffdb1638658c136f0", "size": 3018, "ext": "py", "lang": "Python", "max_stars_repo_path": "text_preprocess.py", "max_stars_repo_name": "sciforce/phones-las", "max_stars_repo_head_hexsha": "f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c... |
#include <boost/math/distributions/chi_squared.hpp>
| {"hexsha": "1a8972981e2118b0fa060c198aa81d48f8369c34", "size": 52, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_math_distributions_chi_squared.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
This script provide functions to build and to train variational
autoencoder for pre-processed NOAA-GridSat-B1 dataset.
The autoencoder is developed and teset with Tensorflow(2.5.0),
CUDA 11.1/11.3 with cuDNN 8.1.0/8.2.0.
'''
import numpy as np
import pandas as pd
imp... | {"hexsha": "a2d10d36a9b32283cae73fb5635d9e4af0d976f5", "size": 9625, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/cvae_preproc_gridsatb1.py", "max_stars_repo_name": "tingsyo/dlgridsat", "max_stars_repo_head_hexsha": "2d94808df663c39931b404deee44849aad104e52", "max_stars_repo_licenses": ["CC0-1.0"], "max... |
[STATEMENT]
lemma check_symmetric_mpoly_dom_aux:
assumes "finite B" "vars p \<subseteq> B" "A \<subseteq> B"
shows "check_symmetric_mpoly_dom p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. local.check_symmetric_mpoly_dom p
[PROOF STEP]
using assms(1-3)
[PROOF STATE]
proof (prove)
using this:
finite B
vars p... | {"llama_tokens": 2675, "file": "Symmetric_Polynomials_Symmetric_Polynomials", "length": 21} |
/* Copyright (c) 2017, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
*
* All rights reserved.
*
* The Astrobee platform is licensed under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with t... | {"hexsha": "9340dd0ccdeed805efc68423567e6bfe195df5f7", "size": 9419, "ext": "cc", "lang": "C++", "max_stars_repo_path": "localization/marker_tracking/ros/src/marker_tracker.cc", "max_stars_repo_name": "jdekarske/astrobee", "max_stars_repo_head_hexsha": "c882f9f39719487770bbe7c7322d2ca7f71a1272", "max_stars_repo_license... |
[STATEMENT]
lemma truth_provable: "H \<turnstile> (Neg Fls)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. H \<turnstile> Neg Fls
[PROOF STEP]
by (metis Fls_E Neg_I) | {"llama_tokens": 78, "file": "Incompleteness_SyntaxN", "length": 1} |
import requests, json, os
import numpy
from base64 import b64encode, b64decode
from threading import Thread
import logging, time
logging.basicConfig()
log = logging.getLogger(__name__)
def threaded(fn):
"""
To use as decorator to make a function call threaded.
"""
def wrapper(*args, **kwargs):
... | {"hexsha": "d3a8d8be73ea780abb79284682b7e675feb08e77", "size": 6740, "ext": "py", "lang": "Python", "max_stars_repo_path": "stream2/EigerClient.py", "max_stars_repo_name": "SaschaAndresGrimm/EIGERStreamReceiver", "max_stars_repo_head_hexsha": "86f8d97219710aec36ecc7ca73671fbe25d20397", "max_stars_repo_licenses": ["MIT"... |
! { dg-do run }
! PR 49755 - If allocating an already allocated array, and stat=
! is given, set stat to non zero and do not touch the array.
program test
integer, allocatable :: A(:, :)
integer :: stat
allocate(A(20,20))
A = 42
! Allocate of already allocated variable
allocate (A(5... | {"hexsha": "06e996b779697ed3180221745df75d5bc76a5f87", "size": 508, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/multiple_allocation_3.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars... |
import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from torch.utils.data import DataLoader
from synergetic_molecule_generator.model import GAMoleculeModel
from synergetic_molecule_generator.swarm import Swarm
from deep_likeliness.dataloader import MolecularDataset
from deep_likel... | {"hexsha": "bbd6d0553b36d7dd2a25a4fb61e89ce1baa66c78", "size": 4935, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_likeliness/train_discriminator.py", "max_stars_repo_name": "VasaKiDD/end-to-end-drug-discovery", "max_stars_repo_head_hexsha": "355665940d3f5a30569bac295a177dfb5b54bd13", "max_stars_repo_lice... |
####################################
import numpy as np
import mxnet as mx
import tensorflow as tf
from gluoncv.data import CitySegmentation
####################################
train_dataset = CitySegmentation(split='train')
train_examples = len(train_dataset)
val_dataset = CitySegmentation(split='val')
val_exam... | {"hexsha": "10d8362832a8167af95341d5af3cc166dad020b7", "size": 1214, "ext": "py", "lang": "Python", "max_stars_repo_path": "semantic-segmentation/dataset/cityscapes_numpy.py", "max_stars_repo_name": "bcrafton/icsrl-deep-learning", "max_stars_repo_head_hexsha": "e3616982d1dda5f978d61d6591c91cb0da76ab02", "max_stars_repo... |
###############################################################################
# David Morgens
# 11/01/15
###############################################################################
# Import neccessary modules
'''
Function for aligning fastq files.
'''
from __future__ import division
import csv
import time
impor... | {"hexsha": "4560e10f6da5e0f02d97511e896f39bd003661c7", "size": 13712, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Scripts0.7/analyzeCounts.py", "max_stars_repo_name": "elifesciences-publications/Source-code-for-casTLE-analysis", "max_stars_repo_head_hexsha": "4024c770e4b3ca955bb43bb9d42eed7ac625a2b0"... |
import cv2
import numpy as np
import matplotlib.pyplot as plt
#from matplotlib import pyplot as plt
from tkinter import filedialog
from tkinter import *
from PIL import Image, ImageFilter
def cv2pil(cv_im):
# Convert the cv image to a PIL image
return Image.fromstring("L", cv2.GetSize(cv_im), cv_im... | {"hexsha": "ff0f8c940c8eb36c82800d35dac1e85de37c01ef", "size": 2371, "ext": "py", "lang": "Python", "max_stars_repo_path": "segmentarcuadros.py", "max_stars_repo_name": "andresgmz/Scripts-Python", "max_stars_repo_head_hexsha": "1f56e5790dc9c38d9bbf5dc040ead45a8f3ca937", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
[STATEMENT]
theorem (in DFS) dfs_invariant:
assumes "invariant S"
assumes "list_all isNode xs"
shows "invariant (dfs S xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. invariant (dfs S xs)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. invariant (dfs S xs)
[PROOF STEP]
using assms
[PRO... | {"llama_tokens": 201, "file": "KBPs_DFS", "length": 3} |
import random
from datetime import datetime, timedelta
import numpy as np
from pyspark.sql import SQLContext
from pyspark.sql import SparkSession
from pyspark.sql.window import Window
from pyspark.sql.functions import cume_dist
import pyspark.sql.functions as F
import itertools
from pyspark.sql.types import *
ss = Spa... | {"hexsha": "ece6725dbe4d3eadd800944068c223afda683f05", "size": 1242, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/mdebugger/__tmp/windowing_test.py", "max_stars_repo_name": "MD2Korg/CerebralCortex-DataAnalysis", "max_stars_repo_head_hexsha": "73f5ea2430bc7c23de422dccb7b65ef9f8917595", "max_stars_repo_... |
MODULE Blowers
USE Types
USE DefUtils
IMPLICIT NONE
LOGICAL :: Visited = .FALSE.
REAL(KIND=dp) :: x1,y1,r1,x2,y2,r2,vx1,vy1,vx2,vy2
SAVE :: Visited,x1,y1,r1,x2,y2,r2,vx1,vy1,vx2,vy2
CONTAINS
FUNCTION InsideBlower(Model,n) RESULT ( BlowerInd )
INTEGER :: n
INTEGER :: BlowerInd
TYPE(Mo... | {"hexsha": "f978c330aa57b1a75856f7dd965ad67e6139c512", "size": 2339, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "benchmark_apps/elmerfem/fem/tests/bodydir2/Blowers.f90", "max_stars_repo_name": "readex-eu/readex-apps", "max_stars_repo_head_hexsha": "38493b11806c306f4e8f1b7b2d97764b45fac8e2", "max_stars_repo... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def main():
from numpy.random import randint
import threading
import webbrowser
from vindta_reCAlk import app
port = 7523
url = "http://localhost:{:d}/".format(port)
threading.Timer(1.25, lambda: webbrowser.open(url)).start()
app.run(po... | {"hexsha": "6f5390e95481735f42b1e015cf6d7b4eb6fad91d", "size": 382, "ext": "py", "lang": "Python", "max_stars_repo_path": "vindta_reCAlk/__main__.py", "max_stars_repo_name": "luke-gregor/vindta_reCAlk", "max_stars_repo_head_hexsha": "612d57aaeac37adf9988b9eabc446175527be88d", "max_stars_repo_licenses": ["MIT"], "max_st... |
'''
The interface module with a list of channels and directories
For implemantation info read the comments below for the first channel.
Last edited on Oct 25, 2019
@author: ZAKI
'''
import os
import sys
import math
import pep8
import socket
import numpy as np
from collections import defaultdict
from channel impo... | {"hexsha": "66593ce227f56097a2533066bf2d3395b5184d47", "size": 20656, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/interface.py", "max_stars_repo_name": "ZAKI1905/HEP-Phen", "max_stars_repo_head_hexsha": "bc06fecb2aa6bf108b59f76794e63c29eb37a35a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
using Test, Mill, HierarchicalUtils
@testset "replacein" begin
metadata = fill("metadata", 4)
an1 = ArrayNode(rand(3,4))
b = BagNode(an1, [1:4, 0:-1], metadata)
an2 = ArrayNode(randn(5, 4))
wb = WeightedBagNode(an2, [1:2,3:4], rand(1:4, 4), metadata)
pn = ProductNode((b=b,wb=wb))
an3 = Arra... | {"hexsha": "b930bb24b7655d97b053f2a62323498064ae847c", "size": 1319, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/replacein.jl", "max_stars_repo_name": "racinmat/Mill.jl", "max_stars_repo_head_hexsha": "51719c3ca8667afac54f0bc6cbe5a1db908ab831", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,... |
[STATEMENT]
lemma \<phi>_def2:
"\<phi> (Trans s a ou s') =
(ou = outOK \<and>
(\<exists> cid uid p uid'. a = Cact (cReview cid uid p PID uid')))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<phi> (Trans s a ou s') = (ou = outOK \<and> (\<exists>cid uid p uid'. a = Cact (cReview cid uid p PID uid')))
[PROOF STE... | {"llama_tokens": 392, "file": "CoCon_Reviewer_Assignment_Confidentiality_Reviewer_Assignment_Value_Setup", "length": 4} |
submodule (stdlib_quadrature) stdlib_quadrature_trapz
use stdlib_error, only: check
implicit none
contains
pure module function trapz_dx_dp(y, dx) result(integral)
real(dp), dimension(:), intent(in) :: y
real(dp), intent(in) :: dx
real(dp) :: integral
integer :: n
... | {"hexsha": "17c3291c262b78ff90f8ab8f0e2fbcf852a8af4d", "size": 2030, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/stdlib_quadrature_trapz.f90", "max_stars_repo_name": "zoziha/dp-stdlib", "max_stars_repo_head_hexsha": "d317f4d273cb0fcabf532578a7ec0e4687e18700", "max_stars_repo_licenses": ["MIT"], "max_st... |
from remote.variables import *
import torch, os
import numpy as np
import pandas as pd
from x_transformers.x_transformers import XTransformer
from torch.utils.tensorboard import SummaryWriter
class data_loader:
def __init__(self, task_name, path='data', batch_size=32, enc_seq_len=16, dec_seq_len=16, none_mask=Tru... | {"hexsha": "4b24a511e09d9a01024126667082dc0330b43fd8", "size": 4326, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_experiment.py", "max_stars_repo_name": "booydar/x-transformers", "max_stars_repo_head_hexsha": "97f0a854fdf4df8a3fbf6a580e2375463af3538c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
//C++
/*
----------------------------------------------------
The Desktop Project
------------------
Copyright 2004 Daher Alfawares
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 ... | {"hexsha": "74ee9c13e90f25227d342d3e541063b755a0ae4e", "size": 1315, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/core_shell.cpp", "max_stars_repo_name": "daher-alfawares/xr.desktop", "max_stars_repo_head_hexsha": "218a7cff7a9be5865cf786d7cad31da6072f7348", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
using Base.Test
const LOG_FILE_OPTS = tempname()
println("Path to LOG_FILE_OPTS: $LOG_FILE_OPTS")
configure(; modes = ["debug", "info", "warn", "error", "crazy"])
add_truck(Lumberjack.LumberjackTruck(LOG_FILE_OPTS, nothing, Dict{Any,Any}(:is_colorized => true, :uppercase => true)), "colorlumberjacklogfile")
log("deb... | {"hexsha": "bbb34ca71d19e52fcbc47b6d6ac80a8d049326f0", "size": 1779, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test-lumberjack-opts.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Lumberjack.jl-ff7a09a4-2bbe-5ce1-96cb-a4b0cacc22b1", "max_stars_repo_head_hexsha": "beb33c3580d16d57d3e763b3c31... |
#!/usr/bin/env python
import math
import argparse
import logging
import numpy as np
import scipy.signal
import audio
logger = logging.getLogger(__name__)
def hrtf_file(audio_path, azimuth, elevation=0, distance=1, ear_distance=0.215, output=None):
"""
Read mono audio file and write binaural wav file to out... | {"hexsha": "866bee1bf808b4c8ba5f86fc961c74f64f554491", "size": 8656, "ext": "py", "lang": "Python", "max_stars_repo_path": "binaural.py", "max_stars_repo_name": "Curly-Mo/binaural", "max_stars_repo_head_hexsha": "e907ddaec3970f95c8bb98505ea832419d2bcfb0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_s... |
! { dg-do compile }
! This test is run with result-checking and -fbounds-check as
! nested_array_constructor_2.f90
! PR fortran/35846
! This used to ICE because the charlength of the trim-expression was
! NULL.
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
implicit none
character(len=2) :: c(3)
c = 'a'
c = (/... | {"hexsha": "54417a0dedda8b281d063b9e1d76cf047bdcf220", "size": 374, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/nested_array_constructor_1.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_... |
/-
Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import algebra.hom.iterate
import algebra.regular.basic
/-!
# Regular elements
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresp... | {"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/algebra/regular/pow.lean"} |
import unittest
import numpy
from chainer.backends import cuda
from chainer import functions
from chainer import testing
from chainer.testing import attr
from chainer.utils import type_check
@testing.parameterize(*testing.product_dict(
[
{'shape': (1,), 'axis': 0},
{'shape': (2, 3, 4), 'axis': 0... | {"hexsha": "e193adceb29aab6872126369a46f600bfe184138", "size": 3218, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/chainer_tests/functions_tests/array_tests/test_flip.py", "max_stars_repo_name": "zaltoprofen/chainer", "max_stars_repo_head_hexsha": "3b03f9afc80fd67f65d5e0395ef199e9506b6ee1", "max_stars_re... |
import numpy
from cupy import cuda
from cupy._creation.basic import _new_like_order_and_strides
from cupy._core import internal
def _update_shape(a, shape):
if shape is None and a is not None:
shape = a.shape
elif isinstance(shape, int):
shape = (shape,)
else:
shape = tuple(shape)... | {"hexsha": "5ee45d1ff5a94b53813093921e5e95a70aef60bd", "size": 5100, "ext": "py", "lang": "Python", "max_stars_repo_path": "cupyx/_pinned_array.py", "max_stars_repo_name": "prkhrsrvstv1/cupy", "max_stars_repo_head_hexsha": "ea86c8225b575af9d2855fb77a306cf86fd098ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import numpy
from amuse.lab import *
from matplotlib import pyplot
R_young_stars = [ 0.1012221753955787, 0.2968660204589863,
0.5017430508551541, 0.7046418772801384, 0.8984687805821738,
1.1087212228990806, 1.296848150063784]
S_young_stars = [ 69.68021137071266, 21.28302762211248 ,
... | {"hexsha": "a4fc4d586ba53afd8f556ae5ae4a8a05d634e890", "size": 4925, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/textbook/2017arXiv170307029H_Fig3.py", "max_stars_repo_name": "rknop/amuse", "max_stars_repo_head_hexsha": "85d5bdcc29cfc87dc69d91c264101fafd6658aec", "max_stars_repo_licenses": ["Apache-... |
# -*- coding: utf-8 -*-
import os
import time
import argparse
import os.path as osp
import sys
sys.path.append('.')
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torchvision.transforms import Compose
from network.mainnetwork import VLFTrans
from utils... | {"hexsha": "133420d26b262c6b2ce43be52d0f24dc04f1b2d8", "size": 8624, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/evaluate.py", "max_stars_repo_name": "leonnnop/Locater", "max_stars_repo_head_hexsha": "01ba070028b3007eb878da708b6f0f60437b66f9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, ... |
import numpy as np
from matrx.utils.utils import get_distance
class StateTracker:
def __init__(self, agent_id, knowledge_decay=10):
# The amount with which we forget known knowledge (we do so linearly)
if knowledge_decay > 1.0:
self.__decay = 1 / knowledge_decay
elif knowled... | {"hexsha": "2c164e22e4c5eb42bcd07f8bdfab53ef8e49909d", "size": 4113, "ext": "py", "lang": "Python", "max_stars_repo_path": "matrx/utils/agent_utils/state_tracker.py", "max_stars_repo_name": "thaije/matrx", "max_stars_repo_head_hexsha": "a50441f4ddc84b13395bc2013dba1a7edd617d98", "max_stars_repo_licenses": ["MIT"], "max... |
\documentclass{article}
\usepackage{float}
\usepackage{tabto}
\usepackage{graphicx}
\usepackage[utf8]{vietnam}
\usepackage{caption}
\title{\textbf{MaSSP AI PROJECT DAILY REPORT NO. 4}}
\author{textbf{Team 3}\\
Nìm Trí Nghĩa\\
Hồ Chí Vương\\
Nguyễn Khắc Minh
}
\date{Thursday, July 11th, 2019}
\begin{document}
\maketit... | {"hexsha": "8f2f2ccb2e779781bf6a250b23d3840759bae642", "size": 2494, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Daily Report/Team 3's daily report no.4.tex", "max_stars_repo_name": "goodudetheboy/YOLOv3-clutter-detection", "max_stars_repo_head_hexsha": "db04ed7d00442f29998b6108e5dc8790fc09b529", "max_stars_re... |
# -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
import numpy as np
from glumpy import app, gl, gl... | {"hexsha": "b9f0ab6224c77f817513ee9ca390560cc8e457c1", "size": 2634, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/gloo-frame.py", "max_stars_repo_name": "aforren1/glumpy", "max_stars_repo_head_hexsha": "5ca21505b9b65549b8f9fa8ddb3a700c75119d61", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
from matplotlib import pyplot
import numpy as np
exactitud = 0
precision = 1
recall = 2
f1 = 3
mcc = 4
dt = [[46.3, 64.9, 72.9, 75.6], [48.4, 61.8, 73.1, 75.5], [46.3, 64.9, 72.9, 75.6], [46.2, 61.8, 72.8, 75.4], [40.6, 61.7, 69.9, 72.9]]
rf = [[67.5, 77.8, 82.2, 83.7], [67.4, 77.4, 82, 83.5], [67.5, 77.8, 82.2, 83.7... | {"hexsha": "a8fcecaa5cfd5011217bee6a81e543891b33aaf8", "size": 5897, "ext": "py", "lang": "Python", "max_stars_repo_path": "fmnist/graphs.py", "max_stars_repo_name": "Gonm1/smalldata", "max_stars_repo_head_hexsha": "ba781aa832275bd9608596be5af857b123b1ccdc", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
module test_stats_randn
use forlab_stats, only: randn, mean
use stdlib_error, only: check
implicit none
private
public :: test_stats_randn_real
contains
subroutine test_stats_randn_real
print *, "*<DEBUG>* checking `test_stats_randn_real`.."
call check(mean(randn(mean=0.0, ... | {"hexsha": "ba9977479c6f619a56526665ca0bd40acf87e92f", "size": 657, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/stats/test_stats_randn.f90", "max_stars_repo_name": "zoziha/forlab_z", "max_stars_repo_head_hexsha": "354846b03f4dcccffc17ae5aed09000a5d64227c", "max_stars_repo_licenses": ["MIT"], "max_star... |
program ch0904
! Imperial Pints and Litres
implicit none
integer :: fluid
real :: litres
real :: pints
print *, ' Imperial Litre(s)'
print *, ' pint(s) '
do fluid = 1, 10
litres = fluid/1.75
pints = fluid*1.75
print 100, pints, fluid, litres
... | {"hexsha": "db3642f15f625173971b7564145aa7d5dfb617f4", "size": 389, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "ch09/ch0904.f90", "max_stars_repo_name": "hechengda/fortran", "max_stars_repo_head_hexsha": "44735609ece7995d049016f758590d710b8a4f15", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
#' Make a finite lazy object from R's object
#' @description functions to construct and coerce lazy stream
#' @name llist
#' @param ... non lazy-stream object,
#' @param x any type of object
#'
#' @examples
#' x <- llist(1, 2, 3) # arguments are evaluated
#' # y <- llist(1, repeat() {}, 3) # cannot return
#' z... | {"hexsha": "289111e89e26b7319328677c56142f1decda587f", "size": 1157, "ext": "r", "lang": "R", "max_stars_repo_path": "R/llist.r", "max_stars_repo_name": "TobCap/lazystreamr", "max_stars_repo_head_hexsha": "ff77c65a7dc765f55e1577074fe318b74f1c1016", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars... |
[STATEMENT]
lemma (in Ring) mprojTr2:"\<lbrakk>R module M1; R module M2; R module M; ds2 R M M1 M2;
x \<in> carrier M; x1 \<in> carrier M1; (x \<plusminus>\<^bsub>M\<^esub> (-\<^sub>a\<^bsub>M\<^esub> x1)) \<in> carrier M2;
y1 \<in> carrier M1;(x \<plusminus>\<^bsub>M\<^esub> (-\<^sub>a\<^bsub>M\<^esub> y1... | {"llama_tokens": 657, "file": "Group-Ring-Module_Algebra9", "length": 3} |
function out = iszero(f)
%ISZERO True for zero TRIGTECH objects.
% ISZERO(F) returns logical TRUE is F.VALUES has only zero entries and logical
% FALSE otherwise.
out = ~any(f.values, 1);
if ( any(out) )
% We need this as any(NaN) = 0, which will pass the test above.
out = out & ~any(isnan(f.values), 1... | {"author": "chebfun", "repo": "chebfun", "sha": "8c49396a55e46ddd57a1d108c6a8f32e37536d54", "save_path": "github-repos/MATLAB/chebfun-chebfun", "path": "github-repos/MATLAB/chebfun-chebfun/chebfun-8c49396a55e46ddd57a1d108c6a8f32e37536d54/@trigtech/iszero.m"} |
[STATEMENT]
lemma BrnFT_notIn_UNpart1:
assumes l: "length cl = length dl"
and P: "\<And> n. n < length cl \<Longrightarrow> part {..< brn (cl!n)} (P n) \<and> {} \<notin> P n"
shows "BrnFT cl dl \<notin> UNpart1 cl dl P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. BrnFT cl dl \<notin> UNpart1 cl dl P
[PROOF STEP]... | {"llama_tokens": 396, "file": "Probabilistic_Noninterference_Compositionality", "length": 2} |
%
% Cluster.tex
%
% History of LulzBot Printers
%
% Copyright (C) 2014, 2015 Aleph Objects, Inc.
%
% This document is licensed under the Creative Commons Attribution 4.0
% International Public License (CC BY-SA 4.0) by Aleph Objects, Inc.
%
\section{LulzBot 3D Printer Cluster}
This is the evolution of Aleph Object's L... | {"hexsha": "9bf7d8e2aa8af6a6a8cf848f3f676dd177c46d87", "size": 2005, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "source/Cluster.tex", "max_stars_repo_name": "alephobjects/history-of-lulzbot-printers", "max_stars_repo_head_hexsha": "1923ed04c79b0eb81338b8be3fe2f2d57dae6e07", "max_stars_repo_licenses": ["CC-BY-4... |
#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting
# ms-python.python added
import os
try:
os.chdir(os.path.join(os.getcwd(), '1_introduction/w1_python_fundamentals/1_week1'))
print(os.getcwd())
except:
pass
#%%... | {"hexsha": "345dab68111db461888f80d37de9e5a7b74202da", "size": 17508, "ext": "py", "lang": "Python", "max_stars_repo_path": "1_introduction/w1_python_fundamentals/1_week1/week1.py", "max_stars_repo_name": "shijiansu/coursera-applied-data-science-with-python", "max_stars_repo_head_hexsha": "a0f2bbd0b9201805f26d18b73a251... |
/-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import data.finset.basic
import data.multiset.fold
/-!
# The fold operation for a commutative associative operation over a finset.
-/
namespace finset
open multiset... | {"author": "Parinya-Siri", "repo": "lean-machine-learning", "sha": "ec610bac246ae7108fc6f0c140b3440f0fbacc52", "save_path": "github-repos/lean/Parinya-Siri-lean-machine-learning", "path": "github-repos/lean/Parinya-Siri-lean-machine-learning/lean-machine-learning-ec610bac246ae7108fc6f0c140b3440f0fbacc52/matlib/data/fin... |
open import Relation.Binary.Core
module Mergesort.Everything {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Mergesort.Impl1.Correctness.Order _≤_ tot≤
open import Mergesort.Impl1.Correctness.Permutation _≤_ tot≤
open import Mergesort.Impl2.Correctness.Order _≤_... | {"hexsha": "f67258cee666bd4e1fedbf6dec9533442885941b", "size": 387, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "agda/Mergesort/Everything.agda", "max_stars_repo_name": "bgbianchi/sorting", "max_stars_repo_head_hexsha": "b8d428bccbdd1b13613e8f6ead6c81a8f9298399", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import networkx
#import pymysql
def get_sql_data(list_of_users):
# construct mysql query to pull all data from
pass
def build_graph():
# export a graph of all nodes in the swarm
pass
import instagram_scrape
| {"hexsha": "ae6b378824e321d74164b9f79812c4c2dff7f302", "size": 214, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycode/network_graph.py", "max_stars_repo_name": "VanillaBrooks/instagram_scrape", "max_stars_repo_head_hexsha": "80a30e3cd77a51b5b8bf73c967b79d5482a44ebb", "max_stars_repo_licenses": ["MIT"], "max... |
# -*- coding: utf-8 -*-
import os
import random
import shutil
import numpy as np
import re
class CollectionManagerFromDirectory:
def __init__(self, config, sampling_type = 'autoencoder'):
self.config = config
config_sampling = self.config.get('sampling')[sampling_type]
self.dir = self.config.get('directory')[... | {"hexsha": "d64ff3a04fd0fb7ad6766cb2be9a542b909938ee", "size": 2437, "ext": "py", "lang": "Python", "max_stars_repo_path": "iss/data/CollectionManager.py", "max_stars_repo_name": "prise6/smart-iss-posts", "max_stars_repo_head_hexsha": "fc913078e7fbe6343fd36ec6ca9852322247da5d", "max_stars_repo_licenses": ["MIT"], "max_... |
import tensorflow as tf
import numpy as np
import skimage.io as io
from os import listdir
from pprint import pprint
from utils import generate_embedding
output_path = 'outputs'
tflite_model_path = 'tflite_models'
ids_dir = 'ids'
ishape = [112, 112, 3]
embedding_dims = 256
id_samples = 9
interpreter = tf.lite.Interpr... | {"hexsha": "025217738d35f65ee20b95b25725d66269ee7bd4", "size": 1637, "ext": "py", "lang": "Python", "max_stars_repo_path": "faceid/idgen.py", "max_stars_repo_name": "hqbao/dlp_tf", "max_stars_repo_head_hexsha": "e8fe3281470faebbe8e36caf55025c270e84c44f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
#!/usr/bin/env python
"""
Calculate the angular distribution function (ADF) from files.
Take an average over atoms in a file or files.
Usage:
adf.py [options] INFILE [INFILE...]
Options:
-h, --help Show this help message and exit.
-w DEG Width of the angular degree. [default: 1.0]
-r RCUT Cutoff rad... | {"hexsha": "5555c779f9a8807266a1cd275f2711eccfee806f", "size": 8577, "ext": "py", "lang": "Python", "max_stars_repo_path": "nappy/adf.py", "max_stars_repo_name": "ryokbys/nap", "max_stars_repo_head_hexsha": "ddd0b5a5a956f7c335a22adb4f8e00f1d38a7804", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 27, "max_stars... |
#-*- coding:utf-8 -*-
#!/usr/bin/python
''' Automatic Speech Recognition
author:
zzw922cn
date:2017-5-5
'''
from __future__ import print_function
#from __future__ import unicode_literals
import sys
sys.path.append('../')
sys.dont_write_bytecode = True
from core.sigprocess import *
from core.calcmfcc import calcfea... | {"hexsha": "b9a7f404fd32c44564304602fbe038ccba121ebf", "size": 4974, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature/wsj/wsj_preprocess.py", "max_stars_repo_name": "ligechina/Automatic_Speech_Recognition", "max_stars_repo_head_hexsha": "6e19d3c107b9d3d13328f9f9539728a07ed71e48", "max_stars_repo_licenses"... |
#!/usr/bin/env python3
"""
CIFAR10
^^^^^
Various functions for accessing the
`CIFAR10 <https://www.cs.toronto.edu/~kriz/cifar.html>`_ dataset.
"""
import os
import tarfile
import pickle
import numpy as np
from .data_util import download_if_not_there
cifar10_url = "https://www.cs.toronto.edu/~kriz/"
cifar10_file = "... | {"hexsha": "6d3c311b5d0f3189d4e311138dcb1f31f56cdd59", "size": 3153, "ext": "py", "lang": "Python", "max_stars_repo_path": "dynn/data/cifar10.py", "max_stars_repo_name": "pmichel31415/dynet-nn", "max_stars_repo_head_hexsha": "7e780c4dcf928cdff5f2e52210409d2775ca7796", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import ast
import json
import numpy as np
from json.decoder import JSONDecodeError
from struct import unpack, calcsize
from laserchicken.io.utils import convert_to_short_type, convert_to_single_character_type
def read(path):
"""
Read point cloud data from a ply file.
:param path: path to the ply file
... | {"hexsha": "0c5de18d3b613891c38a4171b893627b4c556e0b", "size": 5505, "ext": "py", "lang": "Python", "max_stars_repo_path": "laserchicken/io/ply_read.py", "max_stars_repo_name": "eEcoLiDAR/eEcoLiDAR", "max_stars_repo_head_hexsha": "f5c4e772e4893f7242ed0b10aa17ac7e693a55a0", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
[STATEMENT]
lemma get_root_node_ok:
assumes "heap_is_wellformed h" "known_ptrs h" "type_wf h"
and "ptr |\<in>| object_ptr_kinds h"
shows "h \<turnstile> ok (get_root_node ptr)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. h \<turnstile> ok get_root_node ptr
[PROOF STEP]
unfolding get_root_node_def
[PROOF S... | {"llama_tokens": 394, "file": "Core_SC_DOM_safely_composable_Core_DOM_Heap_WF", "length": 3} |
[STATEMENT]
lemma bres_canc1: "x \<cdot> (x \<rightarrow> y) \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. x \<cdot> (x \<rightarrow> y) \<le> y
[PROOF STEP]
by (simp add: bres_galois) | {"llama_tokens": 90, "file": "Quantales_Quantales", "length": 1} |
MODULE pentagon_class
!
! This module implements a pentagon class.
!
! Record of revisions:
! Date Programmer Description of change
! ==== ========== =====================
! 12/29/06 S. J. Chapman Original code
!
USE shape_class ! USE p... | {"hexsha": "205defe3b86f4c015ba65c7ac4625ccfd15c453e", "size": 2323, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Fortran952003ForScientistsandEngineers3rdStephenJChapman/chap16/shape/pentagon_class.f90", "max_stars_repo_name": "yangyang14641/FortranLearning", "max_stars_repo_head_hexsha": "3d4a91aacd957361... |
import numpy as np
import os
import json
import itertools
"""
produce train/test/dev splits
"""
import random
def write_lines(fname, lines):
with open(fname, 'w', encoding='utf-8') as f:
for line in lines:
f.write(line)
f.close()
def generate_train_dev_test_splits(num_data):
np.random... | {"hexsha": "d5a06eae59f4b8c76a300ba1fb707ad71464f23b", "size": 12556, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing/data_splits.py", "max_stars_repo_name": "mahartmann/mt-dnn", "max_stars_repo_head_hexsha": "c9aa3379dc255fd8fc40f24b6cd508f6a645b32f", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import numpy as np
import matplotlib
matplotlib.rcParams = matplotlib.rc_params_from_file('../../matplotlibrc')
from matplotlib import pyplot as plt
from matplotlib.cm import jet as cmap
from mpl_toolkits.mplot3d import Axes3D
from mayavi import mlab
def singular_surface_plot(f, filename, mn=-1., mx=1., res=500, thres... | {"hexsha": "905b664874361f7b53d349f0ce4f888ac561196a", "size": 4192, "ext": "py", "lang": "Python", "max_stars_repo_path": "Labs/ComplexIntegration/plots.py", "max_stars_repo_name": "jessicaleete/numerical_computing", "max_stars_repo_head_hexsha": "cc71f51f35ca74d00e617af3d1a0223e19fb9a68", "max_stars_repo_licenses": [... |
import os
import cv2
import sys
import torch
import ntpath
import argparse
import torchfile
import time, math
import numpy as np
import torch.nn as nn
from wct import transform
from dataset import TransferDataset
from matplotlib import pyplot as plt
from torchvision import utils, transforms
# please change directory ... | {"hexsha": "6c978660597b5f4a3e7392f62ceadf2dbbaae2b4", "size": 9607, "ext": "py", "lang": "Python", "max_stars_repo_path": "PhotoNAS/photo_transfer.py", "max_stars_repo_name": "jjunhyub/2021_timetraveler", "max_stars_repo_head_hexsha": "5580a3466fb56208c277d194858d240d1d0dcb67", "max_stars_repo_licenses": ["MIT"], "max... |
\usepackage{graphicx}
\usepackage{mathtools}
\allowdisplaybreaks%
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{tikz}
\usepackage{rotating}
\usepackage{amscd}
\usepackage{todonotes}
\presetkeys{todonotes}{inline,size=\small}{}
\usepackage[export]{adjustbox}
\usepackage{bbm}
\usepackage[german,english]{babel}
... | {"hexsha": "ff78da394474d96e8016394d421318a116035046", "size": 552, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "preamble.tex", "max_stars_repo_name": "azag0/dissertation", "max_stars_repo_head_hexsha": "7b56b7fba557c58f624cb3ef88b1c91d5f72a765", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": null... |
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import h5py
import numpy as np
import pandas as pd
| {"hexsha": "fa90a50c182afdeef0f7912fd04d70d017db298f", "size": 101, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_Workspace/QuantSim/data/tickdata.py", "max_stars_repo_name": "agent1894/Quant-Practice-Workspace", "max_stars_repo_head_hexsha": "f102e136389e2247bbbfb36ef78c16807a0ba7d2", "max_stars_repo_l... |
-- A Formal Proof of the Lovasz Local Lemma and Symmetric Lovasz Local Lemma
-- This import covers everything we need; finsets, measure theory, ennreals, and probability theory.
import probability.independence
/-
Since we are constantly dealing with finite sets, measures, and big products/intersections, it will mak... | {"author": "nsglover", "repo": "lean-lovasz-local-lemma", "sha": "6d45e9054815a2197273d254e8038de80a62c3ec", "save_path": "github-repos/lean/nsglover-lean-lovasz-local-lemma", "path": "github-repos/lean/nsglover-lean-lovasz-local-lemma/lean-lovasz-local-lemma-6d45e9054815a2197273d254e8038de80a62c3ec/src/lovasz_local_le... |
# %%
# Grade calculation from altitude
# Ehsan Moradi, Ph.D. Candidate
# %%
# Load required packages
import numpy as np
import pandas as pd
import scipy.signal
import matplotlib.pyplot as plt
import seaborn as sns
# %%
# Load data from Excel to a pandas dataframe
def load_from_Excel(vehicle, settings):
directory... | {"hexsha": "7c63e6a83704b313c2fdc87d11141b3b799719a2", "size": 9194, "ext": "py", "lang": "Python", "max_stars_repo_path": "process-grade-from-altitude.py", "max_stars_repo_name": "esnmrdi/phd", "max_stars_repo_head_hexsha": "2eede68a52e3e9c5931cad55dc6989c14f2e5d5b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
# -*- coding: utf-8 -*-
"""
@file
@brief List of converters from scikit-learn model.
"""
import numpy
from .g_sklearn_type_helpers import check_type
from ..grammar.gactions import MLActionVar, MLActionCst, MLActionIfElse, MLActionReturn
from ..grammar.gactions_tensor import MLActionTensorTake
from ..grammar.gactions_nu... | {"hexsha": "16afa4d294f1f76c19204a24291a2db6e8990475", "size": 4294, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlprodict/grammar_sklearn/g_sklearn_tree.py", "max_stars_repo_name": "Exlsunshine/mlprodict", "max_stars_repo_head_hexsha": "9ea1a0fc85726822cae82c0b27b23b46f9ef351a", "max_stars_repo_licenses": [... |
# Copyright 2019 The TensorNetwork Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"hexsha": "a7769e5ca409a3ef3214dda6c8805d7e06025870", "size": 6312, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/MERA/binary_mera_example.py", "max_stars_repo_name": "0xflotus/TensorNetwork", "max_stars_repo_head_hexsha": "6b3f8fbd3a9067058b20edd805923f276829ca17", "max_stars_repo_licenses": ["Ap... |
import pandas as pd
import random
import numpy as np
import pickle
letters = ['a', 'b', 'c', 'd', 'e']
numbers = [1, 2, 3, 4, 5, 6, 7, 8]
strings = ['now', 'is', 'the', 'time']
empties = ['']
nulls = [None, np.NaN]
data = letters + numbers + strings
def create_dataframe(num_rows, num_columns, data=data,... | {"hexsha": "10aed9c77fdfb78bd9eb72a8b200b2ac0a15f41f", "size": 4606, "ext": "py", "lang": "Python", "max_stars_repo_path": "bondules/the_bon_library.py", "max_stars_repo_name": "mathfour/python-packages", "max_stars_repo_head_hexsha": "83814bea721b52a813d524fe8b802158a71b097d", "max_stars_repo_licenses": ["MIT"], "max_... |
##
# Copyright (c) 2016, Gabor Gyorgy Gulyas
# Email: gulyas@pet-portal.eu
# Web: gulyas.info
##
import matplotlib
import math
import numpy as np
from scipy.spatial.distance import cdist
def selectpoints(ax, points, radius = .1, path_type=matplotlib.path.Path.LINETO, ec='b', ls='-', lw=2, fc='g', a=.5, fill=True, js=... | {"hexsha": "e3d33995eaddd173980642c09475b6690f19cadd", "size": 2416, "ext": "py", "lang": "Python", "max_stars_repo_path": "selectpoints.py", "max_stars_repo_name": "gaborgulyas/SelectPoints", "max_stars_repo_head_hexsha": "62fe35bcd5bca9a431256c05c0cf2608cab3474c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
#
#
#
# <-------------------------------------------------
# CRAN dependencies
packages <- c('optparse', 'stringi', 'httr', 'jsonlite','pcalg', 'infotheo', 'tictoc')
# non-CRAN dependencies
bioc_packages <- c('graph', 'RBGL', 'RcppArmadillo')
# <-------------------------------------------------
#
#
#
not_installed <-... | {"hexsha": "5de4b49b2557e204237aca1563b829fdfe970060", "size": 767, "ext": "r", "lang": "R", "max_stars_repo_path": "services/executionenvironments/cuda/requirements.r", "max_stars_repo_name": "hpi-epic/mpcsl", "max_stars_repo_head_hexsha": "05361acb0c8da68ddfa21f9fc9cd32a59255dc5c", "max_stars_repo_licenses": ["MIT"],... |
# Mika "AgenttiX" Mäki & Alpi Tolvanen, 2017
"""
This file computes required initial pressures for twelve particles on range 6 - 200nm.
"""
# pylint: disable=wrong-import-order
import toolbox
import numpy as np
# Constants
temp = 296.15 # (K), 23 deg C, from instructions
surface_tension = 72.8e-3 #... | {"hexsha": "6c442f7810248aeafab918614a780d411125cdc3", "size": 1744, "ext": "py", "lang": "Python", "max_stars_repo_path": "cloud_formation/12_calculate_pressures.py", "max_stars_repo_name": "AgenttiX/fys-1320", "max_stars_repo_head_hexsha": "fb598ece7a3e180bf25af320eb210a34394f6309", "max_stars_repo_licenses": ["MIT"]... |
import numpy as np
import torch.utils.data as data
from common.utility.image_processing_cv import get_single_patch_sample, get_single_patch_sample_inference
from common_pytorch.dataset.hm36 import from_mpii_to_hm36
class single_patch_Dataset(data.Dataset):
def __init__(self, db, is_train, patch_width, patch_he... | {"hexsha": "dbaeb6f36b0e63875d174c76bfd9397b0901dd89", "size": 7524, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_projects/integral_human_pose/core/loader.py", "max_stars_repo_name": "aielawady/integral-human-pose", "max_stars_repo_head_hexsha": "7dc315988cda810e5937c8eb8eca34a020e85d29", "max_stars_r... |
## Python class for cross-validated estimates of variable importance
## compute estimates and confidence intervals, do hypothesis testing
## import required libraries
import numpy as np
from scipy.stats import norm
from .predictiveness_measures import cv_predictiveness, cv_predictiveness_precomputed
from .vimpy_utils ... | {"hexsha": "4a8dfa19d392582ae84185e56d71adfc8d8abbfd", "size": 6000, "ext": "py", "lang": "Python", "max_stars_repo_path": "vimpy/cv_vim.py", "max_stars_repo_name": "bdwilliamson/npvipy", "max_stars_repo_head_hexsha": "681eb21e1ff1141dc9fbaa35261e24dd17296857", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14,... |
module TestData
importall Base # so that we get warnings for conflicts
using Base.Test
using DataTables
using Compat
#test_group("NullableArray creation")
nvint = NullableArray(Nullable{Int}[1, 2, Nullable(), 4])
nvint2 = NullableArray(5:8)
nvint3 = NullableArray(5:8)
nvflt = Nullab... | {"hexsha": "8f7378d0563d287dfc9b6ae4a8520da8d72014b0", "size": 12186, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/data.jl", "max_stars_repo_name": "UnofficialJuliaMirror/DataTables.jl-933ac57d-ae2c-5684-854b-0ea345a8088a", "max_stars_repo_head_hexsha": "5199293f36e13d29819f7bd0259ca6be0f4195e2", "max_sta... |
/*
* GridTools
*
* Copyright (c) 2014-2021, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include <boost/preprocessor/punctuation/remove_parens.hpp>
/**
* This macro expands to the code snippet that ge... | {"hexsha": "a3eb313d08c20b1cfbf341c53de45477fc001321", "size": 1622, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/gridtools/meta/debug.hpp", "max_stars_repo_name": "eth-cscs/gridtools", "max_stars_repo_head_hexsha": "f59fb6ba692305f2b552e5af1f67159ae9267e96", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
'''
Module : collate
Description : Check ST alignment and count reads at coundaries
Copyright : (c) Marek Cmero, Sep 2018
License : MIT
Maintainer : github.com/mcmero
Portability : POSIX
Features:
- check contig alignment to supertranscript
- check reads crossing boundary of novel variant
'''
import... | {"hexsha": "58a2dc5871c020dff7ba6d19ba7e4b5ca57cc4a1", "size": 5284, "ext": "py", "lang": "Python", "max_stars_repo_path": "collate/collate.py", "max_stars_repo_name": "raerose01/MINTIE", "max_stars_repo_head_hexsha": "a35c9ca5c7643181169cd8153b89a2c29efad2e2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
import numpy as np
import os.path
import json, re, argparse, sys
import matplotlib as mpl
import matplotlib.pyplot as plt
from js.utils.plot.colors import colorScheme
mpl.rc('font',size=30)
mpl.rc('lines',linewidth=3.)
figSize = (14, 5.5)
figSize = (14, 10)
figSize = (12, 8)
figSize = (20, 8)
c1 = colorScheme("labelM... | {"hexsha": "b951aa0b449bf9da72aa61702bcc9f028c4d1028", "size": 17775, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/plotResults.py", "max_stars_repo_name": "jstraub/dpOptTrans", "max_stars_repo_head_hexsha": "b8c6549a140b2b4abefeb2fd5180e805c285e10d", "max_stars_repo_licenses": ["MIT-feh"], "max_stars_c... |
using ITF1788tests
using Test
ITF1788tests.regenerate_test
@testset "ITF1788tests.jl" begin
end
| {"hexsha": "28146483b358b747292b9e0ae0ba38761a8b1f10", "size": 103, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "krish8484/ITF1788tests.jl", "max_stars_repo_head_hexsha": "3bb9894187e8da0cfcd8ac1c93817fdd72cd27aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
\documentclass[letter,10pt]{article}
\usepackage{TLCresume}
\begin{document}
%====================
% EXPERIENCE A
%====================
\subsection{{\href{docs.jnapolitano.io}{Docs.Jnapolitano.io}}}
\vspace{.25em}
\begin{zitemize}
\skilling{\href{docs.jnapolitano.io}{Project Documentation}}{Documenting Projects w... | {"hexsha": "a2d98561baff79ad4cd84b4ee05ab5a4fa6d641f", "size": 1867, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/projects.tex", "max_stars_repo_name": "justin-napolitano/architect-resume", "max_stars_repo_head_hexsha": "9d6bbd7fdac85b2de3cce49462b6aee6f39d5211", "max_stars_repo_licenses": ["MIT"], "ma... |
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}
\usepackage{amsmath,amsthm,enumitem,titlesec,xcolor}
\usepackage{microtype}
\usepackage[a4paper,margin=25mm]{geometry}
\usepackage[unicode]{hyperref}
\hypersetup{
hidelinks,
pdftitle={Distributed Algorithms},
p... | {"hexsha": "5b7a130f845b8ebdd3519b8c1410e5b557ba192b", "size": 5175, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "exams/exam-2021-10-27.tex", "max_stars_repo_name": "suomela/da2020", "max_stars_repo_head_hexsha": "874238b4e1d395769fc89d0d3a9453366056ad1d", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_co... |
[STATEMENT]
lemma degree_drop_n:
"degree (drop_deg n f) = degree f - n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. degree (drop_deg n f) = degree f - n
[PROOF STEP]
unfolding drop_deg_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. degree (Poly (drop n (coeffs f))) = degree f - n
[PROOF STEP]
by (simp add:... | {"llama_tokens": 149, "file": "CRYSTALS-Kyber_NTT_Scheme", "length": 2} |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007. 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)
//
// See http://www.boost.org/libs/interprocess... | {"hexsha": "709acd4dc63984a01c48616559e84825f50d1578", "size": 10902, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/interprocess/test/intersegment_ptr_test.cpp", "max_stars_repo_name": "boostpro/boost-release", "max_stars_repo_head_hexsha": "017a2654a11f50e7f1c4a662aec2cf3cd9d4fb1c", "max_stars_repo_license... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.