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
# reactive_deliberative ## Introduction The reactive_deliberative project allows creating applications with a reactive-deliberative architecture. The hybrid deliberative-reactive architecture arose as a result of the recognition that there is a use of symbolic knowledge in describing the behavior of an intelligent a...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/README.md
0.418697
0.966315
README.md
pypi
from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING if TYPE_CHECKING: # pragma: no cover from typing import Hashable from typing import List from typing import Optional from reactive_deliberative.py_rete.alpha import AlphaMemory from reactive_deli...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/common.py
0.867092
0.373962
common.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING from reactive_deliberative.py_rete.common import Token if TYPE_CHECKING: # pragma: no cover from typing import Any from typing import List from typing import Dict from typing import Optional from reactive_deliberative.py_rete.co...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/beta.py
0.902766
0.337135
beta.py
pypi
from __future__ import annotations import inspect from typing import TYPE_CHECKING from reactive_deliberative.py_rete.beta import ReteNode from reactive_deliberative.py_rete.common import V if TYPE_CHECKING: # pragma: no cover from typing import Any from typing import Dict from reactive_deliberative.py_...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/bind_node.py
0.876648
0.325668
bind_node.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING from reactive_deliberative.py_rete.alpha import AlphaMemory from reactive_deliberative.py_rete.beta import ReteNode from reactive_deliberative.py_rete.common import Token from reactive_deliberative.py_rete.common import V from reactive_deliberative.p...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/join_node.py
0.879658
0.613729
join_node.py
pypi
from __future__ import annotations import inspect from functools import update_wrapper from itertools import product from typing import TYPE_CHECKING from reactive_deliberative.py_rete.common import Token from reactive_deliberative.py_rete.common import V from reactive_deliberative.py_rete.conditions import AND from ...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/production.py
0.677687
0.166709
production.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING from reactive_deliberative.py_rete.alpha import AlphaMemory from reactive_deliberative.py_rete.beta import BetaMemory from reactive_deliberative.py_rete.common import NegativeJoinResult from reactive_deliberative.py_rete.common import Token from reac...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/negative_node.py
0.788868
0.280367
negative_node.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING from reactive_deliberative.py_rete.alpha import AlphaMemory from reactive_deliberative.py_rete.beta import BetaMemory from reactive_deliberative.py_rete.common import Token if TYPE_CHECKING: # pragma: no cover from typing import Optional fr...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/ncc_node.py
0.870418
0.324797
ncc_node.py
pypi
from __future__ import annotations from dataclasses import dataclass from itertools import chain from typing import TYPE_CHECKING from reactive_deliberative.py_rete.common import V if TYPE_CHECKING: # pragma: no cover from typing import List from typing import Union from typing import Tuple from typ...
/reactive_deliberative-0.1.3.tar.gz/reactive_deliberative-0.1.3/lib/reactive_deliberative/py_rete/conditions.py
0.912694
0.357736
conditions.py
pypi
import struct import ipaddress import asyncio import contextlib from .enums import ReactiveCommand, ReactiveResult class Error(Exception): pass class Message(): """ Message: format <size u16><payload> """ def __init__(self, payload=bytearray()): self.payload = payload def pack(sel...
/reactive-net-0.3.5.tar.gz/reactive-net-0.3.5/reactivenet/net.py
0.716516
0.172207
net.py
pypi
# namespace: papi import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class MDSnapshotL2(object): __slots__ = ['_tab'] @classmethod def GetRootAsMDSnapshotL2(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = MDSnapsh...
/reactive_papi-2.0.0-py3-none-any.whl/reactive/papi/MDSnapshotL2.py
0.607081
0.189427
MDSnapshotL2.py
pypi
# namespace: papi import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class FeedRequest(object): __slots__ = ['_tab'] @classmethod def GetRootAsFeedRequest(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = FeedReques...
/reactive_papi-2.0.0-py3-none-any.whl/reactive/papi/FeedRequest.py
0.620277
0.161386
FeedRequest.py
pypi
# namespace: papi import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class LiquidationOrder(object): __slots__ = ['_tab'] @classmethod def GetRootAsLiquidationOrder(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = ...
/reactive_papi-2.0.0-py3-none-any.whl/reactive/papi/LiquidationOrder.py
0.585812
0.151938
LiquidationOrder.py
pypi
from copy import deepcopy from json import dumps, loads from typing import List from reactive.platform.domain.util import convert class Asset: def __init__(self, id=0, symbol="", display="", asset_type=0, **kwargs): self.id = convert(id, int) self.symbol = convert(symbol, str) self.disp...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/domain/asset.py
0.835718
0.182116
asset.py
pypi
from copy import deepcopy from json import dumps, loads from typing import List from reactive.platform.domain.util import convert class Market: def __init__(self, symbol="", display="", description="", instr="", venue="", source_id=0, expiry_date=0, default_lots=0, lot_numer=0, lot_denom=0, ti...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/domain/market.py
0.806091
0.259996
market.py
pypi
from copy import deepcopy from json import dumps, loads from reactive.platform.domain.asset import Asset from reactive.platform.domain.util import convert class Instr: def __init__(self, id=0, symbol="", display="", description="", base_asset="", term_ccy="", tenor="", asset_type="", ...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/domain/instr.py
0.688783
0.225299
instr.py
pypi
from copy import deepcopy from json import dumps, loads from reactive.platform.domain.util import convert class Venue: def __init__(self, id=0, symbol="", display="", flags=0, **kwargs): self.id = convert(id, int) self.symbol = convert(symbol, str) self.display = convert(display, str) ...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/domain/venue.py
0.687
0.172033
venue.py
pypi
import reactive.papi.FeedType as FbsFeedType import reactive.papi.SubReqType as FbsSrt import reactive.papi.Message as FbsMessage from typing import AnyStr, Any, Callable, List from reactive.platform.feed.decode import load_from_fbs from reactive.platform.feed.feedrequest import FeedRequest from reactive.platform.we...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/feed/client.py
0.888245
0.200577
client.py
pypi
import flatbuffers import reactive.papi.Body as FbsBody import reactive.papi.FeedType as FbsFeedType import reactive.papi.FeedRequest as FbsFr import reactive.papi.Message as FbsMessage import reactive.papi.SubReqType as FbsSrt from time import time_ns from typing import List class FeedRequest: """ FeedReq...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/feed/feedrequest.py
0.757346
0.172712
feedrequest.py
pypi
import numpy as np import pandas as pd from math import isclose import reactive.papi.MDSnapshotL2 as FbsMD class MDSnapshotL2: def __init__(self, market: str, bid_price: np.array, bid_qty: np.array, offer_price: np.array, offer_qty: np.array, ...
/reactive-platform-0.3.0.tar.gz/reactive-platform-0.3.0/src/reactive/platform/feed/mdsnapshotl2.py
0.736116
0.310616
mdsnapshotl2.py
pypi
<p align="center"> <img src="https://user-images.githubusercontent.com/19553554/39612358-499eb2ae-4f91-11e8-8f56-179c4f0bf2df.png" alt="pyecharts logo" width=200 height=200 /> </p> <h1 align="center">pyecharts</h1> <p align="center"> <em>Python ❤️ Echarts = pyecharts</em> </p> <p align="center"> <a href="ht...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/README.md
0.416678
0.851089
README.md
pypi
from ... import options as opts from ...charts.chart import Chart from ...commons.types import Numeric, Optional, Sequence, Union class Polar(Chart): """ <<< 极坐标系 >>> 可以用于散点图和折线图。 """ def __init__(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()): super().__init__(init_opts=...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/polar.py
0.745306
0.307813
polar.py
pypi
from ... import options as opts from ...charts.chart import AxisChart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class HeatMap(AxisChart): """ <<< 热力图 >>> 热力图主要通过颜色去表现数值的大小,必须要配合 visualMap 组件使用。 直角坐标系上必须要使用两个类目轴。 """ def __init__(self, in...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/heatmap.py
0.624408
0.266704
heatmap.py
pypi
from ... import options as opts from ...charts.chart import AxisChart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Scatter(AxisChart): """ <<< 散点图 >>> 直角坐标系上的散点图可以用来展现数据的 x,y 之间的关系,如果数据项有多个维度, 可以用颜色来表现,利用 geo 组件。 """ def __init__(self...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/scatter.py
0.636579
0.367951
scatter.py
pypi
from ... import options as opts from ...charts.chart import AxisChart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Boxplot(AxisChart): """ <<< 箱形图 >>> 箱形图是一种用作显示一组数据分散情况资料的统计图。它能显示出一组数据 的最大值、最小值、中位数、下四分位数及上四分位数。 """ def __init__(self,...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/boxplot.py
0.628863
0.358858
boxplot.py
pypi
from ... import options as opts from ...charts.chart import Chart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Tree(Chart): """ <<< 树图 >>> 树图主要用来可视化树形数据结构,是一种特殊的层次类型,具有唯一的根节点,左子树,和右子树。 """ def __init__(self, init_opts: Union[opts.InitOpts...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/tree.py
0.784071
0.444866
tree.py
pypi
import json from ... import options as opts from ...charts.chart import Chart from ...commons import utils from ...commons.types import List, Numeric, Optional, Sequence, Union from ...datasets import COORDINATES from ...globals import ChartType, TooltipFormatterType class Geo(Chart): """ <<< 地理坐标系 >>> ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/geo.py
0.599368
0.221687
geo.py
pypi
from ... import options as opts from ...charts.chart import AxisChart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Bar(AxisChart): """ <<< 柱状图/条形图 >>> 柱状/条形图,通过柱形的高度/条形的宽度来表现数据的大小。 """ def __init__(self, init_opts: Union[opts.InitOpts, di...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/bar.py
0.671147
0.31703
bar.py
pypi
from ... import options as opts from ...charts.chart import Chart from ...commons.types import List, Numeric, Optional, Union from ...globals import ChartType class Graph(Chart): """ <<< 关系图 >>> 用于展现节点以及节点之间的关系数据。 """ def __init__(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()): ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/graph.py
0.637595
0.370396
graph.py
pypi
from ... import options as opts from ...charts.chart import AxisChart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Line(AxisChart): """ <<< 折线/面积图 >>> 折线图是用折线将各个数据点标志连接起来的图表,用于展现数据的变化趋势。 """ def __init__(self, init_opts: Union[opts.InitOp...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/line.py
0.612541
0.364438
line.py
pypi
from ... import options as opts from ...charts.chart import Chart from ...commons.types import List, Optional, Sequence, Union from ...globals import ChartType class Radar(Chart): """ <<< 雷达图 >>> 雷达图主要用于表现多变量的数据。 """ def __init__(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()): ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/basic_charts/radar.py
0.692226
0.240791
radar.py
pypi
import uuid from jinja2 import Environment from ...commons import utils from ...commons.types import Optional from ...datasets import FILENAMES from ...globals import CurrentConfig, NotebookType, ThemeType from ...render.display import HTML, Javascript from ...render.engine import RenderEngine class Page: """ ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/composite_charts/page.py
0.601008
0.167797
page.py
pypi
import copy from ... import options as opts from ...commons.types import Optional, Union from ..chart import Base class Grid(Base): """ <<< 并行显示多张图 >>> """ def __init__(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()): super().__init__(init_opts=init_opts) self.options:...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/composite_charts/grid.py
0.5564
0.22212
grid.py
pypi
from ... import options as opts from ...charts.chart import Base from ...commons.types import Numeric, Optional, Union class Timeline(Base): """ <<< 时间线轮播多张图 >>> """ def __init__(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()): super().__init__(init_opts=init_opts) self...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/charts/composite_charts/timeline.py
0.749821
0.246431
timeline.py
pypi
from ..commons.types import List, Numeric, Optional, Sequence, Tuple, Union class ItemStyleOpts: def __init__( self, color: Optional[str] = None, color0: Optional[str] = None, border_color: Optional[str] = None, border_color0: Optional[str] = None, border_width: Opt...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/options/series_options.py
0.897739
0.303547
series_options.py
pypi
from ..commons.types import List, Numeric, Optional, Sequence, Union from ..globals import RenderType, ThemeType from ..options.series_options import ( LabelOpts, LineStyleOpts, SplitAreaOpts, SplitLineOpts, TextStyleOpts, ) class InitOpts: def __init__( self, width: str = "900...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/options/global_options.py
0.844858
0.286325
global_options.py
pypi
from pyecharts.datasets import EXTRA, FILENAMES class OrderedSet: def __init__(self, *args): self._values = dict() self.items = [] for a in args: self.add(a) def add(self, item): if not self._values.get(item, False): self._values.update({item: True}) ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/pyecharts/commons/utils.py
0.545528
0.175256
utils.py
pypi
from example.commons import Collector from pyecharts import options as opts from pyecharts.charts import Kline, Page C = Collector() data = [ [2320.26, 2320.26, 2287.3, 2362.94], [2300, 2291.3, 2288.26, 2308.38], [2295.35, 2346.5, 2295.35, 2345.92], [2347.22, 2358.98, 2337.35, 2363.8], [2360.75, 2...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/kline_example.py
0.540681
0.449151
kline_example.py
pypi
from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Geo, Page from pyecharts.globals import ChartType, SymbolType C = Collector() @C.funcs def geo_base() -> Geo: c = ( Geo() .add_schema(maptype="china") .add("geo", [list(z) for z...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/geo_example.py
0.699768
0.310485
geo_example.py
pypi
from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Bar, Page from pyecharts.globals import ThemeType C = Collector() @C.funcs def theme_default() -> Bar: c = ( Bar() .add_xaxis(Faker.choose()) .add_yaxis("商家A", Faker.values()) ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/theme_example.py
0.496094
0.206684
theme_example.py
pypi
from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Bar, Page, Pie, Timeline C = Collector() @C.funcs def timeline_bar() -> Timeline: x = Faker.choose() bar0 = ( Bar() .add_xaxis(x) .add_yaxis("商家A", Faker.values()) ....
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/timeline_example.py
0.528047
0.218503
timeline_example.py
pypi
from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Map, Page C = Collector() @C.funcs def map_base() -> Map: c = ( Map() .add("商家A", [list(z) for z in zip(Faker.provinces, Faker.values())], "china") .set_global_opts(title_opts=o...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/map_example.py
0.591723
0.293835
map_example.py
pypi
from example.commons import Collector from pyecharts import options as opts from pyecharts.charts import Page, Radar C = Collector() v1 = [[4300, 10000, 28000, 35000, 50000, 19000]] v2 = [[5000, 14000, 28000, 31000, 42000, 21000]] @C.funcs def radar_base() -> Radar: c = ( Radar() .add_schema( ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/radar_example.py
0.594904
0.266175
radar_example.py
pypi
import math import random from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Page, Polar C = Collector() @C.funcs def polar_scatter0() -> Polar: data = [(i, random.randint(1, 100)) for i in range(101)] c = ( Polar() .add("", data, ...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/polar_example.py
0.54698
0.300848
polar_example.py
pypi
from example.commons import Collector, Faker from pyecharts import options as opts from pyecharts.charts import Bar, Page C = Collector() @C.funcs def bar_base() -> Bar: c = ( Bar() .add_xaxis(Faker.choose()) .add_yaxis("商家A", Faker.values()) .add_yaxis("商家B", Faker.values(), is_s...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/bar_example.py
0.570571
0.277083
bar_example.py
pypi
import json import os from example.commons import Collector from pyecharts import options as opts from pyecharts.charts import Page, Tree C = Collector() @C.funcs def tree_base() -> Tree: data = [ { "children": [ {"name": "B"}, { "children"...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/tree_example.py
0.513912
0.277283
tree_example.py
pypi
from example.commons import Collector from pyecharts import options as opts from pyecharts.charts import Page, Parallel C = Collector() @C.funcs def parallel_base() -> Parallel: data = [ [1, 91, 45, 125, 0.82, 34], [2, 65, 27, 78, 0.86, 45], [3, 83, 60, 84, 1.09, 73], [4, 109, 81,...
/reactive-pyecharts-1.0.0.tar.gz/reactive-pyecharts-1.0.0/example/parallel_example.py
0.574992
0.31785
parallel_example.py
pypi
# Reactives ![Test status](https://github.com/bartfeenstra/reactives/workflows/Test/badge.svg) [![Code coverage](https://codecov.io/gh/bartfeenstra/reactives/branch/main/graph/badge.svg)](https://codecov.io/gh/bartfeenstra/reactives) [![PyPI releases](https://badge.fury.io/py/reactives.svg)](https://pypi.org/project/...
/reactives-0.5.1.tar.gz/reactives-0.5.1/README.md
0.743727
0.902695
README.md
pypi
from helpers.compose import paint def boolean_input(string, default = False): answer = False # If input is optional if default in ['y','n']: def ask_optional(): answer = input( paint(string + " (y/n default " + default + "): ")).lower() if answer == 'y': ...
/reactjo-2.4.0.tar.gz/reactjo-2.4.0/helpers/ui.py
0.557845
0.207797
ui.py
pypi
"""Retrieving pathways, subpathways, and superpathways.""" # https://reactome.org/dev/graph-database/extract-participating-molecules#retrieving-pathways from __future__ import print_function __copyright__ = "Copyright (C) 2018-2019, DV Klopfenstein. All rights reserved." __author__ = "DV Klopfenstein" import sys fro...
/reactomepy-0.68.9.tar.gz/reactomepy-0.68.9/src/bin_neo4j/tutorial/s4a_pathway_subpathways.py
0.683525
0.250174
s4a_pathway_subpathways.py
pypi
"""Breaking down complexes and sets to get thier participants.""" # https://reactome.org/dev/graph-database/extract-participating-molecules#complexes-sets-participants from __future__ import print_function __copyright__ = "Copyright (C) 2018-2019, DV Klopfenstein. All rights reserved." __author__ = "DV Klopfenstein" ...
/reactomepy-0.68.9.tar.gz/reactomepy-0.68.9/src/bin_neo4j/tutorial/s3a_get_participants_complexes.py
0.621541
0.185504
s3a_get_participants_complexes.py
pypi
"""Joining the pieces: Participating molecules for a pathway.""" # https://reactome.org/dev/graph-database/extract-participating-molecules#joining-pieces from __future__ import print_function __copyright__ = "Copyright (C) 2018-2019, DV Klopfenstein. All rights reserved." __author__ = "DV Klopfenstein" import sys fr...
/reactomepy-0.68.9.tar.gz/reactomepy-0.68.9/src/bin_neo4j/tutorial/s7a_pathway_molecules.py
0.656548
0.28284
s7a_pathway_molecules.py
pypi
"""Retrieving pathways, subpathways, and superpathways.""" # https://reactome.org/dev/graph-database/extract-participating-molecules#retrieving-pathways from __future__ import print_function __copyright__ = "Copyright (C) 2018-2019, DV Klopfenstein. All rights reserved." __author__ = "DV Klopfenstein" import sys fro...
/reactomepy-0.68.9.tar.gz/reactomepy-0.68.9/src/bin_neo4j/tutorial/s4b_pathway_superpathways.py
0.681197
0.27218
s4b_pathway_superpathways.py
pypi
import subprocess import tempfile import shutil import signal import os import time from typing import Optional, List, Any class ShellScript(): def __init__(self, script: str, script_path: Optional[str]=None, keep_temp_files: bool=False): lines = script.splitlines() lines = self._remove_initial_bl...
/reactopya_examples-0.6.0.tar.gz/reactopya_examples-0.6.0/reactopya_examples/shellscript.py
0.495606
0.15034
shellscript.py
pypi
# Reactopya Reactopya is a development tool for creating widgets that combine ReactJS with Python and that may seamlessly be deployed to the notebook, web, or desktop. ## Installation Prerequisites: * Linux or OSX * Python >= 3.6 * NodeJS >= 8 * Yarn ``` pip install --upgrade reactopya ``` Or for a development in...
/reactopya-0.10.7.tar.gz/reactopya-0.10.7/README.md
0.639624
0.963437
README.md
pypi
from __future__ import annotations from dataclasses import dataclass, field from typing import ( Any, Awaitable, Callable, Generic, MutableMapping, Optional, Protocol, Sequence, TypeVar, Union, ) from django.db.models.base import Model from django.db.models.query import QuerySe...
/reactpy_django-3.5.0.tar.gz/reactpy_django-3.5.0/src/reactpy_django/types.py
0.924291
0.245514
types.py
pypi
import ast from typing import Optional, Set, Union from .common import CheckContext, set_current HOOKS_WITH_DEPS = ("use_effect", "use_callback", "use_memo") class ExhaustiveDepsVisitor(ast.NodeVisitor): def __init__(self, context: CheckContext) -> None: self._context = context self._current_hoo...
/reactpy_flake8-0.7.0-py3-none-any.whl/reactpy_flake8/exhaustive_deps.py
0.791176
0.177454
exhaustive_deps.py
pypi
from __future__ import annotations import ast import sys from .common import CheckContext, set_current class RulesOfHooksVisitor(ast.NodeVisitor): def __init__(self, context: CheckContext) -> None: self._context = context self._current_call: ast.Call | None = None self._current_component...
/reactpy_flake8-0.7.0-py3-none-any.whl/reactpy_flake8/rules_of_hooks.py
0.546859
0.16654
rules_of_hooks.py
pypi
import ctypes import glob import numpy as np import os cdll = glob.glob( os.path.join(os.path.dirname(os.path.abspath(__file__)), "decode.*.so") )[0] cdll = ctypes.CDLL(cdll) _c_decode = cdll.decode _c_decode.restype = ctypes.c_int _c_decode.argtypes = [ ctypes.c_char_p, np.ctypeslib.ndpointer(np.float64)...
/read_acq-0.6.2.tar.gz/read_acq-0.6.2/src/read_acq/codec.py
0.783077
0.378115
codec.py
pypi
from __future__ import annotations import attrs import numpy as np import re import tqdm import warnings from pathlib import Path from . import writers from .codec import _decode_line, _encode_line class ACQError(Exception): """Base class for errors in the ACQ module.""" class ACQLineError(ACQError): """E...
/read_acq-0.6.2.tar.gz/read_acq-0.6.2/src/read_acq/read_acq.py
0.745584
0.317162
read_acq.py
pypi
import copy import numpy as np from pathlib import Path from scipy import io from typing import Optional, Union _WRITERS = [] def writer(func): """Decorator to denote a function as a writer.""" fmt = func.__name__.split("_")[-1] _WRITERS.append(fmt) def writer_wrapper(outfile=None, ancillary=None, *...
/read_acq-0.6.2.tar.gz/read_acq-0.6.2/src/read_acq/writers.py
0.798894
0.262171
writers.py
pypi
import serial import time import requests import schedule class ReadFromComPorts: comPort = "" data = [] def __init__(self, comportname: str , baudrate: int , timeout=None): """ Initialize the com port and baudrate then we create the virual port that can be shared """ sel...
/read_comports_tonet-0.0.1-py3-none-any.whl/read_comports_tonet/app.py
0.548915
0.172207
app.py
pypi
from typing import Union, Tuple, List, Dict from pathlib import Path from io import BytesIO import gzip import numpy as np __all__ = ['read_edf', 'CorruptedFileError'] class CorruptedFileError(ValueError): """ Raises when file cannot be read. """ def read_edf(filepath: Union[Path, str, BytesIO], heade...
/read_edf-0.0.1.tar.gz/read_edf-0.0.1/read_edf/edf_reader.py
0.78316
0.373733
edf_reader.py
pypi
import pickle import fire import numpy as np import pandas as pd def assess( seqkit_stats_nosecondary, edited_reads, unedited_reads, split_multiple_times, suffix=None): """Run assessment.""" with open(edited_reads, 'rb') as handle: edited_reads = pickle.load(handle) with open(une...
/read_fillet-0.1.3.tar.gz/read_fillet-0.1.3/read_fillet/split_reads_on_adapter_assess.py
0.505371
0.226067
split_reads_on_adapter_assess.py
pypi
from concurrent.futures import ProcessPoolExecutor import functools import gzip from pathlib import Path import pickle import sys import edlib import fire from natsort import natsorted import numpy as np from pyfastx import Fastx from tqdm import tqdm EDIT_THRESHOLDS = {'PCR': 45, 'Native': 9} mask_size_default_hea...
/read_fillet-0.1.3.tar.gz/read_fillet-0.1.3/read_fillet/split_reads_on_adapter.py
0.638272
0.197657
split_reads_on_adapter.py
pypi
import numpy as np from scipy import integrate from read_rapidpe.transform import transform_mceta_to_m1m2 from read_rapidpe.transform import jacobian_m1m2_by_mceta def fixed_dblquad(f, xa, xb, ya, yb, order=500): """ Fixed-order dblquad Ref: https://stackoverflow.com/questions/42272817/is-it-possible-to-c...
/read_rapidpe-0.6.3.tar.gz/read_rapidpe-0.6.3/read_rapidpe/p_astro.py
0.708918
0.57946
p_astro.py
pypi
import numpy as np from contextlib import contextmanager from .transform import Mass_Spin def pretty_plt(plt, usetex=True): """ Usage: import read_rapidpe.plot as rrp import matplotlib.pyplot as plt rrp.pretty_plt(plt) It can be reset by: plt.rcdefaults() """ # ---...
/read_rapidpe-0.6.3.tar.gz/read_rapidpe-0.6.3/read_rapidpe/plot.py
0.773002
0.587174
plot.py
pypi
import numpy as np class Mass_Spin: def __init__(self, obj=None): if obj is None: self._mass_1 = None self._mass_2 = None self._spin_1z = None self._spin_2z = None self.grid_coordinates = None else: self._mass_1 = obj._mass_1 ...
/read_rapidpe-0.6.3.tar.gz/read_rapidpe-0.6.3/read_rapidpe/transform.py
0.887009
0.493164
transform.py
pypi
import h5py import numpy as np from scipy.interpolate import interp1d from ligo.em_bright import computeDiskMass, utils from ligo.em_bright.em_bright import get_redshifts ALL_EOS_DRAWS = utils.load_eos_posterior() def em_bright(result, threshold=3.0, num_eos_draws=2000, eos_seed=None, eosname=None): ...
/read_rapidpe-0.6.3.tar.gz/read_rapidpe-0.6.3/read_rapidpe/plugins/em_bright.py
0.82887
0.53777
em_bright.py
pypi
import os import struct import zipfile import logging __all__ = ['read_roi_file', 'read_roi_zip'] class UnrecognizedRoiType(Exception): pass OFFSET = dict(VERSION_OFFSET=4, TYPE=6, TOP=8, LEFT=10, BOTTOM=12, RIGHT=14, N_COORDIN...
/read-roi-1.6.0.tar.gz/read-roi-1.6.0/read_roi/_read_roi.py
0.590897
0.159021
_read_roi.py
pypi
import logging from . import formats import seamm logger = logging.getLogger(__name__) _filetypes = sorted(formats.registries.REGISTERED_WRITERS.keys()) class WriteStructureParameters(seamm.Parameters): """The control parameters for Write Structure This is a dictionary of Parameters objects, which themse...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/write_structure_parameters.py
0.777722
0.47384
write_structure_parameters.py
pypi
import logging from . import formats import seamm logger = logging.getLogger(__name__) _filetypes = sorted(formats.registries.REGISTERED_READERS.keys()) class ReadStructureParameters(seamm.Parameters): """The control parameters for Read Structure This is a dictionary of Parameters objects, which themselv...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/read_structure_parameters.py
0.804943
0.465387
read_structure_parameters.py
pypi
from pathlib import PurePath import pprint # noqa: F401 import tkinter as tk from .formats.registries import get_format_metadata import seamm from seamm_util import ureg, Q_, units_class # noqa: F401 import seamm_widgets as sw class TkWriteStructure(seamm.TkNode): """The graphical part of a Write Structure ste...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/tk_write_structure.py
0.737536
0.276485
tk_write_structure.py
pypi
from pathlib import Path from . import formats import re def guess_extension(file_name, use_file_name=False): """ Returns the file format. It can either use the file name extension or guess based on signatures found in the file. Correctly handles .gz and .bz2 files. Parameters ---------- ...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/utils.py
0.850033
0.290553
utils.py
pypi
from . import utils from . import formats import os def read( file_name, configuration, extension=None, add_hydrogens=False, system_db=None, system=None, indices="1-end", subsequent_as_configurations=False, system_name=None, configuration_name=None, printer=None, refere...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/read.py
0.77907
0.238672
read.py
pypi
REGISTERED_READERS = {} REGISTERED_WRITERS = {} REGISTERED_FORMAT_CHECKERS = {} FORMAT_METADATA = {} default_metadata = { "single_structure": True, "dimensionality": 0, "coordinate_dimensionality": 3, "property_data": False, "bonds": False, "is_complete": True, "add_hydrogens": False, } de...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/registries.py
0.545286
0.289547
registries.py
pypi
import logging from pathlib import Path import shutil import string import subprocess import time from openbabel import openbabel from ..registries import register_format_checker from ..registries import register_reader from ..registries import set_format_metadata logger = logging.getLogger("read_structure_step.read...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/smi/smi.py
0.58948
0.219066
smi.py
pypi
import logging from pathlib import Path from ..registries import register_format_checker from ..registries import register_reader from ..registries import set_format_metadata logger = logging.getLogger(__name__) set_format_metadata( [".mmcif"], single_structure=False, dimensionality=3, coordinate_dim...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/cif/mmcif.py
0.599251
0.184529
mmcif.py
pypi
import bz2 import gzip import logging from pathlib import Path import time from ..registries import register_format_checker from ..registries import register_reader from ..registries import set_format_metadata from seamm_util.printing import FormattedText as __ from ...utils import parse_indices logger = logging.getL...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/cif/cif.py
0.570092
0.237565
cif.py
pypi
import bz2 import gzip import logging import os from pathlib import Path import shutil import string import subprocess import sys import threading import time import re from openbabel import openbabel from read_structure_step.formats.registries import register_reader from ...utils import parse_indices if "OpenBabel_v...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/xyz/xyz.py
0.50415
0.205177
xyz.py
pypi
from pathlib import Path import shutil import string import subprocess from openbabel import openbabel if "OpenBabel_version" not in globals(): OpenBabel_version = None # Get the list of file formats from Open Babel obConversion = openbabel.OBConversion() known_input_formats = obConversion.GetSupportedInputForma...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/openbabel_io/obabel.py
0.720073
0.324824
obabel.py
pypi
import re from read_structure_step.formats.registries import last_resort_checker def check_for_pdb(file_name): """Check if a file appears to be a PDB file. The PDB files have a number of required keywords; however, some, like "AUTHOR" are common words, so this routine checks for the simultaneous presenc...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/openbabel_io/checkers.py
0.666822
0.407216
checkers.py
pypi
from pathlib import Path import shutil import string import subprocess import time from openbabel import openbabel from ..registries import register_format_checker from ..registries import register_reader from ..registries import set_format_metadata if "OpenBabel_version" not in globals(): OpenBabel_version = No...
/read_structure_step-2023.8.30.tar.gz/read_structure_step-2023.8.30/read_structure_step/formats/mol2/mol2.py
0.671901
0.291052
mol2.py
pypi
import re import pandas as pd def read_tydex_file(file_path): """Read a tydex file and return a structured representation of its content. :param file_path: The path to the tydex file. :type file_path: str :return: dict, A dictionary containing the file including Header, Comments, Cons...
/read_tydex_file_pkg-0.0.3.tar.gz/read_tydex_file_pkg-0.0.3/my_pkg/read_tydex.py
0.654895
0.237289
read_tydex.py
pypi
from collections import OrderedDict from collections.abc import MutableMapping from threading import RLock class ReadCache(MutableMapping): """A thread-safe dict-like container with a maximum size This ReadCache contains all the required methods for working as an ordered cache with a max size. When ...
/read_until-3.0.0-py3-none-any.whl/read_until/read_cache.py
0.9494
0.485356
read_cache.py
pypi
import argparse import functools import logging from multiprocessing.pool import ThreadPool import time import typing import numpy import read_until def get_parser() -> argparse.ArgumentParser: """Build argument parser for example""" parser = argparse.ArgumentParser("Read until API demonstration..") pa...
/read_until-3.0.0-py3-none-any.whl/read_until/examples/simple.py
0.762513
0.183356
simple.py
pypi
import argparse import logging import sys import time import numpy as np from read_until import AccumulatingCache, ReadUntilClient try: from pyguppy_client_lib.pyclient import PyGuppyClient from pyguppy_client_lib.helper_functions import package_read except ImportError: print( "Failed to import p...
/read_until-3.0.0-py3-none-any.whl/read_until/examples/identification.py
0.603815
0.164987
identification.py
pypi
r""" Extract your project's __version__ variable When creating a ``setup.py`` for a new project, do you find yourself always writing the same block of code for parsing ``__version__`` from your project's source? Something like this? :: with open(join(dirname(__file__), 'package_name', '__init__.py')) as fp: ...
/read_version-0.3.2-py3-none-any.whl/read_version.py
0.499756
0.271342
read_version.py
pypi
import re import pandas as pd def read_vme_file(file_path): """Read a vme file and return a structured representation of its content. :param file_path: The path to the vme file._ :type file_path: str :return: A dictionary with data extracted from the VME file. """ # open file with open(...
/read_vme_file_pkg-0.0.1.tar.gz/read_vme_file_pkg-0.0.1/my_pkg/read_vme.py
0.478041
0.197232
read_vme.py
pypi
from datetime import datetime from pathlib import Path from _readSTDF import _readSTDF __all__ = ['readSTDF'] def readSTDF(file_name, record_type: str, n: int = 1): """Read and parse STDF records. Args: file_name: path of STDF file, can be a `str` or `Path`. record_type: STDF Record Types, ...
/readSTDF-0.0.1-cp36-cp36m-win_amd64.whl/readSTDF.py
0.769124
0.290089
readSTDF.py
pypi
# ReadabiliPy [![Build Status](https://travis-ci.org/alan-turing-institute/ReadabiliPy.svg?branch=master)](https://travis-ci.org/alan-turing-institute/ReadabiliPy) [![Coverage Status](https://coveralls.io/repos/github/alan-turing-institute/ReadabiliPy/badge.svg?branch=master)](https://coveralls.io/github/alan-turing-i...
/readabilipy-0.2.0.tar.gz/readabilipy-0.2.0/README.md
0.605449
0.964756
README.md
pypi
import logging try: from urllib.parse import urlencode except ImportError: from urllib import urlencode import requests from requests_oauthlib import OAuth1Session from readability.core import required_from_env from readability.utils import filter_args_to_dict logger = logging.getLogger(__name__) DEFAULT_R...
/readability-api-1.0.2.tar.gz/readability-api-1.0.2/readability/clients.py
0.617859
0.162314
clients.py
pypi
import math from metrics.utils import * class Readability: def __init__(self): self.char_count = 0 self.word_count = 0 self.sentence_count = 0 self.syllable_count = 0 self.complex_word_count = 0 self.long_word_count = 0 self.avg_words_p_sentence = 0 de...
/readability-metrics-1.0.0.tar.gz/readability-metrics-1.0.0/metrics/metrics.py
0.539469
0.269585
metrics.py
pypi
import nltk from nltk.tokenize import RegexpTokenizer from metrics.syllables_en import * TOKENIZER = RegexpTokenizer('(?u)\W+|\$[\d\.]+|\S+') SPECIAL_CHARS = ['.', ',', '!', '?'] def get_char_count(words): characters = 0 for word in words: characters += len(word) return characters def get_word...
/readability-metrics-1.0.0.tar.gz/readability-metrics-1.0.0/metrics/utils.py
0.434221
0.210644
utils.py
pypi
import pandas as pd from typing import List, Union from loguru import logger from readability_transformers.file_utils import CachedDataset from readability_transformers.dataset import Dataset DATASET_ID = "commonlit" DATASET_ZIP_URL = 'https://1theta-readability-transformers.s3.us-east-2.amazonaws.com/commonlit.tar....
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/dataset/CommonLitDataset.py
0.863363
0.420957
CommonLitDataset.py
pypi
import os import pickle import numpy as np import pandas as pd from abc import ABC, abstractmethod from typing import List import tqdm from tqdm import tqdm from tqdm.autonotebook import trange from sentence_transformers import SentenceTransformer from loguru import logger from readability_transformers.file_utils imp...
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/dataset/Dataset.py
0.739046
0.177526
Dataset.py
pypi
import re import pandas as pd from typing import List, Union from loguru import logger from readability_transformers.file_utils import CachedDataset from readability_transformers.dataset import Dataset DATASET_ID = "cefr_basic" DATASET_ZIP_URL = 'https://1theta-readability-transformers.s3.us-east-2.amazonaws.com/basi...
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/dataset/CEFRDataset.py
0.720467
0.382516
CEFRDataset.py
pypi
import os import json import tqdm import pickle import inspect import importlib from importlib import import_module import torch import numpy as np import pandas as pd import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from loguru import logger from typing import List, Tuple from tqdm i...
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/models/Prediction.py
0.851058
0.324316
Prediction.py
pypi
import torch from torch import nn from typing import List, Union from .Prediction import ClassificationHead, RegressionHead, Prediction class ResFCClassification(Prediction): def __init__(self, input_size: int, n_layers: int, h_size: int, dropout: int, n_labels: List, double: bool): super().__init__(inpu...
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/models/ResidualFCPrediction.py
0.951142
0.68117
ResidualFCPrediction.py
pypi
import torch import numpy as np from torch import Tensor, nn, tensor import math import pandas as pd import csv from pathlib import Path class MultiHeadAttention(nn.Module): def __init__(self, d_model, num_heads, masked): super().__init__() assert d_model % num_heads == 0, "num_heads must evenly c...
/readability-transformers-0.3.1.tar.gz/readability-transformers-0.3.1/readability_transformers/models/ReadNetModel.py
0.859531
0.510863
ReadNetModel.py
pypi