code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
from __future__ import annotations from typing import List from dataclasses import dataclass from util import F # pub enum Expr<F> { # Const(F), # Sum(Vec<Expr<F>>), # Mul(Vec<Expr<F>>), # Neg(Box<Expr<F>>), # Pow(Box<Expr<F>>, u32), # Query(Queriable<F>), # Halo2Expr(Expression<F>), # } ...
/rust_chiquito-0.1.0.tar.gz/rust_chiquito-0.1.0/pychiquito/expr.py
0.832305
0.329216
expr.py
pypi
# Part 3: Fibonacci Example # Chapter 3: Witness Now, we will generate multiple witnesses to test the soundness of our circuit constraints. Note that we only intend to accept the following set of values for signals "a", "b", and "c". "Soundness" in this context refers to faulty witness successfully verified against the...
/rust_chiquito-0.1.0.tar.gz/rust_chiquito-0.1.0/pychiquito/tutorial_pt3_ch3.ipynb
0.735452
0.965674
tutorial_pt3_ch3.ipynb
pypi
# Part 1: Introduction to Chiquito and PyChiquito Chiquito is a high-level structured language for implementing zero knowledge proof applications, currently being implemented in the DSL Working Group of PSE, Ethereum Foundation. It is a step-based zkDSL (zero knowledge domain specific language) that provides better sy...
/rust_chiquito-0.1.0.tar.gz/rust_chiquito-0.1.0/pychiquito/tutorial_pt1.ipynb
0.804636
0.972545
tutorial_pt1.ipynb
pypi
from __future__ import annotations from typing import Tuple from dsl import Circuit, StepType from cb import eq from query import Queriable from util import F class Fibonacci(Circuit): def setup(self: Fibonacci): self.a: Queriable = self.forward("a") self.b: Queriable = self.forward("b") ...
/rust_chiquito-0.1.0.tar.gz/rust_chiquito-0.1.0/pychiquito/fibonacci.py
0.723114
0.236373
fibonacci.py
pypi
# Part 3: Fibonacci Example # Chapter 2: StepType and Circuit In this Chapter, we code out the concepts learned in Chapter 1 in PyChiquito, but before that, let's import the dependencies first. ## Imports These imports are for the typing hints included in this example. They are not required, because Python is a dynamic...
/rust_chiquito-0.1.0.tar.gz/rust_chiquito-0.1.0/pychiquito/tutorial_pt3_ch2.ipynb
0.488527
0.991977
tutorial_pt3_ch2.ipynb
pypi
from __future__ import annotations from copy import copy from typing import Iterable, Optional, Set, Tuple, Union import attrs from attrs import define, frozen import rust_circuit as rc from rust_circuit.py_utils import assert_never @frozen class ScopeGlobalTraversal: traversal: rc.IterativeMatcher @frozen c...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/scope_manager.py
0.816955
0.451508
scope_manager.py
pypi
from time import perf_counter from typing import Generic, Iterable, List, Mapping, NoReturn, Optional, Tuple, TypeVar, Union import torch from ._rust import TorchAxisIndex def assert_never(x: NoReturn) -> NoReturn: raise AssertionError(f"Invalid value: {x!r}") def check_cast(cls, c, exception=TypeError): ...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/py_utils.py
0.834306
0.272153
py_utils.py
pypi
from typing import Dict, Literal, Optional import einops import jax.numpy as jnp import numpy as np import torch from interp.model.blocks import BatchNormFixed, LayerNorm from interp.model.gpt_model import Gpt from interp.model.gpt_modules import Attention, GptBlock, PosEncType, id_norm from rust_circuit import modul...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/jax_to_module.py
0.710226
0.376451
jax_to_module.py
pypi
from __future__ import annotations import itertools from typing import Callable, Iterable, List, Optional, Sequence, Tuple, TypeVar, cast from rust_circuit import optional as op from ._rust import ( Add, Circuit, Cumulant, Einsum, Module, ModuleArgSpec, ModuleSpec, Scalar, Symbol,...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/cum_algo.py
0.916232
0.429549
cum_algo.py
pypi
import functools import hashlib import weakref from typing import * if TYPE_CHECKING: from interp.circuit.circuit import Circuit, Shape import torch import rust_circuit.optional as op from rust_circuit.py_utils import assert_never from . import _rust as rc from ._rust import Add as rAdd from ._rust import Array...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/interop_rust.py
0.793866
0.238317
interop_rust.py
pypi
import jax import matplotlib.pyplot as plt import numpy as np import torch import interp.tools.optional as op from interp.model.gpt_model import Gpt from interp.model.model_loading import load_model_mem_cached from interp.tools.log import Idxs, KeyIdxs, LoggerCache, LogInfo, construct_mut_log_cache from .setup import...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/demos/paren_balancer/writeup_attribution_plots.py
0.768125
0.459682
writeup_attribution_plots.py
pypi
# %% [markdown] """ # Day 4b: Paren Balancer Causal Scrubbing To start, please read this [less wrong post](https://www.lesswrong.com/s/h95ayYYwMebGEYN5y/p/kjudfaQazMmC74SbF). We will replicate the experiments today. <!-- toc --> """ import uuid from typing import Optional, Tuple import numpy as np import torch fro...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/demos/paren_balancer/causal_scrubbing_experiments.py
0.401688
0.570989
causal_scrubbing_experiments.py
pypi
import os from typing import Callable, Optional, Tuple import jax import numpy as np import seaborn as sns import torch import torch as t from adversarial.simple_task.dataset_utils import load_dataset from adversarial.simple_task.model_architectures.simple_transformer import SimpleTokenizer from interp.circuit import...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/demos/rust_circuit_demos/handcrafted_model_cumulants.py
0.853043
0.364523
handcrafted_model_cumulants.py
pypi
# %% from __future__ import annotations import pytest from rust_circuit import Index, Matcher, Parser, PrintOptions, default_index_traversal, push_down_index, restrict from rust_circuit.py_utils import I # %% # }}} # setup {{{ # %% [markdown] # ## Setup # %% circuit = Parser(tensors_as_random=True, on_repeat_...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/demos/rust_circuit_demos/push_down_index.py
0.619701
0.233526
push_down_index.py
pypi
from rust_circuit.causal_scrubbing.hypothesis import ( PNP, ExactSampler, FuncSampler, InterpNode, MaybePoolAnnotation, PoolAnnotation, UncondSampler, UncondTogetherSampler, ) from rust_circuit.causal_scrubbing.testing_utils import IntDataset class FirstSampler(FuncSampler): func =...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/demos/causal_scrubbing/pool.py
0.674265
0.6437
pool.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Optional, Tuple, Literal, Callable from abc import ABC, abstractmethod from dataclasses import dataclass class Expr(ABC): @abstractmethod def render(self, out: list[str]): ... def __str...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/index_util/internal/parse.py
0.857768
0.264994
parse.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Optional, Union, TypeVar, Sequence, Literal from dataclasses import dataclass import rust_circuit.index_util.internal.parse as parse @dataclass(frozen=True, eq=True) class OutAxisIdx: axis: int @data...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/index_util/internal/resolve.py
0.872605
0.50061
resolve.py
pypi
from __future__ import annotations import functools import uuid from collections import Counter from typing import Callable, Dict, Hashable, List, Optional, Protocol, Set, Tuple, Union from warnings import warn import attrs import torch from rust_circuit import ( Circuit, GeneralFunction, GeneralFunction...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/causal_scrubbing/hypothesis.py
0.93744
0.400691
hypothesis.py
pypi
from __future__ import annotations from typing import Dict, Iterable, Mapping, Optional, Set, Type, TypeVar, Union import attrs import torch from attr import frozen import rust_circuit as rc from ..py_utils import FrozenDict def all_same_len(self: Dataset, attribute, arrs: Mapping[str, rc.Array]): assert len(...
/rust_circuit-0.4.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rust_circuit/causal_scrubbing/dataset.py
0.877948
0.557243
dataset.py
pypi
section_types = ( 'custom', #0 'type', #1 'import', #2 'function', #3 'table', #4 'memory', #5 'global', #6 'export', #7 'start', #8 'element', #9 'code', #10 'data' #11 ) custom_section = 0 type_section = 1 import_section ...
/rust_contracts_builder-0.2.9-py3-none-any.whl/rust_contracts_builder/wasm_checker.py
0.431345
0.150871
wasm_checker.py
pypi
import featuretools as ft import json from featuretools.primitives.utils import ( get_aggregation_primitives, get_transform_primitives, ) from .rust_dfs import Primitive, Feature import numpy as np from datetime import datetime as dt tag_map = { "numeric": "Numeric", "category": "Categorical", "ca...
/rust_dfs-0.3.0.tar.gz/rust_dfs-0.3.0/rust_dfs/utils.py
0.408159
0.379896
utils.py
pypi
import random from .utils import semantic_tag_mapping, logical_type_mapping from woodwork.logical_types import Ordinal import pandas as pd import polars as pl from datetime import datetime as dt def flatten(xss): return [x for xs in xss for x in xs] def randomize(v): random.seed(10) h = v.copy() ran...
/rust_dfs-0.3.0.tar.gz/rust_dfs-0.3.0/rust_dfs/generate_fake_dataframe.py
0.406273
0.422445
generate_fake_dataframe.py
pypi
# How to compile DLL in Rust and import it in Python. Useful hints. Here I am providing a number of examples to compile [DLL](https://en.wikipedia.org/wiki/Dynamic-link_library) in Rust. In order to check the final DLL I am using Python, although DLL standard is compatible with almost all the widely known programming ...
/rust-dll-example-0.1.1.tar.gz/rust-dll-example-0.1.1/README.md
0.751192
0.988177
README.md
pypi
from tempfile import TemporaryDirectory from typing import Optional, Tuple, Any from .rust_pyspec_glue import lib, ffi class DB: def __init__(self, path: Optional[str]) -> None: if path is None: self.db = lib.open_in_memory() else: self.db = lib.open(ffi.from_buffer(path.en...
/rust_pyspec_glue-0.0.5.tar.gz/rust_pyspec_glue-0.0.5/python/rust_pyspec_glue/__init__.py
0.812942
0.198919
__init__.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId from esu.firewall_template_rule import FirewallTemplateRule class FirewallTemplate(BaseAPI): """ Args: id (str): Идентификатор шаблона брандмауэра name (str): Имя шаблона брандмауэра vdc (object): Объект класса :cla...
/rustack_esu-0.1.16-py3-none-any.whl/esu/firewall_template.py
0.520984
0.223928
firewall_template.py
pypi
from esu.backup import Backup from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId from esu.disk import Disk from esu.firewall_template import FirewallTemplate from esu.image import Image from esu.kubernetes_template import KubernetesTemplate from esu.port import Port from esu.storage_profile import S...
/rustack_esu-0.1.16-py3-none-any.whl/esu/vdc.py
0.560012
0.220489
vdc.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class Disk(BaseAPI): """ Args: id (str): Идентификатор диска name (str): Имя диска size (int): Размер диска (ГБ) scsi (str): Порт, к которому подключен диск vm (object): Объект виртуального сервера :...
/rustack_esu-0.1.16-py3-none-any.whl/esu/disk.py
0.550849
0.21686
disk.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class RouterRoute(BaseAPI): """ Args: id (str): Идентификатор маршрута router (object): Объект класса :class:`esu.Router`. Роутер, к которому относится данное правило destination (str): CIDR...
/rustack_esu-0.1.16-py3-none-any.whl/esu/router_route.py
0.53048
0.355327
router_route.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class Snapshot(BaseAPI): """ Args: id (str): Идентификатор снапшота name (str): Имя снапшота description (str): описание для снапшота vm (object): Объект класса :class:`esu.Vm`. Сервер, к которому ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/snapshot.py
0.53437
0.329311
snapshot.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class PortForwarding(BaseAPI): """ Args: id (str): Идентификатор перенаправления портов floating (object): Объект класса :class:`esu.Port`. Порт на котором будет создано перенаправление to...
/rustack_esu-0.1.16-py3-none-any.whl/esu/port_forwarding.py
0.582372
0.349227
port_forwarding.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId from esu.dns_record import DnsRecord class Dns(BaseAPI): """ Args: id (str): Идентификатор Dns name (str): Имя Dns project (object): Объект класса :class:`esu.Project`. Проект, к которому о...
/rustack_esu-0.1.16-py3-none-any.whl/esu/dns.py
0.543106
0.248888
dns.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class PortForwardingRule(BaseAPI): """ Args: id (str): Идентификатор правила перенаправления портов port (object): Объект класса :class:`esu.Port`. Порт сервера до которого осуществляется перенаправле...
/rustack_esu-0.1.16-py3-none-any.whl/esu/port_forwarding_rule.py
0.545044
0.370624
port_forwarding_rule.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class Kubernetes(BaseAPI): """ Args: id (str): Идентификатор name (str): Имя node_cpu (int): CPU нод node_ram (int): RAM нод node_disk_size (int): Размер диска нод node_storage_profile (objec...
/rustack_esu-0.1.16-py3-none-any.whl/esu/kubernetes.py
0.644225
0.229622
kubernetes.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class RouterPortForwarding(BaseAPI): """ Args: id (str): Идентификатор правила перенаправления портов router (object): Объект класса :class:`esu.Router`. Роутер, к которому относится данное правило ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/router_port_forwarding.py
0.520253
0.443359
router_port_forwarding.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId from esu.lbaas_pool import LbaasPool class Lbaas(BaseAPI): """ Args: id (str): Идентификатор Lbaas name (str): Имя Lbaas vdc (object): Объект класса :class:`esu.Vdc`. ВЦОД, к которому относится...
/rustack_esu-0.1.16-py3-none-any.whl/esu/lbaas.py
0.498779
0.296056
lbaas.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId class Vm(BaseAPI): """ Args: id (str): Идентификатор name (str): Имя description (str): Описание. Любой произвольный пользовательский текст cpu (int): Количество ядер ram (int): Коли...
/rustack_esu-0.1.16-py3-none-any.whl/esu/vm.py
0.528777
0.380644
vm.py
pypi
from esu.base import BaseAPI, Field, FieldList class DomainAlias(BaseAPI): """ Args: id (str): Идентификатор alias (str): Наименование домена .. warning:: Объект доступен только для чтения и не может быть создан, изменен или удален. """ class Meta: id = Fi...
/rustack_esu-0.1.16-py3-none-any.whl/esu/user.py
0.587825
0.327426
user.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class DnsRecord(BaseAPI): """ Args: id (str): Идентификатор Dns записи dns_id (str): Объект класса :class:`esu.Dns`. Днс зона, к которому относится днс запись data (str): дата Dns записи ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/dns_record.py
0.5083
0.236527
dns_record.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId class LbaasPoolMember(BaseAPI): """ Args: port (str): Порт участника пула балансировщика vm (object): Объект :class:`esu.Vm` weight (str): Вес участника пула балансировщика """ class Meta: ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/lbaas_pool.py
0.520496
0.299124
lbaas_pool.py
pypi
from esu.base import BaseAPI class Manager(BaseAPI): """ Args: token (str): Токен для доступа к API. Если не передан, будет использована переменная окружения **ESU_API_TOKEN** """ class Meta: pass def get_all_clients(self): """ Возвращает списо...
/rustack_esu-0.1.16-py3-none-any.whl/esu/manager.py
0.54819
0.433622
manager.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId from esu.dns import Dns from esu.kubernetes import Kubernetes from esu.s3 import S3 from esu.vdc import Vdc class Project(BaseAPI): """ Args: id (str): Идентификатор name (str): Имя client (object): Объект класса :c...
/rustack_esu-0.1.16-py3-none-any.whl/esu/project.py
0.60288
0.254081
project.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId, resolve class Network(BaseAPI): """ Args: id (str): Идентификатор сети name (str): Имя сети vdc (object): Объект класса :class:`esu.Vdc`. ВЦОД, к которому относится сеть ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/network.py
0.614625
0.266047
network.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId from esu.vm import Vm class File(BaseAPI): """ Args: id (str): Идентификатор name (str): Имя size (str): Размер файла type (str): Тип файла """ class Meta: id = Field() ...
/rustack_esu-0.1.16-py3-none-any.whl/esu/image.py
0.557845
0.216487
image.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId, resolve class Router(BaseAPI): """ Args: id (str): Идентификатор name (str): Имя vdc (object): ВЦОД, к которому относится маршрутизатор :class:`esu.Vdc` is_default (bool): True для маршрути...
/rustack_esu-0.1.16-py3-none-any.whl/esu/router.py
0.581897
0.294386
router.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class FirewallTemplateRule(BaseAPI): """ Args: id (str): Идентификатор правила брандмауэра name (str): Имя правила брандмауэра firewall (str): Объект класса :class:`esu.FirewallTemplate`. Шаблон бран...
/rustack_esu-0.1.16-py3-none-any.whl/esu/firewall_template_rule.py
0.554953
0.224714
firewall_template_rule.py
pypi
from esu.base import BaseAPI, Field, ObjectAlreadyHasId, ObjectHasNoId class RouterFirewallRule(BaseAPI): """ Args: id (str): Идентификатор правила брандмауэра name (str): Имя правила брандмауэра router (object): Объект класса :class:`esu.Router`. Роутер, к кот...
/rustack_esu-0.1.16-py3-none-any.whl/esu/router_firewall_rule.py
0.499023
0.341281
router_firewall_rule.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId class RestorePoint(BaseAPI): """ Args: id (str): Идентификатор точки восстановления backup_type (str): Тип точки восстановления backup_size (int): Размер точки восстановления (bytes) vm (object):...
/rustack_esu-0.1.16-py3-none-any.whl/esu/backup.py
0.570571
0.345436
backup.py
pypi
from esu.base import BaseAPI, Field, FieldList, ObjectAlreadyHasId, \ ObjectHasNoId, PortAlreadyConnected class ConnectedObject(BaseAPI): """ Args: id (str): Идентификатор подключённого объекта type (object): Тип объекта name (object): Имя подключённого объекта vdc (str): О...
/rustack_esu-0.1.16-py3-none-any.whl/esu/port.py
0.569374
0.267169
port.py
pypi
from __future__ import annotations from ctypes import ( c_size_t, byref, c_float, c_void_p, ) from rustfst.weight import weight_one from rustfst.ffi_utils import ( lib, check_ffi_error, ) from typing import Optional class Tr: """ Structure representing a transition from a state to ano...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/tr.py
0.813831
0.327211
tr.py
pypi
from __future__ import annotations from typing import Union, Tuple, List from rustfst.ffi_utils import lib, check_ffi_error import ctypes from pathlib import Path class SymbolTable: """ `SymbolTable` class. This class wraps the `SymbolTable` struct. """ def __init__(self, ptr=None): """ ...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/symbol_table.py
0.914061
0.279238
symbol_table.py
pypi
from __future__ import annotations import ctypes from typing import Optional from rustfst.ffi_utils import lib, check_ffi_error from rustfst.tr import Tr from typing import TYPE_CHECKING if TYPE_CHECKING: from rustfst import Fst class TrsIterator: """ TrsIterator(fst, state) This class is used for ...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/iterators.py
0.87458
0.164282
iterators.py
pypi
from __future__ import annotations from typing import List import ctypes from rustfst.ffi_utils import ( lib, check_ffi_error, ) from rustfst.fst.vector_fst import VectorFst class LabelFstPair(ctypes.Structure): _fields_ = [ ("label", ctypes.c_size_t), ("fst", ctypes.POINTER(ctypes.c_void...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/algorithms/replace.py
0.89546
0.494202
replace.py
pypi
import ctypes from rustfst.fst.vector_fst import Fst, VectorFst from rustfst.ffi_utils import ( lib, check_ffi_error, ) def randgen( ifst: Fst, npath: int = 1, seed: int = 0, select: str = "uniform", max_length: int = 2147483647, weight: bool = False, remove_total_weight: bool = F...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/algorithms/randgen.py
0.849003
0.377627
randgen.py
pypi
from __future__ import annotations import ctypes from typing import Optional from rustfst.ffi_utils import ( lib, check_ffi_error, ) from rustfst.fst.vector_fst import VectorFst from enum import Enum KDELTA = 1.0 / 1024.0 class DeterminizeType(Enum): """ Enumeration defining the type of the determi...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/algorithms/determinize.py
0.902479
0.317387
determinize.py
pypi
from __future__ import annotations import ctypes from typing import Optional, List from rustfst.ffi_utils import ( lib, check_ffi_error, ) from rustfst.fst.vector_fst import VectorFst from enum import Enum class MatcherRewriteMode(Enum): AUTO = 0 ALWAYS = 1 NEVER = 2 class CIntArray(ctypes.S...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/algorithms/compose.py
0.878406
0.231375
compose.py
pypi
from __future__ import annotations from typing import Optional from rustfst.weight import weight_one from rustfst.fst.vector_fst import VectorFst from rustfst.symbol_table import SymbolTable import ctypes from rustfst.ffi_utils import ( lib, check_ffi_error, ) def acceptor( astring: str, symbol_table: ...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/algorithms/__init__.py
0.942507
0.479686
__init__.py
pypi
from __future__ import annotations import ctypes from rustfst.string_paths_iterator import StringPathsIterator from rustfst.ffi_utils import ( lib, check_ffi_error, ) from rustfst.fst import Fst from rustfst.symbol_table import SymbolTable from rustfst.drawing_config import DrawingConfig from rustfst.iterator...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/fst/vector_fst.py
0.888227
0.273708
vector_fst.py
pypi
from __future__ import annotations import ctypes from rustfst.ffi_utils import ( lib, check_ffi_error, ) from rustfst.symbol_table import SymbolTable from rustfst.iterators import TrsIterator from typing import Optional class Fst: """ This class is the base class for every Fst objects. """ d...
/rustfst_python-0.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl/rustfst/fst/__init__.py
0.908229
0.325976
__init__.py
pypi
from __future__ import annotations import typing as _t import typing_extensions as _te from ._core.bool_ import (bool_ as _bool, try_construct_bool_ as _try_construct_bool) if _t.TYPE_CHECKING: from .result import (Err, Ok) _E = _t.TypeVar('_E') _T = _t.TypeVa...
/_rustpy/option.py
0.774413
0.225353
option.py
pypi
from __future__ import annotations import typing as _t import typing_extensions as _te from ._core.bool_ import (bool_ as _bool, try_construct_bool_ as _try_construct_bool) from .option import (None_ as _None, Some as _Some) _E = _t.TypeVar('_E') _E2 = _t.TypeVar('_E2'...
/_rustpy/result.py
0.738669
0.218138
result.py
pypi
from __future__ import annotations import typing as _t import typing_extensions as _te from .bool_ import bool_ as _bool from .wrapper import Wrapper as _Wrapper class Ordered(_te.Protocol): @_t.overload def __ge__(self, other: _te.Self) -> bool: ... @_t.overload def __ge__(self, other: _t...
/_rustpy/_core/ordered.py
0.751876
0.257362
ordered.py
pypi
from __future__ import annotations import typing as _t import typing_extensions as _te @_te.final class bool_: def as_(self, cls: _t.Type[_CastableFromBool]) -> _CastableFromBool: from .integer import (BaseSignedInteger, BaseUnsignedInteger) if issubclass(cls, type...
/_rustpy/_core/bool_.py
0.812942
0.229794
bool_.py
pypi
![](./Images/logo.png) <p align="center"> <a href="#license" alt="license"> <img alt="License" src="https://img.shields.io/github/license/avhz/RustQuant"> <a href="#build" alt="build"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/avhz/RustQuant/r...
/RustQuant-0.0.17.tar.gz/RustQuant-0.0.17/README.md
0.663124
0.829043
README.md
pypi
``` import pandas as pd from sklearn.metrics import r2_score, accuracy_score from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier import rustrees.decision_tree as rt_dt import rustrees.random_forest as rt_rf import time import ...
/rustrees-0.1.0.tar.gz/rustrees-0.1.0/python/notebooks/sklearn_vs_rustrees.ipynb
0.642881
0.469338
sklearn_vs_rustrees.ipynb
pypi
# rustworkx [![License](https://img.shields.io/github/license/Qiskit/rustworkx.svg?style=popout-square)](https://opensource.org/licenses/Apache-2.0) ![Build Status](https://github.com/Qiskit/rustworkx/actions/workflows/main.yml/badge.svg?branch=main) [![Build Status](https://img.shields.io/travis/com/Qiskit/rustworkx/...
/rustworkx-0.12.0.tar.gz/rustworkx-0.12.0/README.md
0.5794
0.918077
README.md
pypi
# Fix spaces to be logical units of code ONLY # Document CLI/Main # Optparse autogenerates help menu import numpy as np import glob import sys import os import tempfile as tmp from pathlib import Path import io import argparse from time import sleep import subprocess as sp import rusty_axe.tree_reader as tr bin_p...
/rusty_axe_bbrener1-0.68-py3-none-any.whl/rusty_axe/lumberjack.py
0.432543
0.193986
lumberjack.py
pypi
import numpy as np # TEST THIS class SampleCluster: """ Class description here """ def __init__(self, forest, samples, id): self.id = id self.samples = samples self.forest = forest def name(self): if hasattr(self, 'stored_name'): return self.stored_na...
/rusty_axe_bbrener1-0.68-py3-none-any.whl/rusty_axe/sample_cluster.py
0.828523
0.447158
sample_cluster.py
pypi
from rusty_axe.node import Node import matplotlib.pyplot as plt import matplotlib as mpl from copy import copy, deepcopy mpl.rcParams['figure.dpi'] = 100 class Tree: def __init__(self, tree_json, forest): self.root = Node(tree_json, self, forest, cache=forest.cache) self.forest = forest de...
/rusty_axe_bbrener1-0.68-py3-none-any.whl/rusty_axe/tree.py
0.649245
0.45641
tree.py
pypi
from abc import abstractmethod from dataclasses import dataclass from typing import cast, TypeVar, Union, Callable, Generic, Iterator, Tuple, Dict, Any from rusty_results.exceptions import UnwrapException try: from pydantic.fields import ModelField except ImportError: # pragma: no cover ... # base inner type ...
/rusty_results-1.1.1-py3-none-any.whl/rusty_results/prelude.py
0.941674
0.440108
prelude.py
pypi
from mpi4py import MPI import numpy as np from rusty_tree import lib, ffi from rusty_tree.types.iterator import Iterator class DistributedTree: """ Wrapper for a DistributedTree structure in Rust. Used to create octrees distributed via MPI from a set of N distributed Cartesian points with shape (N,3)...
/rusty_tree-1.0.0-py3-none-manylinux_2_28_x86_64.whl/rusty_tree/distributed.py
0.937326
0.364721
distributed.py
pypi
import numpy as np from rusty_tree import lib, ffi from rusty_tree.types.morton import MortonKey from rusty_tree.types.point import Point class IteratorProtocol: """ Wrapper defining an Iterator protocol implemented via Rust functions exposed via the CFFI. """ def __init__(self, p_type, c_name, ...
/rusty_tree-1.0.0-py3-none-manylinux_2_28_x86_64.whl/rusty_tree/types/iterator.py
0.872062
0.261935
iterator.py
pypi
import numpy as np from rusty_tree import lib, ffi class Domain: def __init__(self, p_domain): """ Initialize a domain from a pointer to a Domain struct in Rust. This constructor should not be used outside the class. Instead use the provided class methods to construct a Domain ob...
/rusty_tree-1.0.0-py3-none-manylinux_2_28_x86_64.whl/rusty_tree/types/domain.py
0.908858
0.420064
domain.py
pypi
import numpy as np from rusty_tree import lib, ffi class MortonKey: def __init__(self, p_key): """ Initialize a MortonKey from a pointer to a MortonKey struct in Rust. This constructor should not be used outside the class. Instead use the provided class methods to construct a Mor...
/rusty_tree-1.0.0-py3-none-manylinux_2_28_x86_64.whl/rusty_tree/types/morton.py
0.89765
0.360433
morton.py
pypi
import re def is_valid_rut(rut: str) -> bool: """Determines if a given rut is valid Arguments: rut {str} -- Complete rut, including verification digit. It might contain dots and a dash. Returns: bool -- True if rut is valid. False otherwise. Raises: ValueError: when ...
/rut_chile-2.0.1-py3-none-any.whl/rut_chile/rut_chile.py
0.826467
0.655081
rut_chile.py
pypi
import json import re from pathlib import Path from typing import Any, Dict, List, Text import yaml from pydantic import BaseModel from ruth.nlu.model import ElementBuilder, Interpreter def get_config(pipeline_path: Path) -> Dict[Text, Any]: with open(pipeline_path, "r") as f: return yaml.safe_load(f) ...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/cli/utills.py
0.609757
0.152158
utills.py
pypi
import os from pathlib import Path from typing import Text from urllib import request import click import matplotlib.pyplot as plt import uvicorn as uvicorn from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from progressbar import progressbar from rich import print as rprint from rich.console i...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/cli/cli.py
0.413951
0.202423
cli.py
pypi
from typing import Any, Dict, Text, Union import numpy as np from numpy import ndarray from ruth.constants import TEXT from scipy import sparse class Feature: def __init__(self, feature: Union[sparse.spmatrix, ndarray], origin: Text): self.feature = feature self.origin = origin def is_sparse...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/shared/nlu/training_data/feature.py
0.888825
0.437523
feature.py
pypi
from pathlib import Path from typing import Any, Dict, List, Optional, Text from ruth.constants import TEXT from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.tokenizer.constants import MAX_LENGTH_FOR_PADDING from ruth.nlu.tokenizer.tokenizer import Tokenizer from ruth.shared.constants import ATTENTIO...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/tokenizer/hf_tokenizer.py
0.915472
0.298696
hf_tokenizer.py
pypi
import logging from collections import Counter from pathlib import Path from typing import Any, Dict, List, Text, Tuple import torch from numpy import argsort, fliplr, ndarray from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ru...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/classifiers/hf_classifier.py
0.84489
0.280007
hf_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Text, Tuple, Union import sklearn from numpy import argsort, fliplr, ndarray, reshape from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classif...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/classifiers/svm_classifier.py
0.794943
0.324811
svm_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, Text, Tuple import sklearn from numpy import argsort, fliplr, ndarray, reshape from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classifiers.ruth_classifier import IntentClassifier f...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/classifiers/naive_bayes_classifier.py
0.846006
0.327951
naive_bayes_classifier.py
pypi
import io import os from typing import Any, Dict, List, Optional, Text from urllib import request import numpy from progressbar import progressbar from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.constants import ELEMENT_UNIQUE_NAME from ruth.nlu.featurizers.dense_featurizers.dense_featurizer import...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/featurizers/dense_featurizers/fast_text.py
0.765418
0.298594
fast_text.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Optional, Text from rich.console import Console from ruth.constants import TEXT from ruth.nlu.featurizers.sparse_featurizers.constants import ( CLASS_FEATURIZER_UNIQUE_NAME, ) from ruth.nlu.featurizers.sparse_featurizers.sparse_featurizer ...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/featurizers/sparse_featurizers/count_vector_featurizer.py
0.845592
0.296807
count_vector_featurizer.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Optional, Text from rich.console import Console from ruth.constants import TEXT from ruth.nlu.featurizers.sparse_featurizers.constants import ( CLASS_FEATURIZER_UNIQUE_NAME, ) from ruth.nlu.featurizers.sparse_featurizers.sparse_featurizer ...
/ruth_nlu-0.0.6-py3-none-any.whl/ruth/nlu/featurizers/sparse_featurizers/tfidf_vector_featurizer.py
0.832645
0.279872
tfidf_vector_featurizer.py
pypi
from typing import Any, Dict, Text, Union import numpy as np from numpy import ndarray from ruth.constants import TEXT from scipy import sparse class Feature: def __init__(self, feature: Union[sparse.spmatrix, ndarray], origin: Text): self.feature = feature self.origin = origin def is_sparse...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/shared/nlu/training_data/feature.py
0.888825
0.437523
feature.py
pypi
from pathlib import Path from typing import Any, Dict, List, Optional, Text from ruth.constants import TEXT from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.tokenizer.constants import MAX_LENGTH_FOR_PADDING from ruth.nlu.tokenizer.tokenizer import Tokenizer from ruth.shared.constants import ATTENTIO...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/tokenizer/hf_tokenizer.py
0.915472
0.298696
hf_tokenizer.py
pypi
import logging from collections import Counter from pathlib import Path from typing import Any, Dict, List, Text, Tuple import torch from numpy import argsort, fliplr from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.cl...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/classifiers/hf_classifier.py
0.835484
0.272294
hf_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Text, Tuple, Union import sklearn from numpy import argsort, fliplr, ndarray, reshape from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classif...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/classifiers/svm_classifier.py
0.781539
0.325856
svm_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, Text, Tuple import sklearn from numpy import argsort, fliplr, ndarray, reshape from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classifiers.ruth_classifier import IntentClassifier f...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/classifiers/naive_bayes_classifier.py
0.846006
0.327951
naive_bayes_classifier.py
pypi
import io import os from typing import Any, Dict, List, Optional, Text from urllib import request import numpy from progressbar import progressbar from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.constants import ELEMENT_UNIQUE_NAME from ruth.nlu.featurizers.dense_featurizers.dense_featurizer import...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/featurizers/dense_featurizers/fast_text.py
0.68742
0.278315
fast_text.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Optional, Text from rich.console import Console from ruth.constants import TEXT from ruth.nlu.featurizers.sparse_featurizers.constants import ( CLASS_FEATURIZER_UNIQUE_NAME, ) from ruth.nlu.featurizers.sparse_featurizers.sparse_featurizer ...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/featurizers/sparse_featurizers/count_vector_featurizer.py
0.845592
0.296807
count_vector_featurizer.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Optional, Text from rich.console import Console from ruth.constants import TEXT from ruth.nlu.featurizers.sparse_featurizers.constants import ( CLASS_FEATURIZER_UNIQUE_NAME, ) from ruth.nlu.featurizers.sparse_featurizers.sparse_featurizer ...
/ruth-py-0.0.5.tar.gz/ruth-py-0.0.5/src/ruth/nlu/featurizers/sparse_featurizers/tfidf_vector_featurizer.py
0.832645
0.279872
tfidf_vector_featurizer.py
pypi
import json import re from pathlib import Path from typing import Any, Dict, List, Text import yaml from pydantic import BaseModel from ruth.nlu.model import ElementBuilder, Interpreter def get_config(pipeline_path: Path) -> Dict[Text, Any]: with open(pipeline_path, "r") as f: return yaml.safe_load(f) ...
/ruth_python-0.0.8-py3-none-any.whl/ruth/cli/utills.py
0.644001
0.153803
utills.py
pypi
from typing import Any, Dict, Text, Union import numpy as np from numpy import ndarray from ruth.constants import TEXT from scipy import sparse class Feature: def __init__(self, feature: Union[sparse.spmatrix, ndarray], origin: Text): self.feature = feature self.origin = origin def is_sparse...
/ruth_python-0.0.8-py3-none-any.whl/ruth/shared/nlu/training_data/feature.py
0.888825
0.437523
feature.py
pypi
from pathlib import Path from typing import Any, Dict, List, Optional, Text from ruth.constants import TEXT from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.tokenizer.constants import MAX_LENGTH_FOR_PADDING from ruth.nlu.tokenizer.tokenizer import Tokenizer from ruth.shared.constants import ATTENTIO...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/tokenizer/hf_tokenizer.py
0.915472
0.298696
hf_tokenizer.py
pypi
import logging from collections import Counter from pathlib import Path from typing import Any, Dict, List, Text, Tuple import torch from numpy import argsort, fliplr, ndarray from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ru...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/classifiers/hf_classifier.py
0.84489
0.280007
hf_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Text, Tuple, Union import sklearn from numpy import argsort, fliplr, ndarray, reshape from rich.console import Console from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classif...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/classifiers/svm_classifier.py
0.794943
0.324811
svm_classifier.py
pypi
import logging from pathlib import Path from typing import Any, Dict, Text, Tuple import sklearn from numpy import argsort, fliplr, ndarray, reshape from ruth.constants import INTENT, INTENT_RANKING from ruth.nlu.classifiers import LABEL_RANKING_LIMIT from ruth.nlu.classifiers.ruth_classifier import IntentClassifier f...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/classifiers/naive_bayes_classifier.py
0.846006
0.327951
naive_bayes_classifier.py
pypi
import io import os from typing import Any, Dict, List, Optional, Text from urllib import request import numpy from progressbar import progressbar from ruth.nlu.classifiers.constants import MODEL_NAME from ruth.nlu.constants import ELEMENT_UNIQUE_NAME from ruth.nlu.featurizers.dense_featurizers.dense_featurizer import...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/featurizers/dense_featurizers/fast_text.py
0.68742
0.278315
fast_text.py
pypi
import logging from pathlib import Path from typing import Any, Dict, List, Optional, Text from rich.console import Console from ruth.constants import TEXT from ruth.nlu.featurizers.sparse_featurizers.constants import ( CLASS_FEATURIZER_UNIQUE_NAME, ) from ruth.nlu.featurizers.sparse_featurizers.sparse_featurizer ...
/ruth_python-0.0.8-py3-none-any.whl/ruth/nlu/featurizers/sparse_featurizers/count_vector_featurizer.py
0.845592
0.296807
count_vector_featurizer.py
pypi