Saravanan666/pypi-org huggingface dataset:
Package: arinrest-client
ARINREST LIBThe purpose of this package is to manage and query resources hosted by ARIN.
ARIN has 3 different services that you can query and manage records on.whois, only the RDAP interface is supported by this libraryIRR, This still needs to be implementedRPKI, The reason I start this library os to manage ROA objects hosted in
ARINs repository.UsageThe entry point into this library is theArinRestclass. The class only takes
an API Key from ARIN to instantiate.fromarinrestimportArinRestfromarinrest.rpkiimportROAarinclient=ArinRest('your-api-key-here')# arinclient.rdap() creates a rdap session with ARINwhois_client=arinclient.rdap()# You can manage resources in the IRR and RPKI endpoints so currently the classes# require an API key to instantiate them.# create an rpki session with signing capabilities, private key requiredrpki_client=arin.rpki("/path/to/private/key")# add a ROA to the queue to be submitted as well as signing it.rpki_client.add_roa(roa:ROA)# submit the ROA to ARINrpki_clinet.submit_roas()TODOBreak out the rpki client and the ROA object into 2 separate classes.- ROA object will have getters and setters for the attributes with validationof values.rpki client will have the connection and url's needed to submit and fetch
information about ROAs.ARIN may have created certificate with the wrong public key in it that is
used to identify the resources we have the right to manage.Certificate creation ticket ARIN-20221019-X541735The public key in this ticket is the same as the stored key in pwdbI have used the key pair to sign a message and verify the signature
locallyThe public key in the ticket does not match the public key in the
x.509 certificate.When submitting an ROA request it complains about a bad Public Key.<?xml version="1.0" encoding="UTF-8" standalone="yes"?><errorxmlns="http://www.arin.net/regrws/core/v1"><additionalInfo/><code>E_ENTITY_VALIDATION</code><components><component><message>Thepublickeyyouenteredisinvalid.</message><name>signedRoaRequest</name></component></components><message>Payloadentityfailedtovalidate;seecomponentmessagesfordetails.</message></error>ResourcesManually signed ROA: Implemented in PythonARIN Manually signed ROARSA Signing with cryptography python libRSA
Package: ario
Ario - Python Lightweight Micro Frameworkflask-based framework which is working with jinja2 and wrekzeugThis framework has been developed by Wish Team for web development purpose. This project is maintained by this team and hope make web development easier and faster.MotivationThe main concept of this framework is like flask. but it's only work like a dispatcher and you could easily use any library you want. you are not dependant to any 3rd specific libraries and also you do not have any regex in matching for your url which may cause ReDos to your system. you could specify the result of your response with just a decorator like@htmlor@jinjawhich is help for focusing on your development only.InstalationInstall and update using pip:pip install arioUsageFirst of all you should import classes that you want.RouterController, Endpoint, Applicationshould be imported andjson, html, setup_jinja, jinja, redirect, forbidden, okare arbitrary.fromwerkzeug.servingimportrun_simplefromwerkzeug.middleware.shared_dataimportSharedDataMiddlewarefromarioimportRouterController,Endpoint,Application,json,jinja2fromario.statusimportforbidden,okFor seting up your template:setup_jinja("./templates")For instance if we want to define two endpoint that one of them is json and the latter is jinja, we should define them as below:control=RouterController(debug=True)@control.route(method=["GET","POST","HEAD"],route="/")classExampleEndpoint(Endpoint):@jsondefget(request,response):data={"name":"john","family_name":"doe","age":21,"phone_number":"12345678"}returndata@control.route(method=["GET","POST"],route="/user/$id")classExampleEndpoint(Endpoint):@jinja("base.html")defget(request,response,id):params={"my_string":id,"my_list":[0,1,2]}returnparamsremeber for using jinja decorator, you should insert abase.htmlfile intemplatefolder
After all, we make a socket to our port usewerkzeug:if__name__=='__main__':app=Application(control)app=SharedDataMiddleware(app,{'/static':os.path.join(os.path.dirname(__file__),'templates/static')})print('Demo server started http://localhost:5000')run_simple('127.0.0.1',5000,app,use_debugger=True,use_reloader=True)You could run your code easily by just typingpython yourfile.py
Package: ario3s-aiva
aiva cli toolA tool to create SOCKS5 proxy on localhostConfigurationDefault config file path is /home/USERNAME/.aiva.tomlConfig file Format[default]
username = "<DEFAULT USERNAME>"
local_port = <DEFAULT BIND PORT>
server_label = "<DEFAULT LABEL>"

[server_<label>]
ip = <server-ip>
port = <server-port>

[server_<label>]
...UsageConnects to server using sshaiva connectDisconnects from serveraiva disconnectGet connection statusaiva status [-d]List available serversaiva list_serversChange default serveraiva change-server
Package: arip
This software is aimed to quantify bacterial resistance to antibiotics
by analysing pictures of phenotypic plates. Currently it supports 96
well plates where different bacteria are cultured with different
concentrations of antibiotics, but the application adapt to different
plates size in rows and columns. Computer vision algorithms have been
implemented in order to detect different levels of bacterial growth. As
a result, the software generates a report providing quantitative
information for each well of the plate. Pictures should be taken so that
the plate is square with the picture frame, the algorithm should be able
to cope with a slight rotation of the plate.Key methods:Hough Circles method to detect circles in an imagedocWells segmentation using threshold feature of opencvdoccombining binary and otsu thresholdQuality detection using a grid model by rows and columns and
clustering them, robust to scale and sensible rotation.Execution:There are two ways for executing the process: binary or library *
Binary using arip.py file allocated in the project:pythonarip.py--imageimages/\<platename\>.pngLibrary installing as described below:importariparip.process({'image':'images/sinteticplate.jpg'})input:images/<platename>.png with a plate and ninety six wellsoutput:Image with extracted wells: images/<platename>/outputXXX.pngCropped image of extracted well:
images/<platename>/<row><column><resistance>_<density>.pngReport in json format: images/<platename>/report.jsonLog: images/<platename>/log.txtdescription of schema: * row: well row index * column: well colmun
index * total: well area in pixels * resistance: absolute resistance
found in pixels * density: density of the resistance foundreport example:"7-J":{
   "density":0.17,
   "column":"A",
   "resistance":122,
   "total":706,
   "row":"4"
}output images example:4-A_122-0.23, is the well 4-A, with 122 pixels found as resistance with density of 17%output log example:customizing scale well: found False, num wells 93, min radius value 18, max radius value 23
customizing scale well: found False, num wells 96, min radius value 18, max radius value 24
customizing grid matching: found False, num wells recognized 96
Succesfully processed plate, found 96 wellsInstalling dependenciespipsudo apt-get install python-pip ### opencv sudo apt-get install
build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config
libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install
python-opencv ### scilab sudo apt-get install python-scipyInstalling aripThere are two ways of installing pynteractive: * Cloning the project$gitclonehttps://github.com/mazeitor/antibiotic-resistance-process.git$cdantibiotic-resistance-process$pythonsetup.pyinstall### (as root)ViaPython package index(pip), TODO$pipinstallaripTODONormalizing radius by neighborhood instead of general averageWorking with static grids or masks
Package: aris-apps
Online Model AppThis is a high-level physics application (HLA) built uponphantasyframework.
The EPICS controls environment is provided by ARIS virtual accelerator (VA)
(pre-separator), the UI skeleton is provided byphantasy-ui, and
the device controls is provided byphantasy.This repository keeps the generated project files as the start point of the
development of a HLA to visualize the beam ellipse drawing with the simulation
results from FLAME model. This HLA also works with the real machine.Initialize App SkeletonBe sure to update the required packages, dosudo apt update && sudo apt upgradein the
Terminal.# the working directory is /tmp$makeBasePyQtApp--apparis-va-ellipse--templateAppWindow
What's the name of this package? (default: mypkg) aris_appsWhat'sthenameoftheapp,alsothecommandtorunit?(default:myApp)online_model
Generatingaris-va-ellipsewithtemplateAppWindow...
Successfullymadeanbaseappat'/tmp/aris-va-ellipse'.
Whattodonext:
>Installpackage:cd/tmp/aris-va-ellipse;makedeploy
>Runappbyexecutingonline_model
>Edit.uifilewith'frib_designer',andthe.pyfiles.
>Updatethepackage:cd/tmp/aris-va-ellipse;makeredeploy
>HappyCoding!Start ARIS VASet environmental variablePHANTASY_CONFIG_DIRin your~/.bashrcfile persistently to point to the location where keeps the VA configuration files, e.g.:exportPHANTASY_CONFIG_DIR=$HOME/phantasy-machinesStart VA from Terminal:phytoolflame-vastart--machARIS_VA--submF1Communicate with ARIS VAUsephantasyto control the VA in an interactively way in Python terminal.fromphantasyimportMachinePortal# Instantiate the portal of the machinemp=MachinePortal("ARIS_VA","F1")# Find the device by type, see the doc of mp.get_elements()# first quad could be found by:quad0=mp.get_elements(type='QUAD')[0]# Explore the attributes of quad0 through dot syntax# e.g. the current gradient value could be got by .B2quad0.B2# Set the B2 field by assigning with a new value, e.g.quad0.B2=10Development WorkflowEdit .ui file infrib_designer, which is a command tool from packagephantasy_ui;Convert .ui files to .py files by executingmakein the ui folder;In the project root folder, typemake redeployto update the package and execute the command
(i.e.online_model) to run the app, or just typemake run;Uninstall the package by:pip uninstall <pkg_name>(for this case, pkg_name isaris_apps),
or typemake uninstall.NoteIf the commandonline_modelcannot be found, you'll have to updatePATHenv, i.e.echo'export PATH=$HOME/.local/bin:$PATH'>>~/.bashrc
Package: arista
An easy to use multimedia transcoder for the GNOME Desktop. Arista focuses on
being easy to
use by making the complex task of encoding for various devices simple. Pick your
input, pick your target device, choose a file to save to and go.Arista has been in development since early 2008 as a side project and was just
recently polished to make it release-worthy. The 0.8 release is the first release available to the public. Please seehttp://github.com/danielgtaylor/aristafor information on helping out.FeaturesPresets for Android, iPod, computer, DVD player, PSP, and moreLive preview to see encoded qualityAutomatically discover available DVD drives and mediaRip straight from DVD media easilyAutomatically discover and record from Video4Linux devicesSupport for H.264, WebM, FLV, Ogg, DivX and moreBatch processing of entire directories easilySimple terminal client for scriptingNautilus extension for right-click file conversionRequirementsArista is written in Python and requires the bindings for GTK+ 2.16 or newer,
GStreamer, GConf, GObject, Cairo, and udev. If you are an Ubuntu user this means
you need to be using at least Ubuntu 9.04 (Jaunty). The GStreamer plugins
required depend on the presets available, but at this time you should have
gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, and gst-ffmpeg. If you are
on Ubuntu don’t forget to install the multiverse packages.Note: WebM support requires at least GStreamer’s gst-plugins-bad-0.10.19.
Package: ariston
python-ariston-apiA Python module for controlling Ariston devices with cloud polling.
The following devices are currently supported:Ariston Alteas One 24Ariston Velis EvoAriston Velis LuxAriston Lydos HybridAriston Genus OneAriston Nuos SplitAriston Thision SChaffoteaux INOA S 24InstallationUse pip3 to install the latest version of this module.pip3 install aristonThe easy way (recommended for testing the module)First, open Python 3 and import ariston module.python3importaristonSyncronousDiscover devices if you dont know your gateway id. You can skip this step.raw_devices=ariston.discover("username","password")For example the gateway id for your first device.raw_devices[0]['gw']Get your devicedevice=ariston.hello("username","password","gateway",is_metric,"location")Go use your device sectionAsyncronousraw_devices=awaitariston.async_discover("username","password")device=awaitariston.async_hello("username","password","gateway",is_metric,"location")Go use your device sectionThe ariston class way (recommended for integrate the module)First, open Python 3 and import Ariston class from this module.python3fromaristonimportAristonCreate a new Ariston instanceariston=Ariston()Now let's try some functionsConnectThe cloud requests are asynchronous, so if you call them from a synchronous function or not even from function, you should use asyncio.importasyncioSyncasyncio.run(ariston.async_connect("username","password"))Asyncawaitariston.async_connect("username","password")username: Your ariston cloud username.password: Your ariston cloud password.DiscoveryUse this function to discover devices. You can skip this step if you already know the gateway id.Syncdevices=asyncio.run(ariston.async_discover())Asyncdevices=awaitariston.async_discover()Say helloUse this function to create the device object.Syncdevice=asyncio.run(ariston.async_hello("gateway",is_metric,"location"))Asyncdevice=awaitariston.async_hello("gateway",is_metric,"location")gateway: You can find the value in the returned discover dictionary name 'gw'is_metric: Optional. True or False. True means metric, False means imperial. Only works with Galevo (Alteas One, Genus One, etc) system. Default is True.language_tag: Optional. Checkhttps://en.wikipedia.org/wiki/IETF_language_tagOnly works with Galevo (Alteas One, Genus One, etc) system. Default is "en-US".Use your deviceGet device featuresSyncdevice.get_features()Asyncawaitdevice.async_get_features()Get device dataSyncdevice.update_state()Asyncawaitdevice.async_update_state()Get device energySyncdevice.update_energy()Asyncawaitdevice.async_update_energy()
Package: ariston-boiler-control
ariston_boiler_controlModule for the control of a Wifi-enabled Ariston boiler through the Web API.At the moment, this module only works with the default boiler specificed in the web interface.Features:read the current temperatureread and set the target temperatureread and set the operation mode (Green, Comfort, Fast, Auto, HCHP)read the HP state (on/off)read and set the boost mode (on/off)Example:>>>fromariston_boiler_controlimportAristonBoilerControl,OperationMode>>>abc=AristonBoilerControl('email@email.com','password')>>># executes the login with the username and password provided>>># it is actually optional: it is done automatically when needed>>>abc.login()>>># get the current temperature>>>temperature=abc.get_current_temperature()>>># set the operation mode to comfort>>>abc.set_operation_mode(OperationMode.COMFORT)>>># set the target temperature to 60 degrees>>>abc.set_target_temperature(60)Copyright (c) 2023 Francesco Santinifrancesco.santini@gmail.com
Package: arith-lib
arith_lib: A set of functions for miscellaneous arithmetic calculationList of implemented functionsgcd(*arg):Greatest common divisor of a set of integerslcm(*arg):Least common multiple of a set of integersbezout(a, b):Provides a particular solution to diophantine equation a.u+b.v=gcd(a, b)modulo_inv(a, b):Inverse of a modulo bchinese_remainder(r, m):Solves the modular system:x = r1 mod m1x = r2 mod m2...x = r_n mod m_ngene_pseudo_prime():A generator which provides 2, 3, 5 and then all integers non multiple of 2, 3, 5is_prime(n):Check for n primality. Miller-Rabin primality test is usednext_prime(n):Provides the first prime greater or equal to nprevious_prime(n)Provides the first prime smaller or equal to nprime_factorization(n, frmt):Prime factorization of ndivisors(n):Provides all divisors of nphi(n):Euler totient functionmoebius(n):Moebius functionto_base(n, *kwarg):Conversion from base 10 to base Bfrobenius(*A, n=None):Solves equation a1.x1 + a2.x2 + .. + ap.xp = n or finds
the greatest n for which this equation has no solution.
a1, a2, ... are positive integers.
x1, x2, ... are the unknowns, positive integersisqrt(n)Provides the integer part of the square root of n
where n is an integer of any sizeis_miller_rabin_witness(a, n)Return True if 'a' is a Miller-Rabin witness for nget_random_prime(nbits, lessthan)Provides a random prime with exactly or at most 'nbits' bitsis_strong_pseudoprime(a, n)Return True is n is a strong pseudo prime to base 'a'Installationpip install arith_libUtilizationfrom arith_lib import *>>> gcd(15, 20)
5
Package: arithmaticpy
ArithmaticpyWelcome to arithmaticpy - A Simple Arithmatic Python Library. The package is currently maintained and being updated. Official Release @pypi.orgInstallationUse the package managerpipto install arithmaticpy.pipinstallarithmaticpyUsageimportarithmaticpyfromarithmaticpyimportvladdefsample_function():some_value=vlad.add(2,4)returnsome_value# returns 6ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.DocumentationThe official documentation for arithmaticpy can be found @https://pypi.org/project/arithmaticpy/LicenseMIT
Package: arithmetic_calc
Arithmetic CalculatorA simple program which performs arithmetic operation.Arithmetic_calculator performs operation such as:Addition/SubstractionDivistion/MultiplicationTake(n) root of a numberInstallationIt can be installed with::pip install arithmetic_calcUsageTo use arithmetic_calculator, we first create an objectfrom arithmetic_calculator import Arithmetic()
calc = Arithmetic()Addition of two numbersresult = calc.add(2, 3)
result = 5Addition of a number to the value in memoryresult = calc.add(1)        #same as result = calc(1, 5)
result = 6                  # 5 is value of number from memorySubstractionresult = calc.substract(4, 2)
result = 2Divisioresult = calc.divide(4, 2)
result = 2.0Multiplicationresult = calc.multiply(2, 3)
result = 6Root(n) of numresult = calc.root(9,2)
result = 3AuthorIbsa Abraham
Package: arithmetic-dice-roller
arithmetic-dice-rollerA handy dice roller with extended notation and arithmetic expressions' management.The package aims to provide an easy-to-use implementation of a dice roller application with multiple operators' options and automatic results calculation.DependenciesSymPy(LICENSE)SyntaxChosen syntax is inspired to the one from theCritDice mobile app(you can check theadvanced notationfor similarities with this package).The output object once the expression has been evaluated ("rolled") contains:the original expressionthe expression without repeated sub-expressionsthe expressions with evaluated dice rollsthe list of dice rolls (for beautifying purposes)the final evaluated resultthe optional label for the whole expressionIf the package is being used as a part of another project, you can just import theRollerclass and use therollfunction.A simple console script (arithmetic-dice-roller) is also provided, which requires an input with an expression and an optional label for it, separated by a space.Every expression must not present any spaces, and can contain any number of dice rolls (big numbers and complex calculations may affect execution time), given the following format is respected:[dice amount]d[die type][operator]wheredice numbercan be omitted for default 1,dis case-insensitive anddice typecan be any integer,f(for fudge die, case-insensitive) or%(for percentage, equal to typing ind100).Operatorcan be of three different types, with only the third omitting some results (because or rerolls):keeping or dropping a number of dice ([K|k|X|x][amount], any of the four combinations of keep/drop highest/lowest followed by how many needs to be kept or dropped)counting successes and failures ([<=|>=][success threshold]f[<=|>=][failure threshold], any of the two comparison operators and a threshold for success/failure, withfbeing case-insensitive and the failure part being optional)rerolling until the condition is satisfied (critics or comparison) or once ([!|R|r][|<=|>=][threshold], any of the three operators for rerolling and any of the three comparison operators, putting none means equality)Repeating sub-expressions is also supported: these are expanded before any other parsing operations, and can be used to repeat rolls (and not multiply the result) writing the same sub-expression multiple times.The format is[repetitions]x([sub-expression]), and the sub-expression (and all the expression in general) must have matching brackets.The final arithmetic expression without dice notation is evaluated usingSymPy, so any kind of arithmetic operation is allowed inside expressions, to provide a nice tool for complex rolls.Feel free to suggest and submit modifications to this guide, as any kind of help is always very much appreciated and welcomed.
Package: arithmetic-expressions
arithmetic-expressionsarithmetic-expressionis a Python module for symbolic arithmetic expressions. It supports serialization,
deserialization, evaluation with custom variables, and an easy construction interface by combining existing
expressions.It is built around Python'sastmodule and therefore uses Python syntax when string serializing and deserializing.
However, it only supports single-line expressions and strongly restricts the grammar when evaluating expressions.
This constrained subset of the grammar encompasses variables, numeric constants, unary and binary arithmetic
operators, comparison operators, the ternary if-else operator and selected function calls.Expressions can be deserialized from strings, but can also be built from scratch with an intuitive API that aligns with
Python's own syntax.Examplefromarithmetic_expressionsimportExpression# Parse an expressionExpression.parse("x * 2 + 1")# Or create it from scratchexpression=Expression("x")*2+1# String casting will serialize the expressionprint(expression)# prints "x * 2 + 1"# Pass variables to evaluate itprint(expression.evaluate(x=3))# prints "7"