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
# Author: Dr. Konstantin Selyunin # License: MIT # Created: 2021.08.30 import logging import os.path import struct from abc import abstractmethod, ABC from typing import Union, Tuple from rsl_xml_svd.rsl_svd_parser import RslSvdParser class UM8Registers(ABC): def __init__(self, **kwargs): self.svd_pa...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/um8_registers.py
0.891055
0.333008
um8_registers.py
pypi
from dataclasses import dataclass @dataclass class UM8AllRawPacket: gyro_raw_x: int gyro_raw_y: int gyro_raw_z: int gyro_raw_time: float accel_raw_x: int accel_raw_y: int accel_raw_z: int accel_raw_time: float mag_raw_x: int mag_raw_y: int mag_raw_z: int mag_raw_time:...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/um8_broadcast_packets.py
0.864411
0.429968
um8_broadcast_packets.py
pypi
# Author: Dr. Konstantin Selyunin # License: MIT # Created: 2020.08.19 import logging import os.path import struct from abc import abstractmethod, ABC from typing import Union, Tuple from .rsl_xml_svd.rsl_svd_parser import RslSvdParser class ShearWaterRegisters(ABC): def __init__(self, **kwargs): sel...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/shearwater_registers.py
0.892574
0.394872
shearwater_registers.py
pypi
from dataclasses import dataclass @dataclass class UM7AllRawPacket: gyro_raw_x: int gyro_raw_y: int gyro_raw_z: int gyro_raw_time: float accel_raw_x: int accel_raw_y: int accel_raw_z: int accel_raw_time: float mag_raw_x: int mag_raw_y: int mag_raw_z: int mag_raw_time:...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/um7_broadcast_packets.py
0.862757
0.436622
um7_broadcast_packets.py
pypi
# Author: Dr. Konstantin Selyunin # License: MIT # Created: 2022.03.28 import logging import os.path import struct from abc import abstractmethod, ABC from typing import Union, Tuple from .rsl_xml_svd.rsl_svd_parser import RslSvdParser class UM7Registers(ABC): def __init__(self, **kwargs): self.svd_p...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/um7_registers.py
0.891233
0.326218
um7_registers.py
pypi
# Author: Dr. Konstantin Selyunin # License: MIT from dataclasses import dataclass from pathlib import Path from typing import Any, List, Tuple, Union from xml.etree import ElementTree as ET @dataclass class EnumeratedValue: name: str description: str value: int def __repr__(self): return f...
/rsl_comm_py-0.1.11.tar.gz/rsl_comm_py-0.1.11/rsl_comm_py/rsl_xml_svd/rsl_svd_parser.py
0.850453
0.350421
rsl_svd_parser.py
pypi
from urlparse import urlunsplit, urlsplit from os.path import basename import cgi from urllib import urlencode from zope.interface import implements from rsl.globalregistry import lookupimpl from rsl.interfaces import IServiceDescription, ITransport, IProxy from rsl.implementations import OperationInfo def loadHTTP...
/rsl.rest-0.2.0.tar.bz2/rsl.rest-0.2.0/src/rsl/rest/rest.py
0.665302
0.253561
rest.py
pypi
from pkg_resources import resource_stream from lxml import etree from zope.interface import classProvides, directlyProvides from rsl.interfaces import ISchemaFactory from rsl.misc.namespace import clark, qname2clark, url2ns from rsl.xsd.deserialtypes import List, Dict from rsl.xsd.urtype import AnySimpleType, AnyType ...
/rsl.soap11-0.2.2.tar.gz/rsl.soap11-0.2.2/src/rsl/soap11/soapenc.py
0.496094
0.197212
soapenc.py
pypi
from lxml import etree from zope.interface import classProvides from rsl.misc.namespace import clark from rsl.xsd.interfaces import IXMLSerializer, IXMLDeserializer from rsl.xsd.deserialtypes import List, Dict from rsl.xsd.urtype import AnySimpleType from rsl.xsd.component import XSElement, XSAny, XSSimpleType from rs...
/rsl.xsd-0.2.4.tar.gz/rsl.xsd-0.2.4/src/rsl/xsd/serializer.py
0.433622
0.247726
serializer.py
pypi
import textwrap from typing import Any, Optional, Union class EscapedString: def __init__(self, src: str = "", chars: Optional[str] = None): self.escape_chars = set() if chars is None else set(chars) self._src = str(src) def __contains__(self, sub: str) -> bool: return sub in self._sr...
/rsm_markup-0.2.4-cp310-cp310-macosx_12_0_x86_64.whl/rsm/util.py
0.827201
0.234735
util.py
pypi
import logging from collections import defaultdict from itertools import count from string import ascii_uppercase from typing import Generator, Optional, Type from icecream import ic from . import nodes logger = logging.getLogger("RSM").getChild("tform") class RSMTransformerError(Exception): pass class Tran...
/rsm_markup-0.2.4-cp310-cp310-macosx_12_0_x86_64.whl/rsm/transformer.py
0.77193
0.277644
transformer.py
pypi
import logging from pathlib import Path from typing import Any, Callable, NamedTuple, Optional, Union from icecream import ic from rsm import ( builder, linter, reader, rsmlogger, transformer, translator, tsparser, writer, ) from .rsmlogger import GatherHandler logger = logging.getLo...
/rsm_markup-0.2.4-cp310-cp310-macosx_12_0_x86_64.whl/rsm/app.py
0.830697
0.24353
app.py
pypi
import logging import textwrap from collections.abc import Iterable from datetime import datetime from pathlib import Path from typing import ( Any, Callable, ClassVar, Generator, Optional, Type, TypeVar, Union, cast, ) from icecream import ic logger = logging.getLogger("RSM").getC...
/rsm_markup-0.2.4-cp310-cp310-macosx_12_0_x86_64.whl/rsm/nodes.py
0.895762
0.359898
nodes.py
pypi
import sys from argparse import ArgumentParser, Namespace from importlib.metadata import version from typing import Callable, Optional import livereload from rsm import app from rsm.tsparser import RSMParserError def init_parser() -> ArgumentParser: parser = ArgumentParser() parser.add_argument( "sr...
/rsm_markup-0.2.4-cp310-cp310-macosx_12_0_x86_64.whl/rsm/cli.py
0.619126
0.154312
cli.py
pypi
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
/rsnd_distributions-0.1.tar.gz/rsnd_distributions-0.1/rsnd_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
import os import math import sys import tensorflow as tf import random import imghdr _RANDOM_SEED = 0 _TRAIN_NUM_SHARDS = 200 class ImageReader(object): def __init__(self): self._decode_jpeg_data = tf.placeholder(dtype=tf.string) self._decode_jpeg = tf.image.decode_jpeg(self._decode_jpeg_data, channels=3)...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/convert_image_to_tfrecod.py
0.503174
0.37843
convert_image_to_tfrecod.py
pypi
"""Flags which will be nearly universal across models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags import tensorflow as tf from utils.flags._conventions import help_wrap from utils.logs import hooks_helper def define_base(da...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/flags/_base.py
0.937911
0.392861
_base.py
pypi
"""Flags for managing compute devices. Currently only contains TPU flags.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags import tensorflow as tf from utils.flags._conventions import help_wrap def require_cloud_storage(flag_name...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/flags/_device.py
0.907978
0.24842
_device.py
pypi
"""Register flags for optimizing performance.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import multiprocessing from absl import flags # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order from util...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/flags/_performance.py
0.900631
0.290301
_performance.py
pypi
"""Flags for benchmarking models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags from utils.flags._conventions import help_wrap def define_benchmark(benchmark_log_dir=True, bigquery_uploader=True): """Register benchmarking fl...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/flags/_benchmark.py
0.930616
0.180992
_benchmark.py
pypi
"""Functions specific to running TensorFlow on TPUs.""" import tensorflow as tf # "local" is a magic word in the TPU cluster resolver; it informs the resolver # to use the local CPU as the compute device. This is useful for testing and # debugging; the code flow is ostensibly identical, but without the need to # act...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/accelerator/tpu.py
0.951684
0.726498
tpu.py
pypi
"""Convenience functions for managing dataset file buffers.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import atexit import multiprocessing import os import tempfile import uuid import numpy as np import six import tensorflow as tf class _Garbag...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/data/file_io.py
0.791055
0.418519
file_io.py
pypi
"""Session hook for logging benchmark metric.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf # pylint: disable=g-bad-import-order class LoggingMetricHook(tf.train.LoggingTensorHook): """Hook to log benchmark metric informati...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/logs/metric_hook.py
0.952064
0.37711
metric_hook.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf # pylint: disable=g-bad-import-order from utils.logs import hooks from utils.logs import logger from utils.logs import metric_hook _TENSORS_TO_LOG = dict((x, x) for x in ['learning_ra...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/logs/hooks_helper.py
0.935206
0.261449
hooks_helper.py
pypi
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf # pylint: disable=g-bad-import-order from utils.logs import logger class ExamplesPerSecondHook(tf.train.SessionRunHook): """Hook to print out examples per second. Total time is ...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/logs/hooks.py
0.944293
0.330323
hooks.py
pypi
"""Helper functions for running models in a distributed setting.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf def get_distribution_strategy(num_gpus, all_reduce_alg=None): """Return a DistributionStrategy for running the mo...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/misc/distribution_utils.py
0.933195
0.364693
distribution_utils.py
pypi
"""Miscellaneous functions that can be called by models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numbers import tensorflow as tf from tensorflow.python.util import nest def past_stop_threshold(stop_threshold, eval_metric): """Return a...
/rsnsfw-0.0.6.tar.gz/rsnsfw-0.0.6/resnet/utils/misc/model_helpers.py
0.899498
0.381882
model_helpers.py
pypi
from gym.envs.registration import register register(id='VSS-v0', entry_point='rsoccer_gym.vss.env_vss:VSSEnv', max_episode_steps=1200 ) register(id='VSSMA-v0', entry_point='rsoccer_gym.vss.env_ma:VSSMAEnv', max_episode_steps=1200 ) register(id='VSSMAOpp-v0', ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/__init__.py
0.608129
0.244871
__init__.py
pypi
import time from typing import Dict, List, Optional import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot from rsoccer_gym.Simulators.rsim import RSimVSS from rsoccer_gym.Simulators.fira import Fira class VSSBaseEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/vss/vss_gym_base.py
0.841109
0.39987
vss_gym_base.py
pypi
import math import os import random import time import gym import numpy as np import torch from rsoccer_gym.Entities import Frame, Robot from rsoccer_gym.vss.vss_gym_base import VSSBaseEnv from rsoccer_gym.vss.env_gk.attacker.models import DDPGActor, GaussianPolicy class rSimVSSGK(VSSBaseEnv): """ Descriptio...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/vss/env_gk/vss_gk.py
0.58948
0.266196
vss_gk.py
pypi
import math import random from rsoccer_gym.Utils.Utils import OrnsteinUhlenbeckAction from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot from rsoccer_gym.vss.vss_gym_base import VSSBaseFIRAEnv class VSSFIRAEnv(VSSBaseFIRAEnv): """This environment controls a single...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/vss/env_vss/vss_gym_fira.py
0.687105
0.331147
vss_gym_fira.py
pypi
import math import random from rsoccer_gym.Utils.Utils import OrnsteinUhlenbeckAction from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.vss.vss_gym_base import VSSBaseEnv from rsoccer_gym.Utils import KDTree class VSSEnv(VSSBaseEnv): """Thi...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/vss/env_vss/vss_gym.py
0.687945
0.298274
vss_gym.py
pypi
import math import os import random from typing import Dict import gym import numpy as np import torch from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.Utils.Utils import OrnsteinUhlenbeckAction from rsoccer_gym.vss.env_ma.opponent.model import DDPGActor from rsoccer_gym.vss.vss_gym_base import VSS...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/vss/env_ma/vss_gym_ma.py
0.659734
0.254189
vss_gym_ma.py
pypi
import numpy as np from typing import Dict from rsoccer_gym.Entities.Ball import Ball from rsoccer_gym.Entities.Robot import Robot class Frame: """Units: seconds, m, m/s, degrees, degrees/s. Reference is field center.""" def __init__(self): """Init Frame object.""" self.ball: Ball = Ball() ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/Entities/Frame.py
0.888372
0.455683
Frame.py
pypi
import math def closest_node(values, node1, node2): if node1 is None: return node2, node2.distance2_to(values) if node2 is not None else math.inf if node2 is None: return node1, node1.distance2_to(values) if node1 is not None else math.inf node1_dist2 = node1.distance2_to(values) no...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/Utils/kdtree.py
0.628179
0.623291
kdtree.py
pypi
import time from typing import Dict, List, Optional import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Field from rsoccer_gym.Simulators.rsim import RSimSSL class SSLBaseEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], } NORM_BOUNDS = 1.2 def __ini...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_gym_base.py
0.901532
0.358129
ssl_gym_base.py
pypi
import math import random from rsoccer_gym.Utils.Utils import OrnsteinUhlenbeckAction from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv from rsoccer_gym.Utils import KDTree class SSLGoToBallIREnv(SSLBaseEnv): ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_go_to_ball/ssl_gym_go_to_ball_ir.py
0.739422
0.380845
ssl_gym_go_to_ball_ir.py
pypi
import math import random from rsoccer_gym.Utils.Utils import OrnsteinUhlenbeckAction from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv from rsoccer_gym.Utils import KDTree class SSLGoToBallEnv(SSLBaseEnv): ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_go_to_ball/ssl_gym_go_to_ball.py
0.681515
0.430566
ssl_gym_go_to_ball.py
pypi
import math import random from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv from rsoccer_gym.Utils import KDTree class SSLHWStaticDefendersEnv(SSLBaseEnv): """The SSL robot needs to make a goal on a field ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_hw_challenge/static_defenders.py
0.674694
0.446314
static_defenders.py
pypi
import math import random from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv class SSLHWDribblingEnv(SSLBaseEnv): """The SSL robot needs navigate a course while keeping the ball Description: ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_hw_challenge/dribbling.py
0.685002
0.514278
dribbling.py
pypi
import math import random from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Ball, Frame, Robot from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv class SSLPassEnduranceMAEnv(SSLBaseEnv): """The SSL robot needs to make a goal with contested possession Description: ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_hw_challenge/pass_endurance_ma.py
0.67854
0.297064
pass_endurance_ma.py
pypi
import math import random from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Ball, Frame, Robot from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv class SSLPassEnduranceEnv(SSLBaseEnv): """The SSL robot needs to make a goal with contested possession Description: ...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_hw_challenge/pass_endurance.py
0.650578
0.38856
pass_endurance.py
pypi
import math import random from typing import Dict import gym import numpy as np from rsoccer_gym.Entities import Frame, Robot, Ball from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv class SSLGoToBallShootEnv(SSLBaseEnv): """The SSL robot needs to make a goal Description: One blue robot an...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/ssl/ssl_go_to_ball_shoot/ssl_gym_go_to_ball_shoot.py
0.673084
0.476884
ssl_gym_go_to_ball_shoot.py
pypi
import numpy as np import robosim from typing import Dict, List from rsoccer_gym.Entities import Frame, FrameVSS, FrameSSL, Field class RSim: def __init__( self, field_type: int, n_robots_blue: int, n_robots_yellow: int, time_step_ms: int, ): self.n_robots_blue...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/Simulators/rsim.py
0.696991
0.389314
rsim.py
pypi
import socket from typing import Dict, List import numpy as np from rsoccer_gym.Entities import Robot from rsoccer_gym.Entities.Frame import FramePB from rsoccer_gym.Simulators.rsim import RSim import rsoccer_gym.Simulators.pb_fira.packet_pb2 as packet_pb2 from rsoccer_gym.Simulators.pb_fira.state_pb2 import * clas...
/rsoccer_gym-1.4-py3-none-any.whl/rsoccer_gym/Simulators/fira.py
0.772488
0.312639
fira.py
pypi
from abc import abstractmethod from rsocket.wellknown_mimetype import WellKnowMimeTypes, MIME_TYPES_BY_NAME class CompositeMetadata: def __init__(self, source=None): if source is None: source = bytearray() self.source = source self.reader_index = 0 def get_source(self): ...
/rsockettest-1.0.0.tar.gz/rsockettest-1.0.0/rsocket/composite_metadata.py
0.571408
0.164148
composite_metadata.py
pypi
from rsolve.hm import hm from dataclasses import dataclass, field import typing as t Ext = t.TypeVar("Ext") @dataclass class TCEnv(t.Generic[Ext]): ext: Ext tvars: t.List[hm.HMT] = field(default_factory=list) neqs: t.Set[t.Tuple[hm.HMT, hm.HMT]] = field(default_factory=list) def new_tvar(self) -> hm....
/rsolve.py-0.1-py3-none-any.whl/rsolve/hm/unification.py
0.644001
0.335405
unification.py
pypi
<img src="https://github.com/XiongPengNUS/rsome/blob/master/rsologo.png?raw=true" width=100> # RSOME: Robust Stochastic Optimization Made Easy [![PyPI](https://img.shields.io/pypi/v/rsome?label=PyPI)](https://pypi.org/project/rsome/) [![PyPI - downloads](https://img.shields.io/pypi/dm/rsome?label=PyPI%20downloads)](h...
/rsome-1.2.1.tar.gz/rsome-1.2.1/README.md
0.531209
0.946597
README.md
pypi
from __future__ import annotations import copy from operator import attrgetter from typing import ( Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple, Union, cast, ) from bs4 import BeautifulSoup from bs4.element import NavigableString, Tag from dataclasses import d...
/python/context_extractor.py
0.763175
0.242519
context_extractor.py
pypi
from typing import ( Dict, List, Set, TypedDict, Union, ) from dataclasses import asdict, dataclass, field class Attribute(TypedDict, total=False): href: str @dataclass class Text: id: str value: str = "" tags: List[str] = field(default_factory=list) id2attrs: Dict[str, Attri...
/python/models/context.py
0.833121
0.28872
context.py
pypi
import json import os from os.path import dirname, join from typing import Dict from jinja2 import Template from notebook.base.handlers import APIHandler SUPPORTED_QUERY_TYPES = ["portal"] class UnsupportedQueryTypeError(Exception): pass class UnimplementedQueryResolutionError(Exception): pass class Que...
/rsp_jupyter_extensions-0.8.4.tar.gz/rsp_jupyter_extensions-0.8.4/rsp_jupyter_extensions/query.py
0.661486
0.233258
query.py
pypi
class DisplayIconDefinition: def __init__(self, name, category, friendly_name, icon, flag_index, flag): self.name = name self.category = category self.friendly_name = friendly_name self.icon = icon self.flag_index = flag_index self.flag = flag DISPLAY_ICON_DEFINITIO...
/rsp1570serial-pp81381-0.1.5.tar.gz/rsp1570serial-pp81381-0.1.5/rsp1570serial/icons.py
0.416678
0.255901
icons.py
pypi
import io import logging _LOGGER = logging.getLogger(__name__) START_BYTE = 0xFE ESCAPE_BYTE = 0xFD class RotelProtocolError(Exception): pass class RotelEOFError(Exception): pass class RotelInvalidByteError(Exception): pass class RotelUnexpectedStartByteError(RotelInvalidByteError): """ Fo...
/rsp1570serial-pp81381-0.1.5.tar.gz/rsp1570serial-pp81381-0.1.5/rsp1570serial/protocol.py
0.555194
0.307696
protocol.py
pypi
import logging from rsp1570serial.icons import flags_to_icons, icons_that_are_on from rsp1570serial.protocol import decode_protocol_stream, encode_payload _LOGGER = logging.getLogger(__name__) DEVICE_ID_RSP1570 = 0xA3 MSGTYPE_PRIMARY_COMMANDS = 0x10 MSGTYPE_MAIN_ZONE_COMMANDS = 0x14 MSGTYPE_RECORD_SOURCE_COMMANDS = ...
/rsp1570serial-pp81381-0.1.5.tar.gz/rsp1570serial-pp81381-0.1.5/rsp1570serial/messages.py
0.433262
0.250471
messages.py
pypi
import re import requests import sys class Pagination: """ For setting page size, number and orderby/ sort fields of listings """ def __init__( self, page_number: int = 0, page_size: int = 10, order_by: str = None, sort_order: str = "asc", ): self.d...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/client_base.py
0.514888
0.154058
client_base.py
pypi
import datetime as dt from urllib.parse import urlparse class AbsValidator: def validate(self, item): pass def raise_type_error(self, value, expected_type: str): raise TypeError(f"Expected {value!r} to be {expected_type}") class Number(AbsValidator): def validate(self, value): i...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/validators.py
0.526586
0.395076
validators.py
pypi
class QuantityUnit: """ Static data from api/v1/units definitions """ data = [ {"id": 1, "label": "items", "category": "dimensionless", "description": ""}, {"id": 2, "label": "µl", "category": "volume", "description": ""}, {"id": 3, "label": "ml", "category": "volume", "descript...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/inv/quantity_unit.py
0.853867
0.543893
quantity_unit.py
pypi
from typing import Optional, Sequence, Union, List from urllib.parse import urlparse import numbers import datetime as dt from rspace_client.inv.quantity_unit import QuantityUnit class TemplateBuilder: """ Define a SampleTemplate prior to POSTing to RSpace. A SampleTemplate only requires a name and a de...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/inv/template_builder.py
0.88029
0.345547
template_builder.py
pypi
import datetime import time import os import requests import rspace_client.eln.filetree_importer as importer from rspace_client.eln.dcs import DocumentCreationStrategy from rspace_client.client_base import ClientBase, Pagination class ELNClient(ClientBase): """Client for RSpace API v1. Most methods return a ...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/eln/eln.py
0.725843
0.289811
eln.py
pypi
from bs4 import BeautifulSoup import re class FieldContent: """ Encapsulates HTML content of text fields and provides methods to pull out features of interest such as tables, links etc """ def __init__(self, html_content): self.html = html_content self.soup = BeautifulSoup(self.ht...
/rspace_client-2.5.0-py3-none-any.whl/rspace_client/eln/field_content.py
0.643441
0.322419
field_content.py
pypi
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport all...
/rspyutils-0.2.1.4.tar.gz/rspyutils-0.2.1.4/pyutils/bigdata/hbases/thrift2/hbase/THBaseService.py
0.663124
0.548492
THBaseService.py
pypi
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys from thrift.transport import TTransport all_structs = [] class TDeleteType(object): """ Specify type of de...
/rspyutils-0.2.1.4.tar.gz/rspyutils-0.2.1.4/pyutils/bigdata/hbases/thrift2/hbase/ttypes.py
0.483405
0.262097
ttypes.py
pypi
import json import math import datetime import numpy as np import pandas as pd from pyutils.time import dates from pyutils.tool.list import get_flat_list from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import StandardScaler class FeaturesEncode(object): def __init__(self): pass ...
/rspyutils-0.2.1.4.tar.gz/rspyutils-0.2.1.4/pyutils/feature/encodes.py
0.464173
0.470737
encodes.py
pypi
import re RSR_TYPE_PATTERN = '(%s[a-zA-Z0-9]*)?' class InvalidParameterError(Exception): """Raised to signal an encounter with a syntactically invalid parameter. """ class RouteParameterizationIrreversibleError(Exception): """Raised to signal an error while attempting to reverse a route due an unsu...
/rsr-reverse-0.1.1.tar.gz/rsr-reverse-0.1.1/rsr_reverse/reverser.py
0.853425
0.430207
reverser.py
pypi
rsrc ==== [![](https://travis-ci.com/lycantropos/rsrc.svg?branch=master)](https://travis-ci.com/lycantropos/rsrc "Travis CI") [![](https://dev.azure.com/lycantropos/rsrc/_apis/build/status/lycantropos.rsrc?branchName=master)](https://dev.azure.com/lycantropos/rsrc/_build/latest?definitionId=4&branchName=master "Azure ...
/rsrc-0.1.3.tar.gz/rsrc-0.1.3/README.md
0.853104
0.925903
README.md
pypi
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
/rss_distributions-0.1-py3-none-any.whl/rss_distributions/Gaussiandistribution.py
0.688364
0.853058
Gaussiandistribution.py
pypi
r""" Module which includes logics on feeds' conversion to supported formats. Currently supported formats for conversion: .html, .pdf, .epub. By default, converted files are stored in ..\Users\Username\rss_reader. However, this can be changed by passing another directory path to appropriate console arguments --to-html, ...
/rss-news-reader-3.2.5.tar.gz/rss-news-reader-3.2.5/rss_news_reader/converter/_converter.py
0.807423
0.337667
_converter.py
pypi
from rss_news_reader.xml_parser import Element from ._rss_models import Feed from ._url_resolver import URLResolver class RSSBuilder: """Class to build RSS feed based on dom object of parsed XML.""" def __init__(self, dom: Element, limit: int, check_urls: bool): self.dom = dom self.limit = l...
/rss-news-reader-3.2.5.tar.gz/rss-news-reader-3.2.5/rss_news_reader/rss_builder/_builder.py
0.734881
0.200675
_builder.py
pypi
import logging from collections import deque from ._parser_models import Element from ._tokenizer import Tokenizer, TokenType, XMLError logger = logging.getLogger("rss-news-reader") class Parser: """XML parser class exploiting tokenization principle.""" def __init__(self, xml: str): self.xml = xml ...
/rss-news-reader-3.2.5.tar.gz/rss-news-reader-3.2.5/rss_news_reader/xml_parser/_parser.py
0.706798
0.164382
_parser.py
pypi
import re from typing import Optional from urllib.parse import urlparse from pydantic import BaseModel class Attribute(BaseModel): """Represents an attribute inside XML tag.""" name: str # optional, because there may be the following situation: <script async # src="https://platform.twitter.com/widge...
/rss-news-reader-3.2.5.tar.gz/rss-news-reader-3.2.5/rss_news_reader/xml_parser/_parser_models.py
0.879367
0.254555
_parser_models.py
pypi
import json from typing import List from colorama import Back, Fore, Style, init from pydantic import BaseModel from rss_news_reader.rss_builder import Feed, Item class JSONFeeds(BaseModel): """Model to handle a list of feeds when converting them to json format.""" feeds: List[Feed] class NewsPrinter: ...
/rss-news-reader-3.2.5.tar.gz/rss-news-reader-3.2.5/rss_news_reader/printer/_printer.py
0.708616
0.194387
_printer.py
pypi
try: import json import logging import os from reportlab.lib.enums import TA_JUSTIFY from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.l...
/rss-parser-celine-trial1-5.1.0.tar.gz/rss-parser-celine-trial1-5.1.0/RSSparser/convert_format.py
0.636918
0.233499
convert_format.py
pypi
from typing import List, Optional from pydantic import Field from rss_parser.models import XMLBaseModel from rss_parser.models.image import Image from rss_parser.models.item import Item from rss_parser.models.text_input import TextInput from rss_parser.models.types.date import DateTimeOrStr from rss_parser.models.typ...
/rss_parser-1.1.0-py3-none-any.whl/rss_parser/models/channel.py
0.910471
0.359786
channel.py
pypi
import warnings from copy import deepcopy from json import loads from math import ceil, floor, trunc from operator import add, eq, floordiv, ge, gt, index, invert, le, lt, mod, mul, ne, neg, pos, pow, sub, truediv from typing import Generic, Optional, Type, TypeVar, Union from pydantic import create_model from pydanti...
/rss_parser-1.1.0-py3-none-any.whl/rss_parser/models/types/tag.py
0.895423
0.255193
tag.py
pypi
import sqlite3 import datetime from .verbosity import method_verbosity def adapt_date_iso(val): """Adapt datetime.date to ISO 8601 date.""" return val.isoformat() def convert_date(val): """Convert ISO 8601 date to datetime.date object.""" return datetime.date.fromisoformat(val) class DBHandler: ...
/rss-reader-bektur-4.1.3.tar.gz/rss-reader-bektur-4.1.3/rss_reader/cache.py
0.778902
0.181825
cache.py
pypi
# RSS Reader ## Description Command-line RSS reader utility implemented in Python ## Installation ### 1. Install from PyPI repository Run ```pip install rss-reader-sardor-irgashev``` ### 2. Clone from GitLab 1. Clone the repository 2. Install necessary requirements by running ```pip install -r requirements.txt``...
/rss-reader-sardor-irgashev-5.0.0.tar.gz/rss-reader-sardor-irgashev-5.0.0/README.md
0.568416
0.760917
README.md
pypi
import os import sqlite3 import sys from datetime import datetime from logging import getLogger from typing import List ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) logger = getLogger() class DatabaseManager: """Represents Database management""" def __init__(self, table_name: str, table_cols: List...
/rss-reader-sardor-irgashev-5.0.0.tar.gz/rss-reader-sardor-irgashev-5.0.0/db_manager/manager.py
0.690455
0.150778
manager.py
pypi
import os import sys from argparse import ArgumentParser, ArgumentTypeError, Namespace from datetime import datetime from logging import getLogger from _version import __version__ logger = getLogger() def positive_int(value: str) -> int: """Checks whether the provided argument is positive integer Args: ...
/rss-reader-sardor-irgashev-5.0.0.tar.gz/rss-reader-sardor-irgashev-5.0.0/argument_parser/arg_parser.py
0.648911
0.19853
arg_parser.py
pypi
Implemented Python RSS-reader using python 3.9. RSS reader is a command-line utility that receives RSS URL and prints results in a human-readable format. --- Quick start --- >>> rss_reader https://people.onliner.by/feed --limit 1 ---------------------------------- Start Program ------------------------...
/rss_readerCLI-5.0.1.tar.gz/rss_readerCLI-5.0.1/README.md
0.657868
0.876052
README.md
pypi
from pathlib import Path from fpdf import FPDF from cool_project.cervices.print_functions import info_print, error_print from project_settings import FILE_NAME_PDF class PDF(FPDF): """ Class that generates the PDF file """ def _get_item(self, news): """ the method that generates the...
/rss_readerCLI-5.0.1.tar.gz/rss_readerCLI-5.0.1/cool_project/conversion_to_format/conversion_to_pdf.py
0.516595
0.159152
conversion_to_pdf.py
pypi
from pathlib import Path from jinja2 import Environment, select_autoescape, FileSystemLoader from cool_project.cervices.print_functions import error_print, info_print from project_settings import FILE_NAME_HTML def make_dir(path): """ Creating a folder at the got path. If the folder already exists does ...
/rss_readerCLI-5.0.1.tar.gz/rss_readerCLI-5.0.1/cool_project/conversion_to_format/conversion_to_html.py
0.579162
0.359926
conversion_to_html.py
pypi
from requests import exceptions import shutil from math import ceil from cool_project.cervices.print_functions import ( info_print, warning_print, error_print ) def check_limit_type_value(func): """ Decorator which check type of limit value. """ def wrapper(*args, **kwargs): result = fun...
/rss_readerCLI-5.0.1.tar.gz/rss_readerCLI-5.0.1/cool_project/cervices/decorators.py
0.69285
0.21262
decorators.py
pypi
import json from colorama import init, Fore, Style, deinit from cool_project.cervices.decorators import decorator_delimiter def console_output_feed(news, colorize): """ Function which print news in console in standard format. :param colorize: the flag which shows that need paint output :param news:...
/rss_readerCLI-5.0.1.tar.gz/rss_readerCLI-5.0.1/cool_project/cervices/data_output.py
0.438304
0.259034
data_output.py
pypi
import re import urllib.parse import asyncio from torss.feed import Channel, Feed, Item from torss.utils import fetch_bs, expect async def fetch_urls(session): url = "https://www.economist.com/weeklyedition" soup = await fetch_bs(session, url) world_this_week = soup.find(re.compile(r"h\d"), string="The...
/rss_scrap-0.2.1-py3-none-any.whl/torss/feeds/economist.py
0.436142
0.297929
economist.py
pypi
# rssfixer <!-- CODE:BASH:START --> <!-- echo '[![GitHub Super-Linter](https://github.com/reuteras/rssfixer/actions/workflows/linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)' --> <!-- echo '![PyPI](https://img.shields.io/pypi/v/rssfixer?color=green)' --> <!-- echo '[![CodeQL](https://github...
/rssfixer-0.2.1.tar.gz/rssfixer-0.2.1/README.md
0.550849
0.691823
README.md
pypi
import asyncio as aio import traceback from abc import ABC, abstractmethod from typing import List, Tuple import codefast as cf import jieba from codefast.exception import get_exception_str from rss.base.bm25 import BM25 from rss.base.sif import sif_embeddings, top_k_similar_sentences, word2vec from rss.base.todb imp...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/base/pipeline.py
0.654011
0.153454
pipeline.py
pypi
import math from typing import Any, Dict, List, Optional, Set, Tuple, Union class BM25(object): """ Best Match 25. Parameters ---------- k1 : float, default 1.5 b : float, default 0.75 Attributes ---------- tf_ : list[dict[str, int]] Term Frequency per document. So [{'h...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/base/bm25.py
0.917709
0.528898
bm25.py
pypi
from typing import Any, List from rich import print import codefast as cf import jieba import numpy as np from gensim.models import Word2Vec def word2vec(texts:List[str])->Word2Vec: tokens_list = [jieba.lcut(_) for _ in texts] tokens_list = [list(filter(lambda x: len(x) > 1, _)) for _ in tokens_list] model...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/base/sif.py
0.897308
0.450359
sif.py
pypi
RSS_URLS = [ ('https://openai.com/blog/rss/', 'openai'), ('https://www.aitrends.com/feed/', 'aitrends'), ('https://venturebeat.com/category/ai/feed/', 'venturebeat'), ('https://www.wired.com/category/business/feed/', 'wired'), ('https://wanqu.co/feed/', '湾区日报'), ('https://feed.cnblogs.com/blog/u...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/data/__init__.py
0.479016
0.533701
__init__.py
pypi
""" 资源搬运工 """ from abc import ABC, abstractmethod from typing import Any, List import codefast as cf import feedparser from bs4 import BeautifulSoup from pydantic import BaseModel from rss.base.pipeline import Component, Pipeline from rss.core.tg import tcp from rss.data.db import db as rssdb from rss.utils import g...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/apps/mediaporter.py
0.487795
0.151655
mediaporter.py
pypi
""" rss feed """ import traceback from typing import List, Tuple import codefast as cf import feedparser from rss.base.anynews import Article from rss.base.pipeline import Component, Pipeline, PostToTelegram, FilterPosted, MarkPostedArticlesToDB, SaveToDB, FilterPostedBM25 from rss.core.tg import tcp from rss.data imp...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/apps/rsshub.py
0.491944
0.202759
rsshub.py
pypi
""" virmatch flash sale monitor """ import os import time from abc import ABC, abstractmethod from typing import List import codefast as cf import feedparser from codefast.patterns.pipeline import Component, Pipeline from pydantic import BaseModel from rss.auth import auth from rss.core.tg import tcp from rss.data.db...
/rsspy-0.2.5.tar.gz/rsspy-0.2.5/rss/apps/dropbox_monitor.py
0.698844
0.294291
dropbox_monitor.py
pypi
import string from dataclasses import dataclass, field from typing import Iterable, List import docutils.nodes as nodes from docutils.frontend import OptionParser from docutils.parsers.rst import Parser from docutils.utils import column_width, new_document from pygls.lsp.methods import ( COMPLETION, DOCUMENT_S...
/rst_language_server-0.4.0-py3-none-any.whl/rst_language_server/server.py
0.579519
0.238933
server.py
pypi
import logging from textwrap import indent from typing import IO, Any, Dict, Iterable, List, NamedTuple, Optional, Set from markdown_it.token import Token from mdformat.plugins import PARSER_EXTENSIONS from mdformat.renderer import LOGGER, MDRenderer, RenderContext, RenderTreeNode from mdformat.renderer._util import l...
/rst_to_myst-0.4.0-py3-none-any.whl/rst_to_myst/mdformat_render.py
0.668988
0.199795
mdformat_render.py
pypi
import re import os import operator import subprocess import io import functools try: import importlib.metadata as importlib_metadata # type: ignore except ImportError: import importlib_metadata # type: ignore import dateutil.parser class Repl: @classmethod def from_defn(cls, defn): "Retur...
/rst.linker-2.4.0-py3-none-any.whl/rst/linker.py
0.653901
0.210705
linker.py
pypi
import re import sys import argparse import math from io import StringIO import docutils.frontend import docutils.nodes import docutils.parsers.rst import docutils.transforms.references import docutils.utils import docutils.utils.roman import docutils.writers # XXX Hack: monkeypatch docutils to support gemini:// URI...
/rst2gemtext-0.3.1.tar.gz/rst2gemtext-0.3.1/rst2gemtext.py
0.621656
0.476214
rst2gemtext.py
pypi
# Author: Florian Brucker <mail@florianbrucker.de> # Copyright: This module has been placed in the public domain. """ Math handling for ``html5css3``. """ from __future__ import unicode_literals import codecs import os.path from docutils.utils.math.unichar2tex import uni2tex_table from docutils.utils.math import m...
/rst2html5-tools-0.5.3.tar.gz/rst2html5-tools-0.5.3/html5css3/math.py
0.697918
0.243384
math.py
pypi
The deck.core module provides all the basic functionality for creating and moving through a deck. It does so by applying classes to indicate the state of the deck and its slides, allowing CSS to take care of the visual representation of each state. It also provides methods for navigating the deck and inspecting its s...
/rst2html5-tools-0.5.3.tar.gz/rst2html5-tools-0.5.3/html5css3/thirdparty/deckjs/core/deck.core.js
0.50952
0.504944
deck.core.js
pypi
# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.png?branch=master)](https://travis-ci.org/hakimel/reveal.js) A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/). reveal.js comes with a broad range of features including [nes...
/rst2html5-tools-0.5.3.tar.gz/rst2html5-tools-0.5.3/html5css3/thirdparty/revealjs/README.md
0.468791
0.934155
README.md
pypi
import urllib import urllib.parse from docutils import frontend, nodes, writers # sys.stdout = codecs.getwriter('shift_jis')(sys.stdout) class Writer(writers.Writer): # Prevent the filtering of the Meta directive. supported = ['html'] settings_spec = ( 'rST-specific options', None, ...
/rst2jira-0.7.1-py3-none-any.whl/rst2confluence/confluence.py
0.418816
0.17245
confluence.py
pypi