Saravanan666/pypi-org huggingface dataset:
Package: picoapi
PicoapiA wrapper around FastAPI to simplify microservice creation. Very opinionated but also simple to fork if you would like to add your own version of service registration and configuration to FastAPI.Usagecreate a .env file or export the following variables:ENV variableRequired (default)DefaultDescriptionExamplesImplementedAPI_HOSTYesThe host of the APImyhost|123.123.123.123|localhost|127.0.0.1API_PORTNo8888The port of the API8080API_BINDYesThe interface descriptor to bind to127.0.0.1|0.0.0.0API_TITLEYesThe FastAPI titleExample API NameAPI_DESCRIPTIONNoA brief DescriptionThe FastAPI descriptionAn Example of a short description about an APIAPI_REGISTER_PATHYesThe url of the Keeper registration endpoint (similar to consul)http://keeper:8100/registerAPI_HEALTH_PATHNoThe path relative to this FastAPI to call for health checks/healthAPI_HEALTH_INTERVALNo300The frequency to perform health checks (in seconds)300API_VERSIONNo0.0.1The version of this FastAPI0.0.1-alphaAPI_TAGSNoThe tags for this microservice, used as part of discovery, delimited with ":" (like $PATH)servicetag1:servicetag2:servicetag3API_CORS_ALLOW_ORIGINSNo*The CORS allowed origins, delimited with "!"NoAPI_CORS_ALLOW_METHODSNo*The CORS allowed methods, delimited with "!"NoAPI_CORS_ALLOW_HEADERSNo*The CORS allowed headers, delimited with "!"NoExample .env file:# API config# ==========API_BIND="0.0.0.0"API_HOST="localhost"API_PORT="8888"API_TITLE="test"API_DESCRIPTION="test description"API_VERSION="0.0.1-alpha"# microservice registration# =========================API_KEEPER_URL="http://localhost:8100/register"API_HEALTH_PATH="/health"API_HEALTH_INTERVAL="300"Authors & ContributorsPatrick Coffey- AuthorAsanga Abeyaratne- Contributor
Package: picoballoon
Picoballoon APIInstall scriptTo install the package run:pip install -e git+https://gitlab.com/picoballoon/python-api.git#egg=picoballoonExamplefrompicoballoonimportPicoballoonpicoballoon=Picoballoon(1)measure=picoballoon.Measure().packet(1)print(measure.getAltitude())
Package: picobox
Picobox is opinionated dependency injection framework designed to be clean,
pragmatic and with Python in mind. No complex graphs, no implicit injections,
no type bindings – just picoboxes, and explicit demands!Why?Because we usually want to decouple our code and Python lack of clean and
pragmatic solutions (even third parties).FeaturesSupport both values and factories.Support scopes (e.g. singleton, threadlocal, contextvars).Push boxes on stack, and use the top one to access values.Thread-safe.Lightweight (~500 LOC including scopes).Zero dependencies.Pure Python.Annotated with types.QuickstartFirst$[sudo]python-mpipinstallpicoboxand thenimportpicoboximportrequests@picobox.pass_("conf")@picobox.pass_("requests",as_="session")defget_resource(uri,session,conf):returnsession.get(conf["base_uri"]+uri)box=picobox.Box()box.put("conf",{"base_uri":"http://example.com"})box.put("requests",factory=requests.Session,scope=picobox.threadlocal)withpicobox.push(box):get_resource("/resource",requests.Session(),{})get_resource("/resource",requests.Session())get_resource("/resource")LinksDocumentation:https://picobox.readthedocs.ioSource:https://github.com/ikalnytskyi/picoboxBugs:https://github.com/ikalnytskyi/picobox/issues
Package: picobrew-server
picobrew-serverThis project reverse-engineers a server for the proprietary PicoBrew protocol for use with thePicoBrew Zymatic, a homebrewing machine. It is intended to provide an alternative to run the machine without a connection to the official servers at picobrew.com. Run your own server and sync your recipes offline.HTTP APIThe PicoBrew Zymatic's built-in Ardunio uses an unencrypted HTTP communication protocol. All request areGETrequests and are not authenticated. The following documentation is based on Firmware 1.1.8.PicoBrew Zymatic API Docs on PostmanPicoBrew Zymatic API Docs on GitHubInstallationInstall Python 3.7 or aboveIn a terminal download, install and run the project://Downloadandinstall
pipinstallpicobrew_server

//Starttheserverinproductionmodeonport80//WindowssetFLASK_APP=picobrew_server
flaskrun--port80--host0.0.0.0

//OSX/LinuxexportFLASK_APP=picobrew_serverflaskrun--port80--host0.0.0.0Connect the PicoBrew machine to your computer and enable DNS spoofing. Re-routewww.picobrew.comto your computer.More DetailsDevelopmentInstall Python 3.7+ &Poetry:pipinstallpoetryInstall all dependecies:poetryinstall

//Starttheserveronhttp://localhost:5000FLASK_APP=picobrew_serverflaskrunLint, Format, and Type Check changes:pylint picobrew_server
black picobrew_server
mypy picobrew_serverDemoYou can try out the admin UI for uploading your XML files in thisonline demo. Please note, this website is for showcasing only and you should deploy your own version.FeaturesImport BeerXML filesSend all your recipes to the PicoBrewSend cleaning recipes to the PicoBrewSession LoggingSession RecoveryAdmin Web UIToDoSession ChartsMachine SupportPicobrew ZymaticToDoPicobrew Z SeriesPicobrew Pico CDisclaimerThis software is provided "as is" and any expressed or implied warranties are disclaimed. This software submits recipes with temperature targets to your PicoBrew machine and will cause it to heat water. Any damage to your PicoBrew machine is at your own risk.If the Zymatic faults and the screen goes blank, DON'T leave it powered on. The circulating pump will shut off and the heater stays on. A tube in the glycol loop may rupture.LicenseMIT @ Tom Herold
Package: picocog
OverviewA Python implementation of the picocog library (original Java version by Chris Ainsley).Basic usageThe API of this library mostly matches its Java counterpart, but using Python naming conventions. The following code sample generates a 'Hello World' program in Python using this library.frompicocogimportPicoWriterwriter=PicoWriter()writer.writeln("""def hello():""")writer.indent_right()writer.writeln("""print('Hello World')""")writer.indent_left()writer.writeln("")writer.writeln("""hello()""")print(writer.to_string())
Package: picocosmo
# picoCosmopythonscript to analyze data from CosMO detectors and Kamiokanne
by Netzwerk Teilchenwelt with picoScope USB device.The software is tailored to identify short pulses from muon detectors (the scintillator panels of theCosMO-experiment by “Netzwerk Teilchenwelt”, <http://www.teilchenwelt.de>, or theKamiokanne-Experiment (a water-Cherenkov detector with photomultiplier readout) with a PicoScope USB oscilloscope with two or four channels.Reading out Geiger Counters or detectors for gamma rays, e. g. the GDK 101 PIN diode counter, is also
possible with the this software.Data is read from the PicoScope device via a Buffer Manager, see projectpicoDAQ(<https://github.com/GuenterQuast/picoDAQ>), which records waveforms and distributes them to consumer processes. The consumers either provide real-time displays of a sub-set of the data or perform data analysis.PiocoCosmois a specialised and extended version of the scriptrunDAQ.pyfrom projectpicoDAQ.The analysis proceeds in three steps. First, the trigger is validated by cross-correlation with a signal template located around the trigger time. Next, coincidences near a validated triggering pulse are searched for in all connected channels. The optional third step performs a search for additional pulses after the triggering event, indicating the decay of a stopped muon in or near the detector.The software provides real-time displays of waveforms, detector signals and rates. Optionally, parameters of identified pulses or of double-pulses are written to files in CSV format. In addition, raw waveforms or pictures in.pngformat of identified double pulses can optionally be stored for off-line analysis or for an instructive analysis “by hand” based on the waveform pictures. From this information, the mean muon lifetime in the muon rest frame (2.2 µs) can be derived.
Package: picodetection
unit testspython -m unittest discover -s tests -t numericGrobidApp/installation1. creating environment
virtualenv grobid_env
2. Installing requirements
pip install -r requirements.txt
3. running test cases
python manage.py test
python manage.py collectstatic
4. deploying with gunicorn
/home/ituser/Envs/grobid_env/bin/gunicorn –workers=3 –threads=100 –worker-class=gthread –bind=0.0.0.0:7040 –pythonpath /home/ituser/jm/GrobidQuant/ GrobidQuant.wsgi:application –access-logfile /home/ituser/jm/GrobidQuant/access.log –error-logfile /home/ituser/jm/GrobidQuant/error.log &
Package: picodoc
PicoDoc 📝This is a document database module made for small-scale applications. Please don't use this module if your data is very important. It is not tested very extensively.This project is onpypiand ongithub.InstallationThe project is up on pypi (PYthon Package Index). So installing can be done usingpip.Unix & Mac os X:pip3installpicodocWindows:pip install picodoc⚠ NoticeThe objects are not really dicts and lists. So they do not support all functions of those objects.List supports:appendremoveiterating over valuesitem assignment using indexdel list[idx]value = list[idx]list[idx] = new_valueDict supports:iterating over keysitem assignment using keydel list[key]value = list[key]list[key] = new_valueUsageUsing the library should be very straight forward. Open a database with thepicodoc.open_dbfunction and use it as if it were a dict.To get started import the moduleimportpicodocThen open the database. (The extension doesn't really matter, but I would suggest using something lile '.db' or '.picodoc')db=picodoc.open_db('database.picodoc')Now just treat the db as af it were a basic (seenotice) dictionary.db['users']={}db['users']['donkere.v']={'name':'Donkere Vader','descprition':'Cool dude 😎',}There are two ways of printing a document.Either print it as a dict:print(db['users']['donkere.v'])>>><Documentdonkere.v>{'name':'Donkere Vader','descprition':'Cool dude 😎',}Or print it as an object:# this will print it as if it were a document# <Document {document key}>print(db['users']['donkere.v'].object_repr())>>><Documentdonkere.v>TipUse therich modulefor beautiful output in the console.TestingTesting is done via theruntestsfile.To run all the tests simply do:python3runtests(If you are on windows usepythonin stead ofpython3)
Package: picods
picods (pico data science) Python Librarypicods is a small data science visualization tool Python library that provides
two functions - picoplot and picotable - to generate plots and tables using
matplotlib and pandas. This library is ideal for quick and simple data
exploration and visualization tasks.InstallationThe recommended way to install picods is via pip, which will download and
install the latest stable release from PyPI:pipinstallpicodsAlternatively, you can clone the repository from GitHub and install it manually:gitclonehttps://github.com/Tomcat-42/picods.gitcdpicods
pythonsetup.pyinstallUsageTo use picods in your Python scripts, simply import the picods module and call
either the picoplot or picotable function:importpicods# Generate a plotpicods.picoplot(title,xs,ys,legends,colors,x_label,y_label,x_lim,y_lim)# Generate a tablepicods.picotable(title,rows,columns_labels,row_labels,round_digits,color)picoplotThe picoplot function generates a plot using the specified data, labels, colors,
and limits for the x and y axis. The function signature is as follows:defpicoplot(title:str,xs:Iterable[Iterable],ys:Iterable[Iterable],legends:List[str],colors:List[str],x_label:str,y_label:str,x_lim:Union[int,None]=None,y_lim:Union[int,None]=None,)->Nonetitle: The title of the plotxs: An iterable of iterables containing the x values for each seriesys: An iterable of iterables containing the y values for each serieslegends: A list of strings containing the legend labels for each seriescolors: A list of strings containing the color codes for each seriesx_label: The label for the x-axisy_label: The label for the y-axisx_lim: An optional integer value to set the limit of the x-axisy_lim: An optional integer value to set the limit of the y-axis The availableplot types are:Line plotpicotableThe picotable function generates a table using the specified data, row and
column labels, and round digits. The function signature is as follows:defpicotable(title:str,rows:List[List[Union[Number,str]]],columns_labels:List[str],row_labels:List[str],round_digits:int=4,color:str="white",)->Nonetitle: The title of the tablerows: A list of lists containing the data for the tablecolumns_labels: A list of strings containing the labels for each columnrow_labels: A list of strings containing the labels for each rowround_digits: An optional integer value to set the number of decimal places to
round the data tocolor: An optional string value to set the background color of the tableExamplesHere are some examples of how to use the picoplot and picotable functions:frompicodsimport(picoplot,picotable)picotable("table",[[0,1],[0,1]],["col1","col2"],["row1","row2"],round_digits=4,"white")picoplot("plot",[[0,1,2],[0,1,2]],[[1,2,4],[0,2,4]],["y = 2^x","y=2*x"],["red","blue"],"x label","y label")
Package: picogeojson
Straightforward and compliant GeoJSON parsing and serialization with
zero dependencies. Easily ingest or output GeoJSON adhering toRFC
7946.UsageGeoJSON files or strings are read usingfromfile()orfromstring()(aliasloads()).pt=picogeojson.fromstring('{"type": "Point", "coordinates": [1.0, 3.0]}')# -> Point(coordinates=[1.0, 3.0])Sometimes a particular type of GeoJSON object is expected (e.g. from an
API GET request), but for safety the type needs to be checked.
Alternatively, theresult_fromstring()function can be used, which
returns an object with safe accessors for specific GeoJSON types.result=picogeojson.result_fromstring(api_response.decode("utf-8"))# Expecting one or more points or multipointsforgeominresult.points:# do something with points# ...forgeominresult.multilinestrings:# do something with multilinestrings# ...This works for Features too, and we can filter by the.propertiesmember.result=picogeojson.result_fromstring(api_response.decode("utf-8"))forfeatureinresult.features("Polygon",{"type":"Lake","state":"Oregon"}):# do something with lakes in Oregon# ...GeoJSON objects may be constructed in Python and composed (merge())
or split (burst()).points=[picogeojson.Point((1,2)),picogeojson.Point((3,4)),picogeojson.Point((5,6))]merged_points=picogeojson.merge(points)# -> MultiPoint(coordinates=[(1, 2), (3, 4), (5, 6)])split_points=picogeojson.burst(merged_points)# -> [Point((1, 2)), Point((3, 4)), Point((5, 6))]GeoJSON objects are serialized withtostring()(aliasdumps()).picogeojson.tostring(picogeojson.Point([1.0,3.0]))# -> {"coordinates": [1.0, 3.0], "type": "Point"}'Keyword arguments can be passed totostring()that - enforce
Polygon/MultiPolygon rotation direction, with counterclockwise for
external rings and clockwise for internal rings
(enforce_poly_winding) - split objects that cross the international
dateline into multipart objects, for easier processing
(antimeridian_cutting) - control whether abboxmember is
computed and added to the JSON output (write_bbox)picogeojsonwill leverageujsonas a backend if it is
installed. Otherwise, it uses Python’s built-injsonmodule.PerformanceThe read benchmark involves reading a list of earthquake features. The
write benchmark involves serializing the continent of Australia.ModuleReadWritejson1.492.00geojson6.74samepicogeojson1.84same*picogeojson+ujson1.630.31**antimeridian cutting and polygon winding check set toFalseThis is a standalone Python package extracted from theKartageojsonsubmodule.
Package: picograd
picogradA lightweight machine learning frameworkDescription•Features•Examples•References•LicenseDescriptionA PyTorch-like lightweight deep learning framework written from scratch in Python.The library has a built-in auto-differentiation engine that dynamically builds a computational graph. The framework is
built with basic features to train neural nets: optimizers, training API, data utilities, metrics
and loss functions.
Additional tools are developed to visualize forward computational graph.FeaturesPyTorch-like auto-differentiation engine (dynamically constructed computational graph)Keras-like simple training APINeural networks APIActivations: ReLU, Sigmoid, tanhOptimizers: SGD, AdamLoss: Mean squared errorAccuracy: Binary accuracyData utilitiesComputational graph visualizerExamplesThedemo notebookshowcases what picograd is all about.Example Usagefrompicograd.engineimportVarfrompicograd.graph_vizimportForwardGraphVizgraph_builder=ForwardGraphViz()x=Var(1.0,label='x')y=(x*2+1).relu();y.label='y'y.backward()graph_builder.create_graph(y)Output:Training MLPimportnumpyasnpimportmatplotlibimportmatplotlib.pyplotaspltimportseabornassnsfromsklearn.datasetsimportmake_moonsfrompicograd.nnimportMLPfrompicograd.engineimportVarfrompicograd.dataimportBatchIteratorfrompicograd.trainerimportTrainerfrompicograd.optimimportSGD,Adamfrompicograd.metricsimportbinary_accuracy,mean_squared_error# Generate moon-shaped, non-linearly separable datax_train,y_train=make_moons(n_samples=200,noise=0.10,random_state=0)model=MLP(in_features=2,layers=[16,16,1],activations=['relu','relu','linear'])# 2 hidden layersprint(model)print(f"Number of parameters:{len(model.parameters())}")optimizer=SGD(model.parameters(),lr=0.05)data_iterator=BatchIterator(x_train,list(map(Var,y_train)))trainer=Trainer(model,optimizer,loss=mean_squared_error,acc_metric=binary_accuracy)history=trainer.fit(data_iterator,num_epochs=70,verbose=True)Decision boundary:ReferencesAndrej Karpathy'smicrogradlibrary and intro explanation
ontraining neural nets, which is the
foundation ofpicograd's autograd engine.Baptiste Pesquet'spyfitlibrary, from which training API was borrowed.LicenseMIT
Package: pico-hid
pico-hidPython package to control pico spoofed as keyboard/mouse via serial pins (uart)InstallationYou can install the package via pip:pipinstallpico-hidUsageimportpico_hid# usage examples hereLicenseThis project is licensed under the terms of the MIT license.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.ContactIf you want to contact me you can reach me atpradish@sandbox.com.np.
Package: picol
picolpicol (pronounced "pickle") is a Python script to fetch the ten most used colors in an image and present the hex colors.ScreensShort descriptionThis script uses thecolorgramlibrary to extract the ten most used colors in an image. It then makes an image like shown in the screens above, or it can output text with links towww.hex-color.com.How to useMinimum to run the script is with path to an image as an argument:./picol.py ~/Pictures/picture.jpgusage: picol.py [-h] [-s] [-d] [-st] image

positional arguments:
  image

optional arguments:
  -h, --help         show this help message and exit
  -s, --save-image   Save image to a given file
  -d, --do-not-show  Do not show the image that is made
  -st, --save-text   Save text to a given fileDependencies:colorgramPillow
Package: picombo
PicomboPicombo is a Python library that offers interactive filtering functionality. When a list object is provided to Picombo, it displays a filtering interface to the user, allowing them to interactively filter through the list. Once a user selects an item, Picombo returns that value.In essence, it's like having Percol as a library that can be freely integrated into any program.Installation$ pip install picomboExampleimport picombo

my_list = [i for i in range(1,101)]
pw = picombo.PickWindow(my_list)
res = pw.search()

print(res)DemoIf you clone the repository, you can demo the filtering of a list of all country names.$ pipenv install
$ pipenv run demo
Package: pi-compute
this is toy tool to compute the N digits of piusageinstallpython3 -m pip install pi-computeorpython3 -m pip install  --index-url https://pypi.org/simple/ pi-computepython usagepython3 -m pi_compute.pi 1000import pi_compute as pi; pi.compute(1000)cpp usagemake pi_threadfor two threadsmake pi_v2for single threadimplementationspi.d:this is the original d language implementations of pipi.cpp: motivated by pi.d and use two threads to build the dynamic shared librarytest/pi_v2.cppis single threadtest/pi_thread.cppis two threadsreference:https://github.com/dlang/dmd/blob/master/samples/pi.dhttps://en.wikipedia.org/wiki/Piv1: $$\arctan(\frac{1}{2}) +\arctan(\frac{1}{3}) =\frac{\pi}{4}$$v2: $$4\arctan(\frac{1}{5}) - \arctan(\frac{1}{239}) =\frac{\pi}{4}$$
Package: pi-conf
P-ConfEasy use Configs for python projects. Allows loading the config files in the application directory (os specific). Once set the config can be used as a singleton across the project or pass around.Locations for the config fileThe following are the default locations that will be searched~/.config/<appname>/config.(toml|json|ini|yaml)<system config directory>/<appname>/config.(toml|json|ini|yaml)Example codeThe example code uses the following as the example configuration file# My config.toml filefoo=1[bar]a=2Using inside of a single scriptfrompi_confimportset_configcfg=set_config("ourappname")print(cfg.foo)# 1print(cfg.bar.a)# 2Using inside of applicationsThe following is the preferred way of using the p-config module. We set it once in our__init__.pythen use it whichever files need it. Sincecfgis a singleton setting it multiple times is unnecessary and will cause it to load from the file again.# __init__.pyfrompi_confimportset_configset_config("ourappname")## Sets the config from the application <appname> directoryfrompi_confimportcfgascfg## Allows the cfg to be importable from our appUsing the config in filesOnce it the config has been set you can use it from any file doing either of the following methods.Option 1fromourappnameimportcfg## Import cfg from what we set in __init__.pyprint(cfg.foo)# 1Option 2frompi_confimportcfg## Import the cfg from p-configprint(cfg.foo)# 1
Package: picoolfx
Simple package used to apply nice effects to images.
Can be installed using:
pip install picoolfx
"""
import picoolfxI saw Chris Holmes' repo (https://github.com/cj-holmes/photos-on-spirals) of cool effects on pictures and I thought I would try and make a python version of it.I just started, so if anybody wants to improve it go ahead, feel free to hit me up and/or open a pull request! I might work on it myself in the near future too.Also, I definitely want to add some more nice effects. An easy start perhaps would be to just make it out of vertical or horizontal lines. Please, check my github, where there should be a link to a webapp to try them!
Package: picopayments-hub
Decentral micropayment hub for counterparty assets.Public hubsTestnet:Picopayments api:https://micro.test.storj.io:15000/api/Mainnet:Picopayments api: TODO setupCounterpartylib api: TODO setupNode setupTo setup your own picopayments hub follow the setup guideSetup guide.API CallsSee theAPI documentationif you wish to create apps that interact with picopayment hubs.
Package: picopins
Raspberry Pi Pico GPIO PinoutA beautiful GPIO pinout and pin function guide for the Raspberry Pi Pico.Usageusage: picopins [--pins] [--all] or {spi,i2c,uart,pwm}
       --pins - show physical pin numbers
       --all or {spi,i2c,uart,pwm} - pick list of interfaces to show
       --hide-gpio - hide GPIO pins
       --find "<text>" - highlight pins matching <text>

eg:    picopins i2c  - show GPIO and I2C labels
       picopins      - basic GPIO pinoutInstallingJust runpython3 -m pip install picopinsAcknowledgementsThis project was inspired by GPIO Zero's command-line pinout -https://github.com/gpiozero/gpiozeroIt somehow wasn't inspired by Raspberry Pi Spy's "picopins" which came first and solves this same problem in bash -https://www.raspberrypi-spy.co.uk/2022/12/pi-pico-pinout-display-on-the-command-line/Like RPi Spy's picopins it started as a GitHub gist, you can find the history here -https://gist.github.com/Gadgetoid/192af85a3eb05d4a6ac1db076c4ef118/revisionsChangelog1.2.0Highlight LED if--find GP25or--find LEDRefactor options and add a--versioncommand1.1.0Highlight GPIO label if--findmatches a hidden labelAdd regex support to--findRewrite render flow to make it less hackyLight mode is back!--lightMove error text above usage message1.0.1Tidy up readme1.0.0Initial ReleasePorted fromhttps://gist.github.com/Gadgetoid/192af85a3eb05d4a6ac1db076c4ef118