Saravanan666/pypi-org huggingface dataset:
Package: blackfire
Blackfire Python SDK is a Python library that manages the Blackfire
Python Profiler and handles communication with Blackfire.io servers.Read the officialBlackfire
documentationfor more information.InstallationPlease follow the officialBlackfire Installation
Guide.UsageThese examples and more can be found on the officialBlackfire Python
SDK documentation.ResourcesBlackfire.ioBlackfire Installation
GuideBlackfire Python SDK
documentationBlackfire Django
IntegrationBlackfire Flask
Integration
Package: blackfire-conprof
Blackfire Continuous Profiler for PythonBlackfire Continuous Profiler continuously collects and uploads profiling data to the Blackfire servers. Once enabled, the profiler collects the relevant profiling information in configurable intervals and periodically uploads it to the Blackfire Agent. Blackfire Agent then forwards this information to the backend.How to usePrerequisitesPython >= 3.7.0Blackfire Agent >= 2.13.0Installationpipinstallblackfire_conprofExampleAn example using the whole API interface:Install dependenciespipinstallblackfire_conprofCreateexample.pywith the following codefromblackfire_conprof.profilerimportProfilerdeffoo():importtimetime.sleep(1.0)profiler=Profiler(application_name="my-python-app",agent_socket="tcp://127.0.0.1:8307",labels={'my-extra-label':'data'})profiler.start()foo()profiler.stop()Run Blackfire Agent (version 2.13.0 and up)BLACKFIRE_SOCKET="tcp://127.0.0.1:8307" blackfire agent --log-level=4Run the example application. (python example.py)Profiler will send data to the Agent, and Agent will forward it to the Blackfire backend. Data then can be visualized athttps://blackfire.ioContributingUsemake helpto display an overview of useful commands for your dev environment.
Package: blackfortpay
BlackFortPayBlackFort Payment API client for Python 3.6+Installationpip install blackfortpayUsagefromblackfortpayimportBlackFortPaymentAPI# pass API User key and API Secret key or store them as environment variables BLACKFORT_API_USER_KEY and BLACKFORT_API_SECRET_KEY>>>client=BlackFortPaymentAPI('api-user','api-secret')# also you can pass pos_id and locale>>>rate=client.start_payment(invoice_amount=100,invoice_currency='EUR',currency='BTC')GetRateResponse(invoice_currency='EUR',invoice_amount='100.00',currency='BTC',rate='7014.0000',amount_exchange='0.01425719',network_processing_fee='0.00000452',amount='0.01425945',wait_time='7 minutes',fast_transaction_fee='0.00033656',fast_transaction_fee_currency='BTC/kB',payment_id='2a1eb341-5e87-4ad8-9f0b-089f5ff027f6')>>>rate.rate'7014.0000'# Change pos_id and locale if needed by set_pos_id() and set_locale() methodsAPI reference availablehere
Package: blackfynn
Python client and command line tool for Blackfynn.InstallationTo install, runpipinstall-UblackfynnSee theinstallation notesfor more details.ReleaseTo release, you should:Change CHANGELOG.md with the proper changes for the releaseModify the version in __init.py__Merge the branch into masterCreate a new Github ReleaseDocumentationClient and command line documentation can be found onBlackfynn’s
documentation website.You can alsocontributeto Blackfynn’s documentation to improve this project and help others learn.TestsInstall the test requirements before runningpytest:makeinstallpytestTo run the Blackfynn CLI Agent integration tests, you need toinstall the agentand run the tests with the–agentargument:pytest--agentContributionPlease make sure to read theContributing Guidebefore making a pull request.ChangelogChanges for each release are documented in therelease notes.
Package: blackgate
Blackgate is an API gateway application.  It’s stateless and extendable.Install via pipRun:$ pip install blackgateOr:$ git clone git@github.com:soasme/blackgate.git
$ cd blackgate
$ python setup.py installInstall via dockerRun:$ docker pull soasme/blackgateExampleConfigure UpstreamA minimal Blackgate config looks something like this:---
proxies:
  - name: github
    upstream_url: 'https://api.github.com'
    request_path_regex: /github/(.*)
    request_path_sub: /\1Just save it asblackgate.yml.Run ApplicationRun application:$ blackgate -c ./blackgate.yml --no-daemon start

# or run as a daemon
$ blackgate -c ./blackgate.yml --pidfile=/tmp/blackgate.pid start

# or run via docker
$ docker run -it --rm --name blackgate \
    -p 9654:9654 \
    -v blackgate.yml:/etc/blackgate.yml blackgate:latestTest BlackgateUsingcurlto test functionality:$ curl http://127.0.0.1:9654/github/repos/soasme/blackgate
{"id":59739087,"name":"blackgate","full_name":"soasme/blackgate", ...
Package: blackhc.laaos
Log as append-only source packageLogs as append-only source: write your ML training results in Python without having to worry about crashes. Loading is a breeze: the logs are native Python code. The package supports unstructured data. The data can easily be imported into Jupyter Notebooks or elsewhere.InstallationTo install using pip, use:pip install blackhc.laaosTo run the tests, use:python setup.py testAppend-only source logsStoring training results as Python dictionaries or JSON files is problematic because the formats are not append-only,
which means that you have to rewrite the file every time something changes. (Or you only write results at the end,
which does not play well with interruptions or intermediate failures.)Alternatively, we can simply write the operations that create a structure to a file in an append-only fashion.
If the data structure itself is growing and not mutated, this only increases file-size by a constant factor.The advantage of this library is that the file format is very simple: it's valid Python code.The only requirement is that you only store primitive types, lists, sets, dicts and immutable types.Custom wrappers can be added by registeringTypeHandlers when creating aStore. SeeWeakEnumHandlerandStrEnumHandler.Examplefromblackhc.laaosimportcreate_file_store,safe_load_storestore=create_file_store('test',suffix='')store['losses']=[]losses=store['losses']foriinrange(1,10):losses.append(1/i)store.close()The resulting filelaaos/test.pycontains valid Python code:store={}store['losses']=[]store['losses'].append(1.0)store['losses'].append(0.5)store['losses'].append(0.3333333333333333)store['losses'].append(0.25)store['losses'].append(0.2)store['losses'].append(0.16666666666666666)store['losses'].append(0.14285714285714285)store['losses'].append(0.125)store['losses'].append(0.1111111111111111)It can be loaded either with:formlaaos.testimportstoreor with the more secure:safe_load('laaos/test.py')
Package: blackhc.notebook
# Notebook setup package[![Build Status](https://travis-ci.org/BlackHC/notebook_setup.svg?branch=master)](https://travis-ci.org/BlackHC/notebook_setup)Idea is to` import blackhc.notebook `and get someuseful stuff in your jupyter notebooks.Right now ‘useful stuff’ is:finds the project root and changes directory to that;adds$project_root/srcto the Python paths;load the autoreload extension and set its mode to 2.## InstallationTo install using pip, use:` pip install blackhc.notebook `To run the tests, use:` python setup.py test `
Package: blackhc.progress-bar
Progress BarA progress bar that is either using TQDM for nice outputs internally, or a log-friendly replacement that works well for piping into files.Examplefromblackhc.progress_barimportwith_progress_barfor_inwith_progress_bar(range(100000)):passThe package will decide whether to use tqdm or not based on whether output is attached to a terminal or not,
or whether the cell is executed within a Jupyter Notebook or IPython terminal.You can useblackhc.progress_bar.use_tqdm = True/Falseto force TQDM (or force disable it).InstallationTo install using pip, use:pip install blackhc.progress_barTo run the tests, use:python setup.py test
Package: blackhc.project
Notebook setup packageIdea is toimport blackhc.notebookand get someuseful stuff in your jupyter notebooks.Right now 'useful stuff' is:finds the project root and changes directory to that;adds$project_root/srcto the Python paths;load the autoreload extension and set its mode to 2.InstallationTo install using pip, use:pip install blackhc.notebookTo run the tests, use:python setup.py test
Package: blackhole
Blackhole is anMTA (message transfer agent)that (figuratively)
pipes all mail to /dev/null, built on top ofasyncioand utilisesasync defandawaitstatements
available inPython 3.5.While Blackhole is an MTA, none of the actions performed via SMTP or SMTPS are
actually processed, and no email is delivered. You can tell Blackhole how to
handle mail that it receives. It can accept all of it, bounce it all, or
randomly do either of those two actions.Think of Blackhole sort of like a honeypot in terms of how it handles mail, but
it’s specifically designed with testing in mind.Python supportPython 3.7+PyPy 3.7+Pyston 2.2+DocumentationYou can find the latest documentationhere.If you would like to contribute, please read thecontributors guide.The latest build status on GitHubhttps://github.com/kura/blackhole/actions/workflows/ci.yml.And the test coverage report oncodecov.ChangelogYou can find a list of changeson the
blackhole website.
Package: black-holes
BlackHolesBlack Holes is a simple way to handle your projects secrets using adatabaseorConsul.io.IMPORTANT:Work-in-Progress. Beta version. Non production software.Installing BlackHolesUsing BlackHolesSqlite BlackHolePlain KeysEncrypted KeysConsul BlackHolePlain KeysInstallInstalling fromPip(pyenv)$pipinstallblackholeInstalling fromsources:(pyenv)$cdblack_holes(pyenv)$pythonsetup.pyinstallUsage:SqliteBlackHoleDatabase BlackHole basedsimple usage db-black-holePlain{'key': 'values'}storage.fromblack_holesimportSqliteBlackHole# Create a new SqliteBlackHole instancenear_black_hole=SqliteBlackHole()# Create a key called "key" with value "value"near_black_hole['key']='value'# print keyprint(near_black_hole['key'])# >>> valueAdvanced usage db-black-hole:Encrypted{'key': 'values'}storage.fromblack_holesimportSqliteBlackHole# Create a new SqliteBlackHole instance# By default AES password is `qwerty12345678`near_black_hole=SqliteBlackHole()# Create a new custom password_callback functionmy_pass=lambdainstance:'my-very-poor-password'near_black_hole=SqliteBlackHole(password_callback=my_pass)# Create a AES Encrypted keynear_black_hole['encrypted_key']='it is a secret'# Encrypted valueprint(near_black_hole['key'])# >>> Encrypted Value# Decrypted valueprint(near_black_hole['decrypted_key'])# >>> Decrypted ValueConsulBlackHoleConsul.io BlackHole basedSimple usage consul-black-holePlain{'key': 'values'}storage.fromblack_holesimportConsulBlackHole# Create a new DEV ConsulBlackHole instanceremote_black_hole=ConsulBlackHole()# You can also creates a new ConsulBlackHole instance using consul auth token# remote_black_hole = ConsulBlackHole(token='{consul-io-token}')# Create a key called "key" with value "value"remote_black_hole['key']='value'# print keyprint(remote_black_hole['key'])# >>> valueMade it with ❤ byDTecDeal
Package: black-hole-solver
Info:This is the README file for Black Hole Solver cffi-based Wrapper.Author:Shlomi Fish <shlomif@cpan.org>Copyright:© 2020, Shlomi Fish.Date:2020-06-23Version:0.2.3PURPOSEThe black_hole_solver PyPI distribution wraps the Black Hole Solitaire
Solver C API:https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/https://github.com/shlomif/black-hole-solitaireINSTALLATIONpip3 install black_hole_solverCOPYRIGHTCopyright © 2020, Shlomi Fish.
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.Neither the name of the author of this software nor the names of
contributors to this software may be used to endorse or promote
products derived from this software without specific prior written
consent.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: blackjack
Blackjack is a simple implementation of the classic red-black tree as a
standard Python data structure. A set and a dictionary are included:>>> from blackjack import BJ, Deck
>>> bj = BJ()
>>> bj
BJ([])
>>> bj.add(42)
>>> 42 in bj
True
>>> d = Deck()
>>> d[1] = 2
>>> d[3] = 4
>>> d.keys()
[1, 3]
>>> d.values()
[2, 4]UsageBlackjacks and decks behave just like normal Python sets and dictionaries, but
have different performance characteristics and different requirements for
keys. All keys must be comparable, but need not be hashable:>>> bj = BJ()
>>> bj.add([1])
>>> bj.add([1,2])
>>> bj.add([1,2,3])
>>> bj
BJ([[1], [1, 2], [1, 2, 3]])This does impact heterogeneity somewhat, but shouldn’t be a problem for most
common uses. On the other hand, the average and worst-case times for access,
membership testing, insertion, and deletion are all logarithmic, which makes
blackjacks ideal for storing mappings of data with untrusted keys:$ python -mtimeit \
> -s 'l = [(x*(2**64 - 1), hash(x*(2**64 - 1))) for x in xrange(10000)]' \
> 'dict(l)'
10 loops, best of 3: 4.11 sec per loop
$ python -mtimeit \
-s 'l = [(x*(2**64 - 1), hash(x*(2**64 - 1))) for x in xrange(10000)]
from blackjack import Deck' \
'Deck(l)'
10 loops, best of 3: 2.07 sec per loopEven on small- to medium-sized sets of data, blackjacks quickly become more
effective than dictionaries in the face of untrusted input.This package only contains theblackjackmodule; tests are in the module
and may be run with any standard test runner:$ trial blackjack | tail -n1
PASSED (successes=17)Technical informationThe specific trees used are left-leaning red-black trees. Red children are
opportunistically reduced during balancing if nodes will be recreated anyway;
this tends to shorten overall tree height by reducing the number of red
children. Complexities are as follows:OperationTimeSpaceLookupO(log n)O(1)MembershipO(log n)O(1)InsertionO(log n)O(log n)DeletionO(log n)O(log n)UpdateO(log n)O(log n)SortO(1)O(1)LengthO(1)O(1)Sorting according to the provided key function is constant because the tree’s
traversal order is presorted. Length is recorded and updated on mutation.
Nodes are persistent and altering the tree generally requires a logarithmic
space commitment to create new nodes.
Package: blackjack21
blackjack21A complete package for creating a multiplayer blackjack table.FeaturesNo limit of Tables count.No limit of players per table.No limit of decks of cards being used for the tableHit, Stand, Double Down, Split.Installationpipinstallblackjack21Full documentation available at:blackjack21.rtfd.io/en/latest/Examples:Basic ExampleAdvanced Example
Package: blackjack-amiyuki
blackjackBlackjack Simulator made with pygameDev Install & Setupgitclonehttps://github.com/amiyuki7/blackjack.gitcdblackjacksourcesetupDev entrypoint:python main.pyAlternatively...pipinstallblackjack-amiyukiand create a file like so and run it:# main.pyfromblackjackimport*fromblackjack.state.loadingimportLoadingif__name__=="__main__":App(Loading).run()
Package: blackjack-gui
blackjack-guiSingle-player Blackjack including GUI and CLI interfaces, written in Python. Can be used to simulate games with or without card counting
and to practise basic strategy.Installationblackjack-guirequires Python 3.8 or newer and usestkinter. Make sure it's installed in your system:$ sudo apt install python3-tkor similar (otherwise, you'll seeModuleNotFoundError: No module named 'tkinter').Then:$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install blackjack-guiUsageGUI versionblackjack [OPTION...]CLI versionblackjack --gui=False [OPTION...]OptionsNameDefaultCLI onlyDescription--stack1000Initial stack.--bet1Initial bet size.--n_games10xNumber of rounds to be played.--aiFalsexIf True, computer plays instead of you.--countFalsexIf True,aiuses card counting.--loglevelDEBUGxAdjust amount of logging: DEBUG or INFO.--cardsDetermine the first player cards, e.g.--cards=A,8,K. Shuffles the shoe after every hand.--dealer_cardsDetermine the first dealer cards. Useful for testing.ExamplesOpen the GUI version:$ blackjackWith the default settings, play 10 rounds of Blackjack without GUI:$ blackjack --gui=FalseLet the computer play perfect basic game and use card counting technique to bring down the house:$ blackjack --n_games=100000 --ai=True --count=True --loglevel=INFO --gui=FalseSimulate soft 19 starting hand only:$ blackjack --n_games=10000 --ai=True --loglevel=INFO --gui=False --cards=A,8RulesBlackjack rules vary depending on the casino. In this application they follow:https://casinohelsinki.fi/en/games/blackjack-eng/, i.e.:6 decsBlackjack pays 3 to 2Dealer must stand on soft 17Any two cards can be doubledMax. 4 hands can be achieved by splittingAces can be split but they receive only one extra cardDoubling after splitting is allowedSurrender is allowed but not against AceOptimal basic strategyNote that 16 vs 10 with 3 or more cards = StayTestsInstallblackjack-guifrom GitHub andpytest:$ git clone https://github.com/tukiains/blackjack-gui
$ cd blackjack-gui/
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install .
$ pip3 install pytestRun unit and integration tests:$ pytest-3 tests/unit.py
$ pytest-3 tests/integration.pyNotesCard images taken fromhere.LicenceMIT
Package: blackjackpy
How to play$ blackjackpy
Player( 6):  2(C) 4(S)
Dealer(--):  5(C) *(*)
Draw? (y/n) y
Player(16):  2(C) 4(S) J(C)
Dealer(--):  5(C) *(*)
Draw? (y/n) n
Player(16):  2(C) 4(S) J(C)
Dealer(17):  5(C) 3(C) 9(S)
You lose.$ blackjackpy
Player(20): 10(S) K(C)
Dealer(--):  7(C) *(*)
Draw? (y/n) n
Player(20): 10(S) K(C)
Dealer(18):  7(C) A(H)
You win.Ref.See:https://pyq.jp/quests/blackjack/
Package: black-junit
black-junitThis project is a tool for generation JUnit's report from black/blue outputInstallpip install black-junitUsageblack.--check--verbose2>results.txt
black-junit<results.txt>report.xmlor, in case usingblueformatter:blue.--check--verbose2>results.txt
black-junit<results.txt>report.xmlBadgesLicenseMIT License
Package: blacklight
BlacklightGenetic algorithms in autoML.This project aims to use Genetic Algorithms to optimize the topologies of Deep Neural Networks (DNNs) and explore new possibilities that traditional optimization techniques might overlook. The fitness function of the algorithm is the accuracy of the model, and the genes represent the individual topologies.InstallationMake sure you have Python 3.9 or higher installed (not greater than 3.11).Windows, LinuxCreate new virtual environment:pip install -m virtualenvpython -m venv your_virtual_env_nameyour_virtual_env_name\Scripts\activateInstall Tensorflow:pip install tensorflowInstall the package:pip install blacklightMacOS (Intel)Create new virtual environment:pip install -m virtualenvpython -m venv your_virtual_env_nameyour_virtual_env_name\Scripts\activateInstall Tensorflow:pip install tensorflow-macospip install tensorflow-metalInstall the package:pip install blacklightMacOS (Apple Silicon)Download Miniconda from:https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.shInstall Miniconda:Navigate to downloads foldercd ~/Downloadsbash Miniconda3-latest-MacOSX-arm64.sh -b -p $HOME/minicondaActivate Miniconda:source ~/miniconda/bin/activateInstall TensorFlow dependencies:conda install -c apple tensorflow-depsInstall TensorFlow:pip install tensorflow-macospip install tensorflow-metalInstall the package:pip install blacklightHypothesisThe hypothesis of this project is that DNN topologies will converge to either a local maximum or an absolute maximum over the evolution process, offering better performance than a DNN with randomly selected topology. For this experiment, the project will use equivalent activation functions (ReLU) and SGD for back-propagation, holding everything except the topology constant. Updated documentation coming soon.MethodologyThe project utilizes a genetic algorithm to evolve the topology of the DNN. The algorithm starts with a randomly generated population of DNN topologies and evaluates their fitness using the accuracy of the model. The fittest individuals are selected for reproduction, while the weaker ones are discarded. The offspring of the selected individuals are then created through crossover and mutation. This process is repeated for a specified number of generations, and the best-performing topology is chosen as the final output.DocumentationDocumentation can be found athttps://blacklightlabs.github.io/blacklight/html/index.html
Package: black-mamba
MambaMamba is a framework to write, compile, and deploy smart contracts
written in Vyper language and Solidity language. On top of that, it has supports for writing
and testing decentralized applications using Web3.py and Pytest.DependenciesGanacheGanache CLIPipPython3version 3.6 or greaterGo EthereumVyperSolidityInstallationYou can install the latest release viapip:$pipinstallblack-mambaTo use Solidity, you must installsolccompiler separately.Quick UsageTo set up the the structure of Mamba project directory:$mambainit
$editcontracts/HelloWorld.vy
$mambacompileDocumentationMamba documentation can be found atMamba website.ContributingI invite you to join Mamba squad! You can contribute to Mamba by
writing documentation, finding bugs, and creating pull requests.
Package: blackmaria
Black MariaGetting StartedPrerequisitesPython 3.6+InstallationexportOPEN_AI_KEYto your environment variablespip install blackmariaWhat is Black Maria?Black Maria is a Python library for web scraping any webpage using natural language.How to use Black Maria?Black Maria usesguardrails. Guardrails are a set of instructions that tell the LLM what the output should look like.fromblackmariaimportmariaurl="https://yellowjackets.fandom.com/wiki/F_Sharp"spec=("""<rail version="0.1"><output><object name="movie" format="length: 2"><stringname="summary"description="the summary section of the movie"format="length: 200 240"on-fail-length="noop"/><object name="cast" description="The cast in the movie" format="length: 3"><list name="starring"><string format="two-words"on-fail-two-words="reask"description="The starring section for the movie and roles"/></list><list name="guest_starring"><string format="two-words"on-fail-two-words="reask"description="The Guest starring section and roles"/></list><list name="co-starring"><string format="two-words"on-fail-two-words="reask"description="the starring section"/></list></object></object></output><prompt>Query string here.@xml_prefix_prompt{output_schema}@json_suffix_prompt_v2_wo_none</prompt></rail>""")query="provide details about the movie,summary,cast,cast.starring,cast.guest_starring,cast.co-starring"query_response=maria.night_crawler(url=url,spec=spec,query=query)print(query_response)Output{"movie":{"summary":"As the teens get their bearings among the wreckage, Misty finds hell on earth quite becoming. In the present: revenge, sex homework and the policeman formerly known as Goth.","cast":{"starring":["Lottie Matthews","Vanessa Palmer","Misty Quigley","Shauna Sadecki","Natalie Scatorccio","Taissa Turner"],"guest_starring":["Akilah","Laura Lee","Mari","Adam Martin","Javi Martinez","Travis Martinez","Jessica Roberts","Jeff Sadecki","Ben Scott","Jackie Taylor"],"co-starring":["Kevyn Tan","Simone"]}}}