Saravanan666/pypi-org huggingface dataset:
Package: bitjoy
BitJoyBit, Bytes and Logical Gates Abstraction.AboutRepository to 'Padrões de Projeto' subject at university. A height level Bit/Bytes and logical circuits abstractions.Also Udacity Machine Learning Engineer Nanodegre program to add these package to PyPi.UsageInstallingpipinstallbitjoyStarting with BitImporting and instantiating Bit class.frombitjoy.dtypesimportBitzero=Bit(0)# ZeroBit(0)one=Bit(1)# OneBit(1)Creating a bit passing0in the__init__method, it will create another class:ZeroBit. The same away, passing1, it will create aOneBit.Logical GatesThere is also support to logical operators (called logical gates or logical circuits).frombitjoy.dtypesimportLogicalOperatorNOTLogicalOperator.not_(zero)# OneBit(1)LogicalOperator.not_(one)# OneBit(0)ORLogicalOperator.or_(zero,zero)# ZeroBit(0)LogicalOperator.or_(zero,one)# OneBit(1)LogicalOperator.or_(one,zero)# OneBit(1)LogicalOperator.or_(one,one)# OneBit(1)ANDLogicalOperator.and_(zero,zero)# ZeroBit(0)LogicalOperator.and_(zero,one)# ZeroBit(0)LogicalOperator.and_(one,zero)# ZeroBit(0)LogicalOperator.and_(one,one)# OneBit(1)There is also support to others Logical Gates:nor_,nand_, xor_andxnor_`BytesThere is also a Bytes class.frombitjoy.dtypesimportBytesPassing a list of Bit to the Bytes' constructor to creating a bytes instance.NOTE that bytes only have 8 bits. So passing more or less it'll throw an error.bits=[Bit(0),Bit(0),Bit(0),Bit(0),Bit(1),Bit(1),Bit(0),Bit(0)]b=Bytes(bits)# Bytes(0, 0, 0, 0, 1, 1, 0, 0)To creating a easy bytes, useint_to_bytesfunction fromutilsto help.frombitjoy.utilsimportint_to_bytesb1=int_to_bytes(10)# Bytes(0, 0, 0, 0, 1, 0, 1, 0)b2=int_to_bytes(175)# Bytes(1, 0, 1, 0, 1, 1, 1, 1)Adding Bytes
Bytes class also has support to+operand with__add__method.b1_b2=b1+b2# Bytes(1, 0, 1, 1, 1, 0, 0, 1)Casting
Bytes supports casting with other number types:int,bin,octandhex.int(b1_b2)# 185bin(b1_b2)# '0b10111001'oct(b1_b2)# '0o271'hex(b1_b2)# '0xb9'AddersFor arithmetic operators, the classAdderhas two method to make additions:half: tohalf-adderfull: tofull-adder
Package: bitjws
JWS (JSON Web
Signature)
using Bitcoin message signing as the algorithm.InstallBy default it’s expected thatsecp256k1is available, so
install it before proceeding; make sure to run./configure--enable-module-recovery. If you’re using some other
library that provides the functionality necessary for this, check theUsing a custom librarysection below.bitjws can be installed by runningpip install bitjws.Visithttps://github.com/g-p-g/bitjwsto see the full README, the
issue tracker, and others.
Package: bitlogs
BitLogsVersion 1.0.1This python library allows you to easily create logs for your code.Installation instructionsOpen up your terminalRunpip install bitlogsImport it to your project (import bitlogs)Example codeCode:frombitlogsimportLoggerfrombitlogs.message_types.debug_messageimportDebugMessageLogger.log(DebugMessage(),"Hello world!")Output:[DEBUG] Hello world!Code:frombitlogsimportLoggerfrombitlogs.message_types.critical_messageimportCriticalMessagedefadd(a,b):if(notisinstance(a,float))or(notisinstance(a,float)):Logger.log(CriticalMessage(),"A and B have to be of the type float.")# you should probably raise an error herereturna+badd(1,2)Output:[CRITICAL] A and B have to be of the type float.frombitlogsimportLoggerfrombitlogs.message_types.debug_messageimportDebugMessageLogger.log_to_file(DebugMessage(),"Hello world!","example.bitlog")You can display the content of the file by running:cat example.bitlogon macOS + Linux andtype example.bitlogon Windows
Package: bit-lts
Bit is Python’sfastestBitcoin library and was designed from the beginning to feel intuitive, be
effortless to use, and have readable source code. It is heavily inspired byRequestsandKeras.Bit is so easy to use, in fact, you can do this:>>>frombitimportKey>>>>>>my_key=Key(...)>>>my_key.get_balance('usd')'12.51'>>>>>># Let's donate!>>>outputs=[>>># Wikileaks>>>('1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v',0.0035,'btc'),>>># Internet Archive>>>('1Archive1n2C579dMsAu3iC6tWzuQJz8dN',190,'jpy'),>>># The Pirate Bay>>>('129TQVAroeehD9fZpzK51NdZGQT4TqifbG',3,'eur'),>>># xkcd>>>('14Tr4HaKkKuC1Lmpr2YMAuYVZRWqAdRTcr',2.5,'cad')>>>]>>>>>>my_key.send(outputs)'9f59f5c6757ec46fdc7440acbeb3920e614c8d1d247ac174eb6781b832710c1c'Here is the transactionhttps://blockchain.info/tx/9f59f5c6757ec46fdc7440acbeb3920e614c8d1d247ac174eb6781b832710c1c.FeaturesPython’s fastest available implementation (100x faster than closest library)Seamless integration with existing server setupsSupports keys in cold storageFully supports 25 different currenciesFirst class support for storing data in the blockchainDeterministic signatures via RFC 6979Access to the blockchain (and testnet chain) through multiple APIs for redundancyExchange rate API, with optional cachingOptimal transaction fee API, with optional cachingCompressed public keys by defaultMultiple representations of private keys; WIF, PEM, DER, etc.Legacy P2PKH and Segwit nested-P2WPKH transactionsLegacy P2SH and Segwit nested-P2WSH transactionsIf you are intrigued, continue reading. If not, continue all the same!InstallationBit is distributed onPyPIas a universal wheel and is available on Linux/macOS
and Windows and supports Python 3.5+ and PyPy3.5-v5.7.1+.pip>= 8.1.2 is required.$pipinstallbitDocumentationDocs arehosted by Github Pagesand are automatically built and published
by Travis after every successful commit to Bit’smasterbranch.CreditsLogo courtesy ofhttps://textcraft.netGregory Maxwell(Bitcoin core dev) for teaching me a bit ofECCmatharubiin #bitcoin for helping me understand transaction gotchasfuzemanfor bestowing me the namebiton thePython Package Index
Package: bitlyapi
Python bit.ly wrapperThis is a thin Python wrapper for thebit.ly API.  Basic usage looks like
this:>>> import bitlyapi
>>> b = bitlyapi.BitLy(api_user, api_key)
>>> res = b.shorten(longUrl='http://www.google.com/')
>>> print res['url']
'http://bit.ly/6Hwstb'
>>> print res['long_url']
'http://www.google.com/'The return from any method call is a dict containing the results of
decoding the JSON returned from bit.ly.  For example:>>> import pprint
>>> pprint.pprint(res)
{'global_hash': '2V6CFi',
 'hash': '9gOd4I',
 'long_url': 'http://www.google.com/',
 'new_hash': 1,
 'url': 'http://bit.ly/9gOd4I'}You can supply arbitrary keywords to method calls and they will be passed
to thebit.ly API:>>> res = api.shorten(domain="j.mp", longUrl="http://www.example.com/foobar.html")
>>> pprint.pprint(res)
{'global_hash': 'cITxl0',
 'hash': 'cY4460',
 'long_url': 'http://www.example.com/foobar.html',
 'new_hash': 1,
 'url': 'http://j.mp/cY4460'}Changelog0.1.1 (2010-04-07)fixed path to README and CHANGES in setup.py and add MANIFEST.in0.1 (2010-04-07)initial release
Package: bitly_api
## Installationpip install bitly_api## Run testsYour username is the lowercase name shown when you login to bitly, your access token can be fetched using the following (http://dev.bitly.com/authentication.html):curl -u “username:password” -X POST “https://api-ssl.bitly.com/oauth/access_token”To run the tests either export the environment variable or set it up inline before callingnosetests:bitly-api-python $ BITLY_ACCESS_TOKEN=<accesstoken> nosetests## API Documentationhttp://dev.bitly.com/
Package: bitly-api-py3
## Installationpip install bitly_api## Run testsYour username is the lowercase name shown when you login to bitly, your access token can be fetched using the following (http://dev.bitly.com/authentication.html):curl -u “username:password” -X POST “https://api-ssl.bitly.com/oauth/access_token”To run the tests either export the environment variable or set it up inline before callingnosetests:bitly-api-python $ BITLY_ACCESS_TOKEN=<accesstoken> nosetests## API Documentationhttp://dev.bitly.com/
Package: bitly-api-python
BitlyAPIInstallationDocumentationExamplesShort UrlVersionCopyrightInstallationpipinstallbitly-api-pythonDocumentationYou can read our Documention onhttps://api.ksprojects.me/docsExamplesShort UrlfromBitlyAPIimportshorten_urlsurls=["https://github.com/Krishna-Singhal","...","..."]response=shorten_url(urls)# print all shotened urlsforiinresponse:print(i.long_url,i.short_url,i.status_txt)ParametersParameterdescriptionurlsList of Long urlsVersionfromBitlyAPIimport__version__print(__version__)CopyrightCopyright (C) 2022 by Krishna-Singhal, <https://github.com/Krishna-Singhal>.All rights reserved.
Package: bitlyclip
bitlyclipis just a script that:takes a url in your clipboardbitly-ifies itputs the new url back in your clipboardIt makes a nice ‘hotkey’ in whatever window manager you’re using.If you have notify-python installed, it will
pop up nice messages for you.http://www.galago-project.org/downloads.phpYou’ll need to havexselon your system:$ sudo yum -y install xselTo install bitlyclip itself:$ pip install bitlyclipTo use:$ bitlyclip
Package: bitly-oauth2-proxy-session
# BitlyOAuth2ProxySessionThis is a simple subclass of `requests.Session` which, when initialized,or when you call its `authenticate()` method, does the magic to talk tothe Bitly OAuth2 Proxy and return a session that is authenticated forwhatever is behind it.The use case here is a read-only service user, which does not requiretwo-factor authentication, that you want to be able to access resourcesbehind the Bitly proxy.  Our _particular_ use case right now is for amonitoring system to be able to check on web pages that requireauthentication.  There's one class, the imaginatively-named `Session`.## Installation`pip install bitly-oauth2-proxy-session`Or check out the repository, `cd` to its root directory, and `pythonsetup.py install`.  It requires a fairly recent `requests` (2.8.1 orlater).## Instance Attributes* `oauth2_username`: a string containing the username of the underlyingOAuth2 user.* `oauth2_password`: a string containing the password of the underlyingOAuth2 user.  At least for GitHub, you can't use an auth token.  Thereason behind this seems to be that this is what you'd do if you werean actual user with an actual web browser.  Yes, this means 2FA isn'tcurrently supported.* `authentication_base_url`: a string containing the `start` URL of youroauth proxy.  Typically, _site_`/oauth2/start`.* `authentication_session_url`: a string containing the URL of the pageyou POST to when you create a session with the underlying OAuth2source as a web user.  For Github, this is`https://github.com/session` and that's the default.* `authentication_postdata`: a Python dict containing the data you needto POST to the session URL.  Defaults to the right thing for Github.## Methods* `[get_/set_]*()`: getters and setters for the various instanceattributes.  No, you can't get the password this way.* `authenticate()`: run the authentication dance and store the magic inthe session object.## Usage* Acquire a `Session` object.* For Github, create the object with `oauth2_username`,`oauth2_password`, and `authentication_session_url`.* For something else (untested), create the object empty, set all thefields via the setter methods, and then run `authenticate()`.  Pullrequests welcomed.* Do sessiony things, like `get()` and `post()`.## Bugs* If anyone knows how I can get a session with a Github user tokenrather than a password, that'd be great.* Github is the only working use case right now.
Package: bitmagic
Python wrapper for BitMagic C++ LibraryBitMagic is available fromhttp://bmagic.sourceforge.net/These Python bindings contain software that is
Copyright(c) 2002-2009 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com)This software requires the Boost library fromhttp://www.boost.org/built with Python support.
Package: bitmake
BitMake Python3 SDKThis is BitMake Official Python3 SDKInstallationpip3 install bitmakeRest Examplefrombitmake.restimportBitMakeApiClientapi_client=BitMakeApiClient(api_key='TestApiKey',api_secret='TestSecret')order_response=api_client.create_order('BTC_USD','client_order_123','10000','0.01','BUY','LIMIT','GTC')print(order_response)Websocket ExamplePublic Channelsfrombitmake.wsimportBitMakeWebsocketApiClient,RespData,PushDataws_client=BitMakeWebsocketApiClient()awaitws_client.connect()awaitws_client.subscribe('diffMergedDepth',{'symbol':'BTC_USD'})# subscribe `diffMergedDepth` topicawaitws_client.subscribe('trade',{'symbol':'BTC_USD'})# subscribe `trade` topicwhilews_client.connected:data=awaitws_client.recv_data()assertisinstance(data,RespData)orisinstance(data,PushData)ifisinstance(data,RespData):# received response data# for example: RespData{data_type: RespDataType.MARKET_DEPTH, data: {'co': 0, 'm': 'success'}}print("recv resp data type:{}data:{}".format(data.data_type,data.data))elifisinstance(data,PushData):# received push data# for example: PushData{data_type: PushDataType.MARKET_DEPTH, data: [{'s': 'BTC_USD', 't': 1667874854633, 'vs': 527579119, 've': 527579128, 'b': [['20636', '0.1336'], ['20634', '0.1402']], 'a': [['20649', '0.06'], ['20654', '0.0727']]}]}print("recv push data type:{}data:{}".format(data.data_type,data.data))Private Channelsfrombitmake.wsimportBitMakeWebsocketApiClient,RespData,PushDataws_client=BitMakeWebsocketApiClient(api_key='TestApiKey',api_secret='TestSecret')awaitws_client.connect()# Optionally you can subscribe any public topic# await ws_client.subscribe('diffMergedDepth', {'symbol': 'BTC_USD'}) # subscribe `diffMergedDepth` topic# await ws_client.subscribe('trade', {'symbol': 'BTC_USD'}) # subscribe `trade` topicwhilews_client.connected:data=awaitws_client.recv_data()assertisinstance(data,RespData)orisinstance(data,PushData)ifisinstance(data,RespData):# received response data# for example: RespData{data_type: RespDataType.MARKET_DEPTH, data: {'co': 0, 'm': 'success'}}print("recv resp data type:{}data:{}".format(data.data_type,data.data))elifisinstance(data,PushData):# received push data# for example: PushData{data_type: PushDataType.ACCOUNT_BALANCE, data: [{'token': 'USDT', 'available': '40', 'total': '40'}]}print("recv push data type:{}data:{}".format(data.data_type,data.data))
Package: bitman
bitmanWhat is bitman?This is a pure python module for managing and manipulating an array of bits.How does it work?bitman takes advantage of python's ability to handle big integers. The array of bits is simply an integer with its bit values set as desired.The array of bits is a class called bitman.Attributes of bitmansize: It is an integer that holds the array size.set(n, val): A function that sets the n-th bit to val.get(n):	A function that returns the truth value of the n-th bit.which(val): A list of positions with a value val (0 or 1).InstallationPlease checkhttps://pypi.org/project/bitman/for the installable version.You should be able to install withpip install bitmanA quick tutorial>>>frombitmanimportbitman# import the bitman class>>>a=bitman(size=5,init=1)# 'a' is now a bitman instance with 5 bits, all initialized to 1>>>print(a)# printing 'a' returns the string of bits as in a binary number11111>>>a# simply typing 'a' at the command line also returns the bits in the same order11111>>>a.get(2)# get the truth value of the bit at position 2True>>>a.set(0,0)# set the bit at position 0 to 0.>>>a11110>>>a.set(2,0)# set the bit at position 2 to 0.>>>a11010>>>a.get(2)# the second bit has been set to FalseFalse>>>a.get(3)# the third bit is still TrueTrue>>>a.which(0)# list of bits in a that are 0[0,2]>>>a.which(1)# list of bits in a that are 1[1,3,4]>>>a.size# how many bits are to be represented by a?5>>>a11010>>>a.size=8# let us resize the array>>>a00011010InvitationYou are welcome to improve bitman and suggest improvements.
Package: bitmap
BitMap for pythonThis package provides aBitMapclass which is an array of bits stored in compact format.Installationbitmapcan be installed frompip:$sudopipinstallbitmapFunctionsBitMap(maxnum): construct aBitMapobject withmaxnumbitsset(pos): set the bit at positionposto 1reset(pos): reset the bit at positionposto 0flip(pos): flip the bit at positionposcount(): return the number of 1ssize(): return the size of theBitMaptest(pos): check if bit at positionposhas been set to 1any(): check if any bit in theBitMaphas been set to 1none(): check if none of the bits in theBitMaphas been set to 1all(): check if all bits in theBitMaphas been set to 1nonzero(): return indexes of all non-zero bitstostring(): convert aBitMapobject to0and1stringfromstring(bitstring): create aBitMapobject from0and1stringExamplesfrombitmapimportBitMapbm=BitMap(32)printbm.tostring()bm.set(1)printbm.tostring()bm=BitMap.fromstring("00011101")printbm.tostring()bm.flip(1)printbm.tostring()
Package: bitmap2
BitMap for pythonAn updated version of the bitmap library fromhttps://github.com/wanji/bitmapsince the original
project is no longer maintained.This package provides aBitMapclass which is an array of bits stored in compact format.Installationbitmapcan be installed frompip:pip3installbitmap2FunctionsBitMap(maxnum): construct aBitMapobject withmaxnumbitsset(pos): set the bit at positionposto 1reset(pos): reset the bit at positionposto 0flip(pos): flip the bit at positionposcount(): return the number of 1ssize(): return the size of theBitMaptest(pos): check if bit at positionposhas been set to 1any(): check if any bit in theBitMaphas been set to 1none(): check if none of the bits in theBitMaphas been set to 1all(): check if all bits in theBitMaphas been set to 1nonzero(): return list of indexes of all non-zero bitsnonzeros(): return generator of indexes of all non-zero bitszero(): return list of indexes of all zero bitszeros(): return generator of indexes of all zero bitstostring(): convert aBitMapobject to0and1stringtofile(path): save aBitMapobject to a file onpathfromstring(bitstring): create aBitMapobject from0and1stringfromhexstring(hexstring): construct aBitMapobject from hex stringfromfile(path, maxnum): construct aBitmapobject from a file atpathof sizemaxnumbitsExamplesfrombitmapimportBitMapbm=BitMap(32)printbm.tostring()bm.set(1)printbm.tostring()bm=BitMap.fromstring("00011101")printbm.tostring()bm.flip(1)printbm.tostring()
Package: bitmap-fonts
Bitmap fontsBitmap fonts are useful in generating text messages in OpenGL contexts. This utility allows to
convert a TTF font file into a bitmap font.DescriptionThe scriptcreate-font-textureshould be self-explanatory.Installationpip install bitmap-fontsUsagecreate-font-texture UbuntuMono-Regular.ttf

font_file_name: UbuntuMono-Regular.ttf
size: 512
char_size: 32
ubuntumono-regular-iso-8859-1.pngAuthors and acknowledgmentPeter Kovalkoval.peter@gmail.comLicenseMIT,the font UbuntuMono-Regular.ttf has an Ubuntu font license 1.0Project statusAlready useful
Package: bitmap-sparse-array
This code has been transpiled fromjs-sparse-arrayand has minimal changes.UsageSparseArray implementsMutableSequence.We suggest you import the SparseArray as follows:>>> from bitmap_sparse_array import SparseArraySetting and getting>>> sa = SparseArray()
>>> sa[1000000] = 'value'
>>> sa[1000000]
'value'
>>> sa[1]
IndexError()
>>> len(sa)
1000001IteratingDue to the sparse nature ofSparseArray, it does not make sense to iterate over all values in the traditional sense because of possible omitted indices. Therefore, you cannot iterate over theSparseArrayitself. Instead, 3 generators are provided.>>> sa = SparseArray()
>>> sa[0] = '0'
>>> sa[2] = '2'SparseArray.indices()returns a generator of indices that have values.>>> list(sa.indices())
[0, 2]SparseArray.items()returns a generator of tuples of indices and values, similar toMapping.items().>>> list(sa.items())
[(0, '0'), (2, '2')]SparseArray.values(*, default=None, start=0, end=None)returns a generator of values with a default value for non-set indices.>>> list(sa.values())
['0', None, '2']
>>> list(sa.values(default='default'))
['0', 'default', '2']For the same reasons, you cannot get or set slices of aSparseArray, norinsert()
Package: bitmask-decoder
Bitmask decoderPython wrapper to decode days-of-week bitmasks.This mask is created by assigning an integer to each day of the week and summing up the integers of the relevant days.It is assumed that the days are assigned as follows:Monday: 1Tuesday: 2Wednesday: 4Thursday: 8Friday: 16Saturday: 32Sunday: 64Any combinations of these days can be summed up to create a mask for that specific combination. For example:42 = tuesday, thursday and saturdayInstallationbitmask-decoder is available via pip.pip install -i https://test.pypi.org/simple/ bitmask-decoder==0.0.64 Functionsbitmask_decoder.decode_weekday()bitmask_decoder.decode_all_weekdays()bitmask_decoder.encode_weekday()bitmask_decoder.encode_all_weekdays()Exampleimportbitmask_decoderbitmask_decoder.decode_weekday(17)# ['Mon', 'Fri']bitmask_decoder.decode_all_weekdays([9,17,127])# [['Mon', 'Thu'], ['Mon', 'Fri'], ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']]bitmask_decoder.encode_weekday(["Monday","Friday","Saturday"])# 49bitmask_decoder.encode_all_weekdays([["Monday","Friday"],["Friday","Saturday","Sunday"],["Saturday","Sunday"]])# [17, 112, 96]
Package: bitmast-blockcypher
Bitmast BlockCypher wrapperA python wrapper for accessing BlockCypher API and selected bitcoin featuresThe Bitmast BlockCypher tool is a python implementation of the BlockCypher,https://www.blockcypher.com/quickstart/.MotivationThe BlockCypher API while a very rich collection of blockchain tools and services does not readily fit the design model
needed by Bitmast in deploying custom blockchain payment and other exchange services. To augment the work done by
BlockCypher, Bitmast Digital Services designed and developed this wrapper which can be integrated to other python based
frameworks or tools for developing applications for niche markets.DependenciesThe wrapper requiresblockcyherandbitcoinlib.
The target Python language for current implmentation is Python 3.6.8Build StatusVersion: 1.0.2Current development is version 1.0.1. This is considered the Alpha Edition.FeaturesSupport PayStack features includes:Generate bitcoin or registered blockchain wallets and addressesGenerate HD wallet for bitcoinSign blockchain transactions locally to improve security of user's walletGenerate private and public keysVerify addresses for given a networkCreate datastructures that can be used to parse blockchain API responses into native Python classesContributingPlease visit application repo for further information on extending project. Ideas and comments will be reasonably
appreciated.AuthorCurrent development is by Aniefiok Friday@frier17.LicenseMIT LicenseFor details read license contracthereCopyright 2020 @frier17The MIT License (MIT)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.