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 inspect import sys def find_mod_objs(modname, onlylocals=False): """ Returns all the public attributes of a module referenced by name. .. note:: The returned list *not* include subpackages or modules of `modname`,nor does it include private attributes (those that beginwith '_' ...
/randomfield-0.1.tar.gz/randomfield-0.1/astropy_helpers/astropy_helpers/sphinx/ext/utils.py
0.518302
0.376107
utils.py
pypi
# Implementation note: # The 'automodapi' directive is not actually implemented as a docutils # directive. Instead, this extension searches for the 'automodapi' text in # all sphinx documents, and replaces it where necessary from a template built # into this extension. This is necessary because automodsumm (and autosum...
/randomfield-0.1.tar.gz/randomfield-0.1/astropy_helpers/astropy_helpers/sphinx/ext/automodapi.py
0.537527
0.192255
automodapi.py
pypi
# Python `randomhash` package [![pytest](https://github.com/jlumbroso/python-random-hash/actions/workflows/continuous-integration.yaml/badge.svg)](https://github.com/jlumbroso/python-random-hash/actions/workflows/continuous-integration.yaml) [![codecov](https://codecov.io/gh/jlumbroso/python-random-hash/branch/main/gr...
/randomhash-0.6.0.tar.gz/randomhash-0.6.0/README.md
0.593138
0.974141
README.md
pypi
import io from tempfile import SpooledTemporaryFile import random try: import faker except ImportError: faker = None VERSION = (0, 1) __version__ = '.'.join([str(i) for i in VERSION]) __author__ = 'Anthony Monthe (ZuluPro)' __email__ = 'anthony.monthe@gmail.com' __url__ = 'https://github.com/ZuluPro/random-io'...
/randomio2-0.1.tar.gz/randomio2-0.1/randomio.py
0.569134
0.21684
randomio.py
pypi
import random from randomized_tsp.utils import cost, random_neighbour, random_tour def init_population(population_size, num_of_cities): """ Initializes the population """ population = set() while len(population) != population_size: population.add(tuple(random_tour(num_of_cities))) retu...
/randomized_tsp-0.0.2.tar.gz/randomized_tsp-0.0.2/randomized_tsp/Genetic.py
0.691393
0.644015
Genetic.py
pypi
from randomized_tsp.SimulatedAnnealing import _simulated_annealing from randomized_tsp.Genetic import _genetic_algorithm from randomized_tsp.AntColony import _ant_colony class tsp: def __init__(self, distance_matrix): """ :param distance_matrix: A square matrix representing the distances between c...
/randomized_tsp-0.0.2.tar.gz/randomized_tsp-0.0.2/randomized_tsp/tsp.py
0.909059
0.554953
tsp.py
pypi
# **randomlib** - **randomlib** is a python-based natural language processing library focused on the Indian language **Marathi**. It provides an easy interface for NLP features like sentiment analysis, named entity recognition, hate speech detection, etc. exclusively for Marathi text. - **randomlib**, the author ...
/randomlib-4.5.tar.gz/randomlib-4.5/README.md
0.660829
0.864768
README.md
pypi
from dataclasses import dataclass from typing import List, Optional @dataclass(frozen=True) class WeatherLocation: ''' Represents the location of the weather. Attributes ---------- name : str The name of location. lat : str The latitude of the location. long : ...
/randomstuff.py-2.0.0-py3-none-any.whl/randomstuff/weather.py
0.967441
0.652117
weather.py
pypi
class HTTPError(Exception): """Super class for 500s status codes. This usually indicates that library couldn't establish a connection with base URL (or API). This is raised when API is has something wrong. """ def __init__(self, message, status): super().__init__(message) self.messa...
/randomstuff.py-2.0.0-py3-none-any.whl/randomstuff/errors.py
0.871612
0.372134
errors.py
pypi
# Imports # ---------------------------------------------------------------- from urllib import request, error from urllib.parse import urlencode import json import time import re # Global Variables # ---------------------------------------------------------------- # Python module version __version__ = '1.6' # Vers...
/randomuser-1.6.tar.gz/randomuser-1.6/randomuser.py
0.758063
0.225918
randomuser.py
pypi
<!-- The Begin and End comments throughout this document are used in order to pull specific sections of the readme into the main GUI window at runtime. --> # Randovania Welcome to Randovania, a randomizer platform for a multitude of games. New here or looking to install? Check [our website](https://randovania.github...
/randovania-6.2.0.tar.gz/randovania-6.2.0/README.md
0.657758
0.848094
README.md
pypi
# Glossary Index of terminology used in Randovania. Some terms are used only in the GUI, with more technical ones being used in code or CLI. ## Action Actions are steps taken by the generator. Consist of either assigning [Pickups](#pickup) or collecting any unsafe Resource Node. ## Area A small chunk of a game's p...
/randovania-6.2.0.tar.gz/randovania-6.2.0/docs/Glossary.md
0.762778
0.816882
Glossary.md
pypi
# Instructions and Standards for the Development of Organized Logic Databases ## REGIONS, AREAS, AND NODES There exist 3 tiers of "Location" in the Randovania logic database - Regions, Areas, and Nodes. ![Regions, Areas, and Nodes](./img/world_area_node.png) Regions represent large swathes of the ga...
/randovania-6.2.0.tar.gz/randovania-6.2.0/docs/Database Format.md
0.785226
0.885136
Database Format.md
pypi
## Introduction This is the script for a video about how to use the Data Editor that was never recorded. It's still a helpful read, though a bit outdated. ## Script Hello, in this video I'll be talking about Randovania's data visualizer and editor, with a focus on the editor for Metroid Dread though the general idea...
/randovania-6.2.0.tar.gz/randovania-6.2.0/docs/Database Editor.md
0.528777
0.937498
Database Editor.md
pypi
from __future__ import annotations import argparse import logging from typing import TYPE_CHECKING from randovania.game_description import data_reader, data_writer, pretty_print from randovania.game_description.editor import Editor from randovania.games import default_data from randovania.games.game import Randovania...
/randovania-6.2.0.tar.gz/randovania-6.2.0/tools/bulk_move_nodes.py
0.620277
0.18385
bulk_move_nodes.py
pypi
from __future__ import annotations import argparse import struct def main(): parser = argparse.ArgumentParser() parser.add_argument("hexstring") args = parser.parse_args() b = bytes.fromhex(args.hexstring) op_type, num_ops, num_addresses, keep_alive = struct.unpack_from(">BBBB", b, 0) print...
/randovania-6.2.0.tar.gz/randovania-6.2.0/tools/parse_nintendont_packet.py
0.608594
0.266785
parse_nintendont_packet.py
pypi
[![Build Status](https://travis-ci.org/edio/randrctl.svg?branch=master)](https://travis-ci.org/edio/randrctl) # randrctl Screen profiles manager for X.org. _randrctl_ remembers your X.org screen configurations (position of displays, rotation, scaling, etc.) and switches between them automatically as displays are con...
/randrctl-1.9.0.tar.gz/randrctl-1.9.0/README.md
0.607314
0.896704
README.md
pypi
import random import sre_parse DEFAULT_MAX_REPEATS = 100 def randre(re_text): pattern = sre_parse.parse(re_text) return Generator().gen_pattern(pattern) class Generator: def __init__(self, max_repeats=DEFAULT_MAX_REPEATS): self.groups = {} self.max_repeats = max_repeats def gen_pat...
/randre-0.1.0-py3-none-any.whl/randre.py
0.432782
0.268665
randre.py
pypi
import random # Generates a random digit ranging from 0 to 9 (Digits in Decimal Number System) and returns it as a string. def randdigit(): return str(random.randint(0, 9)) # Generates a random lowercase letter from the english alphabet and returns it as a string. def randalpha(): choices = list(["a", "b",...
/randstr-random-1.1.3.tar.gz/randstr-random-1.1.3/randstr.py
0.511473
0.460774
randstr.py
pypi
import argparse import logging import os.path import csv import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, FormatStrFormatter) logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', datefmt='%H:%M:%S', level=logging.INFO) logger = lo...
/randwire-0.1.6.tar.gz/randwire-0.1.6/randwire.py
0.418222
0.316977
randwire.py
pypi
try: from rang_colorpalette import palette except ModuleNotFoundError: import palette class BlueBlackWagon(palette.NamedPalette): def __init__(self) -> None: super().__init__("BlueBlackWagon") self["Background"] = "222831" self["Text"] = "00ADB5" self["Border"] = "EEEEEE" ...
/rang_colorpalette-0.1.0-py3-none-any.whl/rang_colorpalette/themes.py
0.50415
0.303242
themes.py
pypi
try : raw_input except NameError : ispy3 = 1 else : ispy3 = 0 class Range(object) : """Range(stop) or Range(start, stop[, step]) Like built-in type 'range' or 'xrange', Range is not immutable.""" if ispy3 : def __init__(self, *args) : """Initialize self. See help(type(self...
/range-anytype-0.6.10.923143b0.tar.gz/range-anytype-0.6.10.923143b0/range_anytype/py22plus.py
0.608827
0.33565
py22plus.py
pypi
from datetime import date, datetime from typing import TypeVar, Any, Tuple, Union, List, Dict, Optional from range_dict.interval_tree import IntervalTree T = TypeVar('T', int, float, date, datetime, Any) class RangeDict: def __init__(self, initial_dict: Optional[Dict[Union[T, Tuple[T, T]], Any]] = None): ...
/range_dict-0.1.2.tar.gz/range_dict-0.1.2/range_dict/range_dict.py
0.881405
0.304959
range_dict.py
pypi
from __future__ import annotations import logging from dataclasses import dataclass from datetime import date, datetime from typing import TypeVar, Optional, Tuple, Any, Generic, List logger = logging.getLogger("range_dict.interval_tree") T = TypeVar('T', int, float, date, datetime, Any) @dataclass class Node(Gene...
/range_dict-0.1.2.tar.gz/range_dict-0.1.2/range_dict/interval_tree.py
0.915432
0.330782
interval_tree.py
pypi
from copy import copy from decimal import ROUND_HALF_UP, Decimal def digits2str(digits): """List of digits to str""" return "".join(str(i) for i in digits) def tuple2decimal(sign, digits, exponent): """Value of as_tuple to Decimal""" return Decimal(f"{'-' * sign}{digits2str(digits)}e{exponent}") d...
/range_digit-0.1.2-py3-none-any.whl/range_digit/__init__.py
0.734501
0.552359
__init__.py
pypi
import sys class SegmentTreeNode: def __init__(self, start, end, max_val): """ segment tree node structure @param: int start @param: int end @param: int/double max_val """ self.start = start self.end = end self.max = max_val self.lef...
/range_max_query-1.0.3.tar.gz/range_max_query-1.0.3/range_max_query/core.py
0.70253
0.496216
core.py
pypi
r"""When preparing a HTTP GET request, the HTTP `range request <https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests>`_ header must be provided as a :class:`dict`, for example: .. code-block:: python {"range": "bytes=0-1"} would request the two bytes at positions ``0`` and ``1`` (i.e. the inclusive i...
/range_streams-1.3.0-py3-none-any.whl/range_streams/http_utils.py
0.936757
0.597432
http_utils.py
pypi
r""" :mod:`range_streams` provides file-like object handling through an API familiar to users of the standard library :mod:`io` module. It uses :class:`~ranges.Range`, :class:`~ranges.RangeSet`, and :class:`~ranges.RangeDict` classes (from the externally maintained `python-ranges <https://python-ranges.readthedocs.io/...
/range_streams-1.3.0-py3-none-any.whl/range_streams/__init__.py
0.948489
0.735665
__init__.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING, AsyncIterator, Iterator MYPY = False # when using mypy will be overrided as True if MYPY or not TYPE_CHECKING: # pragma: no cover import httpx # avoid importing to Sphinx type checker from ranges import Range from .http_utils import Partial...
/range_streams-1.3.0-py3-none-any.whl/range_streams/request.py
0.877503
0.2627
request.py
pypi
from __future__ import annotations import io import struct from ranges import Range from ...stream import RangeStream from .data import COMPRESSIONS, TarData __all__ = ["TarStream", "TarredFileInfo"] class TarStream(RangeStream): """ As for :class:`~range_streams.stream.RangeStream`, but if ``scan_headers...
/range_streams-1.3.0-py3-none-any.whl/range_streams/codecs/tar/stream.py
0.81468
0.331039
stream.py
pypi
from __future__ import annotations import io import struct from pyzstd import ZstdFile from ranges import Range from ...stream import RangeStream from ..zstd import ZstdTarFile from .data import COMPRESSIONS, ZipData __all__ = ["ZipStream", "ZippedFileInfo"] class ZipStream(RangeStream): """ As for :class...
/range_streams-1.3.0-py3-none-any.whl/range_streams/codecs/zip/stream.py
0.775052
0.403273
stream.py
pypi
from __future__ import annotations from ranges import Range from ..zip import ZipStream __all__ = ["CondaStream"] class CondaStream(ZipStream): def __init__( self, url: str, client=None, byte_range: Range | tuple[int, int] = Range("[0, 0)"), pruning_level: int = 0, ...
/range_streams-1.3.0-py3-none-any.whl/range_streams/codecs/conda/stream.py
0.880944
0.268462
stream.py
pypi
from __future__ import annotations import struct import zlib from ranges import Range from ...stream import RangeStream from .data import PngChunkInfo, PngData from .reconstruct import reconstruct_idat __all__ = ["PngStream"] class PngStream(RangeStream): """ As for RangeStream, but if `scan_ihdr` is True...
/range_streams-1.3.0-py3-none-any.whl/range_streams/codecs/png/stream.py
0.909436
0.356727
stream.py
pypi
from __future__ import annotations __all__ = ["PaethPredictor"] def reconstruct_idat( idat_bytes: bytes, channels: int, height: int, width: int ) -> list[int]: # pragma: no cover """ Parse a list of (zlib-decompressed) bytes into a flat list of integers (the pixel values), validating that the result...
/range_streams-1.3.0-py3-none-any.whl/range_streams/codecs/png/reconstruct.py
0.849831
0.53522
reconstruct.py
pypi
from __future__ import annotations import warnings from typing import Type, Tuple, Union, Optional, Any try: # We prefer this version since it has include_extras for sure. from typing_extensions import get_type_hints # type: ignore except ImportError: from typing import get_type_hints # type: ignore fro...
/range_typed_integers-1.0.1-py3-none-any.whl/range_typed_integers/check.py
0.926972
0.491944
check.py
pypi
try: import pkg_resources # part of setuptools _version = pkg_resources.require("range_set")[0].version del pkg_resources _version_tuple = tuple(int(x) for x in _version.split(".")) except Exception: _version = "0.0.1" _version_tuple = (0, 0, 1) class RangeSet: """ A RangeSet wor...
/range_set-0.3.1.tar.gz/range_set-0.3.1/range_set.py
0.574275
0.453564
range_set.py
pypi
class KdTree: def __init__(self, dim, points): self._dim = dim self._points = points self._root = self._make_kd_tree() # Makes the KD-Tree for fast lookup def _make_kd_tree(self): if len(self._points) == 0: return [None, None, None] else: ret...
/ranged_kdtree-1.0.0.tar.gz/ranged_kdtree-1.0.0/kdtree/kdtree.py
0.739422
0.419291
kdtree.py
pypi
__all__ = ['RangeDict'] class Color(object): BLACK = 0 RED = 1 class Node(object): __slots__ = ('r', 'left', 'right', 'value', 'color', 'parent') def __init__(self, r, value, parent=None, color=Color.RED): self.r = r self.value = value self.parent = parent self.color...
/rangedict-0.1.7-py3-none-any.whl/rangedict.py
0.838977
0.232049
rangedict.py
pypi
import os import re try: # Python3 from http.server import SimpleHTTPRequestHandler except ImportError: # Python 2 from SimpleHTTPServer import SimpleHTTPRequestHandler def copy_byte_range(infile, outfile, start=None, stop=None, bufsize=16*1024): """Like shutil.copyfileobj, but only copy a range...
/rangehttpserver-1.3.3.tar.gz/rangehttpserver-1.3.3/RangeHTTPServer/__init__.py
0.520496
0.22877
__init__.py
pypi
# Basics Range is a continuous interval between two points (boundaries). E.g. a numeric interval, a time interval, alphabetic interval, etc. Examples of range are: - (1; 3) – means that any number between 1 and 3 belongs to this interval, **excluding** 1 and 3. - [1; 3] – means that any number between 1 and 3 belongs...
/rangelist-0.0.4.tar.gz/rangelist-0.0.4/README.md
0.84137
0.973594
README.md
pypi
from __future__ import (absolute_import, division, print_function) import curses class MouseEvent(object): PRESSED = [ 0, curses.BUTTON1_PRESSED, curses.BUTTON2_PRESSED, curses.BUTTON3_PRESSED, curses.BUTTON4_PRESSED, ] CTRL_SCROLLWHEEL_MULTIPLIER = 5 def __i...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/gui/mouse_event.py
0.606732
0.188231
mouse_event.py
pypi
from __future__ import (absolute_import, division, print_function) import sys from ranger.ext.widestring import WideString, utf_char_width PY3 = sys.version_info[0] >= 3 class Bar(object): left = None right = None gap = None def __init__(self, base_color_tag): self.left = BarSide(base_co...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/gui/bar.py
0.597608
0.254781
bar.py
pypi
from __future__ import (absolute_import, division, print_function) import re from ranger.ext.widestring import WideString from ranger.gui import color # pylint: disable=invalid-name ansi_re = re.compile('(\x1b' + r'\[\d*(?:;\d+)*?[a-zA-Z])') codesplit_re = re.compile(r'38;5;(\d+);|48;5;(\d+);|(\d*);') reset = '\x1b...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/gui/ansi.py
0.511961
0.256576
ansi.py
pypi
from __future__ import (absolute_import, division, print_function) import curses from ranger.ext.keybinding_parser import key_to_string from . import Widget from ..displayable import DisplayableContainer class ViewBase(Widget, DisplayableContainer): # pylint: disable=too-many-instance-attributes draw_bookmarks ...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/gui/widgets/view_base.py
0.44553
0.161221
view_base.py
pypi
# A simple command for demonstration purposes follows. # ----------------------------------------------------------------------------- from __future__ import (absolute_import, division, print_function) # You can import any python module as needed. import os # You always need to import ranger.api.commands here to ge...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/config/commands_sample.py
0.577257
0.196402
commands_sample.py
pypi
from __future__ import (absolute_import, division, print_function) import locale import os.path from os import stat as os_stat, lstat as os_lstat import random import re from collections import deque from time import time from ranger.container.fsobject import BAD_INFO, FileSystemObject from ranger.core.loader import...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/container/directory.py
0.615203
0.204998
directory.py
pypi
from __future__ import (absolute_import, division, print_function) import string import re import os from ranger.core.shared import FileManagerAware ALLOWED_KEYS = string.ascii_letters + string.digits + "`'" class Bookmarks(FileManagerAware): """Bookmarks is a container which associates keys with bookmarks. ...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/container/bookmarks.py
0.710126
0.304287
bookmarks.py
pypi
from __future__ import (absolute_import, division, print_function) from abc import ABCMeta, abstractproperty, abstractmethod from datetime import datetime from ranger.ext.human_readable import human_readable, human_readable_time from ranger.ext import spawn DEFAULT_LINEMODE = "filename" class LinemodeBase(object)...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/core/linemode.py
0.806586
0.161023
linemode.py
pypi
from __future__ import (absolute_import, division, print_function) from datetime import datetime from ranger.core.shared import SettingsAware def human_readable(byte, separator=' '): # pylint: disable=too-many-return-statements """Convert a large number of bytes to an easily readable format. >>> human_re...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/human_readable.py
0.698021
0.209773
human_readable.py
pypi
from __future__ import (absolute_import, division, print_function) from os import devnull from subprocess import Popen, PIPE, CalledProcessError ENCODING = 'utf-8' def check_output(popenargs, **kwargs): """Runs a program, waits for its termination and returns its output This function is functionally identi...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/spawn.py
0.753467
0.188343
spawn.py
pypi
from __future__ import (absolute_import, division, print_function) import math class Direction(dict): def __init__(self, dictionary=None, **keywords): if dictionary is not None: dict.__init__(self, dictionary) else: dict.__init__(self, keywords) if 'to' in self: ...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/direction.py
0.646237
0.196537
direction.py
pypi
from __future__ import (absolute_import, division, print_function) import weakref from types import MethodType class Signal(dict): """Signals are passed to the bound functions as an argument. They contain the attributes "origin", which is a reference to the signal dispatcher, and "name", the name of the...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/signals.py
0.747892
0.504883
signals.py
pypi
from __future__ import (absolute_import, division, print_function) import sys import copy import curses.ascii PY3 = sys.version_info[0] >= 3 digits = set(range(ord('0'), ord('9') + 1)) # pylint: disable=invalid-name # Arbitrary numbers which are not used with curses.KEY_XYZ ANYKEY, PASSIVE_ACTION, ALT_KEY, QUANT_K...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/keybinding_parser.py
0.461017
0.188716
keybinding_parser.py
pypi
from __future__ import (absolute_import, division, print_function) import logging from collections import deque class QueueHandler(logging.Handler): """ This handler store logs events into a queue. """ def __init__(self, queue): """ Initialize an instance, using the passed queue. ...
/ranger-fm-1.9.3.tar.gz/ranger-fm-1.9.3/ranger/ext/logutils.py
0.726329
0.169681
logutils.py
pypi
import signal import sys import time import psutil import ranger from ranger.container.settings import Settings from ranger.core.fm import FM from ranger.core.main import parse_arguments from ranger.core.shared import FileManagerAware, SettingsAware from ranger_tmux import util def animated_resize(pane_id, target_p...
/ranger_tmux-1.0.8.tar.gz/ranger_tmux-1.0.8/ranger_tmux/drop.py
0.485356
0.183082
drop.py
pypi
from bisect import bisect_left from collections import deque from Ranger.src.Range.Range import Range class RangeSet(object): """ Class used to represent a set of non-overlapping ranges of the same type. If a range is added that is connected to another range already in the set, those ranges are merged. Oth...
/ranger-0.10.tar.gz/ranger-0.10/Ranger/src/Collections/RangeSet.py
0.859103
0.454956
RangeSet.py
pypi
class Cut(object): """ Class used to represent a cutpoint in a range, such that any range can be represented by 2 Cuts """ def __init__(self, theType, aboveAll=False, belowAll=False, point = None, below = False): """ Instantiates a cut point Parameters -----...
/ranger-0.10.tar.gz/ranger-0.10/Ranger/src/Range/Cut.py
0.913493
0.424472
Cut.py
pypi
from enum import Enum, unique class EthereumNetworkNotSupported(Exception): pass @unique class EthereumNetwork(Enum): """ Use https://chainlist.org/ as a reference """ UNKNOWN = -1 OLYMPIC = 0 MAINNET = 1 ROPSTEN = 3 RINKEBY = 4 GOERLI = 5 ETC_KOTTI = 6 TCH = 7 U...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/ethereum_network.py
0.458106
0.398231
ethereum_network.py
pypi
from secrets import token_bytes from typing import Tuple, Union import eth_abi from eth._utils.address import generate_contract_address from eth_keys import keys from eth_utils import to_canonical_address, to_checksum_address from hexbytes import HexBytes from web3 import Web3 def get_eth_address_with_key() -> Tuple...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/utils.py
0.899293
0.368747
utils.py
pypi
import logging from dataclasses import dataclass from typing import Any, List, Optional, Sequence, Tuple from eth_abi.exceptions import DecodingError from eth_account.signers.local import LocalAccount from eth_typing import BlockIdentifier, BlockNumber, ChecksumAddress from hexbytes import HexBytes from web3 import We...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/multicall.py
0.891746
0.221267
multicall.py
pypi
import json import time from typing import Any, Dict, Optional from urllib.parse import urljoin import requests from .. import EthereumNetwork from .contract_metadata import ContractMetadata class EtherscanClientException(Exception): pass class EtherscanClientConfigurationProblem(Exception): pass class ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/clients/etherscan_client.py
0.761139
0.268366
etherscan_client.py
pypi
from typing import Any, Dict, List, Optional from urllib.parse import urljoin import requests from web3 import Web3 from .. import EthereumNetwork from .contract_metadata import ContractMetadata class Sourcify: """ Get contract metadata from Sourcify. Matches can be full or partial: - Full: Both the ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/clients/sourcify.py
0.899682
0.369088
sourcify.py
pypi
import json from typing import Any, Dict, Optional from urllib.parse import urljoin import requests from eth_typing import ChecksumAddress from .. import EthereumNetwork from .contract_metadata import ContractMetadata class BlockscoutClientException(Exception): pass class BlockScoutConfigurationProblem(Blocks...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/clients/blockscout_client.py
0.763924
0.28669
blockscout_client.py
pypi
import binascii from typing import Optional, Union from django.core import exceptions from django.db import models from django.utils.translation import gettext_lazy as _ from eth_typing import ChecksumAddress from eth_utils import to_checksum_address from hexbytes import HexBytes from .filters import EthereumAddress...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/django/models.py
0.839865
0.192824
models.py
pypi
mooniswap_abi = [ { "inputs": [ {"internalType": "contract IERC20", "name": "_token0", "type": "address"}, {"internalType": "contract IERC20", "name": "_token1", "type": "address"}, {"internalType": "string", "name": "name", "type": "string"}, {"internalType":...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/mooniswap_abis.py
0.535098
0.515315
mooniswap_abis.py
pypi
AAVE_ATOKEN_ABI = [ { "inputs": [ { "internalType": "contract ILendingPool", "name": "pool", "type": "address", }, { "internalType": "address", "name": "underlyingAssetAddress", ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/aave_abis.py
0.566019
0.415847
aave_abis.py
pypi
curve_address_provider_abi = [ { "name": "NewAddressIdentifier", "inputs": [ {"type": "uint256", "name": "id", "indexed": True}, {"type": "address", "name": "addr", "indexed": False}, {"type": "string", "name": "description", "indexed": False}, ], ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/curve_abis.py
0.663124
0.531149
curve_abis.py
pypi
cream_ctoken_abi = [ { "inputs": [ {"internalType": "address", "name": "underlying_", "type": "address"}, { "internalType": "contract ComptrollerInterface", "name": "comptroller_", "type": "address", }, { ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/cream_abis.py
0.577495
0.492249
cream_abis.py
pypi
multicall_v2_abi = [ { "inputs": [ { "components": [ {"internalType": "address", "name": "target", "type": "address"}, {"internalType": "bytes", "name": "callData", "type": "bytes"}, ], "internalType": "struc...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/makerdao.py
0.492188
0.568595
makerdao.py
pypi
balancer_pool_abi = [ { "inputs": [], "payable": False, "stateMutability": "nonpayable", "type": "constructor", }, { "anonymous": False, "inputs": [ { "indexed": True, "internalType": "address", "name...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/balancer_abis.py
0.493897
0.450299
balancer_abis.py
pypi
YVAULT_ABI = [ { "inputs": [ {"internalType": "address", "name": "_token", "type": "address"}, {"internalType": "address", "name": "_controller", "type": "address"}, ], "payable": False, "stateMutability": "nonpayable", "type": "constructor", }, ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/oracles/abis/yearn_abis.py
0.521959
0.48182
yearn_abis.py
pypi
import json import os import sys from typing import Any, Dict, Optional from eth_typing import ChecksumAddress from hexbytes import HexBytes from web3 import Web3 from web3.contract import Contract try: from functools import cache except ImportError: from functools import lru_cache cache = lru_cache(maxs...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/eth/contracts/__init__.py
0.627267
0.156878
__init__.py
pypi
from enum import Enum from logging import getLogger from typing import List, Union from eth_account.signers.local import LocalAccount from hexbytes import HexBytes from web3 import Web3 from gnosis.eth import EthereumClient from gnosis.eth.contracts import get_multi_send_contract from gnosis.eth.ethereum_client impor...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/multi_send.py
0.932116
0.389082
multi_send.py
pypi
from abc import ABC, abstractmethod from enum import Enum from logging import getLogger from typing import List, Union from eth_abi import decode_single, encode_single from eth_abi.exceptions import DecodingError from eth_account.messages import defunct_hash_message from eth_typing import ChecksumAddress from eth_util...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/safe_signature.py
0.904543
0.232093
safe_signature.py
pypi
from typing import Any, Dict, List, NoReturn, Optional, Tuple, Type from eip712_structs import Address, Bytes, EIP712Struct, Uint, make_domain from eip712_structs.struct import StructTuple from eth_account import Account from hexbytes import HexBytes from packaging.version import Version from web3 import Web3 from web...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/safe_tx.py
0.909034
0.152064
safe_tx.py
pypi
import dataclasses import math from enum import Enum from logging import getLogger from typing import Callable, List, NamedTuple, Optional, Union from eth_account import Account from eth_account.signers.local import LocalAccount from eth_typing import ChecksumAddress from hexbytes import HexBytes from web3 import Web3...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/safe.py
0.878887
0.176334
safe.py
pypi
from logging import getLogger from typing import Optional from eth_account.signers.local import LocalAccount from eth_typing import ChecksumAddress from web3 import Web3 from web3.contract import Contract from gnosis.eth import EthereumClient from gnosis.eth.contracts import ( get_paying_proxy_deployed_bytecode, ...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/proxy_factory.py
0.912629
0.16492
proxy_factory.py
pypi
from rest_framework import serializers from rest_framework.exceptions import ValidationError from gnosis.eth.constants import ( SIGNATURE_R_MAX_VALUE, SIGNATURE_R_MIN_VALUE, SIGNATURE_S_MAX_VALUE, SIGNATURE_S_MIN_VALUE, SIGNATURE_V_MAX_VALUE, SIGNATURE_V_MIN_VALUE, ) from gnosis.eth.django.seri...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/serializers.py
0.78838
0.331039
serializers.py
pypi
import math import os from logging import getLogger from typing import Any, Dict, List, Optional, Tuple import rlp from eth.constants import SECPK1_N from eth.vm.forks.frontier.transactions import FrontierTransaction from eth_keys.exceptions import BadSignature from eth_utils import to_canonical_address, to_checksum_a...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/safe_creation_tx.py
0.79858
0.390302
safe_creation_tx.py
pypi
from typing import List, Tuple, Union from eth_keys import keys from eth_keys.exceptions import BadSignature from hexbytes import HexBytes from gnosis.eth.constants import NULL_ADDRESS def signature_split( signatures: Union[bytes, str], pos: int = 0 ) -> Tuple[int, int, int]: """ :param signatures: sign...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/safe/signatures.py
0.923049
0.493958
signatures.py
pypi
from typing import Any, Dict, List, Optional, Union, cast import requests from eip712_structs import make_domain from eth_account import Account from eth_account.messages import encode_defunct from eth_typing import AnyAddress, ChecksumAddress, HexStr from hexbytes import HexBytes from web3 import Web3 from gnosis.et...
/rangers_safe_eth_py-0.0.1-py3-none-any.whl/gnosis/protocol/gnosis_protocol_api.py
0.847321
0.227813
gnosis_protocol_api.py
pypi
from .core import Range def next_range(range_iter): try: return next(range_iter) except StopIteration: return None class RangeSourcesConsolidator(object): """Recieves multiple RangeSource objects and is an iterator over the intersection of all into one merged sequence. Ev...
/ranges-consolidator-1.0.0.tar.gz/ranges-consolidator-1.0.0/ranges_consolidator/range_sources_consolidator.py
0.69946
0.329459
range_sources_consolidator.py
pypi
from enum import Enum, unique from typing import Union, TypeVar, Generic from bintrees import FastAVLTree V = TypeVar('V') D = TypeVar('D') @unique class InfinityMarker(Enum): INF_PLUS = "inf_plus" INF_MINUS = "inf_minus" class RangeTree(Generic[V]): """A specialized tree dealing with ranges.""" ...
/rangetree-1.0-py3-none-any.whl/rangetree.py
0.827166
0.274048
rangetree.py
pypi
**ranjg 0.5.0.x — Randomly json generator** **ranjg** is a package providing functions to generate random JSON data according to JSON-Schema-**LIKE** object. (It is similar to JSON schema, but does NOT support some keywords. Also see [here](#Supported-keywords-of-schema).) This package can be used on command line and...
/ranjg-0.5.0.1.tar.gz/ranjg-0.5.0.1/README.md
0.923919
0.843251
README.md
pypi
<div align="center"> <img src="https://repository-images.githubusercontent.com/268892956/6ec35327-5041-4296-b679-832a22b441cb"> </div> <p align="center"> <!-- Python --> <a href="https://www.python.org" alt="Python"> <img src="https://badges.aleen42.com/src/python.svg" /> </a> <!-- Docs --> <a href=...
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/README.md
0.839635
0.952264
README.md
pypi
import numpy as np from numba import config, njit, prange config.THREADING_LAYER = "workqueue" # LOW LEVEL FUNCTIONS ========================================================== @njit(cache=True) def _clean_qrels(qrels): return qrels[np.nonzero(qrels[:, 1])] @njit(cache=True) def fix_k(k, run): if k == 0 or ...
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/rank_eval/metrics.py
0.415847
0.260369
metrics.py
pypi
from collections import defaultdict from numbers import Number from typing import Dict, List, Union import numba as nb import numpy as np from numba import set_num_threads from .frozenset_dict import FrozensetDict from .metrics import ( average_precision, hits, ndcg, ndcg_burges, precision, r...
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/rank_eval/meta_functions.py
0.926516
0.467028
meta_functions.py
pypi
import numpy as np from numba import config, njit, prange from numba.typed import Dict as TypedDict from numba.typed import List as TypedList config.THREADING_LAYER = "workqueue" @njit(cache=True) def to_typed_list(d): keys = TypedList(d.keys()) values = TypedList(d.values()) typed_list = TypedList([np....
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/rank_eval/qrels_run_common.py
0.40698
0.521167
qrels_run_common.py
pypi
from collections import defaultdict from typing import Dict, List import pandas as pd from numba import types from numba.typed import Dict as TypedDict from numba.typed import List as TypedList from tqdm import tqdm from .qrels_run_common import ( add_and_sort, sort_dict_by_key, sort_dict_of_dict_by_value...
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/rank_eval/run.py
0.898995
0.355243
run.py
pypi
import json from typing import Dict, List, Tuple from tabulate import tabulate from .frozenset_dict import FrozensetDict chars = list("abcdefghijklmnopqrstuvwxyz") super_chars = list("ᵃᵇᶜᵈᵉᶠᵍʰᶦʲᵏˡᵐⁿᵒᵖ۹ʳˢᵗᵘᵛʷˣʸᶻ") metric_labels = { "hits": "Hits", "precision": "P", "recall": "Recall", "r-precision": ...
/rank_eval-0.1.3.tar.gz/rank_eval-0.1.3/rank_eval/report.py
0.862569
0.24774
report.py
pypi
import numpy as np from numpy.core.numeric import count_nonzero from scipy.stats import mode from scipy.sparse import issparse, csr_matrix import warnings from ._base import RankSimilarityMixin from ._filters import _unit_norm from sklearn.base import ClassifierMixin, TransformerMixin from sklearn.utils.validation im...
/rank-similarity-0.0.1.tar.gz/rank-similarity-0.0.1/ranksim/_classes.py
0.894153
0.559952
_classes.py
pypi
import numpy as np from scipy.stats import rankdata, norm, gaussian_kde from scipy.sparse import issparse def rank(data,axis=None): # this is only approximate for speed return rankdata(data, axis=axis, method='ordinal') def _unit_norm(data,axis=None): # l1-normalization if issparse(data): sum_...
/rank-similarity-0.0.1.tar.gz/rank-similarity-0.0.1/ranksim/_filters.py
0.53777
0.421135
_filters.py
pypi
import swifter import pandas as pd from typing import List, Tuple from .metrics import ndcg, recall, kendall_tau, rbo_sim from .normalise import normalise_relevance def prepare_relevance(truth_items: List[str], truth_scores: List[float], pred_items: List[str]) -> pd.Serie...
/rank_validation-1.0.2.tar.gz/rank_validation-1.0.2/rank_validation/validation_generator.py
0.907072
0.698707
validation_generator.py
pypi
import rbo import numpy as np import swifter from scipy import stats from typing import List from .normalise import normalise_for_kendalltau def ndcg(true_relevance: List[float], predicted_relevance: List[float], cutoff: int) -> float: """ :param true_relevance: List of scores corresponding...
/rank_validation-1.0.2.tar.gz/rank_validation-1.0.2/rank_validation/metrics.py
0.870157
0.691198
metrics.py
pypi
import collections from typing import List, Tuple class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def __len__(self): return len(self.d) def __contains__(self, item): return item in self.d def __iter__(se...
/rank_validation-1.0.2.tar.gz/rank_validation-1.0.2/rank_validation/normalise.py
0.845465
0.51879
normalise.py
pypi
import struct import sys import urllib2 import httplib import re import xml.etree.ElementTree class RankProvider(object): """Abstract class for obtaining the page rank (popularity) from a provider such as Google or Alexa. """ def __init__(self, host, proxy=None, timeout=30): """Keyword argumen...
/rank_provider-1.0.0.tar.gz/rank_provider-1.0.0/rank_provider.py
0.498047
0.196865
rank_provider.py
pypi
import numpy as np import warnings import numba import scipy.sparse as sp import itertools import numpy.ma as ma import time class Timer: def __init__(self, name): self._name = name def __enter__(self): self._start = time.time() return self def __exit__(self, *args): end ...
/rankerEval-0.2.0-py3-none-any.whl/rankereval/data.py
0.741019
0.393676
data.py
pypi
import sys import numpy as np from ranking_phase_fields.parse_icsd import * from ranking_phase_fields.generate_study import * from ranking_phase_fields.features import * from ranking_phase_fields.models import * # Import all models from pyod.models.auto_encoder import AutoEncoder from pyod.models.vae import VAE from p...
/rankfields-0.1.2.3-py3-none-any.whl/ranking_phase_fields/train_and_validate.py
0.520984
0.301658
train_and_validate.py
pypi
import numpy as np from ranking_phase_fields.symbols import * from ranking_phase_fields.features import * from ranking_phase_fields.train_and_validate import * def vec2name(ndes, natom): """ get index of the first feature for each element """ v = [] for i in range(natom): v += [ndes * i] return...
/rankfields-0.1.2.3-py3-none-any.whl/ranking_phase_fields/models.py
0.568536
0.509398
models.py
pypi
# RankFM [![PyPI version](https://badge.fury.io/py/rankfm.svg)](https://badge.fury.io/py/rankfm) [![CircleCI](https://circleci.com/gh/etlundquist/rankfm.svg?style=shield)](https://circleci.com/gh/etlundquist/rankfm) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/...
/rankfm-0.2.5.tar.gz/rankfm-0.2.5/README.md
0.656328
0.969584
README.md
pypi