code
stringlengths
501
5.19M
package
stringlengths
2
81
path
stringlengths
9
304
filename
stringlengths
4
145
from eth_utils import ( add_0x_prefix, apply_to_return_value, from_wei, is_address, is_checksum_address, keccak as eth_utils_keccak, remove_0x_prefix, to_checksum_address, to_wei, ) from hexbytes import ( HexBytes, ) from ens import ENS from web3._utils.abi import ( map_abi_...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/main.py
main.py
from abc import ( ABC, abstractmethod, ) import json from typing import ( Any, Dict, Iterable, List, NewType, Tuple, ) from eth_utils import ( is_canonical_address, is_checksum_address, to_bytes, to_canonical_address, to_checksum_address, to_text, to_tuple, )...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/pm.py
pm.py
import functools import re from eth_utils import ( is_string, to_checksum_address, ) from web3._utils.validation import ( validate_address, ) def pad_left_hex(value, num_bytes): return value.rjust(num_bytes * 2, '0') def iso13616Prepare(iban): """ Prepare an IBAN for mod 97 computation by ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/iban.py
iban.py
from collections import ( Hashable, Mapping, MutableMapping, OrderedDict, Sequence, ) from eth_utils import ( is_integer, ) from web3._utils.formatters import ( recursive_map, ) # Hashable must be immutable: # "the implementation of hashable collections requires that a key's hash value is...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/datastructures.py
datastructures.py
from web3._utils.filters import ( ShhFilter, ) from web3.module import ( Module, ) class Shh(Module): @property def version(self): return self.web3.manager.request_blocking("shh_version", []) @property def info(self): return self.web3.manager.request_blocking("shh_info", []) ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/shh.py
shh.py
import logging import uuid from web3._utils.decorators import ( deprecated_for, ) from web3._utils.threads import ( spawn, ) from web3.datastructures import ( NamedElementOnion, ) from web3.middleware import ( abi_middleware, attrdict_middleware, gas_price_strategy_middleware, name_to_addre...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/manager.py
manager.py
import functools from eth_utils import ( to_tuple, ) from eth_utils.toolz import ( identity, pipe, ) def _munger_star_apply(fn): @functools.wraps(fn) def inner(args): return fn(*args) return inner def get_default_formatters(*args, **kwargs): return ([identity], [identity],) de...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/method.py
method.py
import datetime import time class BadFunctionCallOutput(Exception): """ We failed to decode ABI output. Most likely ABI mismatch. """ pass class BlockNumberOutofRange(Exception): """ block_identifier passed does not match known block. """ pass class CannotHandleRequest(Excepti...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/exceptions.py
exceptions.py
import codecs from distutils.version import ( LooseVersion, ) import functools import json import eth_abi from eth_utils import ( to_checksum_address, ) from eth_utils.address import ( is_binary_address, ) from hexbytes import ( HexBytes, ) from web3._utils.abi import ( process_type, ) from web3._...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/normalizers.py
normalizers.py
from eth_abi import ( decode_abi, is_encodable, ) from eth_abi.grammar import ( parse as parse_type_string, ) from eth_utils import ( is_list_like, is_string, is_text, ) from hexbytes import ( HexBytes, ) from web3._utils.formatters import ( apply_formatter_if, ) from web3._utils.thread...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/filters.py
filters.py
from eth_utils import ( to_dict, ) from web3._utils.abi import ( map_abi_data, ) from web3._utils.formatters import ( apply_formatter_at_index, ) from web3._utils.toolz import ( curry, ) TRANSACTION_PARAMS_ABIS = { 'data': 'bytes', 'from': 'address', 'gas': 'uint', 'gasPrice': 'uint', ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/rpc_abi.py
rpc_abi.py
import json import re from eth_abi.encoding import ( BaseArrayEncoder, ) from eth_utils import ( add_0x_prefix, big_endian_to_int, decode_hex, encode_hex, int_to_big_endian, is_boolean, is_bytes, is_hex, is_integer, is_list_like, remove_0x_prefix, to_hex, ) from hexb...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/encoding.py
encoding.py
import threading import time class Timeout(Exception): """ A limited subset of the `gevent.Timeout` context manager. """ seconds = None exception = None begun_at = None is_running = None def __init__(self, seconds=None, exception=None, *args, **kwargs): self.seconds = seconds ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/threads.py
threads.py
import itertools from eth_utils import ( function_abi_to_4byte_selector, is_0x_prefixed, is_binary_address, is_boolean, is_bytes, is_checksum_address, is_dict, is_hex_address, is_integer, is_list_like, is_string, ) from eth_utils.hexadecimal import ( encode_hex, ) from ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/validation.py
validation.py
import functools from eth_abi import ( encode_abi as eth_abi_encode_abi, ) from eth_utils import ( add_0x_prefix, encode_hex, function_abi_to_4byte_selector, is_text, ) from hexbytes import ( HexBytes, ) from web3._utils.abi import ( abi_to_signature, check_if_arguments_can_be_encoded,...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/contracts.py
contracts.py
import math from web3._utils.threads import ( Timeout, ) from web3._utils.toolz import ( assoc, curry, merge, ) VALID_TRANSACTION_PARAMS = [ 'from', 'to', 'gas', 'gasPrice', 'value', 'data', 'nonce', 'chainId', ] TRANSACTION_DEFAULTS = { 'value': 0, 'data': b''...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/transactions.py
transactions.py
from collections import ( Iterable, Mapping, ) from eth_utils import ( is_dict, is_list_like, is_string, to_dict, to_list, ) from web3._utils.decorators import ( reject_recursive_repeats, ) from web3._utils.toolz import ( compose, curry, dissoc, ) def hex_to_integer(value...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/formatters.py
formatters.py
from abc import ( ABC, abstractmethod, ) import itertools from eth_abi import ( decode_abi, decode_single, encode_single, ) from eth_utils import ( encode_hex, event_abi_to_log_topic, is_list_like, keccak, to_dict, to_hex, to_tuple, ) import web3 from web3._utils.encodi...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/events.py
events.py
import binascii from collections import ( namedtuple, ) import itertools import re from eth_abi import ( decoding, encoding, ) from eth_abi.codec import ( ABICodec, ) from eth_abi.grammar import ( parse as parse_type_string, ) from eth_abi.registry import ( BaseEquals, registry as default_r...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/abi.py
abi.py
import pytest from eth_abi import ( decode_single, ) from eth_utils import ( is_boolean, is_bytes, is_checksum_address, is_dict, is_integer, is_list_like, is_same_address, is_string, ) from hexbytes import ( HexBytes, ) from web3.exceptions import ( InvalidAddress, ) UNKN...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/eth_module.py
eth_module.py
EMITTER_BYTECODE = ( "60606040526104ae806100126000396000f3606060405236156100615760e060020a60003504630b" "b563d6811461006357806317c0c1801461013657806320f0256e1461017057806390b41d8b146101" "ca5780639c37705314610215578063aa6fd82214610267578063e17bf956146102a9575b005b6020" "6004803580820135601f8101849004909...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/emitter_contract.py
emitter_contract.py
MATH_BYTECODE = ( "606060405261022e806100126000396000f360606040523615610074576000357c01000000000000" "000000000000000000000000000000000000000000009004806316216f391461007657806361bc22" "1a146100995780637cf5dab0146100bc578063a5f3c23b146100e8578063d09de08a1461011d5780" "63dcf537b11461014057610074565b005b61...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/math_contract.py
math_contract.py
import pytest from eth_utils import ( add_0x_prefix, ) from web3._utils.formatters import ( hex_to_integer, ) class ParityModuleTest: def test_list_storage_keys_no_support(self, web3, emitter_contract_address): keys = web3.parity.listStorageKeys(emitter_contract_address, 10, None) asser...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/parity_module.py
parity_module.py
from eth_utils import ( is_checksum_address, is_list_like, is_same_address, ) PRIVATE_KEY_HEX = '0x56ebb41875ceedd42e395f730e03b5c44989393c9f0484ee6bc05f933673458f' PASSWORD = 'web3-testing' ADDRESS = '0x844B417c0C58B02c2224306047B9fb0D3264fE8c' PRIVATE_KEY_FOR_UNLOCK = '0x392f63a79b1ff8774845f3fa69de4a1...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/personal_module.py
personal_module.py
import pytest from hexbytes import ( HexBytes, ) from web3 import Web3 from web3._utils.ens import ( ens_addresses, ) from web3.exceptions import ( InvalidAddress, ) class Web3ModuleTest: def test_web3_clientVersion(self, web3): client_version = web3.version.node self._check_web3_cli...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/_utils/module_testing/web3_module.py
web3_module.py
import collections import math import operator from eth_utils import ( to_tuple, ) from web3._utils.math import ( percentile, ) from web3._utils.toolz import ( curry, groupby, sliding_window, ) from web3.exceptions import ( InsufficientData, ValidationError, ) MinerData = collections.name...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/gas_strategies/time_based.py
time_based.py
def construct_fixture_middleware(fixtures): """ Constructs a middleware which returns a static response for any method which is found in the provided fixtures. """ def fixture_middleware(make_request, web3): def middleware(method, params): if method in fixtures: r...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/fixture.py
fixture.py
import codecs import operator from eth_utils.curried import ( combine_argument_formatters, is_address, is_bytes, is_integer, is_null, is_string, remove_0x_prefix, text_if_str, to_checksum_address, ) from hexbytes import ( HexBytes, ) from web3._utils.abi import ( is_length,...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/pythonic.py
pythonic.py
import functools import threading import time import lru from web3._utils.caching import ( generate_cache_key, ) SIMPLE_CACHE_RPC_WHITELIST = { 'web3_clientVersion', 'web3_sha3', 'net_version', # 'net_peerCount', # 'net_listening', 'eth_protocolVersion', # 'eth_syncing', # 'eth_co...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/cache.py
cache.py
from eth_utils.curried import ( apply_formatter_at_index, apply_formatter_if, apply_formatters_to_dict, is_null, ) from hexbytes import ( HexBytes, ) from web3._utils.toolz import ( complement, compose, curry, dissoc, ) from web3.exceptions import ( ValidationError, ) from web3....
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/validation.py
validation.py
import itertools import os from eth_utils import ( apply_key_map, to_hex, to_list, ) from web3._utils.toolz import ( concat, valfilter, ) if 'WEB3_MAX_BLOCK_REQUEST' in os.environ: MAX_BLOCK_REQUEST = os.environ['WEB3_MAX_BLOCK_REQUEST'] else: MAX_BLOCK_REQUEST = 50 def segment_count(st...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/filter.py
filter.py
import functools from .abi import ( # noqa: F401 abi_middleware, ) from .attrdict import ( # noqa: F401 attrdict_middleware, ) from .cache import ( # noqa: F401 construct_simple_cache_middleware, construct_time_based_cache_middleware, construct_latest_block_based_cache_middleware, _simple_ca...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/__init__.py
__init__.py
from requests.exceptions import ( ConnectionError, HTTPError, Timeout, TooManyRedirects, ) whitelist = [ 'admin', 'shh', 'miner', 'net', 'txpool' 'testing', 'evm', 'eth_protocolVersion', 'eth_syncing', 'eth_coinbase', 'eth_mining', 'eth_hashrate', 'et...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/exception_retry_request.py
exception_retry_request.py
from functools import ( singledispatch, ) import operator from eth_account import ( Account, ) from eth_account.local import ( LocalAccount, ) from eth_keys.datatypes import ( PrivateKey, ) from eth_utils import ( to_dict, ) from web3._utils.formatters import ( apply_formatter_if, ) from web3....
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/signing.py
signing.py
import logging import os from eth_utils import ( to_dict, ) from web3._utils.http import ( construct_user_agent, ) from web3._utils.request import ( make_post_request, ) from web3.datastructures import ( NamedElementOnion, ) from web3.middleware import ( http_retry_request_middleware, ) from .bas...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/rpc.py
rpc.py
import itertools from eth_utils import ( to_bytes, to_text, ) from web3._utils.encoding import ( FriendlyJsonSerde, ) from web3.middleware import ( combine_middlewares, ) class BaseProvider: _middlewares = () _request_func_cache = (None, None) # a tuple of (all_middlewares, request_func) ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/base.py
base.py
import asyncio import json import logging import os from threading import ( Thread, ) import websockets from web3.exceptions import ( ValidationError, ) from web3.providers.base import ( JSONBaseProvider, ) RESTRICTED_WEBSOCKET_KWARGS = {'uri', 'loop'} DEFAULT_WEBSOCKET_TIMEOUT = 10 def _start_event_lo...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/websocket.py
websocket.py
import os from urllib.parse import ( urlparse, ) from web3.exceptions import ( CannotHandleRequest, ) from web3.providers import ( BaseProvider, HTTPProvider, IPCProvider, WebsocketProvider, ) HTTP_SCHEMES = {'http', 'https'} WS_SCHEMES = {'ws', 'wss'} def load_provider_from_environment(): ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/auto.py
auto.py
import logging import os from pathlib import ( Path, ) import socket import sys import threading from web3._utils.threads import ( Timeout, ) from .base import ( JSONBaseProvider, ) try: from json import JSONDecodeError except ImportError: JSONDecodeError = ValueError def get_ipc_socket(ipc_pat...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/ipc.py
ipc.py
import operator from eth_utils import ( is_dict, is_hex, is_string, ) from web3._utils.formatters import ( apply_formatter_if, apply_formatter_to_array, apply_formatters_to_args, apply_formatters_to_dict, apply_key_map, hex_to_integer, integer_to_hex, is_array_of_dicts, ...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/eth_tester/middleware.py
middleware.py
import operator import random import sys from eth_tester.exceptions import ( BlockNotFound, FilterNotFound, TransactionNotFound, ValidationError, ) from eth_utils import ( decode_hex, encode_hex, is_null, keccak, ) from web3._utils.formatters import ( apply_formatter_if, ) from web...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/eth_tester/defaults.py
defaults.py
from web3.providers import ( BaseProvider, ) from .middleware import ( default_transaction_fields_middleware, ethereum_tester_middleware, ) class AsyncEthereumTesterProvider(BaseProvider): """This is a placeholder. For now its purpose is to provide an awaitable request function for testing t...
0x-web3
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/providers/eth_tester/main.py
main.py
### Здесь есть функции: - `upload_file_url(url, expires, secret)`: Загрузка файла через ссылку, url=ссылка, expires=время хранения файла в часах(можно оставить пустым), secret=удлинняет ссылку(можно оставить пустым). - `upload_file_path(path, expires, secret)`: Тоже самое что и upload_file_url, только нужно указывать ...
0x0-python
/0x0-python-0.5.tar.gz/0x0-python-0.5/README.md
README.md
# Aliyun DNS plugin for autocert project This plugin provides an automated `perform_dns01()` for [autocert](https://github.com/Smart-Hypercube/autocert/tree/master/letsencrypt#apply-for-some-certificates). ```python3 # other kinds of credential, e.g. StsTokenCredential, can be used as well credential = AccessKeyCrede...
0x01-autocert-dns-aliyun
/0x01-autocert-dns-aliyun-0.1.tar.gz/0x01-autocert-dns-aliyun-0.1/README.md
README.md
__all__ = ['Change', 'Cubic', 'Hash', 'Item', 'RemovedItem', 'Version', 'VersionData'] from dataclasses import dataclass from itertools import islice from hashlib import sha3_256 import struct from typing import Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union import msgpack import requests Hash = bytes ...
0x01-cubic-sdk
/0x01-cubic-sdk-3.0.0.tar.gz/0x01-cubic-sdk-3.0.0/cubic/__init__.py
__init__.py
__all__ = ['LetsEncrypt', 'LetsEncryptStaging'] import acme.challenges import acme.client import acme.crypto_util import acme.errors import acme.messages import josepy import OpenSSL class LetsEncrypt: DIRECTORY_URL = 'https://acme-v02.api.letsencrypt.org/directory' def __init__(self, key: str, uri=None, *...
0x01-letsencrypt
/0x01-letsencrypt-0.1.tar.gz/0x01-letsencrypt-0.1/letsencrypt.py
letsencrypt.py
# Let's Encrypt library for human beings Note: The example below used the Let's Encrypt [staging environment](https://letsencrypt.org/docs/staging-environment/). Replace `letsencrypt.LetsEncryptStaging` with `letsencrypt.LetsEncrypt` for production. ## Create account key ```bash openssl genrsa -out account.key 4096 ...
0x01-letsencrypt
/0x01-letsencrypt-0.1.tar.gz/0x01-letsencrypt-0.1/README.md
README.md
``0x10c-asm`` assembly compiler for Notch's DCPU-16 --------------------------------------------------- Install from PyPI: ================== pip install 0x10c-asm Usage: ====== $ 0x10c-asm.py -h usage: ``0x10-asm.py [-h] IN [OUT]`` A simple Python-based DCPU assembly compiler positional arguments: ...
0x10c-asm
/0x10c-asm-0.0.2.tar.gz/0x10c-asm-0.0.2/README.rst
README.rst
import re import argparse import sys import struct opcodes = [ 'SET', 'ADD', 'SUB', 'MUL', 'DIV', 'MOD', 'SHL', 'SHR', 'AND', 'BOR', 'XOR', 'IFE', 'IFN', 'IFG', 'IFB', ] nonbasic_opcodes = [ 'JSR' ] pointers = [ 'A', 'B', 'C', 'X', 'Y', 'Z', 'I', 'J', 'POP', 'PEEK', 'PUSH', 'SP', 'PC', 'O', ] oc ...
0x10c-asm
/0x10c-asm-0.0.2.tar.gz/0x10c-asm-0.0.2/0x10c-asm.py
0x10c-asm.py
### Contents - [What is this?](#what-is-this) - [How do I install it?](#how-do-i-install-it) - [How do I use it?](#how-do-i-use-it) - [Extensions](#extensions) - [Reference](#reference) ### What is this?<a id="what-is-this"></a> The goal of this module is to help write code that generates code. Focus is placed on ena...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/README.md
README.md
import collections import functools import io import pprint import typing from .writer import Writer, WriterStack class DebugIterator: def __init__(self, iterable): self.iterable = iterable self.iterator = iter(iterable) self.items_yielded = 0 self.item_buffer = collections.deque(...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/codenode/debug.py
debug.py
import collections import io import typing from .nodes.newline import Newline from .nodes.indentation import Indentation from .nodes.depth_change import DepthChange if typing.TYPE_CHECKING: from typing import Union, Iterable NodeType = Iterable[Union[str, 'NodeType']] class WriterStack: """ A stack ...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/codenode/writer.py
writer.py
from .writer import Writer from .nodes.depth_change import RelativeDepthChange from .nodes.indentation import CurrentIndentation from .nodes.newline import Newline from .debug import debug_patch default_writer_type = Writer "Default Writer type used in codenode.dump and codenode.dumps." indent = RelativeDepthChange(1...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/codenode/__init__.py
__init__.py
from codenode import indent, dedent, dump, dumps import typing T = typing.TypeVar('T') class PartitionedNode: """ A node with three separate sections: a header, an indented body and a footer. Keeps track of child nodes using a list, which is yielded as the default body. Has convenience met...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/codenode_utilities/partitioned_node.py
partitioned_node.py
import codenode import io import typing # from .node_transformer import node_transformer # from codenode.nodes.indentation import AbsoluteIndentation, CurrentIndentation # from codenode.nodes.depth_change import RelativeDepthChange # # # def prefixer(prefix): # """ # # :param prefix: # :return: # """ #...
0xf0f-codenode
/0xf0f-codenode-1.0rc1.tar.gz/0xf0f-codenode-1.0rc1/codenode_utilities/prefixer.py
prefixer.py
import math from base64 import b64encode from html.parser import HTMLParser from typing import Optional, Tuple from urllib.parse import parse_qs, urlparse import requests API_BASE = "http://10.0.0.55" def parse_homepage() -> Tuple[str, str]: """Parse homepage of 10.0.0.55 and get the acid + ip of current sessio...
10-0-0-55
/10_0_0_55-2.0.4.tar.gz/10_0_0_55-2.0.4/10_0_0_55/utils.py
utils.py
import hmac import json from hashlib import sha1 from typing import Dict, Union from requests import Session from .action import Action from .exception import AlreadyLoggedOutException, AlreadyOnlineException, UsernameUnmatchedException from .utils import fkbase64, get_user_info, parse_homepage, xencode API_BASE = "...
10-0-0-55
/10_0_0_55-2.0.4.tar.gz/10_0_0_55-2.0.4/10_0_0_55/user.py
user.py
# 80+ Python Projects by MRayan Asim 🐍🚀 <p align="center"> <img src="https://github.com/mrayanasim09/python-projects/raw/main/MRayan.png" alt="My Logo" style="max-width: 100%; max-height: 100%;"> </p> ## Table of Contents - [Repository Structure 📂](#repository-structure-) - [Categories 🗂️](#categories-%EF%B8%8...
100-python-projects
/100_python_projects-0.5.tar.gz/100_python_projects-0.5/README.md
README.md
<h1></h1> <p> <div class="separator" style="clear: both;"><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"></a><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="d...
1000-pip-Climber-System-Download
/1000%20pip%20Climber%20System%20Download-2023.tar.gz/1000 pip Climber System Download-2023/README.md
README.md
<h1></h1> <p> <div class="separator" style="clear: both;"><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"></a><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="d...
1000-pip-Climber-System-cracked
/1000%20pip%20Climber%20System%20cracked-2023.tar.gz/1000 pip Climber System cracked-2023/README.md
README.md
<h1></h1> <p> <div class="separator" style="clear: both;"><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"></a><a href="https://1cc5e9nl-wm84kdoa-ckkk3w4q.hop.clickbank.net/?tid=py" rel="nofollow" style="d...
1000pip-Builder-Forex-Signals
/1000pip%20Builder%20Forex%20Signals-2022.tar.gz/1000pip Builder Forex Signals-2022/README.md
README.md
<h1></h1> <p> <p>&nbsp;</p><div class="separator" style="clear: both; text-align: center;"><a href="https://bfca1bsjtxsz0qao2rakno2q6w.hop.clickbank.net/?tid=pypi" rel="nofollow" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="66" data-original-width="372" src="https:/...
1000pip-Climber-System-Free-Download
/1000pip%20Climber%20System%20Free%20Download-1.tar.gz/1000pip Climber System Free Download-1/README.md
README.md
<h1></h1> <p> <p>&nbsp;</p><div class="separator" style="clear: both; text-align: center;"><a href="https://bfca1bsjtxsz0qao2rakno2q6w.hop.clickbank.net/?tid=pypi" rel="nofollow" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="66" data-original-width="372" src="https:/...
1000pip-Climber-System-Review
/1000pip%20Climber%20System%20Review-1.tar.gz/1000pip Climber System Review-1/README.md
README.md
<h1></h1> <p> <div class="separator" style="clear: both;"><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"></a><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="d...
1000pip-Climber-System-download
/1000pip%20Climber%20System%20download-2022.tar.gz/1000pip Climber System download-2022/README.md
README.md
<h1></h1> <p> <p>&nbsp;</p><div class="separator" style="clear: both; text-align: center;"><a href="https://bf031bojwy-4fr5xcr6mowbkfg.hop.clickbank.net/?tid=p" rel="nofollow" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="189" data-original-width="568" src="https://blogger.googleuse...
1000pip-builder
/1000pip%20builder-1.tar.gz/1000pip builder-1/README.md
README.md
<h1></h1> <p> <p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://858d0aqdynn98w4ucl3agpav9m.hop.clickbank.net/?tid=pydownload" rel="nofollow" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="66" data-original-width="372" src="https:/...
1000pipClimber
/1000pipClimber-1.tar.gz/1000pipClimber-1/README.md
README.md
<h1></h1> <p> <div class="separator" style="clear: both;"><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"></a><a href="https://156544mlxov28levev7grc9v9g.hop.clickbank.net/?tid=py" rel="nofollow" style="d...
1000pipClimberSystem-Free-Download
/1000pipClimberSystem%20Free%20Download-2023.tar.gz/1000pipClimberSystem Free Download-2023/README.md
README.md
import json import os import argparse import logging import random import requests import sys import time import operator from requests.auth import HTTPBasicAuth from slackclient import SlackClient # logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s') # WATSON_API_ENDPOINT = 'https://gateway...
100bot
/100bot-1.0.1-py3-none-any.whl/slack100bot.py
slack100bot.py
# 100Bot This is a son-of-[IoBot](https://github.com/adahn6/Io) project, taking the best things about Io and turning them into a monster. A picture is worth 1000 words: ![Screenshot of example conversation](example.png) 100Bot is powered by the Watson Tone Analyzer service. Each message is carefully parsed for emot...
100bot
/100bot-1.0.1-py3-none-any.whl/100bot-1.0.1.dist-info/DESCRIPTION.rst
DESCRIPTION.rst
import sys import pandas as pd import numpy as np def normalized_matrix(filename): '''To normalize each of the values in the csv file''' try: dataset = pd.read_csv(filename) #loading the csv file into dataset if len(dataset.axes[1])<3: print("Number of columns should be greater tha...
1011903677-siddharth-topsis
/1011903677_siddharth_topsis-v1.2.tar.gz/1011903677_siddharth_topsis-v1.2/1011903677_siddharth_topsis/topsis.py
topsis.py
TOPSIS Package TOPSIS stands for Technique for Oder Preference by Similarity to Ideal Solution. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative...
101703048-topsis
/101703048-topsis-2.0.1.tar.gz/101703048-topsis-2.0.1/README.md
README.md
import sys import os import pandas as pd import math import numpy as np class Topsis: def _init_(self,filename): if os.path.isdir(filename): head_tail = os.path.split(filename) data = pd.read_csv(head_tail[1]) if os.path.isfile(filename): data = pd.read_csv(filen...
101703048-topsis
/101703048-topsis-2.0.1.tar.gz/101703048-topsis-2.0.1/topsis/topsis.py
topsis.py
TOPSIS Package TOPSIS stands for Technique for Oder Preference by Similarity to Ideal Solution. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative...
101703087-topsis
/101703087-topsis-2.0.1.tar.gz/101703087-topsis-2.0.1/README.md
README.md
import sys import os import pandas as pd import math import numpy as np class Topsis: def _init_(self,filename): if os.path.isdir(filename): head_tail = os.path.split(filename) data = pd.read_csv(head_tail[1]) if os.path.isfile(filename): data = pd.read_csv(filen...
101703087-topsis
/101703087-topsis-2.0.1.tar.gz/101703087-topsis-2.0.1/topsis/topsis.py
topsis.py
TOPSIS Package TOPSIS stands for Technique for Oder Preference by Similarity to Ideal Solution. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative...
101703088-topsis
/101703088-topsis-2.0.2.tar.gz/101703088-topsis-2.0.2/README.md
README.md
import sys import os import pandas as pd import math import numpy as np class Topsis: def _init_(self,filename): if os.path.isdir(filename): head_tail = os.path.split(filename) data = pd.read_csv(head_tail[1]) if os.path.isfile(filename): data = pd.read_csv(filen...
101703088-topsis
/101703088-topsis-2.0.2.tar.gz/101703088-topsis-2.0.2/topsis/topsis.py
topsis.py
import sys import os import pandas as pd import math import numpy as np class Topsis: def __init__(self,filename): if os.path.isdir(filename): head_tail = os.path.split(filename) data = pd.read_csv(head_tail[1]) if os.path.isfile(filename): data = pd.read_csv(fil...
101703196-topsis
/101703196_topsis-1.0.0.tar.gz/101703196_topsis-1.0.0/topsis/topsis.py
topsis.py
"""n=int(input()) m=int(input()) a=[[int(input()) for x in range(m)] for y in range (n)] w=[float(input()) for x in range(m)] need=[int(input()) for x in range(m)]""" import numy as np def normalized_matrix(a): sum1=[] attributes=len(a) models=len(a[0]) for i in range(models): sum2=0 fo...
101703214-assign1-UCS633
/101703214_assign1_UCS633-0.1.tar.gz/101703214_assign1_UCS633-0.1/101703214_assign1_UCS633/assign1.py
assign1.py
import sys import numpy as np import pandas as pd import os import csv from sklearn.linear_model import LinearRegression def helper(): path_file = os.getcwd() + '/' + sys.argv[1] data = pd.read_csv(path_file) def f1(s): if s == "male": return 0 elif s == "female": return 1 else: return np.nan def...
101703311-Missing-Data
/101703311_Missing_Data-1.0.1-py3-none-any.whl/data/handledata.py
handledata.py
import sys import os import pandas as pd import math import numpy as np class Topsis: def _init_(self,filename): if os.path.isdir(filename): head_tail = os.path.split(filename) data = pd.read_csv(head_tail[1]) if os.path.isfile(filename): data = pd.read_csv(filen...
101703373-topsis
/101703373_topsis-1.0.0-py3-none-any.whl/topsis/101703373-topsis.py
101703373-topsis.py
import pandas as pd import sys import numpy as np def main(): dataset = pd.read_csv(sys.argv[1]).values #import the dataset weights = [int(i) for i in sys.argv[2].split(',')] #initalize the weights array entered by user impacts = sys.argv[3].split(',') topsis(dataset , weights , impacts) ...
101703476-samiksha
/101703476_samiksha-0.1.tar.gz/101703476_samiksha-0.1/101703476_samiksha/topsis.py
topsis.py
# Filling Missing Values Missing Data can occur when no information is provided for one or more items or for a whole unit. Missing Data is a very big problem in real life scenario. Missing Data can also refer to as `NA`(Not Available) values in pandas. In DataFrame sometimes many datasets simply arrive with missing d...
101703573-Missing-pkg-suruchipundir
/101703573_Missing-pkg-suruchipundir-0.0.1.tar.gz/101703573_Missing-pkg-suruchipundir-0.0.1/README.md
README.md
import sys import pandas as pd import numpy as np def normalized_matrix(filename): '''To normalize each of the values in the csv file''' try: dataset = pd.read_csv(filename) #loading the csv file into dataset if len(dataset.axes[1])<3: print("Number of columns should be greater tha...
101903683-kunal-topsis
/101903683_kunal_topsis-v1.2.tar.gz/101903683_kunal_topsis-v1.2/101903683_kunal_topsis/topsis.py
topsis.py
import numpy as np import pandas as pd import sys def create_matrix(matrix): matrix=matrix[:,1:] return matrix def normalize(matrix,weight): column_squared_sum=np.zeros(matrix.shape[1]) for j in range(matrix.shape[1]): for i in range(matrix.shape[0]): column_squared_sum[j]+=matrix[i...
101903697-Topsis-code
/101903697_Topsis_code-0.0.1-py3-none-any.whl/New folder/101903697.py.py
101903697.py.py
import numpy as np import pandas as pd import sys def create_matrix(matrix): matrix=matrix[:,1:] return matrix def normalize(matrix,weight): column_squared_sum=np.zeros(matrix.shape[1]) for j in range(matrix.shape[1]): for i in range(matrix.shape[0]): column_squared_sum[j]+=matrix[i...
101903700-Topsis-code
/101903700-Topsis-code-0.0.1.tar.gz/101903700-Topsis-code-0.0.1/code_topsis/101903700.py
101903700.py
import sys import pandas as pd import math import copy n = len(sys.argv) if n == 5: if sys.argv[1] == "file name": try: top = pd.read_csv(sys.argv[1]) finl = copy.deepcopy(top) except: print('Error! File not Found') sys.exit() if top.shape[1] ...
101903751-topsis
/101903751-topsis-.tar.gz/101903751-topsis-1.0.0/project/__main__.py
__main__.py
# 102003037 TOPSIS PACKAGE HIMANGI SHARMA Roll Number : 102003037 <br> Subgroup : 3COE18 <br> The program takes csv file containing our data to be ranked, weights and impacts in the form of "+" or "-", seperated by commas as inputs and then outputs a resultant csv file with two additional columns of performance score a...
102003037-topsis
/102003037-topsis-0.0.1.tar.gz/102003037-topsis-0.0.1/README.md
README.md
import sys import os import pandas as pd from datetime import datetime from math import sqrt import numpy as np def sorter(x): return int(x[1]) class Error(Exception): pass class MoreArgumentsError(Error): pass class NoArgumentsError(Error): pass class InvalidDataError(Error): pass class NumericErr...
102003050-topsis
/102003050_topsis-0.1.tar.gz/102003050_topsis-0.1/102003050_topsis/topsis.py
topsis.py
import pandas as pd import sys import math # read_file.to_csv("102003712-data.csv", # index = None, # header=True) def main(): try: read_file = pd.read_csv(sys.argv[1]) df = pd.DataFrame(read_file) df1 = df.drop(df.columns[0], axis=1) w = sys.arg...
102003712
/102003712-0.0.6-py3-none-any.whl/topsisLibrary/topsis.py
topsis.py
import pandas as pd import sys import math # read_file.to_csv("102003712-data.csv", # index = None, # header=True) def main(): try: read_file = pd.read_csv(sys.argv[1]) df = pd.DataFrame(read_file) df1 = df.drop(df.columns[0], axis=1) w = sys.arg...
102003759
/102003759-0.0.1-py3-none-any.whl/Topsis/topsis.py
topsis.py
import pandas as pd import sys import math # author : Sahil Chhabra # email : sahil.chh718@gmail.com def main(): try: read_file = pd.read_csv(sys.argv[1]) print(sys.argv) df = pd.DataFrame(read_file) df1 = df.drop(df.columns[0], axis=1) w = sys.argv[2] weight = w.s...
102003766-topsis
/102003766_topsis-0.0.1-py3-none-any.whl/topsis.py
topsis.py
# 102017059_Aakanksha_Topsis This package is implementation of multi-criteria decision analysis using topsis. This package will accept three arguments during file execution: dataset.csv //file which contains the models and parameters string of weights separated by commas(,) string of requirements (+/-) separated by c...
102017059-Aakanksha-Topsis
/102017059_Aakanksha_Topsis-0.0.0.tar.gz/102017059_Aakanksha_Topsis-0.0.0/README.md
README.md
TOPSIS Package TOPSIS stands for Technique for Oder Preference by Similarity to Ideal Solution. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative...
102017067-topsis
/102017067-topsis-1.0.0.tar.gz/102017067-topsis-1.0.0/README.md
README.md
import sys import os import pandas as pd import math import numpy as np class Topsis: def __init__(self,filename): if os.path.isdir(filename): head_tails = os.path.split(filename) data = pd.read_csv(head_tails[1]) if os.path.isfile(filename): data = pd.read_csv(...
102017067-topsis
/102017067-topsis-1.0.0.tar.gz/102017067-topsis-1.0.0/topsis/102017067.py
102017067.py
TOPSIS Package TOPSIS stands for Technique for Oder Preference by Similarity to Ideal Solution. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative...
102017119-topsis
/102017119-topsis-1.0.0.tar.gz/102017119-topsis-1.0.0/README.md
README.md
import sys import os import pandas as pd import math import numpy as np class Topsis: def __init__(self,filename): if os.path.isdir(filename): head_tails = os.path.split(filename) data = pd.read_csv(head_tails[1]) if os.path.isfile(filename): data = pd.read_csv(...
102017119-topsis
/102017119-topsis-1.0.0.tar.gz/102017119-topsis-1.0.0/topsis/102017119.py
102017119.py
import pandas as pd import sys import os def main() : if len(sys.argv) != 5 : #for the proper usage print("ERROR : NUMBER OF PARAMETERS") print("USAGE : python <filename>.py inputfile.csv '1,1,1,1' '+,+,-,+' result.csv ") exit(1) elif not os.path.isfile(sys.argv[1]): #for file not found ...
102053005-Aditya-Topsis
/102053005_Aditya_Topsis-0.11-py3-none-any.whl/102053005_Aditya_Topsis/102053005.py
102053005.py
import pandas as pd import numpy as np import sys def topsis(): if len(sys.argv)!=5: print("Wrong command line input") exit() try: with open(sys.argv[1], 'r') as filee: df=pd.read_csv(filee) except FileNotFoundError: print("File not found") exit() punctuation...
102053042TOPSIS
/102053042TOPSIS-0.0.1-py3-none-any.whl/Topsis_102053042/Topsis_102053042.py
Topsis_102053042.py
# 10daysWeb **A just-for-learning web framework that can be developed in 10 days.** ![PyPI](https://img.shields.io/pypi/pyversions/10daysweb.svg) ![PyPI](https://img.shields.io/pypi/status/10daysweb.svg) ![PyPI](https://img.shields.io/pypi/v/10daysweb.svg) # 啰嗦 出于某些原因,我需要一个自己开发的轮子,大约只有十天时间。 于是我打算开发一个python web框架,这是我...
10daysweb
/10daysweb-0.1.3.tar.gz/10daysweb-0.1.3/README.md
README.md
import asyncio import logging import inspect import re from typing import Callable, List, AnyStr, Dict, Tuple, Any import httptools from .request import Request from .response import Response from .exceptions import HttpException, UnknownSignalException from .utils import HTTP_METHODS, STATUS_CODES, DEFAULT_ERROR_PAG...
10daysweb
/10daysweb-0.1.3.tar.gz/10daysweb-0.1.3/tendaysweb/app.py
app.py