Saravanan666/pypi-org huggingface dataset:
Package: blackmirror
blackmirrorLook into the black mirror…RequirementsTested with Python 3.7 but should work with Python 3.4+.InstallationInstall withpip:pipinstallblackmirrorUsageTry running the commarndblackmirror bandersnatchand find out what
happens…HistoryPending release1.0.0 (2019-01-24)First release withbandersnatchsub-command.
Package: black-nbconvert
black + nbconvertTired of having tothinkabout formatting in Jupyter notebooks?
Look no further!
This script will correctly format your Jupyter notebooks for you usingblack.Warning: This project will overwrite your notebooks in place.
It shouldn't change anything except the format, but use at your own risk!Installation & UsageTo install:pipinstallblack_nbconvertTo check a notebook:black_nbconvert--check/path/to/a/notebook.ipynbTo fix the formatting in a notebook (in place):black_nbconvert/path/to/a/notebook.ipynbIf you pass a directory instead of a notebook file, notebooks will be found recursively below that directory.
For example:black_nbconvert.will fix the formatting for all notebooks in the current directory and (recursively) below.Configuration:Configuration forblackin apyproject.tomlfile above the target files will be respected.Version control integrationUsepre-commit.
Once youhave it installed, add this to the.pre-commit-config.yamlin your repository:repos:-repo:https://github.com/dfm/black_nbconvertrev:v0.3.0hooks:-id:black_nbconvertThen runpre-commit installand you're ready to go.
Package: blackonnx
blackonnxThis package purpose is to allow the use of NN models generated by AutoML services (Google Cloud Vision,Azure custom Vision),
to anActcastapplication.The format for NN models in Actcast isnnoir, and the toolnnoir-onnxallows conversion fromONNXformat to nnoir.Some ONNX operators used in AutoML-generated models may not be supported by nnoir-onnx, and using this package allows the conversion by modifying an onnx model by replacing unsupported nodes to equivalent supported ones.See #Examples section for use samples.Installationpip3installblackonnxUsageIn a python script:importonnxfromblackonnximportfixmodel=onnx.load("path/to/mymodel.onnx")# open onnx modelfix.fix_quantize(model)# apply fixes in-place...onnx.save(model,"mymodel_fixed.onnx")# save fixed modelor using commd line:user~$blackonnx-omymodel_fixed.onnxpath/to/mymodel.onnx--fixesfix_quantizeOmittingfixesargument applies all fixes (in alphabetical order).
For models created with Google Cloud Vision, the recommanded fixes are...--fixesfix_quantizeAnd for Azure custom vision models:...--fixesfix_postprocessExampleFollow the instructions inexamples/tutorial.mdfor details.Origin of the NameThe nameblackonnxcomes fromblack onyxbecause of the property: artificially colored to black. Our IR is nnoir, which comes from black in french.
We mean this tool adapt onnx models for nnoir.
Package: blackout
InstallationYou can either download or clone this repo, or alternatively you can
install this module using pip:pip install blackoutOverviewBlackout is a small micro-module which makes it easier to completely
forget packages. This is particularly useful when working with packages
made up of multiple sub-modules.And example might be:/site-packages/foo/__init__.py
/site-packages/foo/bar.pyIf bar.py has a function called foo() within it, and we change that
function then it is not enough to reload foo, we must specifically
reload foo as well as foo.bar.When working with packages with any modules this can be time consuming
and problematic - particularly when developing within a host which is
persistent.Blackout helps, because we can unload the package in its entirety in
a single line using:```blackout.drop('foo')```This will remove any hold to foo as well as any submodules of foo. In this
case we can simply callimport fooagain, knowing that everything
within that package is being loaded fresh.CompatabilityThis has been tested under Python 2.7.13 and Python 3.6.6 under both Windows and Ubuntu.
Package: black-pack
Linting and structural checking for python-packages.
Black-pack helps you to organize your python-package.
Black-pack is very basic and not meant to support custom structures.
Black-pack only checks if a python-package has a specific structure which the author thinks is ‘reasonable practice’ and which is now backed into black-pack.
Black-pack is meant to help you keep your various python-packages in ‘reasonable’ shape with ease.
The name ‘black-pack’ is becasue black-pack adopts parts of the mindset found in ‘black’.Installpip install black_packUsage on command-lineCheckblack-pack check /path/to/my/python-packageBlack-pack will print a list of errors to stdout when your package differs from black-pack’s backed in expectations.Initblack-pack init /path/to/my/new/python-packageWill write an entire skeleton for your python-package (All directories and files). You can pass optional arguments to e.g. specify the package’s name.Writeblack-pack write /path/to/my/python-package .gitignoreWrites a single specific file, e.g. the.gitignore.
Package: blackPanther-pydialog
My problem was that the kdialog code is still not ported previously to Qt5
and it depends on various Qt4/KDE4 components.
The kdialog has big dependency sizes so we made an alternate dialogs like
kdialog switches, options (Zenity is too ugly and Gtk based).
We would still like full compatibility with kdialog but a few options are
still not finished and although this release provides many important
functions.Patches, extensions, ideas are welcome!Maintainer Miklos Horvath
Project idea, design, contributor and first code by me (Charles K. B.)
Package: black-pixel-convertor
Black Pixel ConvertorThis library change black pixels to invisible.For example, you can use it to convert satellite images.It will act by following sequence.Load image bypillowConvert it tonumpyarray.patchimagesTraverse patches and check should change.Convert alpha value in pixel. - RGBAUnpatchand change array to image.Compress and save.Installpip install black-pixel-convertorrequirementsnumpy == 1.26.4patchify == 0.2.3pillow == 10.2.0How to usefrom bpc import Config, Convertor

config = Config()

convertor = Convertor(path="file_located_path", out_path="image_will_save_in_this_path")

convertor.multiple_convert()
convertor.single_convert(name="original_name.png", out_name="output_name.png")Parameters- config"""Config.__init__cpu_amount- type: int- default: 2 / 3 of your cpu core amount- notice: Do not set upper than core amount.max_range- type: int- default: 10- describe: max of black pixel amount you can permit in patch.common_param- type: int- default: 100- describe: height, width, step of each patch- notice:- if `common_param` is too small, time to spend will be increase- furthermore `common_param`is too big, image can't convert black pixels.- You have to find compromise point well.compress_level- type: int- default: 4- describe:- compress level for saving image after convert.- you can get more details in pillow document.- https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html- notice:- It is same kind of common_param.- Get compromise point of you image size.- else is same as pillow.black_pixel_level- type: int- default: 0- describe:- standard of black pixel.- pixel where each R, G, B value is smaller than black_pixel_level separate as black.max_image_pixels- type: int- default: 933120000- describe: max pixel amount of your images to convert.- notice: Be careful about Image ddos attack."""- convertor"""Convertor.__init__~ `path` and `out_path` can be samepath- type: str- noticeout_path- type: str- noticeConvertor.single_convertname- type: str- describe: name of the file to convert.- notice:- It can't be None!- You have to write extension(.png, .jpg) together!out_name- type: str- default: `name` + `_Pad_out.png`- describe:- File name of output after convert.- if `out_name` is None, `_Pad_out.png` will appended to name.Convertor.multiple_convert~ Convert all images(png, jpg) in `path` and return to `out_path`.~ Name of output will be `filename` + `_Pad_out.png`"""
Package: blackprint-rc
Blackprint - Remote ControlThis module will provide an ability for Blackprint to control engine remotely and can be used for multi-user collaborationNot for production!Please remove this feature if you're going to ship your product, unless you know what you're doing. This module gives ability to remotely control your software, you will need a sandboxed environment and permission based system in order to ship to production..Any ports data flow for sketch will be disabled if it's connected to remote engine. It's not recommended to combine different data flow betweenremote <~> remotein just one instance, you should create two different instance for them and use feature from other module/library to sync data between the two instance itself.Please tryexample/remote-engine.pyif you want to create a remote engine instance. You will need to load your nodes/module from the.pyand connect to Blackprint EditorMenu -> Remote -> Engine. Then you will need to sync the nodes withMenu -> Remote -> Sync -> PuppetNode.LicenseMIT License
Package: blackscholes
# blackscholes![](https://img.shields.io/pypi/dm/blackscholes) |![](https://img.shields.io/pypi/pyversions/blackscholes) |![](https://img.shields.io/codecov/c/github/carlolepelaars/blackscholes)A Black-Scholes calculator for Python that includes up to the third-order Greeks.Supports the Black-Scholes-Merton model,Black-76 model and option structures.## Installation`pip install blackscholes`## Examples### Input variables```python3S = 55.0  # Asset price of 55K = 50.0  # Strike price of 50T = 1.0  # 1 Year to maturityr = 0.0025  # 0.25% Risk-free ratesigma = 0.15  # 15% Volatilityq = 0.0 # 0% Annual Dividend Yield```### Call```python3from blackscholes import BlackScholesCallcall = BlackScholesCall(S=S, K=K, T=T, r=r, sigma=sigma, q=q)call.price()  ## 6.339408call.delta()  ## 0.766407call.spot_delta() ## 0.7683call.charm()  ## 0.083267```### Put```python3from blackscholes import BlackScholesPutput = BlackScholesPut(S=S, K=K, T=T, r=r, sigma=sigma, q=q)put.price()  ## 1.214564put.delta()  ## -0.23359put.spot_delta() ## -0.23417put.charm()  ## 0.083267```### Black-76The Black-76 model is often used specifically for options and futures and bonds.`blackscholes` also supports this model. To see all available greekscheck out section [4. The Greeks (Black-76)](https://carlolepelaars.github.io/blackscholes/4.the_greeks_black76).**Call Example**```pythonfrom blackscholes import Black76Callcall = Black76Call(F=55, K=50, T=1, r=0.0025, sigma=0.15)call.price()  ## 6.2345call.delta()  ## 0.7594call.vomma()  ## 45.1347```**Put Example**```pythonfrom blackscholes import Black76Putput = Black76Put(F=55, K=50, T=1, r=0.0025, sigma=0.15)put.price()  ## 1.2470put.delta()  ## -0.2381put.vomma()  ## 45.1347```### Structures`blackscholes` offers the following six option structures:- Straddle- Strangle- Butterfly- Iron Condor- Spreads- Iron ButterflyAll structures have a long and short version. To learn morecheck out section [6. Option Structures](https://carlolepelaars.github.io/blackscholes/6.option_structures).**Long Straddle Example**```python3from blackscholes import BlackScholesStraddleLongstraddle = BlackScholesStraddleLong(S=55, K=50, T=1.0,r=0.0025, sigma=0.15)straddle.price()  ## 7.5539straddle.delta()  ## 0.5328```### Binary optionsBinary options are also called exotic, digital or bet options. `blackscholes` supports Greeks for binary calls and puts.## ContributingWe very much welcome new contributions! Check out the [Github Issues](https://github.com/CarloLepelaars/blackscholes/issues)to see what is currently being worked on.Also check out [Contributing](https://carlolepelaars.github.io/blackscholes/contributing) in the documentationto learn more aboutcontributing to [blackscholes](https://github.com/CarloLepelaars/blackscholes).
Package: blackscholes-python
blackscholes_pythonThis library provides an simple, lightweight, and efficient (though not heavily optimized) implementation of the Black-Scholes-Merton model for pricing European options.This crate is compilable to a python package using pyo3 and Maturin.  It features full doc and type annotations. The rust compiled python package is ~1 second slower in pricing an option to 10M iterations than the pure rust crate on a Ryzen 7600x.UsageSimply create an instance of theInputsstruct and call the desired method.View theRust docsandPython docsfor usage and examples.
Package: blacksheep-cli
BlackSheep-CLI🛠️ CLI to start BlackSheep projects.Interactive project scaffoldingSupport for configuring morecookiecutterproject templatespipinstallblacksheep-cliOfficial project templatesapi, to scaffold Web API projectsmvc, to scaffold Web Apps projects with Model, View, Controller
architecture, including Server Side Rendering of HTML views (SSR)Creating a new projectblacksheepcreateListing the project templatesblacksheeptemplateslistWith details:blacksheeptemplatesdetailsHow to contributeclone this repositorycreate a Python virtual environmentinstall in development modepip install -e .add new commands, test
Package: blacksheep-context
Blacksheep ContextIntroductionMiddleware for Blacksheep that allows you to store and access the context data of a request.
Can be used with logging so logs automatically use request headers such as x-request-id or x-correlation-id.RequirementsPython 3.7+Blacksheep 1.0.7+Installation$pipinstallblacksheep-contextUsageA complete example shown below.fromblacksheep.serverimportApplicationfromblacksheep.messagesimportRequest,Responsefromblacksheep.server.responsesimportjsonfromblacksheep_contextimportcontextfromblacksheep_context.middlewareimportContextMiddlewarefromblacksheep_context.pluginsimportBasePlugin,HeaderPluginclassRequestIdPlugin(HeaderPlugin):header_key=b'X-Request-Id'# Every plugin must provide this attributecontext_key='request-id'# Fetches only first value of header, can be False to insert all values of header into contextsingle_value_header=True# Also allow you to add some data from context into responseasyncdefenrich_response(self,response:Response)->None:response.add_header(b'X-Request-Id',context['request_id'].encode('utf-8'))classMyCustomPlugin(BasePlugin):context_key='user-data'# You can customize fetching data from requestasyncdefprocess_request(self,request:Request):try:data=awaitrequest.json()returndata.get('user-id')exceptException:returnNonectx_middleware=ContextMiddleware(plugins=[RequestIdPlugin(),MyCustomPlugin()])app_=Application()app_.middlewares.append(ctx_middleware)@app_.router.post('/ctx')defreturn_context(request):assertcontext.exists()isTruereturnjson(context.copy())ContributingThis project is absolutely open to contributions so if you have a nice idea, create an issue to let the community
discuss it.
Package: blacksheep-messages
BlackSheep-MessagesExtension forBlackSheepthat similar with flask flashes messagepipinstallblacksheep-messagesHow to use (BlackSheep MVC)First, set your web_url on settings.yamlapp_name:Your Websiteweb_url:http://localhost:8000Then, you can import BlackSheep Messages on server.pyfromapp.configurationimportload_configurationfromapp.programimportconfigure_applicationfromapp.servicesimportconfigure_servicesfromblacksheep_messagesimportuse_blacksheep_messageifuvloopisnot...:uvloop.install()app=configure_application(*configure_services(load_configuration()))use_blacksheep_message(app,load_configuration())After registering BlackSheep Messages, services are configured in the application, so they are automatically resolved in any request handler requiring a parameter named bs_message@post("/register")asyncdefregister_action(bs_message):ifTrue:bs_message.add("No Error","success")else:bs_message.add("Error found","error")Than you can get message usingbs_message(category)on jinja2 template{% if bs_message("success", check=True) %}
	{% for msg in bs_message("success") %}
		{{ msg }}
	{% endfor %}
{% endif %}

{% if bs_message("error", check=True) %}
	{% for msg in bs_message("error") %}
		{{ msg }}
	{% endfor %}
{% endif %}Note : set check value to True to avoid message deleted automatically.
Package: blacksheep-prometheus
Blacksheep PrometheusIntroductionPrometheus integration for Blacksheep.RequirementsPython 3.7+Blacksheep 1.0.7+Installation$pipinstallblacksheep-prometheusUsageA complete example that exposes prometheus metrics endpoint under default/metrics/endpoint.fromblacksheep.serverimportApplicationfromblacksheep_prometheusimportuse_prometheus_metricsapp=Application()use_prometheus_metrics(app)OptionsOption nameDescriptionDefault valuerequests_total_metric_namename of metric for total requests'backsheep_requests_total'responses_total_metric_namename of metric for total responses'backsheep_responses_total'request_time_seconds_metric_namename of metric for request timings'backsheep_request_time_seconds'exceptions_metric_namename of metric for exceptions'backsheep_exceptions'requests_in_progress_metric_namename of metric for in progress requests'backsheep_requests_in_progress'filter_pathslist of path's where do not need to collect metrics[]Custom metricsblacksheep-prometheus will export all the prometheus metrics from the process, so custom metrics can be created by using the prometheus_client API.Example:fromprometheus_clientimportCounterfromblacksheep.server.responsesimportredirectREDIRECT_COUNT=Counter("redirect_total","Count of redirects",("from_view",))asyncdefsome_view(request):REDIRECT_COUNT.labels(from_view="some_view").inc()returnredirect("https://example.com")The new metric will now be included in the the/metricsendpoint output:...
redirect_total{from_view="some_view"} 2.0
...ContributingThis project is absolutely open to contributions so if you have a nice idea, create an issue to let the community
discuss it.
Package: blacksheep-sqlalchemy
BlackSheep-SQLAlchemyExtension forBlackSheepthat
simplifies the use of SQLAlchemy in the web framework.pipinstallblacksheep-sqlalchemyImportant:this library only supportsrodidependency injection
container. However, the implementation can be used for reference to configure
other DI containers to work with SQLAlchemy.How to usefromblacksheep.serverimportApplicationfromblacksheepsqlalchemyimportuse_sqlalchemyapp=Application()use_sqlalchemy(app,connection_string="<CONNECTION_STRING>")After registering SQLAlchemy, services are configured in the application, so
they are automatically resolved in any request handler requiring a SQLAlchemy
db connection or db session; for example:@get("/api/countries")asyncdefget_countries(db_connection)->List[CountryData]:"""Fetches the countries using a database connection."""result=[]asyncwithdb_connection:items=awaitdb_connection.execute(text("SELECT * FROM country"))foriteminitems.fetchall():result.append(CountryData(item["id"],item["name"]))returnresultServices can be injected at any level of the resolution graph, soBlackSheepandrodisupport out of the box the scenario of db connections or db sessions
referenced in the business logic but not directly by the front-end layer
(depending on programmers' preference and their notion of best practices when
building web apps).Services can be injected in the following ways:By aliasBy type annotationValuedb_connectionAsyncConnectioninstance of AsyncConnection (scoped to web request)db_sessionAsyncSessioninstance of AsyncSession (scoped to web request)db_engineAsyncEngineinstance of AsyncEngine (singleton)For example, using SQLite:requires driver:pip install aiosqliteconnection string:sqlite+aiosqlite:///example.dbSee thetestsfolder for aworking exampleusing database migrations applied withAlembic, and a documented API that offers methods to fetch, create,
delete countries objects.NoteBlackSheep is designed to be used inasyncway, therefore this library
requires the use of an asynchronous driver.ReferencesSQLAlchemy - support for asyncioDocumentationPlease refer to thedocumentation website.
Package: blacksmith
Blacksmith is a library to build a solid microservices architecture based on REST API.Todays, developers have lots of choices to create microservices,
plenty of framework are available, but when it comes to consume them,
there is a lack of clients.Consuming an API is not just about doing HTTP requests, it has to be designed
for failure, monitoring, and service discovery with an elegant abstraction.
blacksmith aims to provide a solution for developers to write clean client code
and for ops to monitor api calls also on the client side.What is BlacksmithBlacksmith is a declarative tool for consuming REST Api.In a REST API, resources are declared under HTTP routes, and every http verb
has its own definition.In Blacksmith, every resources are bound to schemas that define request and response,
in order to abstract HTTP.This is a common concept for SQL table with ORM, where tables are bound to models,
and then, operations are available on models. This is a usefull abstraction to
write maintainable code and to dive into a project easilly.Handling API resources using an http client, such asrequestsdoes not handle
that abstraction, and does not handle bindings to objects, and can be compared to
a raw connection because it is just a transport.This is the problem blacksmith is trying to solve, having a nice abstraction of
services that use REST in a microservices architecture.NoteBlacksmith is not an HTTP Client or a model validator.Blacksmith usehttpxto perform http query, and usePydanticto validate models.Why not using a SDK to consume APIs ?SDK are about importing an external library in a service. And a service is
consumed by many services for different purpose. As a result, SDK create
coupling between service, and this is something that should be avoid.An SDK for a service will declare all the resources, routes, and attribute
of resources when a service consumer may consume just a few.SDK may hide what is really used by every service.To avoid this, every consumers of API, should declare its own consumers
contracts to get a better view of which service use what.NoteTLDR; SDK are fine in public API, by the way, but not in a microservices
architecture.Building SDKBy the way, blacksmith can be use to build a SDK for public API.Working with or without asyncioBlacksmith is written forasyncio, but works with synchronous API without overhead.
The synchronous API is generated usingunasyncand tested.NoteAll class started byAsyncare asynchronous, and all class started bySyncare
synchronous, for an explicit usageRead MoreYou can read thefull documentation of this library here.ImportantThe documentation has been moved to github pages.The documentation under readthedocs is obsolete.
Package: black-tabby-formatter
black-tabby-formatterA tool (and pre-commit hook) to runblack, but with tabs instead of spaces.Installation$pipinstallblack-tabby-formatterUsage as a pre-commit hook (recommended)Seepre-commitfor instructionsSample.pre-commit-config.yaml:-repo:https://github.com/MarcoGorelli/black-tabby-formatterrev:v0.1.1hooks:-id:black-tabby-formatterCommand-lineblack-tabby-formatter file.pyTo run on a directory, you can do:black-tabby-formatter `find . -name "*.py"`or, using pre-commit,pre-commit try-repo https://github.com/MarcoGorelli/black-tabby-formatter.ConfigurationYou can pass extra command-line flags thatblackwould normally accept, such as--check. Furthermore, any option you specify
inpyproject.tomlwill be respected.
Package: blacktex
Clean up your LaTeX files.blacktex is a command-line tool that helps with article editing in LaTeX. It
removes all comments from a given file and correctssome common
anti-patterns.InstallationInstall blacktexfrom PyPIwithpip install blacktexHow to get a licenseTeX World licenses for personal and academic use can be purchasedhere.
You'll receive a confirmation email with a license key.
Install the key withslim install <your-license-file>on your machine and you're good to go.For commercial use, please contactsupport@mondaytech.com.Using blacktexWithblacktex in.tex > out.texthe input fileBecause   of$$a+b=c$$({\itPythogoras}),% @johnny remember to insert nameand$y=2^ng$with$n=1,...,10$, we have${\Gamma\over2}=8.$is converted toBecause of\[a+b=c\](\textit{Pythogoras}),
and\(y=2^n g\)with\(n=1,\dots,10\), we have\(\frac{\Gamma}{2}=8\).You can useblacktex -i in0.tex in1.tex ...to modify files in-place. Seeblacktex -hfor all options.