Saravanan666/pypi-org huggingface dataset:
Package: python-aqi
A library to convert between AQI value and pollutant concentration
(µg/m³ or ppm) using the following algorithms:United States Environmental Protection Agency (EPA)China Ministry of Environmental Protection (MEP)Install$ pip install python-aqiUsageLibraryConvert a pollutant to its IAQI (Intermediate Air Quality Index):import aqi
myaqi = aqi.to_iaqi(aqi.POLLUTANT_PM25, '12', algo=aqi.ALGO_EPA)Get an AQI out of several pollutant concentrations, default algorithm is EPA:import aqi
myaqi = aqi.to_aqi([
    (aqi.POLLUTANT_PM25, '12'),
    (aqi.POLLUTANT_PM10, '24'),
    (aqi.POLLUTANT_O3_8H, '0.087')
])Convert an IAQI to its pollutant concentration:import aqi
mycc = aqi.to_cc(aqi.POLLUTANT_PM25, '22', algo=aqi.ALGO_EPA)Command lineList supported algorithms and pollutants:$ aqi -l
aqi.algos.epa: pm10 (µg/m³), o3_8h (ppm), co_8h (ppm), no2_1h (ppb), o3_1h (ppm), so2_1h (ppb), pm25 (µg/m³)
aqi.algos.mep: no2_24h (µg/m³), so2_24h (µg/m³), no2_1h (µg/m³), pm10 (µg/m³), o3_1h (µg/m³), o3_8h (µg/m³), so2_1h (µg/m³), co_1h (mg/m³), pm25 (µg/m³), co_24h (mg/m³)Convert PM2.5 to IAQI using EPA algorithm:$ aqi aqi.algos.epa pm25:12
50Convert PM2.5 to IAQI using EPA algorithm (full length):$ aqi -c aqi aqi.algos.epa pm25:12
50Convert pollutants concentrations to AQI using EPA algorithm:$ aqi aqi.algos.epa pm25:40.9 o3_8h:0.077 co_1h:8.4
114Convert pollutants concentrations to AQI using EPA algorithm, display IAQIs:$ aqi -v aqi.algos.epa pm25:40.9 o3_8h:0.077 co_1h:8.4
pm25:102 o3_8h:104 co_1h:90
114Convert PM2.5 IAQI to concentration using EPA algorithm:$ aqi -c cc aqi.algos.epa pm25:39
pm2.5:9.3DevelopmentTo install the development environment:$ pip install -r dev_requirements.txtTestTest the package:$ python -m unittest discoverAutomatic testing in various environments:$ toxReleaseUsebumprto release the package:$ bumpr -b -mProjectSource code on githubDocumentation on readthedocsPackage on pypiResourcesEPA AQI: Technical Assistance Document for the Reporting of Daily Air
Quality – the Air Quality Index (AQI) December 2013) found athttp://www.epa.gov/airnow/aqi-technical-assistance-document-dec2013.pdfNational Ambient Air Quality Standards for Particulate Matter found athttp://www.gpo.gov/fdsys/pkg/FR-2013-01-15/pdf/2012-30946.pdfMEP AQI:GB3095—2012 (2012/02/29) found athttp://www.mep.gov.cn/gkml/hbb/bwj/201203/t20120302_224147.htmHJ633-2012 (2012/02/29) found athttp://www.zzemc.cn/em_aw/Content/HJ633-2012.pdfLicensepython-aqi is published under a BSD 3-clause license, see the LICENSE file
distributed with the project.
Package: python-arango
Python-ArangoPython driver forArangoDB, a scalable multi-model
database natively supporting documents, graphs and search.RequirementsArangoDB version 3.9+Python version 3.8+Installationpipinstallpython-arango--upgradeGetting StartedHere is a simple usage example:fromarangoimportArangoClient# Initialize the client for ArangoDB.client=ArangoClient(hosts="http://localhost:8529")# Connect to "_system" database as root user.sys_db=client.db("_system",username="root",password="passwd")# Create a new database named "test".sys_db.create_database("test")# Connect to "test" database as root user.db=client.db("test",username="root",password="passwd")# Create a new collection named "students".students=db.create_collection("students")# Add a hash index to the collection.students.add_hash_index(fields=["name"],unique=True)# Insert new documents into the collection.students.insert({"name":"jane","age":39})students.insert({"name":"josh","age":18})students.insert({"name":"judy","age":21})# Execute an AQL query and iterate through the result cursor.cursor=db.aql.execute("FOR doc IN students RETURN doc")student_names=[document["name"]fordocumentincursor]Another example withgraphs:fromarangoimportArangoClient# Initialize the client for ArangoDB.client=ArangoClient(hosts="http://localhost:8529")# Connect to "test" database as root user.db=client.db("test",username="root",password="passwd")# Create a new graph named "school".graph=db.create_graph("school")# Create a new EnterpriseGraph [Enterprise Edition]eegraph=db.create_graph(name="school",smart=True)# Create vertex collections for the graph.students=graph.create_vertex_collection("students")lectures=graph.create_vertex_collection("lectures")# Create an edge definition (relation) for the graph.edges=graph.create_edge_definition(edge_collection="register",from_vertex_collections=["students"],to_vertex_collections=["lectures"])# Insert vertex documents into "students" (from) vertex collection.students.insert({"_key":"01","full_name":"Anna Smith"})students.insert({"_key":"02","full_name":"Jake Clark"})students.insert({"_key":"03","full_name":"Lisa Jones"})# Insert vertex documents into "lectures" (to) vertex collection.lectures.insert({"_key":"MAT101","title":"Calculus"})lectures.insert({"_key":"STA101","title":"Statistics"})lectures.insert({"_key":"CSC101","title":"Algorithms"})# Insert edge documents into "register" edge collection.edges.insert({"_from":"students/01","_to":"lectures/MAT101"})edges.insert({"_from":"students/01","_to":"lectures/STA101"})edges.insert({"_from":"students/01","_to":"lectures/CSC101"})edges.insert({"_from":"students/02","_to":"lectures/MAT101"})edges.insert({"_from":"students/02","_to":"lectures/STA101"})edges.insert({"_from":"students/03","_to":"lectures/CSC101"})# Traverse the graph in outbound direction, breadth-first.result=graph.traverse(start_vertex="students/01",direction="outbound",strategy="breadthfirst")Please see thedocumentationfor more details.
Package: python-archive
This package provides a simple, pure-Python interface for handling various
archive file formats.  Currently, archive extraction is the only supported
action.  Supported file formats include:Zip formats and equivalents:.zip,.egg,.jar.Tar and compressed tar formats:.tar,.tar.gz,.tgz,.tar.bz2,.tz2.python-archive is compatible and tested with Python versions 2.5, 2.6,
and 3.2.Example usageUsing theArchiveclass:from archive import Archive

a = Archive('files.tar.gz')
a.extract()Using theextractconvenience function:from archive import extract
# Extract in current directory.
extract('files.tar.gz')
# Extract in directory 'unpack_dir'.
extract('files.tar.gz', 'unpack_dir')By default, anarchive.UnsafeArchiveexception will be raised if any
file(s) in the archive would be unpacked outside of the target directory
(e.g. the archive contains absolute paths or relative paths that navigate up
and out of the target directory).  If you can trust the source of your archive
files, then it’s possible to override this behavior, e.g.:extract('files.tar.gz', method='insecure')More examplesPassing a file-like object is also supported:f = open('files.tar.gz', 'rb')
Archive(f).extract()If a file does not have the correct extension, or is not recognized correctly,
you may try explicitly specifying an extension (with leading period):Archive('files.wrongext', ext='.tar.gz').extract()
# or
extract('files.wrongext', ext='.tar.gz')Similar toolshttp://pypi.python.org/pypi/patool/- portable command line archive file
manager.http://pypi.python.org/pypi/gocept.download/- zc.buildout recipe for
downloading and extracting an archive.
Package: python-args
python-args, inspired byattrs,
removes the boilerplate of processing arguments to functions and methods.Decorating your functions with python-args decorators likearg.validatorscan make your code more composable, more readable, and easier to test. Along
with this, functions decorated with python-args can be used to by other tools
and frameworks to build more expressive interfaces. Thedjango-argsanddjango-action-frameworklibraries are two examples.The corepython-argsdecorators are as follows:@arg.validators(*validation_funcs): Runs validation functions that
can take the same named arguments as the decorated function. When
decorating a function witharg.validators, you not only de-couple
your function from argument validation logic, butpython-argswill allow other interfaces to only run the validators of your function.@arg.defaults(**arg_default_funcs): Sets arguments to default
values. The default functions can similarly take the same named
parameters of the decorated function.@arg.parametrize(**parametrize_funcs): Runs a function multiple times
for a particular input.@arg.contexts(*context_funcs): Enters context managers before
a function. Context managers can take the same named parameters as the
decorated function.View the docs herefor a tutorial and more examples of howpython-argscan be used in
practice.DocumentationView the python-args docs here.InstallationInstall python-args with:pip3 install python-argsContributing GuideFor information on setting up python-args for development and
contributing changes, viewCONTRIBUTING.rst.Primary Authors@wesleykendall (Wes Kendall)
Package: python-arista-ccf-neutronclient
Python bindings for Arista Networks Converged Cloud Fabric Neutron APIFree software: Apache licenseFeaturesManually force CCF to sync network configurationCLI UsageOpenStack CLI:openstack force-ccf-syncForce CCF to sync network configurationNo parameterNeutron CLI (Deprecated):neutron force-ccf-sync 1Force CCF to sync network configurationNumber 1 is required as parameter
Package: python_arptable
Python simple arp table readerFree software: BSD licenseDocumentation:https://python_arptable.readthedocs.org.FeaturesExport ARP Table on linux as a dictionary.Usagearp_table exports two main things:ARPTABLE constant, as it was when the package was importedget_arp_table() function, returning latest arp table.>>> from arp_table import ARPTABLE
>>> print(ARPTABLE)

[{'Device': 'eth0',
  'Flags': '0x2',
  'HW address': '00:12:79:d2:b9:67',
  'HW type': '0x1',
  'IP address': '10.3.0.1',
  'Mask': '*'}]

>>> from arp_table import get_arp_table
>>> print(get_arp_table())

[{'Device': 'eth0',
  'Flags': '0x2',
  'HW address': '00:12:79:d2:b9:67',
  'HW type': '0x1',
  'IP address': '10.3.0.1',
  'Mask': '*'}]DisclaimerThis is a small, simple yet quite useful library.
I’ve seen a lot of posts of people struggling with arp-table reading
in python.With this library, you can justpip install python_arptableand enjoy!History0.0.1 (2015-06-14)First release on PyPI.
Package: python-arq
Python_ARQPython wrapper for the A.R.Q. API.RequirementsPython 3.8 or newer.API URL and KEY, fromhere.Installation$pipinstallpython-arqUsageFor Example, to search for a youtube video, you can do thisfromasyncioimportrunfromaiohttpimportClientSessionfromPython_ARQimportARQasyncdefmain():session=ClientSession()arq=ARQ(api_url,api_key,session)results=awaitarq.youtube("Never gonna give you up")videos=results.result[0]print(videos)awaitsession.close()run(main())DocumentationThere is no documentation as of now, however, you can take help from the docstrings this way:fromPython_ARQimportARQprint(help(ARQ.deezer))Features as of now [List of APIs]LyricsGoogle TranslateYoutubeContainer code execution via pistonRedditTorrentWallpapersUrban DictionaryLuna AI ChatbotImage SearchWikipediaNSFW Image ClassificationNatural Language Processing [Spam Prediction]Proxy ScraperThe Movie Database [TMDB]Quotly [TELEGRAM]JiosaavnPypi Package SearchImage SearchAutocorrect (spell checker)ASQ: Question-Answering AlgorithmARQ Storage, Unlimited file storage (100MB/file)NoteI'll add more features soon.If you're stuck somewhere,Pathetic Programmersare there to help.
Package: python-array
# python-arraySeehttps://python-utilities.readthedocs.io/en/latest/array.html## Install` pip3 install-Upython-array`## Usage`py >>> from python_array import CTypesView >>> text = bytearray(b"Hello, I am a simple ASCIIstring!")>>> ctview = CTypesView(text, itemsize=1) >>> ctview.view[0] = 0x61 >>> print(text) aello, I am a simple ASCII string! >>>ctview.to_uint16()[3]= 0x6554 >>> print(text) aello,Te am a simple ASCII string! `## LicenseMIT## ContactMaintained by [Shawn Presser](https://www.shawwn.com). If you found it useful, please consider [joining my patreon](https://www.patreon.com/shawwn)!My Twitter DMs are always open; you should [send me one](https://twitter.com/theshawwn)! It’s the best way to reach me, and I’m always happy to hear from you.Twitter: [@theshawwn](https://twitter.com/theshawwn)Patreon: [https://www.patreon.com/shawwn](https://www.patreon.com/shawwn)HN: [sillysaurusx](https://news.ycombinator.com/threads?id=sillysaurusx)Website: [shawwn.com](https://www.shawwn.com)
Package: python-artmap
Python ARTMAPA Python Library of Neural network ARTMAP.Free software: MIT licenseHow installpipinstallpython_artmapFeaturesThis library contains two of the main ART neural networkARTMAP FuzzyART FuzzyHow use itimportnumpyasnpfrompython_artmapimportARTMAPFUZZYinput=np.array([[0,0],[0,1],[1,0],[1,1]])output=np.array([[0],[0],[0],[1],])ArtMap=ARTMAPFUZZY(input,output,rhoARTa=0.6,rhoARTb=0.9)ArtMap.train()ArtMap.test([0,0])#{'index': 0, 'ArtB': [0.0, 1.0], 'id': '0010'}ArtMap.test([0,1])#{'index': 0, 'ArtB': [0.0, 1.0], 'id': '0010'}ArtMap.test([1,0])#{'index': 0, 'ArtB': [0.0, 1.0], 'id': '0010'}ArtMap.test([1,1])#{'index': 1, 'ArtB': [1.0, 0.0], 'id': '1000'}CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-06-08)First release on PyPI.
Package: python-artnet
python_artnetEasy-to-use and simple python receiver for Art-Net (that also implements device polling).InstallatonAll you need to do is clone the repository and start using it!$gitclonehttps://github.com/sciencegey/python_artnet.git
$cdpython_artnet
$python3exampleReceiver.pyUsageAll you need to do to start receiving data is import the module, start the listener, then check for received data whenever you want!importpython_artnetasArtnet# By default it will listen on 0.0.0.0 (all interfaces)artNet=Artnet.Artnet()# Fetch the latest packet we received.artNetPacket=artNet.readPacket()# And extract the DMX data from that packet.dmxPacket=artNetPacket.data# You'll also want to check that there *is* data in the packet;# if there isn't then it returns None# See the example for more information# Close the listener nicely :)artNet.close()There are also plenty of arguments you can pass when you start the listner:BINDIP- Which IP address you want tolistenon (usually a broadcast address). This is the only one you really ever need to change.(Defaults to "" AKA 0.0.0.0 AKA all interfaces)PORT- Which UDP port you want to listen on. Shouldn't need to ever
change this.(Defaults to 6454)The following are used for purely management purposes:SYSIP- What the IP address of your system is. Purely cosmetic and only used to identify the system to ArtNet controllers.(Defaults to "10.10.10.1")MAC- What the MAC address of your system is. Same as above.(Defaults to ["AA","BB","CC","DD","EE","FF"])SWVER- What version of Art-Net we're using. In this case, V1.4(Defaults to "14")SHORTNAMEandLONGAME- Used to see what devices are what on a controller.(Shortname is truncated to 17 bytes long, longname is truncated to 63)OEMCODE- What the Art-Net OEM code your device has. Only needs to be set if you have one.(In hex)ESTACODE- What the ESTA Manafacturer Code your device has. Only needs to be set if you have one.(In hex)PORTTYPE- Used to tell the controller what type of physical ports your device has.(Defaults to [0x80,0x00,0x00,0x00])See the Art-Net documentation for more informationREFRESH- What the refresh rate (in Hz) of your device.(Defaults to 44 (the max for DMX))DEBUG- Used to turn on debug output.(Defaults to False)Further information on how it all works can be found in theArt-Net documentation.LicenseThis project is licensed under an MIT License (see theLICENSEfile).
Package: python-asip-client
Asip serial manager for pythonA Python client for the ASIP protocol.
Client should support both Python 2.7 and 3. Anyway, compatibility issues may still exist.
Package allows to communicate with MirtoRobot via serial port as well as TCP connection, using a bridge on a robot,
and source files on remote host.
This package can be installed directly on Raspberry Pi or other computer.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.Prerequisites1) python3
2) pip3
3) serialInstalling1) apt-get install python3
2) apt-get install pip3
3) sudo install pip3 pyserial
4) pip3 install --user python-asip-client --upgrade
4.1) pip3 install --user . --no-cache-dir (When installing local files, development mode)Running the testsExplain how to run the automated tests for this systemBreak down into end to end testsExplain what these tests test and whyGive an exampleAnd coding style testsExplain what these tests test and whyGive an exampleDeploymentThis package is deployed on pip global server. In order to make new release, please follow below:In case of there is an existing buid it can be removed by follwoing command:
1) rm -r build/ dist/ python_asip_client.egg-info
2) python setup.py sdist bdist_wheel
3) twine upload --repository pypi dist/*     Note using this command make sure you have installed twine and config file.Built With?ContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe usePEP 440for versioning.
PEP 440 Version Identification and Dependency SpecificationAuthorsGianluca Barbon-Computer Scientists-GithubAdam Jarzebak-Computer Scientists-GithubFranco Raimondi-Professor of Computer Science-GithubLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgments
Package: python-astar
python-astarYet another A* path search algorithm.This is one more A star implementation done for fun and I hope someone might find this useful.You can import this module and use it to find the shortest path in a map given by a matrix.There also a procedural implementation in theexamples/basic.pyfile that will probably be more easy to read and didactic in case you are learning how A* works.install:pipinstallpython-astarusage:fromastar.searchimportAStar# Make a map (any size!)world=[[0,0,0],[1,1,0],[0,0,0],]# define a start and end goals (x, y) (vertical, horizontal)start=(0,0)goal=(2,0)# searchpath=AStar(world).search(start,goal)print(path)# should be:# [(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (2, 1), (2, 0)]pathreturns a list with (x, y) tuples with each step to reach that goal!random map with animation!fromastar.demoimportmake_a_maze,walk_throughif__name__=="__main__":# Given a map sizesize_x,size_y=16,32# Build a mapworld=make_a_maze(size_x,size_y,density=0.1)# Set start and end goalstart=(0,0)goal=(size_x-1,size_y-1)# Search for pathpath=AStar(world).search(start,goal)# Show the pathwalk_through(world,path)more examples:Please take a look in theexamples/dir for some cool examples how to use it.testing:pytestIf you find it useful give it a star :D
Package: python-astrid
Welcome to Astrid Python API's documentation!*********************************************Contents:class class astrid.AstridAPI(conf)Connect to the Astrid Tasks API and issue requests to a specificuser's account.Python Astrid API lives at https://bitbucket.org/dusty/python-astrid/ and documentation is available at https://python-astrid.readthedocs.org/Parameters:**conf** -- a dictionary of configuration values for connectingto the API.The conf dictionary must contain:{"apikey": "<astrid api key>","apisecret": "<astrid api secret>","email": "you@example.com", # your astrid e-mail"password": "<astrid password>"}The apikey and secret can come from http://astrid.com/api_keysThe user associated with the email and password provided in theconfiguration dictionary will be automatically signed in. The tokenreceived from signin is stored on the class and automatically sentwith future requests.request(method, **params)Send a request to the astrid API. The available methods andtheir parameters are described inhttp://astrid.com/apidoc/ApiController.htmlThis method does the necessary work to create an astridsignature line as required by the API. It then issues therequest in the format Astrid expects.Parameters:* **method** -- the method name to call in the Astrid API* **params** -- keyword arguments mapping parameters tovalues as required by the *method*Returns:json decoded response of your Astrid API requestReturn type:dict
Package: python-async-handler
python-async-handlerThis project aims to provide a way to integrate QueueHandler to Python with lower version than 3.12.ContextOne day, I made an attempt to write a logging SDK for my company and realize that PYTHON LOGGING IS BLOCKING OPERATION. You heard it right! They're blocking operation, which means that if you're running a Python web framework such as django or flask, you may be screwed if you're using a remote log collection server. In version 3.2, Python addedQueueHandlerandQueueListenerto help with this issue, but it cannot be configured using properties file (Java, C#, and other high-level programming languages did this long ago). It is not until version 3.12 that Python finally added configuration for these two classes, but I think it was too late. I believe there are a lot of systems running Python below 3.12 now, so that's why I wrote this integration to make dev life easier.InspirationI took inspiration from ablogpost by Rob Blackbourn. However, his code does not take into account for the fact thatConvertingListwraps built-inlistand not convert string to handlers. That's why I kinda "stole" his code and made it work.InstallationFor copy-paste developerAll you need to do is to copyasync-handlerand config it with your project (of course, copy-paste is pro, so they need to do extra setup).For lazy developerYou can install it viapip install python-async-handlerUsageVanilla usageimportloggingfromasync_handlerimportAsyncHandlerlogger=logging.getLogger(__name__)logger.setLevel(logging.INFO)hdlr=AsyncHandler([logging.FileHandler("app.log"),logging.StreamHandler(),])logger.addHandler(hdlr)logger.info("hello")Via configimportloggingimportlogging.configimporttimeLOGGING={"version":1,"formatters":{"default":{"format":"%(asctime)s%(levelname)-8s%(message)s",},},"handlers":{"qhandler":{"class":"async_handler.AsyncHandler","queue":{"class":"queue.Queue",},"handlers":[{"class":"logging.StreamHandler","formatter":"default",},{"class":"logging.FileHandler","filename":"app.log","formatter":"default",},],},},"loggers":{"__main__":{"handlers":["qhandler"],"level":"INFO",},},}logging.config.dictConfig(LOGGING)You can integrate with other config file format by following the instructionhereImportant notesFor those who only copies and pastes the source code, please add the following environment variablesPYTHONPATH=/path/to/your/module/with/async-handler. That way, Python interpreter can find where you put your source code.
Package: python-async-scrapestack-client
pasc (python-async-scrapestack-client)If you need to use this but are confused by the docs, then submit an issue and I will create formal docs. Right now this functions as a dependency for personal projects.linksPyPidescriptionAsynchronous requests forscrapestack.installInstall with pip:pipinstallpython-async-scrapestack-clientpython-simple-secrets-manageris installed as a dependency.once you get your scrapestack api key, you can add it to pssm with:secretskeep-a-uidscrapestack-key[YOURAPITOKEN]usagerequest urlsfrompascimportRetrieverretriever=Retriever()batch=retriever.fetch(["https://www.duckduckgo.com"]*10)access results# from pasc import Response # * type import, not requiredresponse:Response=batch.item[0]print(response.url)print(response.time)print(response.code)print(response.detail)print(response.data)# If response is rawtext like html, call:html=response.data.decode("utf8")todoadd back in progress barresolve event loop issue for jupyter notebooksadd better docs if requested