id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,400 | ConnMan.py | s3tools_s3cmd/S3/ConnMan.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 13,293 | Python | .py | 286 | 35.251748 | 116 | 0.598936 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,401 | Progress.py | s3tools_s3cmd/S3/Progress.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 8,555 | Python | .py | 191 | 35.534031 | 122 | 0.581563 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,402 | PkgInfo.py | s3tools_s3cmd/S3/PkgInfo.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 938 | Python | .py | 23 | 39.652174 | 86 | 0.615132 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,403 | AccessLog.py | s3tools_s3cmd/S3/AccessLog.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 - Access Control List representation
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGR... | 3,622 | Python | .py | 93 | 31.462366 | 112 | 0.596866 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,404 | BidirMap.py | s3tools_s3cmd/S3/BidirMap.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 1,403 | Python | .py | 39 | 29.384615 | 107 | 0.511078 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,405 | SortedDict.py | s3tools_s3cmd/S3/SortedDict.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 3,152 | Python | .py | 82 | 30.536585 | 84 | 0.536498 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,406 | BaseUtils.py | s3tools_s3cmd/S3/BaseUtils.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 10,452 | Python | .py | 289 | 30.799308 | 115 | 0.642978 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,407 | Custom_httplib27.py | s3tools_s3cmd/S3/Custom_httplib27.py | from __future__ import absolute_import, print_function
import os
import httplib
from httplib import (_CS_REQ_SENT, _CS_REQ_STARTED, CONTINUE, UnknownProtocol,
CannotSendHeader, NO_CONTENT, NOT_MODIFIED, EXPECTATION_FAILED,
HTTPMessage, HTTPException)
try:
from cStringIO ... | 8,180 | Python | .py | 192 | 35.994792 | 86 | 0.674299 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,408 | HashCache.py | s3tools_s3cmd/S3/HashCache.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
try:
# python 3 support
import cPickle as pickle
except ImportError:
import pickle
from .Utils import deunicodise
class HashCache(object):
def __init__(self):
self.inodes = dict()
def add(self, dev, inode, mtime, size, md5):
... | 1,957 | Python | .py | 54 | 26.314815 | 65 | 0.534601 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,409 | MultiPart.py | s3tools_s3cmd/S3/MultiPart.py | # -*- coding: utf-8 -*-
## Amazon S3 Multipart upload support
## Author: Jerome Leclanche <jerome.leclanche@gmail.com>
## License: GPL Version 2
from __future__ import absolute_import
import sys
from logging import debug, info, warning, error
from .Crypto import calculateChecksum
from .Exceptions import ParameterErr... | 13,649 | Python | .py | 281 | 33.096085 | 96 | 0.516664 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,410 | Crypto.py | s3tools_s3cmd/S3/Crypto.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 12,924 | Python | .py | 279 | 39.516129 | 172 | 0.639392 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,411 | Utils.py | s3tools_s3cmd/S3/Utils.py | # -*- coding: utf-8 -*-
## --------------------------------------------------------------------
## Amazon S3 manager
##
## Authors : Michal Ludvig <michal@logix.cz> (https://www.logix.cz/michal)
## Florent Viard <florent@sodria.com> (https://www.sodria.com)
## Copyright : TGRMN Software, Sodria SAS and c... | 11,033 | Python | .py | 263 | 35.878327 | 246 | 0.652251 | s3tools/s3cmd | 4,533 | 903 | 301 | GPL-2.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,412 | setup.py | bitcoin-abe_bitcoin-abe/setup.py | from distutils.core import setup
execfile("Abe/version.py")
setup(
name = "Abe",
version = __version__,
requires = ['Crypto.Hash'],
packages = ['Abe', 'Abe.Chain'],
package_data = {'Abe': ['htdocs/*']},
author = "John Tobey",
author_email = "jtobey@john-edwin-tob... | 1,877 | Python | .py | 41 | 39.731707 | 83 | 0.636661 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,413 | conftest.py | bitcoin-abe_bitcoin-abe/test/conftest.py | # Copyright(C) 2014 by Abe developers.
# conftest.py: pytest session-scoped objects
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option... | 1,003 | Python | .py | 23 | 41.913043 | 70 | 0.782787 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,414 | db.py | bitcoin-abe_bitcoin-abe/test/db.py | # Copyright(C) 2014 by Abe developers.
# db.py: temporary database for automated testing
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your o... | 7,825 | Python | .py | 217 | 26.967742 | 113 | 0.574221 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,415 | test_block_order.py | bitcoin-abe_bitcoin-abe/test/test_block_order.py | # Copyright(C) 2014 by Abe developers.
# test_block_order.py: test Abe importing blocks out of order.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, ... | 2,486 | Python | .py | 60 | 36.866667 | 100 | 0.689212 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,416 | datagen.py | bitcoin-abe_bitcoin-abe/test/datagen.py | # Copyright(C) 2014 by Abe developers.
# datagen.py: test data generation
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any late... | 6,606 | Python | .py | 156 | 32.403846 | 145 | 0.581113 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,417 | test_max200.py | bitcoin-abe_bitcoin-abe/test/test_max200.py | # Copyright(C) 2014 by Abe developers.
# test_max200.py: test Abe loading through Maxcoin Block 200.
# This test exercises SHA3 block hashes and an unusual Merkle root algorithm.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... | 1,335 | Python | .py | 32 | 39.21875 | 81 | 0.754048 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,418 | test_btc200.py | bitcoin-abe_bitcoin-abe/test/test_btc200.py | # Copyright(C) 2014 by Abe developers.
# test_btc200.py: test Abe loading through Bitcoin Block 200.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, o... | 6,062 | Python | .py | 122 | 46.139344 | 203 | 0.743555 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,419 | test_util.py | bitcoin-abe_bitcoin-abe/test/test_util.py | # Copyright(C) 2014 by Abe developers.
# test_util.py: test Abe utility functions
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) ... | 2,899 | Python | .py | 47 | 58.957447 | 306 | 0.834804 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,420 | test_std_tx.py | bitcoin-abe_bitcoin-abe/test/test_std_tx.py | # Copyright(C) 2014 by Abe developers.
# test_std_tx.py: test Abe importing standard Bitcoin transaction types.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
#... | 14,199 | Python | .py | 305 | 42.590164 | 118 | 0.703044 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,421 | data.py | bitcoin-abe_bitcoin-abe/test/data.py | import datagen
import Abe.Chain
from Abe.util import hex2b
PUBKEYS = [
x.decode('hex') for x in [
# Satoshi's genesis pubkey.
'04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f',
# Testnet Block 1 pubkey.
... | 1,787 | Python | .py | 34 | 44.058824 | 141 | 0.706827 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,422 | namecoin_dump.py | bitcoin-abe_bitcoin-abe/tools/namecoin_dump.py | #!/usr/bin/env python
# Dump the Namecoin name data to standard output.
# Copyright(C) 2011 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# ... | 5,174 | Python | .py | 128 | 31.679688 | 79 | 0.594654 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,423 | ecdsa.py | bitcoin-abe_bitcoin-abe/contrib/ecdsa.py | #!/usr/bin/env python
# Retrieved from http://ecdsa.org/ecdsa.py on 2011-10-17.
# Thanks to ThomasV.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, o... | 45,627 | Python | .py | 977 | 33.829069 | 297 | 0.506261 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,424 | reconfigure.py | bitcoin-abe_bitcoin-abe/Abe/reconfigure.py | #!/usr/bin/env python
# Copyright(C) 2012,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version... | 2,435 | Python | .py | 61 | 35.016393 | 87 | 0.692797 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,425 | util.py | bitcoin-abe_bitcoin-abe/Abe/util.py | # Copyright(C) 2011,2012,2013,2014 by Abe developers.
# Copyright (c) 2010 Gavin Andresen
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your o... | 5,908 | Python | .py | 162 | 31.222222 | 77 | 0.655281 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,426 | ripemd_via_hashlib.py | bitcoin-abe_bitcoin-abe/Abe/ripemd_via_hashlib.py | # RIPEMD hash interface via hashlib for those who don't have
# Crypto.Hash.RIPEMD.
import hashlib
def new(data=''):
h = hashlib.new('ripemd160')
h.update(data)
return h
| 183 | Python | .py | 7 | 23.142857 | 60 | 0.718391 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,427 | upgrade.py | bitcoin-abe_bitcoin-abe/Abe/upgrade.py | #!/usr/bin/env python
# Copyright(C) 2011,2012,2013,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any lat... | 44,689 | Python | .py | 1,090 | 32.069725 | 107 | 0.585204 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,428 | firstbits.py | bitcoin-abe_bitcoin-abe/Abe/firstbits.py | #!/usr/bin/env python
# Copyright(C) 2011,2012 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version... | 2,936 | Python | .py | 72 | 33.652778 | 71 | 0.644709 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,429 | genesis_tx.py | bitcoin-abe_bitcoin-abe/Abe/genesis_tx.py | # Copyright(C) 2013 by Abe developers.
# genesis_tx.py: known transactions unavailable through RPC for
# historical reasons: https://bitcointalk.org/index.php?topic=119530.0
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publis... | 6,396 | Python | .py | 59 | 103.59322 | 631 | 0.894654 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,430 | SqlAbstraction.py | bitcoin-abe_bitcoin-abe/Abe/SqlAbstraction.py | # Copyright(C) 2011,2012,2013 by John Tobey <jtobey@john-edwin-tobey.org>
# sql.py: feature-detecting, SQL-transforming database abstraction layer
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Fo... | 36,459 | Python | .py | 883 | 29.275198 | 111 | 0.525232 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,431 | abe.py | bitcoin-abe_bitcoin-abe/Abe/abe.py | #!/usr/bin/env python
# Copyright(C) 2011,2012,2013,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any lat... | 79,821 | Python | .py | 1,824 | 31.859649 | 114 | 0.514801 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,432 | verify.py | bitcoin-abe_bitcoin-abe/Abe/verify.py | #!/usr/bin/env python
# Prototype database validation script. Same args as abe.py.
# Copyright(C) 2011,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either ve... | 24,026 | Python | .py | 523 | 32.982792 | 82 | 0.53415 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,433 | DataStore.py | bitcoin-abe_bitcoin-abe/Abe/DataStore.py | # Copyright(C) 2011,2012,2013,2014 by Abe developers.
# DataStore.py: back end database access for Abe.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License... | 130,488 | Python | .py | 2,959 | 30.837445 | 111 | 0.519798 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,434 | readconf.py | bitcoin-abe_bitcoin-abe/Abe/readconf.py | # Copyright(C) 2011,2012,2013 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is d... | 9,530 | Python | .py | 294 | 23.765306 | 78 | 0.517999 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,435 | admin.py | bitcoin-abe_bitcoin-abe/Abe/admin.py | #!/usr/bin/env python
# Copyright(C) 2012,2013,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later ve... | 9,888 | Python | .py | 239 | 33.179916 | 80 | 0.606797 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,436 | deserialize.py | bitcoin-abe_bitcoin-abe/Abe/deserialize.py | #
#
#
from BCDataStream import *
from enumeration import Enumeration
from base58 import public_key_to_bc_address, hash_160_to_bc_address
import logging
import socket
import time
from util import short_hex, long_hex
import struct
def parse_CAddress(vds):
d = {}
d['nVersion'] = vds.read_int32()
d['nTime'] = vds.r... | 12,744 | Python | .py | 312 | 36.820513 | 134 | 0.648023 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,437 | base58.py | bitcoin-abe_bitcoin-abe/Abe/base58.py | #!/usr/bin/env python
"""encode/decode base58 in the same way that Bitcoin does"""
import math
__b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__b58base = len(__b58chars)
def b58encode(v):
""" encode v, which is a string of bytes, to base58.
"""
long_value = 0L
for (i, c) in e... | 2,604 | Python | .py | 79 | 29.518987 | 80 | 0.68755 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,438 | mixup.py | bitcoin-abe_bitcoin-abe/Abe/mixup.py | #!/usr/bin/env python
# Copyright(C) 2012,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later versio... | 6,013 | Python | .py | 142 | 31.894366 | 81 | 0.549684 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,439 | enumeration.py | bitcoin-abe_bitcoin-abe/Abe/enumeration.py | #
# enum-like type
# From the Python Cookbook, downloaded from http://code.activestate.com/recipes/67107/
#
import types, string, exceptions
class EnumException(exceptions.Exception):
pass
class Enumeration:
def __init__(self, name, enumList):
self.__doc__ = name
lookup = { }
reverseLo... | 1,365 | Python | .py | 39 | 25.641026 | 86 | 0.568731 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,440 | BCDataStream.py | bitcoin-abe_bitcoin-abe/Abe/BCDataStream.py | #
# Workalike python implementation of Bitcoin's CDataStream class.
#
import struct
import StringIO
import mmap
class SerializationError(Exception):
""" Thrown when there's a problem deserializing or serializing """
class BCDataStream(object):
def __init__(self):
self.input = None
self.read_cursor = 0
... | 3,809 | Python | .py | 99 | 33.777778 | 87 | 0.666667 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,441 | Dash.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Dash.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,114 | Python | .py | 26 | 39.153846 | 70 | 0.72048 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,442 | NmcAuxPowChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/NmcAuxPowChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,349 | Python | .py | 30 | 40.8 | 102 | 0.715373 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,443 | Maxcoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Maxcoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,308 | Python | .py | 31 | 38.258065 | 78 | 0.71934 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,444 | ScryptJaneChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/ScryptJaneChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,318 | Python | .py | 28 | 43.785714 | 92 | 0.755452 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,445 | Unbreakablecoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Unbreakablecoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,158 | Python | .py | 26 | 40.846154 | 70 | 0.731383 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,446 | KeccakChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/KeccakChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 950 | Python | .py | 22 | 40.863636 | 70 | 0.76 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,447 | BlackCoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/BlackCoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,369 | Python | .py | 32 | 37.8125 | 70 | 0.70045 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,448 | PpcPosChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/PpcPosChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,130 | Python | .py | 26 | 40.230769 | 70 | 0.740909 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,449 | X11PosChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/X11PosChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 829 | Python | .py | 18 | 44.555556 | 70 | 0.789604 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,450 | Namecoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Namecoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 2,180 | Python | .py | 50 | 35.64 | 94 | 0.649057 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,451 | LegacyNoBit8.py | bitcoin-abe_bitcoin-abe/Abe/Chain/LegacyNoBit8.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 859 | Python | .py | 20 | 40.9 | 70 | 0.773923 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,452 | Bitcoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Bitcoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,035 | Python | .py | 23 | 41.521739 | 70 | 0.728444 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,453 | Californium.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Californium.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distr... | 1,173 | Python | .py | 27 | 39.62963 | 70 | 0.722417 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,454 | Sha256NmcAuxPowChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Sha256NmcAuxPowChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 856 | Python | .py | 18 | 46.055556 | 70 | 0.796407 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,455 | NvcChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/NvcChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,005 | Python | .py | 23 | 41.434783 | 70 | 0.771195 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,456 | Sha256Chain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Sha256Chain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 970 | Python | .py | 22 | 41.772727 | 85 | 0.765079 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,457 | __init__.py | bitcoin-abe_bitcoin-abe/Abe/Chain/__init__.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 8,312 | Python | .py | 181 | 37.928177 | 107 | 0.645975 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,458 | LtcScryptChain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/LtcScryptChain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 970 | Python | .py | 22 | 41.409091 | 73 | 0.762963 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,459 | Hirocoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Hirocoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,126 | Python | .py | 26 | 39.615385 | 70 | 0.72354 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,460 | Testnet.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Testnet.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,177 | Python | .py | 29 | 36.758621 | 70 | 0.715035 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,461 | X11Chain.py | bitcoin-abe_bitcoin-abe/Abe/Chain/X11Chain.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,022 | Python | .py | 23 | 41.608696 | 70 | 0.763819 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,462 | Bitleu.py | bitcoin-abe_bitcoin-abe/Abe/Chain/Bitleu.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,223 | Python | .py | 28 | 39.892857 | 70 | 0.728799 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,463 | NovaCoin.py | bitcoin-abe_bitcoin-abe/Abe/Chain/NovaCoin.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,085 | Python | .py | 25 | 39.76 | 70 | 0.725379 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,464 | CryptoCash.py | bitcoin-abe_bitcoin-abe/Abe/Chain/CryptoCash.py | # Copyright(C) 2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is dist... | 1,052 | Python | .py | 24 | 40.416667 | 70 | 0.728516 | bitcoin-abe/bitcoin-abe | 978 | 653 | 161 | AGPL-3.0 | 9/5/2024, 5:10:46 PM (Europe/Amsterdam) |
9,465 | test_fuzzywuzzy_hypothesis.py | seatgeek_fuzzywuzzy/test_fuzzywuzzy_hypothesis.py | from itertools import product
from functools import partial
from string import ascii_letters, digits, punctuation
from hypothesis import given, assume, settings
import hypothesis.strategies as st
import pytest
from fuzzywuzzy import fuzz, process, utils
HYPOTHESIS_ALPHABET = ascii_letters + digits + punctuation
d... | 5,123 | Python | .py | 124 | 32.379032 | 102 | 0.631388 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,466 | setup.py | seatgeek_fuzzywuzzy/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
from fuzzywuzzy import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirn... | 1,178 | Python | .py | 35 | 28.8 | 75 | 0.65757 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,467 | test_fuzzywuzzy.py | seatgeek_fuzzywuzzy/test_fuzzywuzzy.py | # -*- coding: utf8 -*-
from __future__ import unicode_literals
import unittest
import re
import sys
import pycodestyle
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
from fuzzywuzzy import utils
from fuzzywuzzy.string_processing import StringProcessor
if sys.version_info[0] == 3:
unicode = str
class... | 18,565 | Python | .py | 423 | 34.673759 | 141 | 0.622421 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,468 | benchmarks.py | seatgeek_fuzzywuzzy/benchmarks.py | # -*- coding: utf8 -*-
from timeit import timeit
import math
import csv
iterations = 100000
reader = csv.DictReader(open('data/titledata.csv'), delimiter='|')
titles = [i['custom_title'] for i in reader]
title_blob = '\n'.join(titles)
cirque_strings = [
"cirque du soleil - zarkana - las vegas",
"cirque du... | 4,442 | Python | .py | 94 | 40.510638 | 149 | 0.598194 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,469 | test_fuzzywuzzy_pytest.py | seatgeek_fuzzywuzzy/test_fuzzywuzzy_pytest.py | from fuzzywuzzy import process
def test_process_warning(capsys):
"""Check that a string reduced to 0 by processor logs a warning to stderr"""
query = ':::::::'
choices = [':::::::']
_ = process.extractOne(query, choices)
out, err = capsys.readouterr()
outstr = ("WARNING:root:Applied proces... | 496 | Python | .py | 12 | 33.916667 | 80 | 0.599581 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,470 | process.py | seatgeek_fuzzywuzzy/fuzzywuzzy/process.py | #!/usr/bin/env python
# encoding: utf-8
from . import fuzz
from . import utils
import heapq
import logging
from functools import partial
default_scorer = fuzz.WRatio
default_processor = utils.full_process
def extractWithoutOrder(query, choices, processor=default_processor, scorer=default_scorer, score_cutoff=0):
... | 11,481 | Python | .py | 225 | 42.035556 | 122 | 0.664791 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,471 | utils.py | seatgeek_fuzzywuzzy/fuzzywuzzy/utils.py | from __future__ import unicode_literals
import sys
import functools
from fuzzywuzzy.string_processing import StringProcessor
PY3 = sys.version_info[0] == 3
def validate_string(s):
"""
Check input has length and that length > 0
:param s:
:return: True if len(s) > 0 else False
"""
try:
... | 2,595 | Python | .py | 78 | 27.358974 | 94 | 0.65502 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,472 | string_processing.py | seatgeek_fuzzywuzzy/fuzzywuzzy/string_processing.py | from __future__ import unicode_literals
import re
import string
import sys
PY3 = sys.version_info[0] == 3
if PY3:
string = str
class StringProcessor(object):
"""
This class defines method to process strings in the most
efficient way. Ideally all the methods below use unicode strings
for both inpu... | 780 | Python | .py | 24 | 27.583333 | 71 | 0.694667 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,473 | StringMatcher.py | seatgeek_fuzzywuzzy/fuzzywuzzy/StringMatcher.py | #!/usr/bin/env python
# encoding: utf-8
"""
StringMatcher.py
ported from python-Levenshtein
[https://github.com/miohtama/python-Levenshtein]
License available here: https://github.com/miohtama/python-Levenshtein/blob/master/COPYING
"""
from Levenshtein import *
from warnings import warn
class StringMatcher:
"""... | 2,437 | Python | .py | 64 | 29.265625 | 90 | 0.59737 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,474 | fuzz.py | seatgeek_fuzzywuzzy/fuzzywuzzy/fuzz.py | #!/usr/bin/env python
# encoding: utf-8
from __future__ import unicode_literals
import platform
import warnings
try:
from .StringMatcher import StringMatcher as SequenceMatcher
except ImportError:
if platform.python_implementation() != "PyPy":
warnings.warn('Using slow pure-python SequenceMatcher. Inst... | 9,591 | Python | .py | 236 | 34.872881 | 114 | 0.669467 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,475 | test_fuzzywuzzy_pytest.py | seatgeek_fuzzywuzzy/test_fuzzywuzzy_pytest.py | from fuzzywuzzy import process
def test_process_warning(capsys):
"""Check that a string reduced to 0 by processor logs a warning to stderr"""
query = ':::::::'
choices = [':::::::']
_ = process.extractOne(query, choices)
out, err = capsys.readouterr()
outstr = ("WARNING:root:Applied proces... | 496 | Python | .pyt | 12 | 33.916667 | 80 | 0.599581 | seatgeek/fuzzywuzzy | 9,206 | 876 | 107 | GPL-2.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,476 | setup.py | p2pool_p2pool/setup.py | import os
import shutil
import sys
import zipfile
import platform
from distutils.core import setup
from distutils.sysconfig import get_python_lib
import py2exe
version = __import__('p2pool').__version__
im64 = '64' in platform.architecture()[0]
extra_includes = []
import p2pool.networks
extra_includes.extend('p2pool... | 2,441 | Python | .py | 66 | 30.742424 | 146 | 0.620296 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,477 | fpconst.py | p2pool_p2pool/fpconst.py | """Utilities for handling IEEE 754 floating point special values
This python module implements constants and functions for working with
IEEE754 double-precision special values. It provides constants for
Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity
(NegInf), as well as functions to test for th... | 5,754 | Python | .py | 144 | 36.0625 | 78 | 0.674623 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,478 | portmapper.py | p2pool_p2pool/nattraverso/portmapper.py | """
Generic NAT Port mapping interface.
TODO: Example
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from twisted.internet.base import BasePort
# Public API
def get_port_mapper(proto="TCP"):
... | 4,157 | Python | .py | 94 | 35.138298 | 81 | 0.660991 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,479 | utils.py | p2pool_p2pool/nattraverso/utils.py | """
Various utility functions used in the nattraverso package.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
def is_rfc1918_ip(ip):
"""
Checks if the given ip address is a rfc1918 one.
... | 1,563 | Python | .py | 45 | 30.111111 | 76 | 0.626093 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,480 | __init__.py | p2pool_p2pool/nattraverso/__init__.py | """
This package offers ways to retreive ip addresses of the machine, and map ports
through various protocols.
Currently only UPnP is implemented and available, in the pynupnp module.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@versi... | 378 | Python | .py | 12 | 30.25 | 79 | 0.768595 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,481 | ipdiscover.py | p2pool_p2pool/nattraverso/ipdiscover.py | """
Generic methods to retreive the IP address of the local machine.
TODO: Example
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
import random, socket, logging, itertools
from twisted.internet... | 4,180 | Python | .py | 113 | 29.504425 | 74 | 0.660615 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,482 | soap.py | p2pool_p2pool/nattraverso/pynupnp/soap.py | """
This module is a SOAP client using twisted's deferreds.
It uses the SOAPpy package.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
import SOAPpy, logging
from SOAPpy.Config import Config
from... | 3,547 | Python | .py | 85 | 32.835294 | 103 | 0.629806 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,483 | upnpxml.py | p2pool_p2pool/nattraverso/pynupnp/upnpxml.py | """
This module parse an UPnP device's XML definition in an Object.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from xml.dom import minidom
import logging
# Allowed UPnP services to use when ... | 3,026 | Python | .py | 74 | 30.121622 | 79 | 0.611246 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,484 | __init__.py | p2pool_p2pool/nattraverso/pynupnp/__init__.py | """
This package offers ways to retreive ip addresses of the machine, and map ports
through UPnP devices.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from nattraverso.pynupnp.upnp import search... | 1,088 | Python | .py | 27 | 36.703704 | 79 | 0.74212 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,485 | upnp.py | p2pool_p2pool/nattraverso/pynupnp/upnp.py | """
This module is the heart of the upnp support. Device discover, ip discovery
and port mappings are implemented here.
@author: Raphael Slinckx
@author: Anthony Baxter
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
impor... | 18,985 | Python | .py | 438 | 32.901826 | 96 | 0.629673 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,486 | convert_networks.py | p2pool_p2pool/dev/convert_networks.py | import sys
f = open(sys.argv[1])
while True:
if f.readline().strip() == 'nets = dict(': break
def nesting(l):
res = 0
for c in l:
if c == '(': res += 1
if c == ')': res -= 1
return res
def write_header(f, name):
if sys.argv[3] == 'p2pool':
f2.write('from p2pool.bitcoin im... | 1,620 | Python | .py | 48 | 27.75 | 81 | 0.573907 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,487 | p2p.py | p2pool_p2pool/p2pool/p2p.py | from __future__ import division
import math
import random
import sys
import time
from twisted.internet import defer, protocol, reactor
from twisted.python import failure, log
import p2pool
from p2pool import data as p2pool_data
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, p2proto... | 29,251 | Python | .py | 592 | 37.084459 | 304 | 0.60652 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,488 | __init__.py | p2pool_p2pool/p2pool/__init__.py | import os
import re
import sys
import traceback
import subprocess
def check_output(*popenargs, **kwargs):
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
raise ValueError((retcode, output))
... | 1,595 | Python | .py | 42 | 29.190476 | 138 | 0.574901 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,489 | work.py | p2pool_p2pool/p2pool/work.py | from __future__ import division
from collections import deque
import base64
import random
import re
import sys
import time
from twisted.internet import defer
from twisted.python import log
import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data
from bitcoin import helper, script, worker_interface
fro... | 26,833 | Python | .py | 415 | 49.026506 | 223 | 0.601579 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,490 | node.py | p2pool_p2pool/p2pool/node.py | import random
import sys
import time
from twisted.internet import defer, reactor
from twisted.python import log
from p2pool import data as p2pool_data, p2p
from p2pool.bitcoin import data as bitcoin_data, helper, height_tracker
from p2pool.util import deferral, variable
class P2PNode(p2p.Node):
def __init__(sel... | 16,770 | Python | .py | 307 | 39.892508 | 212 | 0.592333 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,491 | main.py | p2pool_p2pool/p2pool/main.py | from __future__ import division
import base64
import gc
import json
import os
import random
import sys
import time
import signal
import traceback
import urlparse
if '--iocp' in sys.argv:
from twisted.internet import iocpreactor
iocpreactor.install()
from twisted.internet import defer, reactor, protocol, tcp
f... | 34,303 | Python | .py | 585 | 45.169231 | 246 | 0.601605 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,492 | web.py | p2pool_p2pool/p2pool/web.py | from __future__ import division
import errno
import json
import os
import sys
import time
import traceback
from twisted.internet import defer, reactor
from twisted.python import log
from twisted.web import resource, static
import p2pool
from bitcoin import data as bitcoin_data
from . import data as p2pool_data, p2p
... | 26,699 | Python | .py | 433 | 50.796767 | 260 | 0.650054 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,493 | data.py | p2pool_p2pool/p2pool/data.py | from __future__ import division
import hashlib
import os
import random
import sys
import time
from twisted.python import log
import p2pool
from p2pool.bitcoin import data as bitcoin_data, script, sha256
from p2pool.util import math, forest, pack
def parse_bip0034(coinbase):
_, opdata = script.parse(coinbase).ne... | 43,694 | Python | .py | 687 | 51.946143 | 294 | 0.638083 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,494 | test_data.py | p2pool_p2pool/p2pool/test/test_data.py | import random
import unittest
from p2pool import data
from p2pool.bitcoin import data as bitcoin_data
from p2pool.test.util import test_forest
from p2pool.util import forest
def random_bytes(length):
return ''.join(chr(random.randrange(2**8)) for i in xrange(length))
class Test(unittest.TestCase):
def test_h... | 1,605 | Python | .py | 35 | 37.028571 | 149 | 0.62951 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,495 | test_p2p.py | p2pool_p2pool/p2pool/test/test_p2p.py | import random
from twisted.internet import defer, endpoints, protocol, reactor
from twisted.trial import unittest
from p2pool import networks, p2p
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral
class Test(unittest.TestCase):
@defer.inlineCallbacks
def test_sharereq(self):
... | 2,698 | Python | .py | 64 | 25.984375 | 130 | 0.496571 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,496 | test_node.py | p2pool_p2pool/p2pool/test/test_node.py | from __future__ import division
import base64
import random
import tempfile
from twisted.internet import defer, reactor
from twisted.python import failure
from twisted.trial import unittest
from twisted.web import client, resource, server
from p2pool import data, node, work, main
from p2pool.bitcoin import data as b... | 10,812 | Python | .py | 231 | 36.17316 | 319 | 0.619057 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,497 | test_script.py | p2pool_p2pool/p2pool/test/bitcoin/test_script.py | import unittest
from p2pool.bitcoin import script
class Test(unittest.TestCase):
def test_all(self):
data = '76 A9 14 89 AB CD EF AB BA AB BA AB BA AB BA AB BA AB BA AB BA AB BA 88 AC'.replace(' ', '').decode('hex')
self.assertEquals(
list(script.parse(data)),
[('UNK_118... | 552 | Python | .py | 10 | 48 | 184 | 0.616667 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,498 | test_data.py | p2pool_p2pool/p2pool/test/bitcoin/test_data.py | import unittest
from p2pool.bitcoin import data, networks
from p2pool.util import pack
class Test(unittest.TestCase):
def test_header_hash(self):
assert data.hash256(data.block_header_type.pack(dict(
version=1,
previous_block=0x000000000000038a2a86b72387f93c51298298a732079b3b686df... | 4,617 | Python | .py | 71 | 53.169014 | 206 | 0.775591 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,499 | test_getwork.py | p2pool_p2pool/p2pool/test/bitcoin/test_getwork.py | import unittest
from p2pool.bitcoin import getwork, data as bitcoin_data
class Test(unittest.TestCase):
def test_all(self):
cases = [
{
'target': '0000000000000000000000000000000000000000000000f2b944000000000000',
'midstate': '5982f893102dec03e374b472647c4f19b1b... | 4,273 | Python | .py | 64 | 52.3125 | 284 | 0.716683 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |