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 datetime import date
# third party imports
import click
import pyfiglet
from scipy import stats
# RCPCH imports
from rcpchgrowth import date_calculations
from rcpchgrowth.global_functions import centile, measurement_from_sds, sds_for_measurement as sfm, mid_parental_height
@click.group()
def methods():
"""... | /rcpchgrowth_python_cli-1.2.0-py3-none-any.whl/rcpchgrowth_python_cli/__main__.py | 0.764804 | 0.219923 | __main__.py | pypi |
# Recycling Plant Simulator Package
[](https://pypi.org/project/rcplant/)
[](https://pepy.tech/project/rcplant)
## Quick start
The following code is an example of how to use this package:
```python
import random
from rc... | /rcplant-1.1.3.tar.gz/rcplant-1.1.3/README.md | 0.735167 | 0.959837 | README.md | pypi |
import json
from jsonpath_ng.ext.parser import parse
from airflow.providers.amazon.aws.sensors.sqs import SqsSensor
from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor
from rcplus_alloy_common.airflow.decorators import alloyize
@alloyize
class AlloySqsSensor(SqsSensor):
"""Alloy SqsSensor class with... | /rcplus_alloy_common-1.3.3.tar.gz/rcplus_alloy_common-1.3.3/src/rcplus_alloy_common/airflow/sensors.py | 0.649356 | 0.17245 | sensors.py | pypi |
from typing import List
from awz_client_api_test.models import Volume3D, Volume4D, Time, Polygon, LatLngPoint, Altitude, Circle, Radius
from common.geoutils import AzGeoUtils
from datetime import datetime, timedelta
import math
import numpy as np
from scipy.spatial import ConvexHull
from configparser import ConfigPar... | /rcs_common-0.2.5-py3-none-any.whl/common/volume_4D_Converter.py | 0.746231 | 0.294995 | volume_4D_Converter.py | pypi |
from typing import Dict, List, Optional, Union
from pydantic import BaseModel, Field, validator
from . import enums
class EmptyDict(BaseModel):
@classmethod
def __get_validators__(cls):
yield cls.validate
@classmethod
def validate(cls, v):
if not isinstance(v, dict):
rai... | /rcs_pydantic-1.0.0-py3-none-any.whl/rcs_pydantic/scheme.py | 0.890497 | 0.308398 | scheme.py | pypi |
from enum import Enum, IntEnum
class MessageServiceTypeEnum(Enum):
RCS: str = "rcs"
RCS_LEGACY: str = "rcs, legacy" # rcs ๋ถ๋ฌ์, xMS๋กfallback์ ์ก
class ServiceTypeEnum(Enum):
SMS: str = "RCSSMS"
LMS: str = "RCSLMS"
MMS: str = "RCSMMS"
TMPL: str = "RCSTMPL"
ITMPL: str = "RCSITMPL"
CHAT: ... | /rcs_pydantic-1.0.0-py3-none-any.whl/rcs_pydantic/enums.py | 0.520009 | 0.246007 | enums.py | pypi |
from __future__ import unicode_literals
from dateutil import parser
import json
import logging
import re
try:
from urlparse import urljoin # py2
except ImportError:
from urllib.parse import urljoin # py3
import requests
def parse_date(date, dayfirst=True):
"""Convert a date (string) with any date form... | /rcs_storage-0.1.2-py3-none-any.whl/rcs_storage/client.py | 0.560974 | 0.325494 | client.py | pypi |
__docformat__ = "google en"
__author__ = "Dennis Piehl"
__email__ = "dennis.piehl@rcsb.org"
__license__ = "Apache 2.0"
class Definitions(object):
def __init__(self):
self.contentTypeD = self.getContentTypeD()
self.fileFormatExtD = self.getFileFormatExtD()
self.milestoneList = self.getMiles... | /rcsb.app.file-1.0.tar.gz/rcsb.app.file-1.0/rcsb/app/file/Definitions.py | 0.44071 | 0.277354 | Definitions.py | pypi |
__docformat__ = "restructuredtext en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
import logging
from rcsb.db.utils.TimeUtil import TimeUtil
logger = logging.getLogger(__name__)
class DataExchangeStatus(object):
"""
Create status records for data exchange... | /rcsb.db-1.711.tar.gz/rcsb.db-1.711/rcsb/db/processors/DataExchangeStatus.py | 0.788949 | 0.16637 | DataExchangeStatus.py | pypi |
__docformat__ = "restructuredtext en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
import datetime
import logging
import dateutil.parser
import pytz
from dateutil.tz import tzlocal # pylint: disable=ungrouped-imports
logger = logging.getLogger(__name__)
class TimeU... | /rcsb.db-1.711.tar.gz/rcsb.db-1.711/rcsb/db/utils/TimeUtil.py | 0.805517 | 0.183594 | TimeUtil.py | pypi |
__docformat__ = "google en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
import logging
from rcsb.exdb.utils.ObjectExtractor import ObjectExtractor
logger = logging.getLogger(__name__)
class LigandNeighborMappingExtractor(object):
"""Utilities to extract ligand ... | /rcsb.exdb-0.98.tar.gz/rcsb.exdb-0.98/rcsb/exdb/seq/LigandNeighborMappingExtractor.py | 0.655997 | 0.164852 | LigandNeighborMappingExtractor.py | pypi |
class FailList(object):
def __init__(self):
self.__failList = [
"00T",
"00T",
"012",
"012",
"018",
"018",
"01A",
"01A",
"01K",
"01K",
"01P",
"01P",
"01T... | /rcsb.utils.chem-0.78.tar.gz/rcsb.utils.chem-0.78/rcsb/utils/chem/FailList.py | 0.450601 | 0.404743 | FailList.py | pypi |
import logging
import re
from collections import Counter
logger = logging.getLogger(__name__)
class MolecularFormula(object):
def __init__(self):
self.__regex = r"([A-Z][a-z]*)(\d*)"
self.__openGroup = "({["
self.__closeGroup = ")}]"
def __isBalanced(self, formula):
"""Check... | /rcsb.utils.chem-0.78.tar.gz/rcsb.utils.chem-0.78/rcsb/utils/chem/MolecularFormula.py | 0.758242 | 0.290874 | MolecularFormula.py | pypi |
__docformat__ = "google en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
import datetime
import logging
import dateutil.parser
import pytz
from dateutil.tz import tzlocal # pylint: disable=ungrouped-imports
logger = logging.getLogger(__name__)
class TimeUtil(object... | /rcsb.utils.io-1.45.tar.gz/rcsb.utils.io-1.45/rcsb/utils/io/TimeUtil.py | 0.779616 | 0.18462 | TimeUtil.py | pypi |
[](https://pypi.org/project/rcsbsearchapi/)
[](https://dev.azure.com/rcsb/RCSB%20PDB%20Python%20Projects/_build/latest?defi... | /rcsbsearchapi-1.3.0.tar.gz/rcsbsearchapi-1.3.0/README.md | 0.560734 | 0.946794 | README.md | pypi |
import datetime, os, warnings, json
import requests, urllib.parse
from typing import Callable, Union
from .exceptions import CTFNotStartedError, CTFConfigurationError
# TODO: pull the start_datetime from the API once we support that
'''
Determines the limit for a golf challenge based on a scoring function, whether ... | /rctf_golf-1.0.5-py3-none-any.whl/rctf/golf/util.py | 0.492432 | 0.448487 | util.py | pypi |
# Introduction
A library from RCTI+ to handle RabbitMQ tasks (connect, send, receive, etc) in Python.
# Requirements
- Python >=3.7.3
- Pika ==1.2.0
- Aio-pika ==6.8.0
- Requests >=2.25.1
# Installation
```bash
pip install rctiplus-rabbitmq-python-sdk
```
## Getting latest version
```
pip install rctiplus-rabbit... | /rctiplus-rabbitmq-python-sdk-1.2.1.tar.gz/rctiplus-rabbitmq-python-sdk-1.2.1/README.md | 0.884164 | 0.766971 | README.md | pypi |
import numpy as np
from .esn_cv import *
from .scr import *
__all__ = ['ClusteringBO']
class ClusteringBO(EchoStateNetworkCV):
"""Bayesian Optimization with an objective optimized for ESN Clustering (Maat & Gianniotis, 2017)
Parameters
----------
bounds : dict
A dictionary specifying the bo... | /RcTorch-0.7162-py3-none-any.whl/RcTorch/clustering.py | 0.921957 | 0.571767 | clustering.py | pypi |
import numpy as np
import scipy.stats
import scipy.linalg
import copy
import json
__all__ = ['EchoStateNetwork']
class EchoStateNetwork:
"""Class with all functionality to train Echo State Nets.
Builds and echo state network with the specified parameters.
In training, testing and predicting, x is a matr... | /RcTorch-0.7162-py3-none-any.whl/RcTorch/esn_orig.py | 0.876977 | 0.65588 | esn_orig.py | pypi |
from . import util
if not util.BUILDING_RTD:
from pocketsphinx import Pocketsphinx, get_model_path
import os
class HotwordRecognizer:
"""็ญ่ฏ๏ผๅค้่ฏ๏ผ่ฏๅซๅจ๏ผๅฏน |pocketsphinx| ็็ฎๅๅฐ่ฃ
๏ผ้ป่ฎค็็ญ่ฏๆฏ `'้ฟQ'` ๅ `'R-cute`ใ
ๅฆๆ่ฆ่ชๅฎไน็ญ่ฏ๏ผ่ฏทๅ่ https://blog.51cto.com/feature09/2300352
.. |pocketsphinx| raw:: html
<a href... | /rcute-ai-0.1.1.tar.gz/rcute-ai-0.1.1/rcute_ai/hotword_recognizer_pocketsphinx.py | 0.448185 | 0.190479 | hotword_recognizer_pocketsphinx.py | pypi |
from . import util
if not util.BUILDING_RTD:
import sys
sys.path.append(util.resource('snowboy'))
import snowboydetect
logger = util.logger
class HotwordRecognizer:
"""็ญ่ฏ๏ผๅค้่ฏ๏ผ่ฏๅซๅจ๏ผๅฏน |snowboy| ็็ฎๅๅฐ่ฃ
.. |snowboy| raw:: html
<a href='https://github.com/Kitt-AI/snowboy' target='blank'>snowbo... | /rcute-ai-0.1.1.tar.gz/rcute-ai-0.1.1/rcute_ai/hotword_recognizer_snowboy.py | 0.409103 | 0.469216 | hotword_recognizer_snowboy.py | pypi |
import json
from vosk import Model, KaldiRecognizer
from . import util
import sys
sys.path.append(util.restream('snowboy'))
import snowboydetect
logger = logging.getLogger(__name__)
class SpeechDetector:
@classmethod
def hotword_list(cl):
return util.hotword_list_snowboy()
@classmethod
def ... | /rcute-ai-0.1.1.tar.gz/rcute-ai-0.1.1/rcute_ai/_speech_detector_snowboy.py | 0.429669 | 0.165222 | _speech_detector_snowboy.py | pypi |
from . import util
import cv2
import numpy as np
class QRCodeRecognizer(cv2.QRCodeDetector):
"""ไบ็ปด็ ่ฏๅซ็ฑป
:param use_bgr: ่ฆ่ฏๅซ็ๅพ็ๆฏๅฆๆฏโBGRโ่ฒๅฝฉๆจกๅผ๏ผ้ป่ฎคๆฏ `True` ๏ผโBGRโๆฏopencv้ป่ฎค็ๆจกๅผ๏ผ่ฎพไธบ `False` ๅ่กจ็คบไฝฟ็จโRGBโๆจกๅผ
:type use_bgr: bool, optional
"""
def __init__(self, use_bgr=True):
self._use_bgr = use_bgr
... | /rcute-ai-0.1.1.tar.gz/rcute-ai-0.1.1/rcute_ai/qrcode_recognizer.py | 0.539954 | 0.459379 | qrcode_recognizer.py | pypi |
from . import util
import face_recognition
import cv2
import numpy as np
def resize_320x240(img):
h, w, c = img.shape
fx, fy = 320/w, 240/h
if fx <= fy <= 1:
return cv2.resize(img, (0,0), fx=fx, fy=fx), 1/fx
elif fy <= fx <=1:
return cv2.resize(img, (0,0), fx=fy, fy=fy), 1/fy
retur... | /rcute-ai-0.1.1.tar.gz/rcute-ai-0.1.1/rcute_ai/face_recognizer.py | 0.454714 | 0.359505 | face_recognizer.py | pypi |
import board
from adafruit_pca9685 import PCA9685
class ServoKit:
def __init__(self, *, channels, freq, i2c=None, address=0x40, reference_clock_speed=25000000):
if channels not in [8, 16]:
raise ValueError("servo_channels must be 8 or 16!")
self._items = [None] * channels
self._... | /rcute-cozmars-server-2.0.1.tar.gz/rcute-cozmars-server-2.0.1/rcute_cozmars_server/rcute_servokit.py | 0.87724 | 0.150621 | rcute_servokit.py | pypi |
import RPi.GPIO as GPIO
import time
import threading
class DistanceSensor:
def __init__(self, trigger, echo, max_distance, threshold_distance, inverval=.1, **kw):
GPIO.setmode(GPIO.BCM)
GPIO.setup(trigger, GPIO.OUT)
GPIO.setup(echo, GPIO.IN)
self.trigger = trigger
self.echo ... | /rcute-cozmars-server-2.0.1.tar.gz/rcute-cozmars-server-2.0.1/rcute_cozmars_server/distance_sensor.py | 0.578567 | 0.166743 | distance_sensor.py | pypi |
from . import util
from . import led
import numpy as np
import cv2
from PIL import Image, ImageFont, ImageDraw
class Screen(led.LED):
def __init__(self, robot):
led.LED.__init__(self, robot)
def _light_rpc(self):
return self._rpc.backlight
@property
def resolution(self):
""" ... | /rcute_cozmars-2.0.0-py3-none-any.whl/rcute_cozmars/screen.py | 0.863262 | 0.610337 | screen.py | pypi |
from . import util
class soundmixin:
def __init__(self, dtype, sample_rate, block_duration, gain):
self._dtype = dtype
self._sample_rate = sample_rate
self._block_duration = block_duration
self._dtype = dtype
self._gain = gain
@property
def sample_rate(self):
... | /rcute_cozmars-2.0.0-py3-none-any.whl/rcute_cozmars/sound_mixin.py | 0.898643 | 0.268678 | sound_mixin.py | pypi |
import asyncio
from . import util
class Head(util.Component):
"""head"""
def __init__(self, robot):
util.Component.__init__(self, robot)
self._relax_timeout = None
self.default_speed = 100
"""The default head rotation angular velocity (degrees/second), the default is `100`, if ... | /rcute_cozmars-2.0.0-py3-none-any.whl/rcute_cozmars/head.py | 0.880026 | 0.284992 | head.py | pypi |
import asyncio
from . import util
class Lift(util.Component):
"""Arm
"""
def __init__(self, robot):
util.Component.__init__(self, robot)
self._relax_timeout = None
self.default_speed = 2
"""The default lift moving speed, the default is 2/s, if set to `None`, it will move at... | /rcute_cozmars-2.0.0-py3-none-any.whl/rcute_cozmars/lift.py | 0.843186 | 0.249179 | lift.py | pypi |
from . import util
import numpy as np
import cv2
class CameraMultiplexOutputStream(util.MultiplexOutputStream):
def force_put_nowait(self, o):
if not isinstance(o, Exception):
o = cv2.flip(cv2.imdecode(np.frombuffer(o, dtype=np.uint8), cv2.IMREAD_COLOR), -1)
util.MultiplexOutputStream.f... | /rcute_cozmars-2.0.0-py3-none-any.whl/rcute_cozmars/camera.py | 0.816991 | 0.242038 | camera.py | pypi |
from typing import Tuple
import pandas as pd
import rcv_cruncher.util as util
from rcv_cruncher.marks import BallotMarks
class CastVoteRecord_tables:
"""Extra methods for CastVoteRecord class."""
def get_cvr_table(self, table_format: str = "rank", disaggregate: bool = True) -> pd.DataFrame:
"""Ret... | /rcv_cruncher-0.0.14.tar.gz/rcv_cruncher-0.0.14/src/rcv_cruncher/cvr/tables.py | 0.898292 | 0.462352 | tables.py | pypi |
[](https://github.com/edmundsj/rcwa/actions/workflows/build.yml) [](https://codecov.io/gh/edmundsj/rcwa) [:
"""The base exception class for all OpenAPIExceptions"""
class ApiTypeError(OpenApiException, TypeError):
def __init__(self, msg, path_to_item=None, valid_classes=None,
key_type=None):
""" Raises an exception for TypeErrors
Args:
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/exceptions.py | 0.766468 | 0.278324 | exceptions.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_get_dto.py | 0.542136 | 0.186576 | cyberscan_get_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/member_subscription_get_dto.py | 0.527317 | 0.180341 | member_subscription_get_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/order_get_dto_purchase_details.py | 0.54359 | 0.176175 | order_get_dto_purchase_details.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/order_get_dto_payment_details_price.py | 0.505371 | 0.200871 | order_get_dto_payment_details_price.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_response_dto.py | 0.516108 | 0.181916 | cyberscan_response_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cancel_subscription_response.py | 0.508788 | 0.201597 | cancel_subscription_response.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_hash_put_dto.py | 0.540681 | 0.208441 | cyberscan_hash_put_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/order_get_dto_payment_details.py | 0.54577 | 0.178329 | order_get_dto_payment_details.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/create_user_dto.py | 0.495361 | 0.19095 | create_user_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_summary_get_dto.py | 0.506836 | 0.202266 | cyberscan_summary_get_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyber_scan_exposures_get_dto.py | 0.564819 | 0.196575 | cyber_scan_exposures_get_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyber_scan_item_dto.py | 0.520496 | 0.183868 | cyber_scan_item_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_summary_get_dto_bank_account_inner.py | 0.504883 | 0.214013 | cyberscan_summary_get_dto_bank_account_inner.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyberscan_post_dto.py | 0.505127 | 0.184327 | cyberscan_post_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/create_user_response_dto.py | 0.513912 | 0.203252 | create_user_response_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/member_subscription_get_dto_service_status.py | 0.503662 | 0.184841 | member_subscription_get_dto_service_status.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/activate_post_dto.py | 0.524638 | 0.217857 | activate_post_dto.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyber_scan_exposures_get_dto_items_inner.py | 0.511717 | 0.157558 | cyber_scan_exposures_get_dto_items_inner.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/cyber_scan_exposures_get_dto_items_inner_source_details.py | 0.494141 | 0.166032 | cyber_scan_exposures_get_dto_items_inner_source_details.py | pypi |
import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | /rd-idx-client-1.0.3.tar.gz/rd-idx-client-1.0.3/openapi_client/model/order_post_dto.py | 0.542863 | 0.162513 | order_post_dto.py | pypi |
from pymarc import Field
class BaseMARC21Conversion(object):
def __init__(self):
pass
def __format245__(self, field245):
"""Method takes a 245 field from a MARC record and returns properly
formatted subfields. By not copying subfield 'h', performs the first
conversion PCC reco... | /rda_enhancement-0.0.3.tar.gz/rda_enhancement-0.0.3/rda_enhancement/base_converter.py | 0.791539 | 0.289108 | base_converter.py | pypi |
try:
import base_converter
except ImportError:
from . import base_converter
import pymarc
import re
RDA_CARRIER_TYPES = {
'c': { # 007 - Electronic Resource
'k': {
'term': 'computer card',
'code': 'ck'},
'b': {
'term': 'computer chip cartridge',
... | /rda_enhancement-0.0.3.tar.gz/rda_enhancement-0.0.3/rda_enhancement/pcc_conversion.py | 0.583203 | 0.228953 | pcc_conversion.py | pypi |
import numpy as np
import pandas as pd
import plotly.figure_factory as ff
import os
import rpy2.robjects as robjects
from CosinorPy import file_parser, cosinor, cosinor1
import random
import re
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
import statsmodels.stats.multitest as multi
... | /rda-package-0.0.4.tar.gz/rda-package-0.0.4/rda_package/rda.py | 0.629433 | 0.272242 | rda.py | pypi |
import os
import uuid
from datetime import datetime
from rdap.common.endpoints import RDAP_DNS
from rdap.services.rdap_client import RdapClient
from rdap.common.utils import (
load_file_data,
save_file_data,
string_to_datetime,
datetime_to_string,
form_hostname,
)
from rdap.common.constants import (... | /rdap-cli-1.1.2.tar.gz/rdap-cli-1.1.2/rdap/services/rdap.py | 0.598547 | 0.240284 | rdap.py | pypi |
import validators
from .exceptions import (
DomainWithSubdomain,
DomainValidationError,
DomainWithHttp,
)
from rdap.common.utils import (
get_suffix,
get_domain,
get_subdomain,
)
def _has_subdomain(domain:str) -> None:
"""In charge of validate if the domain contains a subdomain
Args:
... | /rdap-cli-1.1.2.tar.gz/rdap-cli-1.1.2/rdap/commands/gather/utils.py | 0.776369 | 0.393094 | utils.py | pypi |
import click
from tabulate import tabulate
from typing import Union
from rdap.common.utils import load_file_data, formater
from rdap.common.constants import MessageColors, AlertTagMessage
from rdap.settings import CACHE_FILE_PATH
def decorate(key: str, value: str) -> Union[dict, str]:
"""In charge of decorate the... | /rdap-cli-1.1.2.tar.gz/rdap-cli-1.1.2/rdap/commands/history/utils.py | 0.806815 | 0.412175 | utils.py | pypi |
import os
import click
import json
import dateutil.parser
import tldextract
from datetime import datetime
from rdap.settings import UNDEFINED_DATA
from rdap.common.exceptions import (
NotSupportedFileFormat,
)
from rdap.common.constants import (
TextFormatConstants,
MessageColors,
DomainAvailability,
... | /rdap-cli-1.1.2.tar.gz/rdap-cli-1.1.2/rdap/common/utils.py | 0.680135 | 0.397646 | utils.py | pypi |
from geographiclib.geodesic import Geodesic
from .smallestenclosingcircle import make_circle
from .polygoncoordinates import get_polygon_coordinates, get_polygons_coordinates
def get_polygon_attributes(shp, geodesic=True):
if geodesic:
area, perimeter, diameter = _get_geodesic_attributes(shp)
re... | /compactness/pypoly/polygonattributes.py | 0.820397 | 0.608187 | polygonattributes.py | pypi |
import struct
import io
import datetime
import re
from rdbtools.encodehelpers import STRING_ESCAPE_RAW, apply_escape_bytes, bval
from .compat import range, str2regexp
from .iowrapper import IOWrapper
try:
try:
from cStringIO import StringIO as BytesIO
except ImportError:
from StringIO import S... | /rdb-cli-0.2.0.tar.gz/rdb-cli-0.2.0/rdbtools/parser.py | 0.665737 | 0.205854 | parser.py | pypi |
[](https://docs.python.org/3.8/)
[](https://github.com/psf/black)
[:
return t.black(t.bold(v))
class Log(Transform):
"""Identity... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/util.py | 0.534127 | 0.305027 | util.py | pypi |
from rdc.etl.io import STDIN
from rdc.etl.transform import Transform
from rdc.etl.util import filter_html
def _apply_filter(value, hash, filter):
# method filter
if isinstance(filter, str):
return getattr(value, filter)()
# multi filter (gets the hash along with value
elif hasattr(filter, '... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/simple.py | 0.732018 | 0.289912 | simple.py | pypi |
import itertools
import types
from abc import ABCMeta, abstractmethod
from rdc.etl import H
from rdc.etl.error import AbstractError
from rdc.etl.hash import Hash
from rdc.etl.io import STDIN, STDOUT, STDERR, InputMultiplexer, OutputDemultiplexer, End
from rdc.etl.stat import Statisticable
from rdc.etl.util import Time... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/__init__.py | 0.709925 | 0.179567 | __init__.py | pypi |
from rdc.etl.error import AbstractError
from rdc.etl.io import STDIN
from rdc.etl.transform import Transform
class Extract(Transform):
"""Base class for extract transforms.
.. attribute:: extract
Generator, iterable or iterable-typed callable that is used as the data source. Often used as a shortcut... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/extract/__init__.py | 0.817538 | 0.399753 | __init__.py | pypi |
from sqlalchemy import MetaData, Table
from rdc.etl.io import STDIN, STDOUT, INSERT, UPDATE, SELECT
from rdc.etl.transform import Transform
from rdc.etl.util import now, cached_property
class DatabaseLoad(Transform):
"""
TODO doc this !!! test this !!!!
"""
engine = None
table_name = None
... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/load/database.py | 0.501221 | 0.256169 | database.py | pypi |
from rdc.etl.io import STDIN
from rdc.etl.transform.join import Join
class DatabaseJoin(Join):
"""
Operates a simple cartesian product between a hash and a row collection coming from a dynamic database query.
For now, you need to pass an sqlite engine to contructor, as the work on external services conn... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/join/database.py | 0.749546 | 0.562237 | database.py | pypi |
from rdc.etl.error import AbstractError
from rdc.etl.hash import Hash
from rdc.etl.io import STDIN
from rdc.etl.transform import Transform
class Join(Transform):
"""
Join some key => value pairs, that can depend on the source hash.
This element can change the stream length, either positively (joining >1... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/join/__init__.py | 0.858422 | 0.40698 | __init__.py | pypi |
from functools import partial
from rdc.etl.io import STDIN, STDIN2
from rdc.etl.transform import Transform
from rdc.etl.transform.flow import default_comparator, get_lower, insert_sorted, default_merger
class SortedJoin(Transform):
INPUT_CHANNELS = (STDIN, STDIN2, )
is_outer = False
def __init__(self, ke... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/flow/sortedjoin.py | 0.592667 | 0.159054 | sortedjoin.py | pypi |
from copy import copy
def default_comparator(a, b):
if a == b: return 0
if a < b: return -1
if a > b: return 1
def default_merger(a, b):
"""Create a copy of first argument and update with second argument's value."""
c = copy(a).update(b)
return c
def get_lower(comparator, a, b):
if compa... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/flow/__init__.py | 0.469763 | 0.39788 | __init__.py | pypi |
from __future__ import absolute_import
from copy import copy
from inspect import isgenerator
from rdc.etl.error import AbstractError
from rdc.etl.hash import Hash
from rdc.etl.transform.map import Map
from rdc.etl.util import etree
class XmlMap(Map):
"""
Reads a XML and yield values for each root children.
... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/transform/map/xml.py | 0.522933 | 0.267752 | xml.py | pypi |
import os
import datetime
import psutil
from repoze.lru import lru_cache
from rdc.etl.status import BaseStatus
from rdc.etl.util import terminal as t
@lru_cache(1, timeout=1)
def memory_usage():
process = psutil.Process(os.getpid())
return process.get_memory_info()[0] / float(2 ** 20)
@lru_cache(64, timeou... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/status/console.py | 0.457864 | 0.19063 | console.py | pypi |
import datetime
import time
import traceback
from threading import Thread
from rdc.etl import TICK
from rdc.etl.harness.base import BaseHarness
from rdc.etl.hash import Hash
from rdc.etl.io import InactiveReadableError, IO_TYPES, DEFAULT_INPUT_CHANNEL, DEFAULT_OUTPUT_CHANNEL, Begin, End
from rdc.etl.transform import T... | /rdc.etl-1.0.0a5.tar.gz/rdc.etl-1.0.0a5/src/rdc/etl/harness/threaded.py | 0.584153 | 0.175573 | threaded.py | pypi |
import pygame as pg
from rdconfigs.grids.type_aliases import RGB
def display(grid: list[list[RGB]], *,
square_width: int = 5, square_height: int = 5,
border: int = 0, title: str = 'Tiles',
border_color: RGB = (0, 0, 0)):
"""Display a grid of colors in a new window.
Argumen... | /ui/ui_tools.py | 0.777722 | 0.340732 | ui_tools.py | pypi |
import typer
import ast
from rddl_client.application.attest import store, get_and_attest_energy
from rddl_client.application.energy import get_energy_data
from rddl_client.application.attest import attest_cid, attest_machine, get_0x21e8_config
from rddl_client.application.seed import create_seed, recover_seed
from rdd... | /rddl_client-0.2.0.tar.gz/rddl_client-0.2.0/rddl_client/main.py | 0.60964 | 0.397032 | main.py | pypi |
import urllib3
import json
import ast
def get_geolocation_data(dns_name: str):
http = urllib3.PoolManager()
geolocation_data = http.request(
"GET",
"https://tools.keycdn.com/geo.json?host=" + dns_name,
headers={"User-Agent": "keycdn-tools:https://" + dns_name},
)
decoded_geo_da... | /rddl_client-0.2.0.tar.gz/rddl_client-0.2.0/rddl_client/application/machine_context.py | 0.423816 | 0.321939 | machine_context.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 ... | /rdel_distributions-1.1.tar.gz/rdel_distributions-1.1/rdel_distributions/Gaussiandistribution.py | 0.688364 | 0.853058 | Gaussiandistribution.py | pypi |
from typing import List, Optional
from rdflib import Literal, URIRef, XSD
import rdflib.plugins.sparql.processor
from rdf_cty_ccy.graph import graph_query
from rdf_cty_ccy.common import fn, monad
from rdf_cty_ccy.model import model
class Filter:
WithCurrency = 'withCurrency'
def by_country_code(code: str, fil... | /rdf_cty_ccy-0.1.7.tar.gz/rdf_cty_ccy-0.1.7/rdf_cty_ccy/query/query.py | 0.885675 | 0.3422 | query.py | pypi |
from pymonad.operators.either import Either
from typing import TypeVar, Callable, Union, Any, Generic
T = TypeVar('T')
class EitherMonad(Generic[T]):
pass
class MEither(Either):
def __or__(self, fns):
"""
Acts as a Monadic OR, determining the function to execute based on the Either.
... | /rdf_cty_ccy-0.1.7.tar.gz/rdf_cty_ccy-0.1.7/rdf_cty_ccy/common/monad.py | 0.896925 | 0.391086 | monad.py | pypi |
# handlers.py
# Date: 15/10/2020
# Author: Eugeniu Costetchi
# Email: costezki.eugen@gmail.com
""" """
import json
import logging.config
from pathlib import Path
from typing import Union, List, Dict
from eds4jinja2.builders.report_builder import ReportBuilder
try:
import importlib.resources as pkg_resources
... | /rdf_fingerprinter-0.2.12-py3-none-any.whl/fingerprint/service_layer/handlers.py | 0.795936 | 0.216384 | handlers.py | pypi |
from abc import ABC
from collections import defaultdict
from dataclasses import dataclass, field
from pathlib import Path
from typing import Dict, Iterator, List, Mapping, Optional, Tuple, Union
from curies import Converter
from prefixmaps.io.parser import load_multi_context
from pyoxigraph import BlankNode, Literal, ... | /rdf_sql_bulkloader-0.1.4.tar.gz/rdf_sql_bulkloader-0.1.4/src/rdf_sql_bulkloader/loaders/bulkloader.py | 0.763748 | 0.184951 | bulkloader.py | pypi |
import json
# funcoes auxiliares
from .trie import Trie
def create_trie(prefixes):
"""Creates a trie
Args:
prefixes (dict): prefixes to insert in trie
Returns:
The created trie
"""
t = Trie()
for key in prefixes:
t.insert(prefixes[key])
return t
def search_p... | /rdf-summarizer-0.0.2.tar.gz/rdf-summarizer-0.0.2/src/rdf_summarizer/prefixes.py | 0.681939 | 0.494995 | prefixes.py | pypi |
import hashlib
from rdfconv.utils import get_attribute
from rdfconv.html import format_literal
# Namespaces
TYPE = u'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
TITLE = u'http://purl.org/dc/terms/title'
FOAF_NAME = u'http://xmlns.com/foaf/0.1/name'
LABEL = u'http://www.w3.org/2000/01/rdf-schema#label'
VCARD_NAME ... | /rdf-to-html-1.1.0.tar.gz/rdf-to-html-1.1.0/rdfconv/objects.py | 0.534127 | 0.201263 | objects.py | pypi |
import os
import logging
import shutil
from collections import OrderedDict
import rdflib
from rdflib.term import Literal
from rdfconv.utils import get_file
from rdfconv.html import HtmlConverter
from rdfconv.objects import RdfObject
if not logging:
# rdflib requires a logger to be setup
logging.basicConfig()... | /rdf-to-html-1.1.0.tar.gz/rdf-to-html-1.1.0/rdfconv/converter.py | 0.683736 | 0.216012 | converter.py | pypi |
import argparse
import os
import tempfile
import requests
import ckanapi
from rdfconv.converter import RDFtoHTMLConverter
class RDFLoader(object):
"""
Class able to convert a single nodes in an RDF file to
a simpler representation.
Args:
filename: filename of the RDF file
"""
def... | /rdf-to-html-1.1.0.tar.gz/rdf-to-html-1.1.0/ckan_uploader/uploader.py | 0.729616 | 0.342599 | uploader.py | pypi |
from rdf.term import BNode
from rdf.term import Literal
from rdf.term import URIRef
from rdf.term import RDF
from rdf.term import RDFS
from rdf.serializer import Serializer
class RecursiveSerializer(Serializer):
topClasses = [RDFS["Class"]]
predicateOrder = [RDF["type"], RDFS["label"]]
maxDepth = 10
... | /rdf.plugins.serializers.n3-0.9a1.tar.gz/rdf.plugins.serializers.n3-0.9a1/n3/recursive.py | 0.747708 | 0.255701 | recursive.py | pypi |
__version__ = "0.9a1"
ANY = None
from rdf.store import Store
class Memory(Store):
"""\
An in memory implementation of a triple store.
This triple store uses nested dictionaries to store triples. Each
triple is stored in two such indices as follows spo[s][p][o] = 1 and
pos[p][o][s] = 1.
"""
def __init__... | /rdf.plugins.stores.memory-0.9a1.tar.gz/rdf.plugins.stores.memory-0.9a1/memory.py | 0.455199 | 0.332879 | memory.py | pypi |
# rdfdf

[](https://badge.fury.io/py/rdfdf)
rdfdf - Functionality for rule-based `pandas.DataFrame` - `rdflib.Graph` conversion.
For representation of tabular data in RDF see Allemang, Hendler:... | /rdfdf-0.1.6.tar.gz/rdfdf-0.1.6/README.md | 0.562177 | 0.937211 | README.md | pypi |
# rdfhash: RDF Graph Compression Tool
`rdfhash` is a utility for RDF graph compression that works by hashing RDF subjects based on a checksum of their triples, effectively minimizing the size of RDF graphs by consolidating subjects that have identical definitions.
## Installation
You can install `rdfhash` using `pip... | /rdfhash-0.4.6.tar.gz/rdfhash-0.4.6/README.md | 0.709824 | 0.902567 | README.md | pypi |
from __future__ import annotations
import contextlib
import dataclasses
import hashlib
import io
import os
import sys
from collections import defaultdict
from collections.abc import Iterable
from pathlib import Path
import click
from tqdm import tqdm
PROGRESS_SIZE = 128 * 1024 * 1024 # 512M
CHUNK_SIZE = 16 * 1024 ... | /rdfind2-0.0.9.tar.gz/rdfind2-0.0.9/rdfind2.py | 0.51562 | 0.150871 | rdfind2.py | pypi |
from django.db import models
from django.utils.translation import ugettext as _
from django_extensions.db.fields import UUIDField
from rdflib_django import fields
class NamedGraph(models.Model):
"""
Models a context which represents a named graph.
"""
identifier = fields.URIField(verbose_name=_("Iden... | /rdflib-django-0.3.tar.gz/rdflib-django-0.3/src/rdflib_django/models.py | 0.830525 | 0.18769 | models.py | pypi |
from django.db import models
from rdflib.graph import Graph
from rdflib.term import BNode, URIRef, Literal
class LiteralField(models.TextField):
"""
Custom field for storing literals.
"""
__metaclass__ = models.SubfieldBase
description = "Field for storing Literals, including their type and langu... | /rdflib-django-0.3.tar.gz/rdflib-django-0.3/src/rdflib_django/fields.py | 0.752377 | 0.284598 | fields.py | pypi |
import uuid
from django.db import models
from django.utils.translation import gettext_lazy as _
from . import fields
class Store(models.Model):
"""
Models a store of a named graph.
"""
identifier = models.CharField(
verbose_name=_("Identifier"), unique=True, max_length=255,
db_index=T... | /rdflib_django3-0.3.3-py3-none-any.whl/rdflib_django/models.py | 0.753739 | 0.160266 | models.py | pypi |
from rdflib.graph import Graph
from rdflib.term import BNode, Literal, URIRef
from django.db import models
class LiteralField(models.TextField):
"""
Custom field for storing literals.
"""
description = "Field for storing Literals, including their type and language" # noqa: 501
def from_db_valu... | /rdflib_django3-0.3.3-py3-none-any.whl/rdflib_django/fields.py | 0.75274 | 0.32705 | fields.py | pypi |
<div align="center">
# ๐ซ SPARQL endpoint for RDFLib
[](https://pypi.org/project/rdflib-endpoint/)
[
def cli() -> None:
"""Quickly serve RDF files as SPARQL endpoint with RDFLib Endpoint"""
@cli.command(help="Serve a local RDF file as a SPARQ... | /rdflib_endpoint-0.4.0.tar.gz/rdflib_endpoint-0.4.0/src/rdflib_endpoint/__main__.py | 0.407098 | 0.207897 | __main__.py | pypi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.