Saravanan666/pypi-org huggingface dataset:
Package: lz4ext
(former python-lz4)OverviewThis package provides bindings for thelz4 compression libraryby Yann Collet.Code specific to this project is covered by theBSD 3-Clause LicenseInstallThe package is hosted onPyPI:$ pip install lz4
$ easy_install lz4UsageThe library is pretty simple to use:>>> import lz4
>>> compressed_data = lz4.dumps(data)
>>> data == lz4.loads(compressed_data)
True
>>>Methods and ConstantsThe bindings provides some aliases too:>>> import lz4
>>> lz4.LZ4_compress == lz4.compress == lz4.dumps
True
>>> lz4.LZ4_uncompress == lz4.uncompress == z4.decompress == lz4.loads
True
>>> lz4.VERSION == lz4.__version__  # e.g. "0.7.0"
True
>>>Is it fast ?Yes. Here are the results on my 2011 Macbook Pro i7 with lz4.c as input data:$ python tests/bench.py
Data Size:
  Input: 24779
  LZ4: 10152 (0.41)
  Snappy: 9902 (0.40)
  LZ4 / Snappy: 1.025247
Benchmark: 200000 calls
  LZ4 Compression: 9.737272s
  Snappy Compression: 18.012336s
  LZ4 Decompression: 2.686854s
  Snappy Decompression : 5.146867sImportant noteBecause LZ4 doesn’t define a container format, the python bindings will insert the original data size as an integer at the start of the compressed payload, like most bindings do anyway (Java…)
Package: lz4-flex_py
lz4_flex python wrapperUsage>>>importlz4_flex>>>compressed=lz4_flex.compress_prepend_size(b"foo")>>>lz4_flex.decompress_size_prepended(compressed)b'foo'DevelopmentPreparations:pipinstallmaturin
python-mvenv.venvsource.venv/bin/activateInstall the package:maturindevelopTest it:python-c'import lz4_flex'Publishing to pypi:maturinpublish
Package: lz4-raw
Inspired by thepython-lz4library, this package provides yet another bindings for thelz4 compression libraryby Yann Collet. Compared to the python-lz4 library, it provides bindings to the unframed API includingLZ4_compress_default()andLZ4_decompress_safe()so that it can be used along with thepython-hadooppackage to read data for customized framing such as the Hadoop SequenceFile format.InstallThe package is hosted onPyPI:$ pip install lz4-raw
$ easy_install lz4-raw
Package: lz4unipy
Copyright (c) 2017 CrescentApricotPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: # lz4unipy## 概要`lz4unipy` は `unity-lz4` 互換の展開/圧縮を行うコマンドラインツールと簡易なライブラリです。## インストール```bashpip3 install lz4unipy```## 使い方### コマンドライン```bashlz4unipy [-h] [--dir DIR] infile [infile ...]```指定したファイルより自動的に動作モードを、パスより自動的に出力ファイル名を決定します。### ライブラリ```pythonimport lz4unipywith open("target_file.unity3d.lz4", "rb") as f:data = f.read()if lz4unipy.is_compressed(data):with open("target_file.unity3d", "wb") as w:w.write(lz4unipy.decompress(data))with open("target_file.unity3d", "rb") as f:data = f.read()if not lz4unipy.is_compressed(data):with open("target_file.unity3d.lz4", "wb") as w:w.write(lz4unipy.compress(data))```## テスト```bashgit clone git@github.com/CrescentApricot/lz4unipy.gitcd lz4unipypython3 setup.py test```### 謝辞テスト用ファイル [sample.png](/tests/sample.png) にはバンダイナムコエンターテインメント株式会社の提供するスマートフォン向けリズムゲーム、[アイドルマスターミリオンライブ！ シアターデイズ](https://millionlive.idolmaster.jp/theaterdays/)のゲーム内スクリーンショットを利用しています。この場を借りてお礼申し上げます。Platform: UNKNOWNClassifier: Programming Language :: Python :: 3Classifier: Development Status :: 4 - BetaClassifier: License :: OSI Approved :: MIT LicenseClassifier: Topic :: System :: Archiving :: CompressionClassifier: Topic :: Software Development :: Libraries :: Python Modules
Package: lzdb
The following website given a fully introduction of this package:https://docs.google.com/document/d/1tVRnCeYv3HvovK7V4Kn4B88EiWz5fmKiA_FgrsXdAAk/editIf any problem or confusion about the explaination, please comment on above website or my github：https://github.com/moenovaFor some real application of lazy-database you can find useful resources at here:https://github.com/moenova/lazy-database-application
Package: lzdeb
LZDeb - build Debian packages the lazy wayWant to install something from a debian / apt package but prebuilt packages don't exist?Build your own, the easy (and lazy) way!UsageRun (/d is a directory):$lzdebbuild/dCollect the resulting debian package file in your working directory.$lzdebbuild/d
...
$ls*.debDirectory/dshould contain these files:/d/config.yml(optional)/d/build/d/install(optional)/d/validateExample:examples/silversearcher-agCreate a debian package forthe silver searcher.lzdeb.ymlbuilder:image:ubuntu:16.04bootstrap_cmds:-apt update-apt install -y gitvalidator:image:ubuntu:18.04bootstrap_cmds:-apt updatesource:type:giturl:https://github.com/ggreer/the_silver_searcher.gitref:2.2.0pull_submodules:yesdeb_info:pkgname:silversearcher-agpkgversion:2.2.0pkgrelease:1pkglicense:Apache 2.0pkggroup:mainmaintainer:example@lzdeb.invaliddescription:"Acode-searchingtoolsimilartoack,butfaster.http://geoff.greer.fm/ag/"requires:-liblzma-dev>=5.1.1-libpcre3-dev>=2:8.38-zlib1g-dev>=1:1.2.8builderdefines the docker container within which the deb package is built.validatordefines the docker container within which the built deb is validated (install the package, may be some test commands)sourcedefines where to get the source code to be built.deb_infodefines debian package metadata to be used when creating the debian package.1.buildInstall build tools and required libraries.  Build (compile) the code.#!/usr/bin/env bashset-e

apt-getupdate
apt-getinstall-y\automake\pkg-config\libpcre3-dev\zlib1g-dev\liblzma-devcdthe_silver_searcher*/
./build.sh2.installPerform a "make install".  A debian package is built automatically based on filesystem changes.#!/usr/bin/env bashset-ecdthe_silver_searcher*/
makeinstall3.validateTry installing the built debian package.  Verify program runs.#!/usr/bin/env bashset-e

aptinstall-y./*.deb
ag-hTying it all together$lzdebbuildexample/silversearcher-ag
...spinupbuildcontainer
...
...buildscriptgetsrun
...
...installscriptgetsrun(debpackagefilecreated)...
...validatescriptgetsrun(debpackagefilegetsinstalledinfreshcontainer)...
$ls*.deb
silversearcher-ag_2.2.0-1_amd64.debInstallationInstall Python 3Install DockerInstall the pip package:$pip3installlzdebTested on MacOS.  Probably works on Linux as well.CaveatsThere are many!We will populate this section with the most important ones, as users report them.How To ContributeFork the repo.In avirtualenv:pip3 install -r requirements.txtpip3 install -r .circleci/test_requirementsHack Away!Testing:New unit tests to go intest/If you haveCircleCIaccess, make sure thetest_allworkflow passes.Otherwise, you could run tests locally (see.circleci/config.yml):unit tests:py.test --cov=lzdeb test/lint:pylint -E lzdeb testpep8:pycodestyle lzdeb testtype hint checking:mypy lzdeb test
Package: lz-drip
lz_dripProjectThelz_dripproject contains plug-ins for thedrip_feedcommand that is part of thedrip_drippackage.Thedrip_feedcommand can either take the name of the plug-in as it argument, or the name can be specified in theDRIP_DROPPERenvironmental variable.It should be noted that anyINIfile and section discussed below can be declared either asdrip_dripoptions (-iand-srespectively) or as environmental variables (DRIP_INI_FILEandDRIP_INI_SECTIONrespectively.)lz_drip:SpadeReceptionplug-inThelz_drip:SpadeReceptionplug-in is used todrip_feedSPADE bundles from a receiving dropbox, i.e. one to which a remote SPADE copies its files, to a "shadow" receiving dropbox, i.e. one from which the localSPADE reads the files. Using this plug-in avoids the shadow dropbox from becoming too full, under which circumstances the local SPADE's performance can be severely degraded.The configuration for this plugin is defined within section of theINIfile provided with the command. This section should contain the following:source: The location of the receiving dropbox;destination: The location of the "shadow" receiving dropbox; andthreshold: The maximum number of bundles allowed in the "shadow" receiving dropbox.Here is an exampleINIfile.[usdc.surf.raw.in]
source = /global/cfs/cdirs/lz/spade/receiving/surf
destination = /global/cfs/cdirs/lz/spade/receiving/surf.shadow
threshold = 100These values can also be set by environmental variables, in which chase the variable supersedes any value in theINIfile.FILE_DRIP_SOURCEFILE_DRIP_DESTINATIONFILE_DRIP_THRESHOLDsalt_arrival
Package: lzf
lzfallows reading and writing files compressed with theLZFcompression
format.To crib some of the features listed forLibLZF:Veryfast compression speeds.Mediocre compression ratios - you can usually expect about 40-50% compression
for typical binary data Easy to use (just two functions, no state attached).Freely usable (BSD-type-license)APIThis package provides reading and writing LZF data as Python file like objects.lzf.open(file,mode='r',encoding=None, errors=None)Open a LZF stream for reading or writing.filemay be a path to an on-disk file, or a file-like object open for
reading or writing (whatever you pass tomode).modemust berorwto indicate reading or writing,
optionally withbortto indicate binary or text-mode IO. If the
mode is text (the default), thenUis also accepted to turn on
universal newline mode.encodinganderrorsare as for the built-inopen()function.Note thatlzf.open()takes the Python 3 model for text IO, even on
Python 2. Unlessmodecontains'b', then the returned file-like
object will read or write Unicode strings.ExamplesTo open an on-disk LZF-compressed text file and print it linewise:import lzf

with lzf.open('/path/to/file.txt.lzf') as f:
    for line in f:
        print(line)To compress some binary data with LZF:import lzf

with lzf.open('/path/to/file.lzf', 'wb') as f:
    f.write(b'hello world')To read LZF compressedCBORstructures from a URL:import lzf
import cbor2
from urllib.request import urlopen  # Use urllib2 in Python 2

SOME_URL = 'http://example.com/data.cbor.lzf'

with lzf.open(urlopen(SOME_URL), 'rb') as f:
    print(cbor2.load(f))(You’ll needcbor2installed if you want to try this.)
Package: lzgym-tool
LZ & GYM's Python ToolAuthor: LZ & GYMExample PackageThis is a simple example about how to use lzgym's tool:from lzgym-tool import json2dict, json_writerconvert a json into a dictionarylz_dict = json2dict("example.json")write a dictionary into a jsonjson_writer("example.json", lz_dict)More info about the methods:help(json2dict)help(json_writer)
Package: lzh
can be easily to convert most of the date time to a standard format or string formatcan be easily read a large number of CSV files to a dicttypeeasy to use as most of the data returned are pandas DataFrame objectscan be easily saved as csv, excel or json filescan be inserted into MSSQL or MySQL or MongodbInstallationpip install lzhUpgradepip install lzh –upgradeQuick Startfrom lzh.feed import ReadMarketCSVFiles

ReadMarketCSVFiles(2)return:ReadMarketCSVFiles.Market
{'XX1':data(pandas.DataFrame),
'XX2':data(pandas.DataFrame),
... ...
'XXn':data(pandas.DataFrame)
}
Package: lzhtools
can be easily to convert most of the date time to a standard format or string formatcan be easily read a large number of CSV files to a dicttypeeasy to use as most of the data returned are pandas DataFrame objectscan be easily saved as csv, excel or json filescan be inserted into MSSQL or MySQL or MongodbInstallationpip install lzhUpgradepip install lzh –upgradeQuick Startfrom lzhtools.feed import ReadMarketCSVFiles

ReadMarketCSVFiles(2)return:ReadMarketCSVFiles.Market
{'XX1':data(pandas.DataFrame),
'XX2':data(pandas.DataFrame),
... ...
'XXn':data(pandas.DataFrame)
}
Package: lz-import
Lazy ImportInstallationpip install lz-import
# Or
poetry add lz-importUsage 1# File: file_takes_long_time_to_import.pyinit=initializer()classModule:...print("imported!")fromlazy_importimportlazy_importwithlazy_import():fromfile_takes_long_time_to_importimportModule# Not imported yetdefrun():Module()run()# Now Module is imported.# print imported!Module will be imported when the__call__or__getattr__methods are called.
Seetests/test_load_later.pyUsage 2# File: company.pyfromlazy_importimportlazy_importwithlazy_import():fromuserimportUserclassCompany:name="company"defget_user(self)->User:returnUser()# File: user.pyfromlazy_importimportlazy_importwithlazy_import():fromcompanyimportCompanyclassUser:name="user"defget_company(self)->Company:returnCompany()if__name__=="__main__":company=User.get_company()User will be imported when the__call__or__getattr__methods are called.This example codes are implemented in the tests folder. Seetests/test_user.pyandtests/test_company.py.NOTEKeep in mind that the class of lazy imported is not the same class with your originalUserclass. It is wrapped by another class inside oflazy_import().Only work for module or class.TODOThis library currently doesn't support follow syntax:withlazy_import():# these are actually possible but currently not implmented...importuserfromuserimportUserasuserHow it works?We can find out which files to import by parsing bytecodes inside thewithsyntax. After that, just wrap the value to be imported.
Package: lzmaffi
This is a port of the 'lzma' module included in Python 3.3 or laterby Nadeem Vawda and Per Oyvind Karlsen, which provides a Python wrapper for XZ Utils(aka LZMA Utils v2) by Igor Pavlov.Unlike backports.lzma which is a straight backport, this version uses cffi which meansit runs on PyPy without having to use the (very slow) CPyExt. It also runs perfectlywell on CPython 2.6, 2.7 or 3.To use, either `import lzmaffi as lzma', or add this at the beginning of your script:import lzmaffi.compatlzmaffi.compat.register()Then `import lzma' as usual.In order to compile this, you will need to install XZ Utils from http://tukaani.org/xz/
Package: lzmp
lzmplzmpis a simple wrapper around the Python multiprocessing module,
allowing the lazy programmer to run batches of processes.lzmp contains the classPoolwhich lets the user specify one or more
callable objects (such as functions) along with lists or argument to
process.lzmpcollects the return value of each call and return
the whole lot as a list, keeping the original submission order. For
a single type of callable, the standalone functionrunwraps the
wrapper and allows one-line parallelization. Optionally, a function
may be called on the list of compiled results.The documentation can be found at:https://lzmp.readthedocs.io/en/latest/
Package: lznlp
LiangZhiNLP Python SDKLiangZhi HTTP API 封装库（SDK）开发模式安装修改代码之后不用重新安装，立即可用最新的代码，在setup.py的同级目录下运行以下命令$pythonsetup.pydevelop打包现在在setup.py的同级目录下运行以下命令，dist目录下会生成相应文件$pythonsetup.pysdistbdist_wheel依赖根据requirements.txt安装依赖包$pipinstall-rrequirements.txt测试进行单元测试的命令如下，-v -s参数是为了在控制台输出更多的打印信息$nosetests-v-slznlp/tests/test_lznlp.py文档fasttext - pypipyahocorasick - readthedocsjieba - githubpytorchtorchtext - github参考如何打包 Python 代码BosonNLPPrint Messages With Nosetests
Package: lzo-indexer
python-lzo-indexer==================![](https://travis-ci.org/duedil-ltd/python-lzo-indexer.png)Python library for indexing block offsets within LZO compressed files. The implementation is largely based on that of the [Hadoop Library](https://github.com/twitter/hadoop-lzo). Index files are used to allow Hadoop to split a single file compressed with LZO into several chunks for parallel processing.Since LZO is a block based compression algorithm, we can split the file along the lines of blocks and decompress each block on it's own. The index is a file containing byte offsets for each block in the original LZO file.Example-------The python code below demonstrates how easy it is to index an LZO file. This library also supports indexing a string, and a method to return the individual block offsets should you need to create a file of your own format.```pythonimport lzo_indexerwith open("my-file.lzo", "r") as f:with open("my-file.lzo.index", "rw") as index:lzo_indexer.index_lzo_file(f, index)```Command-line Utility--------------------This library also includes a utility for indexing multiple lzo files, using the python indexer. This is a much faster alternative to the command line utility built into the hadoop-lzo library as it avoids the JVM.```$ bin/lzo-indexer --helpusage: lzo-indexer [-h] [--verbose] [--force] lzo_files [lzo_files ...]positional arguments:lzo_files      List of LZO files to indexoptional arguments:-h, --help     show this help message and exit--verbose, -v  Enable verbose logging--force, -f    Force re-creation of an index even if it exists```Contributions-------------I welcome any contributions, though I request that any pull requests come with test coverage.
Package: lzon
LZON (Lazy JSON)Sometimes, an API may not provide the response as a fully developed JSON object. Certain keys might need to be reparsed as JSON before you can then continue to index it. LZON should help with this. You index, and it only parses when it's relevant.Exampleimportlzonresponse=r"""{"bumble": "{\"bee\": [1, 2, 64]}"}"""data=lzon.loads(response)print(data['bumble']['bee'][2])# Should return 64
Package: lzpy
The following website given a fully introduction of this package:https://docs.google.com/document/d/1tVRnCeYv3HvovK7V4Kn4B88EiWz5fmKiA_FgrsXdAAk/editIf any problem or confusion about the explaination, please comment on above website or my github：https://github.com/moenovaFor some real application of lazy-database you can find useful resources at here:https://github.com/moenova/lazy-database-application
Package: lzr-near-api-py
near-api-pyThis is and extension of the near-api-py repositoryStatus: super rough, APIs are subject to changeA Python library for development of applications that are using NEAR platform.Installationpipinstallnear-api-pyUsage exampleSend moneynear_provider=near_api.providers.JsonProvider("https://rpc.testnet.near.org")sender_key_pair=near_api.signer.KeyPair("ed25519:[SENDER_PRIVATE_KEY]")sender_signer=near_api.signer.Signer("sender.testnet",sender_key_pair)sender_account=near_api.account.Account(near_provider,sender_signer)out=sender_account.send_money("vsab.testnet",1000)print(out)Smart contract call methodcontract_id="contract.testnet"signer_id="signer.testnet"signer_key="ed25519:[SIGNER_SECRET_KEY]"args={"counter":1,"action":"increase"}near_provider=near_api.providers.JsonProvider("https://rpc.testnet.near.org")key_pair=near_api.signer.KeyPair(signer_key)signer=near_api.signer.Signer(signer_id,key_pair)account=near_api.account.Account(near_provider,signer)out=account.function_call(contract_id,"counter_set",args)print(out)ContributionFirst, install the package in development mode:pythonsetup.pydevelopTo run tests, use nose (pip install nose):nosetestsLicenseThis repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.
Package: lzsslib
liblzssLiblzss is an small library for inflating and deflating LZSS (Lempel, Ziv,
Storer, Szymanski) buffers.The LZSS format is originally described in a paper titled"Data Compression via
Textual Substitution" published in Journal of the ACM, 29(4):928-951, 1982 by
J.A. Storer and T.G. Szymanski.InstallingInstall and update usingpip:$pipinstall-UlzsslibLinksPyPI Releases:https://pypi.org/project/lzsslib/Source Code:https://github.com/antoniovazquezblanco/lzsslibIssue Tracker:https://github.com/antoniovazquezblanco/lzsslib/issues
Package: lzstring
lz-string for python 2/3Based on the LZ-String javascript found here:http://pieroxy.net/blog/pages/lz-string/index.htmlExample>>> import lzstring
>>> x = lzstring.LZString()
>>> compressed = x.compressToBase64(u'你好') # 'gbyl9NI='
>>> x.decompressFromBase64(compressed) # '你好'Installation$ pip install lzstring
Package: lzw3
Compressor and decompressor that usesLZW
algorithmwritten in Python3.REQUIREMENTSRequires at least Python 3.5.INSTALLATIONpip install lzw3USAGETwo scripts will be installed in your local binary path (e.g./home/user/.local/bin):compressanduncompress. If you want
to invoke these scripts, ensure that your$PATHcontains the python
binary path Note that this compressor just compress regular files (i.e.
doesn’t create an archive such as .zip or .tar.gz). Anyhow, directory
can still be compressed using the option:-rCompressionThe compression phases replaces the original files with the compressed
ones, appending the extension “.Z”Compress a list of files:python3 -m lzw3.compressor doc1.txt doc2.txtCompress a directory recursively:python3 -m lzw3.compressor -r /home/user/Docs/ProjectAlternatively you can user thecompressscript as follows:compress doc1.txt doc2.txtOptions-r
    Recursively compress the files inside the directories
    within the given file list.
    If not specified, directories in the file list are skipped.

-v
    Prints information about the handled files and the percentage of
    saved space for each compressed file.

-t
    Prints the time spent for compress each file.

-k
    Keeps the original files instead of replace those with the
    compressed ones.

-f
    Force to compress and keep the compressed file, even if the size
    of the compressed file is higher than the size of the original one.

-d
    Prints debug messages.DecompressionThe decompression phases replaces the compressed files (with extension
“.Z”) with the uncompressed ones.Decompress a list of files:python3 -m lzw3.decompressor doc1.txt.Z doc2.txt.ZDecompress a directory recursively:python3 -m lzw3.decompressor -r /home/user/Docs/ProjectAlternatively you can user theuncompressscript as follows:uncompress doc1.txt.Z doc2.txt.ZOptions-r
    Recursively decompress the files inside the directories
    within the given file list.
    If not specified, directories in the file list are skipped.

-v
    Prints information about the handled files.

-t
    Prints the time spent for decompress each file.

-k
    Keeps the decompressed files after the decompression.

-f
    Force to decompress the files even if the file name
    doesn't end with ".Z".

-d
    Prints debug messages.TESTINGThe project comes with few unit tests, both on static or random
generated files. To run the tests use:python3 setup.py testLICENSELZW3 isMIT licensed.
Package: lzwfile
LZWFILEPython module for decoding lzw files. This is based directly off Mark Adler's C library for decoding lzw files.
Some slight modifications were done for my own use case.Getting Startedfromlzwfileimportdecompress# File name can be used if located within same directory,# if not please use the absolute path.file_name='compressed_file.Z'decompressed_data=decompress(file_name)NotesI'm planning on adding encoding functionality to this package as well to further my understanding
of the lzw compression algorithm.