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
import torch import torch.nn as nn import torch.nn.functional as F from .metrics import bbox_iou from .tal import bbox2dist class VarifocalLoss(nn.Module): # Varifocal loss by Zhang et al. https://arxiv.org/abs/2008.13367 def __init__(self): super().__init__() def forward(self, pred_score, gt_s...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/yolo/utils/loss.py
0.945343
0.390243
loss.py
pypi
from copy import deepcopy import numpy as np import torch from ultralytics.yolo.utils import LOGGER, colorstr from ultralytics.yolo.utils.torch_utils import profile def check_train_batch_size(model, imgsz=640, amp=True): # Check YOLOv5 training batch size with torch.cuda.amp.autocast(amp): return au...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/yolo/utils/autobatch.py
0.815747
0.379091
autobatch.py
pypi
# Trainer callbacks ---------------------------------------------------------------------------------------------------- def on_pretrain_routine_start(trainer): pass def on_pretrain_routine_end(trainer): pass def on_train_start(trainer): pass def on_train_epoch_start(trainer): pass def on_train_...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/yolo/utils/callbacks/base.py
0.539226
0.291214
base.py
pypi
import os import platform import shutil import sys import threading import time from pathlib import Path from random import random import requests from tqdm import tqdm from ultralytics.yolo.utils import (DEFAULT_CFG_DICT, ENVIRONMENT, LOGGER, ONLINE, RANK, SETTINGS, TESTS_RUNNING, ...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/hub/utils.py
0.593138
0.176193
utils.py
pypi
import requests from ultralytics.hub.auth import Auth from ultralytics.hub.session import HUBTrainingSession from ultralytics.hub.utils import PREFIX, split_key from ultralytics.yolo.engine.exporter import EXPORT_FORMATS_LIST from ultralytics.yolo.engine.model import YOLO from ultralytics.yolo.utils import LOGGER, em...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/hub/__init__.py
0.583915
0.17172
__init__.py
pypi
import copy import cv2 import matplotlib.pyplot as plt import numpy as np from ultralytics.yolo.utils import LOGGER class GMC: def __init__(self, method='sparseOptFlow', downscale=2, verbose=None): super().__init__() self.method = method self.downscale = max(1, int(downscale)) ...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/tracker/utils/gmc.py
0.573917
0.288864
gmc.py
pypi
import numpy as np import scipy.linalg # Table for the 0.95 quantile of the chi-square distribution with N degrees of freedom (contains values for N=1, ..., 9) # Taken from MATLAB/Octave's chi2inv function and used as Mahalanobis gating threshold. chi2inv95 = {1: 3.8415, 2: 5.9915, 3: 7.8147, 4: 9.4877, 5: 11.070, 6:...
/roar_yolo-9.0.0-py3-none-any.whl/ultralytics/tracker/utils/kalman_filter.py
0.952408
0.835685
kalman_filter.py
pypi
Roaring Bitmap in Cython ======================== A roaring bitmap is an efficient compressed datastructure to store a set of integers. A Roaring bitmap stores a set of 32-bit integers in a series of arrays and bitmaps, whichever takes the least space (which is always ``2 ** 16`` bits or less). This datastructure is ...
/roaringbitmap-0.7.2.tar.gz/roaringbitmap-0.7.2/README.rst
0.890312
0.81772
README.rst
pypi
import socket import os import re import sys import logging import atexit from typing import Optional, List from roast.xexpect import Xexpect from roast.utils import get_base_name, get_original_path, is_file log = logging.getLogger(__name__) class Xsdb(Xexpect): def __init__( self, config, ...
/roast-xilinx-5.0.0.tar.gz/roast-xilinx-5.0.0/roast/component/xsdb/xsdb.py
0.576065
0.18665
xsdb.py
pypi
import re from math import ceil class SerialFlash: # TODO # Make use of flash pattern and get all attributes dynamically from flash FLASH_PATTERN = re.compile( r"SF: Detected (.*?) with page size (.*?), erase \ size (.*?), total (.*?)$" ) # 512 Kb max erase size in general flashes...
/roast-xilinx-5.0.0.tar.gz/roast-xilinx-5.0.0/roast/uboot/flashsubsystems.py
0.533397
0.503418
flashsubsystems.py
pypi
from roast.providers.randomizer import Randomizer from roast.utils import read_json from box import Box class BifProvider(Randomizer): """Class that contains bif file randomizer.""" def __init__(self, randomize=True, *args, **kwargs) -> None: """Initialize attributes lazily. :param args: Ar...
/roast-xilinx-5.0.0.tar.gz/roast-xilinx-5.0.0/roast/providers/bif.py
0.782579
0.251616
bif.py
pypi
<h3>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License</h3> <p>By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public Licen...
/roastedbyai-1.1.0.tar.gz/roastedbyai-1.1.0/LICENSE.md
0.777258
0.794744
LICENSE.md
pypi
import geojson import geomet.wkt as wkt import geomet.wkb as wkb import roax.schema as s class _Object(s.type): """Base class for all GeoJSON objects.""" def __init__( self, *, python_type, content_type="application/json", props={}, required=set(), add...
/roax_geo-2.0a1-py3-none-any.whl/roax/geo.py
0.892715
0.228372
geo.py
pypi
from flowserv.model.parameter.numeric import NUMERIC_TYPES class ResultTable(object): """Result table for database queries. Maintains a list or result rows. Provides functionality to format rows for printing. """ def __init__(self, headline, types): """Initialize the list of column names and t...
/rob_client-0.2.0-py3-none-any.whl/robclient/table.py
0.87397
0.619068
table.py
pypi
from flask import Blueprint, jsonify, make_response, request, send_file from flowserv.error import UnknownParameterError from robflask.api.util import ACCESS_TOKEN, jsonbody import flowserv.util as util import flowserv.view.run as labels import robflask.config as config import robflask.error as err bp = Blueprint('...
/rob-flask-0.6.0.tar.gz/rob-flask-0.6.0/robflask/api/run.py
0.7181
0.30603
run.py
pypi
from flask import Blueprint, jsonify, make_response, request, send_file from werkzeug.utils import secure_filename from flowserv.model.files.base import FlaskFile from robflask.api.util import ACCESS_TOKEN import robflask.config as config import robflask.error as err bp = Blueprint('uploads', __name__, url_prefix=c...
/rob-flask-0.6.0.tar.gz/rob-flask-0.6.0/robflask/api/files.py
0.506836
0.227405
files.py
pypi
from flask import Blueprint, jsonify, make_response, request, send_file from flowserv.model.template.schema import SortColumn from robflask.api.util import ACCESS_TOKEN import robflask.config as config bp = Blueprint('workflows', __name__, url_prefix=config.API_PATH()) @bp.route('/workflows', methods=['GET']) def...
/rob-flask-0.6.0.tar.gz/rob-flask-0.6.0/robflask/api/benchmark.py
0.615781
0.179207
benchmark.py
pypi
from flask import Blueprint, jsonify, make_response, request from robflask.api.util import ACCESS_TOKEN, jsonbody import flowserv.view.user as labels import robflask.config as config bp = Blueprint('users', __name__, url_prefix=config.API_PATH()) @bp.route('/users', methods=['GET']) def list_users(): """Get l...
/rob-flask-0.6.0.tar.gz/rob-flask-0.6.0/robflask/api/user.py
0.69285
0.267447
user.py
pypi
from flask import Blueprint, jsonify, make_response, request from flowserv.error import UnknownUserError from robflask.api.util import ACCESS_TOKEN, jsonbody import flowserv.view.group as labels import robflask.config as config import robflask.error as err bp = Blueprint('submissions', __name__, url_prefix=config....
/rob-flask-0.6.0.tar.gz/rob-flask-0.6.0/robflask/api/submission.py
0.614047
0.264287
submission.py
pypi
[![Build Status](https://secure.travis-ci.org/taoenator/robber.py.png)](http://travis-ci.org/taoenator/robber.py) [![Coverage Status](https://coveralls.io/repos/github/taoenator/robber.py/badge.svg?branch=master)](https://coveralls.io/github/taoenator/robber.py?branch=master) [![Code Climate](https://codeclimate.com/gi...
/robber-1.1.4.tar.gz/robber-1.1.4/README.md
0.83752
0.982288
README.md
pypi
# **ROBEL**: **Ro**botics **Be**nchmarks for **L**earning ROBEL is an open-source platform of cost-effective robots and associated reinforcement learning environments for benchmarking reinforcement learning in the real world. It provides Gym-compliant environments that easily run in both simulation (for rapid prototyp...
/robel-0.1.2.tar.gz/robel-0.1.2/README.md
0.760651
0.964355
README.md
pypi
.. image:: https://travis-ci.com/theochem/roberto.svg?branch=master :target: https://travis-ci.com/theochem/roberto .. image:: https://anaconda.org/theochem/roberto/badges/version.svg :target: https://anaconda.org/theochem/roberto .. image:: https://codecov.io/gh/theochem/roberto/branch/master/graph/badge.svg ...
/roberto-2.0.4.tar.gz/roberto-2.0.4/README.rst
0.650467
0.70557
README.rst
pypi
import os import sys from typing import List, Tuple import cmocean import matplotlib as mpl import matplotlib.font_manager as fm import matplotlib.pyplot as plt import numpy as np from matplotlib.gridspec import GridSpec from matplotlib.colors import LogNorm, Normalize from mpl_toolkits.axes_grid1 import make_axes_lo...
/robertsons-rules-0.1.2.tar.gz/robertsons-rules-0.1.2/robertsons_rules/plotting.py
0.797241
0.421522
plotting.py
pypi
from datetime import datetime, timedelta from typing import Dict, List from robot.reservations import AlreadyCheckedInError, Reservation class Robin: def __init__(self, users_info: List): self.users_info = users_info def daterange(self, start_date, end_date): for n in range(int((end_date - s...
/robin-powered-bot-0.0.6.tar.gz/robin-powered-bot-0.0.6/robot/robin.py
0.524151
0.161221
robin.py
pypi
import robin_stocks.helper as helper import robin_stocks.urls as urls import robin_stocks.stocks as stocks def get_top_movers_sp500(direction, info=None): """Returns a list of the top S&P500 movers up or down for the day. :param direction: The direction of movement either 'up' or 'down' :type direction: s...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/markets.py
0.848706
0.459925
markets.py
pypi
from robin_stocks.helper import id_for_chain, id_for_stock # Login def login_url(): return('https://api.robinhood.com/oauth2/token/') def challenge_url(challenge_id): return('https://api.robinhood.com/challenge/{0}/respond/'.format(challenge_id)) # Profiles def account_profile(): return('https://api...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/urls.py
0.528533
0.200245
urls.py
pypi
from functools import wraps import requests from robin_stocks.globals import LOGGED_IN, SESSION, OUTPUT def set_login_state(logged_in): """Sets the login state""" global LOGGED_IN LOGGED_IN = logged_in def set_output(output): """Sets the global output stream""" global OUTPUT OUTPUT = output ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/helper.py
0.740456
0.343727
helper.py
pypi
import robin_stocks.helper as helper import robin_stocks.urls as urls @helper.login_required def load_crypto_profile(info=None): """Gets the information associated with the crypto account. :param info: The name of the key whose value is to be returned from the function. :type info: Optional[str] :retu...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/crypto.py
0.850531
0.53868
crypto.py
pypi
import robin_stocks.helper as helper import robin_stocks.urls as urls def get_quotes(inputSymbols, info=None): """Takes any number of stock tickers and returns information pertaining to its price. :param inputSymbols: May be a single stock ticker or a list of stock tickers. :type inputSymbols: str or list...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/stocks.py
0.853806
0.410402
stocks.py
pypi
import getpass import os import pickle import random import robin_stocks.helper as helper import robin_stocks.urls as urls def generate_device_token(): """This function will generate a token used when loggin on. :returns: A string representing the token. """ rands = [] for i in range(0, 16): ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/authentication.py
0.63273
0.161651
authentication.py
pypi
from uuid import uuid4 import robin_stocks.crypto as crypto import robin_stocks.helper as helper import robin_stocks.profiles as profiles import robin_stocks.stocks as stocks import robin_stocks.urls as urls @helper.login_required def get_all_stock_orders(info=None): """Returns a list of all the orders that have ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/orders.py
0.767211
0.443058
orders.py
pypi
import robin_stocks.helper as helper import robin_stocks.urls as urls @helper.login_required def load_account_profile(info=None): """Gets the information associated with the accounts profile,including day trading information and cash being held by Robinhood. :param info: The name of the key whose value i...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/profiles.py
0.813164
0.324904
profiles.py
pypi
import sys import robin_stocks.helper as helper import robin_stocks.urls as urls def spinning_cursor(): """ This is a generator function to yield a character. """ while True: for cursor in '|/-\\': yield cursor spinner = spinning_cursor() def write_spinner(): """ Function to create a ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/options.py
0.708818
0.378947
options.py
pypi
from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * from robin_stocks.robinhood.stocks import * def get_top_movers_sp500(direction, info=None): """Returns a list of the top S&P500 movers up or down for the day. :param direction: The direction of movement either 'up' or 'down'...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/markets.py
0.897443
0.335569
markets.py
pypi
from robin_stocks.robinhood.helper import id_for_chain, id_for_stock # Login def login_url(): return('https://api.robinhood.com/oauth2/token/') def challenge_url(challenge_id): return('https://api.robinhood.com/challenge/{0}/respond/'.format(challenge_id)) # Profiles def account_profile_url(account_numb...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/urls.py
0.455925
0.168788
urls.py
pypi
from functools import wraps import requests from robin_stocks.robinhood.globals import LOGGED_IN, OUTPUT, SESSION def set_login_state(logged_in): """Sets the login state""" global LOGGED_IN LOGGED_IN = logged_in def set_output(output): """Sets the global output stream""" global OUTPUT OUTPUT...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/helper.py
0.732783
0.342737
helper.py
pypi
from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * @login_required def load_crypto_profile(info=None): """Gets the information associated with the crypto account. :param info: The name of the key whose value is to be returned from the function. :type info: Optional[str] ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/crypto.py
0.861974
0.432603
crypto.py
pypi
from functools import lru_cache as cache from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * def get_quotes(inputSymbols, info=None): """Takes any number of stock tickers and returns information pertaining to its price. :param inputSymbols: May be a single stock ticker or a ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/stocks.py
0.881449
0.381306
stocks.py
pypi
import getpass import os import pickle import random from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * def generate_device_token(): """This function will generate a token used when loggin on. :returns: A string representing the token. """ rands = [] for i in r...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/authentication.py
0.607314
0.165661
authentication.py
pypi
from uuid import uuid4 from robin_stocks.robinhood.crypto import * from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.profiles import * from robin_stocks.robinhood.stocks import * from robin_stocks.robinhood.urls import * @login_required def get_all_stock_orders(info=None): """Returns a list ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/orders.py
0.766905
0.30582
orders.py
pypi
from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * @login_required def load_account_profile(account_number=None, info=None): """Gets the information associated with the accounts profile,including day trading information and cash being held by Robinhood. :param acccount_...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/profiles.py
0.851212
0.245209
profiles.py
pypi
import sys from robin_stocks.robinhood.helper import * from robin_stocks.robinhood.urls import * def spinning_cursor(): """ This is a generator function to yield a character. """ while True: for cursor in '|/-\\': yield cursor spinner = spinning_cursor() def write_spinner(): """ Funct...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/robinhood/options.py
0.660282
0.416085
options.py
pypi
from robin_stocks.tda.helper import format_inputs, login_required, request_get from robin_stocks.tda.urls import URLS @login_required @format_inputs def get_hours_for_markets(markets, date, jsonify=None): """ Gets market hours for various markets. :param markets: The markets for which you're requesting marke...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/tda/markets.py
0.883638
0.457743
markets.py
pypi
from robin_stocks.tda.helper import format_inputs, login_required, request_get from robin_stocks.tda.urls import URLS @login_required @format_inputs def get_accounts(options=None, jsonify=None): """ Gets all accounts associated with your API keys. :param options: Balances displayed by default, additional fie...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/tda/accounts.py
0.902856
0.325494
accounts.py
pypi
from robin_stocks.tda.helper import format_inputs, login_required, request_get from robin_stocks.tda.urls import URLS @login_required @format_inputs def get_quote(ticker, jsonify=None): """ Gets quote information for a single stock. :param ticker: The ticker of the stock. :type ticker: str :param jso...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/tda/stocks.py
0.888105
0.628379
stocks.py
pypi
from robin_stocks.tda.helper import (format_inputs, login_required, request_delete, request_get, request_headers) from robin_stocks.tda.urls import URLS @login_required @format_inputs def place_order(account_id, order_payload, jsonify=None): ...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/tda/orders.py
0.841988
0.377684
orders.py
pypi
from robin_stocks.gemini.authentication import generate_signature from robin_stocks.gemini.helper import (format_inputs, login_required, request_get, request_post) from robin_stocks.gemini.urls import URLS @format_inputs def get_pubticker(ticker, jsonify=None): """ Gets the...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/gemini/crypto.py
0.880463
0.389082
crypto.py
pypi
from robin_stocks.gemini.authentication import generate_signature from robin_stocks.gemini.helper import (format_inputs, login_required, request_post) from robin_stocks.gemini.urls import URLS @login_required @format_inputs def get_account_detail(jsonify=None): """ Gets inf...
/robin_stocks-3.0.6-py3-none-any.whl/robin_stocks/gemini/account.py
0.889421
0.410106
account.py
pypi
from bip32keys.bip32keys import Bip32Keys, decode_hex, encode_hex import base58check from hashlib import sha256 class Bip32NetworkKeys(Bip32Keys): private_key_magic_bytes = {'mainnet': '80', 'testnet': 'ef'} def __init__(self, init_params, mainnet=True): if 'wif' in init_params: self.wif...
/robin8_utils-0.4.26.tar.gz/robin8_utils-0.4.26/bip32keys/bip32NetworkKeys.py
0.601828
0.154249
bip32NetworkKeys.py
pypi
import codecs from hashlib import sha256 from ecdsa import SigningKey, VerifyingKey, ellipticcurve from ecdsa.ellipticcurve import Point, CurveFp import ecdsa from bip32utils import BIP32Key import logging decode_hex = codecs.getdecoder("hex_codec") encode_hex = codecs.getencoder("hex_codec") class Bip32Keys: ...
/robin8_utils-0.4.26.tar.gz/robin8_utils-0.4.26/bip32keys/bip32keys.py
0.683525
0.208985
bip32keys.py
pypi
from bip32keys.bip32NetworkKeys import Bip32NetworkKeys, encode_hex, decode_hex from hashlib import sha256 import hashlib import base58check class Bip32Addresses(Bip32NetworkKeys): def __init__(self, init_params, magic_byte, mainnet=True): super().__init__(init_params, mainnet) self.hex_address =...
/robin8_utils-0.4.26.tar.gz/robin8_utils-0.4.26/bip32keys/bip32addresses.py
0.771542
0.278428
bip32addresses.py
pypi
from motor.motor_tornado import MotorClient class Table(object): """Custom driver for writing data to mongodb By default database name is 'profile_management_system', collection name is 'history' """ def __init__(self, dbname, collection): # Set database parameters self.client = ...
/robin8_utils-0.4.26.tar.gz/robin8_utils-0.4.26/tornado_components/mongo.py
0.667798
0.232539
mongo.py
pypi
import abc from kafka import ConsumerRebalanceListener as BaseConsumerRebalanceListener class ConsumerRebalanceListener(BaseConsumerRebalanceListener): """ A callback interface that the user can implement to trigger custom actions when the set of partitions assigned to the consumer changes. This is a...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/abc.py
0.750644
0.45944
abc.py
pypi
import asyncio import logging import re import sys import traceback import warnings from kafka.coordinator.assignors.roundrobin import ( RoundRobinPartitionAssignor, ) from aiokafka.abc import ConsumerRebalanceListener from aiokafka.client import AIOKafkaClient from aiokafka.errors import ( TopicAuthorization...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/consumer/consumer.py
0.609175
0.262162
consumer.py
pypi
from ._crc32c import crc as crc32c_py from aiokafka.util import NO_EXTENSIONS def encode_varint_py(value, write): """ Encode an integer to a varint presentation. See https://developers.google.com/protocol-buffers/docs/encoding?csw=1#varints on how those can be produced. Arguments: val...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/record/util.py
0.669745
0.375821
util.py
pypi
import struct from aiokafka.errors import CorruptRecordException from aiokafka.util import NO_EXTENSIONS from .legacy_records import LegacyRecordBatch from .default_records import DefaultRecordBatch class _MemoryRecordsPy: LENGTH_OFFSET = struct.calcsize(">q") LOG_OVERHEAD = struct.calcsize(">qi") MAGI...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/record/memory_records.py
0.554712
0.168139
memory_records.py
pypi
import struct import time from binascii import crc32 from aiokafka.errors import CorruptRecordException from aiokafka.util import NO_EXTENSIONS from kafka.codec import ( gzip_encode, snappy_encode, lz4_encode, lz4_encode_old_kafka, gzip_decode, snappy_decode, lz4_decode, lz4_decode_old_kafka ) NoneType = ty...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/record/legacy_records.py
0.589716
0.234889
legacy_records.py
pypi
from enum import Enum from collections import namedtuple, defaultdict, deque from aiokafka.structs import TopicPartition from aiokafka.util import create_future PidAndEpoch = namedtuple("PidAndEpoch", ["pid", "epoch"]) NO_PRODUCER_ID = -1 NO_PRODUCER_EPOCH = -1 class SubscriptionType(Enum): NONE = 1 AUTO_...
/robinhood_aiokafka-1.1.6-cp37-cp37m-macosx_10_9_x86_64.whl/aiokafka/producer/transaction_manager.py
0.757974
0.206374
transaction_manager.py
pypi
from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils import convert_floats EXAMPLE: Dict[str, Any] = { "url": "https://api.robinhood.com/portfolios/5P...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/portfolio.py
0.847148
0.301336
portfolio.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List from robinhood_commons.entity.option_type import OptionType from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils ...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/aggregate_position.py
0.533154
0.342242
aggregate_position.py
pypi
from copy import deepcopy from dataclasses import dataclass from typing import Any, Dict, Union from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils import convert_floats EXAMPLE: Dict[str, Union[str, int]] = dict( open="6.310000", high="6.785000", low="6.19200...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/fundamentals.py
0.885061
0.506164
fundamentals.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List, Optional from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils import convert_floats EXAMPLE: List[Dict[str, Any...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/earnings.py
0.852107
0.38122
earnings.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from enum import Enum, auto from typing import Any, Dict, List from robinhood_commons.entity.printable import Printable from robinhood_commons.util.date_utils import convert_dates EXAMPLE: Dic...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/ratings.py
0.836354
0.516291
ratings.py
pypi
from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, Optional from robinhood_commons.entity.option_type import OptionType from robinhood_commons.entity.state import State from robinhood_commons.entity.tick import Tick, clean_tick from robinhood_commons...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/option.py
0.831451
0.331066
option.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from enum import Enum, auto from typing import Any, Dict, List from robinhood_commons.entity.price import Price, clean_price from robinhood_commons.entity.printable import Printable from robinh...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/offer.py
0.826537
0.461077
offer.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List from robinhood_commons.entity.tick import Tick, clean_tick from robinhood_commons.util.date_utils import date_parse from robinhood_commons.util.num_utils impo...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/chain.py
0.830972
0.296158
chain.py
pypi
from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict, List from robinhood_commons.util.date_utils import convert_dates EXAMPLES: List[Dict[str, str]] = [ { "api_source": "cnbc", "author": "", "num_clicks": 0, "previe...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/news.py
0.590779
0.267265
news.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils import convert_floats EXAMPLE: Dict[str, str] = { "instrument...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/mover.py
0.756537
0.37866
mover.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from enum import Enum, auto from typing import Any, Dict, List, Optional, Union, Tuple from robinhood_commons.entity.execution_type import ExecutionType from robinhood_commons.entity.price impo...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/order.py
0.777342
0.31042
order.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from enum import Enum, auto from typing import Any, Dict from robinhood_commons.entity.state import State from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/transfer.py
0.831485
0.320077
transfer.py
pypi
from copy import deepcopy from dataclasses import dataclass from datetime import datetime from typing import Any, Dict from robinhood_commons.util.date_utils import convert_dates from robinhood_commons.util.num_utils import convert_floats EXAMPLE: Dict[str, str] = { "url": "https://api.robinhood.com/positions/5PY...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/position.py
0.821725
0.340321
position.py
pypi
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass from datetime import datetime from enum import Enum, auto from typing import Any, Dict, Optional from robinhood_commons.entity.price import Price, clean_price from robinhood_commons.entity.printable import Printable from ro...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/dividend.py
0.860662
0.28966
dividend.py
pypi
from dataclasses import dataclass from robinhood_commons.entity.execution_type import ExecutionType from robinhood_commons.entity.order_type.order_request import OrderRequest from robinhood_commons.entity.time_in_force import TimeInForce @dataclass class LimitOrderRequest(OrderRequest): """An order that specifie...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/entity/order_type/limit_order_request.py
0.535827
0.29844
limit_order_request.py
pypi
from copy import deepcopy from datetime import datetime, timedelta from typing import Any, Dict, List, Optional import pytz from dateutil import parser from holidays.countries.united_states import US as US_holidays BASE_TZ = pytz.timezone(zone="US/Eastern") UPDATED_AT: str = "updated_at" CREATED_AT: str = "created_at...
/robinhood_commons-1.0.44.tar.gz/robinhood_commons-1.0.44/robinhood_commons/util/date_utils.py
0.902681
0.465145
date_utils.py
pypi
from __future__ import absolute_import import atexit import binascii import collections import struct from threading import Thread, Event import weakref from rhkafka.vendor import six from rhkafka.errors import BufferUnderflowError if six.PY3: MAX_INT = 2 ** 31 TO_SIGNED = 2 ** 32 def crc32(data): ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/util.py
0.590661
0.296973
util.py
pypi
from __future__ import absolute_import from logging import getLogger from rhkafka.errors import check_error, OffsetOutOfRangeError from rhkafka.structs import OffsetCommitRequestPayload class OffsetCommitContext(object): """ Provides commit/rollback semantics around a `SimpleConsumer`. Usage assumes th...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/context.py
0.88666
0.207636
context.py
pypi
from __future__ import absolute_import from collections import namedtuple # SimpleClient Payload Structs - Deprecated # https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-MetadataAPI MetadataRequest = namedtuple("MetadataRequest", ["topics"]) MetadataRespo...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/structs.py
0.719876
0.163713
structs.py
pypi
from __future__ import absolute_import import abc import logging import re from rhkafka.vendor import six from rhkafka.errors import IllegalStateError from rhkafka.protocol.offset import OffsetResetStrategy from rhkafka.structs import OffsetAndMetadata log = logging.getLogger(__name__) class SubscriptionState(obj...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/consumer/subscription_state.py
0.795777
0.274722
subscription_state.py
pypi
from __future__ import absolute_import import collections import copy import logging import random import sys import time from rhkafka.vendor import six import rhkafka.errors as Errors from rhkafka.future import Future from rhkafka.metrics.stats import Avg, Count, Max, Rate from rhkafka.protocol.fetch import FetchRe...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/consumer/fetcher.py
0.551815
0.165897
fetcher.py
pypi
import binascii from rhkafka.record._crc32c import crc as crc32c_py try: from crc32c import crc32 as crc32c_c except ImportError: crc32c_c = None def encode_varint(value, write): """ Encode an integer to a varint presentation. See https://developers.google.com/protocol-buffers/docs/encoding?csw=1#var...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/record/util.py
0.642881
0.388154
util.py
pypi
from __future__ import division import struct from rhkafka.errors import CorruptRecordException from rhkafka.record.abc import ABCRecords from rhkafka.record.legacy_records import LegacyRecordBatch, LegacyRecordBatchBuilder from rhkafka.record.default_records import DefaultRecordBatch, DefaultRecordBatchBuilder cla...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/record/memory_records.py
0.873929
0.240925
memory_records.py
pypi
from __future__ import absolute_import import abc class ABCRecord(object): __metaclass__ = abc.ABCMeta @abc.abstractproperty def offset(self): """ Absolute offset of record """ @abc.abstractproperty def timestamp(self): """ Epoch milliseconds """ @abc.abstrac...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/record/abc.py
0.903575
0.310969
abc.py
pypi
# Builder and reader implementation for V0 and V1 record versions. As of Kafka # 0.11.0.0 those were replaced with V2, thus the Legacy naming. # The schema is given below (see # https://kafka.apache.org/protocol#protocol_message_sets for more details): # MessageSet => [Offset MessageSize Message] # Offset => int64...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/record/legacy_records.py
0.764012
0.373962
legacy_records.py
pypi
from __future__ import absolute_import import collections import logging from rhkafka.vendor import six from rhkafka.coordinator.assignors.abstract import AbstractPartitionAssignor from rhkafka.coordinator.protocol import ConsumerProtocolMemberMetadata, ConsumerProtocolMemberAssignment log = logging.getLogger(__nam...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/coordinator/assignors/range.py
0.627381
0.35883
range.py
pypi
from __future__ import absolute_import import collections import itertools import logging from rhkafka.vendor import six from rhkafka.coordinator.assignors.abstract import AbstractPartitionAssignor from rhkafka.common import TopicPartition from rhkafka.coordinator.protocol import ConsumerProtocolMemberMetadata, Cons...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/coordinator/assignors/roundrobin.py
0.783947
0.39257
roundrobin.py
pypi
from __future__ import absolute_import from rhkafka.vendor import six from rhkafka.partitioner.base import Partitioner class Murmur2Partitioner(Partitioner): """ Implements a partitioner which selects the target partition based on the hash of the key. Attempts to apply the same hashing function as m...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/partitioner/hashed.py
0.879393
0.257373
hashed.py
pypi
from __future__ import absolute_import from rhkafka.partitioner.base import Partitioner class RoundRobinPartitioner(Partitioner): def __init__(self, partitions=None): self.partitions_iterable = CachedPartitionCycler(partitions) if partitions: self._set_partitions(partitions) e...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/partitioner/roundrobin.py
0.629888
0.2665
roundrobin.py
pypi
from __future__ import absolute_import from struct import pack, unpack, error from rhkafka.protocol.abstract import AbstractType def _pack(f, value): try: return pack(f, value) except error as e: raise ValueError("Error encountered when attempting to convert value: " ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/protocol/types.py
0.657428
0.330417
types.py
pypi
from __future__ import absolute_import import logging import sys import time import threading from rhkafka.metrics import AnonMeasurable, KafkaMetric, MetricConfig, MetricName from rhkafka.metrics.stats import Sensor logger = logging.getLogger(__name__) class Metrics(object): """ A registry of sensors and ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/metrics.py
0.841044
0.216301
metrics.py
pypi
from __future__ import absolute_import import math class Histogram(object): def __init__(self, bin_scheme): self._hist = [0.0] * bin_scheme.bins self._count = 0.0 self._bin_scheme = bin_scheme def record(self, value): self._hist[self._bin_scheme.to_bin(value)] += 1.0 ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/stats/histogram.py
0.854885
0.26705
histogram.py
pypi
from __future__ import absolute_import import threading import time from rhkafka.errors import QuotaViolationError from rhkafka.metrics import KafkaMetric class Sensor(object): """ A sensor applies a continuous sequence of numerical values to a set of associated metrics. For example a sensor on mess...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/stats/sensor.py
0.920763
0.237499
sensor.py
pypi
from __future__ import absolute_import from rhkafka.metrics import AnonMeasurable, NamedMeasurable from rhkafka.metrics.compound_stat import AbstractCompoundStat from rhkafka.metrics.stats import Histogram from rhkafka.metrics.stats.sampled_stat import AbstractSampledStat class BucketSizing(object): CONSTANT = 0...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/stats/percentiles.py
0.793466
0.261378
percentiles.py
pypi
from __future__ import absolute_import import abc from rhkafka.metrics.measurable_stat import AbstractMeasurableStat class AbstractSampledStat(AbstractMeasurableStat): """ An AbstractSampledStat records a single scalar value measured over one or more samples. Each sample is recorded over a configurable ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/stats/sampled_stat.py
0.887832
0.347759
sampled_stat.py
pypi
from __future__ import absolute_import from rhkafka.metrics.measurable_stat import AbstractMeasurableStat from rhkafka.metrics.stats.sampled_stat import AbstractSampledStat class TimeUnit(object): _names = { 'nanosecond': 0, 'microsecond': 1, 'millisecond': 2, 'second': 3, ...
/robinhood-kafka-python-1.4.3.tar.gz/robinhood-kafka-python-1.4.3/rhkafka/metrics/stats/rate.py
0.87699
0.374676
rate.py
pypi
import re class Reporter: """ Formats the results of pyflakes checks to users. """ def __init__(self): self.diagnostics = [] def unexpectedError(self, filename, msg): """ An unexpected error occurred attemptinh to process C{filename}. @param filename: The path to a...
/roblox_pyc-2.26.113-py3-none-any.whl/robloxpyc/reporter.py
0.545528
0.250071
reporter.py
pypi
import * as luau from "../../LuauAST/bundle"; function makeGuard<T extends keyof luau.NodeByKind>(...kinds: [...Array<T>]) { const set = new Set<luau.SyntaxKind>(kinds); return (node: luau.Node): node is luau.NodeByKind[T] => set.has(node.kind); } // indexable expressions export const isAnyIdentifier = makeGuard(lu...
/roblox_pyc-2.26.113-py3-none-any.whl/robloxpyc/LuauAST/impl/typeGuards.ts
0.545528
0.614365
typeGuards.ts
pypi
import luau from "../../LuauAST"; import { assert } from "../../LuauAST/util/assert"; import { RenderState } from "../../LuauRenderer"; function endsWithIndexableExpressionInner(node: luau.Expression): boolean { if (luau.isIndexableExpression(node)) { // `a` or `(a)` or `a.b` or `a[b]` or `a()` return true; } el...
/roblox_pyc-2.26.113-py3-none-any.whl/robloxpyc/LuauRenderer/util/getEnding.ts
0.729905
0.676084
getEnding.ts
pypi
from enum import IntEnum, Enum from typing import Optional, List import orjson from .utilities import int_or_none class MembershipType(IntEnum): """ Represents a Roblox membership type. Please see https://developer.roblox.com/en-us/api-reference/enum/MembershipType for more information. """ none...
/roblox_studio-0.0.15-py3-none-any.whl/roblox_studio/storage.py
0.81772
0.263355
storage.py
pypi
# RobloxPy 0.2.21 RobloxPy is a python API wrapper for roblox. This allows for quick and easy integration of these API's into a python project. <sup><center>If you need any help using RobloxPy or want to request an additional please join the discord server at https://www.kristansmout.com/discord Accept The Terms & C...
/robloxpy-0.2.21.tar.gz/robloxpy-0.2.21/README.md
0.865651
0.857351
README.md
pypi
[![License: MIT](https://img.shields.io/badge/License-MIT-pink.svg)](https://opensource.org/licenses/MIT) # ROBO.AI Bot Runtime manager CLI tool # <img align="right" width="200" height="200" alt="robo-bot" src="robo-bot.png"></img> This tool allows anyone to create, train, deploy, monitor and manage a Rasa based bot ...
/robo-bot-0.1.3.1.tar.gz/robo-bot-0.1.3/README.md
0.50293
0.931338
README.md
pypi