Saravanan666/pypi-org huggingface dataset:
Package: apns2-plus
PyAPNs2Python library for interacting with the Apple Push Notification service (APNs) via HTTP/2 protocolInstallationEither download the source from GitHub or use pip:$ pip install apns2-plusSample usagefromapns2.clientimportAPNsClientfromapns2.payloadimportPayloadtoken_hex='b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87'payload=Payload(alert="Hello World!",sound="default",badge=1)topic='com.example.App'client=APNsClient('key.pem',use_sandbox=False,use_alternative_port=False)client.send_notification(token_hex,payload,topic)# To send multiple notifications in a batchNotification=collections.namedtuple('Notification',['token','payload'])notifications=[Notification(payload=payload,token=token_hex)]client.send_notification_batch(notifications=notifications,topic=topic)# To use token based authenticationfromapns2.credentialsimportTokenCredentialsauth_key_path='path/to/auth_key'auth_key_id='app_auth_key_id'team_id='app_team_id'token_credentials=TokenCredentials(auth_key_path=auth_key_path,auth_key_id=auth_key_id,team_id=team_id)client=APNsClient(credentials=token_credentials,use_sandbox=False)client.send_notification_batch(notifications=notifications,topic=topic)Further InfoiOS Reference Library: Local and Push Notification Programming GuideContributingTo develop PyAPNs2, check out the code and install dependencies. It's recommended to use a virtualenv to isolate dependencies:# Clone the source code.gitclonehttps://github.com/Pr0Ger/PyAPNs2.gitcdPyAPNs2# Create a virtualenv and install dependencies.virtualenvvenv
.venv/bin/activate
pipinstall-e.[tests]To run the tests:pytestYou can usetoxfor running tests with all supported Python versions:pyenvinstall3.5.6;pyenvinstall3.6.7;pyenvinstall3.7.1;pyenvinstall3.8.0
pyenvlocal3.8.03.7.13.6.73.5.6
pipinstalltox
toxTo run the linter:pipinstallpylint
pylint--reports=napns2testLicensePyAPNs2 is distributed under the terms of the MIT license.SeeLICENSEfile for the complete license details.
Package: apns3
Python 2 and 3 forward-compatible for PyAPNs :https://github.com/djacobs/PyAPNs.gitInstallation:You can install PyAPNs from this repository if you want the latest version:$ git clonehttps://github.com/flamewow/PyAPNs.git$ cd PyAPNs$ python setup.py buildActivate virtualenv (or use sudo):$ python setup.py installOr you can install the latest release from PYPI:$ pip install apns3
Package: apns-clerk
Python client forApple Push Notification service (APNs).This project is forked from apns-client, as there was a tiny but severe problem with SSL handshake rendering the package to be unusable.
For the time being please check for apns-client’sdocumentation.Requirementssix- Python 2 and 3 compatibility library.pyOpenSSL- OpenSSL wrapper. Required by standard networking back-end.Standard library has support forSSL transport. However, it is impossible to use
it with certificates provided as a string. We store certificates in database,
because we handle different apps on many Celery worker machines. A dirty
solution would be to create temporary files, but it is insecure and slow. So,
we have decided to use a better OpenSSL wrapper andpyOpenSSLwas the
easiest to handle.pyOpenSSLis loaded on demand by standard networking
back-end. If you use your own back-end, based on some other SSL implementation,
then you don’t have to installpyOpenSSL.Changelogv0.2.0Added support for sending multiple pushes with varying payload during one APNs connection, thanks Jon Snyder!v0.1.2Removed not needed non ascii character which was causing problems with python < 3v0.1.1Imported changes from open apns-client pull requests. Thanks Jason Spafford, zhe li and neetu jain.v0.1Forked from apns-client and fixed SSL handshake error caused by Apple’s SSLv3 deprecationAlternativesThere aremany alternativesavailable.
This library differs in the following design decisions:Support certificates from strings. We do not distribute certificate files
on worker machines, they fetch it from the database when needed. This
approach simplifies deployment, upgrades and maintenance.Keep connections persistent. An SSL handshaking round is slow. Once
connection is established, it should remain open for at least few minutes,
waiting for the next batch.Support enhanced format. Apple developers have designed a notoriously bad
push protocol. They have upgraded it to enhanced version, which makes it
possible to detect which messages in the batch have failed.Clean pythonic API. No need for lots of classes, long lists of exceptions etc.Do not hard-code validation, let APNs fail. This decision makes library
a little bit more future proof.Todo[TODO] own documentation for apns-clerk[TODO] proper attributions for previous work
Package: apns-client
Python client forApple Push Notification service (APNs).
Checkdocumentationto learn how to use it.Check the client with similar interface forGoogle Cloud Messaging.Requirementssix- Python 2 and 3 compatibility library.pyOpenSSL- OpenSSL wrapper.
Required by standard networking back-end.Standard library has support forSSL transport. However, it is impossible to use
it with certificates provided as a string. We store certificates in database,
because we handle different apps on many Celery worker machines. A dirty
solution would be to create temporary files, but it is insecure and slow. So,
we have decided to use a better OpenSSL wrapper andpyOpenSSLwas the
easiest to handle.pyOpenSSLis loaded on demand by standard networking
back-end. If you use your own back-end, based on some other SSL implementation,
then you don’t have to installpyOpenSSL.AlternativesThere aremany alternativesavailable. We have started withpyapnsandAPNSWrapper. This library
differs in the following design decisions:Support certificates from strings. We do not distribute certificate files
on worker machines, they fetch it from the database when needed. This
approach simplifies deployment, upgrades and maintenance.Keep connections persistent. An SSL handshaking round is slow. Once
connection is established, it should remain open for at least few minutes,
waiting for the next batch.Support enhanced format. Apple developers have designed a notoriously bad
push protocol. They have upgraded it to enhanced version, which makes it
possible to detect which messages in the batch have failed.Clean pythonic API. No need for lots of classes, long lists of exceptions etc.Do not hard-code validation, let APNs fail. This decision makes library
a little bit more future proof.Changelogv0.2Networking layer became pluggable, makinggeventbased implementations
possible. Everything is refactored, such that IO, multi-threading and SSL
are now loaded and used on demand, allowing you to cleanly override any
part of the client. The API is largely backward compatible. IO related
configuration is moved to transport layer and exception handling is a bit
more verbose. The client is using standard logging to send fine grained
debug messages.v0.1First simple implementation, hardwired with raw sockets andpyOpenSSL.
It does not work ingeventor any othergreenenvironment.SupportAPNs client was created bySardar Yumatov,
contact me if you find any bugs or need help. ContactGetlogicif you need a full-featured push notification service
for all popular platforms. You can view outstanding issues on theAPNs
Bitbucket page.
Package: apnspy
A Python client for Apple Push Notification serviceFor more information, please read thedocumentQuick StartUsepipto install.$pipinstallapnspy(Optional) creat a virtual environment and usepipto install$virtualenvvenv$sourcevenv/bin/activate(venv)$pipinstallapnspyCheck if the package is installed.$python>>>fromapnspyimportAPNs>>>There should be no ImportError.
Package: apns-worker
This is a client library for Apple’s push notification service. It is not the
first such library for Python, but, as is often the way, the existing options
didn’t quite meet our needs:No dependencies(other than six).Fire and forget. APNs is a quirky binary protocol that frequently requires
reconnecting to the service and re-sending notifications after an error.Robust. We don’t do quick and dirty here. Readability, tests, and
documentation are not optional.Quick startAn APNs client is by nature stateful. The default apns-worker backend uses
Python threads to asynchronously process a queue of messages to send to the
service. Most users will want to maintain a global ApnsManager instance to
process messages. Note that if your own program is threaded, you may need to
take care to create this global instance safely.from apns_worker import ApnsManager

apns = None

def init_apns(key_path, cert_path):
    """ Call this once at program init time. """
    global apns
    apns = ApnsManager(key_path, cert_path)

def send_badge(token, badge=1):
    """ Badge the app on a single device. """
    apns.send_aps([token], badge=badge)
Package: apod
APOD with pythonImage byWang JinDo you love APOD images? This repo give you an easy interface to obtain this images from the source with python. Also, if you run an Ubuntu OS with Gnome 3, a python script can be used to automatically change your wallpaper to your favourite apod.InstalationThe package is already public in PyPi. You can easily install with pip:python3 -m pip install apodAPOD packageThe apod package is based in two objects: ApodExplorer and ApodImageDownloader. The ApodExplorer make requests for apod server and obtain the image url.import apod

explorer = apod.ApodExplorer()
http_status = explorer.make_http_request(year=2022, month=6, day=27)
image_url = explorer.check_for_images()The other object is responsible to download the image and save it:downloader = apod.ApodImageDownloader(image_url)
# Obtain PIL image
image = downloader.get_image()
# Download and save
downloader.save_image(path=<DIRPATH>, name=<FILENAME>)Wallpaper scriptIf you want to use the automatic apod wallpaper script you mustinstall the apod packageand clone the repo:git clone https://github.com/Juanki0396/APOD_wallpaper.gitThe script is very easy to use. The ussual operation will be:python3 apod_wallpaper.py --date <YEAR> <MONTH> <DAY> --dirpath <DOWNLOAD DIR>
Package: apode
ApodeApode is a package that contains a set of indicators that are applied in economic analysis. It contains measures of poverty, inequality, polarization, welfare and concentration.RequirementsYou need Python 3.8 to run Apode.Code Repository & Issueshttps://github.com/ngrion/apodeBasic InstallExecute$pipinstallapodeDevelopment InstallClone this repo and install with pip$gitclonehttps://github.com/ngrion/apode.git$cdpycf3$pipinstall-e.FeaturesObjects are created using:>>>ad=ApodeData(DataFrame,income_column)Where income_column is the name of the desired analysis column in the dataframe.Methods that calculate indicators:>>>ad.poverty(method,*args)>>>ad.ineq(method,*args)>>>ad.welfare(method,*args)>>>ad.polarization(method,*args)>>>ad.concentration(method,*args)Graphical representations:>>>ad.plot.hist()>>>ad.plot.tip(**kwargs)>>>ad.plot.lorenz(**kwargs)>>>ad.plot.pen(**kwargs)For examples on how to use apode, please refer to theTutorial.ContributorsThanks to the following people who have contributed to this project:@ngrion@sofisappiaSupportIf you want to contact me you can reach me atngrion@gmail.com.
If you have issues please report them as a issuehere.LicenseDistributed under the MIT License. SeeLICENSEfor more information.
Package: apodeixi
apodeixiProof-oriented, reverse Conway domain model for human organizationsRunning the testsAt the root of the project, runpython -m unittest -v(you may ommit the-voption to avoid seeing the results for each individual test case).Example:aleja@CC-Labs-2 MINGW64 ~/Documents/Code/chateauclaudia-labs/apodeixi/project (main)
$ python -m unittest -v
test_multi_sheet (apodeixi.xli.tests_unit.test_BreakdownBuilder.Test_MultiSheet) ... ok
test_generateUID (apodeixi.xli.tests_unit.test_UID_Store.Test_UIDStore) ... ok
test_tokenize (apodeixi.xli.tests_unit.test_UID_Store.Test_UIDStore) ... okTo run an individual test, you can do something like this.aleja@CC-Labs-2 MINGW64 ~/Documents/Code/chateauclaudia-labs/apodeixi/project (main)
$ python -m unittest apodeixi.xli.tests_unit.test_BreakdownBuilder.Test_MultiSheet.test_multi_sheet
.
----------------------------------------------------------------------
Ran 1 test in 1.421s

OK
Package: apod-wallpaper
apod-wallpaperUtilizes NASA APOD API to generate wallpapers with explanations.
- Will download images (single, random or all in date range)
- Only supports image media types (no video).
- Uses tkinter to attempt to size wallpaper if not specified.
- By default, adds explanation of daily images in watermarked footer.Installpip install apod-wallpaperFor issues installing PIL dependency:
- Install libjpeg-dev & freetype-dev with your package manager (apt, yum, brew, etc)pip install PIL --allow-external PIL --allow-unverified PILConfigurationGet yourNASA API keySetNASA_API_KEYenvironment variable to your key.UsageDownload single datefromapod_wallpaperimportapodfromdatetimeimportdateapod.download_single(single_date=date(2015,07,01))Download randomDefaults tostart_date=date(1995, 6, 20)(the first day NASA began
posting daily pics), andend_date=date.today()fromapod_wallpaperimportapodapod.download_random()Download bulkSelect range of APOD (good for catching up on recent misses)fromapod_wallpaperimportapodfromdatetimeimportdateapod.download_bulk(start_date=date(2015,07,01),end_date=date(2015,07,05))All NASA APOD images (BE NICE: you probably don’t need this)fromapod_wallpaperimportapodapod.download_bulk()Optional argumentsdownload_path: (optional) File location to store downloaded image (default ~/wallpapers).
overwrite: (optional) Overwrite existing files in download_path (default: False)
screen_width: (optional) Pixels of width to make image. Large than original will add a black background. If not specified, OS detection of screen width will be attempted.
screen_height: (optional) Pixels of height to make image. Large than original will add a black background. If not specified, OS detection of screen width will be attempted.
font: (optional) TrueType font to apply in image footer (default OpenSans-Regular.ttf).
font_size: (optional) Size of TrueType font in image footer (default 18).
margin: (optional) Pixels around image footer text (default 50).
font_color: (optional) RGBA tuple for color of font (default white).
background_color: (optional) RBGA tuple for color of background (default black).
opacity: (optional) Opacity for image footer (default 0.8).Testspythontest_apod.pyAcknowledgementsNASA APOD API viaBowshockwrapper libraryOpen Sans font fromFont SquirrelImage processing byPillow
Package: apoli-python-extension
Apoli Python Extension is a python package that allows you to create Datapacks and Resourcepacks using Apoli Powers.How to generate the classes:fromapoli_python_extension.wikiimportupdate_wikiupdate_wiki()Datapack Example:"""Demo of Apoli Python PackageThis is a Demo of my Apoli Python Package to see how long it would take to create a relatively large apoli power.This Power will be a power that applies 3 random status effects whenever you recieve any status effect."""status_effects=["speed","slowness","haste","mining_fatigue","strength","instant_health","instant_damage","jump_boost","nausea","regeneration","resistance","fire_resistance","water_breathing","invisibility","blindness","night_vision","hunger","weakness","poison","wither","health_boost","absorption","saturation","glowing","levitation","luck","unluck","slow_falling","conduit_power","dolphins_grace","bad_omen","hero_of_the_village","darkness",]datapack=Datapack(name="Test Demo DataPack",namespace="test_demo")effect_actions=[]foreffectinstatus_effects:effect_actions.append({"element":ApplyEffectEntityAction(effect="minecraft:"+effect),"weight":10})effect_action=ChoiceAction(actions=effect_actions)has_effect=NbtEntityCondition(nbt="{ActiveEffects:[{Ambient:0b}]}")three_effects=AndAction(actions=[effect_action,effect_action,effect_action])rising_power=ActionOverTimePower(rising_action=three_effects,condition=has_effect,name="Easily Effected",description="Whenever you gain a potion effect, you gain some random extras")datapack.add_power(power=rising_power,name="random_effect")datapack.save()
Package: apollinaire
apollinairePython tools for helioseismic and asteroseismic frameworks.  This package
provides functions and framework designed for helioseismic and asteroseismic
instruments data managing and analysis.The core of the package is thepeakbagginglibrary, which provides a full
framework to extract oscillation modes parameters from solar and stellar power
spectra.Getting StartedPrerequisitesThe apollinaire package core framework is written in Python 3.
The following Python package are necessary to useapollinaire:numpyscipypandasmatplotlibh5pyemceecornerpathosdillstatsmodelsnumbageorgeastropytqdmInstallingWith conda:conda install -c conda-forge apollinaireWith pip:pip install apollinaireYou can also install the most recent version of apollinaire by cloning the GitLab repository:git clone https://gitlab.com/sybreton/apollinaire.gitDocumentationDocumentation is available onRead the Docs.AuthorsSoftware development:Sylvain N. Breton- Maintainer - (INAF - Osservatorio astrofisico di Catania)Contributors are listed below:Rafael A. García- Contributor - (CEA Saclay)Vincent Delsanti- Contributor - (CentraleSupélec)Jérôme Ballot- Contributor - (IRAP - Université de Toulouse)AcknowledgementsIf you useapollinairein your work, please cite theapollinairereference paper
(Breton et al., 2022),
the Astrophysics Source Code Librarycode record,and provide a link to the GitLab repository. You will find moredetailed citing instructions
in the documentation.
Package: apollo11log
Installsudopip3installapollo11log#to install system wideRun as a CLI app$ apollo11log
[CDR] 00 00:00:04 Roger. Clock.
[CDR] 00 00:00:13 Roger. We got a roll program.
[CMP] 00 00:00:15 Roger. Roll.
[CDR] 00 00:00:34 Roll's complete anRun as a systemd serviceCreate a unit file - such as/etc/systemd/system/apollo11.servicewith the contents like[Unit]
Description=apollo11
After=syslog.target

[Service]
ExecStart=/usr/local/bin/apollo11log
Restart=always
RestartSec=120
SyslogIdentifier=apollo11

[Install]
WantedBy=multi-user.targetThe enable and start the servicesudo systemctl enable apollo11.service
sudo systemctl start apollo11.serviceWatch the logsjournalctl -u apollo11 -f -n
Package: apollo3-client
apollo3-clientPython library for accessing theApollo3API.InstallationThe package can be installed withpip:pipinstallapollo3-clientThe package can be installed withpoetry:poetryaddapollo3-clientRequirementsPython 3.8+Quick StartTo use this library, you must have apollo3 api uri. We can specify it as a string when creating theapollo3.Clientobject. This is a basic example of the creating the client.Note: username and password is required by apollo for root authentication (Implementation in progress).
If we don't pass username and password then the client will use guest login to get the jwt tokenfromapollo3importApollo3Clientclient=Apollo3Client(api_url="http://localhost:3999")assemblies=client.assemblies_obj()forassemblyinassemblies:changes=client.changes_obj(assembly_id=assembly.id)forchangeinchanges:feature=client.feature(feature_id=change.feature_id)print(feature)EndpointsApollo3 EndpointFunction/assembliesclient.assemblies() or client.assemblies_obj()/changesclient.changes() or client.changes_obj()/featuresclient.feature()ContributingTo set up a development environment, first ensure you havepoetry 1.5+ installedand run:poetryinstall# install and update dependencies in your environment, the first timeConfigure the APOLLO3_API_URL inclient.pyYou can run tests locally using:poetryrunpytest
Package: apollo-archive
Python package to list and download all original images fromFlickr Apollo Archive.Project Apollo Archive/Apollo 11 Magazine 40/S (v1 / levels-adj)/AS11-40-5949InstallWithpip:$pipinstallapollo-archiveWith thesource files:$gitclonehttps://github.com/seignovert/python-flickr-apollo-archive.gitapollo-archive$cdapollo-archive;pythonsetup.pyinstallNoteYou need FlickrAPIkeyandsecrettokens. They can be generatedhere.Use the prompt input to init the key variables on the first load of the module:Warning:Someenvironnementvariablesaremissing.>Gotohttps://www.flickr.com/services/api/keys/tosetupyourkeys.FLICKR_API_KEY:1234567890FLICKR_API_SECRET:ABCDEFor you can set then globally:$exportFLICKR_API_KEY=1234567890$exportFLICKR_API_SECRET=ABCDEFPython usageQuery Flickr API:>>>fromapolloarchiveimportUser>>>user=User()FlickrUser:ApolloImageGallery(136485307@N06)|107albums>>>albums=user.albums[Album:"Announcements"(3photos),Album:"Apollo 7 Magazine 3/M"(46photos),Album:"Apollo 7 Magazine 4/N"(55photos),...Album:"Apollo 17 Magazine 163/TT"(72photos)]>>>albums[0].slug'Announcements'>>>albums[0].photos[Photo:"(also) Follow Project Apollo Archive on Facebook",Photo:"About the Project Apollo Archive Flickr Gallery",Photo:"The Project Apollo Archive is best experienced in the "Albums" view"]>>>albums[0].photos[0].url'https://farm1.staticflickr.com/622/21878909302_a369c0c4de_o.jpg'>>>albums[0].photos[0].filename'Also-follow-project-apollo-archive-on-facebook.jpg'Sync Flickr photosets:>>>fromapolloarchiveimportsync>>>sync(album=0,ncpu=4,overwrite=True)SyncAnnouncements:100%|█████████████████████████|3/3[00:00<00:00,3.89it/s]>Download:Also-follow-project-apollo-archive-on-facebook>Download:About-the-project-apollo-archive-flickr-gallery>Download:The-project-apollo-archive-is-best-experienced-in-the-albums-viewCLI usageSync Flickr photosets:$apollo-archive--helpusage:apollo-archive[-h][--user-idUSER_ID][--usernameUSERNAME][--albumALBUM][--ncpuNCPU][--overwrite]SyncFlickrfolder(s)optionalarguments:-h,--helpshowthishelpmessageandexit--user-idUSER_ID,-iUSER_IDUserID--usernameUSERNAME,-uUSERNAMEUsername--albumALBUM,-aALBUMAlbumnumbertosync--ncpuNCPU,-nNCPUNumberofthreadduringfordownload--overwrite,-oRe-downloadall$apollo-archive--album0--ncpu4--overwriteSyncAnnouncements:100%|█████████████████████████|3/3[00:00<00:00,3.89it/s]>Download:Also-follow-project-apollo-archive-on-facebook>Download:About-the-project-apollo-archive-flickr-gallery>Download:The-project-apollo-archive-is-best-experienced-in-the-albums-viewWarningThe complete archive isvery large(~62 Gb).Dependenciesflickrapipython-slugifywgettqdmargparseDisclaimerThis project is not supported or endorsed by either JPL or NASA.
The code is provided “as is”, use at your own risk.
Package: apollo-client
apollo-client - Python Client for Ctrip's Apollo方便Python接入配置中心框架Apollo所开发的Python版本客户端。
Tested with python 3.5+基于https://github.com/filamoon/pyapollo/修改Installationpipinstallapollo-clientFeatures实时同步配置灰度配置客户端容灾Usage启动客户端长连接监听client=ApolloClient(app_id=<appId>,cluster=<clusterName>,config_server_url=<configServerUrl>)client.start()获取Apollo的配置client.get_value(Key, DefaultValue, namespace)ContributionSource Code:https://github.com/BruceWW/pyapolloIssue Tracker:https://github.com/BruceWW/pyapollo/issuesOriginal Source Code:https://github.com/filamoon/pyapolloLicenseThe project is licensed under theApache 2 license.ReferenceApollo :https://github.com/ctripcorp/apolloContributorBruceprchenxhrgVersion log11/24/2019  Bruce  0.8.2   优化本地缓存的存储方式1/4/2020    Bruce  0.8.4   修复文件读取异常的bug3/24/2020prchen0.8.5   修复安装过程中requests模块依赖的问题7/5/2020    Bruce  0.9     主线程退出时，关闭获取配置的子线程25/5/2020xhrg0.9.1   修复文件名称读取异常13/7/2020   Bruce  0.9.2    【bugfix】修复当namespace不存在时，服务器挂起导致get_value无响应18/10/2020   Bruce  2.0     重构 | 优化数据获取方式 ｜ 优化定时任务  |  新增authorization传入