Updated DB_Helper by adding firebase methods.
This commit is contained in:
parent
485cc3bbba
commit
c82121d036
1810 changed files with 537281 additions and 1 deletions
33
venv/Lib/site-packages/pyasn1/compat/binary.py
Normal file
33
venv/Lib/site-packages/pyasn1/compat/binary.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
#
|
||||
# This file is part of pyasn1 software.
|
||||
#
|
||||
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
|
||||
# License: http://snmplabs.com/pyasn1/license.html
|
||||
#
|
||||
from sys import version_info
|
||||
|
||||
if version_info[0:2] < (2, 6):
|
||||
def bin(value):
|
||||
bitstring = []
|
||||
|
||||
if value > 0:
|
||||
prefix = '0b'
|
||||
elif value < 0:
|
||||
prefix = '-0b'
|
||||
value = abs(value)
|
||||
else:
|
||||
prefix = '0b0'
|
||||
|
||||
while value:
|
||||
if value & 1 == 1:
|
||||
bitstring.append('1')
|
||||
else:
|
||||
bitstring.append('0')
|
||||
|
||||
value >>= 1
|
||||
|
||||
bitstring.reverse()
|
||||
|
||||
return prefix + ''.join(bitstring)
|
||||
else:
|
||||
bin = bin
|
Loading…
Add table
Add a link
Reference in a new issue