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,500 | test_p2p.py | p2pool_p2pool/p2pool/test/bitcoin/test_p2p.py | from twisted.internet import defer, reactor
from twisted.trial import unittest
from p2pool.bitcoin import data, networks, p2p
from p2pool.util import deferral
class Test(unittest.TestCase):
@defer.inlineCallbacks
def test_get_block(self):
factory = p2p.ClientFactory(networks.nets['bitcoin'])
... | 878 | Python | .py | 17 | 43.882353 | 146 | 0.694639 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,501 | test_sha256.py | p2pool_p2pool/p2pool/test/bitcoin/test_sha256.py | from __future__ import division
import unittest
import hashlib
import random
from p2pool.bitcoin import sha256
class Test(unittest.TestCase):
def test_all(self):
for test in ['', 'a', 'b', 'abc', 'abc'*50, 'hello world']:
#print test
#print sha256.sha256(test).hexdigest()
... | 1,213 | Python | .py | 32 | 27 | 86 | 0.555556 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,502 | test_skiplist.py | p2pool_p2pool/p2pool/test/util/test_skiplist.py | from p2pool.util import skiplist
class NotSkipList(object):
def __call__(self, start, *args):
pos = start
sol = self.initial_solution(start, args)
while True:
decision = self.judge(sol, args)
if decision > 0:
raise AssertionError()
elif de... | 603 | Python | .py | 17 | 24.058824 | 52 | 0.571429 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,503 | test_expiring_dict.py | p2pool_p2pool/p2pool/test/util/test_expiring_dict.py | from twisted.internet import defer
from twisted.trial import unittest
from p2pool.util import deferral, expiring_dict
class Test(unittest.TestCase):
@defer.inlineCallbacks
def test_expiring_dict1(self):
e = expiring_dict.ExpiringDict(3, get_touches=True)
e[1] = 2
yield deferral.sleep(1... | 907 | Python | .py | 28 | 24.964286 | 60 | 0.645905 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,504 | test_graph.py | p2pool_p2pool/p2pool/test/util/test_graph.py | import unittest
from p2pool.util import graph
class Test(unittest.TestCase):
def test_keep_largest(self):
b = dict(a=1, b=3, c=5, d=7, e=9)
assert graph.keep_largest(3, 'squashed')(b) == {'squashed': 9, 'd': 7, 'e': 9}
assert graph.keep_largest(3)(b) == {'c': 5, 'd': 7, 'e': 9}
| 309 | Python | .py | 7 | 38.857143 | 86 | 0.586667 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,505 | test_datachunker.py | p2pool_p2pool/p2pool/test/util/test_datachunker.py | import random
import unittest
from p2pool.util import datachunker
def random_bytes(length):
return ''.join(chr(random.randrange(2**8)) for i in xrange(length))
class Test(unittest.TestCase):
def test_stringbuffer(self):
for i in xrange(100):
sb = datachunker.StringBuffer()
... | 896 | Python | .py | 21 | 30.142857 | 74 | 0.584634 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,506 | test_forest.py | p2pool_p2pool/p2pool/test/util/test_forest.py | import random
import unittest
from p2pool.util import forest, math
class DumbTracker(object):
def __init__(self, items=[]):
self.items = {} # hash -> item
self.reverse = {} # previous_hash -> set of item_hashes
for item in items:
self.add(item)
def add(self, i... | 6,804 | Python | .py | 160 | 29.3625 | 148 | 0.551071 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,507 | test_math.py | p2pool_p2pool/p2pool/test/util/test_math.py | from __future__ import division
import random
import unittest
from p2pool.util import math
def generate_alphabet():
if random.randrange(2):
return None
else:
a = map(chr, xrange(256))
random.shuffle(a)
return a[:random.randrange(2, len(a))]
class Test(unittest.TestCase):
... | 1,198 | Python | .py | 32 | 26.625 | 74 | 0.540799 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,508 | test_pack.py | p2pool_p2pool/p2pool/test/util/test_pack.py | import unittest
from p2pool.util import pack
class Test(unittest.TestCase):
def test_VarInt(self):
t = pack.VarIntType()
for i in xrange(2**20):
assert t.unpack(t.pack(i)) == i
for i in xrange(2**36, 2**36+25):
assert t.unpack(t.pack(i)) == i
| 297 | Python | .py | 9 | 26 | 43 | 0.594406 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,509 | test_deferral.py | p2pool_p2pool/p2pool/test/util/test_deferral.py | import random
import time
from twisted.internet import defer
from twisted.trial import unittest
from p2pool.util import deferral
class Test(unittest.TestCase):
@defer.inlineCallbacks
def test_sleep(self):
for i in xrange(10):
length = random.expovariate(1/0.1)
start = time.tim... | 452 | Python | .py | 14 | 25.642857 | 56 | 0.65977 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,510 | bitcoin_testnet.py | p2pool_p2pool/p2pool/networks/bitcoin_testnet.py | from p2pool.bitcoin import networks
PARENT = networks.nets['bitcoin_testnet']
SHARE_PERIOD = 30 # seconds
CHAIN_LENGTH = 60*60//10 # shares
REAL_CHAIN_LENGTH = 60*60//10 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 3 # blocks
IDENTIFIER = '5fc2be2d4f0d6bfb'.decode('hex')
PREFIX = '3f6057a15036f441'.decode('hex')... | 882 | Python | .py | 22 | 39.045455 | 165 | 0.749709 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,511 | terracoin_testnet.py | p2pool_p2pool/p2pool/networks/terracoin_testnet.py | from p2pool.bitcoin import networks
PARENT = networks.nets['terracoin_testnet']
SHARE_PERIOD = 45 # seconds
CHAIN_LENGTH = 60*60//30 # shares
REAL_CHAIN_LENGTH = 60*60//30 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 10 # blocks
IDENTIFIER = 'b41a282ca5b2d85a'.decode('hex')
PREFIX = '16d2b91182dab8a4'.decode('he... | 707 | Python | .py | 18 | 38.222222 | 133 | 0.751453 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,512 | fastcoin.py | p2pool_p2pool/p2pool/networks/fastcoin.py | from p2pool.bitcoin import networks
PARENT = networks.nets['fastcoin']
SHARE_PERIOD = 6 # seconds
NEW_SHARE_PERIOD = 6 # seconds
CHAIN_LENGTH = 24*60*60//10 # shares
REAL_CHAIN_LENGTH = 24*60*60//10 # shares
TARGET_LOOKBEHIND = 60 # shares
SPREAD = 150 # blocks
NEW_SPREAD = 150 # blocks
IDENTIFIER = '9f2e390aa41ffade'... | 670 | Python | .py | 20 | 32.45 | 86 | 0.734977 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,513 | litecoin_testnet.py | p2pool_p2pool/p2pool/networks/litecoin_testnet.py | from p2pool.bitcoin import networks
PARENT = networks.nets['litecoin_testnet']
SHARE_PERIOD = 4 # seconds
CHAIN_LENGTH = 20*60//3 # shares
REAL_CHAIN_LENGTH = 20*60//3 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 3 # blocks
IDENTIFIER = 'cca5e24ec6408b1e'.decode('hex')
PREFIX = 'ad9614f6466a39cf'.decode('hex')
P... | 545 | Python | .py | 17 | 31 | 52 | 0.73814 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,514 | __init__.py | p2pool_p2pool/p2pool/networks/__init__.py | import pkgutil
nets = dict((name, __import__(name, globals(), fromlist="dummy"))
for module_loader, name, ispkg in pkgutil.iter_modules(__path__))
for net_name, net in nets.iteritems():
net.NAME = net_name
| 215 | Python | .py | 5 | 40.2 | 69 | 0.69378 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,515 | btcregtest.py | p2pool_p2pool/p2pool/networks/btcregtest.py | from p2pool.bitcoin import networks
PARENT = networks.nets['btcregtest']
SHARE_PERIOD = 30 # seconds
CHAIN_LENGTH = 60*60//10 # shares
REAL_CHAIN_LENGTH = 60*60//10 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 3 # blocks
IDENTIFIER = '5ad2c6ecbd7d9372'.decode('hex')
PREFIX = '8f2c8d54b3278bc8'.decode('hex')
P2P_... | 816 | Python | .py | 22 | 36.045455 | 165 | 0.752837 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,516 | terracoin.py | p2pool_p2pool/p2pool/networks/terracoin.py | from p2pool.bitcoin import networks
PARENT = networks.nets['terracoin']
SHARE_PERIOD = 45 # seconds
CHAIN_LENGTH = 24*60*60//30 # shares
REAL_CHAIN_LENGTH = 24*60*60//30 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 10 # blocks
IDENTIFIER = 'a42a265ad1b6d42b'.decode('hex')
PREFIX = '56a3f62173d2a9b5'.decode('hex'... | 889 | Python | .py | 18 | 48.333333 | 314 | 0.74023 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,517 | litecoin.py | p2pool_p2pool/p2pool/networks/litecoin.py | from p2pool.bitcoin import networks
PARENT = networks.nets['litecoin']
SHARE_PERIOD = 15 # seconds
CHAIN_LENGTH = 24*60*60//10 # shares
REAL_CHAIN_LENGTH = 24*60*60//10 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 3 # blocks
IDENTIFIER = 'e037d5b8c6923410'.decode('hex')
PREFIX = '7208c1a53ef629b0'.decode('hex')
... | 2,133 | Python | .py | 22 | 95.909091 | 1,391 | 0.727488 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,518 | bitcoin.py | p2pool_p2pool/p2pool/networks/bitcoin.py | from p2pool.bitcoin import networks
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changi... | 2,216 | Python | .py | 27 | 81 | 1,113 | 0.73754 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,519 | height_tracker.py | p2pool_p2pool/p2pool/bitcoin/height_tracker.py | from twisted.internet import defer
from twisted.python import log
import p2pool
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, forest, jsonrpc, variable
class HeaderWrapper(object):
__slots__ = 'hash previous_hash'.split(' ')
@classmethod
def from_header(cls, header... | 4,678 | Python | .py | 94 | 39.329787 | 156 | 0.642394 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,520 | p2p.py | p2pool_p2pool/p2pool/bitcoin/p2p.py | '''
Implementation of Bitcoin's p2p protocol
'''
import random
import sys
import time
from twisted.internet import protocol
import p2pool
from . import data as bitcoin_data
from p2pool.util import deferral, p2protocol, pack, variable
class Protocol(p2protocol.Protocol):
def __init__(self, net):
p2protoc... | 6,505 | Python | .py | 163 | 30.791411 | 121 | 0.605564 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,521 | worker_interface.py | p2pool_p2pool/p2pool/bitcoin/worker_interface.py | from __future__ import division
import StringIO
import json
import random
import sys
from twisted.internet import defer
import p2pool
from p2pool.bitcoin import data as bitcoin_data, getwork
from p2pool.util import expiring_dict, jsonrpc, pack, variable
class _Provider(object):
def __init__(self, parent, long_p... | 5,901 | Python | .py | 110 | 42.609091 | 196 | 0.638347 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,522 | stratum.py | p2pool_p2pool/p2pool/bitcoin/stratum.py | import random
import sys
from twisted.internet import protocol, reactor
from twisted.python import log
from p2pool.bitcoin import data as bitcoin_data, getwork
from p2pool.util import expiring_dict, jsonrpc, pack
class StratumRPCMiningProvider(object):
def __init__(self, wb, other, transport):
self.wb =... | 3,772 | Python | .py | 73 | 41.835616 | 158 | 0.648813 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,523 | script.py | p2pool_p2pool/p2pool/bitcoin/script.py | from p2pool.util import math, pack
def reads_nothing(f):
return None, f
def protoPUSH(length):
return lambda f: pack.read(f, length)
def protoPUSHDATA(size_len):
def _(f):
length_str, f = pack.read(f, size_len)
length = math.string_to_natural(length_str[::-1].lstrip(chr(0)))
data, f... | 2,589 | Python | .py | 73 | 28.178082 | 88 | 0.583898 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,524 | getwork.py | p2pool_p2pool/p2pool/bitcoin/getwork.py | '''
Representation of a getwork request/reply
'''
from __future__ import division
from . import data as bitcoin_data
from . import sha256
from p2pool.util import pack
def _swap4(s):
if len(s) % 4:
raise ValueError()
return ''.join(s[x:x+4][::-1] for x in xrange(0, len(s), 4))
class BlockAttempt(obje... | 2,912 | Python | .py | 61 | 38.262295 | 175 | 0.640636 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,525 | helper.py | p2pool_p2pool/p2pool/bitcoin/helper.py | import sys
import time
from twisted.internet import defer
import p2pool
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, jsonrpc
@deferral.retry('Error while checking Bitcoin connection:', 1)
@defer.inlineCallbacks
def check(bitcoind, net):
if not (yield net.PARENT.RPC_CHECK(bitc... | 6,117 | Python | .py | 106 | 50.726415 | 209 | 0.692475 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,526 | sha256.py | p2pool_p2pool/p2pool/bitcoin/sha256.py | from __future__ import division
import struct
k = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0... | 3,084 | Python | .py | 54 | 48.537037 | 131 | 0.613179 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,527 | data.py | p2pool_p2pool/p2pool/bitcoin/data.py | from __future__ import division
import hashlib
import random
import warnings
import p2pool
from p2pool.util import math, pack
def hash256(data):
return pack.IntType(256).unpack(hashlib.sha256(hashlib.sha256(data).digest()).digest())
def hash160(data):
if data == '04ffd03de44a6e11b9917f3a29f9443283d9871c9d74... | 13,118 | Python | .py | 317 | 34.523659 | 165 | 0.628999 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,528 | bitcoin_testnet.py | p2pool_p2pool/p2pool/bitcoin/networks/bitcoin_testnet.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = '0b110907'.decode('hex')
P2P_PORT = 18333
ADDRESS_VERSION = 111
RPC_PORT = 18332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'bitcoinaddress' in (y... | 1,151 | Python | .py | 24 | 45.458333 | 272 | 0.724844 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,529 | terracoin_testnet.py | p2pool_p2pool/p2pool/bitcoin/networks/terracoin_testnet.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = '41babe56'.decode('hex')
P2P_PORT = 23333
ADDRESS_VERSION = 111
RPC_PORT = 23332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'terracoinaddress' in ... | 1,189 | Python | .py | 24 | 47.041667 | 280 | 0.731266 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,530 | fastcoin.py | p2pool_p2pool/p2pool/bitcoin/networks/fastcoin.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fbc0b6db'.decode('hex')
P2P_PORT = 9526
ADDRESS_VERSION = 96
RPC_PORT = 9527
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'fastcoinaddress' in (yie... | 1,200 | Python | .py | 24 | 47.5 | 276 | 0.721843 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,531 | litecoin_testnet.py | p2pool_p2pool/p2pool/bitcoin/networks/litecoin_testnet.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fcc1b7dc'.decode('hex')
P2P_PORT = 19333
ADDRESS_VERSION = 111
RPC_PORT = 19332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'litecoinaddress' in (... | 1,216 | Python | .py | 24 | 48.166667 | 276 | 0.727273 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,532 | __init__.py | p2pool_p2pool/p2pool/bitcoin/networks/__init__.py | import pkgutil
nets = dict((name, __import__(name, globals(), fromlist="dummy"))
for module_loader, name, ispkg in pkgutil.iter_modules(__path__))
for net_name, net in nets.iteritems():
net.NAME = net_name
| 215 | Python | .py | 5 | 40.2 | 69 | 0.69378 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,533 | btcregtest.py | p2pool_p2pool/p2pool/bitcoin/networks/btcregtest.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fabfb5da'.decode('hex')
P2P_PORT = 18444
ADDRESS_VERSION = 111
RPC_PORT = 28332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'bitcoinaddress' in (y... | 955 | Python | .py | 23 | 39.478261 | 272 | 0.720905 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,534 | terracoin.py | p2pool_p2pool/p2pool/bitcoin/networks/terracoin.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = '42babe56'.decode('hex')
P2P_PORT = 13333
ADDRESS_VERSION = 0
RPC_PORT = 13332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'terracoinaddress' in (y... | 1,169 | Python | .py | 24 | 46.208333 | 280 | 0.729185 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,535 | namecoin.py | p2pool_p2pool/p2pool/bitcoin/networks/namecoin.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'f9beb4fe'.decode('hex')
P2P_PORT = 8334
ADDRESS_VERSION = 52
RPC_PORT = 8336
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'namecoinaddress' in (yie... | 1,123 | Python | .py | 24 | 44.291667 | 276 | 0.715982 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,536 | namecoin_testnet.py | p2pool_p2pool/p2pool/bitcoin/networks/namecoin_testnet.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fabfb5fe'.decode('hex')
P2P_PORT = 18334
ADDRESS_VERSION = 111
RPC_PORT = 18336
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'namecoinaddress' in (... | 1,149 | Python | .py | 24 | 45.375 | 276 | 0.720785 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,537 | litecoin.py | p2pool_p2pool/p2pool/bitcoin/networks/litecoin.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fbc0b6db'.decode('hex')
P2P_PORT = 9333
ADDRESS_VERSION = 48
RPC_PORT = 9332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
(yield helper.check_genes... | 1,277 | Python | .py | 24 | 50.708333 | 276 | 0.738191 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,538 | bitcoin.py | p2pool_p2pool/p2pool/bitcoin/networks/bitcoin.py | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'f9beb4d9'.decode('hex')
P2P_PORT = 8333
ADDRESS_VERSION = 0
RPC_PORT = 8332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
(yield helper.check_genesi... | 1,191 | Python | .py | 24 | 47.125 | 272 | 0.735168 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,539 | datachunker.py | p2pool_p2pool/p2pool/util/datachunker.py | import collections
class StringBuffer(object):
'Buffer manager with great worst-case behavior'
def __init__(self, data=''):
self.buf = collections.deque([data])
self.buf_len = len(data)
self.pos = 0
def __len__(self):
return self.buf_len - self.pos
def add... | 1,407 | Python | .py | 42 | 24.404762 | 79 | 0.570566 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,540 | pack.py | p2pool_p2pool/p2pool/util/pack.py | import binascii
import struct
import p2pool
from p2pool.util import memoize
class EarlyEnd(Exception):
pass
class LateEnd(Exception):
pass
def read((data, pos), length):
data2 = data[pos:pos + length]
if len(data2) != length:
raise EarlyEnd()
return data2, (data, pos + length)
def size(... | 10,436 | Python | .py | 264 | 29.291667 | 115 | 0.559996 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,541 | jsonrpc.py | p2pool_p2pool/p2pool/util/jsonrpc.py | from __future__ import division
import json
import weakref
from twisted.internet import defer
from twisted.protocols import basic
from twisted.python import failure, log
from twisted.web import client, error
from p2pool.util import deferral, deferred_resource, memoize
class Error(Exception):
def __init__(self, ... | 6,082 | Python | .py | 139 | 32.417266 | 151 | 0.572439 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,542 | forest.py | p2pool_p2pool/p2pool/util/forest.py | '''
forest data structure
'''
import itertools
from p2pool.util import skiplist, variable
class TrackerSkipList(skiplist.SkipList):
def __init__(self, tracker):
skiplist.SkipList.__init__(self)
self.tracker = tracker
self.tracker.removed.watch_weakref(self, lambda self, item: se... | 13,557 | Python | .py | 281 | 36.597865 | 148 | 0.606862 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,543 | deferred_resource.py | p2pool_p2pool/p2pool/util/deferred_resource.py | from __future__ import division
from twisted.internet import defer
from twisted.web import resource, server
from twisted.python import log
class DeferredResource(resource.Resource):
def render(self, request):
def finish(x):
if request.channel is None: # disconnected
return
... | 892 | Python | .py | 21 | 31.952381 | 103 | 0.641598 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,544 | p2protocol.py | p2pool_p2pool/p2pool/util/p2protocol.py | '''
Generic message-based protocol used by Bitcoin and P2Pool for P2P communication
'''
import hashlib
import struct
from twisted.internet import protocol
from twisted.python import log
import p2pool
from p2pool.util import datachunker, variable
class TooLong(Exception):
pass
class Protocol(protocol.Protocol):... | 4,144 | Python | .py | 87 | 36.229885 | 155 | 0.615521 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,545 | memory.py | p2pool_p2pool/p2pool/util/memory.py | import os
import platform
_scale = {'kB': 1024, 'mB': 1024*1024,
'KB': 1024, 'MB': 1024*1024}
def resident():
if platform.system() == 'Windows':
from wmi import WMI
w = WMI('.')
result = w.query("SELECT WorkingSet FROM Win32_PerfRawData_PerfProc_Process WHERE IDProcess=%d" % os.getpid(... | 592 | Python | .py | 17 | 28.058824 | 118 | 0.561955 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,546 | expiring_dict.py | p2pool_p2pool/p2pool/util/expiring_dict.py | from __future__ import division
import time
import weakref
from p2pool.util import deferral
class Node(object):
def __init__(self, contents, prev=None, next=None):
self.contents, self.prev, self.next = contents, prev, next
def insert_before(self, contents):
self.prev.next = self.prev = n... | 5,233 | Python | .py | 141 | 26.87234 | 99 | 0.581177 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,547 | logging.py | p2pool_p2pool/p2pool/util/logging.py | import codecs
import datetime
import os
import sys
from twisted.python import log
class EncodeReplacerPipe(object):
def __init__(self, inner_file):
self.inner_file = inner_file
self.softspace = 0
def write(self, data):
if isinstance(data, unicode):
try:
data... | 2,995 | Python | .py | 96 | 22.666667 | 78 | 0.555671 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,548 | graph.py | p2pool_p2pool/p2pool/util/graph.py | from __future__ import absolute_import
from __future__ import division
import math
from p2pool.util import math as math2
class DataViewDescription(object):
def __init__(self, bin_count, total_width):
self.bin_count = bin_count
self.bin_width = total_width/bin_count
def _shift(x, shift, pad_item... | 7,325 | Python | .py | 129 | 46.232558 | 195 | 0.60101 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,549 | memoize.py | p2pool_p2pool/p2pool/util/memoize.py | import itertools
class LRUDict(object):
def __init__(self, n):
self.n = n
self.inner = {}
self.counter = itertools.count()
def get(self, key, default=None):
if key in self.inner:
x, value = self.inner[key]
self.inner[key] = self.counter.next(), value
... | 1,737 | Python | .py | 53 | 23.962264 | 75 | 0.558426 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,550 | fixargparse.py | p2pool_p2pool/p2pool/util/fixargparse.py | from __future__ import absolute_import
import argparse
import sys
class FixedArgumentParser(argparse.ArgumentParser):
'''
fixes argparse's handling of empty string arguments
and changes @filename behaviour to accept multiple arguments on each line
'''
def _read_args_from_files(self, arg_strings)... | 1,630 | Python | .py | 35 | 31.514286 | 81 | 0.563025 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,551 | skiplist.py | p2pool_p2pool/p2pool/util/skiplist.py | from p2pool.util import math, memoize
class SkipList(object):
def __init__(self, p=0.5):
self.p = p
self.skips = {}
def forget_item(self, item):
self.skips.pop(item, None)
@memoize.memoize_with_backing(memoize.LRUDict(5))
def __call__(self, start, *args):
... | 2,140 | Python | .py | 48 | 29.520833 | 125 | 0.521368 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,552 | deferral.py | p2pool_p2pool/p2pool/util/deferral.py | from __future__ import division
import itertools
import random
import sys
from twisted.internet import defer, reactor
from twisted.python import failure, log
def sleep(t):
d = defer.Deferred(canceller=lambda d_: dc.cancel())
dc = reactor.callLater(t, d.callback, None)
return d
def run_repeatedly(f, *arg... | 8,790 | Python | .py | 258 | 22.205426 | 100 | 0.525307 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,553 | math.py | p2pool_p2pool/p2pool/util/math.py | from __future__ import absolute_import, division
import __builtin__
import math
import random
import time
def median(x, use_float=True):
# there exist better algorithms...
y = sorted(x)
if not y:
raise ValueError('empty sequence!')
left = (len(y) - 1)//2
right = len(y)//2
sum = y[left]... | 6,626 | Python | .py | 210 | 24.919048 | 148 | 0.560837 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,554 | switchprotocol.py | p2pool_p2pool/p2pool/util/switchprotocol.py | from twisted.internet import protocol
class FirstByteSwitchProtocol(protocol.Protocol):
p = None
def dataReceived(self, data):
if self.p is None:
if not data: return
serverfactory = self.factory.first_byte_to_serverfactory.get(data[0], self.factory.default_serverfactory)
... | 1,194 | Python | .py | 24 | 41.041667 | 117 | 0.702515 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,555 | variable.py | p2pool_p2pool/p2pool/util/variable.py | import itertools
import weakref
from twisted.internet import defer, reactor
from twisted.python import failure, log
class Event(object):
def __init__(self):
self.observers = {}
self.id_generator = itertools.count()
self._once = None
self.times = 0
def run_and_watch(self, f... | 2,541 | Python | .py | 71 | 25.971831 | 88 | 0.59182 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,556 | Namespaces.py | p2pool_p2pool/wstools/Namespaces.py | # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISC... | 9,396 | Python | .py | 171 | 48.538012 | 144 | 0.657501 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,557 | TimeoutSocket.py | p2pool_p2pool/wstools/TimeoutSocket.py | """Based on code from timeout_socket.py, with some tweaks for compatibility.
These tweaks should really be rolled back into timeout_socket, but it's
not totally clear who is maintaining it at this point. In the meantime,
we'll use a different module name for our tweaked version to avoid any
confusion.
T... | 5,293 | Python | .py | 156 | 22.679487 | 76 | 0.498436 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,558 | MIMEAttachment.py | p2pool_p2pool/wstools/MIMEAttachment.py | #TODO add the license
#I had to rewrite this class because the python MIME email.mime (version 2.5)
#are buggy, they use \n instead \r\n for new line which is not compliant
#to standard!
# http://bugs.python.org/issue5525
#TODO do not load all the message in memory stream it from the disk
import re
import random
impo... | 3,379 | Python | .py | 93 | 28.709677 | 115 | 0.591618 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,559 | UserTuple.py | p2pool_p2pool/wstools/UserTuple.py | """
A more or less complete user-defined wrapper around tuple objects.
Adapted version of the standard library's UserList.
Taken from Stefan Schwarzer's ftputil library, available at
<http://www.ndh.net/home/sschwarzer/python/python_software.html>, and used under this license:
Copyright (C) 1999, Stefan Schwarzer ... | 4,047 | Python | .py | 81 | 43.987654 | 94 | 0.679585 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,560 | c14n.py | p2pool_p2pool/wstools/c14n.py | #! /usr/bin/env python
'''XML Canonicalization
Patches Applied to xml.dom.ext.c14n:
http://sourceforge.net/projects/pyxml/
[ 1444526 ] c14n.py: http://www.w3.org/TR/xml-exc-c14n/ fix
-- includes [ 829905 ] c14n.py fix for bug #825115,
Date Submitted: 2003-10-24 23:43
-- include dep... | 16,401 | Python | .py | 360 | 35.491667 | 124 | 0.601036 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,561 | logging.py | p2pool_p2pool/wstools/logging.py | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
"""Logging"""
ident = "$Id$"
import os, sys
WARN = 1
DEBUG = 2
class ILogger:
'''Logger int... | 8,187 | Python | .py | 217 | 30.806452 | 103 | 0.612328 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,562 | XMLname.py | p2pool_p2pool/wstools/XMLname.py | """Translate strings to and from SOAP 1.2 XML name encoding
Implements rules for mapping application defined name to XML names
specified by the w3 SOAP working group for SOAP version 1.2 in
Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft
17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem... | 2,479 | Python | .py | 64 | 32.359375 | 78 | 0.57577 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,563 | WSDLTools.py | p2pool_p2pool/wstools/WSDLTools.py | # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISC... | 60,641 | Python | .py | 1,394 | 32.489957 | 95 | 0.600748 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,564 | __init__.py | p2pool_p2pool/wstools/__init__.py | #! /usr/bin/env python
"""WSDL parsing services package for Web Services for Python."""
ident = "$Id$"
import WSDLTools
import XMLname
import logging
| 153 | Python | .py | 6 | 24 | 64 | 0.777778 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,565 | XMLSchema.py | p2pool_p2pool/wstools/XMLSchema.py | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is ... | 109,858 | Python | .py | 2,689 | 28.471551 | 108 | 0.553475 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,566 | Utility.py | p2pool_p2pool/wstools/Utility.py | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is ... | 50,865 | Python | .py | 1,182 | 33.102369 | 101 | 0.602812 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,567 | test_t1.py | p2pool_p2pool/wstools/tests/test_t1.py | ############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import unittest
import test_wsdl
import utils
def makeTestSuite():
suite ... | 608 | Python | .py | 15 | 37.6 | 76 | 0.553082 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,568 | test_wsdl.py | p2pool_p2pool/wstools/tests/test_wsdl.py | #!/usr/bin/env python
############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import sys, unittest
import ConfigParser
import os
fro... | 5,568 | Python | .py | 132 | 32.575758 | 82 | 0.610368 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,569 | test_wstools_net.py | p2pool_p2pool/wstools/tests/test_wstools_net.py | #!/usr/bin/env python
############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import unittest
import test_wsdl
def makeTestSuite():
... | 535 | Python | .py | 14 | 35.357143 | 76 | 0.516634 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,570 | test_wstools.py | p2pool_p2pool/wstools/tests/test_wstools.py | #!/usr/bin/env python
############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import unittest, tarfile, os, ConfigParser
import test... | 1,008 | Python | .py | 27 | 32.666667 | 76 | 0.58635 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,571 | setup.py | p2pool_p2pool/litecoin_scrypt/setup.py | from distutils.core import setup, Extension
ltc_scrypt_module = Extension('ltc_scrypt',
sources = ['scryptmodule.c',
'scrypt.c'],
include_dirs=['.'])
setup (name = 'ltc_scrypt',
version = '1.0',
descr... | 425 | Python | .py | 9 | 32.111111 | 74 | 0.514493 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,572 | Config.py | p2pool_p2pool/SOAPpy/Config.py | """
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | 7,622 | Python | .py | 175 | 32.725714 | 80 | 0.548509 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,573 | SOAPBuilder.py | p2pool_p2pool/SOAPpy/SOAPBuilder.py | """
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | 22,852 | Python | .py | 518 | 32.133205 | 102 | 0.515376 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,574 | NS.py | p2pool_p2pool/SOAPpy/NS.py | from __future__ import nested_scopes
"""
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck... | 3,724 | Python | .py | 86 | 39.72093 | 80 | 0.608011 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,575 | Parser.py | p2pool_p2pool/SOAPpy/Parser.py | # SOAPpy modules
from Config import Config
from Types import *
from NS import NS
from Utilities import *
import string
import fpconst
import xml.sax
from wstools.XMLname import fromXMLname
try: from M2Crypto import SSL
except: pass
ident = '$Id: Parser.py 1497 2010-03-08 06:06:52Z pooryorick $'
from ve... | 36,216 | Python | .py | 873 | 26.222222 | 91 | 0.419922 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,576 | GSIServer.py | p2pool_p2pool/SOAPpy/GSIServer.py | from __future__ import nested_scopes
"""
GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov>
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (G... | 5,238 | Python | .py | 115 | 38.895652 | 80 | 0.6375 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,577 | Utilities.py | p2pool_p2pool/SOAPpy/Utilities.py | """
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | 5,112 | Python | .py | 138 | 29.826087 | 80 | 0.542787 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,578 | WSDL.py | p2pool_p2pool/SOAPpy/WSDL.py | """Parse web services description language to get SOAP methods.
Rudimentary support."""
ident = '$Id: WSDL.py 1467 2008-05-16 23:32:51Z warnes $'
from version import __version__
import wstools
import xml
from Errors import Error
from Client import SOAPProxy, SOAPAddress
from Config import Config
import urllib
class... | 5,100 | Python | .py | 110 | 35.090909 | 123 | 0.601628 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,579 | Server.py | p2pool_p2pool/SOAPpy/Server.py | from __future__ import nested_scopes
"""
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck... | 27,143 | Python | .py | 576 | 31.46875 | 83 | 0.48938 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,580 | __init__.py | p2pool_p2pool/SOAPpy/__init__.py |
ident = '$Id: __init__.py 541 2004-01-31 04:20:06Z warnes $'
from version import __version__
from Client import *
from Config import *
from Errors import *
from NS import *
from Parser import *
from SOAPBuilder import *
from Server import *
from Types import *
from Utilities ... | 358 | Python | .py | 13 | 26.384615 | 60 | 0.673469 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,581 | Errors.py | p2pool_p2pool/SOAPpy/Errors.py | """
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck@gst.com)
#
##########################... | 3,002 | Python | .py | 71 | 39.704225 | 80 | 0.62778 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,582 | URLopener.py | p2pool_p2pool/SOAPpy/URLopener.py | """Provide a class for loading data from URL's that handles basic
authentication"""
ident = '$Id: URLopener.py 541 2004-01-31 04:20:06Z warnes $'
from version import __version__
from Config import Config
from urllib import FancyURLopener
class URLopener(FancyURLopener):
username = None
passwd = None
d... | 584 | Python | .py | 15 | 34.266667 | 65 | 0.705882 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,583 | SOAP.py | p2pool_p2pool/SOAPpy/SOAP.py | """This file is here for backward compatibility with versions <= 0.9.9
Delete when 1.0.0 is released!
"""
ident = '$Id: SOAP.py 541 2004-01-31 04:20:06Z warnes $'
from version import __version__
from Client import *
from Config import *
from Errors import *
from NS import *
from Parser ... | 837 | Python | .py | 30 | 25.933333 | 71 | 0.72271 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,584 | Types.py | p2pool_p2pool/SOAPpy/Types.py | from __future__ import nested_scopes
"""
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or withou... | 52,214 | Python | .py | 1,307 | 28.501913 | 80 | 0.522979 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,585 | Client.py | p2pool_p2pool/SOAPpy/Client.py | from __future__ import nested_scopes
"""
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck... | 19,821 | Python | .py | 465 | 31.365591 | 102 | 0.537142 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,586 | test_datachunker.py | p2pool_p2pool/p2pool/test/util/test_datachunker.py | import random
import unittest
from p2pool.util import datachunker
def random_bytes(length):
return ''.join(chr(random.randrange(2**8)) for i in xrange(length))
class Test(unittest.TestCase):
def test_stringbuffer(self):
for i in xrange(100):
sb = datachunker.StringBuffer()
... | 896 | Python | .tac | 21 | 30.142857 | 74 | 0.584634 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,587 | datachunker.py | p2pool_p2pool/p2pool/util/datachunker.py | import collections
class StringBuffer(object):
'Buffer manager with great worst-case behavior'
def __init__(self, data=''):
self.buf = collections.deque([data])
self.buf_len = len(data)
self.pos = 0
def __len__(self):
return self.buf_len - self.pos
def add... | 1,407 | Python | .tac | 42 | 24.404762 | 79 | 0.570566 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,588 | MIMEAttachment.py | p2pool_p2pool/wstools/MIMEAttachment.py | #TODO add the license
#I had to rewrite this class because the python MIME email.mime (version 2.5)
#are buggy, they use \n instead \r\n for new line which is not compliant
#to standard!
# http://bugs.python.org/issue5525
#TODO do not load all the message in memory stream it from the disk
import re
import random
impo... | 3,379 | Python | .tac | 93 | 28.709677 | 115 | 0.591618 | p2pool/p2pool | 1,139 | 1,015 | 49 | GPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,589 | mypy.ini | zatosource_zato/code/mypy.ini | [mypy]
#allow_redefinition = True
#no_implicit_reexport = True
disallow_incomplete_defs = True
disallow_untyped_calls = True
disallow_untyped_defs = True
ignore_missing_imports = True
pretty = True
show_absolute_path = True
show_error_codes = True
strict_equality ... | 426 | Python | .py | 14 | 29.428571 | 32 | 0.667476 | zatosource/zato | 1,096 | 239 | 0 | AGPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,590 | _pyproject.toml.ini | zatosource_zato/code/_pyproject.toml.ini | [tool.pyright]
pythonVersion = "3.8"
typeCheckingMode = "basic"
#
# This is level 1
#
reportOptionalOperand = "error"
reportPrivateUsage = "none"
reportAssertAlwaysTrue = "error"
reportUnusedImport = "error"
reportUnusedFunction = "error"
reportUnusedCallResult = "error"
reportUnusedVariab... | 1,931 | Python | .py | 71 | 25.366197 | 66 | 0.739342 | zatosource/zato | 1,096 | 239 | 0 | AGPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,591 | .version.py | zatosource_zato/code/.version.py | # -*- coding: utf-8 -*-
"""
Copyright (C) 2023, Zato Source s.r.o. https://zato.io
Licensed under AGPLv3, see LICENSE.txt for terms and conditions.
"""
# stdlib
import inspect
import json
import os
import platform
from subprocess import PIPE, run as subprocess_run
# #################################################... | 3,950 | Python | .py | 74 | 50.662162 | 130 | 0.370226 | zatosource/zato | 1,096 | 239 | 0 | AGPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,592 | _asyncio.pyd | zatosource_zato/code/bundle-ext/python-windows/python-3.10.8/_asyncio.pyd | MZ� ÿÿ ¸ @ º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ ƃM[‚â#‚â#‚â#‹š°€â#™" €â#™& �â#™' Šâ#™ �â#™" �â#Q�" €â#‚â"
â#™. ƒâ#™# ƒâ#™Üƒâ#™! ƒâ#Rich‚â# PE d† @ŸEc ğ " ! T ‚ ` ... | 64,384 | Python | .py | 353 | 180.634561 | 10,511 | 0.451818 | zatosource/zato | 1,096 | 239 | 0 | AGPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,593 | select.pyd | zatosource_zato/code/bundle-ext/python-windows/python-3.10.8/select.pyd | MZ� ÿÿ ¸ @ º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ >
t^_d'^_d'^_d'W'÷'\_d'Ş$e&\_d'Ş$a&R_d'Ş$`&V_d'Ş$g&Z_d'Ğ$e&\_d'^_e'_d'�-e&[_d'Ğ$i&__d'Ğ$d&__d'Ğ$›'__d'Ğ$f&__d'Rich^_d' PE d† CŸEc ğ " ! 2 ğ ... | 29,056 | Python | .py | 142 | 202.387324 | 4,225 | 0.444963 | zatosource/zato | 1,096 | 239 | 0 | AGPL-3.0 | 9/5/2024, 5:10:54 PM (Europe/Amsterdam) |
9,594 | _uuid.pyd | zatosource_zato/code/bundle-ext/python-windows/python-3.10.8/_uuid.pyd | MZ� ÿÿ ¸ @ º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ âRp^ƒ<#^ƒ<#^ƒ<#Wû¯#\ƒ<#Şø="\ƒ<#Şø9"Rƒ<#Şø8"Vƒ<#Şø?"]ƒ<#Ğø="\ƒ<#�ñ="[ƒ<#^ƒ=#tƒ<#Ğø4"_ƒ<#Ğø<"_ƒ<#ĞøÃ#_ƒ<#Ğø>"_ƒ<#Rich^ƒ<# PE d† IŸEc ğ " ! & |