Saravanan666/pypi-org huggingface dataset:
Package: app-logger
app-loggerThis is a drop in logger that usespython-json-loggerto log json to stdout and stderr appropriately. DEBUG and INFO go to stdout, WARNING, ERROR, CRITICAL go to stderr.ConfigurationAll configuration is through environment variables, all have defaults so none are required.LOGGER_NAMEWhat should the logger be called? Default will use the root logger. Using the default orrootwill log not only log statements fromapp_loggerbut also any statements from libraries you're using.Format: Just a regular stringDefault:rootExample:mysweetappLOG_LEVELSUsed to set log levels. Can be used to set any log level you wish so you can selectively control logging. May be upper or lower case.Format: A comma separated string of key=value pairsDefault:root=INFOExample:root=DEBUG,asyncio=INFOLOG_FORMATUsed to control the log format.Format: A log format string oflog record attributesDefault: `%(levelname)%(name)%(asctime)%(module)%(funcName)%(lineno)%(message)``UsageThe logger initializes itself and makes itself available as a variable calledapp_logger. It's a regular python logger and can be used as such.Exampleapp_logger.info("I always hated python logging but now it's easy and just works")Resulting log{"levelname": "INFO", "name": "root", "asctime": "2020-04-11 11:24:17,299", "module": "main", "funcName": "main", "lineno": 14, "message": "I always hated python logging but now it's easy and just works"}Adding contextYou can use theextra=feature of python-json-logger to add context to your messages. This makes it really easy to have logging that's easy to parse, search, learn, and alert on if you're using log aggregation.ExampleGiven you have something that's a dictionary, you can include it in log statements without verbose string formatting.app_logger.error('Error handling message', extra=message)Resulting log{"levelname": "ERROR", "name": "root", "asctime": "2020-04-11 11:27:36,584", "module": "main", "funcName": "main", "lineno": 16, "message": "Error handling message", "guid": "7cc81eba-3bbc-4555-8fab-2a7556072f5d", "subject": "test"}You can see how easy it would be to find logs like this in kibana, and it's already in json format so it's easily indexable/searchable, including the context given viaextra=
Package: apply
Package Contentsapply(object, args=None, kwargs=None)Call object with args and kwargs; return its results.OverviewPython 3 has no apply. We like apply.
If you like apply as well, have no fear. This version of apply works
across all versions of Python.Examplesapply allows to create read/write properties in a very compact way:fromapplyimportapplyclassX509:def__init__(self,store):self.store=store@applydefCN():doc='The common name attribute'defget(self):returnself.store.get('CN')defset(self,value):self.store.put('CN',value)returnproperty(get,set,None,doc)record=X509(LDAP())record.CN='Slate Rock and Gravel Company'DocumentationFor further details please refer to theAPI Documentation.Changelog1.7 - 2023-09-14Update tox.ini for latest tox.
[stefan]Add GitHub CI workflow.
[stefan]Add .readthedocs.yaml file.
[stefan]Pin sphinx and sphinx-rtd-theme versions in docs extra.
[stefan]1.6 - 2022-03-09Add Python 3.8-3.10 to tox.ini. Remove old Python versions.
[stefan]Replace deprecatedpython setup.py testin tox.ini.
[stefan]Remove deprecatedtest_suitefrom setup.py.
[stefan]Move metadata to setup.cfg and add a pyproject.toml file.
[stefan]Include tests in sdist but not in wheel.
[stefan]1.5 - 2019-01-28Add MANIFEST.in.
[stefan]Release as wheel.
[stefan]1.4 - 2017-02-05Support Python 2.6-3.6 without 2to3.
[stefan]Add a LICENSE file.
[stefan]1.3 - 2014-04-19Remove setuptools from install_requires because it isn’t.
[stefan]1.2 - 2011-11-26Update README.
[stefan]1.1 - 2011-11-26Fix function signature.
[stefan]1.0 - 2011-11-25Initial release.
[stefan]
Package: applyaf
applyafapplyafis a Python 3.6+ module that applies frequency dependent
antenna factors and cable losses to spectrum analyzer readings in order
to calculate the incident field. Any duplicate frequency entries in the
antenna factors or cable losses data are removed before interpolating
the frequencies to match those of the spectrum analyzer readings.InputsThree csv files containing the following are required inputs:Spectrum analyzer measurementsAntenna factor dataCable loss dataEach CSV file should contain data in two columns:FrequencyAmplitudeThe amplitude is expected to be in dB.RequirementsnumpyFuture ImprovementsSome thoughts for future improvements include:Allowing CSV data files that contain non-dB amplitudes and then
convert as needed. Should this be a per-file setting?Generalize the code to handle a variable number (>3) of data to be
interpolated and applied to the given data set.If the code is generalized, should this be wrapped into the
[siganalysis][] project or left on its own?ContributingContributions are welcome! To contribute please:Fork the repositoryCreate a feature branchAdd code and testsPass lint and testsSubmit apull requestDevelopment SetupDevelopment Setup Using pyenvUse the following commands to create a Python 3.9.9 virtualenv usingpyenvandpyenv-virtualenv, install the requirements in the virtualenv namedapplyaf, and list the availableInvoketasks.$pyenvvirtualenv3.9.9applyaf
$pyenvactivateapplyaf
$pipinstall-rrequirements.txt
$inv-lLicenseapplyafis released under the MIT license. Please see theLICENSE.txtfile for more information.
Package: apply-async
apply_asyncIf you have a large number of files and you need to apply a function to each of them to get some outputs, then this is for you.This provides a function calledapply_asyncwhich takes in a list of filenames and a function to apply, and does the following for you:batches the filesapplies your function to each batch asynchronouslycontrols the number of batches to process at a time, and automatically adds new batches when old ones completeshows a progress bar for each batchInstallationFrom pip:pipinstallapply_asyncLatest version (from source):pipinstall"git+https://github.com/al-jshen/apply_async"Demo
Package: apply-defaults
apply_defaultsApply default values to functions.Makes configuration easy! Application settings come from a config file into
your code cleanly.pipinstallapply_defaults@apply_configThis decorator applies options from a ConfigParser object.fromapply_defaultsimportapply_configfromconfigparserimportConfigParserconfig=ConfigParser()config.read_dict({"general":{"option":True}})@apply_config(config)deffunc(option:bool=False)->bool:returnoptionTheoptionparameter takes the value from the configuration.>>>func()TrueOverride the configuration by passing a value.>>>func(option=False)FalseIf the option is not in the configuration, the default value from the parameter
list is used.>>>config.remove_option("general","option")>>>func()FalseConfigParser's options are strings. Type hints in the function signature allow
the apply_config decorator to cast options to the desired type.  Alternatively
cast the value yourself.@apply_selfThis decorator applies attributes from the bound object.fromapply_defaultsimportapply_selfclassMyObject:def__init__(self):self.option=True@apply_selfdeffunc(self,option=False):returnoptionThe parameter takes the value from the bound object, i.e.self.option.>>>obj=MyObject()>>>obj.func()TrueOverride by passing a value.>>>obj.func(option=False)FalseIf the attribute is not in the bound object, the default value from the
parameter list is used.>>>delobj.option>>>obj.func()False
Package: apply-pandas
apply-pandasGeneric Apply Function for Pandas DataFramesThis repo demonstrates a powerful, simple and generic way to make anapplyfunction for Pandas DataFrames.applytakes in a list of conditions (as strings) to apply to a dataframe, and returns the result of those applications.This can be useful when you want to avoid writing huge chunks of code to filter data, or when you want to construct code based on other factors to give you a properly formatted result. Case in point - user input can be turned into well-defined string queries/filters on your DataFrame, with which you can return the appropriate data,withoutknowing those queries in advance.Overview and UsageThe Apply function is wrapped in a functor so that we can cleanly separate verification and application. Furthermore, this also allows us to clearly bind the target DatFrame and the desired conditions together; something that might not always be easy when dealing with rapidly changing variables, while giving the programmer the option to call it when desired.In effect, you can bind at creation, but can safely get the computation much, much later. Here's a code snippet that illustrates the usage of this method.# First, we create our dummy datadf=pd.DataFrame(list(range(0,100)),columns=["Slice"])# Then a list of conditions to apply.list_condns=["frame['Slice']<5","frame['Slice']%3==1"]# To use the Apply() class,# First create an object that binds DataFrame and conditions,Applicator=Apply(df,list_condns)# Call for the result when needed.result=Applicator()#<--- returns pandas DataFrameNoticethat inlist_condns, all of our conditions are made out toframe, regardless of the actual name of the actual target frame. This means that when you generate these conditions in real-time, you do not ever have to worry about getting the name of the variable - just make out the filter forframe, and we'll take care of the rest :)Bugfixes and ImprovementsThis code is always ready for improvements, and to get rid of bugs - so please let me know if you've found anything, or how you've used this project! Hope you have fun with it :)
Package: apply-subs
apply-subsA command line application to apply a dictionnary (json) of substitutions to
text file corpus. This program is a find-and-replace tool to perform a
arbitrarily large set of substitutions in a reproducible fashion.Disclaimer, this app is far less powerful thansedand in particular doesn't
support regex replacement. What it offers a simpler interface to make simple
sweeping changes across a whole project in a reproducible fashion.InstallationThe easiest installation method is$pipinstallapply-subsIn order to installapply-subsin isolation, usepipxinstead.Examplesapply-subsuses a json file as input. This file should specify substitutions
asnew: old, whereoldcan either be a single str, or a list of strings.minimal caseecho"bunnies and bongos and bananas">mytext.txtecho'{"bunnies": "rabbits", "SECRETS": ["bongos", "bananas"]}'>mysubs.json
apply-subsmytext.txt-smysubs.jsonwill print the patched contentbunnies and SECRETS and SECRETSdiff modeUse diff mode (-d/--diff) to print a diff instead of the end result--- mytext.txt
+++ mytext.txt (patched)
@@ -1 +1 @@
-Lorem ipsum dolor sit amet, consectetur adipiscing elit
+Hello dolor sit amet, consectetur goodbyeUse-cp/--cdiff/--colored-difffor a colored output (when supported).inplace substitutions-i/--inplaceapply-subs--inplacemytext.txt-smysubs.jsonis equivalent toapply-subsmytext.txt-smysubs.json>mytext.txttarget several files in one goThetargetpositional argument can consist of a single file (as illustrated above),
or many. This is useful for instance if you need to apply a set of subtitutions to
all files in a project whose name match a regexp.gitls-files|egrep"(.md|.py)$"|xargsapply-subs-ssubsubs.json-i
Package: applyx
applyxapplyxcreate-nWORKSPACE_NAMEproject# fastapipython-mprojectfastapi# scriptpython-mprojectscript-sdemo# shellpython-mprojectshellcelerycelery--help
celeryinspectactive
celeryinspectreserved
celeryinspectregistered
celerycallTASK_NAME
celeryevents
Package: app-manager
app_managerRuns Python application in a fault-tolerant environment, continually rebooting after unexpected exceptions.Uses Python3 standard library packages onlyapp_manager.py contains AppManager classexamplesinstallationpip install app_managerrunning your app in the AppManager is simpleimport ApplicationClass
from app_manager import AppManager

app = ApplicationClass()
AppManager(app.run, run_limit = None) # set run_limit to positive integer to run application at most n times
''' Exceptions will be printed to the console '''alternatively, you can pass in your app's logger so that exceptions appear in your log outputfrom application_package import ApplicationClass, logger
from app_manager import AppManager

app = ApplicationClass()
AppManager(app.run, logger = logger)
''' Exceptions will be printed to the console and logged with the supplied logger'''each instance of AppManager runs in its own process, so multiple application components can be launched successivelyfrom application_package import AppMainClass, main_logger
from background_package import BackgroundAppClass, bg_logger
from app_manager import AppManager

app = AppMainClass()
comp = BackgroundAppClass()
AppManager(app.run, logger = main_logger)
AppManager(comp.run, logger = bg_logger)
Package: appmar
APPMAR 1.0If you prefer to extract raw data series for your own analyses, tryAPPMAR 2(WIP).A Python application for downloading and analyzing of WAVEWATCH III® wave and wind data.German Rivillas-Ospina, Diego Casas, Mauro Antonio Maza-Chamorro, Marianella Bolívar, Gabriel Ruiz, Roberto Guerrero,
José M. Horrillo-Caraballo, Milton Guerrero, Karina Díaz, Roberto del Rio, Erick CamposHighlights:Free and open-source Python application for wave and wind climate analysis.Downloads data from WAVEWATCH III hindcast.Performs mean and extreme climate analysis.Provides a GUI to improve interaction with the user.Especially useful on regions of limited data availability.APPMAR 1.0 is an application written in the Python programming language that downloads, processes, and analyzes wind and wave data. This application is composed of a graphical user interface (GUI) that contains two main modules: the first module downloads data from WAVEWATCH III® (WW3) production hindcasts by the National Oceanic and Atmospheric Administration (NOAA); the second module applies statistical mathematics for processing and analyzing wave and wind data. This application provides useful graphical results that describe mean and extreme wave and wind climate. APPMAR generates plots of exceedance probability, joint probability distribution, wave direction, Weibull distribution, and storm frequency analysis. Currently, APPMAR only downloads and analyzes wave and wind data from WW3 hindcasts, but it is under development to other datasets and marine climate parameters (seeAPPMAR 2). This application has been tested in the Magdalena River mouth, Colombia, and Cancún, México, where observational wave and wind data are scarce.InstallationAPPMAR is written in Python 3.7, and it requires a variety of dependencies to run. We strongly recommend using the Conda package manager to install Python 3.7 and APPMAR dependencies. You can obtain Conda by installingMinicondaorAnaconda.Note:APPMAR has been tested only in Python >=3.7 on Windows 10 with dependencies installed via conda. If you find problems trying to run APPMAR on a different platform o Python version, please open an issue.Dependencies:cfgribgdalwxpythonnumpymatplotlib==3.2scipyxarraypandascartopyscikit-learnkneedIn order to install and run APPMAR, follow these steps:Open Anaconda Prompt (or any terminal with the conda command in its PATH environment variable).Create a new conda environment for APPMAR and its dependencies:conda create -n my-new-env -c conda-forge python>=3.7 cfgrib gdal wxpython numpy matplotlib=3.2 scipy xarray pandas cartopy scikit-learn kneedActivate the new environment:conda activate my-new-envInstall APPMAR via pip:pip install appmarNow you can start APPMAR by executing:appmarRunThe next time you want to use APPMAR, only follow steps 1, 3 and 5. More information about APPMAR use and implementation can be found on the article (DOI: 10.1016/j.cageo.2022.105098).UpdateWhen an update is available, open the Anaconda Prompt, activate your environment (step 3) and upgrade with:pip install --upgrade appmar
Package: appmar2
APPMAR 2APPMAR 2 is a Python program for marine climate analysis.Some features:Download data from WAVEWATCH IIIÂ® 30-year Hindcast Phase 2 in GRIB2 format.Extract time series at given coordinates and save data to CSV format.Load time series in CSV format.Perform mean and extreme climate graphical analyses over loaded data series.Show interactive statistical plots and allow the user to save them as 300-dpi PNG images.InstallationFor installation on Windows, open Anaconda Prompt and run the following commands:Install dependencies:conda install -c conda-forge pandas numpy xarray matplotlib seaborn statsmodels cartopy cfgribInstall APPMAR 2:pip install pygubu appmar2RunAfter installation, run the commandappmar2on Anaconda Prompt.AuthorsGerman Rivillas-OspinaDiego CasasDennis RudasKatherine Rivera
Package: appmetrica
Application for integrating with Yandex AppMetricahttps://appmetrica.yandex.ru/Yandex Docshttps://tech.yandex.ru/appmetrica/doc/mobile-api/push/use-cases-docpage/Before using API it is necessary:Getapplication idfrom your account in appmetrica.yandex.ru[Generate access token](https://tech.yandex.ru/appmetrica/doc/mobile-api/intro/authorization-docpage/)Send pushCreateAPIinstance:from appmetrica.push.api import PushAPI

api = PushAPI(application_id, access_token)Create group to combine the sending in the report:group_id = api.create_group('test-push-1', send_rate=500)Passgroup_id,device listandmessageto send_push method and call:from appmetrica.push.api import TokenTypes

transfer_id = api.send_push(group_id, devices=devices, ios_message=ios_message,
                            android_message=android_message, tag='harry potter')

devices - list of token objects like:
    [
        {
            "id_type": TokenTypes.APPMETRICA_DEVICE_ID,
            "id_values": ["123456789", "42"]
        },
        {
            "id_type": TokenTypes.IOS_IFA,
            "id_values": ["8A690667-6204-4A6A-9B38-85DE016....."]
        },
        {
            "id_type": TokenTypes.ANDROID_PUSH_TOKEN,
            "id_values": ["eFfxdO7uCMw:APA91bF1tN3X3BAbiJXsQhk-..."]
        }
    ]

ios_message - push message for ios devices
android_message - push message for android devices:
    {
        "silent": false,
        "content": {
            "title": "string",
            "text": "string",
            "sound": "disable",
            "data": "string"
        }
    }To check status of push callcheck_statusmethod:status = api.check_status(transfer_id)List of available groupsCreateAPIinstance:from appmetrica.push.api import PushAPI

api = PushAPI(application_id, access_token)Get list of groupsgroup_id = api.get_groups()Export tokensCreateAPIinstance:from appmetrica.export.api import ExportAPI

api = ExportAPI(application_id, access_token)Call push_tokens method with necessary fields:data = api.export_push_tokens('token', 'ios_ifa', 'google_aid')Export devicesCreateAPIinstance:from appmetrica.export.api import ExportAPI

api = ExportAPI(application_id, access_token)Call push_tokens method with necessary fields:date_till = datetime.now()
date_from = date_till - timedelta(days=7)

data = api.export_installations('ios_ifv', date_from=date_from, date_till=date_till)Publish a release on PyPiInstalltwineglobally:pip install twineDon’t forget to bump the package version:__version__ = '1.0.5'Build the release:python setup.py sdist bdist_wheelPublish the release on PyPi:twine upload dist/*Changelog1.0.6 (2020-11-11)Add send rate when create appmetrica group1.0.5 (2020-10-01)Add retry for appmetrica request and declare python 3.8 support1.0.4 (2020-06-26)Allow to send raw data1.0.3 (2019-08-04)Declare python 3.7 support1.0.2 (2019-01-09)Increased request timeout to 30 seconds1.0.1 (2018-12-17)Replace deprecatedsendmethod tosend-batch1.0.0 (2017-12-14)Initial release
Package: appmode-aiidalab
AppmodeA Jupyter extensions that turns notebooks into web applications.Try it liveClick the binder badge to try it live without installing anything. This will take you directly to the "app" version of the notebook.InstallationIf you useconda, you can install it as:conda install --channel conda-forge appmodeIf you usepip, you can install it as:pip install appmode
jupyter nbextension     enable --py --sys-prefix appmode
jupyter serverextension enable --py --sys-prefix appmodeIf you want to usemybinderadd the followingenvironment.ymlfile to your repository:channels:
  - conda-forge
dependencies:
  - appmodeDescriptionAppmode consist of a server-side and a notebook extension for Jupyter. Together these two extensions provide the following features:One can view any notebook in appmode by clicking on theAppmodebutton in the toolbar. Alternatively one can change the url frombaseurl/notebooks/foo.ipynbtobaseurl/apps/foo.ipynb. This also allows for direct links into appmode.When a notebook is opened in appmode, all code cells are automatically executed. In order to present a clean UI, all code cells are hidden and the markdown cells are read-only.A notebook can be opened multiple times in appmode without interference. This is achieved by creating temporary copies of the notebook for each active appmode view. Each appmode view has its dedicated ipython kernel. When an appmode page is closed the kernel is shutdown and the temporary copy gets removed.To allow for passing information between notebooks via url parameters, the current url is injected into the variablejupyter_notebook_url.Server Side ConfigurationAppmode adds the followingconfiguration options:Appmode.trusted_pathRun only notebooks below this path in Appmode. Default: No restrictions.Appmode.show_edit_buttonShowEdit Appbutton during Appmode. Default: True.Appmode.show_other_buttonsShow other buttons, e.g. Logout, during Appmode. Default: True.Client Side CustomizationThe UI elements of Appmode can be customized via thecustom.jsfile. Some examples are:$('#appmode-leave').hide();                          // Hides the edit app button.
$('#appmode-busy').hide();                           // Hides the kernel busy indicator.
$('#appmode-loader').append('<h2>Loading...</h2>');  // Adds a loading message.Beware that hiding the edit button does not prevent users from leaving Appmode by changing the URL manually.DevelopmentWith the includedDockerfilea development environment can be quickly created:InstallDocker.git clone this repositorydocker build --tag appmode_dev ./docker run --init -ti -p8888:8888 appmode_devBrowse tohttp://localhost:8888/apps/example_app.ipynb
Package: app-monitor
MonItor is a command line tools with the purpose of simplyfing business check script execution for your application.If you want to check than at least one email has been sent to a customer, an order has been placed,
a new record has been added in the DB, etc… , monitor will run your check script on a regular basis.
If that fail, he will notify you via any channel.Specify your jobs through a python class.class CheckOK(Check):frequency = 5
notifiers = [ConsoleNotifier]def check(self):return Check.OKEvery 5 minutes, this check script will run and ensure that… it’s OK.
Package: app-name-generator
App name generatorView on pypyInstallationFor end userpip install app-name-generatorFor developmentClone the projectgit clone https://github.com/sylvanld/app-name-generator.git
cd app-name-generatorInstall dev dependenciesUsing pipenvpipenv install --devUsing pippip install requirements/developmentExample usageGenerate 5 randoms domains, available for either .io, .com, or .fr TLD with a max length of 6 characters.appnamegenerate5--max-length6--tldsio,com,frOutput lists of domains on which names are available.['stics.io']['slewer.io','slewer.fr']['nbaci.io','nbaci.com','nbaci.fr']['affixe.io','affixe.fr']Documentationappname generate -husage: appname generate [-h] [--min-length MIN_LENGTH] [--max-length MAX_LENGTH] [--tlds TLDS] [--exclusive] number

positional arguments:
  number                number names to generate

optional arguments:
  -h, --help            show this help message and exit
  --min-length MIN_LENGTH
                        minimum length of names to generates
  --max-length MAX_LENGTH
                        maximum length of names to generates
  --tlds TLDS           comma separated list of TLDs without spaces (e.g: com,fr)
  --exclusive           Decide wether domain should be available for all TLDs