Dataset Viewer
Auto-converted to Parquet Duplicate
file_path
stringlengths
7
180
content
stringlengths
0
811k
repo
stringclasses
11 values
docgen/src/main.rs
use regex::Regex; use std::fs; use std::path::Path; fn main() { // TENSOR DOC let trait_path = "src/operators/tensor/core.cairo"; let doc_path = "docs/framework/operators/tensor"; let label = "tensor"; let trait_name = "TensorTrait"; doc_trait(trait_path, doc_path, label); doc_functions(tra...
https://github.com/gizatechxyz/orion
nodegen/__init__.py
https://github.com/gizatechxyz/orion
nodegen/file_manager.py
import os from pathlib import Path BASE_PATH = "./tests/nodes" class ModFile: def __init__(self): """ Initialize a ModFile object. This method creates a new file with a .cairo extension in the BASE_PATH directory. If the directory doesn't exist, it's created. The contents of the...
https://github.com/gizatechxyz/orion
nodegen/helpers.py
from enum import Enum import os from typing import List from .file_manager import CairoTest, CairoData, ModFile import numpy as np class FixedImpl(Enum): FP8x23 = 'FP8x23' FP16x16 = 'FP16x16' FP32x32 = 'FP32x32' def to_fp(x: np.ndarray, fp_impl: FixedImpl): match fp_impl: case FixedIm...
https://github.com/gizatechxyz/orion
nodegen/node/__init__.py
import argparse import importlib import os import sys class RunAll: @classmethod def run_all(cls): for method_name in dir(cls): if method_name.startswith('__') or method_name == 'run_all': continue method = getattr(cls, method_name) if callable(metho...
https://github.com/gizatechxyz/orion
nodegen/node/abs.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Abs(RunAll): @staticmethod def abs_i32(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) y = abs(x) x = Tensor(Dtype.I32, x.shape, x.flatten()) ...
https://github.com/gizatechxyz/orion
nodegen/node/acos.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Acos(RunAll): @staticmethod def acos_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arccos(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp(...
https://github.com/gizatechxyz/orion
nodegen/node/acosh.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Acosh(RunAll): @staticmethod def acosh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) y = np.arccosh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( ...
https://github.com/gizatechxyz/orion
nodegen/node/add.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Add(RunAll): @staticmethod def add_u32(): def default(): x = np.random.randint(0, 3, (3, 3, 3)).astype(np.uint32) y = np.random.randint(0, 3, (3, 3, 3)).ast...
https://github.com/gizatechxyz/orion
nodegen/node/and.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class And(RunAll): @staticmethod def and_bool(): def default(): x = (np.random.randn(3, 4) > 0).astype(bool) y = (np.random.randn(3, 4) > 0).astype(bool) ...
https://github.com/gizatechxyz/orion
nodegen/node/argmax.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl def argmax_use_numpy(data: np.ndarray, axis: int = 0, keepdims: int = 1) -> np.ndarray: result = np.argmax(data, axis=axis) if keepdims == 1: result = np.expand_dims(result, axis) re...
https://github.com/gizatechxyz/orion
nodegen/node/argmin.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl def argmin_use_numpy(data: np.ndarray, axis: int = 0, keepdims: int = 1, dtype=np.int64) -> np.ndarray: result = np.argmin(data, axis=axis) if keepdims == 1: result = np.expand_dims(resu...
https://github.com/gizatechxyz/orion
nodegen/node/array_feature_extractor.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Array_feature_extractor(RunAll): @staticmethod def array_feature_extractor_3D(): def array_feature_extractor_i32(): x = np.random.randint(-3, 3, (2, 3, 4)).astype(np.i...
https://github.com/gizatechxyz/orion
nodegen/node/asin.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Asin(RunAll): @staticmethod def asin_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arcsin(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp(...
https://github.com/gizatechxyz/orion
nodegen/node/asinh.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Asinh(RunAll): @staticmethod def asinh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) y = np.arcsinh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp(...
https://github.com/gizatechxyz/orion
nodegen/node/atan.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Atan(RunAll): @staticmethod def atan_fp8x23(): x = np.random.uniform(-10, 127, (2, 2)).astype(np.float64) y = np.arctan(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp(...
https://github.com/gizatechxyz/orion
nodegen/node/binarizer.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl class Binarizer(RunAll): @staticmethod def binarizer_fp8x23(): x = np.random.uniform(-3, 3, (3, 3, 3)).astype(np.float64) threshold = np.float64(1) y = (x > t...
https://github.com/gizatechxyz/orion
nodegen/node/blackman_window.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl, Trait, get_data_statement def blackman_window(size, output_datatype=None, periodic=None) -> np.ndarray: # type: ignore if periodic == 1: N_1 = size else: N_1 = size - 1 ni =...
https://github.com/gizatechxyz/orion
nodegen/node/ceil.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Ceil(RunAll): @staticmethod def ceil_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.ceil(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp(x....
https://github.com/gizatechxyz/orion
nodegen/node/clip.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl class Clip(RunAll): @staticmethod def clip_u32(): def clip_2D(): x = np.random.randint(0, 255, (2, 4)).astype(np.uint32) y = np.clip(x, np.uint32(10), np.uint32(2...
https://github.com/gizatechxyz/orion
nodegen/node/col2im.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl, Trait def col2im(data, image_shape, block_shape, dilations=None, pads=None, strides=None): # type: ignore if dilations is None: dilations = [1 for s in image_shape] if pads is None: ...
https://github.com/gizatechxyz/orion
nodegen/node/compress.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl, Trait class Compress(RunAll): @staticmethod def compress_fp16x16(): def compress_3D(): def default(): x1 = np.arange(0,27).reshape(3,3,3).astype...
https://github.com/gizatechxyz/orion
nodegen/node/concat.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl, Trait # 687 class Concat(RunAll): @staticmethod def concat_u32(): def concat_1D(): x1 = np.arange(0,3).astype(np.uint32) x2 = np.arange(3,6).astype(np.uint32) ...
https://github.com/gizatechxyz/orion
nodegen/node/concat_from_sequence.py
import numpy as np from nodegen.node import RunAll from ..helpers import make_test, to_fp, Tensor, Dtype, FixedImpl, Trait class Concat_from_sequence(RunAll): @staticmethod def concat_from_sequence_u32(): def new_axis_zero(): sequence = [] values_array = [] shape =...
https://github.com/gizatechxyz/orion
End of preview. Expand in Data Studio

This dataset contains the code from all the ZKML repos that I'm aware of that have an MIT, Apache or GPL 3.0 license. It only contains the files with extensions: ".py", ".js", ".java", ".c", ".cpp", ".h", ".hpp", ".rs", "cairo", ".zkey", ".sol", ".circom", ".ejs", ".ipynb" List of repos: "https://github.com/gizatechxyz/orion", "https://github.com/gizatechxyz/Giza-Hub", "https://github.com/zkonduit/ezkl", "https://github.com/socathie/keras2circom", "https://github.com/socathie/circomlib-ml" "https://github.com/worldcoin/proto-neural-zkp", "https://github.com/Modulus-Labs/RockyBot" "https://github.com/ora-io/keras2circom", "https://github.com/zk-ml/tachikoma", "https://github.com/only4sim/ZK-DTP", "https://github.com/ddkang/zkml", "https://github.com/socathie/ZKaggleV2"

Downloads last month
4