package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
zrok-sdk
zrok client access # noqa: E501
zrok-sdk-kentest
Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti.
zrouter
zrouter基于Flask的路由工具库,集成登录验证、权限控制、日志记录、RESTful API快速构建等功能。安装pipinstallzrouter基本使用# 定义路由器router=Router('body',__name__,url_prefix='/body')# 添加单一路由@router.add('/article',methods=['GET'])defget_article(article_id:int):returnArticleMapper.get_json(article_id)@router.add('/article',methods=['POST'])defpost_article(article_id:int,data:dict):returnArticleMapper.update(article_id,data)# 添加REST资源router.add_resource('/metric',MetricResource)# 批量添加REST资源router.add_resources({'/metric':MetricResource,'/sport':SportResource,'/entry':EntryResource,'/entry/stat':EntryStatResource,'/punch':PunchResource,'/punch/stat':PunchStatResource})自定义通过继承实现用户验证方法、错误处理方法。fromzrouterimportRouterasRouter_classRouter(Router_):defverify_user(self):# 通过继承在此添加代码,实现用户验证、日志记录defhandle_error(self,e):# 通过继承在此添加代码,实现错误处理
zroya
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)[![PyPI version](https://badge.fury.io/py/zroya.svg)](https://pypi.python.org/pypi/zroya/)[![PyPI status](https://img.shields.io/pypi/status/zroya.svg)](https://pypi.python.org/pypi/zroya/)[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/malja/zroya/graphs/commit-activity)# zroya2Zroya is a Python package for creating native Windows notifications.In contrast to first version of zroya, zroya2 is a Python extension built around C++[WinToast](https://github.com/mohabouje/WinToast) library.**Note**: Zroya2 is in beta testing. I would be grateful for any bug reports.## PrerequisitesThere are no requirements at the moment.## InstallationZroya2 is now available from pypi:```python -m pip install zroya```## Example```pythonimport zroya# Initialize zroya module. Make sure to call this function.# All parameters are requiredzroya.init("YourAppName", "CompanyName", "ProductName", "SubProduct", "Version")# Create notification template. TYPE_TEXT1 means one bold line withou image.template = zroya.Template( zroya.TemplateType.Text1 )# Set first linetemplate.setFirstLine("My First line")# Save notification id for later usenotificationID = zroya.show(template)# .. do something, maybe sleep?# Hide notificationzroya.hide(notificationID)```## DocumentationYou may find some limited documentation on [Zroya Page](https://malja.github.io/zroya)
zrp
Zest Race PredictorZest Race Predictor (ZRP) is an open-source machine learning algorithm that estimates the race/ethnicity of an individual using only their full name and home address as inputs. ZRP improves upon the most widely used racial and ethnic data estimation method, Bayesian Improved Surname Geocoding (BISG), developed by RAND Corporation in 2009.ZRP was built using ML techniques such as gradient boosting and trained on voter data from the southeastern U.S. It was then validated on a national sample using adjusted tract-level American Community Survey (ACS) data. (Model training procedures are provided.)Compared to BISG, ZRP correctly identified:25% more African-Americans as African-American35% fewer African-Americans as non-African American60% fewer Whites as non-WhiteZRP can be used to analyze racial equity and outcomes in critical spheres such as health care, financial services, criminal justice, or anywhere there's a need to impute the race or ethnicity of a population dataset. (Usage examples are included.) The financial services industry, for example, has struggled for years to achieve more equitable outcomes amid charges of discrimination in lending practices.Zest AI began developing ZRP in 2020 to improve the accuracy of our clients' fair lending analyses by using more data and better math. We believe ZRP can greatly improve our understanding of the disparate impact and disparate treatment of protected-status borrowers. Armed with a better understanding of the disparities that exist in our financial system, we can highlight inequities and create a roadmap to improve equity in access to finance.NotesThis is the preliminary version and implementation of the ZRP tool. We're dedicated to continue improving both the algorithm and documentation and hope that government agencies, lenders, citizen data scientists and other interested parties will help us improve the model. Details of the model development process can be found in themodel development documentationInstallInstall requires an internet connection. The package has been tested on python 3.7.4, but should likely work with 3.7.X.Note: Due to the size and number of lookup tables necesary for the zrp package, total installation requires 3 GB of available space.Setting up your virtual environmentWe recommend installing zrp inside apython virtual environment.Run the following to build your virtual envrionment:python3 -m venv /path/to/new/virtual/environmentActivate your virtual environment:source /path/to/new/virtual/environment/bin/activateEx.:python -m venv /Users/joejones/Documents/ZestAI/zrpvenv source /Users/joejones/Documents/ZestAI/zrpvenv/bin/activateUnix-like systemspip install zrpAfter installing via pip, you need to download the lookup tables and pipelines using the following command: :python -m zrp downloadWindowspip install pipwin pipwin install gdal pipwin install fiona pip install zrpAfter installing via pip, you need to download the lookup tables and pipelines using the following command: :python -m zrp downloadIf you're experiencing issues with installation, please consult ourCommon Issuespage.DataTraining DataThe models available in this package were trained on voter registration data from the states of Florida , Georgia, and North Carolina. Summary statistics on these datasets and additional datasets used as validation can be foundhere.Consult the following to download state voter registration data:North CarolinaFloridaAlabamaSouth CarolinaGeorgiaLouisianaAmerican Community Survey (ACS) Data:The US Census Bureau details that, "the American Community Survey (ACS) is an ongoing survey that provides data every year -- giving communities the current information they need to plan investments and services. The ACS covers a broad range of topics about social, economic, demographic, and housing characteristics of the U.S. population. The 5-year estimates from the ACS are "period" estimates that represent data collected over a period of time. The primary advantage of using multiyear estimates is the increased statistical reliability of the data for less populated areas and small population subgroups. The 5-year estimates are available for all geographies down to the block group level." ( Bureau, US Census. "American Community Survey 5-Year Data (2009-2019)." Census.gov, 8 Dec. 2021,https://www.census.gov/data/developers/data-sets/acs-5year.html. )ACS data is available in 1 or 5 year spans. The 5yr ACS data is the most comprehensive & is available at more granular levels than 1yr data. It is thus used in this work.Model Development and Feature DocumentationDetails of the model development process can be found in themodel development documentation. Details of the human readable feature definitions as well as feature importances can be foundhere.Usage and ExamplesTo get started using the ZRP, first ensure the download is complete (as described above) and xgboost == 1.0.2Check out the guides in theexamplesfolder. Clone the repo in order to obtain the example notebooks and data; this is not provided in the pip installable package. If you're experiencing issues, first consult ourcommon issues guide.Here, we additionally provide an interactive virtual environment, via Binder, with ZRP installed. Once you open this link and are taken to the JupyterLab environment, open up a terminal and run the following: :python -m zrp downloadNext, we present the primary ways you'll use ZRP.ZRP PredictionsSummary of commands::>>> from zrp import ZRP >>> zest_race_predictor = ZRP() >>> zest_race_predictor.fit() >>> zrp_output = zest_race_predictor.transform(input_dataframe)Breaking down key commands:>>> zest_race_predictor = ZRP()ZRP(pipe_path=None, support_files_path="data/processed", key="ZEST_KEY", first_name="first_name", middle_name="middle_name", last_name="last_name", house_number="house_number", street_address="street_address", city="city", state="state", zip_code="zip_code", race='race', proxy="probs", census_tract=None, street_address_2=None, name_prefix=None, name_suffix=None, na_values=None, file_path=None, geocode=True, bisg=True, readout=True, n_jobs=49, year="2019", span="5", runname="test")What it does:Prepares data to generate race & ethnicity proxiesYou can find parameter descriptions in theZRP classand it'sparent class.>>> zrp_output = zest_race_predictor.transform(input_dataframe)zest_race_predictor.transform(df)What it does:Processes input data and generates ZRP proxy predictions.Attempts to predict on block group, then census tract, then zip code based on which level ACS data is found for. If Geo level data is unattainable, the BISG proxy is computed. No prediction returned if BISG cannot be computed either.Parametersdf : {DataFrame} Pandas dataframe containing input data (see below for necessary columns)Input data,df, into the prediction/modeling pipelineMUSTcontain the following columns: first name, middle name, last name, house number, street address (street name), city, state, zip code, and zest key. Consult ourcommon issues guideto ensure your input data is the correct format.Output: A dataframe with the following columns: AAPI AIAN BLACK HISPANIC WHITE source_block_group source_zip_code source_bisg :>>> zrp_output =========== =========== =========== =========== =========== =========== ===================== ====================== ================== AAPI AIAN BLACK HISPANIC WHITE source_block_group source_census_tract source_zip_code =========== =========== =========== =========== =========== =========== ===================== ====================== ================== ZEST_KEY 10 0.021916 0.021960 0.004889 0.012153 0.939082 1.0 0.0 0.0 100 0.009462 0.013033 0.003875 0.008469 0.965162 1.0 0.0 0.0 103 0.107332 0.000674 0.000584 0.021980 0.869429 1.0 0.0 0.0 106 0.177411 0.015208 0.003767 0.041668 0.761946 1.0 0.0 0.0 109 0.000541 0.000416 0.000376 0.000932 0.997736 1.0 0.0 0.0 ... ... ... ... ... ... ... ... ... 556 NaN NaN NaN NaN NaN 0.0 0.0 0.0 557 NaN NaN NaN NaN NaN 0.0 0.0 0.0 =========== =========== =========== =========== =========== =========== ===================== ====================== ==================One of the parameters to theparent classthat ZRP() inherits from isfile_path. This parameter allows you to specify where theartifacts/folder is outputted during the run of the ZRP. Once the run is complete, theartifacts/folder will contain the outputted race/ethnicity proxies and additional logs documenting the validity of input data.file_pathneed notbe specified. If it is not defined, theartifacts/folder will be placed in the same directory of the script running zrp. Subsequent runs will, however, overwrite the files inartifacts/; providing a unique directory path forfile_pathwill avoid this.ZRP BuildSummary of commands:>>> from zrp.modeling import ZRP_Build >>> zest_race_predictor_builder = ZRP_Build('/path/to/desired/output/directory') >>> zest_race_predictor_builder.fit() >>> zrp_build_output = zest_race_predictor_builder.transform(input_training_data)Breaking down key commands:>>> zest_race_predictor_builder = ZRP_Build('/path/to/desired/output/directory')ZRP_Build(file_path, zrp_model_name = 'zrp_0', zrp_model_source ='ct')What it does:Prepares the class that builds the new custom ZRP model.Parametersfile_path : {str} The path where pipeline, model, and supporting data are saved. zrp_model_name : {str} Name of zrp_model. zrp_model_source : {str} Indicates the source of zrp_modeling data to use.You can find more detailed parameter descriptions in theZRP_Build class. ZRP_Build() also inherits initlizing parameters from itsparent class.>>> zrp_build_output = zest_race_predictor_builder.transform(input_training_data)zest_race_predictor_builder.transform(df)What it does:Builds a new custom ZRP model trained off of user input data when supplied with standard ZRP requirements including name, address, and raceProduces a custom model-pipeline. The pipeline, model, and supporting data are saved automatically to "~/data/experiments/model_source/data/" in the support files path defined.The class assumes data is not broken into train and test sets, performs this split itself, and outputs predictions on the test set.Parametersdf : {DataFrame} Pandas dataframe containing input data (see below for necessary columns)Input data,df, into this pipelineMUSTcontain the following columns: first name, middle name, last name, house number, street address (street name), city, state, zip code, zest key, and race. Consult ourcommon issues guideto ensure your input data is the correct format.Output: A dictionary of race & ethnicity probablities and labels.As mentioned in the ZRP Predict section above, once the run is complete, theartifacts/folder will contain the outputted race/ethnicity proxies and additional logs documenting the validity of input data. Similarly, definingfile_pathneed notbe specified, but providing a unique directory path forfile_pathwill avoid overwriting the [artifacts/]{.title-ref} folder. When running ZRP Build, however,artifacts/also contains the processed test and train data, trained model, and pipeline.Additional Runs of Your Custom ModelAfter having run ZRP_Build() you can re-use your custom model just like you run the packaged model. All you must do is specify the path to the generated model and pipelines (this path is the same path as '/path/to/desired/output/directory' that you defined previously when running ZRP_Build() in the example above; we call this 'pipe_path'). Thus, you would run: :>>> from zrp import ZRP >>> zest_race_predictor = ZRP('pipe_path') >>> zest_race_predictor.fit() >>> zrp_output = zest_race_predictor.transform(input_dataframe)ValidationThe models included in this package were trained on publicly-available voter registration data and validated multiple times: on hold out sets of voter registration data and on a national sample of PPP loan forgiveness data. The results were consistent across tests: 20-30% more African Americans correctily identified as African American, and 60% fewer whites identified as people of color as compared with the status quo BISG method.To see our validation analysis with Alabama voter registration data, please check outthis notebook.Performance on the national PPP loan forgiveness dataset was as follows (comparing ZRP softmax with the BISG method):African AmericanStatisticBISGZRPPct. DiffTrue Positive Rate0.5710.700+23% (F)True Negative Rate0.9540.961+01% (F)False Positive Rate0.0460.039-15% (F)False Negative Rate0.4290.300-30% (F)Asian American and Pacific IslanderStatisticBISGZRPPct. DiffTrue Positive Rate0.6830.777+14% (F)True Negative Rate0.9820.977-01% (U)False Positive Rate0.0180.023-28% (F)False Negative Rate0.3170.223-30% (F)Non-White HispanicStatisticBISGZRPPct. DiffTrue Positive Rate0.5990.711+19% (F)True Negative Rate0.9790.973-01% (U)False Positive Rate0.0210.027-29% (F)False Negative Rate0.4010.289-28% (F)White, Non-HispanicStatisticBISGZRPPct. DiffTrue Positive Rate0.7580.906+19% (F)True Negative Rate0.7580.741-02% (U)False Positive Rate0.2420.259+07% (U)False Negative Rate0.2410.094-61% (F)AuthorsKasey Matthews(Zest AI Lead)Piotr Zak(Algomine)Austin Li(Harvard T4SG)Christien Williams(Schmidt Futures)Sean Kamkar(Zest AI)Jay Budzik(Zest AI)ContributingContributions are encouraged! For small bug fixes and minor improvements, feel free to just open a PR. For larger changes, please open an issue first so that other contributors can discuss your plan, avoid duplicated work, and ensure it aligns with the goals of the project. Be sure to also follow theCode of Conduct. Thanks!MaintainersMaintainers should additionally consult our documentation onreleasing. Follow the steps there to push new releases to Pypi and Github releases. With respect to Github releases, we provide new releases to ensure relevant pipelines and look up tables requisite for package download and use are consistently up to date.WishlistSupport for the following capabilities is planned:add multiracial classification output supportnational validation datasets and validation partnerspointers to additional training dataadd support for gender and other protected basesLicenseThe package is released under theApache-2.0 License.Results and FeedbackGenerate interesting results with the tool and want to share it or other interesting feedback? Get in touch [email protected].
zrpc
UNKNOWN
zrq-pkg
-- coding: gbk --zrq-pkg-0.0.1 helloworld demo zrq_pkg-0.0.2 forward backward viterbi zrq-pkg-0.0.3
zr.scalapb.pants
No description available on PyPI.
zrtool
zrtoolzrtool is a little cli tool that let you do some actions on a ZoomR16 project. For now, you can backup a project in a compressed format, and extract any data you need from it. You can also get the original uncompressed project if you want to restore a backuped project into you ZoomR16 device.Installationzrtool need a proper installation offlac(https://www.xiph.org/flac/) to work. The flac encoder and decoder is available on most platform, e.g.apt install flacfor debian based OS.zrtool will try to use theflaccommand line. If theflacbinary is not accessible from your PATH, it can be specified with theZRTOOL_FLAC_BINenvironnement.The recommended way to install zrtool is by usingpipx:pipxinstallzrtoolIf you don't want to installpipxto manage python cli tools installation, zrtool can also be installed with pip:pipinstallzrtoolUsage exampleAll this options are not yet available. They will be included in version 1.0.0. To see what's already implemented refer to the CHANGES document.Backup a project under the zrpa format.$zrtoolarchive[--compress|--no-compress]PRJ000/project-000.zrpaConvert back to the original format.$zrtoolexport[--numberN]project-000.zrpa[foo/]It will create a directoryPROJ000in the foo directory. If foo is not specified, createPROJ000in the current directory. Number is optional, if not given the number of the project is determined by the project that can be found in the target directory. If specified this number is used to define the name of the project directory.SearchSearch based on metadata.$zrtoolfilter\[--not]\--zprop"name""Test"\--zprop-track"fader"801\--tag"title"".*song"\--tag-file"title"".*song""MONO-000"\[--recursive]\[directory/...]path/to/archive.zrpa path/to/other-archive.zrpaReturn the path of zrpa archive that match at least one of the given tag or zprop. It get archive from directory if given, else it reads path from stdin. Filter can be piped to each other to perform "and" filter and more complex search.MetadataShow metadata of a zrpa archive.$zrtooltagsproject-000.zrpa title:Songtitle author:Bandname date:2020-02-29MONO-000.WAV:author:Someoneinstrument:Guitarcomment:RecordedwithsimplemicrophoneMASTR000.WAV:comment:Firstmixdone.Needstobeimproved $zrtooltags--projectproject-000.zrpa title:Songtitle author:Bandname date:2020-02-29 $zrtooltags--fileMONO-000.WAVproject-000.zrpa MONO-000.WAV:author:Someoneinstrument:Guitarcomment:Recordedwithsimplemicrophone $zrtooltags--project--keytitleproject-000.zrpa Songtitle $zrtooltags--fileMONO-000.WAV--keyinstrumentproject-000.zrpa guitarAdd a new key and value to a project.$zrtooltag[--update]--key-valueTake0project-000.zrpa $zrtooltag[--update]--key-valueAuthorSomeone--fileMONO-000project-000.zrpaEdit an existing metadata of a project.$zrtooltag--keyTitleproject-000.zrpa $zrtooltag--keyInstrument--fileMONO-000project-000.zrpa $zrtoolproject-000.zrpametadatarename-keyAuthorArtistRename an existing key.$zrtooltag--rename-keyAuthorArtistproject-000.zrpa $zrtooltag--rename-keyAuthorArtist--fileMONO-000project-000.zrpaDelete an existing tag.$zrtoolrmtag--keyTitleproject-000.zrpa $zrtoolrmtag--keyTitle--fileMONO-000project-000.zrpaFilesList archive content.$zrtoolfilesproject-000.zrpa AUDIO/ AUDIO/MASTR000.WAV AUDIO/MONO-000.WAV AUDIO/MONO-001.WAV AUDIO/MONO-002.WAV AUDIO/MONO-003.WAV AUDIO/MONO-004.WAV AUDIO/MONO-005.WAV EFXDATA.ZDT metadata.json PRJDATA.ZDT $zrtoolfilesproject-000.zrpaAUDIO AUDIO/ AUDIO/MASTR000.WAV AUDIO/MONO-000.WAV AUDIO/MONO-001.WAV AUDIO/MONO-002.WAV AUDIO/MONO-003.WAV AUDIO/MONO-004.WAV AUDIO/MONO-005.WAV $zrtoolfilesproject-000.zrpaAUDIO/* AUDIO/MASTR000.WAV AUDIO/MONO-000.WAV AUDIO/MONO-001.WAV AUDIO/MONO-002.WAV AUDIO/MONO-003.WAV AUDIO/MONO-004.WAV AUDIO/MONO-005.WAV $zrtoolfilesproject-000.zrpaAUDIO/**.ZDT AUDIO/MASTR000.WAV AUDIO/MONO-000.WAV AUDIO/MONO-001.WAV AUDIO/MONO-002.WAV AUDIO/MONO-003.WAV AUDIO/MONO-004.WAV AUDIO/MONO-005.WAV EFXDATA.ZDT PRJDATA.ZDTExtract a file from an archive.$zrtoolextract[--directoryfoo/]project-000.zrpaAUDIO/**.ZDTExtractaudiofiles from an archive.$zrtoolget\--format{flac|vorbis|mp3|wav}\[--directoryfoo/][--name'${title} - ${author}.ogg']\project-000.zrpaMASTR000...Add audio file to an archive. File are added to the root of the archive, except audio file that are added to the audio directory. If--dest DESToption is given,DESTis created in the archive starting from the root and files are added in this directory. It prevent from overwriting metadata file with a non-conform metadata file.$zrtoolfile[--update][--destAUDIO]project-000.zrpamusic.wav $zrtoolfile[--update]project-000.zrpanote.txtRemove a file from an archive. Some integrity checks needs to be done.$zrtoolrmfileproject-000.zrpaAUDIO/MONO-000.WAV...Project dataRead project data in thePRJDATA.ZDTfile.$zrtoolzpropsproject-000.zrpa name:PROJ000 ... $zrtoolzprops--track1project-000.zrpa file:MONO-000.WAV fader:80... $zrtoolzprops--keynameproject-000.zrpa PROJ000Edit project data.$zrtoolzprop--key-valuename"MYPROJ"project-000.zrpa $zrtoolzprop--key-valuefileMASTR000.WAV--track1project-000.zrpa $zrtoolzprop--keyFile--track1project-000.zrpa
zrxp
ZRXP LibLibrary to read and write ZRXP Files.Written in Rust with a Python APIRunInside your Python Environment runpip install zrxpThen you can start Pythonpython>>fromzrxpimportread,write,writes>>data=zrxp.read("test.zrxp")# Pandas or Polars DataFrame>>data=pd.DataFrame(...)>>metadata={...}# writes to string>>string_zrxp=zrxp.writes(data,metadata)# writes to file>>zrxp.write("write.zrxp",data,metadata)
zrydemo
123
zry-demo
123
zrytestpdf
this is a homepage of our project
zs
ZS is a simple, read-only, binary file format designed for distributing, querying, and archiving arbitrarily large record-oriented datasets (up to tens of terabytes and beyond). It allows the data to be stored in compressed form, while still supporting very fast queries for either specific entries, or for all entries in a specified range of values (e.g., prefix searches), and allows highly-CPU-parallel decompression. It also places an emphasis on data integrity – all data is protected by 64-bit CRC checksums – and on discoverability – every ZS file includes arbitrarily detailed structured metadata stored directly inside it.Basically you can think of ZS as a turbo-charged replacement for storing data in line-based text file formats. It was originally developed to provide a better way to work with the massiveGoogle N-grams, but is potentially useful for data sets of any size.Documentation:http://zs.readthedocs.org/Installation:You need either Python2.7, or else Python3.3 or greater.Becausezsincludes a C extension, you’ll also need a C compiler and Python headers. On Ubuntu or Debian, for example, you get these with:sudo apt-get install build-essential python-devOnce you have the ability to build C extensions, then on Python 3 you should be able to just run:pip install zsOn Python 2.7, things are slightly more complicated: here,zsrequires thebackports.lzmapackage, which in turn requires the liblzma library. On Ubuntu or Debian, for example, something like this should work:sudo apt-get install liblzma-dev pip install backports.lzma pip install zszsalso requires the following packages:six,docopt,requests. However, these are all pure-Python packages which pip will install for you automatically when you runpip install zs.Downloads:http://pypi.python.org/pypi/zs/Code and bug tracker:https://github.com/njsmith/zsContact:Nathaniel J. Smith <[email protected]>Developer dependencies (only needed for hacking on source):Cython: needed to build from checkoutnose: needed to run testsnose-cov: because we use multiprocessing, we need this package to get useful test coverage informationnginx: needed to run HTTP testsLicense:2-clause BSD, see LICENSE.txt for details.
zs23_menu_fetch
No description available on PyPI.
zs2decode
zs2decode is a Python (2.7, 3.3, 3.4, 3.5, 3.6) implementation of a decoder for Zwickzs2files.zs2files contain measurements and meta data. zs2decode is able to parse these files. It contains support functions to output the result as text file or XML for further processing. The following script converts azs2file into XML:import zs2decode.parser import zs2decode.util zs2_file_name = 'my_data_file.zs2' xml_output_file = 'my_data_file.xml' # load and decompress file data_stream = zs2decode.parser.load(zs2_file_name) # separate binary data stream into chunks raw_chunks = zs2decode.parser.data_stream_to_chunks(data_stream) # convert binary chunk data into lists of Python objects chunks = zs2decode.parser.parse_chunks(raw_chunks) # output as text file with open(xml_dump_file, 'wb') as f: f.write( zs2decode.util.chunks_to_XML(chunks) )An example script to extract measurement time series from the XML is provided in theexamplesfolder.Documentation is available athttp://zs2decode.readthedocs.org/and source code athttps://github.com/cpetrich/zs2decode.git.
zs-amazon-buddy
amazon_buddyDescriptionAmazon scraper.Installpipinstallamazon_buddy# orpip3installamazon_buddyUsageimportjsonfromamazon_buddyimportAmazonBuddy,Category,SortTypeproducts=AmazonBuddy.search_products('face wash',sort_type=SortType.PRICE_HIGH_TO_LOW,min_price=0,category=Category.BEAUTY_AND_PERSONAL_CARE,max_results=1000,debug=True)print(products)reviews=AmazonBuddy.get_reviews(asin='B0758GYJK2')print(reviews)
zs-amazon-scraper
No description available on PyPI.
zs.bibtex
This package for now only includes a quite basic parser for BibTeX which converts a bibliography and its entries into simple dict-like data structures and also checks crossreferences if used.WarningThe parser does not (and probably never will) support some of the more advanced BibTeX-features like preambles.It also doesn’t convert things like accented characters into unicode but leaves them as they were in the original input.UsageA simple example on how to use it:from zs.bibtex.parser import parse_string data = '''@article{mm09, author = {Max Mustermann}, title = {The story of my life}, year = {2009}, journal = {Life Journale} }''' bibliography = parse_string(data) article = bibliography['mm09']A bibliography as well as each entry in it offers avalidate()method which checks aspects like cross-references on the bibliography and fields on the entries. It also supports an optionalraise_unsupportedkeyword-argument which raises an exception once a possibly unsupported field is used in an entry.The information about what fields are required and optional for what kind of entry is based on theBibTeX articleon Wikipedia.If you’re working with a file you can also use a small helper function calledparse_file(file_or_path,encoding='utf-8',validate=False)which works on a given filepath or file-like object and returns a bibliography object for the content of that file.Custom entry typesOut of the box zs.bibtex supports following entry types for validation:articlebookbookletincollectioninproceedingsconferenceinbookmanualmasterthesismiscphdthesisproceedingstechreportunpublishedFor details on which of these requires what fields please take a look at thezs.bibtex.structuresmodule.But if you are in a situation where you need a different entry type, you can also easily register your own.First you have to create a subclass of thezs.bibtex.structures.Entryclass:from zs.bibtex import structures class MyEntryType(structures.Entry): required_fields = ('required_field_1', ('either_this', 'or_that', ), ) optional_fields = ('optional_field_1', )and then simply register it:structures.TypeRegistry.register('mytype', MyEntryType')
zscaler
No description available on PyPI.
zscaler-api-talkers
Unofficial Zscaler API talkersAPI TalkersZIA API TalkerPython classes to leverageZscaler Internet Access APIZPA API TalkerPython classes to leverageZscaler Private Access APIClient Connector API TalkerA Python class to leverage Zscaler Client Connector API. (Currently in Beta status.)The Client Connector API talker is accessed via the Class object named:ClientConnectorTalkerZDX API TalkerA Python class to leverage Zscaler Digital Experience API. (Currently in development.)This class interacts with ZDX via the URLs presented in the Portal (aka, the ZDX configuration website). It is named:ZdxPortalTalkerCloud and Branch Connector API TalkerA Python class to leverage Cloud and Branch Connector API. (Currently in development.)This class interacts with the Cloud and Branch Connector Portal. The class object is namedCloudConnectorTalker(https://help.zscaler.com/cloud-branch-connector/about-zscaler-cloud-branch-connector-api)InstallationOption 1: Run in a Python Virtual EnvironmentCreate a virtual Environment:python3 -m venv .zs_api_talkersActivate virtual environment:Linux:source .zs_api_talkers/bin/activateWindows:.\.zs_api_talkers\Scripts\activateInstall Zscaler API talkers:pip install zscaler-api-talkersOption 2: Run within a Docker ContainerWe provide two methods to build a Docker container. Either using the code hosted on GitHub or the code published to PyPi.PyPi MethodDownload DockerfileLinux:curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/DockerfileWindows:wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/DockerfileBuild Image and Run Containerdocker build -t zscaler_api_talkers .docker run -it zscaler_api_talkers bashUsage (program is in /zscaler_api_talkers/)cd zscaler_api_talkersGitHub MethodDownload DockerfileLinux:curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.DockerfileWindows:wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.DockerfileBuild Image and Run Containerdocker build -f git_version.Dockerfile -t zscaler_api_talkers .docker run -it zscaler_api_talkers bashUsage (program is in /zscaler_api_talkers/)cd zscaler_api_talkersZscaler Secure Internet and SaaS Access SDKUsage ZiaTalkerfromzscaler_api_talkersimportZiaTalkerzia=ZiaTalker('<Zscaler Cloud Name>')zia.authenticate(apikey='API_KEY',username='USERNAME',password='PASSWORD')zia.list_urlcategories()zia.list_users()# To view all methods availableprint(dir(zia))Usage ZiaTalker with OAUTH2.0fromzscaler_api_talkersimportZiaTalkera=ZiaTalker('<Zscaler Cloud Name>','<Bear oauth2.0 token>')a.list_url_categorie.url_categories()a.list_users()# To view all methods availableprint(dir(a))Zscaler Secure Private Access SDKUsage ZpaTalkerfromzscaler_api_talkersimportZpaTalkera=ZpaTalker('customerID')a.authenticate(client_id='clientID',client_secret='clientSecret')# To view all methods availableprint(dir(a))Zscaler Client Connector SDKUsage ClientConnectorTalkerfromzscaler_api_talkersimportClientConnectorTalkera=ClientConnectorTalker('<Zscaler Cloud Name>')a.authenticate(clientid='clientID',secretkey='clientSecret')a.list_devices('companyID')a.list_OTP('companyID','user device id')# To view all methods availableprint(dir(a))Zscaler Cloud & Branch Connector SDKUsage CloudConnectorTalkerfromzscaler_api_talkersimportCloudConnectorTalkerbac=CloudConnectorTalker(cloud_name='<ZScaler Cloud Name>',api_key='API_KEY',username='USERNAME',password='PASSWORD')bac.list_cloud_branch_connector_groups()bac.delete_cloud_branch_connector_vm(group_id='GROUPID',vm_id='VMID')print(dir(bac))Usage exampleshttps://github.com/sergitopereira/zscaler_api_talkers#usage-examplehttps://github.com/sergitopereira/zscaler_api_talkers/blob/main/example.pyBugs and enhancementsFeel free to open an issues usingGitHub IssuesAuthorSergio Pereira: Zscaler Professional Services
zscaler-python-sdk
Zscaler Python SDKThis is a Python SDK for Zscaler Internet Access. This client library is designed to support the Zscaler Internet Access (ZIA) API. Now This library does not support Zscaler Private Access (ZPA), but this will be implemented in the future. This SDK has been developed mainly using Python 3.9.0 .NOTE: This repository is not official. Zscaler does not support this repository.PreparationYou need a ZIA credentials like below.ZIA Admin Username ([email protected])ZIA Admin PasswordZIA Hostname (likezscaler.net)ZIA APIKEY (You need to request an api key to Zscaler support team.)Set profileIf you have verified your credentials, set up your credentials to use this repository. Please replace/Users/utah18to your arbitrary directory path.$ mkdir /Users/utah18/.zscaler && cat > /Users/utah18/.zscaler/config.ini <<EOF [zia] [email protected] PASSWORD=P@ssw0rd HOSTNAME=zscaler.net APIKEY=xxxxxxxxxxxxxxxxxxxxxxx EOFClone and Install RepositoryIn this case, we usepoetry. If you don't have this, please install poetry fromHERE$ poetry add zscaler-python-sdkQuick StartAfter installing, you can try below to check if you could use this library.$ python $ from zscaler_python_sdk.zia import Zia $ zia = Zia("/Users/utah18/.zscaler/config.ini") $print(zia.fetch_admin_users())... Reporting Issues If you have bugs or other issues specifically pertaining to this library, file them here.Referenceshttps://help.zscaler.com/zia/apihttps://help.zscaler.com/zia/zscaler-api-developer-guidehttps://help.zscaler.com/zia/sd-wan-api-integration
zscalertools
Zscaler ToolsPython Library used for interacting with Zscaler's public APIGeneral InformationThis Python Library is being devloped to provide an easily usable interface with Zscaler API.https://help.zscaler.com/zia/apiZscaler API Functions in this LibraryZIAActivationAdmin Audit LogsAdmin & Role ManagementAPI AuthenticationCloud Sandbox ReportFirewall PoliciesLocation ManagementSecurity Policy SettingsSSL Inspection SettingsTraffic ForwardingUser ManagementURL CategoriesURL Filtering PoliciesUser Authentication SettingsZPAAPI not released by ZscalerFeaturesManage Request Sessions to Zscaler APIYou do not need to explicitly call the login() functionManage Auto-Retry (3 retries per call)Manage 429 API Rate Limit ReponseLibrary will read response and wait for Rate Limit before continuingHow to install:pip install zscalertoolsHow to use:import zscalertools ztools_zia_api = zscalertools.zia('admin.zscalerbeta.net', '[email protected]', 'password', 'Apikey') ztools_zia_api.get_users()Attributescloud : str a string containing the zscaler cloud to use username : str the username of the account to connect to the zscaler cloud password : str the password for the username string apikey : str apikey needed to connect to zscaler cloudZscaler MethodsAPI Authentication ------------------ login() Attempts to create a web session to Zscaler API logout() Delete's existing web session to Zscaler API Activation ---------- get_status() Gets the activation status for a configuration change activate_status() Activates configuration changes User Management --------------- get_users(name=None, dept=None, group=None, page=None, pageSize=None) Gets a list of all users and allows user filtering by name, department, or group get_user(id) Gets the user information for the specified ID get_groups(search=None, page=None, pageSize=None) Gets a list of groups get_group(id) Gets the group for the specified ID get_departments(search=None, name=None, page=None, pageSize=None) Gets a list of departments get_department(id) Gets the department for the specified ID add_user(user_object) Adds a new user update_user(id, user_object) Updates the user information for the specified ID delete_user(id) Deletes the user for the specified ID bulk_delete_users(ids=[]) Bulk delete users up to a maximum of 500 users per request Location Management ------------------- get_locations(search=None, sslScanEnabled=None, xffEnabled=None, authRequired=None, bwEnforced=None, page=None, pageSize=None) Gets information on locations get_location(id) Gets the location information for the specified ID get_sublocations(id, search=None, sslScanEnabled=None, xffEnabled=None, authRequired=None, bwEnforced=None, page=None, pageSize=None, enforceAup=None, enableFirewall=None) Gets the sub-location information for the location with the specified ID. These are the sub-locations associated to the parent location add_location(location_object) Adds new locations and sub-locations get_locations_lite(includeSubLocations=None, includeParentLocations=None, sslScanEnabled=None, search=None, page=None, pageSize=None) Gets a name and ID dictionary of locations update_location(id, location_object) Updates the location and sub-location information for the specified ID delete_location(id) Deletes the location or sub-location for the specified ID buld_delete_locations(ids=[]) Bulk delete locations up to a maximum of 100 users per request. The response returns the location IDs that were successfully deleted.Custom Methodspull_all_user_data() Pulls all users, departments and groups and returns 3 arrays (up to 999,999 entries a piece)ContributingPull requests are welcome. Initial development is focused on building out the rest of the library.Please make sure to update tests as appropriate.
zschema
No description available on PyPI.
zscli
===== zscliZeroSSL API CLI ToolFree software: MIT licenseDocumentation:https://zscli.readthedocs.io.CreditsThis package was created with Cookiecutter andrstms/cookiecutter-python-cli, a fork of theaudreyr/cookiecutter-pypackageproject template.audreyr/cookiecutteraudreyr/cookiecutter-pypackagerstms/cookiecutter-python-cli
zscore
No description available on PyPI.
zscTest
# zscTest pipy test
zsdk
Zscaler SDK (zsdk)The Zscaler SDK (zsdk) is a Python library designed to provide an easy and programmatic way to interact with publicly available Zscaler API endpoints. With zsdk, developers can manage and automate tasks across Zscaler's suite of security services, including Zscaler Internet Access (ZIA), Zscaler Private Access (ZPA), and Zscaler Digital Experience (ZDX).FeaturesComprehensive coverage of Zscaler's public API.Easy-to-use Pythonic interfaces.Examples and guides to get started quickly.Easy to use Docker files to build container with zsdk pre-installed.InstallationYou can install zsdk via pip:pipinstallzsdkGetting StartedHere's a quick example to get you started with ZIA:fromzsdk.ziaimportZIAzscaler=ZIA(username='YOUR_USERNAME',password='YOUR_PASSWORD',api_key='YOUR_API_KEY',cloud_name="zscaler.net")print(zscaler.locations.list())See theexamplesdirectory for more comprehensive examples and thedocumentationfor detailed API reference.Using DockerSee theDocker instruction and discussiondocumentation. We provide instructions on how to load zsdk into a container using either this repos' version or the PyPi hosted version of zsdk. We also provide instructions on how to do so usingdockerordocker-composemethods.Support and ContributionsFor questions, issues, or contributions, please see theCONTRIBUTING.mdfile.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
zsearch
No description available on PyPI.
zsearch-definitions
No description available on PyPI.
zsedu
No description available on PyPI.
zseqfile
UNKNOWN
zser
A protobuf-inspired minimalistic serialization format with cryptographic authentication
zserio
Zserio PyPi package contains Zserio compiler and Zserio Python runtime. Zserio is serialization framework available atGitHub.InstallationTo install Zserio compiler together with Zserio Python runtime, just runpip install zserioUsage from command lineConsider the following zserio schema which is stored to the sourceappl.zs:package appl; struct TestStructure { int32 value; };To compile the schema by compiler and generate Python sources to the directorygen, you can run Zserio compiler directly from command line by the following command:zserio appl.zs -python genThen, if you run the python by the commandPYTHONPATH="gen" pythonyou will be able to use the generated Python sources by the following python commandsimportappl.apiasapitest_structure=api.TestStructure()Usage from PythonConsider the following zserio schema which is stored to the sourceappl.zs:package appl; struct TestStructure { int32 value; };To compile the schema by compiler and generate Python sources to the directorygen, you can run the following python commands:importzserioapi=zserio.generate("appl.zs",gen_dir="gen")test_structure=api.TestStructure()For convenience, the methodgeneratereturns imported API for generated top level package.Alternatively, you can run zserio compiler directly by the following python commands:importsysimportimportlibimportzseriocompleted_process=zserio.run_compiler(["appl.zs","-python","gen"])ifcompleted_process.returncode==0:sys.path.append("gen")api=importlib.import_module("appl.api")test_structure=api.TestStructure()
zservices
Dependencies: coming soon
zsession
Lightweight implementation of zcreds providing advanced session tokens
zs-face-detection
from zs_face_detection import get_face_positionface_position = get_face_position(image_bgr)
zsfile
zsfilezstandard compress and decompress tool.Installpip3 install zsfileCommand Usagetest@test Downloads % zsf --help Usage: zsf [OPTIONS] INPUT Zstandard compress and decompress tool. Options: -d, --decompress force decompression. default to false. -o, --output TEXT Output filename. --help Show this message and exit.Examplestest@test test01 % ls mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst test@test test01 % zsf -d mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst decompressing file mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst to mingw-w64-x86_64-file-5.39-2-any.pkg.tar... test@test test01 % ls mingw-w64-x86_64-file-5.39-2-any.pkg.tar mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst test@test test01 % file mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst mingw-w64-x86_64-file-5.39-2-any.pkg.tar.zst: Zstandard compressed data (v0.8+), Dictionary ID: None test@test test01 % file mingw-w64-x86_64-file-5.39-2-any.pkg.tar mingw-w64-x86_64-file-5.39-2-any.pkg.tar: POSIX tar archive test@test test01 %Releasesv0.1.0First release.
zsft.recipe.cmd
ContentsUsageExamplesDifference from other recipesChange history0.4 (2017-06-21)0.3.1 (2017-06-21)0.3 (2017-06-21)0.2 (2017-06-20)0.1 (2017-06-20)This recipe allows you to run arbitrary shell and python scripts from buildout. It’s inspired by similar recipes but has few added features.Repository:https://github.com/zartsoft/zsft.recipe.cmdTo clone:git clone https://github.com/zartsoft/zsft.recipe.cmdIssue tracker:https://github.com/zartsoft/zsft.recipe.cmd/issuesSupported Python versions: 2.7, 3.3+Supported zc.buildout versions: 1.x, 2.x.UsageinstallCommands to execute on install phase.updateCommands to execute on update phase.shellShell to run script with. If not set uses default system shell. Special valueinternalmeans executing as python code from buildout.install-shellCan override shell for install phase.update-shellCan override shell for update phase.shell-optionsAdditional switch to shell, like-Filefor PowerShell,-ffor Awk, etc.install-shell-optionsCan override shell options for install phase.update-shell-optionsCan override shell options for update phase.envList of KEY=VALUE pairs to set environment variables.Examples[cmmi]recipe=zsft.recipe.cmdinstall=./configure --prefix=${buildout:parts-directory}/optmakemake installenv=CFLAGS=-g -Wall -O2LDFLAGS=-lmLD_RUN_PATH=$ORIGIN/../lib[pythonscript]recipe=zsft.recipe.cmdshell=internalinstall=os.chdir('${buildout:parts-directory}')if not os.path.exists('opt'):os.makedirs('opt')os.chdir('opt')check_call(['./config ; make'], shell=True)[msbuild:windows]recipe=zsft.recipe.cmdconfiguration=Releaseplatform=Win32install=msbuild.exe /t:Build /p:Configuration=${:configuration} /p:Platform=${:platform}[service-restart:windows]recipe=zsft.recipe.cmdshell=powershell.exeshell-options=-Fileservice=fooupdate=$service="${:service}"Write-Host -ForegroundColor Yellow "Restarting service '$service'"Restart-Service -Verbose $serviceDifference from other recipesUnlike other similar recipes this one allows you to specify custom shell on Windows and environment variables.iw.recipe.cmdDoes not allow you to have different scripts for install and update. Specifying shell is POSIX only.collective.recipe.cmdSame limitations as iniw.recipe.cmd. Hasuninstall_cmdsand python mode.plone.recipe.commandHasstop-on-erroroption and allows different scripts for install/update. Does not seem to allow multiline commands or custom shells.Change history0.4 (2017-06-21)Fix environment parserFix conditional section syntax in exampleCleanup logging0.3.1 (2017-06-21)Fix shell options when no shell is passed.0.3 (2017-06-21)Run shell explicitly. Fixes running on POSIX.0.2 (2017-06-20)Fix for re-running install script.0.1 (2017-06-20)Initial release.
zsh1ForTest
UNKNOWN
zsh2xonsh
zsh2xonshHave you heard ofxonsh? It's a Python-powered shell.You can do amazing things like this:# Interpolate python -> shell echo @(i for i in range(42)) # Interpolate shell -> python for filename in `.*`: print(filename) du -sh @(filename) # Execute regular shell commands too cat /etc/passwd | grep rootAs you can immagine, this awesomeness is not POSIX-compliant :(This makes it difficult to setup your$PATHand do things likeeval $(brew shellenv)This package exists to translate traditionalzshscripts intoxonshcode.Compatibility (and how it works)The goal is 100% compatibility for asubsetof shell.Compatibility is achived by delegating most of the work to zsh.That is,export FOO="$(echo bar)"in a shell script becomes (essentially)$FOO=$(zsh -c 'echo bar')in xonsh.We havezshhandle all the globbing/quoting/bizzare POSIX quirks.In the face of ambiguity, or if we encounter an unsupported feature (like aforloop), then we fail-fast.This is the most important feature. If something can't be supported 100%, then it will throw a descriptive error. Anything else is a bug :)FeaturesThe included shell features include:Quoted expressions"$VAR glob/*"(zsh does expansion here)Unquoted literals12,foo~/foo(mostly translated directly)Command substitutions "$(cat file.txt | grep bar)"zsh does all the work hereSupports both quoted and unquoted formsIf/then statementsConditionals are executed by zsh (so[[ -d "foo" ]]works perfectly)Translated into python if (so body will not run unless conditional passes)Exporting variablesexport FOO=$BARTranslates$PATHcorrectly (xonsh thinks it's a list, zsh thinks it's a string)This is where the subprocess approach doesn't work blindly....We support it cleanly by doing the left-hand assignment xonsh, and the right-hand expression inzsh:)Local variables (local var=x) are supported too :)All of these behaviors are 100% compatible with their zsh equivalents. If you try anything else (or encounter an unsupported corner case), then you will get a descripitive error :)Installation & UsageThis is a pypi package, install it withpip install zsh2xonsh.The API is simple, runtranslate_to_xonsh(str) -> strto translate fromzsh->xonshcode. This does not require xonsh at runtime, and can be done ahead of time.If you want to evaluate the code immediately after translating it (for example in a.xonshrc), you can use . This requires xonsh at runtime (obviously) and uses theevalxbuiltin.Additionally you can use the CLI (python -m zsh2xonsh), which accepts an import.If you want to provide extra utility functions to your code, you can defineextra_builtins.ExampleIn my.xonshrc, I dynamically translate and evaluate the output ofbrew shellenv:zsh2xonsh.translate_to_xonsh_and_eval($(/opt/homebrew/bin/brew shellenv))MotiviationFirst of all, I need support foreval $(brew shellenv).Second of all, I still usezshas my backup shell.This means I need to setup$PATHand other enviornment variables for both of these shells.The natural way to set these up is by using shell scripts. I have a seperate one for each of my different machines (server, macbook, old lapotop, etc)For each of these (tiny) shell scripts,zsh2xonshworks very well :)So in addition to properly translating$(brew shellenv), it also needs to translate basic shell "environement files".
zsharp
No description available on PyPI.
zsh-compose
No description available on PyPI.
zsh-directory-history
https://github.com/tymm/directory-history
zshell
shell自动化模块参数说明参数名数据类型默认值描述更新日志发布时间发布版本发布说明19-03-060.1.0发布第一版, 暂时不支持集群简单实例fromzshell.terminalimportterminala=terminal('host',22,'user','password')a.run('ll')a.close()本项目仅供所有人学习交流使用, 禁止用于商业用途
zs_hello
No description available on PyPI.
zshgpt
zshgptTable of ContentsAboutInstallationAdding pluginLogoLicenseAboutHeavily inspired by the abandoned projecthttps://github.com/microsoft/Codex-CLIMade into a oh-my-zsh plugin.In your zsh console, type a question, starting with comment sign#, hitctrl+gand get an answer.# Who edited README.MD last according to git history?ChatGPT will then answer with e.g.:gitlog-1--format="%an"README.mdHitenterto execute orctrl+cto deny.If asked a question that will not resolve in a command, GPT is instructed to use#.# Who was Norways first prime minister?# Norway's first prime minister was Frederik Stang, serving from 1873 to 1880.PrerequisiteInstalling zshgptFirst install zshgpt application, thenadd the plugin.Prerequisite⚠️ Valid Openai API-key ⚠️make sure to save underOPENAI_API_KEYenv.export OPENAI_API_KEY='sk-...'With snapSnap comes preinstalled and is probalby the fastest way if you are on Linux and do not want to use pipx.PrerequisitesnapsudosnapinstallzshgptInstructions if you don't have snap.With pipxPrerequisitepython >= 3.8pipxpipxinstallzshgptWIth pipPrerequisitepython >= 3.8pippipinstallzshgptWith homebrewThis is not yet automated and you might get an older version.PrerequisiteHomebrewbrewinstallAndersSteenNilsen/zshgpt/zshgptAdding pluginWith Zshcurlhttps://raw.githubusercontent.com/AndersSteenNilsen/zshgpt/main/zshgpt.plugin.zsh-o~# Copy pluginecho"source ~/zshgpt.plugin.zsh">>~/.zshrc# Add to zshrcexeczsh# Reload zshWith Oh My ZshPrerequisiteOh My Zshmkdir$ZSH_CUSTOM/plugins/zshgpt curlhttps://raw.githubusercontent.com/AndersSteenNilsen/zshgpt/main/zsh_plugin.zsh-o$ZSH_CUSTOM/plugins/zshgpt/zshgpt.plugin.zshThen add zshgpt in your list of plugins in~/.zshrcplugins( ... zshgpt ... )omzreloadWith zplug~/.zshrc... zplug "AndersSteenNilsen/zshgpt" zplug loadLOGOMade with DALL-ELicensezshgptis distributed under the terms of theMITlicense.
zsh-history-to-fish
Bring your ZSH history to Fish shellThis is a simple tool to ease the migration from ZSH to Fish shell, without losing your hard-earned history commands.As I was migrating myself, I've found out there's no tool to do this automatically, so I've made one for my own use. For that, I had to search for the specifications of both history files, and ended up involved in multiple threads with the right devs to try to understand and make it work. In the process, I've stumbled upon several people interested in a such a tool.Well, it has worked! So I've wrapped it in a python package to make it easy to use, and now I'm sharing with anyone who may need it! It's released on PyPI.Get itJust do in your zsh shell:❯pipinstallzsh-history-to-fishHow to use❯zsh-history-to-fish--help Usage:zsh-history-to-fish[OPTIONS][INPUT_FILE]BringyourZSHhistorytoFishshell. Options:--versionShowtheversionandexit.-o,--output_filePATHOptionaloutput,willappendtofishhistorybydefault-d,--dry-runDonotwriteanythingtofilesystem-n,--no-convertDonotnaivelyconvertcommands--helpShowthismessageandexit.A successful run looks like:❯zsh-history-to-fish-dn ZSHhistorytoFish===================input:/Users/rogerio/.zsh_history(naive-convert=False)output:dryrunmode ....... Processed6515commands. Nofilehasbeenwritten.Changelog highlights:0.3.0: fix for empty history lines, and general command output improvements0.2.0: use actualzshprocess to import history, since it does not use utf-80.1.0: initial versionLicenseThis software is licensed under the MIT License. See the LICENSE file in the top distribution directory for the full license text.Did you like it?Thank you for your interest!I've put much ❤️ and effort into this.If you appreciate my work you can sponsor me, buy me a coffee! The button is on the top right of the page (the big orange one, it's hard to miss 😊)
zsh-jupyter-kernel
zsh kernel for jupytera simple z shell jupyter kernel powered by python 3, pexpect and enthusiasm.i love experimentation and tinkering, but usual shell terminals does not allow developing multiple different code snippets at once conveniently. with shell kernels you can turn your scripts into notebooks!if you find this product useful, please consider supporting me with a one-time tip.installationinstall the python package frompypi.install the jupyter kernel spec using python scriptinstallin thezsh_jupyter_kernelmodule. checkpython -m zsh_jupyter_kernel.install -hfor possible installation options. default installation will install the kernel in the user location. use--sys-prefixoption if you want to install the kernel in your current virtual environment.see some common installation examples below.pipenvpipenv--python3.10installnotebookzsh_jupyter_kernel pipenvrunpython-mzsh_jupyter_kernel.install--sys-prefixpippython-mpipinstallnotebookzsh_jupyter_kernel python-mzsh_jupyter_kernel.install--sys-prefixtechnical overviewthe kernel launches zsh as if it was a regular process launched from your terminal with a few minor settings to make sure it works with jupyter. there is slight chance it wont work with super complicated zshrc setups, but it works with majority of configs including oh-my-zsh.how does code execution workthe kernel configures zsh prompt string to its own custom value. when a user requests a cell execution, the code is sent to the kernel. then the kernel puts the frontend on hold, sends the code to zsh process, and waits for the prompt string to release the frontend and let the user request more code execution.code completioncode completion is powered by quite a non-trivial script that involves multiple steps, including spawning another temporary zsh process and capturing completion options into a data structure that jupyter frontend understands.code inspectioncode inspection is done byman --pager ulwhich sends the whole man page to the frontend.code completenesscode completeness is checked with the temporary zsh process and help ofEXECzsh option, which allows switching off code execution and simply check if the code is complete using the exit code of the zsh process itself.stderrstderr content is just sent to the front-end as regular stdout.stdinstdin is not supported because of the execution system when a process spawned by a user waits for stdin, there is no way to detect it.missing featureshistoryrich html output for things like images and tablesstdin. might be possible with or without the current systempagers. might be possible or notstored and referenceable outputs
zsh-kernel
Z shell kernel for JupyterInstallinstall.shpipenv--python3.7 pipenvinstalljupyter pipenvinstall--editable. pipenvrunpython-mzsh_kernel.install--sys-prefixRunlab.shpipenvrunjupyternotebook
zshot
ZshotZero and Few shot named entity & relationships recognitionDocumentation:https://ibm.github.io/zshotSource Code:https://github.com/IBM/zshotZshot is a highly customisable framework for performing Zero and Few shot named entity recognition.Can be used to perform:Mentions extraction: Identify globally relevant mentions or mentions relevant for a given domainWikification: The task of linking textual mentions to entities in WikipediaZero and Few Shot named entity recognition: using language description perform NER to generalize to unseen domainsZero and Few Shot named relationship recognitionVisualization: Zero-shot NER and RE extractionRequirementsPython 3.6+spacy- Zshot rely onSpacyfor pipelining and visualizationtorch- PyTorch is required to run pytorch models.transformers- Required for pre-trained language models.evaluate- Required for evaluation.datasets- Required to evaluate over datasets (e.g.: OntoNotes).Optional Dependenciesflair- Required if you want to use Flair mentions extractor and for TARS linker.blink- Required if you want to use Blink for linking to Wikipedia pages.Installation$pipinstallzshot---> 100%ExamplesExampleNotebookInstallation and VisualizationZshot ApproachZShot contains two different components, thementions extractorand thelinker.Mentions ExtractorThementions extractorwill detect the possible entities (a.k.a. mentions), that will be then linked to a data source (e.g.: Wikidata) by thelinker.Currently, there are 4 differentmentions extractorssupported, 2 of them are based onSpaCy, and 2 of them are based onFlair. The two different versions for each library are similar, one is based on Named Entity Recognition and Classification (NERC) and the other one is based on the linguistics (i.e.: using Part Of the Speech tagging (PoS) and Dependency Parsing(DP)).The NERC approach will use NERC models to detect all the entities that have to be linked. This approach depends on the model that is being used, and the entities the model has been trained on, so depending on the use case and the target entities it may be not the best approach, as the entities may be not recognized by the NERC model and thus won't be linked.The linguistic approach relies on the idea that mentions will usually be a syntagma or a noun. Therefore, this approach detects nouns that are included in a syntagma and that act like objects, subjects, etc. This approach do not depend on the model (although the performance does), but a noun in a text should be always a noun, it doesn't depend on the dataset the model has been trained on.LinkerThelinkerwill link the detected entities to a existing set of labels. Some of thelinkers, however, areend-to-end, i.e. they don't need thementions extractor, as they detect and link the entities at the same time.Again, there are 4linkersavailable currently, 2 of them areend-to-endand 2 are not. Let's start with those thar are notend-to-end:Linker Nameend-to-endSource CodePaperBlinkXSource CodePaperGENREXSource CodePaperSMXM✓Source CodePaperTARS✓Source CodePaperExample: Zero-Shot Entity RecognitionHow to use itInstall requirements:pip install -r requirements.txtInstall a spacy pipeline to use it for mentions extraction:python -m spacy download en_core_web_smCreate a filemain.pywith the pipeline configuration and entities definition (Wikipedia abstract are usually a good starting point for descriptions):importspacyfromzshotimportPipelineConfig,displacyfromzshot.linkerimportLinkerRegenfromzshot.mentions_extractorimportMentionsExtractorSpacyfromzshot.utils.data_modelsimportEntitynlp=spacy.load("en_core_web_sm")nlp_config=PipelineConfig(mentions_extractor=MentionsExtractorSpacy(),linker=LinkerRegen(),entities=[Entity(name="Paris",description="Paris is located in northern central France, in a north-bending arc of the river Seine"),Entity(name="IBM",description="International Business Machines Corporation (IBM) is an American multinational technology corporation headquartered in Armonk, New York"),Entity(name="New York",description="New York is a city in U.S. state"),Entity(name="Florida",description="southeasternmost U.S. state"),Entity(name="American",description="American, something of, from, or related to the United States of America, commonly known as the United States or America"),Entity(name="Chemical formula",description="In chemistry, a chemical formula is a way of presenting information about the chemical proportions of atoms that constitute a particular chemical compound or molecule"),Entity(name="Acetamide",description="Acetamide (systematic name: ethanamide) is an organic compound with the formula CH3CONH2. It is the simplest amide derived from acetic acid. It finds some use as a plasticizer and as an industrial solvent."),Entity(name="Armonk",description="Armonk is a hamlet and census-designated place (CDP) in the town of North Castle, located in Westchester County, New York, United States."),Entity(name="Acetic Acid",description="Acetic acid, systematically named ethanoic acid, is an acidic, colourless liquid and organic compound with the chemical formula CH3COOH"),Entity(name="Industrial solvent",description="Acetamide (systematic name: ethanamide) is an organic compound with the formula CH3CONH2. It is the simplest amide derived from acetic acid. It finds some use as a plasticizer and as an industrial solvent."),])nlp.add_pipe("zshot",config=nlp_config,last=True)text="International Business Machines Corporation (IBM) is an American multinational technology corporation"\" headquartered in Armonk, New York, with operations in over 171 countries."doc=nlp(text)displacy.serve(doc,style="ent")Run itRun with$pythonmain.pyUsing the 'ent' visualizerServing on http://0.0.0.0:5000 ...The script will annotate the text using Zshot and use Displacy for visualising the annotationsCheck itOpen your browser athttp://127.0.0.1:5000.You will see the annotated sentence:How to create a custom componentIf you want to implement your own mentions_extractor or linker and use it with ZShot you can do it. To make it easier for the user to implement a new component, some base classes are provided that you have to extend with your code.It is as simple as create a new class extending the base class (MentionsExtractororLinker). You will have to implement the predict method, which will receive the SpaCy Documents and will return a list ofzshot.utils.data_models.Spanfor each document.This is a simple mentions_extractor that will extract as mentions all words that contain the letter s:fromtypingimportIterableimportspacyfromspacy.tokensimportDocfromzshotimportPipelineConfigfromzshot.utils.data_modelsimportSpanfromzshot.mentions_extractorimportMentionsExtractorclassSimpleMentionExtractor(MentionsExtractor):defpredict(self,docs:Iterable[Doc],batch_size=None):spans=[[Span(tok.idx,tok.idx+len(tok))fortokindocif"s"intok.text]fordocindocs]returnspansnew_nlp=spacy.load("en_core_web_sm")config=PipelineConfig(mentions_extractor=SimpleMentionExtractor())new_nlp.add_pipe("zshot",config=config,last=True)text_acetamide="CH2O2 is a chemical compound similar to Acetamide used in International Business "\"Machines Corporation (IBM)."doc=new_nlp(text_acetamide)print(doc._.mentions)>>>[is,similar,used,Business,Machines,materials]How to evaluate ZShotEvaluation is an important process to keep improving the performance of the models, that's why ZShot allows to evaluate the component with two predefined datasets: OntoNotes and MedMentions, in a Zero-Shot version in which the entities of the test and validation splits don't appear in the train set.The packageevaluationcontains all the functionalities to evaluate the ZShot components. The main function iszshot.evaluation.zshot_evaluate.evaluate, that will take as input the SpaCynlpmodel and the dataset to evaluate. It will return astrcontaining a table with the results of the evaluation. For instance the evaluation of the TARS linker in ZShot for theOntonotes validationset would be:importspacyfromzshotimportPipelineConfigfromzshot.linkerimportLinkerTARSfromzshot.evaluation.datasetimportload_ontonotes_zsfromzshot.evaluation.zshot_evaluateimportevaluate,prettify_evaluate_reportfromzshot.evaluation.metrics.seqeval.seqevalimportSeqevalontonotes_zs=load_ontonotes_zs('validation')nlp=spacy.blank("en")nlp_config=PipelineConfig(linker=LinkerTARS(),entities=ontonotes_zs.entities)nlp.add_pipe("zshot",config=nlp_config,last=True)evaluation=evaluate(nlp,ontonotes_zs,metric=Seqeval())prettify_evaluate_report(evaluation)
zshpower
ZSHPoweris a theme for ZSH; especially for thePythondeveloper. Pleasant to look at, theZSHPowercomforts you with its colors and icons vibrant.InstallingZSHPoweris the easiest thing you will see in any existing theme forZSH, because there is a manager.The changes in the theme become more dynamic through a configuration file, where the user can make various combinations for the style ofZSHPower.TheZSHPowersupports installation along withOh My ZSH, where changes to:enableanddisableanOh My ZSHtheme are easier, all in a simplified command line, without opening any files or creating symbolic links.In addition, theZSHPowermanager downloadsOh My Zshand thezsh-autosuggestionsandzsh-syntax-highlightingplugins automatically, everything to make your ZSH very power.RequirementsTo work correctly, you will first need:git(v2.25 or recent) must be installed.zsh(v5.2 or recent) must be installed.python(v3.9 or recent) must be installed.sqlite3(v3.35 or recent) must be installed.pip(v21.0.1 or recent) must be installed.nerd fontsmust be installed.FeaturesOh My Zshinstallation automatically;*Automatically installzsh-autosuggestionsandzsh-syntax-highlighting;Automated installation and uninstallation;Enable and disableZSHPoweranytime;UpgradeZSHPowereffortlessly;Reset the settings with one command only;Personalized directory with truncate option;Current Git branch and rich repo status:— untracked changes;— new files added;— deleted files;— new modified files;— commits made;— and more.Application versions shown withnerd fonts, they are:CMake, Crystal, Dart, Deno, Docker, Docker, Dotnet, Elixir, Erlang, Go, Gulp, Helm, Java, Julia, Kotlin, Nim, NodeJS, Ocaml, Perl, Php, Python, Ruby, Rust, Scala, Vagrant, ZigPackage versions such as Crystal, Helm, NodeJS, Python, Rust shown;Shows the time in the upper right corner;and, many other dynamic settings in$HOME/.zshpower/config/zshpower.toml.* features if used withOh My ZSH.Installing$python3-mpipinstallzshpower--userNOTE: It is recommended that you install for user rather than global.UsingRun the command below to setZSHPoweron your ZSH:$zshpowerinitIf you want to use ZSHPower withOh My Zsh, use the–omzflag:$zshpowerinit--omzFor more command information, run:$zshpower--helpMore information:https://github.com/snakypy/zshpowerDonationClick on the image below to be redirected the donation forms:LicenseThe gem is available as open source under the terms of theMIT License©CreditsSee,AUTHORS.LinksCode:https://github.com/snakypy/zshpowerDocumentation:https://github.com/snakypy/zshpower/blob/main/README.mdReleases:https://pypi.org/project/zshpower/#historyIssue tracker:https://github.com/snakypy/zshpower/issues
zsh-startify
zsh-startifyYou can also use it in a more minimal configuration, like this:This is a fancy start screen forzsh. After starting a terminal session, it will:Start atmuxserver if it's not already runningAllow you to easily attach to anytmuxsessionsAllow you to easily create new tmux sessionsAllow you to quickly launch azshsession, byCtrl-C'ing orCtrl-D'ing out of the prompt.InstallationThe recommended installation method is throughPyPi:$pip3installzsh-startify $echo"zsh-startify">>~/.zshrcBut, if you'd like to install it manually:[email protected]:alichtman/zsh-startify.git&&cdzsh-startify $python3setup.pyinstall $echo"zsh-startify">>~/.zshrcNote: This tool depends onPython 3.6+. You can check what version you have with:$python3--version Python3.7.4ConfigurationThis tool comes with sensible defaults. No configuration is necessary, however, the following settings may be changed in your~/.zshrcfile:ZSH_STARTIFY_HEADER_FONTThis is the Figlet font that the header text will be printed in.Default:univers. Accepts anyFiglet font.ZSH_STARTIFY_HEADER_TEXTThis string will be printed as the header.Default:zsh. Accepts any string.ZSH_STARTIFY_NO_SPLASHSet this environment variable to not print the splash screen.Default: Not set. If set to anything, the splash screen will not be printed.ZSH_STARTIFY_NON_INTERACTIVESet this environment variable to not display the action picking menu.Default: Not set. If set to anything, the interactive menu will not be displayed.An example of this could be:exportZSH_STARTIFY_HEADER_TEXT="custom-header"exportZSH_STARTIFY_HEADER_FONT="slant"My configuration is:exportZSH_STARTIFY_NO_SPLASH=trueexportZSH_STARTIFY_NON_INTERACTIVE=truetmuxIntegrationThis works best when used with these twotmuxplugins:tmux-resurrecttmux-continuumInspirationI've usedvim-startifya lot. I figured it was time forzshandtmuxto have a similar tool.
zshx-yong
No description available on PyPI.
zsi-lxml
ZSI, the Zolera SOAP Infrastructure, is a pure-Python module that provides an implementation of SOAP messaging, as described in SOAP 1.1 Specification (seehttp://www.w3.org/TR/soap). It can also be used to build applications using SOAP Messages with Attachments (seehttp://www.w3.org/TR/SOAP-attachments). ZSI is intended to make it easier to write web services in Python.In particular, ZSI parses and generates SOAP messages, and converts between native Python datatypes and SOAP syntax. Simple dispatch and invocation methods are supported. There are no known bugs. It’s only known limitation is that it cannot handle multi-dimensional arrays.ZSI is built on top of DOM. It requires Python 2.3 or later, and PyXML 0.8.3 or later. It is open source. We hope you find it useful.The ZSI.twisted package will only be built if you’re using Python >= 2.4, and in order to use it you’ll need twisted >= 2.0 and twistedWeb >= 0.5.0The documentation (in PDF and HTML) is accurate. We should probably restructure the document as a HOWTO. You probably can’t usefully edit the docs without having the Python2.0 sources and some other utilities (TeX, pdfLaTeX, latex2html) on a Unix or Cygwin installation. If you want to format or revise the docs, see “Documentation Tools” in the file RELEASE./rich [email protected] To DoAny volunteers?Use isinstance() for types.Update to SOAPv1.2.
zsim-cli
zsim-cliA simulator for an assembly like toy-languageExplore the docs »View Demo·Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageTokenizationValidationSimulatingUsing interactive modeRoadmapContributingLicenseContactAcknowledgmentsAbout The ProjectImplemented for the compiler building course after the winter semester 2020 on the Aachen University of Applied Sciences.Z-Code is a simplified assembly like toy language created to prove that compiling to a temporary language like Java-Bytecode can be much easier than going from a high-level language directly to assembly.Check out the syntax diagrams for detailed information on how the syntax of Z-Code is definedhere.Sublime syntax highlighting for Z-Code availablehere!It even works onTermux!(back to top)Built Withzsim-cli relies heavily on the following libraries.Clickpytest(back to top)Getting StartedTo get a local copy up and running follow these simple steps.PrerequisitesPython 3.6Head over tohttps://python.organd install the binary suitable for your operation system. Make sure you can run it:python--versionpipCheck if pip is already installed:pip--versionIf your python installation does not come with pip pre-installed visithttps://pip.pypa.ioto install it and then check again.InstallationClone the repositorygitclonehttps://gitlab.com/justin_lehnen/zsim-cli.gitcdzsim-cli(Optionally) create a python virtual environment and enter itpython-mvenvvenv# Windowsvenv/Scripts/activate.bat# Unix or MacOSsourcevenv/bin/activateInstall using pippipinstall-e.Run unit testspytestAnd you're set!(back to top)UsageFor more examples, please refer to theDocumentationTokenizationzsim-cli tokenize [ZCODE]--json / --no-jsonType:BooleanDefault:FalseIf the flag is set, the output will be in JSON format.The JSON schema is[ { "type": "<type>", "value": "<value>" }, ... ].Examples:# Tokenize code in JSONzsim-clitokenize"LIT 7; PRT;"--json# Pipe output to a JSON parser like jq for powerful postprocessing!zsim-clitokenize"LIT 7; PRT;"--json|jq-r.[].type-i, --input FILENAMEType:StringDefault:NoneSet an input file to read the Z-Code from.-will use the stdin.If you're using Windows, remember that the defaultcmd.exerequires two EOF characters followed by return (see examples).Examples:# Tokenize file programs/test.zczsim-clitokenize-iprograms/test.zc# Tokenize from stdinzsim-clitokenize-i- LIT7;PRT;# Windows^Z<ENTER> ^Z<ENTER># Unix or MacOS^D^D--encoding TEXTType:StringDefault:"utf_8"Encoding to use when opening files with-i, --input.Refer to thePython docsfor possible values.Examples:# Use ASCII encodingzsim-clitokenize-iascii_encoded.zc--encodingasciiValidationzsim-cli validate [ZCODE]--json / --no-jsonType:BooleanDefault:FalseIf the flag is set, the output will be in JSON format.The JSON schema is{ "success": <boolean>, "message": "<string>" }.Examples:# Validate code in JSONzsim-clivalidate"LIT 7; PRT;"--json# Pipe output to a JSON parser like jq for powerful postprocessing!zsim-clivalidate"LIT 7; PRT;"--json|jq-r.message-i, --input FILENAMEType:StringDefault:NoneSet an input file to read the Z-Code from.-will use the stdin.If you're using Windows, remember that the defaultcmd.exerequires two EOF characters followed by return (see examples).Examples:# Validate file programs/test.zczsim-clivalidate-iprograms/test.zc# Validate from stdinzsim-clivalidate-i- LIT7;PRT;# Windows^Z<ENTER> ^Z<ENTER># Unix or MacOS^D^D--encoding TEXTType:StringDefault:"utf_8"Encoding to use when opening files with-i, --input.Refer to thePython docsfor possible values.Examples:# Use ASCII encodingzsim-clivalidate-iascii_encoded.zc--encodingasciiSimulatingzsim-cli run [ZCODE]--json / --no-jsonType:BooleanDefault:FalseIf the flag is set, the output will be in JSON format.This flag isnot compatiblewith--step!The JSON schema is either{ "success": <boolean>, "message": "<string>" }for invalid zcode or{"success":true,"instruction_set":"<z|zfp|zds|zfpds>","initial_memory":{"..."},"code":"...","final_state":{"m":1,"d":[],"b":[],"h":{},"o":"",},"states":[{"state":{"Same as final_state"},"next_instruction":{"command":"...","mnemonic":"...","parameters":[1,2,3],},},"..."],}when the execution was successful.Examples:# Run code and output information about the states in JSONzsim-clirun"LIT 7; PRT;"--json# Pipe output to a JSON parser like jq for powerful postprocessing!zsim-clirun"LIT 7; PRT;"--json|jq-r.final_state.o-i, --input FILENAMEType:StringDefault:NoneSet an input file to read the Z-Code from.-will use the stdin.If you're using Windows, remember that the defaultcmd.exerequires two EOF characters followed by return (see examples).Examples:# Run file programs/test.zczsim-clirun-iprograms/test.zc# Run from stdinzsim-clirun-i- LIT7;PRT;# Windows^Z<ENTER> ^Z<ENTER># Unix or MacOS^D^D--encoding TEXTType:StringDefault:"utf_8"Encoding to use when opening files with-i, --input.Refer to thePython docsfor possible values.Examples:# Use ASCII encodingzsim-clirun-iascii_encoded.zc--encodingascii-h, --memory TEXTType:StringDefault:"[]"Optionally overwrite the memory configuration for the executing code.The format is[ <addr>/<value>, ... ].Examples:# 10 + 5zsim-clirun"LOD 1; LOD 2; ADD;"-h"[1/10, 2/5]"--instructionsetType:StringDefault:"zfpds"Set the instruction set. Each instruction set has different available instructions to use.For exampleLODIcomes fromzds, whileLODLOCALis defined inzfp.When you are unsure, stick withzfpdswhere all instructions are available.Examples:# Use a specific instruction-setzsim-clirun"LIT 7; LIT 3; ADD;"--instructionset"z"--step / --no-stepType:BooleanDefault:FalseIf this flag is set, the execution will ask for confirmation after each step of the execution.This flag isnot compatiblewith--jsonor--full-output!Examples:# Go through Z-Code instruction by instructionzsim-clirun"LIT 7; POP;"--step--formatType:StringDefault:"({m}, {d}, {b}, {h}, {o})"The--formatoption allows you to customize the regular output of the simulation.Available placeholders:{m}= instruction counter{d}= data stack{b}= procedure stack{h}= heap memory{o}= outputExamples:# Use less components from the machine. This will yield "m: 5, h: [1/7], output: '7'"zsim-clirun"LIT 7; STO 1; LOD 1; PRT;"--format"m: {m}, h: {h}, output: '{o}'"--full-output / --no-full-outputType:BooleanDefault:FalseIf this flag is given, all states are printed on the standard output.--stepwill ignore this option.Examples:# This will print all five states on the standard outputzsim-clirun"LIT 7; STO 1; LOD 1; PRT;"--full-output-it, --interactive / --no-interactiveType:BooleanDefault:FalseUse this flag to start a Z-Code interpreter.Only--format,--instructionsetand-h, --memoryare compatible with this option.Examples:zsim-clirun-it(back to top)Using interactive modeWithzsim-cli run -ityou can start an interactive interpreter to execute Z-Code line by line.Using the interactive mode might present you with difficulties when using jumps or function calls.The following code willnotwork in interactive mode:LIT 6; CALL(increment, 1,); HALT; increment: LODLOCAL 1; LIT 1; ADD; RET;CALL(increment, 1,);will fail sinceincrementis not defined until later.To circumvent this issue two special commands have been added:#noexecand#exec.These commands push and pop frames in which commands are not directly executed but parsed and saved. The following example does the same as the Z-Code above, but uses#noexecand#exec:> LIT 6; > #noexec #> f: LODLOCAL 1; #> LIT 1; #> ADD; #> RET; #> #exec > CALL(f, 1,);Note the#in front of the prompt that tell how many#noexecframes are running.You are not limited to defining functions that way either! The next example uses#noexecdifferently:> #noexec #> add_and_sto: ADD; #> STO 1; #> HALT; #> #exec > LIT 4; > LIT 1; > JMP add_and_sto; > LOD 1; > PRT;In the standard simulation modeHALTwould jump afterPRTbut since the last typed command wasJMP add_and_sto;it will jump continue right after the instruction we just sent off!(back to top)RoadmapCode executionMemory allocation in codeCommentsInteractive modeBetter -h, --memory parsingError handlingMore instruction setsDocumentationMore sample programsSee theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a merge request. You can also simply open an issue with the label "enhancement". Don't forget to give the project a star! Thanks again!Fork the projectCreate your feature branch (git checkout -b feature/AmazingFeature)Commit your changes (git commit -m 'Add some AmazingFeature')Use pytest to run unit tests (pytest)Push to the branch (git push origin feature/AmazingFeature)Open a merge requestCodestyleFour space indentationOne class per fileVariables and functions are written insnake_caseClass names are written inPascalCase(back to top)LicenseDistributed under the Unlicense license. SeeLICENSEfor more information.(back to top)ContactJustin Lehnen [email protected]@gmx.deProject Link:https://gitlab.com/justin_lehnen/zsim-cli(back to top)AcknowledgmentsAachen University of Applied SciencesChoose an Open Source LicenseGitHub Emoji Cheat SheetImg Shields(back to top)
zsimparse
Utilities to parse zsim simulation results.
zsingleton
单例模式常用包包括三种单例实现方式:1:基类继承 2:装饰器 3:元类metaclass’
zsl
ZSL - z' service layerZSL is a Python micro-framework utilizingdependency injectionfor creating service applications on top ofFlaskweb framework andGearmanjob server orCelerytask queue.MotivationWe developed ZSL to modernize our workflow with maintaining our clients' mostly web applications written in various older CMS solutions without the need to rewrite them significantly. With ZSL we can write our new components in Python, with one coherent shared codebase, accessible trough Gearman or JavaScript. Also the same code can be called through various endpoints - web or task queue nowadays.DisclaimerAt current stage this should be taken as proof of concept. We don't recommend to run in any production except ours. It is too rigid, with minimum test coverage and lots of bad code practices. We open sourced it as way of motivation for us to make it better.InstallationWe recommend to install it troughPyPiand run it in avirtualenvordockercontainer.$pipinstallzslGetting startedFor now it is a bit cumbersome to get it running. It has inherited settings trough ENV variables from Flask and has a rigid directory structure like django apps. On top of that, it needs a database and Redis.The minimum application layout has to contain:. ├── app # application sources │   ├── __init__.py │   └── tasks # public tasks │   ├── hello.py │   └── __init__.py ├── settings # settings │   ├── app_settings.cfg │   ├── default_settings.py │   └── __init__.py └── tests$exportZSL_SETTINGS=`pwd`/settings/app_settings.cfg# settings/app_settings.cfgTASKS=TaskConfiguration()\.create_namespace('task')\.add_packages(['app.tasks'])\.get_configuration()RESOURCE_PACKAGE=()DATABASE_URI='postgresql://postgres:postgres@localhost/postgres'DATABASE_ENGINE_PROPS={}SERVICE_INJECTION=()REDIS={'host':'localhost','port':6379,'db':0}RELOAD=True# hello.pyclassHelloWorldTask:defperform(self,data):return"Hello World"$python-mzslweb *Runningonhttp://127.0.0.1:5000/(PressCTRL+Ctoquit)$curlhttp://localhost:5000/task/hello/hello_world_task Helloworld!DeployingDeploy will happen upon pushing a new tag to Gitlab.Creating new tag/versionUsebump2versionto update version in config files. It will also create commit and new tag.$bumpversion--new-version${VERSION}{major|minor|patch}--tag-name${VERSION}Version name usessemver. Starts with number.PipelineCurrent pipeline tries to copy previous Travis runs. It runs tox target seperately and on a tag push will create deploy.Tox Docker imageGitlab pipeline runs inside a docker image which is defined indocker/Dockerfile.tox. Currently we manually configure, build and push it to gitlab container registry. So to update the container follow this steps.When pushing for the first time run, you have to create an access token and login to atteq gitlab container registry. Go tohttps://gitlab.atteq.com/atteq/z-service-layer/zsl/-/settings/access_tokensand create a token to read/write to registry. Then rundocker login registry.gitlab.atteq.com:443To build/push the image:Build image locally.docker build -t zsl/tox-env -f docker/Dockerfile.tox .Tag image.docker tag zsl/tox-env registry.gitlab.atteq.com:443/atteq/z-service-layer/zsl/tox-env:latestPush image.docker push registry.gitlab.atteq.com:443/atteq/z-service-layer/zsl/tox-env:latestUpdate image hash in.gitlab-ci.yml. (copy from build output ordocker images --digests).
zsl_client
UNKNOWN
zsl-data
ZSL python package
zsl_jwt
JWT implementation for ZSL framework. This modules adds security possibilities to ZSL.Free software: BSD licenseInstallationJust addzsl_jwtto your requirements or usepip install zsl-jwtUsageAddzsl_jwt.module.JWTModuleto the modules in yourIoCContainerand provide azsl_jwt.configuration.JWTConfigurationin your configuration underJWTvariable.DocumentationSee more inhttps://zsl_jwt.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.3 (2017-07-19)Algorithm setting is moved to JWTProfile.0.1.2 (2017-07-18)Forgotten unit tests are added.0.1.1 (2017-07-18)A first version able to encode and decode.0.1.0 (2017-06-20)First release on PyPI.
zsl_openapi
Generate OpenAPI specification for your models and API out of your ZSL service. This module scans the given packages for the persistent models and generates model definitions out of them.The full API (paths) may be declared manually.Free software: BSD licenseInstallationpip install zsl-openapiHow to useDefine container with thezsl_openapi.module.OpenAPIModule.class MyContainer(WebContainer): open_api = OpenAPIModuleThen you may use CLIopen_apicommand.python app.py \ open_api generate \ --package storage.models.persistent \ --output api/openapi_spec_full.yml \ --description api/openapi_spec.ymlSee more in the documentation mentioned below.Documentationhttps://zsl_openapi.readthedocs.io/DevelopmentSetup a virtualenv using Python 2.7 and activate it. To install all the development requirements run:pip install -r requirements.txtTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2017-06-09)First release on PyPI.
zsltool
No description available on PyPI.
zsm
Please see the project links.
zsmash
# zsmash—Rapid evaluation of quantified simialrity between streaming data using data smashing and newer implementations
zs-mixins
No description available on PyPI.
zsm-lib
Please see the project links.
zsocket
网络连接socket封装支持心跳包, 支持长连接, 断线检测, 不粘包测试代码:if __name__ == '__main__':import threadingfrom zsocket.commonlib.data_pack import data_packfrom zsocket.tcp.server import Serverfrom zsocket.tcp.client import Clientdef server_client_connect_fun(client):print('服务端收到连接', client.remote_addr)server.close_listen()threading.Thread(target=send_data, args=(client,)).start()def server_client_close_fun(client, close_state):print('服务端断开连接', client.remote_addr, close_state)def send_data(client):while client.is_connect:text = input('请输入要发送的数据:')if not client.is_connect:returnif not text or text.lower() == 'q':client.close()returnclient.send(text.encode())client.send_text(text)client.send_pack_arg(text, 1, 2, 3)def client_connect_fun(client):print('客户端连接', client.local_addr)def client_close_fun(client, close_state):print('客户端断开连接', client.local_addr, close_state)def client_get_data_fun(client, data):print('客户端收到数据', data)def client_get_text_fun(client, text):print('客户端收到文字', text)def client_get_pack_fun(client, pack):print('客户端收到包', pack.data, pack.a1, pack.a2, pack.a3)server = Server()server.password = '123'server.set_client_connect_callback(server_client_connect_fun)server.set_client_close_callback(server_client_close_fun)server.listen(7777)client = Client()client.password = '123'client.set_connect_callback(client_connect_fun)client.set_close_callback(client_close_fun)client.set_get_data_callback(client_get_data_fun)client.set_get_text_callback(client_get_text_fun)client.set_get_pack_callback(client_get_pack_fun)client.connect('localhost', 7777)
zsom
No description available on PyPI.
zson
UNKNOWN
zspell
ZSpellPython bindings for the Rust zspell library: a simple yet fast spellchecker.To use this library, you will need a dictionary in the language of your choice. Many are available at the following repository:https://github.com/wooorm/dictionariesThe full Python API documentation is available athttps://zspell.readthedocs.iofromzspellimportDictionarywithopen("dictionaries/en_US.aff","r")asf:config_str=f.read()withopen("dictionaries/en_US.dic","r")asf:dict_str=f.read()d=Dictionary(config_str,dict_str)assert(d.check("Apples are good! Don't you think?"))assert(notd.check("Apples are baaaad"))
zspider
分布式爬虫精简框架安装pip install zspider框架依赖由于使用了队列系统, 此爬虫框架依赖于ssdb配置爬虫框架创建一个目录, 这个目录作为你的爬虫组织主路径mkdir /home/myspider mkdir /home/myspider/log mkdir /home/myspider/spiders创建日志目录, 所有的爬虫的日志都将存放到这个目录cd /home/myspider mkdir log创建配置文件touch /etc/zspider/config.ini # win系统: "c:/zspider/config.ini" # 其他系统: "/etc/zspider/config.ini" # 可以使用环境变量 ZSPIDER_CONFIG 指定配置文件路径, 优先级最高修改配置文件为你的设置[log] ;是否输出到流 ;write_stream = true ;是否输出到文件 ;write_file = true ;日志文件输出路径 ;write_path = /home/myspider/log ;日志等级 ;log_level = debug ;每隔几天就新增一个日志文件 ;log_interval = 1 ;保留几个旧的日志文件 ;log_backupCount = 2 [seed_queue] ;种子队列查询后缀, 请不要更改这个配置, 除非你完全了解此爬虫框架的队列系统是如何运行的 ;suffix = ['vip', 'd1', 'd2', 'd3', 'seed', 'error'] [public_constant] ;请求等待时间 ;req_timeout = 20 ;一次完整的任务逻辑中出错时, 等待一定时间后才能开始下一个任务 ;spider_err_wait_time = 3 ;种子队列为空后爬虫休眠时间 ;empty_seed_wait_time = 120 ;默认html编码方式 ;default_html_encoding = 'utf-8' ;重试等待时间 ;retry_wait_fixed = 0.5 ;最大尝试次数 ;max_attempt_count = 5 [ssdb] ;是否为集群 cluster = false ;主机地址 host = 你的ssdb服务主机 ;主机端口 port = 你的ssdb服务端口 [proxy] ;use_proxy = false ;代理获取服务器ip和端口,如(xxx.xxx.xxx:1234) ;proxy_server = ;代理获取服务器路径,如(getproxy?format=json) ;proxy_path = ;无法获取代理地址时重试等待时间 ;except_wait = 1 ;代理模块包名 ;proxy_pack_name = zspider.proxy_base ;代理模块名 ;proxy_class_name = proxy_base大功告成, 终于可以开始制作爬虫了一个简单的爬虫在爬虫目录下创建一个文件 my_spider.py, 写入如下内容fromzspider.spider_baseimportspider_baseclassmy_spider(spider_base):spider_name='my_spider'defstart_seed(self):yieldself.make_seed('https://pypi.org/project/zspider',self.parser_html,encoding='utf8')defparser_html(self,res):self.log.info(res.response_text)if__name__=='__main__':a=my_spider()a.yield_for_start_seed()a.run()运行它, 随后你可以在控制台看到打印出来的网页数据这个爬虫做了什么# 从爬虫框架zspider的spider_base模块中导入spider_base类fromzspider.spider_baseimportspider_base# 创建自己的爬虫类并继承spider_baseclassmy_spider(spider_base):#设置爬虫的名称为my_spider, 注意: 如果没有设置名称会报错spider_name='my_spider'#爬虫开始爬取网页时总有一个最开始的网址给它抓取, 这里提交最开始的网址给种子队列defstart_seed(self):#构建并提交一个url种子给种子队列, 这个种子包含了三种基本信息: 抓取的网址是'https://pypi.org/project/zspider', 用parser_html函数来解析网页, 这个网页的编码是utf8yieldself.make_seed('https://pypi.org/project/zspider',self.parser_html,encoding='utf8')#创建一个解析函数, 此函数接收一个参数, 此参数是_seed.Seed类的实例defparser_html(self,res):#将网页数据打印出来self.log.info(res.response_text)if__name__=='__main__':#爬虫实例化a=my_spider()#开始提交初始种子a.yield_for_start_seed()#开启爬虫a.run()让爬虫不停的爬下去#在解析函数中 def parser_html(self, res): urls = [] #在此处写入自己的解析代码, 获取这个网页的一些url存入到urls中 #遍历创建并提交url种子 for url in urls: #去重检查, 只有第一次检查的数据才会返回True, 可以防止已经抓取的页面再次抓取导致死循环 if self.dup_check(url): #这里没有写encoding, 爬虫框架会对每一个网页自动分析出合适的编码来解析网页, 就像浏览器一样 yield self.make_seed(url, self.parser_html) self.save_result('你想要保存的数据, 它应该是一个dict')spider_base内建参数说明所有的重复参数遵循就近优先原则参数名数据类型默认值描述在make_seed中为种子单独设置spider_namestr必须设置methodstrget默认请求方式是encodingstr默认页面编码解码模式, 设为None由爬虫框架自动判断是base_headersdict{}默认请求头, 允许用户添加或修改请求头, 忽略大小写, 爬虫框架会自动补全必须的请求头字段是time_outfloat20请求超时是auto_cookie_enableboolFalse是否自动管理cookiecheck_html_funcfunctionstr页面解析预处理函数, 可能因为某些原因导致页面内容不是你预想的内容, 你可以在这里检查页面内容, 如果不是你想要的内容请返回False, 爬虫框架会更换代理后重新抓取此页面是retry_http_codelist[]如果页面状态码在这个列表中, 爬虫框架会重新抓取页面, 如404spider_base方法说明run_of_error_parser仅使用解析错误error_parser队列进行抓取, 对调试爬虫很有帮助run运行爬虫dup_check去重检查, 可以有效避免重复抓取页面参数名数据类型默认值描述item必须参数, 这个参数在运算之前会调用str格式为字符串, 然后加密为md5_32位字符串, 只有第一次调用去重检查的数据才会返回TruecollnamestrNone可选参数, 去重过滤器使用哪个文档保存被去重的数据, 如果设为None, 文档名默认为<爬虫名:dup>clear_all_queue清除队列, 慎用, 此函数会将爬虫的种子完全清除参数名数据类型默认值描述clear_parser_errorboolTrue是否清除解析错误的队列clear_dupboolTrue是否清除去重过滤器文档make_seed此函数用户构建一个url种子, 它将和页面相关的一切信息保存到一个种子里面参数名数据类型必须参数描述urlstr要抓取的网址, 尽量把http或https写入, 这样抓取更准确, 允许为空parser_funcfunctionstr是表示页面抓取成功后调用哪个解析函数来解析它, 此函数接收一个参数, 请参考[可继承函数说明.parser_response]check_html_funcfunctionstr页面抓取成功后调用哪个页面解析预处理函数, 此函数接收一个参数, 请参考[可继承函数说明.check_has_need_data]metapython基本类型此参数用于保存用户想要传递到下一个解析函数的数据, 没错就和scrapy的meta一样ua_typestr随机浏览器头类型('pc', 'ua_type', 'ios')methodstr使用什么方式请求url, get还是post, 如果为空则使用内建的爬虫内建参数method, 还是空则默认为getparams参考requests的paramscookiesdictcookies, 要求爬虫内建参数cookie_enable为Trueheadersdict请求头, 参考爬虫内建参数base_headersdata参考requests的datatimeoutfloat页面请求等待时间, 超时则认为请求失败, 设为空或0, 爬虫框架会自动更改为20, 爬虫不应该一直等待一个网页encodingstr页面编码解码方式, gbk还是utf8? 设为空则使用爬虫内建参数encoding, 还是空则由爬虫框架智能判断. 当页面是图片或是其他非文本页面时, 设为False关闭此种子的解码功能proxiesdict主动为此种子设置代理yield_for_start_seed根据start_url函数提交初始种子参数名数据类型默认值描述force_yieldboolFalse是否强行提交初始种子, 如果为False, 在所有正常的种子抓取完毕之前忽略本次操作, 如果为True, 不管是否存在未抓取完毕的种子都立即提交初始种子可继承函数说明spider_init爬虫初始化完成后会调用这个函数start_seed提交初始种子函数, yield_for_start_seed方法会调用此函数, 此函数允许提交多个初始种子check_has_need_data页面解析预处理函数, 要使用此函数必须在构建种子的时候用参数check_html_func指明, 或者在spider_base内建参数中设置默认值, 如果你返回了False, 那么爬虫框架会重新抓取这个页面. 如果你的代码出错了, 爬虫框架会将这个种子放入error队列参数名数据类型描述resseed.Seed此值包含了抓取成功的页面数据以及原始种子的信息, 参考seed.Seed参数说明. 如果url是空的, 那么这个参数是一个dict, 请参考原始代码seed.Seed.__attrs_dict__parser_response页面解析函数, 要使用此函数必须在构建种子的时候用参数parser_func指明, 你可以在此函数内正式解析页面, 然后使用yield提交种子, 如果你的代码出错了, 爬虫框架会将这个种子放入error_parser队列参数名数据类型描述resseed.Seed此值包含了抓取成功的页面数据以及原始种子的信息, 参考seed.Seed参数说明. 如果url是空的, 那么这个参数是一个dict, 请参考原始代码seed.Seed.__attrs_dict__seed.Seed参数说明你构建种子时传入的所有参数都将会成为种子实例的属性, 当爬虫框架使用这个种子成功抓取页面后, 以下属性将可用参数名数据类型描述response请参考requests.Requestresponse_textstr网页源代码response_etree请参考lxml.etree._Elementresponse_jsondict将网页源代码视为json格式并获取转换为dict的值raw_databytes获取网页原始数据, 如果是图片或其他非文本网页时非常有用seed.Seed方法说明url_join补全连接地址为完整的网页地址参数名数据类型描述linkstr一个连接地址, 它可能是不完整的, 使用此函数后会根据当前页面地址补全为完整的地址代理接口说明创建一个类, 继承zspider.proxy_base模块中的proxy_base类# my_proxy.pyfromzspider.proxy_baseimportproxy_baseclassmy_proxy_interface(proxy_base):defproxy_init(self):# 初始化后会调用这个函数passdefget_proxy(self):# 返回当前使用的代理, 字典{"http": "http://主机:端口", "https": "http://主机:端口"}passdefchange_proxy(self):# 要求切换代理地址pass# 然后修改配置文件中[proxy]表的proxy_pack_name为你的代理接口包名, 修改proxy_class_name为你的代理接口类名更新日志发布时间发布版本发布说明19-03-281.0.2修复一个bug, 在未设置encoding的情况下页面分析会报错19-03-281.0.1现在终结进程时,当前种子会放入error队列,种子不会丢失了19-03-271.0.0发布正式版, 相对于旧版本(0.1.0)更改了大多数使用方法, 取消了mongo依赖:因为用户不一定要用mongo存数据, 缓存服务由redis改为了ssdb, 配置文件简化为最少需要[ssdb]表, 其他修改请自行阅读说明本文档本项目仅供所有人学习交流使用, 禁止用于商业用途
zs-postinstall-test
A set of small tests to ensure your ZeroStack cluster is running properly.DependenciesIn order to run the post install tests download the cloud admin RC and certificate files out of the admin.local BU.Zerostack rc fileZerostack certificate fileRC and Cert FilesPull the RC file from the newly installed ZeroStack cluster.LogIn -> Click on BU List -> Click on admin.local BU -> Click on Project -> zs_default -> More tab -> APIWhen you get the RC file, make sure to specify your password and the fully qualified path to the cert file.Run Tests$ source ~/zsrc.txt$ zs-post-installIf you have already run the test, and would like to run it again, delete the PostInstall BU tat was created.OS RequiermentsCentOS 7$ yum install -y epel-release,python-pip,hdparmUbuntu 14.04 / 16.04 / 18.04$ apt install -y python-pipPre-flight PrerequisitesPIP will install all of the packages needed to run the ZS-Post-Install test, if they are not present.$ pip install urllib3==1.24.1InstallingTo install the preflight check on the system, follow these steps. Make sure all of the pre-requisite packages have been installed.$ pip install zs-postinstall-testRunning the testsRun the post install test with the following command.$ zs-post-installBuild and SubmitGIT - development / nightlygit clonehttps://github.com/Zerostack-open/post-install-test.gitcd zs-post-install-testpython setup.py bdist_wheelPIP - Developmentsudo python -m pip install –upgrade pip setuptools wheelsudo python -m pip install tqdmsudo python -m pip install –user –upgrade twineAuthorsJonathan Arrance-Initial work- [Zerostack-open](https://github.com/Zerostack-open)See also the list of [contributors](https://github.com/JonathanArrance) who participated in this project.LicenseThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Zerostack-open/zs-post-install-test/blob/master/LICENSE) file for details
zs-preflight
The ZeroStack pre-flight system check can be used by an administrator or ZeroStack SE to determine if the hardware in question is compatible with the ZeroStack cloud operating system.The preflight check will ensure that your physical server will work with the Zerostack ZCOS. Once this script is run, and all of the checks are varified, you will be able to install the ZCOS.The preflight check will make sure the hardware adhears to the Zerostack minimal viable hardware spec.Overall system configurationCPU architectureStorage requiermentsNetworkingPlease check the Ubuntu HCL to verify your results. [Ubuntu Server HCL](https://certification.ubuntu.com/server/)Once all of the results have been verified, please send them to your SE.Getting StartedIn order to get the preflight check working, you will need to make sure python 2.7 or 3.x is installed on the system the preflight check will run on.PIP will also be requierd in order to install zs-preflight and the supporting packages.OS RequiermentsCentOS 7$ yum install -y epel-release,python-pip,hdparmUbuntu 14.04 / 16.04 / 18.04$ apt install -y python-pipPre-flight PrerequisitesIn order to get the zspreflight system working you will need to install the following packages on the sytstem you are running the preflight check from.PIP will install all of the packages needed to run the ZS-Preflight system, if they are not present.$ pip install paramiko$ pip install gspread$ pip install oauth2clientInstallingTo install the preflight check on the system, follow these steps. Make sure all of the pre-requisite packages have been installed.$ pip install zs-preflightRunning the testsRun the pre-flight check with the following command.$ preflightBuild and submitGIT - development / nightlygit clonehttps://github.com/Zerostack-open/zs-preflight.gitcd zspreflightpython setup.py bdist_wheelPIP - Developmentsudo python -m pip install –upgrade pip setuptools wheelsudo python -m pip install tqdmsudo python -m pip install –user –upgrade twineTODOUpload data to GsheetFire off preflight from zspreflight on a remote systemAuthorsJonathan Arrance-Initial work- [Zerostack-open](https://github.com/Zerostack-open)See also the list of [contributors](https://github.com/JonathanArrance) who participated in this project.LicenseThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Zerostack-open/zs-preflight/blob/master/LICENSE) file for details
zspt
zspt -- A powerful and graceful blog system built by pythonInstallpip3 install zspt
zsql
简单的mysql封装库使用非常简单, 直接调用方法操作, 不需要再去想sql代码了测试代码:if __name__ == '__main__':# 创建操作数据库的实例sql = zsql()# 创建一个库sql.create_db('db_name')# 使用库sql.use_db('db_name')# 创建一个表sql.create_table_ex('table_name', ID='int', name='char(16)', pwd='char(32)')# 保存数据sql.save_values('table_name', (0, '用户0', '密码0'), (1, '用户1', '密码1'))# 更新数据sql.update('table_name', new_item=dict(name='新用户名', pwd='新密码'), where=dict(name='用户1', pwd='密码1'))# 查询数据data = sql.select_all('table_name')# 删除表sql.drop_table('table_name')# 删除库sql.drop_db('db_name')# 显示数据for v in data:print(v)# 关闭sql.close()'''打印出以下结果CREATE DATABASE IF NOT EXISTS db_name DEFAULT CHARSET=utf8;USE db_name;USE db_name;CREATE TABLE table_name (ID int, name char(16), pwd char(32)) DEFAULT CHARSET=utf8;INSERT INTO table_name VALUES (0,'用户0','密码0'), (1,'用户1','密码1');UPDATE table_name SET name = '新用户名', pwd = '新密码' WHERE name='用户1' AND pwd='密码1';SELECT * FROM table_name;DROP TABLE IF EXISTS table_name;DROP DATABASE IF EXISTS db_name;(0, '用户0', '密码0')(1, '新用户名', '新密码')'''
zsqlite
No description available on PyPI.
zsq_test
install
zs-relay
No description available on PyPI.
zs.rstaddons
UNKNOWN
zss
No description available on PyPI.
zssdb
一个封装的ssdb连接器参数说明参数名数据类型默认值描述更新日志发布时间发布版本发布说明19-03-020.1.2修改了一些bug19-02-190.1.0发布第一版, 暂时不支持集群连接本项目仅供所有人学习交流使用, 禁止用于商业用途
zs-selenium-youtube
selenium_youtubeInstallpipinstall--upgradeselenium-youtube# orpip3install--upgradeselenium-youtubeUsagefromselenium_youtube.youtubeimportYoutubeyoutube=Youtube('path_to_cookies_folder','path_to_extensions_folder')result=youtube.upload('path_to_video','title','description',['tag1','tag2'])Dependenciesbeautifulsoup4,kcu,kstopit,kyoutubescraper,noraise,selenium,selenium-firefox,selenium-uploader-accountCreditsPéntek Zsolt
zssfunniest
To use (with caution), simply do:>>> import funniest >>> print funniest.joke()
zssget
UNKNOWN
zssh
ZSSH - ZIP over SSHSimple Python script to exchange files between servers.Login to SSH and choose which path you need to serve over HTTP.This script is based on Python 3+Intall from PIPpython3-mpipinstallzsshExpose a directory toZIP$python3-mzssh-as--path/desktop/path_to_exposeExtract aZIPfrom URL$python3-mzssh-ad--path/desktop/path_to_download--ziphttp://mydomain.com/temp_file.zipUsageusage:zssh[-h]-aA--pathPATH[--zipZIP][--portPORT]requiredarguments:-aAAction[s=serve,d=download]--pathPATHFile/FolderPath optionalarguments:--zipZIPZIPFileURL|Nameshouldbe*.zip--portPORTServerPort|Default:9800
zst
A simple tool the check the status of a change in zuul
zstandard
This project provides Python bindings for interfacing with theZstandardcompression library. A C extension and CFFI interface are provided.The primary goal of the project is to provide a rich interface to the underlying C API through a Pythonic interface while not sacrificing performance. This means exposing most of the features and flexibility of the C API while not sacrificing usability or safety that Python provides.The canonical home for this project ishttps://github.com/indygreg/python-zstandard.For usage documentation, seehttps://python-zstandard.readthedocs.org/.
zstat
UNKNOWN
zstat-cli
zstatA bone-simple stats tool for displaying percentiles from stdin to stdout. Example:$ cat nums.txt 456 366 695 773 617 826 56 78 338 326$ cat nums.txt | zstat p0 = 56 p50 = 366 p90 = 773 p95 = 773 p99 = 826 p99.9 = 826 p100 = 826InstallationClone this repository locally, then:pip3 install-e.BuildingmakeTestingmake testDeploy New Versionmake deploy
zstatspython
ZStatsPythonGet Player Data From zstats plugin. Not An Official Module.UsageUse the module like this:from zstatspython import zstatspy db=zstatspy.connect("localhost","root","password", "database") userstat=zstatspy.getStats("Username",db) for x in userstat: print(x)You can also use it with a UUID.UUIDstat=zstatspy.getStatsfromUUID("069a79f4-44e9-4726-a5be-fca90e38aaf5",db) for y in UUIDstat: print(y)Sometimes a player might have more than one UUIDs so we recommend using an external username to UUID and then usegetStatsfromUUIDinstead ofgetStatsFunctionsConnectfrom zstatspython import zstatspy db=zstatspy.connect("localhost","root","password", "database")GetStatsfrom zstatspython import zstatspy db=zstatspy.connect("localhost","root","password", "database") userstat=zstatspy.getStats("Notch",db)GetStatsFromUUIDfrom zstatspython import zstatspy db=zstatspy.connect("localhost","root","password", "database") UUIDstat=zstatspy.getStatsfromUUID("19139894-6049-4db7-9c84-da0b99b9ec12",db)GetStatfrom zstatspython import zstatspy db=zstatspy.connect("localhost","root","password", "database") stat=zstatspy.getStat("DEATHS","Notch",db)Test fileUsage$ python test.pyResponse:MySQL Login: Host:After Login:Login Succeded Get Stats MC Username:Response After Entering Valid Username('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:shovel', 0) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:sword', 877) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:trident', 79) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'DAMAGE_TAKEN', 13823) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:crafted', 1707) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:placed', 9499) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'DEATHS', 22) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'SPRINT_ONE_CM', 1116825) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:afk_time', 0) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mined', 26969) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mine_kind', 73) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:craft_kind', 17) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:place_kind', 113) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'PLAY_ONE_MINUTE', 1456104) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:bow', 161) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'MOB_KILLS', 584) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'SLEEP_IN_BED', 8) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:axe', 181) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:pickaxe', 26290) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'ITEM_ENCHANTED', 6) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'CROUCH_ONE_CM', 78580) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:last_played', 1617256053) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'WALK_ONE_CM', 1734979) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'DAMAGE_DEALT', 81056) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'TALKED_TO_VILLAGER', 159) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:hoe', 22) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'TRADED_WITH_VILLAGER', 50) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'BOAT_ONE_CM', 1498835) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mob_kind', 25) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'CHEST_OPENED', 195) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'AVIATE_ONE_CM', 2187704) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'FISH_CAUGHT', 5) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:slain_kind', 4) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'RECORD_PLAYED', 3) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'ARMOR_CLEANED', 0) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'NOTEBLOCK_PLAYED', 0) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'BELL_RING', 98) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:craft_0001_GOLD_INGOT', 949) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:craft_0002_GREEN_DYE', 286) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:craft_0003_GOLD_BLOCK', 256) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:place_0001_WHITE_WOOL', 1282) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:place_0002_FISHING_ROD', 639) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:place_0003_EMERALD_BLOCK', 575) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mine_0001_STONE', 17735) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mine_0002_DIAMOND_ORE', 3001) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mine_0003_NETHERRACK', 1253) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mob_0001_SKELETON', 220) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mob_0002_ZOMBIE', 178) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:mob_0003_CREEPER', 30) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:slain_0001_SKELETON', 1) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:slain_0002_VINDICATOR', 1) ('19139894-6049-4db7-9c84-da0b99b9ec12', 'z:slain_0003_PLAYER', 1)LicenseThis software is licensed under the MIT license. Feel free to use it however you like.
zstd
branchstatusReleaseMasterSimple python bindings to Yann Collet ZSTD compression library.Zstd, short for Zstandard, is a new lossless compression algorithm,which provides both good compression ratioandspeed for your standard compression needs. “Standard” translates into everyday situations which neither look for highest possible ratio (which LZMA and ZPAQ cover) nor extreme speeds (which LZ4 covers).It is provided as a BSD-license package, hosted onGitHub.WARNING!!!If you setup 1.0.0.99.1 version - remove it manualy to able to update. PIP matching version strings not tuple of numbers.Result generated by versions prior to 1.0.0.99.1 is not compatible with orignial Zstd by any means. It generates custom header and can be read only by zstd python module.As of 1.0.0.99.1 version it uses standard Zstd output, not modified.To prevent data loss there is two functions now:`compress_old`and`decompress_old`. They are works just like in old versions prior to 1.0.0.99.1.As of 1.1.4 version module build without them by default.As of 1.3.4 version these functions are deprecated and will be removed in future releases.As of 1.5.0 version these functions are removed.DISCLAIMERThese python bindings are kept simple and blunt.Support of dictionaries and streaming is not planned.LINKSZstandard:https://github.com/facebook/zstdMore full-featured and compatible with Zstandard python bindings by Gregory Szorc:https://github.com/indygreg/python-zstandardBuild from source>>> $ git clone https://github.com/sergey-dryabzhinsky/python-zstd >>> $ git submodule update --init >>> $ apt-get install python-dev python3-dev python-setuptools python3-setuptools >>> $ python setup.py build_ext clean >>> $ python3 setup.py build_ext cleanNote: Zstd legacy format support disabled by default. To build with Zstd legacy versions support - pass--legacyoption to setup.py script:>>> $ python setup.py build_ext --legacy cleanWhen using a PEP 517 builder you can useZSTD_LEGACYenvironment variable instead:>>> $ ZSTD_LEGACY=1 python -m build -wNote: Python-Zstd legacy format support removed since 1.5.0. If you need to convert old data - checkout 1.4.9.1 module version. Support of it disabled by default. To build with python-zstd legacy format support (pre 1.1.2) - pass--pyzstd-legacyoption to setup.py script:>>> $ python setup.py build_ext --pyzstd-legacy cleanIf you want to build with existing distribution of libzstd just add--externaloption. But beware! Legacy formats support state is unknown in this case. And if your version not equal with python-zstd - tests may not pass.>>> $ python setup.py build_ext --external cleanWhen using a PEP 517 builder you can useZSTD_EXTERNALenvironment variable instead:>>> $ ZSTD_EXTERNAL=1 python -m build -wIf paths to header filezstd.hand libraries is uncommon - use commonbuildparams: –libraries –include-dirs –library-dirs.>>> $ python setup.py build_ext --external --include-dirs /opt/zstd/usr/include --libraries zstd --library-dirs /opt/zstd/lib cleanInstall from pypi>>> # for Python 2.7+ >>> $ pip install zstd >>> # or for Python 3.4+ >>> $ pip3 install zstdAPIErrorStandard python Exception for zstd moduleZSTD_compress (data[, level, threads]): string|bytesFunction, compress input data block via mutliple threads, return compressed block, or raises Error.Params:data: string|bytes - input data block, length limited by 2Gb by Python APIlevel: int - compression level, ultra-fast levels from -100 (ultra) to -1 (fast) available since zstd-1.3.4, and from 1 (fast) to 22 (slowest), 0 or unset - means default (3). Default - 3.threads: int - how many threads to use, from 0 to 200, 0 or unset - auto-tune by cpu cores count. Default - 0. Since: 1.4.4.1Aliases:compress(…),dumps(…)Exception if: - level bigger than max levelMax number of threads: - 32bit system: 64 - 64bit system: 256 If provided bigger number - silemtly set maximum number (since 1.5.4.1)Since: 0.1ZSTD_uncompress (data): string|bytesFunction, decompress input compressed data block, return decompressed block, or raises Error.Support compressed data with multiple/concatenated frames (blocks) (since 1.5.5.1).Params:data: string|bytes - input compressed data block, length limited by 2Gb by Python APIAliases:decompress(…),uncompress(…),loads(…)Since: 0.1version (): string|bytesReturns this module doted version string.The first three digits are folow libzstd version. Fourth digit - module release number for that version.Since: 1.3.4.3ZSTD_version (): string|bytesReturns ZSTD library doted version string.Since: 1.3.4.3ZSTD_version_number (): intReturns ZSTD library version in format: MAJOR*100*100 + MINOR*100 + RELEASE.Since: 1.3.4.3ZSTD_threads_count (): intReturns ZSTD determined CPU cores count.Since: 1.5.4.1ZSTD_max_threads_count (): intReturns ZSTD library determined maximum working threads count.Since: 1.5.4.1ZSTD_external (): intReturns 0 of 1 if ZSTD library build as external.Since: 1.5.0.2RemovedZSTD_compress_old (data[, level]): string|bytesFunction, compress input data block, return compressed block, or raises Error.DEPRECATED: Returns not compatible with ZSTD block headerREMOVED: since 1.5.0Params:data: string|bytes - input data block, length limited by 2Gb by Python APIlevel: int - compression level, ultra-fast levels from -5 (ultra) to -1 (fast) available since zstd-1.3.4, and from 1 (fast) to 22 (slowest), 0 or unset - means default (3). Default - 3.Since: 1.0.0.99.1ZSTD_uncompress_old (data): string|bytesFunction, decompress input compressed data block, return decompressed block, or raises Error.DEPRECATED: Accepts data with not compatible with ZSTD block headerREMOVED: since 1.5.0Params:data: string|bytes - input compressed data block, length limited by 2Gb by Python APISince: 1.0.0.99.1UseModule has simple API:>>> import zstd >>> dir(zstd) ['Error', 'ZSTD_compress', 'ZSTD_external', 'ZSTD_uncompress', 'ZSTD_version', 'ZSTD_version_number', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'compress', 'decompress', 'dumps', 'loads', 'uncompress', 'version'] >>> zstd.version() '1.5.1.0' >>> zstd.ZSTD_version() '1.5.1' >>> zstd.ZSTD_version_number() 10501 >>> zstd.ZSTD_external() 0In python2>>> data = "123456qwert"In python3 use bytes>>> data = b"123456qwert">>> cdata = zstd.compress(data, 1) >>> data == zstd.decompress(cdata) True >>> cdata_mt = zstd.compress(data, 1, 4) >>> cdata == cdata_mt True >>> data == zstd.decompress(cdata_mt) True
zstdarchiver
No description available on PyPI.
zstd-asgi
A compression ASGI middleware using zstd.Built using starlette under the hood, it can be used as a drop in replacement to GZipMiddleware for Starlette or FastAPI, if you have a client that supports it.
zstdcat
Zstandard console reader
zstorage
zstorageZen storage library.
zstream
UNKNOWN
zstreams
ZStreamsZeek + Kafka + Spark + KSQL = ZStreamsZStreams is the bridge between Zeek and the latest streaming toolkits. With ZStreams you can quickly and easily start processing your Zeek output with the world's best analytic tools. Our examples will lead you through the process.Install ZStreamsStep 1:Install the Zeek Kafka plugin/package -Kafka_SetupStep 2:pip install zstreamsStep 3:Follow our set of simple examples to get startedExamples
zsvision
zsvisionzsvision is a small collection of python utilities, occasionally useful for computer vision tasks.