Saravanan666/pypi-org huggingface dataset:
Package: zipe
Look help at each command.zipe only supports cp932 and utf-8 as encoding to. And no support making encrypt zip archive for now.usage: zipe [-h] [-F ENCODING] -T ENCODING [-r] [-v]
            [-x EXCLUDE | -i INCLUDE]
            ZIP_FILE ENTRY [ENTRY ...]

Zipper for not native encoded filename file

positional arguments:
  ZIP_FILE              ZIP archive
  ENTRY                 file entries

optional arguments:
  -h, --help            show this help message and exit
  -F ENCODING, --from ENCODING
                        filename encoding from(Default
                        sys.getfilesystemencoding())
  -T ENCODING, --to ENCODING
                        filename encoding to
  -r, --recursive       archive recursively
  -v, --verbose         verbose mode
  -x EXCLUDE, --exclude EXCLUDE
                        exclude file pattern in RegExp
  -i INCLUDE, --include INCLUDE
                        include file pattern in RegExpusage: unzipe [-h] [-l] [-P PASSWORD] [--force] -F ENCODING [-T ENCODING]
              [-x EXCLUDE | -i INCLUDE]
              ZIP_FILE [ENTRY [ENTRY ...]]

Unzipper for not native encoded filename file

positional arguments:
  ZIP_FILE              ZIP archive
  ENTRY                 can specify file entries

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list entries instead of extracting
  -P PASSWORD, --password PASSWORD
                        password for encrypted
  --force               extract file even if its absolute path
  -v, --verbose         verbose mode
  -F ENCODING, --from ENCODING
                        filename encoding from
  -T ENCODING, --to ENCODING
                        filename encoding to(Default
                        sys.getfilesystemencoding())
  -x EXCLUDE, --exclude EXCLUDE
                        exclude filename pattern in RegExp
  -i INCLUDE, --include INCLUDE
                        include filename pattern in RegExp
Package: zipencrypt
zipencrypt is a Python module to provideweakpassword-based
encryption for zipfiles. It is meant as a drop-in replacement for
zipfile from the standard lib and provides the counterpart to the
decryption implemented there.It is implemented in pure python and does not rely on any 3rd party libraries.Compatible to python 2.7 and 3.4+Installationpip install zipencryptThe codefromzipencryptimportZipFilewithZipFile("file.zip",mode="w")asf:f.writestr("file1.txt","plaintext",pwd=b"password")Do not use this!The standard encryption of ZIP is known to be seriously flawed (seehere).
That is probably the reason why it is not implemented in zipfile in the
standard lib. There are however legitimate use cases.
Package: ziper
ziperRust-like iterator for PythonInstallpipinstallziperUsagefromziperimportIterxs=['1','2','a','3','4','b','c']ys=[6,7,8,9]evens:list=(Iter(xs).filter(lambdax:x.isdecimal()).map(int).chain(ys).filter(lambdax:x%2==0).collect(list))assertevens==[2,4,6,8]
Package: zipexec
zipexec is a pure python alternative to zipgrepzipexec allows you to specify any command line utiliity you would like to run against a group of.zipfiles.  While zcat, zgrep and other utilities work well on gzip compressed files, I needed similar functionality on pkzip compressed files (with .zip extensions) and was unable to find a tool I liked.Execute command line utilities of your choice against the contents of zip files.Help$ zipexec -h
usage: zipexec [-h] [-c CMD_TO_RUN] path_to_zips

positional arguments:
  path_to_zips          Where are the zips to search

optional arguments:
  -h, --help            show this help message and exit
  -c CMD_TO_RUN, --cmd_to_run CMD_TO_RUN
                        Command line to run on each zipNOTE: Take care when specifying the names of files and commands that your local linux system does not expand the asterisks.Example UsageIf you only pass a path to a folder containing zip files to zip exec it will prompt you for a command$ zipexec /home/uploads/zipfiles/
What command would you like to run?: grep -R -C2 -n "search string" *If you do specify a command with -c or --command it will execute thatExample 1: grep through the content of all the zip files:$ zipexec -c 'grep -R -n -C2 "import os" *.py' /home/uploads/zipfiles/Example 2: Do a directory listing of all of the zip files that are named file*.zip$ zipexec -c 'ls -laR' /home/uploads/zipfiles/files\*.zip
Package: zipfai
<h1 align="center"><img style="vertical-align:middle" height="200"src="./docs/assets/logo.png"></h1><p align="center"><i>Bring Context to your Foundational Workflows</i></p><p align="center"><a href="https://github.com/spacemanidol/zipfai/releases">Releases</a><a href="https://www.python.org/"><img alt="Build" src="https://img.shields.io/badge/Made%20with-Python-1f425f.svg?color=purple"></a><a href="https://github.com/spacemanidol/zipfai/blob/master/LICENSE">License</a></p><h4 align="center"><p><a href="#shield-installation">Installation</a> |<a href="#fire-quickstart">Quickstart</a> |<p></h4>## :shield: Installation```bashpip install zipfai```## :fire: QuickstartThis is a small example on how you can add context to your prompts```pythonimport zipfai```📜 Checkout [citations](./references.md) for related publications.
Package: zipfanalysis
Tools in python for analysing Zipf’s law from text samples.This can be installed as a package from the python3 package library using the terminal command:>>> pip3 install zipfanalysisUsageThe package can be used from within python scripts to estimate Zipf exponents, assuming a simple power law model for
word frequencies and ranks. To use the pacakge import it usingimport zipfanalysisSimple MethodThe easiest way to carry out an analysis on a book or text file, using different estimators, is:alpha_clauset = zipfanalysis.clauset("path_to_book.txt")

alpha_pdf = zipfanalysis.ols_pdf("path_to_book.txt", min_frequency=3)

alpha_cdf = zipfanalysis.ols_cdf("path_to_book.txt", min_frequency=3)

alpha_abc = zipfanalysis.abc("path_to_book.txt")In Depth MethodConvert a book or text file to the frequency of words, ranked from highest to lowest:word_counts = zipfanalysis.preprocessing.preprocessing.get_rank_frequency_from_text("path_to_book.txt")Carry out different types of analysis to fit a power law to the data:# Clauset et al estimator
alpha_clauset = zipfanalysis.estimators.clauset.clauset_estimator(word_counts)

# Ordinary Least Squares regression on log(rank) ~ log(frequency)
# Optional low frequency cut-off
alpha_pdf = zipfanalysis.estimators.ols_regression_pdf.ols_regression_pdf_estimator(word_counts, min_frequency=2)

# Ordinary least squares regression on the complemantary cumulative distribution function of ranks
# OLS on log(P(R>rank)) ~ log(rank)
# Optional low frequency cut-off
alpha_cdf = zipfanalysis.estimators.ols_regression_cdf.ols_regression_cdf_estimator(word_counts)

# Approximate Bayesian computation (regression method)
# Assumes model of p(rank) = C prob_rank^(-alpha)
# prob_rank is a word's rank in an underlying probability distribution
alpha_abc = zipfanalysis.estimators.approximate_bayesian_computation.abc_estimator(word_counts)Development - Next StepsSpeed up abc. Current bottleneck is sampling from infinite power law. Could be sped up by considering we only need the frequency vector of ranks, not the whole sample. So for example could sample from unoform distribution then drop values into interger ranked buckets based on inverse CDF.Build in frequency rank analysis. Convert to frequency counts representation, then carry out fit on that.Add significance testingAdd ability to calcaulte x_min and truncated power laws.Speed up OLS on the cdf
Package: zipf_classifier
IntroductionZipfClassifier is a classifier that,even though in principle usable on any distribution, leverages the assumption that some kind of datasets such as as:textsimages (paper here)spoken language (paper here)follow theZipf law.Installationpipinstallzipf_classifierWorking examples and explanationAdocumentationis available with a full explanation of the classifier workings.LicenseThis package is licensed under MIT license.
Package: zipfile2
zipfile2 contains an improved ZipFile class that may be used as a 100 %
backward compatible replacement.Improvements compared to upstream zipfile stdlib:Handling of symlinks (read and write)Compatible 2.6 onwards (including 3.x), include context managerRaises an exception by default when duplicate members are detected.Special classLeanZipFileto avoid using too much memory when handling
zip files with a large number of members. Contrary to the stdlib
ZipFile, it does not create the list of all archives when opening the
file. This can save 100s of MB for zipfiles with a large number of
members.
Package: zipfile37
This is a backport of the zipfile module from Python 3.7, which contains some
improvements. Cloned from the 3.6 backport of Thomas Kluyver (https://gitlab.com/takluyver/zipfile36).Installation:pip install zipfile37Suggested usage:ifsys.version_info>=(3,7):importzipfileelse:importzipfile37aszipfile
Package: zipfile38
A backport of the zipfile module from Python 3.8, which contains notable improvements such as the “strict_timestamps” keyword argument (which enables the creation of reproducible zip archives).installation:pip install zipfile38usage:ifsys.version_info>=(3,8):importzipfileelse:importzipfile38aszipfile—shout out toThomas Kluyver’s backport for 3.6andMarkus Scheidgen’s backport for 3.7.
Package: zipfile39
zipfile39Backport of zipfile Python 3.9 (especially caae717) to older Python includingPython 2.7.This means Python 2.7 can usezf.open(name, 'w').Uses backports.lzma for ZIP_LZMA (method 14) Python2 handler.Introduces ZIP_DEFLATED64 (method 9), ZIP_DCLIMPLODED (method 10), ZIP_ZSTANDARD(method 93), ZIP_XZ (method 95) and ZIP_PPMD (method 98) handlers.ZIP_ZSTANDARD Python2 uses zstandard 0.14.1 (the last compatible version).isal / pyppmd / zipfile_deflate64 Python2 use my own backport.If isal is installed:crc32 and inflation are accelerated automatically.ZIP_DEFLATED compresslevel -10, -11, -12 and -13 are available, which correspond to isal compression level 0, 1, 2 and 3.If slz is installed:ZIP_DEFLATED compresslevel -21 is available.If codecs7z is installed:ZIP_DEFLATED/ZIP_BZIP2 compresslevel 11 - 19 are available. Enjoy 7-zip's ultimate compression on Python.RequisitesInstallation requisites:pathlib2(Python2 only)contextlib2(Python2 only)Optional requisites:backports.lzma(Python2 only)dclimplodezstandardorpyzstd(Py2 unavailable)isalPython2 needpython -m pip install git+https://github.com/cielavenir/python-isal-py2@0.11.0-py2(now this branch support macOS as well)Also seehttps://github.com/cielavenir/python-isal-py2/releases/tag/v0.11.1-py2slzcodecs7zpyppmdPython2 needpython -m pip install git+https://github.com/cielavenir/pyppmd-py2@py2Also seehttps://github.com/cielavenir/pyppmd-py2/releases/tag/v0.17.0.1zipfile_deflate64Need 0.2.0 or later.Python2 needpython -m pip install git+https://github.com/cielavenir/zipfile-deflate64@py2Also seehttps://github.com/cielavenir/zipfile-deflate64/releases/tag/v0.2.0.4orinflate64(Py2 unavailable)Test requisites:All optional requisitesbackports.tempfile(Python2 only)funcsigs(Python2 only)WheelsSome dependencies need complex build procedures. For your sake those wheels are published in actions CI.LegalI'm not sure about the license term when pyppmd / codecs7z / inflate64 is loaded (I'm not lawyer though).For pyppmd, note that PPMd code itself is public domain. Seehttps://github.com/miurahr/pyppmd/issues/5#issuecomment-892280467for detail.
Package: zipfile-dclimplode
zipfile-dclimplodeMonkey patch the standardzipfilemodule to enable DCL Implode support.DCL stands forPKWARE(R) Data Compression Library.Based onzipfile-deflate64andzipfile-zstandard, which provides similar functionality but for thedeflate64algorithm. Unlikezipfile-deflate64, this package supports both compression and decompression.Requiresdclimplodefor dclimplode bindings.Note: if you need Python2, usezipfile39instead (it is also compatible with Python3).Installationpipinstallzipfile-dclimplodeUsageAnywhere in a Python codebase:importzipfile_dclimplode# This has the side effect of patching the zipfile module to support DCL ImplodeAlternatively,zipfile_dclimplodere-exports thezipfileAPI, as a convenience:importzipfile_dclimplodeaszipfilezipfile.ZipFile(...)Compression example:importzipfile_dclimplodeaszipfilezf=zipfile.ZipFile('/tmp/test.zip','w',zipfile.ZIP_DCLIMPLODED,compresslevel=3)zf.write('large_file.img')compresslevel: 1,2,3 (binary) 11,12,13 (ascii)
Package: zipfile-inflate64
Extract Enhanced Deflate ZIP archives with Python’szipfileAPI.Installationpipinstallzipfile-inflate64UsageAnywhere in a Python codebase:importzipfile_inflate64# This has the side effect of patching the zipfile module to support Enhanced DeflateAlternatively,zipfile_inflate64re-exports thezipfileAPI, as a convenience:importzipfile_inflate64aszipfilezipfile.ZipFile(...)Design RationaleThe ProblemRecent versions of Microsoft Windows Explorer
[use Deflate64 compression when creating ZIP files larger than 2GB](https://github.com/dotnet/runtime/issues/17802#issuecomment-231808916).
With the ubiquity of Windows and the ease of using “Sent to compressed folder”, a majority of newly-created large
ZIP files use Deflate64 compression.SolutionPython package [inflate64](https://pypi.org/project/inflate64/) provide compression(deflate) and decompression(inflate)
by Enhanced Deflate, aka Deflate64, procedure.To manage ZIP archive extraction operations, the Python standard library
[zipfile](https://docs.python.org/3/library/zipfile.html) module provides the essential features and is already
ubiquitous in availability and usage. However, zipfile is difficult to extend, as it hardcodes many conditionals for
compression formats and does not provide capabilities for easily augmenting or replacing parts of it. Monkey-patching
can overcome some of these problems, and the promise of a drop-in, API-compatible patch to a standard library module
outweighed the engineering benefits of basing a solution off a more naturally extensible third-party ZIP manipulation
package.HistoryZipfile-deflate64 realize extraction of zipfile compressed with DEFLATE64(tm) algorithm by binding with infback9
extension in zlib.zipfile-inflate64 is a fork that use inflate64 python package to realize compress and decompress of archives.Copyright & Licensezipfile-inflate64 is distributed under GNU General Public License Version 3.0 or (in your choice) later.zipfile-deflate64 is distributed under Apache-2.0 license.
which authored by Kitware, Inc.
Package: zipfile-isal
zipfile-isalMonkey patch the standardzipfilemodule to enable accelerated deflate support via isal.Based onzipfile-deflate64andzipfile-zstandard, which provides similar functionality but for thedeflate64algorithm. Unlikezipfile-deflate64, this package supports both compression and decompression.Requiresisal(andslzoptionally).Note: if you need Python2, usezipfile39instead (it is also compatible with Python3).Installationpipinstallzipfile-isalUsageAnywhere in a Python codebase:importzipfile_isal# This has the side effect of patching the zipfile module to support isalAlternatively,zipfile_isalre-exports thezipfileAPI, as a convenience:importzipfile_isalaszipfilezipfile.ZipFile(...)Compression example:importzipfile_isalaszipfilezf=zipfile.ZipFile('/tmp/test.zip','w',zipfile.ZIP_DEFLATED,compresslevel=-12)zf.write('large_file.img')compresslevel:-10, -11, -12, -13 correspond to isal 0, 1, 2, 3-21 corresponds to slz11 to 19 correspond to 7-zip 1-9
Package: zipfile-ppmd
For zipfile-xz information, see xz branch.zipfile-ppmdMonkey patch the standardzipfilemodule to enable PPMd support.Based onzipfile-deflate64andzipfile-zstandard, which provides similar functionality but for thedeflate64algorithm. Unlikezipfile-deflate64, this package supports both compression and decompression.Requirespyppmdfor ppmd bindings. Note that 0.16.0+ is required, which is not released yet. Please dopython3 -m pip install git+https://github.com/miurahr/pyppmd.Note: if you need Python2, usezipfile39instead (it is also compatible with Python3).Installationpipinstallzipfile-ppmdUsageAnywhere in a Python codebase:importzipfile_ppmd# This has the side effect of patching the zipfile module to support PPMdAlternatively,zipfile_ppmdre-exports thezipfileAPI, as a convenience:importzipfile_ppmdaszipfilezipfile.ZipFile(...)Compression example:importzipfile_ppmdaszipfilezf=zipfile.ZipFile('/tmp/test.zip','w',zipfile.ZIP_PPMD,compresslevel=5)zf.write('large_file.img')
Package: zipfile-xz
zipfile-xzMonkey patch the standardzipfilemodule to enable XZ support.Based onzipfile-deflate64andzipfile-zstandard, which provides similar functionality but for thedeflate64algorithm. Unlikezipfile-deflate64, this package supports both compression and decompression.Note: if you need Python2, usezipfile39instead (it is also compatible with Python3).Note: XZ is based on LZMA2, so the compression ratio will be similar to ZIP_LZMA.Installationpipinstallzipfile-xzUsageAnywhere in a Python codebase:importzipfile_xz# This has the side effect of patching the zipfile module to support XZAlternatively,zipfile_ppmdre-exports thezipfileAPI, as a convenience:importzipfile_xzaszipfilezipfile.ZipFile(...)Compression example:importzipfile_xzaszipfilezf=zipfile.ZipFile('/tmp/test.zip','w',zipfile.ZIP_XZ,compresslevel=6)zf.write('large_file.img')
Package: zipfile-zstd
zipfile-zstdMonkey patch the standardzipfilemodule to enable Zstandard support.Based onzipfile-deflate64, which provides similar functionality but for thedeflate64algorithm. Unlikezipfile-deflate64, this package supports both compression and decompression.Requirespython-zstandardfor libzstd bindings.Installationpipinstallzipfile-zstdUsageAnywhere in a Python codebase:importzipfile_zstd# This has the side effect of patching the zipfile module to support ZstandardAlternatively,zipfile_zstdre-exports thezipfileAPI, as a convenience:importzipfile_zstdaszipfilezipfile.ZipFile(...)Compression example:importzipfile_zstdaszipfilezf=zipfile.ZipFile('/tmp/test.zip','w',zipfile.ZIP_ZSTANDARD,compresslevel=19)zf.write('large_file.img')Dictionaries and advanced compression parameters are not supported, sorry.
Package: zipfly
ZipFlyZipFly is a zip archive generator based on zipfile.py.
It was created to generate very large ZIP archives for immediate sending out to clients, or for writing large ZIP archives without memory inflation.RequirementsPython 3.6+ Addedsupportfor writing to unseekable streams.Installpip3 install zipflyBasic usage, compress on-the-fly during writesUsing this library will save you from having to write the Zip to disk. Some data will be buffered by the zipfile deflater, but memory inflation is going to be very constrained. Data will be written to destination by default at regular 32KB intervals.ZipFlydefaults attributes:paths:[ ]mode:(write) wchunksize:(bytes) 32768compression:StoredallowZip64:Truecompresslevel:Nonestoresize:(bytes) 0encode:utf-8pathslist of dictionaries:.fsShould be the path to a file on the filesystemn(Optional)Is the name which it will have within the archive(by default, this will be the same asfs)importzipflypaths=[{'fs':'/path/to/large/file'},]zfly=zipfly.ZipFly(paths=paths)generator=zfly.generator()print(generator)# <generator object ZipFly.generator at 0x7f74d52bcc50>withopen("large.zip","wb")asf:foriingenerator:f.write(i)ExamplesStreaming multiple files in a zip withDjangoorFlaskSend forth large files to clients with the most popular frameworksCreate pathsEasy way to create the arraypathsfrom a parent folder.Predict the size of the zip file before creating itUse theBufferPredictionSizeto compute the correct size of the resulting archive before creating it.Streaming a large fileEfficient way to read a single very large binary file in pythonSet a commentYour own comment in the zip file
Package: zipfreeinfo
zipfreeinfoProvided a zip code, you are given information about that location.Free software: MIT licenseDocumentation:https://zipfreeinfo.readthedocs.io.FeaturesProvides city, state, latitude/longitude data for a given zip codeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-07-19)First release on PyPI.
Package: zipfs
zipfCLI tool to directly zip several files/folders or an existing folderMake a zip from list of files/folders with or without specifying the archive name ("%Y_%m_%d-%H_%M_%S.zip" if not specified) or from an existing folder.InstallationWithpip:
sudopip3installzipfs

Withyay:
yay-azipf

Withyaourt:
yaourt-azipfCompatibilitypython >= 3Usagezipf / zipper[F_PATH_01 F_PATH_02 ...] [ARCHIVE_NAME]options:-h, --helpshow this help message and exitExamplesForhelp:zipf-h
or
rt--helpMake a zip archive from 3 files:zipftiti/toto.jpgtiti/tutu.jpgtata.txtGiving the2019_05_15-17_25_44.ziparchiveMake a zip archive from 2 files and one folder with specifying the archive name (work):zipftiti/toto.jpgtiti/tata.txtworkGiving thework.ziparchive
Package: ziphyr
ZiphyrZiphyr is an on-the-fly zip archiving applied on a streamed file source, with optional on-the-fly encryption.FeaturesDisclaimer:the zip-native cryptography is unsecureStreamed file turned into a streamed zipCan be used password-less for a non-encrypted zip streamOr with a password to apply on-the-fly zipcrypto to the streamRetro-compatibility for py35 with writable ZipInfo portInstall$pipinstallziphyrUsagefromziphyrimportZiphyr# init the Ziphyr objectz=Ziphyr(b'infected')# z = Ziphyr() for crypto-less usage# prepare it for a specific file, from path or metadata directlyz.from_filepath(filepath)# consume the generator to get the encrypted ziped chunkforkinz.generator(source):passTest$python-munittest-vtests/*.pyContributingContributions are welcome and are always greatly appreciated. Every little bit helps and credit will always be given. You can contribute in many ways:reporting a bugsubmitting feedbackhelping fix bugsimplementing new featureswritting better documentationRemember that before submitting a pull request, you should if relevant include tests and update documentation.Credits and referenceszip-relatedPython 3 zipfilePKWARE's .ZIP File Format SpecificationUnderlying worksThe following works served as sources of inspiration or examples for implementation.devthat/zipencrypt(MIT license)Ivan Ergunov's zipfile_generator(MIT license)CookiecutterThis package was kickstarted withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: zip-import
zip_import推荐(最新的版本)pipinstallhttps://github.com/cn-kali-team/zip_import/archive/master.zip内存加载Python模块importioimportsysimportzipfilefromzip_importimportZipPathFinderdef_get_zip(path,password=None):withopen(path,"rb")asf:zip_bytes=io.BytesIO(f.read())zip_instantiation=zipfile.ZipFile(zip_bytes)ifpasswordisnotNone:zip_instantiation.setpassword(pwd=bytes(str(password),'utf-8'))returnzip_instantiationsys.meta_path.append(ZipPathFinder(zip_path='zip://pocsuite3.zip',zip_ins=_get_zip(path='pocsuite3.zip',password="11")))importpocsuite3print(dir(pocsuite3))zip_path随意字符串，zip_ins是zipfile.ZipFile返回的实例化对象