Saravanan666/pypi-org huggingface dataset:
Package: zungle
Zungle: Python Web Framework built for learning purposesZungle is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstallzungleBasic usage:fromzungle.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"Zungle","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with Zungle. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from thezungle.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:fromzungle.apiimportAPIfromzungle.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: zunis
ZüNIS: Normalizing flows for neural importance samplingZüNIS (Zürich Neural Importance Sampling) a work-in-progress Pytorch-based library for Monte-Carlo integration
based on Neural imporance sampling[1], developed at ETH Zürich.
In simple terms, we use artificial intelligence to compute integrals faster.The goal is to provide a flexible library to integrate black-box functions with a level of automation comparable to the
VEGAS Library[2], while using state-of-the-art methods that go around
the limitations of existing tools.InstallationUsingpipThe library is available on PyPI:pipinstallzunisThe latest version can be installed directly from GitHub:pipinstall'git+https://github.com/ndeutschmann/zunis#egg=zunis&subdirectory=zunis_lib'Setting up a development environmentIf you would like to contribute to the library, run the benchmarks or try the examples,
the easiest is to clone this repository directly and install the extended requirements:# Clone the repositorygitclonehttps://github.com/ndeutschmann/zunis.git./zunis# Create a virtual environment (recommended)python3.7-mvenvzunis_venvsource./zunis_venv/bin/activate
pipinstall--upgradepip# Install the requirementscd./zunis
pipinstall-rrequirements.txt# Run one benchmark (GPU recommended)cd./experiments/benchmarks
pythonbenchmark_hypersphere.pyLibrary usageFor basic applications, the integrator is provided with default choices and can be created and used as follows:importtorchfromzunis.integrationimportIntegratordevice=torch.device("cuda")d=2deff(x):returnx[:,0]**2+x[:,1]**2integrator=Integrator(d=d,f=f,device=device)result,uncertainty,history=integrator.integrate()The functionfis integrated over thed-dimensional unit hypercube andtakestorch.Tensorbatched inputs with shape(N,d)for arbitrary batch sizeNondevicereturnstorch.Tensorbatched inputs with shape(N,)for arbitrary batch sizeNondeviceA more systematic documentation is under constructionhere.
Package: z-units
z-unitsA simple unit-converter for chemical engineersFeatureGauge pressure units (MPag, kPag, psig, ...) are ready for useFriendly to HYSYS userInstallpipinstallz-unitsQuickstart>>>fromz_unitsimportquantityasq>>>f=q.MolarFlow(3)>>>f<MolarFlow(3,'kmol/s')>f.value,f.unit(3,<Unit('kmol/s')>)>>>f.to('kmol/h')<MolarFlow(10800.0,'kmol/h')>>>>q.Length(100,'cm')==q.Length(1000,'mm')True>>>q.Pressure(15,'psi').to('MPag')<Pressure(0.0020963594,'MPag')>Related to gauge pressure, local atmospheric pressure (default: 101325 Pa) can be altered:>>>fromz_unitsimportconfig# Before>>>q.Pressure(100,'kPa').to('kPag')<Pressure(-1.325,'kPag')># Set to 50e3 Pa (50 kPa)>>>config.set_local_atmospheric_pressure(50e3)# After>>>q.Pressure(100,'kPa').to('kPag')<Pressure(50.0,'kPag')>Standard temperature (default: 20 degC) can be redefined, affecting standard cubic meter "Sm**3":# Before>>>q.Substance(100,'Nm3').to('Sm3')<Substance(107.321984,'Sm3')># Set to 15 degC>>>config.set_standard_temperature(15)# After>>>q.Substance(100,'Nm3').to('Sm3')<Substance(105.491488,'Sm3')>Format quantity to string with styles:# Only value>>>format(q.MolarEntropy(100))'100'# With unit, quick style>>>format(q.MolarEntropy(100),'u')'100 kJ/kmol-C'# With unit, definition style>>>format(q.MolarEntropy(100),'up')'100 kJ/(kmol*C)'Predefined QuantitiesLengthAreaVolumeTimeMassForceSubstanceEnergyVelocityTemperatureDeltaTemperaturePressureVolumeFlowMassDensityHeatFlowMolarFlowMassFlowMolarDensityMolarHeatCapacityMolarEntropyMolarHeatThermalConductivityViscositySurfaceTensionMassHeatCapacityMassEntropyMassHeatStandardGasFlowKinematicViscosityMolarVolumeFractionDimensionlessAbout itAs a chemical engineer, the Gauge-Pressure units are very useful to me. Unfortunately those units are not supported in some popular modules, so I reinvent the wheel.
Package: zun-tempest-plugin
Team and repository tagsTempest Integration of ZunThis directory contains Tempest tests to cover the Zun project, as well
as a plugin to automatically load these tests into tempest.See the Tempest plugin docs for information on using it:https://docs.openstack.org/tempest/latest/#using-pluginsFree software: Apache licenseDocumentation:https://docs.openstack.org/zun-tempest-plugin/latestSource:https://opendev.org/openstack/zun-tempest-pluginBugs:https://bugs.launchpad.net/zunRunning the testsEdit/opt/stack/tempest/etc/tempest.conf:Add the[container_service]section,
configuremin_microversionandmax_microversion:[container_service]min_microversion=1.32max_microversion=1.32NoteYou might need to modify the min/max microversion based on your
test environment.To run all tests from this plugin, install Zun into your environment and
navigate to tempest directory:$ cd /opt/stack/tempestRun this command:$ tempest run --regex zun_tempest_plugin.tests.tempest.apiTo run a single test case, run with the test case name, for example:$ tempest run --regex zun_tempest_plugin.tests.tempest.api.test_containers.TestContainer.test_list_containers
Package: zun-ui
Zun UIFree software: Apache licenseSource:https://opendev.org/openstack/zun-uiBugs:https://bugs.launchpad.net/zun-uiManual InstallationInstall according toZun UI documentation.Enabling in DevStackAdd this repo as an external repository into yourlocal.conffile:[[local|localrc]]
enable_plugin zun-ui https://github.com/openstack/zun-ui
Package: zunzuncito
Keep it simple and small, avoiding extra complexity at all cost.KISSCreate routes on the fly or by defining regular expressions.Support API versions out of the box without altering routes.Thread safety.Via decorator or in a defined route, accepts only certainHTTP methods.Follow the single responsibilityprinciple.Be compatible with any WSGI server. Example:uWSGI,Gunicorn,Twisted, etc.Tracing Request-ID “rid” per request.Compatibility with Google App Engine.demoMulti-tenantSupport.Ability to create almost anything easy, example: Supportchunked transfer encoding.InstallVia pip:$ pip install zunzuncitoIf you don’t have pip, after downloading the sources, you can run:$ python setup.py installQuick starthttp://docs.zunzun.io/en/latest/Quickstart.htmlDocumentationdocs.zunzun.iowww.zunzun.ioWhat ?ZunZuncito is a python package that allows to create and maintainRESTAPI’s without hassle.The simplicity for sketching and debugging helps to develop very fast; versioning is inherit by default, which allows to serve and maintain existing applications, while working in new releases with no need to create separate instances. All the applications are WSGIPEP 333compliant, allowing to migrate existing code to more robust frameworks, without need to modify the existing code.Why ?The need to upload large files by chunks and support resumable uploads trying to accomplish something like thenginx upload moduledoes in pure python.The idea of creating ZunZuncito, was the need of a very small and light tool (batteries included), that could help to create and deploy REST API’s quickly, without forcing the developers to learn or follow a complex flow but, in contrast, from the very beginning, guide them to properly structure their API, giving special attention to “versioned URI’s”, having with this a solid base that allows to work in different versions within a single ZunZun instance without interrupting service of any existing APIresources.
Package: zup
zupdependenciesPython 3.8Installation$pipinstallzupInstalling ZigThis will install latest master Zig release and set it as defaultzigcommand in your system.Note that zup never modifies your system configuration and you must add the symlink directory that zup manages to your%PATH%on Windows or$PATHon other platforms.zupinstallmaster-dConfigurationConfig file is a python script that gets executed before any command is ran.
It can be opened withzup config. This uses your default program for a filetype; on windows the default ispython.exe, please set it to a proper text editor or it won't open. Zup does not check or configure any system variables and can't know what the config will be opened with and it is your job as the owner of your system to configure it properly.# config.py# windows: Path(os.getenv('APPDATA')) / 'zup/config.py'# macos: Path.home() / 'Library/Preferences/zup/config.py'# other: Path.home() / '.config/zup/config.py'# url where index will be fetched from# default: 'https://ziglang.org/download/index.json'index_url=zup.config.default_index_url()# directory where zig compilers are installed# windows: Path(os.getenv('LOCALAPPDATA')) / 'zup'# macos: Path.home() / 'Library/Application Support/zup'# other: Path.home() / '.local/share/zup'install_dir=zup.config.default_install_dir()# directory where symlinks to compilers are created# windows: install_dir# macos: install_dir# other: Path.home() / '.local/bin'symlink_dir=zup.config.default_symlink_dir()
Package: zuqa-agent-python
This is the official Python module for ZUQA.It provides full out-of-the-box support for many of the popular frameworks,
including Django, and Flask. ZUQA is also easy to adapt for most
WSGI-compatible web applications viacustom integrations.Your application doesn’t live on the web? No problem! ZUQA is easy to use in
any Python application.Read thedocumentation.LicenseBSD-3-ClauseMade with ♥️ and ☕️ by Elastic and our community.
Package: zuraaa-vote-checker
Uma forma não oficial de verificar quando alguem votou no seu bot.InstalaçãoÉ necessário Python 3.5.3 ou superior.A instalação pode ser feita via PyPI. Basta executar o seguinte comando:python-mpipinstallzuraaa-vote-checkerModo de usarO uso é simples, basta carregar uma cog chamadazuraaaVoteChecker(case-sensitive)Depois disso é só escutar o eventozuraaa_vote.Ele recebe um único parâmetro do tipodiscord.User, representando quem votou.Exemplo:fromdiscord.ext.commandsimportBotbot=Bot(command_prefix='.')@bot.eventasyncdefon_zuraaa_vote(user):print(f'{user.name}votou!')bot.load_extension('zuraaaVoteChecker')bot.run('TOKEN')Você pode acessar a quantidade de usuários que votaram no bot também!Basta acessar o atributozuraaa_vote_streak, na classe do seu bot.
Ele irá contar a quantidade de votos desde que a cog foi carregada.
Package: zurb-foundation
This repository is automatically updated fromhttps://github.com/zurb/bower-foundationFoundationFoundation is the most advanced responsive front-end framework in the world. You can quickly prototype and build sites or apps that work on any kind of device with Foundation, which includes layout constructs (like a fully responsive grid), elements and best practices.To get started, check outhttp://foundation.zurb.com/docsInstallationTo get going with Foundation python module you can install it fromPyPi package:pipinstallzurb-foundationDocumentationFoundation documentation pages are available athttp://foundation.zurb.com/docsPython packageAfter installation you can usepkg_resourcemodule to access assets:importpkg_resourcesas_string=pkg_resources.resource_string("zurb_foundation","js/vendor/custom.modernizr.js")full_path_to_file=pkg_resources.resource_filename("zurb_foundation","js/vendor/custom.modernizr.js")file_like=pkg_resources.resource_stream("zurb_foundation","js/vendor/custom.modernizr.js")Package consists of:js, compiledcssandscssfiles.
Package: zusha-web-app
Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startTo be overwrittenTo be overwrittenRunpython manage.py migrateto create migrations.Start the development server and visithttp://127.0.0.1:8000/Visithttps://zusha.duckdns.org
Package: zut
ZutReusable Python and Django common utilities.InstallationFrom PyPI:pip install zutFrom a Git branch or tag (using https or ssh):pip install git+https://gitlab.com/ipamo/zut.git@main#egg=zut
pip install git+ssh://git@gitlab.com/ipamo/zut.git@main#egg=zutUsage examplesConfigure loggingfromzutimportconfigure_loggingconfigure_logging()Flexible in/outWrite text or tabular data to a flexible, easily configurable output: CSV or Excel file, or tabulated stdout/stderr.The output file may be on the local file system or on a Windows/Samba share (including when the library is used on Linux).Export text to stdout or to a file:importsysfromzutimportout_filewithout_file(filenameorsys.stdout)asf:f.write("Content")Export tabular data to stdout or to a file:importsysfromzutimportout_tablewithout_table(filenameorsys.stdout,headers=["Id","Word"])ast:t.append([1,"Hello"])t.append([2,"World"])Tabular data can also be exported using dictionnaries (in this case, headers will be detected automatically by the library):importsysfromzutimportout_tablewithout_table(filenameorsys.stdout)ast:t.append({'id':1,'name':"Hello"})t.append({'id':2,'col3':True})Iffilenamehas extension with.xlsx, output will be in Excel 2010 format.
Otherwise it will be in CSV format.Iffilenamestarts with\\, output will be done on the corresponding Windows/Samba share.
To indicate Samba credentials, callconfigure_smb_credentialsbefore using functionout_table.
Example:fromzutimportout_table,configure_smb_credentialsconfigure_smb_credentials(user=...,password=...)without_table(r"\\server\share\path\to\file")aso:...ResourcesMaintenance of the library and repository
Package: zutilities
zutilitiesA collection of Python utilitiesTable of ContentsPrerequisitesInstallationUsageLicensePrerequisitesYou'll need to have Python installed in order to usezutilities. Start by downloading and installingPython.Note: Python 3 is recommended, howeverzutilitieswill probably work just fine with most verions of Python 2Installationpython -m pip install zutilitiesUsagezutilities.jprint(list_or_dict, indent=2)Prints a list or dictionary as formatted JSON.>>> zutilities.jprint([{'key1':'value1','key2':'value2'}])
[
  {
    "key1": "value1",
    "key2": "value2"
  }
]zutilities.read_json_file(json_file)Reads a JSON file from the filesystem and returns a list or dictionary.>>> j = zutilities.read_json_file('file.json')
>>> j
[{'key1': 'value1', 'key2': 'value2'}]zutilities.get_logger(log_level=20, format=default_log_format, streams=[sys.stdout])Returns alogging.RootLoggerobject with preferred defaults set. Thedefault_log_formatis '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'>>> logr = zutilities.get_logger()
>>> logr.info('Hello World')
[2021-10-08 21:08:40,353] {<stdin>:1} INFO - Hello worldLicenseThis project is licensed under the MIT License
Package: zuul
Zuul is a project gating system.The latest documentation for Zuul v3 is published at:https://zuul-ci.org/docs/zuul/If you are looking for the Edge routing service named Zuul that is
related to Netflix, it can be found here:https://github.com/Netflix/zuulIf you are looking for the Javascript testing tool named Zuul, it
can be found here:https://github.com/defunctzombie/zuulGetting HelpThere are two Zuul-related mailing lists:zuul-announceA low-traffic announcement-only list to which every Zuul operator or
power-user should subscribe.zuul-discussGeneral discussion about Zuul, including questions about how to use
it, and future development.You will also find Zuul developers onMatrix <https://matrix.to/#/#zuul:opendev.org>.ContributingTo browse the latest code, see:https://opendev.org/zuul/zuulTo clone the latest code, usegit clone https://opendev.org/zuul/zuulBugs are handled at:https://storyboard.openstack.org/#!/project/zuul/zuulSuspected security vulnerabilities are most appreciated if first
reported privately following any of the supported mechanisms
described athttps://zuul-ci.org/docs/zuul/user/vulnerabilities.htmlCode reviews are handled by gerrit athttps://review.opendev.orgAfter creating a Gerrit account, usegit reviewto submit patches.
Example:# Do your commits
$ git review
# Enter your username if promptedJoin us on Matrixto discuss
development or usage.LicenseZuul is free software.  Most of Zuul is licensed under the Apache
License, version 2.0.  Some parts of Zuul are licensed under the
General Public License, version 3.0.  Please see the license headers
at the tops of individual source files.Python Version SupportZuul requires Python 3. It does not support Python 2.Since Zuul uses Ansible to drive CI jobs, Zuul can run tests anywhere
Ansible can, including Python 2 environments.
Package: zuulcilint
zuulcilintValidate from the command linepip install zuulcilint

usage: zuulcilint [-h] [--version] [--check-playbook-paths] [--schema SCHEMA] [--ignore-warnings] [--warnings-as-errors] file [file ...]

positional arguments:
  file                  file(s) or paths to lint

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --check-playbook-paths, -c
                        check that playbook paths are valid
  --schema SCHEMA, -s SCHEMA
                        path to Zuul schema file
  --ignore-warnings, -i
                        ignore warnings
  --warnings-as-errors  handle warnings as errorsValidate with pre-commitAdd the code below to your.pre-commit-config.yamlfile:-repo:https://github.com/codesquadnest/zuulcilint.gitrev:"0.2.5"hooks:-id:zuulcilintValidate with VS CodeTo ease editing Zuul CI configuration file we added experimental support for
a Zuul JSON Schema. This should enable validation and auto-completion in
code editors.For example onVSCodeyou can use theYAMLextension to use such a schema
validation by adding the following to.vscode/settings.json:"yaml.schemas":{"https://raw.githubusercontent.com/codesquadnest/zuulcilint/master/zuulcilint/zuul-schema.json":["*zuul-extra.d/***/*.yaml","*zuul.d/**/*.yaml","*zuul.d/**/**/*.yaml","*/.zuul.yaml"]},"yaml.customTags":["!encrypted/pkcs1-oaep array"],"sortJSON.orderOverride":["title","name","$schema","version","description","type"],"sortJSON.orderUnderride":["definitions"]
Package: zuul-client
Zuul-client is a CLI tool that can be used to interact with Zuul, the project
gating system.The latest documentation for Zuul and Zuul Client can be found at:https://zuul-ci.org/docs/Getting HelpThere are two Zuul-related mailing lists:zuul-announceA low-traffic announcement-only list to which every Zuul operator or
power-user should subscribe.zuul-discussGeneral discussion about Zuul, including questions about how to use
it, and future development.You will also find Zuul developers in the#zuulchannel on Freenode
IRC.ContributingTo browse the latest code, see:https://opendev.org/zuul/zuul-clientTo clone the latest code, usegit clone https://opendev.org/zuul/zuul-clientBugs are handled at:https://storyboard.openstack.org/#!/project/zuul/zuulSuspected security vulnerabilities are most appreciated if first
reported privately following any of the supported mechanisms
described athttps://zuul-ci.org/docs/zuul/user/vulnerabilities.htmlCode reviews are handled by gerrit athttps://review.opendev.orgAfter creating a Gerrit account, usegit reviewto submit patches.
Example:# Do your commits
$ git review
# Enter your username if promptedJoin#zuulon Freenode to discuss development or usage.LicenseZuul-client is free software, and licensed under the Apache License, version 2.0.Python Version SupportZuul-client requires Python 3. It does not support Python 2.
Package: zuul-lint
zuul-lintValidate from the command linepip install zuul-lint

zuul-lint .zuul.yamlValidate with pre-commitAdd the code below to your.pre-commit-config.yamlfile:-repo:https://github.com/pycontribs/zuul-lint.gitrev:"0.1"hooks:-id:zuul-lintValidate with VS CodeTo ease editing Zuul CI configuration file we added experimental support for
a Zuul JSON Schema. This should enable validation and auto-completion in
code editors.For example onVSCodeyou can use theYAMLextension to use such a schema
validation by adding the following tosettings.json:"yaml.schemas":{"https://raw.githubusercontent.com/pycontribs/zuul-lint/master/zuul_lint/zuul-schema.json":["*zuul.d/*.yaml","*/.zuul.yaml"]},"yaml.customTags":["!encrypted/pkcs1-oaep array"],"sortJSON.orderOverride":["title","name","$schema","version","description","type"],"sortJSON.orderUnderride":["definitions"]