Saravanan666/pypi-org huggingface dataset:
Package: pyaimopt
pyaimopt: Python Wrapper for the AIM optimization servicepyaimoptis a package that provides access to the Analog Iterative Machine (AIM) optimization service.
TheAIMoptimizer accepts problems in the quadratic unconstrained mixed optimization (QUMO) format.
TheQUMOformat is a generalization of the quadratic unconstrained binary optimization (QUBO) format,
and allows for the optimization of continuous variables in addition to binary variables.
TheAIMoptimizer is a stochastic optimization algorithm that uses a combination of gradient descent and
annealing to find the global minimum of a given objective function.
In addition toQUMOandQUBOproblems, theAIMoptimizer can also be used to solveMaxCutandIsingproblems.Table of Contentspyaimopt: Python Wrapper for the AIM optimization serviceTable of ContentsPrerequisitesInstallationAuthentication and API KeysUsage ExamplesDocumentationContributingLicenseContact InformationPrerequisitesThe package requires Python 3.10 or higher. It is recommended to use a virtual environment to install the package.InstallationTo install pyaimopt, simply use pip:pipinstallpyaimopt-ihttps://msr-optics.pkgs.visualstudio.com/OpticalCompute/_packaging/OpticalCompute/pypi/simple/You can check successful installation by running the following command:aimstatusIt should return the version of the installed package and the status of the AIM service.TODO: Example with passing the API key.Authentication and API KeysTODO: Add instructions on how to get an API key. This should be done by the AIM team.TODO: Explain how to pass the API key to the package.TODO: Explain alternative authentication methods.Usage ExamplesTo get started, you can use the following commands to submit a simpleQUMOproblem to theAIMoptimizer,
check the status of the submitted problem, and retrieve the results.aimsubmit# This returns: "Submitted job <job_id>"aimlist# The output should contain the <job_id> of the submitted job and its status# Upon completion, the status should be "Completed"aimretrieve<job_id># This returns the results of the optimizationTODO: Add example of submitting a simpleQUMOproblem using the synchronous interface.TODO: Add example of using the asynchronous interface.TODO: Mention theGitHubrepository that contains examples.DocumentationTODO: Add a link to the documentation.ContributingContributions are welcome!TODO: Add instructions on how to contribute examples.TODO: Add instructions on how to report bugs, and propose new features.TODO: Add instructions on how to suggest changes to the solver.LicenseThis package is released under theMS-PLLicense. See theLICENSEfile for more information.The package depends on a number of external packages.
The list of those packages and their corresponding licences can be found in theNOTICE.htmlfile.Contact InformationFor questions or comments related to the functionality or features of theAIMoptimizer,
please raise an issue on theAIM GitHub repository.To get access to the service, please contact theAIM Team.
At this point, the service is available to selected users only.For further questions or comments, please contact theAIM Team.TODO: Add a link to theIssuespage.
Package: pyaiocrawler
AIOCrawlerAsynchronous web crawler built onasyncioInstallationpipinstallpyaiocrawlerUsageGenerating sitemapimportasynciofromaiocrawlerimportSitemapCrawlercrawler=SitemapCrawler('https://www.google.com',depth=3)sitemap=asyncio.run(crawler.get_results())Configuring the crawlerfromaiocrawlerimportSitemapCrawlercrawler=SitemapCrawler(init_url='https://www.google.com',# The base URL to start crawling fromdepth=3,# The maximum depth to crawl tillconcurrency=300,# Maximum concurrent requests to makemax_retries=3,# Maximum times the crawler will retry to get a response from a URLuser_agent='My Crawler',# Use a custom user agent for requests)Extending the crawlerTo create your own crawler, simply subclassAIOCrawlerand implement theparsemethod. For every page crawled, theparsemethod is executed with the url of the page, the links in that page and the html of the page. The return of theparsemethod is appended to an array which is then available when theget_resultsmethod is called. We have implemented an example crawler here that extracts the title from the page.importasynciofromaiocrawlerimportAIOCrawlerfrombs4importBeautifulSoup# We will use beautifulsoup to extract the title from the htmlfromtypingimportSet,TupleclassTitleScraper(AIOCrawler):'''Subclasses AIOCrawler to extract titles for the pages on the given domain'''timeout=10max_redirects=2defparse(self,url:str,links:Set[str],html:bytes)->Tuple[str,str]:'''Returns the url and the title of the url'''soup=BeautifulSoup(html,'html.parser')title=soup.find('title').stringreturnurl,titlecrawler=TitleScraper('https://www.google.com',3)titles=asyncio.run(crawler.get_results())ContributingInstalling dependenciespipenvinstall--devRunning testspytest--cov=aiocrawler
Package: pyaiodl
Python Asynchronous Downloader  - pyaoidlDon't Use it in Production or Live Projects Currently Its UnstableVersioninstallationpypi Method (Recommended)pip3 install pyaiodlGithub repo methodpip3 install git+https://github.com/aryanvikash/pyaiodl.gitAvailable MethodsDownloader class InstanceNon-blocking , params = [fake_useragent:bool,chunk_size:int ,download_path:str] optinalsdl = Downloader()Download [download(self,url)]uuid = await dl.download(url)Errors [iserror(self, uuid)]: Returns -  Error Or None , Even On cancel It returns an error "{uuid} Cancelled"await dl.iserror(uuid)cancel [cancel(self, uuid)]await dl.cancel(uuid)Get Status [status(self, uuid)]response = await dl.status(uuid)
  


  returns a dict

  """
  filename:str
  file_type :str
  total_size :int
  total_size_str : str
  downloaded :int
  downloaded_str :str
  progress:int
  download_speed:str
  complete :bool
  download_path:str

  """is_active returns : bool [is_active( self,uuid )]- on cancel ,error , download complete  return Falseresult = await dl.is_active(uuid)UsageExample :frompyaiodlimportDownloader,errorsimportasynciourl="https://speed.hetzner.de/100MB.bin"asyncdefmain():dl=Downloader()# you can pass your# custom chunk size and Download Path# dl = Downloader(download_path="/your_dir/", chunk_size=10000)uuid=awaitdl.download(url)try:whileawaitdl.is_active(uuid):r=awaitdl.status(uuid)#cancelifr['progress']>0:try:awaitdl.cancel("your_uuid")excepterrors.DownloadNotActiveasna:print(na)print(f"""Filename:{r['filename']}Total :{r['total_size_str']}Downloaded :{r['downloaded_str']}Download Speed :{r['download_speed']}progress:{r['progress']}""")# let him breath  for a second:Pawaitasyncio.sleep(1)# If You are putting uuid  manually Than its better handle This Exceptionexcepterrors.InvalidId:print("not valid uuid")return# when loop Breaks There are 2 Possibility# either Its An error Or Download Complete# Cancelled Is also count as errorifawaitdl.iserror(uuid):print(awaitdl.iserror(uuid))else:# Final filename / pathprint("Download completed : ",r['download_path'])asyncio.get_event_loop().run_until_complete(main())known Bugs -None Please Report :)TODOMultipart DownloadQueue Download / Parallel Downloads LimitBetter Error HandlingThanks ❤️aiodlHasibul KobirW4RR10RRanaji
Package: py-aio-mcrcon
aiomcrconAn async Minecraft RCON client library with support for fragmented responses.Installingpipinstallpy-aio-mcrconExampleimportasyncioimportaiomcrconasyncdefmain():# As context managerasyncwithaiomcrcon.Client("myserver.com","password")asclient:response=awaitclient.command("list")# Without context managerclient=aiomcrcon.Client("myserver.com","password")# port is optional, default is default RCON portawaitclient.connect()response=awaitclient.command("list")awaitclient.close()asyncio.run(main())DocumentationEverything is properly type hinted and documented in the source code. Using the IDE of your choice, you should be able to get all the information you need. Otherwise, just take a look at thesource code.Fragmented responsesThe Minecraft server implementation has a limit on the maximum response size of about 4096 bytes. If the response exceeds this limit, it will be split into multiple fragments. The client will automatically reassemble these fragments into a single response.I do currently not know any other similar library that supports this feature.Information regardingasyncio.gather()The client does technically supportasyncio.gather(), but in practice it will currently cause errors, because of abugin the Minecraft server implementation. As long as this bug is not fixed, using the client withasyncio.gather()will execute the first command and return its response, but everything else will be ignored and the connection will be closed by the server. This causes all of the remaining or following commands to time out (raise TimeoutError) or wait indefinitely (based on timeout parameter). The client must be closed and connected to be used again.This is not a bug in this library, but in the Minecraft server implementation!ContributingIf you want to contribute to this project, feel free to open a pull request or issue.
Package: py-aiowialon
AIO WialonAIO Wialonis an async realisation of Python wrapper for Remote Api,
forked fromhttps://github.com/wialon/python-wialon. (Now with support for Python 3 since v1.0.2)Installationpip install aiohttp, py-aiowialon
pip install py-aiowialonUsageCreate session object withwialon_session = Wialon(host='TEST HOST', token='TEST TOKEN')Setup@wialon_session.event_handlerfor catchavl_evtswhile polingUseWialon.session_did_openmethod to set callback on a session did open,
it can be used to make requests (core_update_data_flags, for example)
aftertoken_loginbeforeavl_evtspoling loop startsStart poling withwialon_session.start_poling()function
orwialon_session.poling()if you're want to run poling as a coroutineimportasynciofromaiowialonimportWialon,WialonEvents,WialonEvent,flagsdefrun():"""Poling example"""wialon_session=Wialon(host='TEST HOST',token='TEST TOKEN')asyncdefsession_did_open():spec={'itemsType':'avl_unit','propName':'sys_name','propValueMask':'*','sortType':'sys_name'}interval={"from":0,"to":100}units=awaitwialon_session.core_search_items(spec=spec,force=1,flags=5,**interval)if'items'inunits:ids=[u['id']foruinunits['items']]spec=[{"type":"col","data":ids,"flags":flags.ITEM_DATAFLAG_BASE+flags.ITEM_UNIT_DATAFLAG_POS,"mode":0}]awaitwialon_session.core_update_data_flags(spec=spec)@wialon_session.event_handlerasyncdefevent_handler(events:WialonEvents):if116106inevents.data:item_event:WialonEvent=events.data[116106]print(item_event.item,item_event.e_type,item_event.desc)@wialon_session.event_handlerasyncdefevent_handler(events:WialonEvents):spec={'itemsType':'avl_unit','propName':'sys_name','propValueMask':'*','sortType':'sys_name'}interval={"from":0,"to":0}units=awaitwialon_session.core_search_items(spec=spec,force=1,flags=5,**interval)print(events.__dict__,units['totalItemsCount'])wialon_session.session_did_open(callback=session_did_open)wialon_session.start_poling()run()API DocumentationWialon Remote Api documentation
Package: py-air-control-exporter
py-air-control-exporterExports air quality metrics to Prometheus.This exporter usespy-air-controlto obtain data.Installationpipinstallpy-air-control-exporterRunningpy-air-control-exporter--host192.168.1.105--protocol<http|coap|plain_coap>This will serve metrics athttp://0.0.0.0:9896/metrics.For more instructions runpy-air-control-exporter --help.You can make Prometheus scrape these with this scrape config:scrape_configs:-job_name:"py_air_control"static_configs:-targets:["<theIPofyourexporterhost>:9896"]labels:location:"bedroom"0.3.1Packaging fixes:Removedsetuptools_scm,pytest-cov, andpytestfrom setup requirements.Future-proofed CLI tests.0.3.0Hours remaining to replace or clean filters are now exported aspy_air_control_filter_hoursgauges.0.2.0Default listening port and address are now displayed in the CLI help.The exporter now counts sampling errors and exports this as a metric rather than crash the process.0.1.5Introduced thepy-air-control-exportercommand line tool.0.1.4Packaging fixes:Building outside a git repository now supported.Build process now verifies that the CHANGELOG.md version matches the git version.0.1.3Source distribution fixes: using SCM version, including test sources, includingCHANGELOG.md.0.1.2Removed thepy-air-control-exporterentry point.Fixedpyairctrl.http_air_clientreferences topyairctrl.http_client.0.1.1Ported toprometheus_clientand added descriptions to each metric.0.1.0Initial release.
Package: pyairfoil
PyAirfoilPyAirfoil contains methods and objects related to generating airfoil geometriesFree software: MIT licenseDocumentation:https://pyairfoil.readthedocs.io.FeaturesNone right now… More to come soon.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-10-14)First release on PyPI.0.1.1 (2018-10-14)Minor changes to add doc to pyairfoil.py
Package: pyairmore
PyAirmoreBuildCoveragemasterdevelopmentPyAirmore is a Airmore client library for Android Airmore server. You can get
information from Airmore server on your Android.Simple ExampleAt first, you need to know your device's IPv4 address, which you can easily
find out by simply opening your Airmore application on Android, click options
(top-right, triple vertical dots) button, press "Get IP".Then, you start coding:from ipaddress import IPv4Address
from pyairmore.request import AirmoreSession  # import session

device_ip = IPv4Address("your ip address")  # need to put your ip
session = AirmoreSession(device_ip)  # also you can put your port as int
# airmore's port default is 2333

# you can check if your airmore server is running
# you better do it before doing anything on your device
session.is_server_running  # True

# and before doing anything, you must request access from your device
# you better turn on your airmore app on your device and watch it
session.request_authorization()  # True if accepted, False if denied
# when you request authorization, airmore app on your device will
# provide a dialogue to accept the authorization, ensure to acceptNow that we created an authorized session, we can  now create aService.
You can use services to access many functionalities of your device. For the
sake of simplicity, we will use a service calledDeviceService.# assuming we have done above

from pyairmore.service.device import DeviceService

device = DeviceService(session)
# all services initializes with a session instance

# you can once more do `Session::is_server_running` and
# `Session::request_authorization` just in case

details = device.fetch_device_details()

# Now we can access many details about out device.

details.power  # 0.74
details.device_name  # "My device"
details.is_root  # True, bcoz real men use rooted device
details.imei  # muhahaha
details.call_history_count  # 666

# so on and so forthDocumentationYou can get latest documentation fromhereand you can also check outdevelopmentbranch's documentationhere,
which is supposed to have next release features.ContributionPlease refer tocontribution guidebefore contributing.You can, then, quickly contribute by cloning the project, opening it up with
your favorite IDE or text editor which supports TODOs and check todos for
needs, or you can also check the issues.
Package: pyairpal
PyAirpalPython Client/SDK for AirpalSynopsisPyAirPal: Python Client/SDK to allow headless queries and response retrieval for Airpal.Code ExampleView the included example.pyMotivationAirpal (http://airbnb.io/airpal/) is a great WebUI/Front end for PrestoDB (https://prestodb.io/)One really nice thing Airpal does is create a method of User Access Control/logging/etc to the PrestoDB interface.Native PrestoDB clients will likely be more efficient, but this stack allows organizations to provide batch/scripting
access to the PrestoDB Via Airpal, while maintaining the nice UAC/etc that Airpal provides.RequirementsWorking Airpal serverPython modules:Requests -http://docs.python-requests.org/en/master/SSEClient -https://pypi.python.org/pypi/sseclientPandas (for example script only) -http://pandas.pydata.org/LicenseMITVersionVersionChanges1.1.3Update yield_csv() to allow for raw requests response.1.1.2Fix issue #1, update logging to best practice, Handling exception while loading next_event() to json #41.1.1Python3 support, Remove PANDAS dependency, fix issue #11.0.2Fix for missing requirements in PIP support1.0.1PIP support1.0.0Initial Release
Package: pyairports
# pyairportspyairports is a package which enables airport lookup by 3-letter IATA code.# UsageThe package can be used in two different ways## importTo use the package in python code, import and create a local instance of the Airports object.`python from pyairports.airports import Airports airports = Airports() airports.airport_iata(iata) # namedtuple(airport, [name, city, country, iata, icao, lat, lon, alt, tz, dst, tzdb]) or AirportNotFoundException airports.other_iata(iata)   # namedtuple(other, [iata, name, country, subdiv, type, lat, lon]) or AirportNotFoundException airports.lookup(iata)       # namedtuple(airport) or namedtuple(other) or AirportNotFoundException `## command lineAn entrypoint is created for command line querying:` [username@hostname ~]$ pyairports aaaairport(name='Anaa',city='Anaa',country='FrenchPolynesia',iata='AAA',icao='NTGA',lat='-17.352606',lon='-145.509956',alt='10',tz='-10',dst='U',tzdb='Pacific/Tahiti')`
Package: pyairtable
pyAirtable (formerly airtable-python-wrapper)Python client for the Airtable API.Installingpip install pyairtableDocumentationRead the full documentation onpyairtable.readthedocs.io.If you're still using airtable-python-wrapper and want to upgrade, read themigration guide.ContributingEveryone who has an idea or suggestion is welcome to contribute! As maintainers, we expect our community of users and contributors to adhere to the guidelines and expectations set forth in theContributor Covenant. Be kind and empathetic, respect differing opinions, and stay focused on what is best for the community.Getting startedIf it's your first time working on this library, clone the repo, set up pre-commit hooks, and make sure you can run tests (and they pass). If that doesn't work out of the box, please check your local development environment before filing an issue.%makesetup
%maketestReporting a bugWe encourage anyone tosubmit an issueto let us know about bugs, as long as you've followed these steps:Confirm you're on the latest version of the library and you can run the test suite locally.Checkopen issuesto see if someone else has already reported it.Provide as much context as possible, i.e. expected vs. actual behavior, steps to reproduce, and runtime environment.If possible, reproduce the problem in a small example that you can share in the issue summary.We ask that youneverreport security vulnerabilities to the GitHub issue tracker. Sensitive issues of this nature must be sent directly to the maintainers via email.Submitting a patchAnyone who uses this library is welcome tosubmit a pull requestfor a bug fix or a new feature. We do ask that all pull requests adhere to the following guidelines:Public functions/methods have docstrings and type annotations.New functionality is accompanied by clear, descriptive unit tests.You can runmake test && make docssuccessfully.You havesigned your commits.If you want to discuss an idea you're working on but haven't yet finished all of the above, pleaseopen a draft pull request. That will be a clear signal that you're not asking to merge your code (yet) and are just looking for discussion or feedback.Thanks in advance for sharing your ideas!
Package: pyairtouch
pyairtouchA fully typed asyncio API for the Polyaire AirTouch AC controllers.The API supports the AirTouch 4 and AirTouch 5.A unified public API is provided that encapsulates the underlying AirTouch version.Exampleimportasyncioimportpyairtouchasyncdefmain()->None:# Automatically discover AirTouch devices on the network.discovered_airtouches=awaitpyairtouch.discover()ifnotdiscovered_airtouches:print("No AirTouch discovered")returnforairtouchindiscovered_airtouches:print(f"Discovered:{airtouch.name}({airtouch.host})")# In this example we use the first discovered AirTouch (typically there is only one per network)airtouch=discovered_airtouches[0]# Connect to the AirTouch and read initial state.success=awaitairtouch.init()asyncdef_on_ac_status_updated(ac_id:int)->None:aircon=airtouch.air_conditioners[ac_id]print(f"AC Status  :{aircon.power_state.name}{aircon.mode.name}"f"temp={aircon.current_temperature:.1f}set_point={aircon.target_temperature:.1f}")forzoneinaircon.zones:print(f"Zone Status:{zone.name:10}{zone.power_state.name:3}"f"temp={zone.current_temperature:.1f}set_point={zone.target_temperature:.1f}"f"damper={zone.current_damper_percentage}")# Subscribe to AC status updates:forairconinairtouch.air_conditioners:aircon.subscribe(_on_ac_status_updated)# Print initial statusawait_on_ac_status_updated(aircon.ac_id)# Keep the demo running for a few minutesawaitasyncio.sleep(300)# Shutdown the connectionawaitairtouch.shutdown()if__name__=="__main__":asyncio.run(main())Say Thank YouIf you would like to make a donation as appreciation of my work, please use one of the links below:
Package: pyaisc
American Institute of Steel Construction Python ImplementationThis package implements various chapters of the AISC Manual related
to the capacity calculations for specific member types.Specific chapters of the AISC Manual deal with the capacity of certain
member types in a formulaic way that lends itself to developing
a package of functions for easy reuse.This package implements functions for the following chapters of the
AISC Manual:Chapter BChapter DChapter EChapter FChapter GChapter HChapter IThe following versions of the AISC Manual that are currently
included are:13th Edition14th Edition15th EditionNote: Bolted connection design covered in Chapter J is implemented
in a separate package.
Package: py_ait
AI-ToolboxCommandait-downloadDownload hf model,dataset and will retry after a failure, default 10 times.ait-download\--repo_info_path=/your_repo_info.json\--retry_count=2\--thread_nums=5Args descriptionnamedescriptionrequireddefault--repo_info_pathrepo info file for download multi repos at once, demo below!TrueNone--retry_countretry count after a failureFalse10--thread_numsthe number of threads concurrently executing the targetFalse5Demo repo_info.json{"model":["OpenAssistant/falcon-40b-megacode2-oasst","stabilityai/stable-diffusion-xl-base-1.0"],"dataset":["OpenAssistant/oasst1","PygmalionAI/PIPPA"]}ait-forkfork hf model, dataset and will retry after a failure, default 10 times.# fork with fork_repo_info.jsonait-fork\--repo_info_path=/your_repo_info.json\--retry_count=2\--hf_username=your_hf_username\--hf_token=your_hf_token\--separator=__\--thread_nums=5# fork without fork_repo_info.jsonait-fork\--retry_count=2\--hf_username=your_hf_username\--hf_token=your_hf_token\--separator=__\--source_repo=source_repo\--target_repo=your_target_repo\--repo_type=dataset|model\--disable-multi-taskArgs descriptionyou must pass--repo_info_pathor--source_repoat least one!namedescriptionrequireddefault--hf_usernameyour hugging face usernameTrueNone--hf_tokenyour hugging face tokenTrueNone--repo_info_pathrepo info file for fork multi repos at once, demo below!FalseNone--retry_countretry count after a failureFalse10--separatora string used to replace/when you did not passtarget_repowithout--repo_info_pathFalse__--source_repothe source repo you want to fork! eg:PygmalionAI/PIPPA,False10--target_repothe target repo you want to fork to! eg:your_hf_username/your_repo_name, if not pass, useyour_hf_username/source_repo.replace_/_with_separatorFalseNone--repo_typemodelordatasetFalsedataset--disable-multi-taskdisable multi task for forking multi repos when you pass, only work with--repo_info_pathFalseFalse--thread_numsthe number of threads concurrently executing the targetFalse5Demo fork_repo_info.json{"model":[{"source":"OpenAssistant/falcon-40b-megacode2-oasst","target":"your_name/your_repo"}],"dataset":[{"source":"PygmalionAI/PIPPA","target":"your_name/your_repo"}]}