Saravanan666/pypi-org huggingface dataset:
Package: blocklist-aggregator
Blocklist aggregatorThis python module does the aggregation of several ads/tracking/malware lists, and merges them into a unified list with duplicates removed.
Create your own list from several sources.See theblocklist-domainsrepository for an implementation.Default sources are defined on theconfiguration fileTable of contentsInstallationGet StartedCustom ConfigurationFetch and save-it to filesInstallationIf you want to generate your own unified blocklist,
install this module with the pip command.pipinstallblocklist_aggregatorGet startedThis basic example enable to get a unified list of domains.
You can save-it in a file or do what you want.importblocklist_aggregatorunified=blocklist_aggregator.fetch()print(unified)["doubleclick.net",...,"telemetry.dropbox.com"]print(len(unified))152978Custom configurationSee the defaultconfiguration fileThe configuration contains:the ads/tracking/malware URL lists with the pattern (regex) to usethe domains list to exclude (whitelist)additionnal domains list to block (blacklist)The configuration can be overwritten at runtime.cfg_yaml="verbose: true"unified=blocklist_aggregator.fetch(cfg_update=cfg_yaml)or loaded from external config fileunified=blocklist_aggregator.fetch(cfg_filename="/home/custom-blocklist.conf")Fetch and save-it to filesThis module can be used to export the list in several format:texthostsCDB (key/value database)importblocklist_aggregator# fetch domainsunified=blocklist_aggregator.fetch()# save to a text fileblocklist_aggregator.save_raw(filename="/tmp/unified_list.txt")# save to hosts fileblocklist_aggregator.save_hosts(filename="/tmp/unified_hosts.txt",ip="0.0.0.0")# save to CDBblocklist_aggregator.save_cdb(filename="/tmp/unified_domains.cdb")For developpersRun test unitspython3-munittestdiscovertests/-v
Package: blockly_runner
testspypiRunblockly workspacesdirectly, without the need to convert it to Python code.Free software: MIT licenseInstallationCurrently, you must install the in-development version with (we are not onpypiyet):pip install blockly-runnerDocumentationTo use the project:fromblockly_runnerimportexecute_workspace_merge_all_roots,execute_workspace# Result will contain all the variable updated to match their new value.# If you have many block roots, you will get a global result.result=execute_workspace_merge_all_roots(my_dict_workspace,{"var1":1,"var2":"Hi"})# If you have many block roots, you will get a list of result with as many element as you have roots.results=execute_workspace(my_dict_workspace,{"var1":1,"var2":"Hi"})We currently support:Logic with if, if/else, if/else if, negation, comparison operators, logic operations.Basic math: create a number variable, basic math operations (+, -, *, /, ^).Basic text: create a text variable.Variable management: set a variable, access a variable, change a number variable by a delta.The following exceptions can be raised:UndefinedVariableif you try to access a variable before it is defined.InvalidBlockif we encounter an invalid block. It shouldn’t happen if you pay attention in the interface ;-)
And it’s there it’s easier to spot where this error comes from.Contributions are welcomed to help us go further.DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxCreate a new releaseYou needflitto publish the release.Bump version insrc/blockly_runner/__init__.py.Update theCHANGELOG.rst.Commit and push.Publish the package withflit publish.
Package: blockmatrix
blockmatrixA python package to provide easier working with block-structured matrices. Currently, this
code mostly serves my purposes, i.e., manipulating block-structured covariance matrices
and applying high-dimensional estimation techniques to them.This package is also available on PyPi.UsageAs of now unfortunately only the code and the docstrings are available as documentation.Running theexamples/main_spatiotemporal_manipulations.pyshowcases some of the
functionality and visualizations.TodosDocumentationTestingImplementation of sklearn style covariance estimatorsMoved to ToeplitzLDA packageAbstract mne channels awayUsing optional mne dependencyReduce unnecessary dependenciestoeplitzis now optional
Package: blocknet
#BlockNetRunning private blockchain application using Hyperledger Fabric network, it is a pain when it comes to the configuration. Missing some configuration will deny the network to run. The pain of modifying the Hyperledger Fabric organization default setting. The lock into the Hyperledger fabric default twoorgsand so on. If you are among those people, then welcome toBlocknet. A python package that is design to solve the above issues.blocknetallow you to generate the Hyperledger Fabric setting with only the provided configuration.
Package: blockpipe
Blockpipe Client for PythonBlockpipe Client is a Python library for interacting with Blockpipe Endpoint API. It provides a simple interface for fetching data from the API and supports both single endpoint and multiple endpoints.InstallationInstall the package using pip:pipinstallblockpipeUsageImportClientand create a new instance:fromblockpipeimportClientclient=Client('<PROJECT_SLUG>',environment='production',# optionalbase_url='https://app.blockpipe.io/endpoint',# optional)Fetch data from the Blockpipe Endpoint API:results=client.get(['/path1','/path2'])or with a single endpointresult=client.get('/path1')Use the fetched data in your application:forresultinresults:print(result['data'])# If you only requested one endpoint, you can access the data directly:print(result['data'])APIClientA Python class representing a Blockpipe Client instance.Constructor:project: The project slug.environment(optional): The deployment environment. Default is'production'.base_url(optional): The base URL for the API. Default is'https://app.blockpipe.io/endpoint'.getA method to fetch data from one or multiple Blockpipe Endpoint API paths.Arguments:endpoints: A list of endpoint paths or a single endpoint path as a string.Returns:A list of data fetched from the specified endpoints, or a single data object if a single endpoint path was provided.Developer NotesBuilding the PackagepoetrybuildPublishing the Packagepoetrypublish# ORpoetrypublish--username__token__--password[PYPI_TOKEN]LicenseApache 2.0
Package: blockpipe-client
Blockpipe Client for PythonBlockpipe Client is a Python library for interacting with Blockpipe Endpoint API. It provides a simple interface for fetching data from the API and supports both single endpoint and multiple endpoints.InstallationInstall the package using pip:pipinstallblockpipe-clientUsageImportBlockpipeClientand create a new instance:fromblockpipe_clientimportBlockpipeClientclient=BlockpipeClient("<PROJECT_SLUG>",{"environment":"production",# optional"baseUrl":"https://app.blockpipe.io/endpoint"# optional})Fetch data from the Blockpipe Endpoint API:results=client.get(["/path1","/path2"])or with a single endpointresult=client.get("/path1")Use the fetched data in your application:forresultinresults:print(result)# If you only requested one endpoint, you can access the data directly:print(result)APIBlockpipeClientA Python class representing a Blockpipe Client instance.Constructor:project: The project slug.options(optional): A dictionary with optional configurations:environment: The deployment environment. Default is"production".baseUrl: The base URL for the API. Default is"https://app.blockpipe.io/endpoint".getA method to fetch data from one or multiple Blockpipe Endpoint API paths.Arguments:endpoints: A list of endpoint paths or a single endpoint path as a string.Returns:A list of data fetched from the specified endpoints, or a single data object if a single endpoint path was provided.LicenseApache 2.0
Package: blockplotlib
BlockplotlibMatplotlib-based library for the creation of block diagrams.
Besides this core functionality, blockplotlib provides a workflow
to include all kinds of matplotlib figures with the correct font size
into latex documents. While latex is also often used to render text
inside figures/block diagrams, blockplotlib (as matplotlib)
depends not on latex.The functionality of the library is limited to the features
demonstrated in the examples but can be extended quite easily.ExamplesHow to draw a simple control loop is illustrated with the
exampleblockplotlib/examples/control_loop_one_dof.py.control_loop_one_dof.pdfA more complex example is the block diagram of the
so-called hyperbolic observer canonical form:blockplotlib/examples/hyperbolic_ocf.pyhyperbolic_ocf.pdfThe inclusion of matplotlib figures with the correct
font size into a latex document can be adapted
from the example underblockplotlib/examples/tex_article.
It basically relies on two measurements of the height of a string.
One measurement is performed in the latex preamble and the
other one in the respective matplotlib figure using
a blockplotlib function.More examples can be found underblockplotlib/examples/.InstallationOne way to use blockplotlib is to install it via
pip (pip install blockplotlib).
Another way to use it is to copy the fileblockplotlib.pyin the folder
of the Python script from which it is to be imported.
Package: blockporn
PORN BLOCKER © 2023 - 2024INSTALLATIONpipinstallblockpornUSAGEfromBlockpornimportBlockerurl="https://xxx.com"core=Blocker()resu=core.blocker(url)print(resu)#======[ ADD MORE SITES ]======fromBlockpornimportBlockerurl="https://xxx.dc"blok=["xxx.db","xxx.dc"]core=Blocker(block=blok)resu=core.blocker(url)print(resu)#======[ CUSTOM BLOCK ]======fromBlockpornimportBlockerurl="https://xxx.me"blok=["xxx.me","xxx.ms"]core=Blocker(block=blok)resu=core.blocked(url)print(resu)LICENSEThe MIT License. Please seeLicense Filefor more information.
Package: block-pruner
Block PrunerHow would you go about deleting blocks of[start;end]if the block contains615inexample.txt?example.txta
2
start
a
b
615 b
d
end
f
a
g
start
610
h
i
end
b
3
start
e
e
615
s
s
end
a$ block_pruner --start start --end end --needle 615 example.txt
a
2
f
a
g
start
610
h
i
end
b
3
aUsageblock_pruner--startstart--endend--needle615example.txt>out.txtDevelopmentFor help getting started developing checkDEVELOPMENT.md
Package: blockpype
BlockpypeBreaks apart input stream into blocks and pipes each block into newly spawned processesInstallingpip install git+https://github.com/kfzteile24/blockpype.gitTestingClone the repository and run visual tests that display each started PID and their output:test/by-byte.sh- should break apart in the middle of the 2-byte charactertest/by-char.sh- should break apart in the middle of some numberstest/by-line.sh- should break apart nicely line by lineUsagecat content.txt | blockpype -l 10 other-program --arg-for-program --another-arg "argument value"It will cutcontent.txtinto blocks of 10 lines, and for each block, a process will be started using the command:other-program --arg-for-program --another-arg "argument value"and the contents of the block will be served tostdinWhat's it for?Whenever you want to break apart a large stream when theother-programconsumer stores it into memory until EOF, and you don't have enough memory for it.Similar tosplit --filter "other-program --arg-for-program --another-arg \"argument value\""except less clunky,other-programgets launched from currentpwdwith the current user, and with the current environment variables.
Package: blocksat-api
UsageTo import the Class and satellite APIs for mainnet and testnet:fromblocksat_apiimportblocksatCreate a new order object to place a new order, increase an order bid, get an order status or delete an order:# create a new order object with optional message and networko=blocksat.Order(message='Hello, world.',network='mainnet')Methods called will return nothing upon success, storing the API status_code and a json-encoded response.text in the appropriate object attribute.To check pending orders, queued orders, sent orders or the satellite lightning node info use the external methods which return a successful result as a json of response.text and a failure as a tuple of (response.status_code, response.reason, response.text):# to check sent_orderssent_orders=blocksat.sent_orders(sat_url=blocksat.SATELLITE_API)
Package: blockscan-python
blockscan-pythonThis package was created in the hope to provide a multi-chain API
wrapper for the blockscan.com endpoints and reduce the overhead of
using multiple single chain wrapper.NoteThe following blockchains fromblockscout.comare also
providedBUTit’s because blockscout offers the API fordevelopers transitioning
their applications from Etherscan to BlockScout. If they deprecate those API in the
future so will this package.Gnosis (100)Ethereum Classic (61)Ethereum Classic Mordor (63)Ethereum Classic Kotti (6)POA Core (99)POA Sokol (77)Artis Sigma1 (246529)RSK (30)Hoo Smart Chain (70) (This one is technicaly part of blockscan.com but is built on top of blockscout)InstallationBlockscan-python can be installed usingpipas follows:$pipinstallblockscan-pythonUsageRefer to thefull documentationfor the list of endpoints and the specific blockscan provider for compatibility.
This package doesn’t filter the endpoints on a per-chain basis.
This means that some calls will fails if the provider doesn’t support it.PrerequisiteThe chain ID you want to connect to.Refer tochainlistif unknownSpecific chain API Token provided byblockscan(i.e: Anetherscan.iotoken for Ethereum)Exception: Any Blockscout chain takes an empty string “”, No token requiredCreate a connection clientThe connection can be created asSync:>>>fromblockscanimportBlockscan# Sync connection to etherscan.io>>>client=blockscan(1,"MYAPITOKEN",is_async=False)>>>client.accounts.get_currency_balance("0x0000000000000000000000000000000000000000")'11400022397988649428803'But will default toAsyncif no parameter is provided:>>>fromblockscanimportBlockScan#Async connection to bscscan.com>>>client=Blockscan(56,"MYAPITOKEN")>>>bal=awaitclient.accounts.get_currency_balance("0x0000000000000000000000000000000000000000")>>>print(bal)'1073557893975925234717'The full list of parameters is available in thedocumentationDonateI made this has a fun side project and it’s free for anyone to use.
If you like it and wish to donate here’s a few of my crypto wallets.Ethereum and L2s (0x29006…)Monero (85tBS7YSrM5…)Peercoin (PBzj1ZwMDW…)Free software: MIT licenseDocumentation:https://blockscan-python.readthedocs.io.CreditsCredits to@pcko1for making the
bscscan-python that was used as the base for this packageTO-DOsAdd a reference table of the available Chain ID to the docsHistory0.0.1 (2022-07-02)First release on PyPI.1.1.0 (2022-07-03)CI tests and deployment addedPackaging build tested and beta ready1.1.1 (2022-07-26)Preloaded modules for easier IDE usage
Package: blockscope
Block Local ScopeThis simple package allows for variables to be block scoped, which is a common feature of many languages but is missing in Python.Installation & Basics$pipinstallblockscopeThe package exposes a single classLocal. An instance of this class is meant to be used with thewithblock.For the most basic use cases, the keyword arguments to theLocalconstructor declare and initialize "variables" that become attributes of theLocalinstance:fromblockscopeimportLocalwithLocal(x=1,y=2)aslocal:print(local.x,local.y)# prints: 1 2local.z=3# declare new variableprint(local.z)# prints: 3# when `with` exits: local's x, y, and z# are cleaned up automaticallyNote that you can add as many new variables as you'd like inside thewithblock, such as thelocal.zvariable shown above.When thewithblock exits, all attributes ofLocalinstance are released.Tuple UnpackingOne of the more useful features is tuple (or any iterable) unpacking, which allows you to quickly and easily assign multiple values at once to separate variables. For example:deffoo():return1,2,3withLocal('x, _, z',foo())aslocal:print(local.x,local.z)# prints: 1 3Note theplaceholder_to ignore the second element of the tuple. This is in line with Python's regular syntax for tuple unpacking, such asx, _, z = foo()You can use*,?, and~modifiers to fine-tune the unpacking process.
Consider this example:defbar():return4,5withLocal('x, _?, y? , z~ ,_*',bar())aslocal:# x   Sets local.x to the first element of the tuple (4).# _?  ignores the second element of the tuple (5) if present.#     If _ is by itself (no ?) and the element is not present#     an AttributeError with a helpful message is raised.# y?  Sets local.y to the 3rd element of the tuple if present,#     In this case, there's no 3rd element and local.y will#     not exist.# z~  local.z would be set if present or set to None otherwise#     In this case, local.z will be None.# _*  Ignores the rest of the tuple elements, and is always used#     in the last position with a placeholder _ or by itself.print(local.x,local.z)# prints: 4 NoneYou can chain multiple unpackings and declarations together, allowing you to extract and assign values from multiple tuples or iterables in a single line of code.withLocal('x,y,*',foo(),'_,z'=bar(),i=6,j=7)aslocal:print(local.x,local.y,local.z)# prints: 1 2 5print(i,j)# prints: 6 7Dictionary and List UnpackingDictionaries{str:any}and lists of tuples[(str, any)]are unpacked automatically if not assigned to a keyword argument:d={'x':1,'y':2,'z':3}l=[('a':4),('b':5),('c':6)]withLocal(d,l)aslocal:print(local.x,local.y,local.z)# prints: 1 2 3print(local.a,local.b,local.c)# prints: 4 5 6
Package: block-scopes
🩺block-scopesBlock scoping in Python!Table of ContentsUsageInstallationLicenseUsagefromscopesimportscopebefore="I'll be kept!"withscope("keep_me","keep_me_too"):keep_me="Keep me!"lose_me="Not me!"keep_me_too="Also... me!"assert"before"inlocals()assert"keep_me"inlocals()assert"keep_me_too"inlocals()assert"lose_me"notinlocals()Installationpip install block-scopesLicenseblock-scopesis distributed under the terms of theMITlicense.
Package: blocksec2go-ethereum
Blocksec2Go-EthereumThis repository contains the source code ofblocksec2go-ethereumPython package which wraps theblocksec2gopackage to allow easier interaction with Ethereum blockchain.Read more about rationale behind this packageon our blog postIf you're unsure what Blockchain Security 2 Go is,you can find more info here.Installationpipinstallblocksec2go-ethereumUsageAfter creating an instance ofBlocksec2Goyou can use it to generate signatures for transaction dicts. When passed raw tx,sign_transaction()will return a hex string of RLP-encoded signed transaction that can be directly consumed byweb3.eth.sendRawTransaction().The replay attack protection introduced withEIP-155is used by default. Setchain_id=Noneto force the legacy behaviour for backward compatibility.Transfer EtherBelow you will find an example of signing a simple Ether transfer:fromblocksec2go_ethereumimportBlocksec2GoSignerfromweb3importWeb3WEB3_ENDPOINT='YOUR_ENDPOINT_HERE'web3=Web3(Web3.HTTPProvider(WEB3_ENDPOINT))chain_id=web3.eth.chainIdsigner=Blocksec2GoSigner(chain_id=chain_id,key_id=1)address=signer.get_address()nonce=web3.eth.getTransactionCount(address)raw_tx={'to':'0xBaBC446aee039E99d624058b0875E519190C6758','nonce':nonce,'value':Web3.toWei(0.00005,'ether'),'gas':21000,'gasPrice':Web3.toWei(5,'gwei'),}signed_tx=signer.sign_transaction(raw_tx)tx_hash=web3.eth.sendRawTransaction(signed_tx)print(f'Sent transaction with hash:{tx_hash.hex()}')Call a contract functionYou can also sign any contract calls/creation transactions by leveragingbuildTransaction().Please note that for some contractsbuildTransaction()may require explicitly settingfromfield to properly estimate gas.importjsonfromblocksec2go_ethereumimportBlocksec2GoSignerfromweb3importWeb3WEB3_ENDPOINT='YOUR_ENDPOINT_HERE'web3=Web3(Web3.HTTPProvider(WEB3_ENDPOINT))chain_id=web3.eth.chainIdsigner=Blocksec2GoSigner(chain_id=chain_id,key_id=1)address=signer.get_address()withopen('artifact.json','r')asartifact_file:artifact=json.loads(artifact_file.read())contract=web3.eth.contract(address=artifact['address'],abi=artifact['abi'])nonce=web3.eth.getTransactionCount(address)raw_tx=contract.functions.setValue(42).buildTransaction({'nonce':nonce,'from':address})signed_tx=signer.sign_transaction(raw_tx)tx_hash=web3.eth.sendRawTransaction(signed_tx)print(f'Sent transaction with hash:{tx_hash.hex()}')LicenseISC © 2020 rexs.io
Package: blocksmurfer
Install and run a local block explorer.Bitcoin blockchain explorer based on Python Bitcoinlib (https://github.com/1200wd/bitcoinlib).
Search the blockchain for addresses, transactions, blocks, unspent outputs, etc.This software currently runs onhttps://blocksmurfer.ioData will be retrieved from various service providers such as Blockchair, Blockchain.info or Blockstream.
Blocksmurfer can also receive data from a local bcoin or bitcoind server.
Package: block-stdout
Block StdoutA context manager that blocks the standard output when wrapped aroundprintstatements.Installationpython-mpipinstallblock-stdoutUsagefromblockstdoutimportBlockPrintdefprinter():print('I will not be printed')deftester():print('I will be printed')withBlockPrint():printer()print('I will also be printed')if__name__=='__main__':tester()Pypi PackageLicense & copyright© Vignesh RaoLicensed under theMIT License
Package: blockstream
blockstreamA python 3 wrapper class for blockstream.info's Bitcoin block explorer APIWritten in Python 3Docs:https://github.com/psqnt/blockstream/blob/master/docs.mdBlock explorer:https://blockstream.infoAPI Reference:https://github.com/Blockstream/esplora/blob/master/API.mdInstallpip install blockstreamif not in a python3 virtualenv make sure to use python3pip3 install blockstreamUsagefromblockstreamimportblockexplorer# get transaction by idtx_id='56a5b477182cddb6edb460b39135a3dc785eaf7ea88a572052a761d6983e26a2'tx=blockexplorer.get_transaction(tx_id)# get address dataaddress='3ADPkym6mQ2HyP7uASh5g3VYauhCWZpczF'addr_info=blockexplorer.get_address(address)ExamplesReference examples.py to see each method in useIssuesthescripthashendpoint seems to be broken, however you can get data about a scripthash address by calling theaddressendpoint. I have decided to remove the functions to hit thescripthashendpoint for now.
Package: blocksWorld
Copyright (c) 2018 Dan PetreThe MIT License (MIT)About This ProjectBlocksWorld is a tool for generating simple test images.Core featuresgenerate simple test images.Supported platformsUbuntu 16.04, Python 3.5+Might work on other configurations however at this time the focus will be on a single platform until the project matures a bit.Build from source prerequisitesPython 3.5+$sudoaptinstallpython3-pip$sudoaptinstallpython3-setuptools$pip3installwheelSimilarly, for those who like to experiment:Python 2.7+$sudoaptinstallpython-setuptools$sudoaptinstallpython-pip$pipinstallwheelBuild wheel:./build.sh.Install locally built wheel:$ pip install –user dist/*or, if your pip doesn’t automatically use python3:$ python3 -m pip install –user dist/*Notice the use of the–useroption. You can install system wide usingsudobut the project is still in very early stages so installing as user can keep your system files clean(er).ResourcesWebsite:Code:https://github.com/takanokage/blocksWorldDocumentation:https://github.com/takanokage/blocksWorld/wikiLicense:The MIT license