Saravanan666/pypi-org huggingface dataset:
Package: zangy
zangyA fast redis library for python written in Rust using PyO3.Installationpip install --user zangyBuilding from source requires nightly Rust.How does it work?zangy aims to be the fastest python redis library. This is done by usingpyo3to generate shared objects in binary form. It is pretty much identical to writing this in C, but less of a pain to compile and identical in speed.Due to being completely in Rust, zangy can't do lifetime-based connection pooling and instead will create connections on startup and not lazily. All actions are distributed over the pool based on round robin. Internally,redis-rsis used for the redis operations andtokiois used to spawn tasks outside the GIL.Because it uses tokio and rust-level tasks, zangy unleashes maximum performance when used with alotof concurrent things to do.Is it fast?Yes! It beats similar Python libraries by a fair margin. Tokio, no GIL lock and the speed of Rust especially show when setting 1 million keysin parallel.Benchmark sources can be found in thebenchdirectory.Benchmarks below done with Redis 6.0.9 and Python 3.9, aioredis 1.3.1 and the latest zangy master:Taskaioredis operations/saioredis total timezangy operations/szangy total timeLoop 1 million times, set key to value7941.612m6.054s8485.111m57.923sSet 1 million keys at once and wait for finishing-0m49.797s-0m25.294sTLDR: zangy is faster in every regard but crushes in actually concurrent scenarios.UsageThe API is subject to change.importzangy# Create a pool with 2 connections and 2 pubsub connectionspool=awaitzangy.create_pool("redis://localhost:6379",2,2)# Generic redis commands (disadvised)awaitpool.execute("SET","a","b")# Individual commandsvalue=awaitpool.get("a")# Wait for pubsub messages and echo backwithpool.pubsub()aspubsub:awaitpubsub.subscribe("test1")asyncfor(channel,payload)inpubsub:print(channel,payload)awaitpool.publish("test2",payload)Aliases for almost all operations exist on pool (.set,.set_ex,.zrange, etc).What is not supported?Single connections. Just use a pool with 1 member.
Package: zanon
zanonA module to anonymize data streams with zero-delay called z-anonymity.When instantiating thezanonobject, the constructor receives a value in seconds forDelta_t, the desired probability of reaching k-anonymity expressed with a value between 0 and 1 (pk) and a value fork.Theanonymize()method accepts a tuple with 3 arguments(t,u,a), meaning that at timeta useruexposes an attributea.
Also a tuple of kind(t,u, latitude, longitude)is handled.If the tuple exposes an attribute that has not been exposed by at least otherz - 1users in the pastDelta_t, the tuple is simply ignored. Otherwise, the tuple is printed in the file 'output.txt'.The algorithm can handle generalization when providing the attribute with a hierarchy using * as separator (max_generalization*...*min_generalization*attribute).
Whenever releasing the attribute is not possible, the algorithm will look for the most specific generalization exposed by at least otherz - 1users in the pastDelta_t. If none is found, nothing is print out.
For the geolocation case, the algorithm divides in cells the territory (only Italy) with cells of differents sizes and outputs the cell with at most 5 level of details (3km, 5km, 10km, 30km, 500km).Other methodsRun thestudy_output.pyafter the simulation to plot the distribution of z, pk and traffic during time. (You will find the plot 'z_tuning.pdf').endFiles(): the file output.txt and counters.txt are intended for testing. They need to be closed at the end of the simulation (see example below).duration()print the range of time covered.Installpip install zanonLink to PyPIExample of usagefromzanonymityimportzanonfile_in="trace.txt"deltat=3600#in secondspk=0.8k=2z=zanon.zanon(deltat,pk,k)forlineinopen(file_in,'r'):t,u,a=line.split(",")z.anonymize((t,u,a))z.endFiles()z.duration()
Package: zanshin
OverviewZanshin is a library for collaboration over HTTP, WebDAV and CalDAV. It was originally conceived by Lisa Dusseault, and is currently being developed and maintained by Grant Baillie. Its primary client is the ChandlerSharing Project.GoalsHigh-levelAPI: Zanshin works at the level of resources and properties of resources, rather than HTTP requests and responses. This, coupled with careful thought about what data to persist, will hopefully lead to an easier-to-use and better performing API than what you get by making the obvious 1:1 mapping between Python method calls and HTTP requests.Asynchronicityvia theTwisted networking framework. For an excellent discussion of Chandler’s use of Twisted, seeTwistedHome.DocumentationSeeLisa’s original design notes.There are docstrings ranging from sparse to thorough in code itself. You
can generate epydoc strings by running:python setup.py docinside the project directory. (Thezanshin.webdavmodule contains a
fairly detailed doctest).InstallationThe project usessetuptools, and is therefore installable via thesetup.pyscript, or by using the standardeasy_installscript.Source codeThe (read-only) subversion trunk is:http://svn.osafoundation.org/zanshin/trunkEr, What Does “Zanshin” Mean, Anyway?Zanshin means both readiness and follow-through; it’s the attitude of being
ready for what happens and complete in how you react to it. Lisa picked
“zanshin” to sound cool (Japanese!) and to convey the first Goal above.
Package: zanza
ZanzaDead-simple string obfuscation algorithm.Obfuscation works by identifying the Unicode code points (character codes) of
each character in the input string. The return value is alist, in which the
first element is also a list containing the first character's code point digits.
The rest of the elements are the code point delta values, where each element is
compared to the previous one.As the project supportsPython 3.0 and up, all Unicode strings should work.InstallationTo install as aproject dependency, orglobal package, execute the
following command in the project's directory:pip install zanzaTo use as a standalonecommand-line utility, add the--userflag to the
previous command:pip install --user zanzaUsageThis package contains scripts for both stringobfuscation(zanza) anddeobfuscation(dezanza)Obfuscation>>>fromzanzaimportzanza>>>zanza("I am awesome!")[[7,3],-41,65,12,-77,65,22,-18,14,-4,-2,-8,-68]>>>zanza("Emojis will work, too: 💪")[[6,9],40,2,-5,-1,10,-83,87,-14,3,0,-76,87,-8,3,-7,-63,-12,84,-5,0,-53,-26,65501]>>>zanza("""Another... fancy... stuff""")[[6,5],45,1,5,-12,-3,13,-104,92,-5,13,-11,22,-111,105,1,1,-15,0]In the command line input can be passed as ascript argumentor fromstdin.$zanza"foo bar baz"[[1,0,2],9,0,-79,66,-1,17,-82,66,-1,25]$echo"Encrypt me"|zanza[[6,9],41,-11,15,7,-9,4,-84,77,-8]Deobfuscation>>>fromdezanzaimportdezanza>>>dezanza([[8,3],18,-2,15,-13,15,-84,83,1,-2,-9,5,-7,-71,82,-13,17,-17,-4,11,-7,-1])'Secret string revealed'>>>dezanza([[7,8],33,-101,98,3,-1,-7,-2,13,-104,101,-13,4,15,-2,-16,-2,19,-15,-1])'No\nlonger\nobfuscated'Using the command line:$dezanza"[[7, 6], 35, 0, -4, -75, 65, 19, -84, 77, -8, -69, 78, 1, 8]"Lookatmenow

$echo"[[7, 3], 43, -84, 87, -8, 3, -7, 8, -82]"|dezanza
Itworks!LicenseBSD-3-Clause
Package: za-parliament-scrapers
This is a collection of scrapers for working with data from theParliament of South Africa. It includes:Scrapers for handling Questions and Replies documentsCreditMost of the Question and Replies scraping was taken fromhttps://github.com/mysociety/za-hansard.InstallationInstall using:pip install za-parliament-scrapersDevelopmentClone the repo and setup for local development:pip install -e .[dev]To run tests:nosetest --with-doctest && flake8 za_parliament_scrapersLicenseMIT License
Package: zapf
This is a client library for the PILS PLC interface specification,
found here:https://forge.frm2.tum.de/public/doc/plc/master/html/A minimal example of usage:import logging
import zapf.scan

# Connection via different protocols is abstracted via URIs.
# Here we connect via Modbus/TCP using slave number 0.
URI = 'modbus://my.plc.host:502/0'

# The Scanner allows reading the PLC's "indexer" which provides
# all metadata about the PLC and its devices.
scanner = zapf.scan.Scanner(URI, logging.root)
plc_data = scanner.get_plc_data()
print('connected to PLC:', plc_data.plc_name)

# For each found device, this will create a client object and
# read the most basic property - the current value.
for dev in scanner.scan_devices():
    print('got a device:', dev)
    print('device value:', device.read_value())
Package: zapi
Zapi is an Application Development Framework - a library - for people who build http api service using Python,
without the need for manual labor. There’s no need to manually add a class or function, binding to a url path.
Everything is automatic.
Zapi lets you build your api service by minimizing the amount of code needed for a given task.Zapi supports Python >= 2.6.InstallationTo install Zapi, simply:$pipinstallzapiDocumentationFantastic documentation is available athttp://zapi.readthedocs.org/, coming soon.How to ContributeCheck for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is aContributor Friendlytag for issues that should be ideal for people who are not very familiar with the codebase yet.Forkthe repositoryon GitHub to start making your changes to themasterbranch (or branch off of it).Write a test which shows that the bug was fixed or that the feature works as expected.Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself toAUTHORS.Release History0.0.1 (2016-05-10)FrustrationConception
Package: zapian
zapian: schemaless python interface to Xapian===============================================作为一个pythoner，我们有理由爱xapian...但xappy已年久失修过于陈旧了... 喜欢elasticsearch的api，但是憎恨Luence的java架构，不愿引入新的服务进程？那么zapian，可能是你需要的....欢迎拍砖： http://weibo.com/panjunyong特性-------------------------------------- 为xapian提供更友好的schemaless的api- 支持分区索引：可单独指定分区搜索，或合并搜索- 历史数据存放在不同的索引分区- 根据数据存放区域进行分区Schemaless API-------------------------------------首先需要初始化数据库:db = Zapian(path='/tmp/test_zapian_db')添加一个分区：db.add_part('2001-02')添加索引:db.add_document(part='2001-02',uid='1111',index = { '+title' : u'我们很好.doc','searchable_text' : u'','modified' : datetime.datetime(),'crated' : datetime.datetime()},data = {})修改索引:db.replace_document(part, uid, doc)删除索引:db.delete_document(part, uid)搜索：db.search(parts, ["and",{ "filters":"exclude":},[ "or",{"filters":"exclude": },{ "filters":"exclude": }]])doc和索引的关系-------------------------------------xapian内部对数据有三种用途：term索引、排序字段、返回data；系统自动对数据类型进行处理：- set/list/tuple：对每个包含数据，完整匹配搜索(term索引)- string/unicode: 用于全文搜索(term索引)- datetime/int/float: 用于排序和范围比较(排序字段)- 如果字符串类型的字段以 + 开头，表示除了全文索引，也会用于排序数据库的结构-------------------------------------数据库存放在文件夹结构：schema.yaml   # 库结构信息20120112/     # 某个分区，标准xapian数据库20120512/     # 另外一个分区，标准xapian数据库其中schema.json, 由系统自动维护, 记录了2个信息：1. PREFIX和字段的映射：prefixes:{title':"NC", 'created':"LL"}2. attribute存放的slot位置:slots:{'modified':1, 'created':2}安装使用-------------------------------------1. 需要先安装xapian：http://xapian.org/download2. 直接在pypi上安装这个包： https://pypi.python.org/pypi/zapian
Package: zapimoveis-scraper
Zap Imoveis Scraperzapimoveis-scraper is a Python package that works as a crawler and scraper using beautifulsoup4 to get data fromzap imóveis.InstallationUse the package managerpipto install zapimoveis-scraper.pipinstallzapimoveis_scraperUsageimportzapimoveis_scraperaszap# returns a list with objects containing scraped datazap.search(localization="go+goiania++setor-oeste",num_pages=5)Available search parameters:localization (string): location in which the search will be performeddefault: 'go+goiania++setor-marista'The search string is available on the search url of zap imóveis. Eg:https://www.zapimoveis.com.br/aluguel/imoveis/rj+rio-de-janeiro+ilha-do-governador+cacuia/num_pages (int): Number of pages to scrapedefault: 1acao (string): type of contract. Possible values: 'venda', 'aluguel', 'lancamentos'default: 'aluguel'tipo (string): type of property. Possible values: 'imoveis', 'apartamentos', 'casas'default: 'casas'dictionaty_out (boolean): Specifies the method output (list of objects or dictionary)default: Falsetime_to_wait (float): time to wait until the script scrapes the next pagedefault: 0Scraped attributes:The objects returned fromsearchcontain the following attributes:description: property descriptionprice: property price (monthly)condo_fee: property condo fee (monthly)bedrooms: number of bedrooms on propertybathrooms: number of bathrooms on propertytotal_area_m2: property area (square meters)vacancies: parking spots available on propertyaddress: property addresslink: link of the property
Package: zapit
ZapitZapit, a Zerotier API wrapper for Python.InstallationZapit is supported on 3.8+. The recommended way to install Zapit is via pip.pipinstallzapitQuickstartimportzapitztcentral=zapit.Central(api_key="API_KEY")# Get all the networks avaliable.networks=ztcentral.list_networks()
Package: zapit-Python-Bridge
zapit-Python-BridgeInterface for controlling a running Zapit MATLAB instance from Python.
The scanner and sample calibration are performed in MATLAB.
The rest of the operations can be performed via Python.Installingpip install zapit-Python-BridgeExampleThen in iPython:importzapit_python_bridge.bridgeaszpbfromimportlibimportreload# Create an instance of the bridge objecthZP=zpb.bridge()# InteracthZP.send_samples()hZP.stop_opto_stimhZP.send_samples(conditionNum=2,laserOn=0)hZP.stop_opto_stim()If you need to reload the module for development purposes, youmustfirst delete the running class instance or it will hang when it next tries to connect:In [1]: hZP.release_matlab()
Disconnecting from MATLAB

In [2]: reload(zpb)
Out[2]: <module 'zapit_python_bridge.bridge' from 'D:zapit-python-bridge\\zapit_python_bridge\\bridge.py'>

In [3]: hZP = zpb.bridge()
Attempting MATLAB connection...
Connected!Minimal example for running an exeperimentSeeexamplesdirectorypython minimal_experiment_example.pyConnecting to the zapit session: minimal exampleIn MATLAB:>>matlab.engine.shareEngine('zapit')In iPython:importmatlab.engineeng=matlab.engine.connect_matlab('zapit')Make sure you have set up and calibrated everything in Zapit. Now in Python you can do:hZP=eng.workspace['hZP']hZPview=eng.workspace['hZPview']eng.eval('hZP.stimConfig.plotChanSamples(2)',nargout=0)# ORSC=eng.subsref(hZP,{'type':'.','subs':'stimConfig'})eng.plotChanSamples(SC,1,nargout=0)eng.sendSamples(hZP,nargout=0)eng.stopOptoStim(hZP,nargout=0)
Package: zapp
IntroductionBuildzipapp(PEP 441) single file Python applications easily.RepositoriesDistributions:https://pypi.org/project/zapp/Source code:https://gitlab.com/sinoroc/zapphttps://github.com/sinoroc/zappUsageStandalone application$ zapp --help
usage: zapp [-h] [--version] [--requirements requirements.txt]
            output_file entry_point [requirement [requirement ...]]

positional arguments:
  output_file
  entry_point
  requirement

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --requirements requirements.txt, -r requirements.txtzapp ~/bin/myapp myapp.cli:main 'myapp==1.2.3' 'mylib==3.2.1'
zapp ~/bin/myapp myapp.cli:main --requirements A.txt --requirements B.txt

python3 -m zapp ~/bin/myapp myapp.cli:main 'myapp==1.2.3' 'mylib==3.2.1'

zapp toolmaker.pyz toolmaker.cli:main toolmaker
zapp pipdeptree.pyz pipdeptree:main pipdeptree
zapp ~/bin/httpie httpie.__main__:main httpie

# Without requirements (use an entry point from Python's standard library)
zapp zipfile.pyz zipfile:mainLibraryimport zapp

zapp.core.build_zapp(
    'myapp.pyz',  # output_file
    'myapp.cli:main',  # entry_point
    requirements=[
        'myapp==1.2.3',
        'mylib==3.2.1',
    ],
    requirements_txts=[
        'A.txt',
        'B.txt',
    ],
)Setuptools commandpython3 setup.py bdist_zapp --entry-point myapp.cli:mainDetailsSimilar applicationsshivpexsuperzippy
Package: zappa-django-utils
zappa-django-utils 0.4.1: final release!Final ReleaseThanks to everyone who has supported this package of Zappa utilities for Django! Many of these utilities have become deprecated as new features have been added to AWS, or split into their own projects such adjango-s3-sqlite:https://github.com/flipperpa/django-s3-sqliteWe're making one final release and will not be accepting further issues or pull requests.DescriptionSmall utilities for makingZappadeployments slightly easier for Django applications.This project was inspired by Edgar Roman'sZappa Django Guide.InstallationInstall viapip:$ pip install zappa-django-utilsAdd to your installed apps:INSTALLED_APPS += ['zappa_django_utils']UsageUsing an S3-Backed Database Engine - DEPRECATED!Usedjango-s3-sqliteinstead, as it has an updated SQLite driver compatible with current versions of Django:https://github.com/flipperpa/django-s3-sqliteCreating a Postgres DatabaseOnce you have your RDS set up, your VPC/Subnet/Security Groups set up, and yourDATABASESsetting set up, you can create the database with:$ zappa manage <stage> create_pg_dbThen you're ready topython manage.py makemigrationsandzappa update; zappa manage <stage> migrate!Creating a Default Admin UserYou'll probably need a default user to manage your application with, so you can now:$ zappa manage <stage> create_admin_userOr you can pass some arguments:$ zappa manage <stage> create_admin_user one two threeThis will internally make this call:User.objects.create_superuser('one','two','three')Now log in and immediately change the admin user's email and password.Creating/Dropping a Postgres SchemaYou can create aPostgres schemawith:$ zappa manage create_pg_schemaand drop it with:$ zappa manage drop_pg_schemaLicense(c) 2017, Rich Jones, MIT License
Package: zappadock
ZappaDockInstallIt's dead simple :$ pip install zappadockUsageCheck that the Docker daemon is running by typingdocker infocommand from a terminal.Set your AWS credentials in environmental variables or in the~/.awsfolder.  See theAmazon Docsfor more information.Runzappadockin the directory you wish to run your Zappa commands.Your directory will be loaded in a docker container, and a virtual environment will be created and activated.To run the built-in servers:Django:python manage.py runserver 0.0.0.0:8000Flask:flask run --host=0.0.0.0 --port=8000If you have any problems, open a issue and we'll figure it out.AboutThis package makes dealing withZappaa walk in the park.How ?Zappa runs Flask/Django web apps on AWS Lambda.We LOVE Zappa. However it's not the MOST user-friendly application ever.Why ?You see, Zappa builds all your requirements before uploading your app to AWS Lambda. However, pip downloads the packages that are compatible with the computer it is running on, so when Zappa uploads it to AWS Lambda, many packages don't work (notablypsycopg2among others).What's the solution ?The solution recommend by theThe Django Guide for Zappais to run your Zappa commands in a docker container similar to the one that AWS Lambda uses.This will ensure that all the dependencies will be AWS Lambda compatible.
This ZappaDock streamlines the workflow.What Does ZappaDock Do ?ZappaDock does 3 things.Run a docker container with your code mounted.Load your AWS Credentials from the~/.awsfolder and environmental variables into the container.Create and activate a virtual environment inside the container.So now you can test and deploy your code confident that it will work once deployed.ContributingI mostly made this for myself.  If you want to help make this a masterpiece, be a sport and contribute.Thanks!
Package: zappa-env
Zappa EnvZappa-env is a simple package that allows you to call Zappa commands from a custom virtualenv for build purposesInstalling & UsageInstall zappapip install zappa-envRun your Zappa commands withzappa-envfollowed by your virtualenv and Zappa commandzappa-env my-virtual-env zappa update prodRequirementsZappa-env currently assumes that your virtualenvs are installed with thevirtualenvwrapperpackage and located in$HOME/.virtualenvs/. Currently this is unable to be changed unless you modify the source code.Why?The reason I made this project was because I was getting annoyed activating a special deployment virtualenv just to deploy or package my Zappa repo. This small project combines theworkon virtualenvand zappa commands so I can run my Zappa commands in just one line.ContributionsSubmit an issue or pull request and I'll do my best to merge the PR or help with the issue.To-doSupport running zappa commands with a requirements.txt file (eliminates need for virtualenvs)Support AnacondaSupport stock Python virtualenvs
Package: zappa-layer
zappa-layerA tool for managing AWS Lambda layers for Zappahttps://pypi.org/project/zappa-layer/Installationpip install zappa-layerUsage$ python3 zappa_layer/layer_manage.py -h
Usage: layer_manage.py [OPTIONS] COMMAND [ARGS]...

  Manage layers for zappadock

Options:
  --help  Show this message and exit.

Available subcommands:
  
  [package]
     checkpkgs           Check packages in venv
     installpkgs         Install packages in venv (default: in layer)
  
  [layer]
     makelayer           Make layer.zip from zappa-layer-venv
     publishlayer        Publish layer to AWS
     updatezappalayer    Update zappa_settings.json with layer ARN
  
  [allinone]
     allinone            Execute all commands with one command
     no-update-allinone  Execute all commands, except updatelayerWIP...
Package: zappa-manage
Zappa Bot ManageHow to Create a New Releasepython3setup.pysdistbdist_wheel
python3-mpipinstall--user--upgradetwine
twineupload--skip-existingdist/*To DoRepo Namezappa_manageFigure out how to publish toedX.orgrepoChange url insetup.pyAsk Cory about ...zappa_manage/tests/: Is it necessary? If so, here's theguide. Otherwise, delete the directory.No need for tests at the moment.bin/: Does this have CLI usage? If so, here's theguide. Otherwise, delete the repository.It does have cli usage since it's used when deploying lambdas envs in GoCD.
Package: zappa-packer
Zappa PackerAboutThis is not an official zappa package, this is just thezappa packagecommand isolatedZappa Packagermakes it super easy to pack server-less, event-driven Python applications (including, but not limited to, WSGI web apps) on AWS Lambda + API Gateway. This package only includes the packing command. For full official zappa you can go herehttps://github.com/zappa/ZappaIf you've got a Python web app (including Django and Flask apps), it's as easy as:$ pip install zappa-packer
$ zappa-packerPackageFor using, just run the following command:$ zappa-packerHow Zappa Makes PackagesZappa will automatically package your active virtual environment into a package which runs smoothly on AWS Lambda.During this process, it will replace any local dependencies with AWS Lambda compatible versions. Dependencies are included in this order:Lambda-compatiblemanylinuxwheels from a local cacheLambda-compatiblemanylinuxwheels from PyPIPackages from the active virtual environmentPackages from the local project directoryIt also skips certain unnecessary files, and ignores any .py files if .pyc files are available.
Package: zappa-scheduler
zappa_schedulerDescriptionA db driven way to run tasks at a future point in time, or at a regular interval, for Django Zappa projects (https://github.com/Miserlou/Zappa).Installationpip install zappa_schedulerTo check for tasks every 4 minutes, add the below to zappa_settings.json:{"dev":{"keep_warm":false,"events":[{"function":"zappa_scheduler.zappa_check.now","expression":"rate(4 minutes)"}]}}UsageLow level currently, where you create and save your tasks straight to db.deftest_function(_arg1,_arg2,_kwarg1=1,_kwarg2=2):return_arg1,_arg2,_kwarg1,_kwarg2call_later=CallLater()call_later.function=test_functioncall_later.args=(3,4)# for the above functioncall_later.kwargs={'_kwarg1':11,'_kwarg2':22}# for the above functioncall_later.time_to_run=timezone.now()+timedelta(minutes=8)call_later.save()You can also repeatedly call your task:call_later_twice.every=timedelta(seconds=1)call_later_twice.repeat=2There are 2 types of failure:If a task fails to run, it is run on the next checking event. By default, there are 3 attempts to run a function.If a task takes too long to run, it is again run on the next checking event. By default, there are 3 retries....the task is labelled as problematic after repeated fails.