Datasets:
text stringlengths 0 27.1M | meta dict |
|---|---|
import tactic.basic
import tactic.omega
import .ch11_imp
open imp
/-
Open Scope imp_scope.
Fixpoint ceval_step2 (st : state) (c : com) (i : nat) : state :=
match i with
| O ⇒ empty_st
| S i' ⇒
match c with
| SKIP ⇒
st
| l ::= a1 ⇒
(l !-> aeval st a1 ; st)
| c1 ;; c2 ⇒
... | {
"alphanum_fraction": null,
"author": "michens",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_dat... |
/-
Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import data.polynomial.algebra_map
import ring_theory.localization.basic
/-! # Laurent polynomials
We introduce Laurent polynomials over a semiring `R`. Mathematic... | {
"alphanum_fraction": null,
"author": "leanprover-community",
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_... |
from collections import OrderedDict
from enum import Enum, unique
import numpy as np
from typing import Dict, Union, Iterator, Type, Tuple
from meio.gsm.dag_gsm import GuaranteedServiceModelDAG
from meio.gsm.tree_gsm import Stage, GuaranteedServiceModelTree, GuaranteedServiceModel
def create_supply_chain_network_fro... | {
"alphanum_fraction": 0.6679357022,
"author": null,
"avg_line_length": 41.1130434783,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "5bf5139bc1a0e62f24a0c6dbd55e68e2b46b69f6",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma eventually_nhds_top:
fixes P :: "'a :: {order_top,linorder_topology} \<Rightarrow> bool"
and b :: 'a
assumes "b < top"
shows "eventually P (nhds top) \<longleftrightarrow> (\<exists>b<top. (\<forall>z. b < z \<longrightarrow> P z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. eventuall... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 17,
"llama_tokens": 1977,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime":... |
import numpy as np
import pytest
from sklearn.utils._readonly_array_wrapper import ReadonlyArrayWrapper, _test_sum
from sklearn.utils._testing import create_memmap_backed_data
def _readonly_array_copy(x):
"""Return a copy of x with flag writeable set to False."""
y = x.copy()
y.flags["WRITEABLE"] = Fals... | {
"alphanum_fraction": 0.7447916667,
"author": null,
"avg_line_length": 32,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "38163cc2461ce878eb638401b74bea21507f701f",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_count": ... |
module Variables
include("./constants.jl")
using JuMP
using .Constants
export init_variables
function init_variables(m)
#Dimensions of box
@variable(m, lob_length_of_box[i=1:length(boxes)] == boxes[i][1])
@variable(m, wob_width_of_box[i=1:length(boxes)] == boxes[i][2])
@variable(m, hob_height_of... | {
"alphanum_fraction": 0.7031188314,
"author": null,
"avg_line_length": 40.8548387097,
"converted": null,
"ext": "jl",
"file": null,
"hexsha": "132ea0ed52d08ad51cb24c10b5cd5b39232a5ed8",
"include": null,
"lang": "Julia",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_fork... |
"""
json 불러와서 캡션 붙이는 것
"""
import json
import pandas as pd
path = './datasets/vqa/v2_OpenEnded_mscoco_train2014_questions.json'
with open(path) as question:
question = json.load(question)
# question['questions'][0]
# question['questions'][1]
# question['questions'][2]
df = pd.DataFrame(question['questions'])
d... | {
"alphanum_fraction": 0.5889103804,
"author": null,
"avg_line_length": 26.7413793103,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "8165627d6470d7c3af8974c3cff4f40b6476f57e",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# script to convert the newly generated Relative Humidity
def convert_to_hur( tas_arr, vap_arr ):
import numpy as np
with np.errstate( over='ignore' ):
esa_arr = 6.112 * np.exp( 17.62 * tas_arr/ (243.12 + tas_arr) )
# esa_arr = 6.112 * np.exp( 22.46 * tas_arr / (272.62 + tas_arr) )
return vap_arr/esa_arr * 100... | {
"alphanum_fraction": 0.6729470316,
"author": null,
"avg_line_length": 32.7093023256,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "80c61aacc21822c977f0758b8a90ad8a8e99498c",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
[STATEMENT]
lemma closed_Union [continuous_intros, intro]: "finite S \<Longrightarrow> \<forall>T\<in>S. closed T \<Longrightarrow> closed (\<Union>S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>finite S; \<forall>T\<in>S. closed T\<rbrakk> \<Longrightarrow> closed (\<Union> S)
[PROOF STEP]
by (induct s... | {
"alphanum_fraction": null,
"author": null,
"avg_line_length": null,
"converted": null,
"ext": null,
"file": null,
"hexsha": null,
"include": null,
"lang": null,
"length": 1,
"llama_tokens": 119,
"mathlib_filename": null,
"max_forks_count": null,
"max_forks_repo_forks_event_max_datetime": n... |
subroutine qqb_ttw_v(p,msqv)
************************************************************************
* Author: R. K. Ellis *
* March, 2012. *
* ... | {
"alphanum_fraction": 0.4778597786,
"author": null,
"avg_line_length": 29.2972972973,
"converted": null,
"ext": "f",
"file": null,
"hexsha": "c6115fb56877b523ecd6d242c190f5c189376213",
"include": null,
"lang": "FORTRAN",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
# coding: utf-8
from scipy import stats
import numpy as np
from itertools import chain
from scipy.stats import chi2_contingency
import jpegio as jio
import collections
img = jio.read('00576.jpg')
g = img.coef_arrays[0]
g = g.reshape(g.shape[0]*g.shape[1])
for ind in range(30):
g1 = g[0.03*len(g)*i:0.03*len(g)*(... | {
"alphanum_fraction": 0.5054667788,
"author": null,
"avg_line_length": 19.8166666667,
"converted": null,
"ext": "py",
"file": null,
"hexsha": "a172f44e60ace4b62441e510d614e2772206cd77",
"include": true,
"lang": "Python",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_for... |
\documentclass{article}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{mdwlist}
\usepackage[colorlinks=true]{hyperref}
\usepackage{geometry}
\geometry{margin=1in}
\geometry{headheight=2in}
\geometry{top=1in}
\usepackage{palatino}
\usepackage{listings}
\usepackage{color}
\definecolor{codegreen}... | {
"alphanum_fraction": 0.79400017,
"author": null,
"avg_line_length": 98.8823529412,
"converted": null,
"ext": "tex",
"file": null,
"hexsha": "226754f4afb46db6040c6bc2fbb6ecca1c58abe5",
"include": null,
"lang": "TeX",
"length": null,
"llama_tokens": null,
"mathlib_filename": null,
"max_forks_c... |
End of preview. Expand in Data Studio
The original EleutherAI/proof-pile-2 dataset uses a custom python script and .jsonl.zst files, which some versions of the datasets library struggle with.
This dataset contains the same data, subsets, and splits as EleutherAI/proof-pile-2, converted into standard parquet format.
Each subset and split was also shuffled so that you can directly train on the data without issue.
Conversion was performed using the following script:
import os
import zstandard as zstd
import json
import pandas as pd
from tqdm import tqdm
import datasets
import huggingface_hub as hf
DATA_URL = "EleutherAI/proof-pile-2"
SUBSETS = [
"algebraic-stack",
"arxiv",
"open-web-math"
]
SPLITS = [
"train",
"validation",
"test"
]
LOCAL_DIR = "./local_data/proof-pile-2"
OUT_URL = 'aklein4/proof-pile-2-fixed'
def download_data(
url: str,
subset: str,
split: str,
):
hf.snapshot_download(
repo_id=url,
repo_type="dataset",
allow_patterns=[f"{subset}/{split}/*"],
local_dir=LOCAL_DIR,
)
return os.path.join(LOCAL_DIR, subset, split)
def format_data(
url: str,
subset: str ,
split: str,
):
# download the data
folder = download_data(url, subset, split)
# get all files in the local dir
data_files = [
os.path.join(folder, f)
for f in os.listdir(folder)
if f.endswith(".zst")
]
# read all of the .jsonl.zst files
examples = []
for file_path in tqdm(data_files):
with zstd.open(open(file_path, "rb"), "rt", encoding="utf-8") as f:
for x in f.readlines():
examples.append(json.loads(x))
# get the dataset
df = pd.DataFrame(examples)
dataset = datasets.Dataset.from_pandas(df)
dataset = dataset.shuffle(seed=42)
dataset.push_to_hub(
OUT_URL,
config_name=subset,
split=split,
private=False
)
def main():
for subset in SUBSETS:
for split in SPLITS:
format_data(
DATA_URL,
subset,
split,
)
if __name__ == "__main__":
main()
- Downloads last month
- 1,552
