text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
from abc import ABC, abstractmethod
import numpy as np
from matplotlib.path import Path
from shapely.geometry import GeometryCollection, MultiPolygon, Polygon
from c3nav.mapdata.utils.geometry import assert_multipolygon
class MplPathProxy(ABC):
@abstractmethod
def intersects_path(self, path):
pass
... | {"hexsha": "d731067fdd35f6bd3c84eaa22d4b48b4387cbd90", "size": 3537, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/c3nav/mapdata/utils/mpl.py", "max_stars_repo_name": "johnjohndoe/c3nav", "max_stars_repo_head_hexsha": "a17f863a3512e305595c16b0300796b6bae81241", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
[STATEMENT]
lemma card_length_sum_list: "card {l::nat list. size l = m \<and> sum_list l = N} = (N + m - 1) choose N"
\<comment> \<open>by Holden Lee, tidied by Tobias Nipkow\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. card {l. length l = m \<and> sum_list l = N} = N + m - 1 choose N
[PROOF STEP]
proof ... | {"llama_tokens": 7573, "file": null, "length": 60} |
import numpy as np
import pandas as pd
data = pd.read_csv("resources/unigram_freq.csv")
print(data)
words = []
frequency = []
for i in range(len(data)):
if len((str)(data['word'][i])) == 5:
words.append((str)(data['word'][i]))
frequency.append((str)(data['count'][i]))
mp = {}
with open("resource... | {"hexsha": "ea0105f775f55f854cacfa3aac8eacb1a473c931", "size": 729, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/data_process.py", "max_stars_repo_name": "kzvd4729/Wordle-Solve", "max_stars_repo_head_hexsha": "f1ed5cfd29bd9ff6774051aa824d27129b4ec983", "max_stars_repo_licenses": ["MIT"], "max_star... |
using Compat
using BenchmarkTools
using LinearAlgebra
using SparseArrays
using LuxurySparse
n=16
Id = IMatrix(1<<n)
V = randn(ComplexF64, 1<<n)
Dv = Diagonal(V)
Pm = pmrand(ComplexF64, 1<<n)
Sp = SparseMatrixCSC(Pm)
Ds = randn(ComplexF64, 1<<10,1<<10)
mats = [Id, Sp, Pm, Dv]
for A in mats
bg = BenchmarkGroup()
... | {"hexsha": "4cfbe9a6d12e4c1009b41072974066a8d9b934c8", "size": 560, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmarks/multiply.jl", "max_stars_repo_name": "UnofficialJuliaMirror/LuxurySparse.jl-d05aeea4-b7d4-55ac-b691-9e7fabb07ba2", "max_stars_repo_head_hexsha": "c2b9f244cf65f6dac3e4af470efeaa4c86190cbd"... |
import numpy as np
import scipy as sp
from scipy.sparse import csr_matrix, coo_matrix
from pyamg.gallery import poisson, load_example
from pyamg.strength import classical_strength_of_connection
from pyamg.classical import split
from pyamg.classical.classical import ruge_stuben_solver
from pyamg.classical.interpolate... | {"hexsha": "e6a0d41f73d7d5c5e92d5b8c649949db24d7089f", "size": 7494, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyamg/classical/tests/test_classical.py", "max_stars_repo_name": "sdalton1/pyamg", "max_stars_repo_head_hexsha": "e49ae5e973cb8f10e3d1be886d84d7592e3caee2", "max_stars_repo_licenses": ["MIT"], "ma... |
\section{Why use a Blockchain ?}\label{sec:blockchain}
In this Section, we go over the key reasons why a Blockchain-based platform is the right solution for Latitude. We
start with an overview of the Blockchain technologies and present the pivotal features that would work well for the
business use case of Latitude.
B... | {"hexsha": "f047f8b6000f03e5f0240beaca004ef5d99a1175", "size": 9097, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "blockchain.tex", "max_stars_repo_name": "arunesh/latwp", "max_stars_repo_head_hexsha": "a84fff7e01cfea691a81024f13cd730bea6c8c05", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
\documentclass[12pt]{article}
\usepackage{amsmath}
\newcommand{\bra}[1]{\langle#1|}
\newcommand{\ket}[1]{|#1\rangle}
\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}
\newcommand{\beqa}{\begin{eqnarray}}
\newcommand{\eeqa}{\end{eqnarray}}
\newcommand{\hh}{{\cal H}}
\begin{document}
\title{Calculati... | {"hexsha": "2dcecea8f887de0024506293fdc7c3930bd52680", "size": 21345, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "qubiter/adv_applications/threaded_grad.tex", "max_stars_repo_name": "artiste-qb-net/qubiter", "max_stars_repo_head_hexsha": "af0340584d0b47d6b18d3dd28cd9b55a08cb507c", "max_stars_repo_licenses": ["... |
from marclib.polynomial import Polynomial,RationalFunction
from mynewgrapher import Grapher
from mycontext import Context
from sympy import init_printing, Symbol, expand
init_printing()
a = Symbol('a')
b = Symbol('b')
c = Symbol('c')
d = Symbol('d')
if __name__=="__main__":
p1=Polynomial([0,6,1,6,5])
q1=Polyn... | {"hexsha": "56632ffc7bf31f94eeb7c69d473185a978ae8fcf", "size": 659, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygame_geometry/tests/test polynomialfraction.py", "max_stars_repo_name": "MarcPartensky/Pygame-Geometry", "max_stars_repo_head_hexsha": "61abbbeac0fd351253e06b19736d9939fd5b316e", "max_stars_repo_... |
import time
import math
import numpy as np
import torch
from torch import nn, optim
import torch.nn.functional as F
import sys
sys.path.append("..")
import utils as d2l
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
(corpus_indices, char_to_idx, idx_to_char, vocab_size) = d2l.load_data_jay_lyri... | {"hexsha": "f3046c7350b6fe5c14bd1b6e74740c9d49ea5e76", "size": 2358, "ext": "py", "lang": "Python", "max_stars_repo_path": "codenew/d2lzh_pytorch/gru_scratch.py", "max_stars_repo_name": "zzq12368/Dive-into-DL-PyTorchzzq", "max_stars_repo_head_hexsha": "f627054a93fb1d453605ab4565b9cfd1e855e9e4", "max_stars_repo_licenses... |
import numpy as np
import pandas as pd
import gzip
df = pd.read_csv('233x_sequences_degdata_081120.csv')
fil='predictions/nullrecurrent_233x_output_14Oct2021.csv'
output_array = np.ones([233,1588])*np.nan
for i,x in enumerate(open(fil,'r').readlines()):
dat = [float(k) for k in x.strip().split(',')]
output_array[i... | {"hexsha": "9c076f8d088d3cbcc53b50227bd1fb46ff4377bd", "size": 759, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/mRNA_233x_data/reformat_nullrecurrent.py", "max_stars_repo_name": "eternagame/KaggleOpenVaccine", "max_stars_repo_head_hexsha": "de252988b92dc2c673a80347deb8827a12aa2ad8", "max_stars_repo_lice... |
import re
import math
import torch
import torchaudio
import numpy as np
import argparse
import librosa
import warnings
import itertools as it
from jiwer import wer
from tqdm import tqdm
import pandas as pd
import os
try:
from flashlight.lib.sequence.criterion import CpuViterbiPath, get_data_ptr_as_bytes
from f... | {"hexsha": "3d17fe4d379bb4005b9f7101028555e8418ebe41", "size": 19634, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_external_lm_test.py", "max_stars_repo_name": "WeberJulian/Wav2Vec-Wrapper", "max_stars_repo_head_hexsha": "84519cd51a4f3d9cb61de99c5712640f3cf5213d", "max_stars_repo_licenses": ["MIT"], "max... |
[STATEMENT]
lemma cones_map_ide:
assumes "\<chi> \<in> cones a"
shows "cones_map a \<chi> = \<chi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. cones_map a \<chi> = \<chi>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. cones_map a \<chi> = \<chi>
[PROOF STEP]
interpret \<chi>: cone... | {"llama_tokens": 840, "file": "Category3_Limit", "length": 12} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 8 11:39:40 2018
@author: bbaker
"""
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as sio
from dkmeans.data import get_dataset
RUNNAME = 'N314_s2'
res = '/export/mialab/users/bbaker/projects/dkmeans/results/fbirn_%s_k5_multishot... | {"hexsha": "8bcce01de43e0168f51de783681e3c6adaf746e5", "size": 1771, "ext": "py", "lang": "Python", "max_stars_repo_path": "convert_for_eswar.py", "max_stars_repo_name": "trendscenter/dkmeans", "max_stars_repo_head_hexsha": "c71198991d29d5aa60d1f7ff949b11e250f12d11", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import unittest
import cv2
import numpy as np
from configuration import Configuration
from torch.utils.data import DataLoader
from loader.dsb2018.dataset import ScienceDataset
from loader.dsb2018.dataset import train_augment as dsb_train_augment
from loader.dsb2018.dataset import train_collate as dsb_train_collate
fro... | {"hexsha": "09e5d8216c6b80b0fdb57c56d633873051860f63", "size": 4263, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_loader.py", "max_stars_repo_name": "shawnau/mask_rcnn_pytorch", "max_stars_repo_head_hexsha": "0890fc276612ea4d78c7d5fa62f1f45edbf15289", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/python3
# coding=utf-8
import numpy as np
import cv2
class dep_to_pc_c:
def __init__(self,fx,fy,cx,cy,w,h,dvec=None):
# 构建速算表格
tab_x,tab_y=np.meshgrid(range(w),range(h))
tab_x=tab_x.astype(np.float32)-cx
tab_y=tab_y.astype(np.float32)-cy
self.tab_dep_to_... | {"hexsha": "bc3828ead3a6b4f9adb7d6d4e9eb7345da83ffa8", "size": 2078, "ext": "py", "lang": "Python", "max_stars_repo_path": "dep_to_pc/dep_to_pc.py", "max_stars_repo_name": "uingrd/py3dtool", "max_stars_repo_head_hexsha": "43f7939bd713da189bd93fb5e1aa298958ce3b81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
import logging
import time
import requests
from src.constants import classes, landing_statuses, base_url
from src.detected_object import DetectedObject
import cv2
import numpy as np
from threading import Thread
class ObjectDetectionModel:
# Base class for team models
def __init__(self, eva... | {"hexsha": "6c647c4c28d335eebfab39327561f4a751a01df5", "size": 7537, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/object_detection_model.py", "max_stars_repo_name": "halilyaman/UlasimdaYapayZekaYarismasi", "max_stars_repo_head_hexsha": "e9f024454470ad6f40653583f3d7f24cdd4f4fd9", "max_stars_repo_licenses":... |
SUBROUTINE HATPHS(IPHASE,IENABL)
C
C ------------------------------------------------
C ROUTINE NO. ( 335) VERSION (A8.1) 09:JUL:87
C ------------------------------------------------
C
C THIS SETS THE PHASE FOR CROSS-HATCHING.
C
C
C THE ARGUMENTS ARE AS FOLLOWS:
C... | {"hexsha": "52a5d0291fbdddcffaf8a06050490dc3d552d925", "size": 1354, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/hatphs.f", "max_stars_repo_name": "ZedThree/GHOST", "max_stars_repo_head_hexsha": "cba30b43bdcc73fb87cff0724337a7d3a1bd7812", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
c=======================================================================
c
c subroutine PRbinomial
c
c This function produces values and greeks of European and American
c puts and calls following the Cox, Ross, Rubinstein binomial model.
c
c----------------------------... | {"hexsha": "1e4a12f560082ebc0beb326716bfaa414991f425", "size": 3152, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/math/pricing/PRbinomial.f", "max_stars_repo_name": "alpgodev/numx", "max_stars_repo_head_hexsha": "d2d3a0713020e1b83b65d3a661c3801ea256aff9", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
from PIL import Image
import numpy as np
import math
class LedProcessorError(Exception):
pass
class LedProcessor():
def __init__(self, image, rot):
"""
Initializes processing of a 12x12 PNG image for reflex Dance LED data
processing.
The image must be 12x12. Grayscale is curren... | {"hexsha": "33384c3e28112fc3a2593c51b6d4c68f04c8e1f3", "size": 6661, "ext": "py", "lang": "Python", "max_stars_repo_path": "led_processing.py", "max_stars_repo_name": "emkooz/python-interface", "max_stars_repo_head_hexsha": "902e938ed3211e75adfcaf225e5176b90968383c", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import json
from PIL import Image, ImageDraw
import os
import numpy as np
import matplotlib.pyplot as plt
preds_path = "../data/hw02_preds"
data_path = '../data/RedLights2011_Medium'
gts_path = '../data/hw02_annotations'
score_thresh = 0.2
def main():
with open(os.path.join(preds_path,'preds_test.json'),'r') as f... | {"hexsha": "88f8e92f4997a76d0502cd5af1a72afc13d791ec", "size": 1743, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualize.py", "max_stars_repo_name": "Anish2454/caltech-ee148-spring2020-hw02", "max_stars_repo_head_hexsha": "760f7c25a4b37bf98ab1a7b00b8023e124bf1bde", "max_stars_repo_licenses": ["MIT"], "max_... |
import argparse
import base64
import random
import shutil
import sys
import time
import warnings
import numpy as np
import torch
import torchvision.transforms as transforms
import torchvision.models as models
sys.path.append("../../")
import heat as ht
model_names = sorted(
name
for name in models.__dict__
... | {"hexsha": "022d5cd84fcef6ef083a1feb66610156537e71ca", "size": 13512, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/nn/imagenet.py", "max_stars_repo_name": "Cdebus/heat", "max_stars_repo_head_hexsha": "38ef4a95957956769be1a00de0d9b219fc5dc8c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
s #!/usr/bin/python
'''Does the analysis for how different visual utility estimators impact the overall system performance.'''
usage='RunVUClassifierAnalysis.py'
import roslib; roslib.load_manifest('species_id')
import rospy
from species_id import DetectionUtils
import VUAnalysisTools
import numpy as np
import scipy.i... | {"hexsha": "8f814da6d125daa8b4b38d0fdf9d922845cc4cf7", "size": 17043, "ext": "py", "lang": "Python", "max_stars_repo_path": "species_id/src/RunVUClassifierAnalysis.py", "max_stars_repo_name": "MRSD2018/reefbot-1", "max_stars_repo_head_hexsha": "a595ca718d0cda277726894a3105815cef000475", "max_stars_repo_licenses": ["MIT... |
import torch
import numpy as np
import networkx as nx
from torch_geometric_temporal.nn.convolutional import TemporalConv, STConv, ASTGCN, MSTGCN
from torch_geometric.utils import to_scipy_sparse_matrix
def create_mock_data(number_of_nodes, edge_per_node, in_channels):
"""
Creating a mock feature matrix and edg... | {"hexsha": "66ae64e16526d758d09c478ac6f5a35f95071323", "size": 6874, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/convolutional_test.py", "max_stars_repo_name": "msalvato/pytorch_geometric_temporal", "max_stars_repo_head_hexsha": "149bd46d3b2bddfc3570e31a91a3f53e8873d50e", "max_stars_repo_licenses": ["MI... |
[STATEMENT]
lemma PO_m2_inv3_extrKey_trans [iff]:
"{m2_inv3_extrKey \<inter> m2_inv3a_sesK_compr} trans m2 {> m2_inv3_extrKey}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. {m2_inv3_extrKey \<inter> m2_inv3a_sesK_compr} TS.trans m2 {> m2_inv3_extrKey}
[PROOF STEP]
apply (auto simp add: PO_hoare_defs m2_defs intr... | {"llama_tokens": 20639, "file": "Security_Protocol_Refinement_Key_establish_m2_nssk", "length": 14} |
/**
@file
Copyright John Reid 2007
*/
#ifndef MYRRH_MATH_H_
#define MYRRH_MATH_H_
#ifdef _MSC_VER
# pragma once
#endif //_MSC_VER
#include "myrrh/defs.h"
#include <boost/iterator.hpp>
#include <boost/range.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
#include ... | {"hexsha": "54cd347e3b2db1f2e377299448db8550d2f7ae3a", "size": 8039, "ext": "h", "lang": "C", "max_stars_repo_path": "myrrh/math.h", "max_stars_repo_name": "JohnReid/myrrh", "max_stars_repo_head_hexsha": "09dc97c739232c03493e2344e64735b30eea5f99", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_stars_r... |
"""Generating tables for operations on the rep of the monster
This includes also somw functions that use these table independent
of characteristic p
"""
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
import os
import sys
import numpy as np
from mmgroup.... | {"hexsha": "921cdc3dd7a7647410b368b99a0bf71e306d1d6a", "size": 3103, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mmgroup/dev/mm_basics/mm_tables.py", "max_stars_repo_name": "Martin-Seysen/mmgroup", "max_stars_repo_head_hexsha": "6acd566f1079e7e27eec76352477fbba39eeb65f", "max_stars_repo_licenses": ["MIT"... |
import numpy as np
import scipy as sp
from matrix_util import *
from random_matrices import *
import matplotlib.pyplot as plt
from timer import Timer
import os
import time
import logging
from datetime import datetime
from argparse import ArgumentParser
from train_fde import *
import env_logger
def options(logger=N... | {"hexsha": "a5c20a5dd4bc69fffeea61357fc45d52c7bbf13a", "size": 10579, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/validate_train_cw.py", "max_stars_repo_name": "ThayaFluss/cnl", "max_stars_repo_head_hexsha": "485345e730a4cbf5cff6dbdeeb5e1fb7c4283733", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
[STATEMENT]
lemma safe_pac_step_rel_assn[safe_constraint_rules]:
"is_pure K \<Longrightarrow> is_pure V \<Longrightarrow> is_pure R \<Longrightarrow> is_pure (pac_step_rel_assn K V R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>is_pure K; is_pure V; is_pure R\<rbrakk> \<Longrightarrow> is_pure (pac_st... | {"llama_tokens": 174, "file": "PAC_Checker_PAC_Checker_Init", "length": 1} |
import os
import glob
import random
from collections import defaultdict
import torch
import numpy as np
from PIL import Image
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision.datasets import Omniglot
from torchvision.datasets.utils import list_files
from scripts.sampler impo... | {"hexsha": "ed3477ce44c8693c19612e9ea9381cb0f3d8781d", "size": 7875, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/datasets/omniglot.py", "max_stars_repo_name": "sutd-visual-computing-group/KML-Classification", "max_stars_repo_head_hexsha": "78ae18732590748a80b6db3cb50fb723a649f01c", "max_stars_repo_li... |
[STATEMENT]
lemma not_residue_primroot_0 [simp]: "~residue_primroot 0 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<not> residue_primroot 0 x
[PROOF STEP]
by (auto simp: residue_primroot_def) | {"llama_tokens": 88, "file": null, "length": 1} |
#=
This file contains main functions for calculating the expansion entropy
of dynamical systems.
Expansion entropy is defined in (Hunt and Ott, 2015) [1] as a quantitative measure
of chaos. For details, read the docstrings of the functions below.
[1] : B. & E. Ott, ‘Defining Chaos’, [Chaos 25.9 (2015)](https://doi.org... | {"hexsha": "d656e6e50725b788329b3b060791742315c54afc", "size": 9026, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/chaosdetection/expansionentropy.jl", "max_stars_repo_name": "onkyo14taro/ChaosTools.jl", "max_stars_repo_head_hexsha": "2b7d157de60027f9fbf6efcfaeb8cdccf8f480f6", "max_stars_repo_licenses": ["M... |
-- A record that fails to type-check due to missing field.
Counter = { get: Unit -> Nat, inc: Unit -> Unit };
c = let r = { x = ref 1 } in
{ get = lambda _: Unit. !(r.x) } as Counter;
| {"hexsha": "20c11423b7fe406fdd5dba4a2d781d27f003e40d", "size": 191, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "test/test_19.f", "max_stars_repo_name": "brunoflores/fulluntyped", "max_stars_repo_head_hexsha": "657b44574ecb5915f0af29414fcd87a063ba4def", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co... |
[STATEMENT]
lemma reach_step:
"reach s \<Longrightarrow> reach (snd (step s a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. reach s \<Longrightarrow> reach (snd (step s a))
[PROOF STEP]
using reach.Step[where trn = "Trans s a ou (snd (step s a))" for ou]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>reach ?... | {"llama_tokens": 246, "file": "Bounded_Deducibility_Security_IO_Automaton", "length": 2} |
#!/usr/bin/python3
'''Advent of Code 2018 Day 18 solution'''
from typing import List, Tuple
import numpy
from aoc2018 import sequence
Grid = List[List[str]]
def getsurrounds(grid: Grid, y: int, x: int) -> str:
'''Get squares surrounding given coordinates'''
result = ''
if y > 0:
if x > 0:
... | {"hexsha": "d030f7efea0a6fd6e53fb490645fe5ee4b03a645", "size": 2604, "ext": "py", "lang": "Python", "max_stars_repo_path": "aoc2018/day18.py", "max_stars_repo_name": "zoeimogen/AoC2018", "max_stars_repo_head_hexsha": "d50e1c483e58067f0f73e04318997410d53fcf15", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
[STATEMENT]
lemma (in vsv) vsv_vlrestriction[intro, simp]: "vsv (r \<restriction>\<^sup>l\<^sub>\<circ> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. vsv (r \<restriction>\<^sup>l\<^sub>\<circ> A)
[PROOF STEP]
using vsv_axioms
[PROOF STATE]
proof (prove)
using this:
vsv r
goal (1 subgoal):
1. vsv (r \<restric... | {"llama_tokens": 161, "file": "CZH_Foundations_czh_sets_CZH_Sets_BRelations", "length": 2} |
import numpy as np
import math
c = 2.9979 * pow(10,8)
e = 8.85 * pow(10,-12)
#Practice test question 4 Type
def radPressure():
ElecMagInt = float(input("Input the electromagnetic intensity (W/m^2): "))
elecMax = math.sqrt(2*(ElecMagInt)*(4 * math.pi * pow(10,-7))*c)
print("Max value of ... | {"hexsha": "ede5d48db9b0e934d40294691241bc2ebaf9c138", "size": 381, "ext": "py", "lang": "Python", "max_stars_repo_path": "Physics250-ME32/MaxValueElecField.py", "max_stars_repo_name": "illusion173/Physics250", "max_stars_repo_head_hexsha": "69f2ffdb8af013e8b0739779861c1455b579ddaf", "max_stars_repo_licenses": ["MIT"],... |
#!/usr/bin/env python3
"""
Analyze one of more ZGY files to determine how bricks are ordered on disk.
Ideally the ordering is strictly one of the 6 possible permutations.
For each possibility the program will calculate how close the file is
to the goal. It will also suggest the access ordering the applications
should ... | {"hexsha": "372903b64ea32a81e5d45596e708d9ebf7555ee8", "size": 8008, "ext": "py", "lang": "Python", "max_stars_repo_path": "openzgy/tools/isoptimal.py", "max_stars_repo_name": "equinor/pyzgy", "max_stars_repo_head_hexsha": "94cd3d9050c3027d042a83b98779da9182041137", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
module dl_timer_parallel
!> Module containing empty stubs of routines that, in an MPI
!! build, would make calls to MPI routines. This allows us
!! to compile without requiring MPI to be installed.
!! When performing an MPI build we use parallel_mpi.f90
!! instead.
use dl_timer_constants_mod
implicit none... | {"hexsha": "c64ed53721b2f6f1cc50b0b581151146aba87940", "size": 2282, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "shared/dl_timer/src/parallel_stub.f90", "max_stars_repo_name": "team-hacking-nemo/nemolite2d-cuda", "max_stars_repo_head_hexsha": "ffee02a6066b7b39a83d2a399a580aa67bd824cc", "max_stars_repo_lice... |
module _SampEn2D
export SampEn2D
using Statistics: mean, std
"""
SE2D, Phi1, Phi2 = SampEn2D(Mat)
Returns the bidimensional sample entropy estimate (`SE2D`) and the number
of matched sub-matricess (m:Phi1, m+1:Phi2) estimated for the data
matrix (`Mat`) using the default parameters: time d... | {"hexsha": "a4567e975f6952562aa006d99ba7a670ac9dfd3b", "size": 4916, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/_SampEn2D.jl", "max_stars_repo_name": "MattWillFlood/EntropyHub.jl", "max_stars_repo_head_hexsha": "d681c7fad3dbddaa708391b0afef1495c7dde20d", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
# Bulk image resizer
# This script simply resizes all the images in a folder to one-eigth their
# original size. It's useful for shrinking large cell phone pictures down
# to a size that's more manageable for model training.
# Usage: place this script in a folder of images you want to shrink,
# and then run it.
# im... | {"hexsha": "6797892640b6b66ee6b713dca07789d6fee89f0a", "size": 1233, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/images/train/resizer.py", "max_stars_repo_name": "DSGunasekara/object_detection_demo", "max_stars_repo_head_hexsha": "13677b1f0372165427c9f3bf483d8ac50c8db61f", "max_stars_repo_licenses": ["M... |
[STATEMENT]
lemma compilePrim_Prop1[rule_format]:
"(l, code, p, OUT) : compilePrim \<Longrightarrow>
(\<forall> code1l1 . OUT = (code1, l1) \<longrightarrow>
(l < l1 \<and> (\<forall> ll . ll < l \<longrightarrow> code1\<down>ll = code\<down>ll) \<and>
(\<forall> ll . l \<le> ll \<longrightarrow> ll < l1 ... | {"llama_tokens": 147645, "file": "BytecodeLogicJmlTypes_Cachera", "length": 152} |
# -*- coding: utf-8 -*-
"""
This code creates a SVM and Random Forest model for predicting the outcome of the game
"""
import numpy as np
import pandas as pd
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.cross_validation import KFold
from sklearn import grid_search
from F... | {"hexsha": "5c4083dfca35fb57133d414668942e0077bf5deb", "size": 1924, "ext": "py", "lang": "Python", "max_stars_repo_path": "Classification/Winner_Model.py", "max_stars_repo_name": "mprego/NBA", "max_stars_repo_head_hexsha": "6b065f0bafb72da2a9a8e4e01304e0097e6dfd77", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
from design_bench.disk_resource import DATA_DIR
from design_bench.disk_resource import google_drive_download
import pandas as pd
import numpy as np
import argparse
import os
import math
# order is important due to BLOSUM matrix in ProteinKernel
AA = ['a', 'r', 'n', 'd', 'c', 'q', 'e', 'g', 'h',
'i', 'l', 'k', '... | {"hexsha": "e7a6e2b7a4265c5411c6a4321d9379eb73139ae4", "size": 2438, "ext": "py", "lang": "Python", "max_stars_repo_path": "process/process_raw_gfp.py", "max_stars_repo_name": "brandontrabucco/design_bench", "max_stars_repo_head_hexsha": "824516ec59396aded3ca55ec7c1c313626ecaceb", "max_stars_repo_licenses": ["MIT"], "m... |
import numpy as np
class InvalidInputException(Exception):
def __init__(self):
print("Input nodes and Weights are not of the same length")
class InconsistentArrayLengthException(Exception):
def __init__(self):
print("Array length of given inputs do not match")
class Node(object):
"""
... | {"hexsha": "742f08c9a122b12b991da86ea61c8bf469a417ad", "size": 8350, "ext": "py", "lang": "Python", "max_stars_repo_path": "miniflow.py", "max_stars_repo_name": "anborde/miniflow", "max_stars_repo_head_hexsha": "aaf3720ca31be4cf23a575c466828d7f68e5d5e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
# coding: utf-8
# # Figure SI 1: Global optimization over parameters
# This notebook contains the analysis of a direct global opimization over all four parameters ($p, q, c_{\rm constitutive}, p_{\rm uptake}$) of the model as a function of the pathogen statistics. It can be thought of as a supplement to Figure 1, mo... | {"hexsha": "bb14fb19511d28c9ea88dcb6ce971a0b61ceb219", "size": 3670, "ext": "py", "lang": "Python", "max_stars_repo_path": "figSIopt/figure-SIopt.py", "max_stars_repo_name": "andim/evolimmune", "max_stars_repo_head_hexsha": "6ffcc19e8725d343e9b10fa9c4dd77a9a485398a", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
//==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... | {"hexsha": "e55753a72e7955a03f8f68b2d555b57aa3630762", "size": 2217, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/detail/constant/splitfactor.hpp", "max_stars_repo_name": "nickporubsky/boost-simd-clone", "max_stars_repo_head_hexsha": "b81dfcd9d6524a131ea714f1eebb5bb75adddcc7", "max_stars_repo... |
From iris.proofmode Require Import tactics.
From aneris.aneris_lang Require Import network adequacy.
From aneris.aneris_lang.program_logic Require Export aneris_weakestpre.
Definition aneris_adequate (e :expr) (ip : ip_address) (σ : state)
(φ : val → Prop) :=
adequate NotStuck (mkExpr ip e) σ (λ v _, ∃ w... | {"author": "fresheed", "repo": "trillium-experiments", "sha": "a9c38a9e9566fb8057ae97ecb8d1a0c09c799aef", "save_path": "github-repos/coq/fresheed-trillium-experiments", "path": "github-repos/coq/fresheed-trillium-experiments/trillium-experiments-a9c38a9e9566fb8057ae97ecb8d1a0c09c799aef/vendor/aneris/theories/aneris_lan... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 13 12:28:43 2022
@author: mprantan
"""
import xarray as xr
import pandas as pd
import numpy as np
import warnings
def thermal_growing_season_length(da_t2mean_summer, basevalue):
## This function calculates the length of growing season, us... | {"hexsha": "0365aacb24d3005a2c99a6a7de0eca676c16d0fe", "size": 34064, "ext": "py", "lang": "Python", "max_stars_repo_path": "indices.py", "max_stars_repo_name": "fmidev/resiclim-climateatlas", "max_stars_repo_head_hexsha": "b0c4c0ba6e3d189524cc89904636129733916f69", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
[STATEMENT]
lemma lemma_4_12_i_ii: "a \<noteq> 1 \<Longrightarrow> filterof({a}) = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. a \<noteq> (1::'a) \<Longrightarrow> filterof {a} = UNIV
[PROOF STEP]
apply (cut_tac strong_simple)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>a \<noteq> (1::'a); pr... | {"llama_tokens": 1546, "file": "PseudoHoops_SpecialPseudoHoops", "length": 12} |
[STATEMENT]
lemma s_chop: "i \<le> length t \<Longrightarrow> s c t i = s c (take i t) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i \<le> length t \<Longrightarrow> s c t i = s c (take i t) i
[PROOF STEP]
unfolding s_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. i \<le> length t \<Longrightarrow> The ... | {"llama_tokens": 162, "file": "Chandy_Lamport_Co_Snapshot", "length": 2} |
#!/usr/bin/julia --color=yes
using ArgParse
using JSON
function bench(f, simulate=false)
fp = joinpath(JSON_DATA_DIR, string(f, ".json"))
if !isfile(fp)
println("Downloading benchmark file...")
download(DATA_SOURCES[f], fp)
end
gc() # run gc so it doesn't affect benchmarks
t = if... | {"hexsha": "48e6a16140f2f22738e2117020d757b92cad03ce", "size": 2903, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "public/.julia/v0.5/JSON/bench/bench.jl", "max_stars_repo_name": "Giarcr0b/MVO_Tool", "max_stars_repo_head_hexsha": "8f3348b8b56968febca8307acea3ebe1817fccae", "max_stars_repo_licenses": ["MIT"], "m... |
# coding=utf-8
"""Polynomial regression.
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model
from sklearn.metrics import r2_score
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline import Pipeline
if __name__ == "__main__":
print("Generating data...")
... | {"hexsha": "16a5fa3c7f78f4935efeb77d92974ddb5ba2d4fd", "size": 1218, "ext": "py", "lang": "Python", "max_stars_repo_path": "ClassificationAndRegression/GeneralizedLinearModels/PolynomialRegression.py", "max_stars_repo_name": "kopok2/machine-learning-algorithms", "max_stars_repo_head_hexsha": "9d5eb9c17a1354e726b79e9cfa... |
!-------------------------------------------------
! Subroutine to evolve the disk
!-------------------------------------------------
subroutine evolve
use gravdata
use planetdata
use unitdata
use winddata, only: sigdot_wind, sigdot_accrete
implicit none
real(kind=8) :: dtmin,C0,C1,dr2,dr
real(kind=... | {"hexsha": "c249e14384e5db28a902c096e1f50652037f8449", "size": 4126, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/main/evolve.f90", "max_stars_repo_name": "dh4gan/visag", "max_stars_repo_head_hexsha": "bf3698459c0b41c9097807f9baf32eee3ca0bdbe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
from motion import smoother as sm
from motion import checker as ctcb
from motion import collisioncheckerball as cdck
from motion.rrt import rrtconnect as rrtc
from robotsim.robots.dualarm.yumi import yumi
from robotsim.robots.dualarm.yumi import yumimesh, yumiball
from pandaplotutils import pandactrl
import manipulatio... | {"hexsha": "8e8dedc5364ede84a457075ef3b7faf82e1f55aa", "size": 6701, "ext": "py", "lang": "Python", "max_stars_repo_path": "0000_huri/motionplanning_yumi.py", "max_stars_repo_name": "Photon26/wrs-main-210414", "max_stars_repo_head_hexsha": "71efab6f8680af48ba269244136acf69c36cb730", "max_stars_repo_licenses": ["MIT"], ... |
[STATEMENT]
lemma merge1_img_eq: "\<forall>(t2,e2) \<in> fset xs. merge1 t2 = t2 \<Longrightarrow> ((\<lambda>(t,e). (merge1 t,e)) |`| xs) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<forall>(t2, e2)\<in>fset xs. merge1 t2 = t2 \<Longrightarrow> (\<lambda>(t, e). (merge1 t, e)) |`| xs = xs
[PROOF STEP]
usi... | {"llama_tokens": 309, "file": "Query_Optimization_IKKBZ", "length": 2} |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# scinoephile.__init__.py
#
# Copyright (C) 2017-2019 Karl T Debiec
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD license. See the LICENSE file for details.
################################### MODULES ###########... | {"hexsha": "6352c2ce32f3f190ff5d2ee495520ecff6c2c44b", "size": 19973, "ext": "py", "lang": "Python", "max_stars_repo_path": "scinoephile/__init__.py", "max_stars_repo_name": "KarlTDebiec/scinoephile", "max_stars_repo_head_hexsha": "5ccdf600bbe08c0902eefa7bfba814ad1937fc2c", "max_stars_repo_licenses": ["BSD-3-Clause"], ... |
#!/usr/bin/env python3
import argparse
import glob
import os
import json
import sys
import os
import subprocess
import os.path
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import json
import sys
import subprocess
import numpy as np
import msparser # https://github.com/MathieuTurcotte/msparser
f... | {"hexsha": "4c6ca3911fc8a6523db71778074a2f00597aed1c", "size": 8054, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/lambdapure/compile/bench/stacksize-filter.py", "max_stars_repo_name": "bollu/lz", "max_stars_repo_head_hexsha": "f5d09b70956072a56c1d9cc0e6907a0261c108a5", "max_stars_repo_licenses": ["Apache... |
# This file contains functions to create new positions.
"""
function make_new_positions
Return a new vector of SPADL.
"""
function make_new_positions(vector_wyscout_data::Vector{WyscoutData})::Vector{WyscoutData}
for i in eachindex(vector_wyscout_data)
if length(vector_wyscout_data[i].event.positions) ==... | {"hexsha": "7c84711843a855374309c51713a6a0926cadaefe", "size": 1348, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/spadl/positions.jl", "max_stars_repo_name": "tlorans/SPADL.jl", "max_stars_repo_head_hexsha": "2e2ca173b9e9c40fc06a9c8f6f28598ffa75ab45", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from scaii.env.sky_rts.env import SkyRtsEnv, MoveList, SkyState
class TowerAction(MoveList):
def __init__(self, discrete_actions=None, continuous_actions=None, env_actions=None, skip=True):
super().__init__(discrete_actions=discrete_actions,
continuous_actions=continuous_actions, ... | {"hexsha": "ae483ed4b1ee48db2391279b9bdea9048e14515e", "size": 2494, "ext": "py", "lang": "Python", "max_stars_repo_path": "backends/sky-rts/glue/python/sky_rts/env/scenarios/tower_example.py", "max_stars_repo_name": "SCAII/SCAII", "max_stars_repo_head_hexsha": "7ab302f788556392850d104d3df6e0b4a556414d", "max_stars_rep... |
# -*- coding: utf-8 -*-
import numpy
from random import shuffle, choice
from src.individu import Individual
from src.Message import MessageBody
class Ilot(object):
""" Un ilot est compose de :
- individus: une liste d'individu
- individu_sum: la somme de la norme de chaque individu
- nb_... | {"hexsha": "430d1af91464762662e4e3b4e28b4881dceee803", "size": 3181, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Ilot.py", "max_stars_repo_name": "Oueee/SOS", "max_stars_repo_head_hexsha": "d2c646da4c89b638595c918e5367a15e1a68c768", "max_stars_repo_licenses": ["Beerware"], "max_stars_count": null, "max_s... |
from IPython import embed
import os
import pprint
import torch
from collections import defaultdict
import numpy as np
#pretrained_model = torch.hub.load('pytorch/fairseq', 'xlmr.large')
#pretrained_model.to(device)
#pretrained_model.eval()
def read_conll(in_path, out_path):
out = open(out_path, '+w')
with op... | {"hexsha": "f35c6dca2f125514bc44b285ec09fcb609134c31", "size": 4779, "ext": "py", "lang": "Python", "max_stars_repo_path": "ud_datasets.py", "max_stars_repo_name": "adamlek/ud-morphological-tagging", "max_stars_repo_head_hexsha": "f7bc30d5ad4575b7a99cce5625973268be57f775", "max_stars_repo_licenses": ["MIT"], "max_stars... |
import gym
import gym_panda #need to be imported !!
import random
import numpy as np
import matplotlib.pyplot as plt
import time
import execnet
from pilco.models import PILCO
from pilco.controllers import RbfController, LinearController
from pilco.rewards import ExponentialReward
import tensorflow as tf
from gpflow ... | {"hexsha": "8f8c1798c09db7deb8d7a3ea6b784a02ef8022dd", "size": 6499, "ext": "py", "lang": "Python", "max_stars_repo_path": "Compliant_control/gym-panda/VIC/PILCO_VIC.py", "max_stars_repo_name": "martihmy/Compliant_control", "max_stars_repo_head_hexsha": "485f627fa83d59f414f41bd57c5d37528ef5f1ec", "max_stars_repo_licens... |
import os
import numpy as np
from utils import settings
def gen_mean_tranfer_results(dst, n_sources, attn, base_model):
model_dir = os.path.join(settings.OUT_DIR, dst)
with open(os.path.join(model_dir, "{}_{}_moe_attn_{}_sources_{}_train_num_{}_results.txt".format(
dst, base_model, attn, n_sources, N... | {"hexsha": "163cdf75ae75950ec4b056e81b23de1a584dccc7", "size": 14778, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp/gen_results.py", "max_stars_repo_name": "zfjsail/oag-moe-transfer-2020", "max_stars_repo_head_hexsha": "06b4a7dfdf4a0bf7efad9ce104fb7ca5e5800149", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""Test the embedding conext_com module (SCP.conext_com).
This module has a class (SCP.conext_com.com) that is used to
communicate with the Schneider Conext devices. The tests for
this class require the Schneider Conext devices to be connected
via ethernet.
"""
import numpy as np
import pytest
import SCP
from SCP.con... | {"hexsha": "49204a257030acfd72d7c6b7d535c7013f26bfca", "size": 2879, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_conext_com.py", "max_stars_repo_name": "AlexanderPollak/Solar-Controller-BMS", "max_stars_repo_head_hexsha": "2a6cc673584fac70f6ab5aff4a2d551683f4841d", "max_stars_repo_licenses": ["MIT... |
import os
import torch
import torch.utils.data
from PIL import Image
import sys
import numpy as np
if sys.version_info[0] == 2:
import xml.etree.cElementTree as ET
else:
import xml.etree.ElementTree as ET
from maskrcnn_benchmark.structures.bounding_box import BoxList
import cv2
class ICDAR2013... | {"hexsha": "cba14da538ed4f4112ec9392f3ed8f79208d94b2", "size": 4223, "ext": "py", "lang": "Python", "max_stars_repo_path": "maskrcnn_benchmark/data/icdar_series.py", "max_stars_repo_name": "clw5180/remote_sensing_object_detection_2019", "max_stars_repo_head_hexsha": "7b348cc237238397798b41e536e212d2471d6da9", "max_star... |
import numpy as np
import random
from Agent_FP import AgentFP
from collections import deque # Used for replay buffer and reward tracking
from datetime import datetime # Used for timing script
from env import IntersectionEnv
SEED = 24
IMAGE = True
BATCH_SIZE = 64
REPLAY_MEMORY_SIZE = 5000
GAMMA = 0.99 # discount f... | {"hexsha": "ae4d586ba7a5f4319bc64b33c557bcaa4b7c41f6", "size": 7050, "ext": "py", "lang": "Python", "max_stars_repo_path": "social_learning_fp.py", "max_stars_repo_name": "supersglzc/Social-Learning", "max_stars_repo_head_hexsha": "cea6551a9c587a1f839f7122e8e05d680bfad2e6", "max_stars_repo_licenses": ["MIT"], "max_star... |
using Parameters
using SpecialFunctions
using LinearAlgebra
using Tracker
using ReverseDiff
using RecursiveArrayTools
@inline function calcgibbs(ph::U,T::W) where {U<:IdealPhase,W<:Real}
return getGibbs.(getfield.(ph.species,:thermo),T)
end
export calcgibbs
@inline function calcenthalpyinternalgibbs(ph::U,T::W,P:... | {"hexsha": "31a5fdf03f92514b24cca2b5e468d00e4e6966bb", "size": 11745, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PhaseState.jl", "max_stars_repo_name": "MechGen3SO/ReactionMechanismSimulator.jl", "max_stars_repo_head_hexsha": "09ef14046b786dea6b53a0517016b9b154386d3d", "max_stars_repo_licenses": ["MIT"],... |
from __future__ import print_function
import tensorflow as tf
import numpy as np
import utils.tf_utils as tfu
class MultiHeadUnet_2D:
def __init__(self, config, image_size=(512, 512)):
self.config = config
self.create_inputs(image_size)
self.build_encoder()
self._update_ops = tf.get_collection(t... | {"hexsha": "0a3c3df44c3329b2c809c5093f21e6a53ddddcd6", "size": 14824, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/aggressive_multi_head_UNET_2d.py", "max_stars_repo_name": "jdapoorv/lung-cancer-detector", "max_stars_repo_head_hexsha": "bd98e99ef4b6c7c1f4dec8458c6c655ea6c8b1ba", "max_stars_repo_license... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 19 14:55:02 2021
@author: Luca Azzolin
Copyright 2021 Luca Azzolin
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
regard... | {"hexsha": "22e7630f4869e9895f724995226475c977b8c77d", "size": 8841, "ext": "py", "lang": "Python", "max_stars_repo_path": "standalones/function.py", "max_stars_repo_name": "KIT-IBT/AugmentA", "max_stars_repo_head_hexsha": "b44ea02a4c6e33fd6c14ce3cf180d5603ff660b1", "max_stars_repo_licenses": ["Naumen", "Condor-1.1", "... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "UnfilteredIMU.h"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include "Utils/cv.h"
#include <boost/optional.hpp>
#include <arcana/containers/sorted_vector.h>
#include <arcana/analysis/object_trace.h>
#include <arcana/analysis/d... | {"hexsha": "518ad0af26226b25fba5ec3237333b0cb91d8ebf", "size": 6958, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Core/MAGESLAM/Source/Fuser/UnfilteredIMU.cpp", "max_stars_repo_name": "syntheticmagus/mageslam", "max_stars_repo_head_hexsha": "ba79a4e6315689c072c29749de18d70279a4c5e4", "max_stars_repo_licenses": ... |
#!/usr/bin/env python3
#
# Code to compute angular power spectra using Limber's approximation,
# ignoring higher-order corrections such as curved sky or redshift-space
# distortions (that predominantly affect low ell).
#
import numpy as np
import sys
from scipy.integrate import simps
from scipy.interpolate import In... | {"hexsha": "c2809c608f1de66ee0626afb311f8e01e8604949", "size": 5904, "ext": "py", "lang": "Python", "max_stars_repo_path": "gxk_likelihood/predict_cl.py", "max_stars_repo_name": "LBJ-Wade/CobayaLSS", "max_stars_repo_head_hexsha": "faa233a31cf1fba120258ebd143b1c92c9e13135", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#!/usr/bin/python3
import argparse
import pickle
import numpy as np
import os.path
from progress.bar import Bar
from lib import ProjectMgr
# Maximally group all match chains. If we squeeze out redundancy, the
# sba solution should be better.
parser = argparse.ArgumentParser(description='Keypoint projection.')
pars... | {"hexsha": "0ad80816c041c00ea07d8ec1f22de77ff8f4a6b8", "size": 4446, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/archive/4d-match-grouping.py", "max_stars_repo_name": "lpenuelac/ImageAnalysis", "max_stars_repo_head_hexsha": "a01b1278cca92e45fef6f5e41d1310cfbb041308", "max_stars_repo_licenses": ["MIT"... |
# coding: utf-8
import logging
import sys
import os
import gzip
import requests
import simplejson as json
import functools
import warnings
import urllib.parse
from time import time
import numpy
from contextlib import contextmanager
from collections import OrderedDict
# from dozer import Dozer
import boto3
warnings.fi... | {"hexsha": "b8955d8df774487b75303ca78bacfa11757881c5", "size": 11571, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "Impactstory/jump-api", "max_stars_repo_head_hexsha": "e9c048694905e4606b68ae4650696a134bd5a349", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
from __future__ import print_function
import numpy as np
import tensorflow as tf
from mlp import mlp_layer
from convnet import ConvNet, construct_filter_shapes
"""
generator p(x)p(z|x)p(y|x, z), DFX
note here this is actually a discriminative model: we assume p(x) = p_D(x)
"""
def deconv_layer(output_shape, filte... | {"hexsha": "c4e3a3155921c810614b54e8feddc3028bb6a4c4", "size": 3670, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/conv_generator_mnist_D.py", "max_stars_repo_name": "surrealyz/DeepBayes", "max_stars_repo_head_hexsha": "b9d9e7a3708d1faf7aa918756619d99b0e71ae3e", "max_stars_repo_licenses": ["MIT"], "max_... |
#' alarm
#'
#' A count down until the clock matches the given time(s).
#'
#' @param timestr Time(s) that the alarm will go off.
#'
#' @examples
#' \dontrun{
#' alarm("01:32")
#' alarm("14:59:15")
#' alarm(c("01:32","14:59:15"))
#' }
#'
#' @export
alarm = function(timestr)
{
strtosec=function(ts){
curtime=as.P... | {"hexsha": "172f6087dfdb5ad60fd27db9e7678e42a28519ba", "size": 770, "ext": "r", "lang": "R", "max_stars_repo_path": "R/alarm.r", "max_stars_repo_name": "heckendorfc/timer", "max_stars_repo_head_hexsha": "c162f084690bc24f0ceafe8f5c50c2e8a44b32bf", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 1, "max_stars_... |
[STATEMENT]
lemma dual_incidence_iff: "i < \<v> \<Longrightarrow> j < \<b> \<Longrightarrow> \<B>s ! j = bl \<Longrightarrow> \<V>s ! i = x \<Longrightarrow> (x \<in> bl \<longleftrightarrow> j \<in> \<B>s* ! i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>i < \<v>; j < \<b>; \<B>s ! j = bl; \<V>s ! i = ... | {"llama_tokens": 334, "file": "Fishers_Inequality_Dual_Systems", "length": 2} |
from tensorflow import keras
import tensorflow as tf
from tensorflow.keras import Model
from tensorflow.keras.layers import *
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
import pickle
from sklearn.model_selection import train_test_split
physic... | {"hexsha": "225959c441cad2408a279b9eb480a476f4fbb9db", "size": 4982, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/modeling/stock_forecasting.py", "max_stars_repo_name": "ilrd/Tesla_News_Sentiment_Analysis", "max_stars_repo_head_hexsha": "d295956bfd4b5e1e9f0491e28c605f34852fab30", "max_stars_repo_licenses"... |
"""
vertices_graph.py: Compute the polar coordinates of all patches.
Pablo Gainza - LPDI STI EPFL 2019
This file is part of MaSIF.
Released under an Apache License 2.0
"""
import networkx as nx
import numpy as np
import scipy.linalg
from numpy.linalg import norm
import pymesh
def vertices_graph(mesh, weighted=False... | {"hexsha": "f9e75f54bd28e431a12eda8a11262735b7e4d7ae", "size": 1026, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/geometry/vertices_graph.py", "max_stars_repo_name": "PolyachenkoYA/masif_2021", "max_stars_repo_head_hexsha": "93ff3395696d2f2515f569c2d0218af251168e34", "max_stars_repo_licenses": ["Apache... |
[STATEMENT]
lemma cdi_path_swap_le: assumes \<open>is_path \<pi>'\<close> \<open>j cd\<^bsup>\<pi>\<^esup>\<rightarrow>k\<close> \<open>\<pi> =\<^bsub>n\<^esub> \<pi>'\<close> \<open>j \<le> n\<close> shows \<open>j cd\<^bsup>\<pi>'\<^esup>\<rightarrow>k\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. j cd\<... | {"llama_tokens": 171, "file": "IFC_Tracking_IFC", "length": 1} |
/-
Copyright (c) 2018 Patrick Massot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Johannes Hölzl
Continuous linear functions -- functions between normed vector spaces which are bounded and linear.
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.in... | {"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/analysis/normed_space/bounded_linear_ma... |
"""
Function :
Title :
Written by:
Email : aarc.88@gmail.com
Date :
Last edit :
Language : Python 3.8 or >
Aeronautical Institute of Technology - Airbus Brazil
Description:
-
Inputs:
-
Outputs:
-
TODO's:
-
"""
# ===========================================================================... | {"hexsha": "13cc37667e4a5804c498e45f963d9bc6b8a7ba83", "size": 16512, "ext": "py", "lang": "Python", "max_stars_repo_path": "aircraft_framework_win/framework_PhD/framework/Performance/Engine/Turboprop/turboprop_performance_analysis.py", "max_stars_repo_name": "AlejandroRios/IAANDOCAC-aircraft-framework", "max_stars_rep... |
module triangle_m
implicit none
private
public :: triangle_t
type :: triangle_t
private
real :: height_, width_
contains
procedure :: area
end type
interface triangle_t
module procedure construct
end interface
contains
pure function construct(height,... | {"hexsha": "e4477bfe9403823be0179d468677fa55be4dcc84", "size": 682, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "example/custom_types/triangle_m.f90", "max_stars_repo_name": "everythingfunctional/rojff", "max_stars_repo_head_hexsha": "366f70cf2d197516ebcbddcd94e953f5268532c9", "max_stars_repo_licenses": ["M... |
!-----------------------------------------------------------------------
program test
implicit none
include 'ceedf.h'
integer ceed,err
integer x,y
integer r
integer i
integer*8 aoffset,yoffset
integer ne
parameter(ne=3)
integer*4 ind(2*ne)
real*... | {"hexsha": "2e50edc8369aa8446b2f3bacf4f3e67355d61fac", "size": 1610, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t200-elemrestriction-f.f90", "max_stars_repo_name": "rscohn2/libCEED", "max_stars_repo_head_hexsha": "0983a37fb2a235bf55920dd2b1098e5586f89fb8", "max_stars_repo_licenses": ["BSD-2-Clause"]... |
import os
from os import path
import json
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from collections import OrderedDict
import numpy as np
import re
from string import punctuation
from data_utils import read_pre_embedding
def tfidf_20... | {"hexsha": "5c296e9d6cca52c04e865854cbd9ab1e0e31bc58", "size": 4430, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "linshaoxin-maker/taas", "max_stars_repo_head_hexsha": "34e11fab167a7beb78fbe6991ff8721dc9208793", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "ma... |
from torch.utils.data.dataloader import DataLoader
from dataset import Dataset
from autoencoder_model import Autoencoder
from torch.nn import MSELoss
import torch
from config import BodyTrackingConfig
from torch.autograd import Variable
import os
import numpy as np
import matplotlib.pyplot as plt
import torch
import to... | {"hexsha": "0e827a934e3455a27286a2d6c817244bcff039b2", "size": 2765, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_AE.py", "max_stars_repo_name": "SoroushDn/Body_tracking", "max_stars_repo_head_hexsha": "643580b0a7c0fd483464e3f90c1d483bef2f001b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
theory StoreBuffer
imports "../SimAsm_Syntax"
begin
datatype globals = X | Y
record aux = S :: bool
text \<open>Auxiliary variable S encodes when the first thread will write 1 to r0\<close>
text \<open>Verification of the first thread\<close>
lemma sb0:
"FNBEGIN
R: (\<^sup>1\<lbrakk>X\<rbrakk> = 1 \<longrigh... | {"author": "UQ-PAC", "repo": "wmm-rg", "sha": "7eef2f42693cb0723a9a7a75cd7cd6f73f9bdfb2", "save_path": "github-repos/isabelle/UQ-PAC-wmm-rg", "path": "github-repos/isabelle/UQ-PAC-wmm-rg/wmm-rg-7eef2f42693cb0723a9a7a75cd7cd6f73f9bdfb2/SimAsm/Examples/StoreBuffer.thy"} |
using Test
#@startexample Local BPS (Chain of Gaussians)
#=
The approach to using the local BPS is much the same as for the global one
except that you need to specify a `FactorGraph`.
That object will contain the structure of the factor graph (i.e.: which factor is connected to which variables) as well as the list of a... | {"hexsha": "e46447994f73fe9466762939081a1566c7883168", "size": 1898, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/ex_lbps1.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/PDSampler.jl-f9d848e4-75a0-5321-a43a-fbaa97166838", "max_stars_repo_head_hexsha": "22bb24cc13cbba64f2f6ec3c1513773c5b8215ca... |
import numpy as np
def kernel(A):
A[0, 0] = np.sqrt(A[0, 0])
for i in range(1, A.shape[0]):
for j in range(i):
A[i, j] -= np.dot(A[i, :j], A[j, :j])
A[i, j] /= A[j, j]
A[i, i] -= np.dot(A[i, :i], A[i, :i])
A[i, i] = np.sqrt(A[i, i])
| {"hexsha": "6132ab32fa7a0c17473dca8b6ceaddf490973bdd", "size": 292, "ext": "py", "lang": "Python", "max_stars_repo_path": "npbench/benchmarks/polybench/cholesky/cholesky_numpy.py", "max_stars_repo_name": "frahlg/npbench", "max_stars_repo_head_hexsha": "1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26", "max_stars_repo_licenses... |
"""
[License]
test_generate_number.py
Copyright (c) 2018 Kenji Hashimoto
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
[Module Description]
test training results (generate number)
"""
import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import mnis... | {"hexsha": "f856577a5f02d86518be25e7879448a655494f8c", "size": 2353, "ext": "py", "lang": "Python", "max_stars_repo_path": "neuralnet/cvae/src/test_generate_number.py", "max_stars_repo_name": "hsmtknj/ml", "max_stars_repo_head_hexsha": "ad8e050cd754e5a1c73ed5df3bc223a1f6dc4148", "max_stars_repo_licenses": ["MIT"], "max... |
import numpy as np
import pandas as pd
from sklearn.ensemble import AdaBoostRegressor, GradientBoostingRegressor
from sklearn.feature_selection import SelectFwe, f_regression
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline, make_union
from tpot.builtins import StackingEst... | {"hexsha": "cc37f72bfd6b6f717fa216b7e7e2018ca6d9c1c7", "size": 2037, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/plasma/tpot/fold3/pipeline.py", "max_stars_repo_name": "luisferreira97/autoautoml", "max_stars_repo_head_hexsha": "501d2de8b2153748b57e5c8cb247058c587ce29c", "max_stars_repo_licenses": ["MIT"... |
[STATEMENT]
lemma WTs1_snoc_cases:
assumes wt: "P,E \<turnstile>1 es @ [e] [::] Ts"
obtains T Ts' where "P,E \<turnstile>1 es [::] Ts'" "P,E \<turnstile>1 e :: T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (\<And>Ts' T. \<lbrakk>P,E \<turnstile>1 es [::] Ts'; P,E \<turnstile>1 e :: T\<rbrakk> \<Longrightarro... | {"llama_tokens": 703, "file": "JinjaThreads_Compiler_J1WellType", "length": 7} |
g = PathGraph(4)
add_vertices!(g,10)
add_edge!(g,5,6)
add_edge!(g,6,7)
add_edge!(g,8,9)
add_edge!(g,10,9)
@test !is_connected(g)
@test is_connected(g6)
cc = connected_components(g)
label = zeros(Int, nv(g))
LightGraphs.connected_components!(label, g)
@test label[1:10] == [1,1,1,1,5,5,5,8,8,8]
import LightGraphs: com... | {"hexsha": "3a073bc0e9f28f759f7c7bbeaf70cc9bbb63685e", "size": 5245, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/connectivity.jl", "max_stars_repo_name": "JuliaPackageMirrors/LightGraphs.jl", "max_stars_repo_head_hexsha": "b13472899cba49999567bb88f9d32d5d87cf4a19", "max_stars_repo_licenses": ["MIT"], "ma... |
import time
from numpy.testing import verbose
from pandas.core.frame import DataFrame
import yfinance as yf
from sklearn.preprocessing import MinMaxScaler
import pandas as pd
import numpy as np
from stable_baselines3 import PPO
from stable_baselines3 import A2C
import gym
from gym import spaces
from gym.utils import se... | {"hexsha": "9631e2890a5076670f86c10a31af8d3f448dbb9e", "size": 4988, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "bjwie/mastrade", "max_stars_repo_head_hexsha": "0cd9a426ed5adcb7205dd11d12557ff85cf7338e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars... |
rm( "base/baseConfig2", recursive=true, force=true )
mpSim, isOkay = runFromExcel( joinpath( "base", "baseConfig2" ),
showInfo=false )
report = nodePopReport( mpSim, 12, "Junior" )
results = Int.( report[:, "Junior"] )
@test all( results .== [189, 187, 123, 124, 100, 151, 164, 138, 145, 115, 160,
157, 150, 139,... | {"hexsha": "fdc16bde7447b346b19d6375ae00ebab9b89cb57", "size": 1316, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/randomseed.jl", "max_stars_repo_name": "jvkerckh/ManpowerPlanningIO.jl", "max_stars_repo_head_hexsha": "90ca00b46616804034bfd962e2a79c14c4328e16", "max_stars_repo_licenses": ["MIT"], "max_star... |
from collections import defaultdict
from pathlib import Path
from typing import Union
import numpy as np
from deep_utils.utils.utils.logging_ import log_print
class CSVLogger:
def __init__(self, csv_path: Union[Path, str], logger=None, verbose=1):
self.csv_path = csv_path
self.logs: dict = default... | {"hexsha": "6d7e20d67044515493d5c4678d3650eb8cd9c215", "size": 813, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_utils/callbacks/torch/torch_csv_logger.py", "max_stars_repo_name": "pooya-mohammadi/deep_utils", "max_stars_repo_head_hexsha": "b589d8ab0a8d63f3d3b90c3bc0d4b1b648b8be37", "max_stars_repo_licen... |
import numpy as np
import matplotlib.pyplot as plot
from structureData import *
from quantifyDiversity import *
def testDiversity():
fname = '/home/dms167/Documents/research/I3TH/quant_output/testOut3.csv'
#fname = '/home/dms167/Documents/research/I3TH/quan/quan_021.csv'
#5=CD68,9=CD8,13=CD3,17=DAPI,21=CD20,25=NaK... | {"hexsha": "2f71697d01841d31d3b43742601f0f9554c6333f", "size": 888, "ext": "py", "lang": "Python", "max_stars_repo_path": "testDiversity.py", "max_stars_repo_name": "thrive-itcr/simple-heterogeneity-metrics", "max_stars_repo_head_hexsha": "763341b839ef901013a5ddf0a0a5aa4612c66792", "max_stars_repo_licenses": ["BSD-3-Cl... |
import sklearn.metrics as skm
import numpy as np
import matplotlib.pyplot as plt
import operator
import itertools
def _plot_confusion_matrix(cm,
classes,
normalize=False,
title='Confusion matrix',
cmap=plt.cm.B... | {"hexsha": "fe928ce7cfcb50ecc45ad7dee54caefbc4ced5af", "size": 1642, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/src/conf_matrices.py", "max_stars_repo_name": "ankilab/AirwaySymptomDetection", "max_stars_repo_head_hexsha": "be5a552178ed46cd9f365b9f5cc7beb78c02d165", "max_stars_repo_licenses": ["Apac... |
import numpy as np
import matplotlib.pylab as plt
import sys
def vperfil_holland(vmax,rmax,r):
"""
Perfil de Holland (1980)
"""
b=2
net=np.exp(1-(r/rmax)**(-b))
v=(((rmax/r)**b)*net)**(0.5)
v=vmax*v
return v
###################################################################
#Emanuel2011
##################... | {"hexsha": "3802a9d4247ad7c9bd74168defa339711b4eac40", "size": 3128, "ext": "py", "lang": "Python", "max_stars_repo_path": "alarconpy/profiles.py", "max_stars_repo_name": "apalarcon/alarconpy", "max_stars_repo_head_hexsha": "1decf4bbec562e654038367439f5ac6345ebfdd4", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\name{circos.dendrogram}
\alias{circos.dendrogram}
\title{
Add circular dendrograms
}
\description{
Add circular dendrograms
}
\usage{
circos.dendrogram(dend, facing = c("outside", "inside"), max_height = NULL, use_x_attr = FALSE)
}
\arguments{
\item{dend}{A \code{\link[stats]{dendrogram}} object.}
\item{facing}{I... | {"hexsha": "8d771c3eedda70930d60424a7f8fe7ac93aee573", "size": 1966, "ext": "rd", "lang": "R", "max_stars_repo_path": "man/circos.dendrogram.rd", "max_stars_repo_name": "Aden2018/circlize", "max_stars_repo_head_hexsha": "5702636a1b4e0ebdd225d283dee260270880c882", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
c ****************************************************************
c * *
c * subroutine lfindb *
c * *
c * writte... | {"hexsha": "e3d45fa660a407496f68d10b9506903e88300326", "size": 2961, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "old_code/EBE_solver/lnpcg_mpi/lfindb.f", "max_stars_repo_name": "pangkeji/warp3d", "max_stars_repo_head_hexsha": "8b273b337e557f734298940a63291697cd561d02", "max_stars_repo_licenses": ["NCSA"], "m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.