Saravanan666/pypi-org huggingface dataset:
Package: lhe
Python library supporting level-4 homomorphic encryption, implemented aslifted ElGamal (level-2 HE) on BN254and “boost” it usingthe Catalano-Fiore transformation.Installation and UsageThis library is available as apackage on PyPI:python -m pip install lheThe library can be imported in the usual way:from lhe import *The library exports everything needed to perform level-4 homomorphic encryption:>>>fromlheimportkeygen,encrypt,decrypt# A secret key is given to recipient and its corresponding public key is given to contrubutors.>>>sk,pk=keygen()# Contributors encrypt their data using that very same public key they have recieved.>>>ct1=encrypt(pk,1)>>>ct2=encrypt(pk,2)>>>ct3=encrypt(pk,96)>>>ct4=encrypt(pk,200)# Compute party operates on those contributed ciphertexts.>>>ct5=(ct1+ct2)*(ct3+ct4)# The recipient of the computation decrypts the resulting ciphertext of the computation.>>>pt=decrypt(sk,ct5)# Assuming the result is not too large of a number, it is resolved exactly.>>>int(pt)888>>>fromlhe.advancedimport*>>>sk1,pk1=keygen1()>>>sk2,pk2=keygen2()>>>>>>ct1=encrypt1(pk1,3)>>>ct2=encrypt2(pk2,222)>>>>>>ct3=multiply(ct1,ct2)>>>>>>print("This may take a bit of time for large plaintexts...")Thismaytakeabitoftimeforlargeplaintexts...>>>>>>pt=decryptGT(ct3,sk1,sk2)>>>>>>print(pt)666DevelopmentAll installation and development dependencies are managed usingsetuptoolsand are fully specified insetup.py. Theextras_requireparameter is used tospecify optional requirementsfor various development tasks. This makes it possible to specify additional options (such asdocs,lint, and so on) when performing installation usingpip:python -m pip install .[docs,lint]DocumentationThe documentation can be generated automatically from the source files usingSphinx:python -m pip install .[docs]
cd docs
sphinx-apidoc -f -E --templatedir=_templates -o _source .. ../setup.py && make htmlTesting and ConventionsAll unit tests are executed and their coverage is measured when usingpytest(seesetup.cfgfor configuration details):python -m pip install .[test]
python -m pytestAlternatively, all unit tests are included in the module itself and can be executed usingdoctest:python lhe/lhe.py -vStyle conventions are enforced usingPylint:python -m pip install .[lint]
python -m pylint lheContributionsIn order to contribute to the source code, open an issue or submit a pull request on theGitHub pagefor this library.VersioningBeginning with version 0.1.0, the version number format for this library and the changes to the library associated with version number increments conform withSemantic Versioning 2.0.0.PublishingThis library can be published as apackage on PyPIby a package maintainer. First, install the dependencies required for packaging and publishing:python -m pip install .[publish]Remove any old build/distribution files. Then, package the source into a distribution archive using thewheelpackage:rm -rf dist *.egg-info
python setup.py clean
python setup.py sdist bdist_wheelFinally, increment the version and upload the package distribution archive toPyPIusing thetwinepackage:python -m twine upload dist/*
Package: lhe2sqlite
lhe2sqliteSimple utility to convert LesHouchesEvents files to a sqlite databaseSetupTo run, simply install the packagepipinstalllhe2sqlite[--user]Then run with:convertlhe2sqliteinput.lheoutput.sqlite3Then you can examine the content with either stright SQL or your analysis tool of choice (eg pandas).SchemaThe resulting database has just 2 tables,event, andparticlewith a one-to-many relationship between them.CREATETABLEevent(event_numberINTEGERPRIMARYKEY,procIdINTEGER,weightFLOAT,scaleFLOAT,aqedFLOAT,aqcdFLOAT);CREATETABLEparticle(event_numberINTEGERREFERENCESevent(event_number),pdgIdINTEGER,statusINTEGER,mother1INTEGER,mother2INTEGER,color1INTEGER,color2INTEGER,pxFLOAT,pyFLOAT,pzFLOAT,eFLOAT,mFLOAT,lifetimeFLOAT,spinFLOAT);
Package: lhereader
lhereaderA Python module to read LHE files. Originally bydiptaparna, significantly rewritten by me. No dependency on ROOT, requires python version >= 3.6.Usage example:importnumpyasnpfromlhereaderimportLHEReaderreader=LHEReader('path/to/file.lhe')# Mediator mass in each eventmmed=[]counter=0foriev,eventinenumerate(reader):# Find DM particlesdm=filter(lambdax:abs(x.pdgid)==52,event.particles)# Sum over all DM four-momenta in the eventcombined_p4=Noneforp4inmap(lambdax:x.p4(),dm):ifcombined_p4:combined_p4+=p4else:combined_p4=p4mmed.append(combined_p4.mass)print(f'Mean mediator mass:{np.mean(mmed)}')print(f'Median mediator mass:{np.median(mmed)}')Treatment of weightsThe parser assumes that each weight XML element has an attribute calledidthat uniquely identifies the weight per event. In practical terms, each entry should look roughly like this:<wgt id='some string'> 123456.7 </wgt>Weights are read in one of two modes:listordict, which can be set via theweight_modeargument to theLHEReaderconstructor. In the first case, weights are returned as an unlabelled list in the order of appearance. In the second case, weights are returned as a dictionary per event, which theidattribute serving as the key, and the weight as the value.The weights can easily be filtered using theweight_regexargument. Only weights with anidmatching this regular expression will be returned.In case noidattribute can be found, thedictmode, as well as filtering are not supported
Package: lhf
LHF: Lightweight Homology FrameworkLHF is a homology framework designed for enabling modular pipelines for preprocessing and experiments around computing persistent homology.
The base pipelines enable LHF to compute persistence intervals of an input point cloud by evaluating the distance matrix, building the
simplicial complex, and reducing the complex to identify the persistence intervals at different dimensions.Additional pipelines have been created for preprocessing, approximations of the boundary matrix, approximate simplicial complexes
representing the input point cloud, boundary extraction, and upscaling based on previous studies detailed in several of the references
below. The intent for LHF is to provide a modular framework to continue exploring, developing, and evaluating mechanisms for approximating
or optimizing the computation of persistent homology over an input point cloud.The python interface to LHF, available frompypi, uses ctypes to expose the LHF shared object library. This enables python users
to call the LHF library on data and retrieve the entire pipepacket object used by LHF.Installing:pip install lhfDocumentation:LHF docs are included with the source repository and built with doxygen. To build and view the docs, clone theLHF github repository. Build the documentation from the root folder using:doxygenDoxygen creates both HTML and Latex documentation in thelhf/docsfolder. For HTML, navigate to index.html and open in a web browser
to view the class documentation of both the python interface and the LHF cpp library.Examples:Run PH on input dataimport lhf
   import tadasets

   data = tadasets.dsphere(n=50, d=5, r=1, noise=0.1) 
   pyLHF = lhf.createPipeline()

   #Set LHF args
   pyLHF.config["epsilon"] = 1.0
   pyLHF.config["dimensions"] = 3

   boundaryPis, pipePacket, elapsed = pyLHF.runPH(data)Plot the output in several waysimport lhf
   import tadasets
   import numpy as np

   data = tadasets.dsphere(n=50, d=5, r=1, noise=0.1) 
   pyLHF = lhf.createPipeline()

   boundaryPis, pipePacket, elapsed = pyLHF.runPH(data)

   #Remove boundary labels from the PIs
   pis = np.array([[z[0], z[1], z[2]] for z in boundaryPis])

   LHF.OutputAnalysis.persistenceDiagram(pis)
   LHF.OutputAnalysis.barcodeDiagrams(pis)
   LHF.OutputAnalysis.bettiCurve(pis)Run Partitioned Persistent Homologyimport lhf
   import tadasets

   data = tadasets.dsphere(n=50, d=5, r=1, noise=0.1) 
   pyLHF = lhf.createPipeline()

   #Set LHF args
   pyLHF.config["epsilon"] = 1.0
   pyLHF.config["dimensions"] = 3
   pyLHF.config["mode"] = "iterUpscale"
   pyLHF.config["preprocessor"] = "kmeans++"
   pyLHF.config["clusters"] = 20

   boundaryPis, pipePacket, elapsed = pyLHF.runPH(data)Run PH on Weighted Alpha Compleximport lhf
   import tadasets

   data = tadasets.dsphere(n=50, d=5, r=1, noise=0.1) 
   pyLHF = lhf.createPipeline()

   #Set LHF args
   pyLHF.config["epsilon"] = 1.0
   pyLHF.config["dimensions"] = 3
   pyLHF.config["mode"] = "weightedAlpha"

   boundaryPis, pipePacket, elapsed = pyLHF.runPH(data)
Package: lholipop
lholipopTheLepto-Hadronic ObservationaL Intrinsic Populationsynthesis framework allows for
multimessenger data from photons, neutrinos, and cosmic-rays to be generated by
folding the multi-species output of theSOPRANOradiative code through
various instrument responses (e.g. photometric optical telescopes, x-ray
telescaopes, Fermi-LAT, IceCube). The intrinsic inputs for each observations are
sampled from an input cosmological population usingpopsynth, then fed to
SOPRANO resulting in fluxes of various species which can then be converted to
data via instrument responses and selection effects applied.The modeling and reconstruction of both spectra and observations use a
combination of neural networks for speed. Datasets can be analyzed with 3ML to
produce reduced observables or combined in a high-level analysis to assess
association properties.Free software: GNU General Public License v3Documentation:https://lholipop.readthedocs.io.FeaturesTODOCredits
Package: lhorizon
lhorizon helps you find things in the Solar System. It is built around a thick Python wrapper for the Jet Propulsion Laboratory (JPL) Horizons service. Horizons, provided by JPL’s Solar System Dynamics Group (SSD), is one of the only sources in the world that offers no-assembly-required high-precision data on the relative positions and velocities of almost every known body in the Solar System. lhorizon offers tools to query Horizons for data, parse its responses into useful Python objects, and smoothly incorporate them into bulk calculation and transformation workflows.
Package: lhp
Python: Asynchronous client for the Länderübergreifendes Hochwasserportal (LHP) API.Asynchronous client for the Länderübergreifendes Hochwasserportal (LHP) API.AboutLänderübergreifendes Hochwasserportal (LHP) offers free APIs for open-source developers and
non-commercial use. No API key is required. You can start using it immediately!InstallationpipinstalllhpUsageimportasynciofromlhpimportLHPClientasyncdefmain():"""Show example on using the LHP API client."""asyncwithLHPClient()aslhp_client:currentWaterLevel=awaitlhp_client.currentwaterlevel(pgnr="SH_111015",)print(currentWaterLevel)if__name__=="__main__":asyncio.run(main())Changelog & ReleasesThis repository keeps a change log usingGitHub's releasesfunctionality. The format of the log is based onKeep a Changelog.Releases are based onSemantic Versioning, and use the format
ofMAJOR.MINOR.PATCH. In a nutshell, the version will be incremented
based on the following:MAJOR: Incompatible or major changes.MINOR: Backwards-compatible new features and enhancements.PATCH: Backwards-compatible bugfixes and package updates.ContributingThis is an active open-source project. We are always open to people who want to
use the code or contribute to it.We've set up a separate document for ourcontribution guidelines.Thank you for being involved! :heart_eyes:Setting up development environmentThis Python project is fully managed using thePoetrydependency
manager. But also relies on the use of NodeJS for certain checks during
development.You need at least:Python 3.8+PoetryNodeJS 14+ (including NPM)To install all packages, including all development requirements:npminstall
poetryinstallAs this repository uses thepre-commitframework, all changes
are linted and tested with each commit. You can run all checks and tests
manually, using the following command:poetryrunpre-commitrun--all-filesTo run just the Python tests:poetryrunpytestAuthors & contributorsThe original setup of this repository is byEmbeddedFiedel.For a full list of all authors and contributors,
checkthe contributor's page.LicenseMIT LicenseCopyright (c) 2023 EmbeddedFiedelPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, 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 THE
SOFTWARE.
Package: lhs
DescriptionA Latin hypercube sampling framework that is primarily intended to support scenario modelling.
See theonline documentationfor details.LicenseThe code is distributed under the terms of theBSD 3-Clause license(seeLICENSE), and the documentation is distributed under the terms of theCreative Commons BY-SA 4.0 license.InstallationTo install the latest release:pip install lhsTo install the latest development version, clone this repository and run:pip install .
Package: lh-tool
lh-tool PackageThis is a tool package.Updates2023.12.05: Add CI/CD2023.06.30: Add image channel conversion between imageio and cv22023.06.12: Fix the bug that the ParallelProcess iterator returns results in the wrong order2023.06.11: Add ParallelProcess and AsyncMultiProcess iteratorToolsimage2imageimage2videoimage2gifimage2pdfvideo2imagepdf2imageplay_imageconcat_imageexcel2latexexcel2markdowncompress_pdfstartuprename_postfixInstallInstalling from sourcegitclonehttps://github.com/lh9171338/lh-tool.gitcdlh-tool

py-mbuild

pipinstalldist/lh_tool-1.8.0-py3-none-any.whlInstall from the Python Package Index (PyPI)pipinstalllh_tool
Package: lhub_integ
lhub_integPython package to shim basic scripts to work with integration machinery.
This package requires Python 3.6:# Optional: install Python 3.6 with pyenvv
brew install pyenv
pyenv install 3.6.6
pyenv init # Follow the instructions
pyenv local 3.6.6
python --versionpip install lhub_integUsage (as an integration writer)To write a Python script that is convertible into an integration:Create a directory that will contain your integrationInstall lhub_integ as a local package:pip install lhub_integPython scripts must provide an entrypoint function with some number of arguments. These arguments will correspond to columns
in the input data. The function should return a Python dictionary that can be serialized to JSONdefprocess(url,num_bytes:int):return{'output':url+'hello'}Specifying DependenciesYou must create arequirements.txtfile specifying your dependencies. To create a dependency bundle run:$ bundle-requirementsThis script is provided when you install lhub_integ.PublishingYou will need the PyPi username and password that are in 1Password (search for PyPi)Bump the version in pyproject.tomlpoetry publish --build
Package: lhutils
lhutils对常用代码进行封装，防止自己重复造轮子。github:https://github.com/tasbox/lhutils.git官方文档:https://packaging.python.org/en/latest/tutorials/packaging-projects/pypi:https://pypi.org/https://pypi.tuna.tsinghua.edu.cn/simple秒转时间defsec2time(seconds:int):"""秒转时间:param seconds: 秒:return>>> sec2time(60)00:01:00>>> sec2time(60*60)01:00:00>>> sec2time(60*60*24)1 days, 00:00:00"""下载文件并保存defdownload_file(url:str,file:str,cache=True,unbroken=True,**kwargs):"""下载文件并保存:param url: 网络文件地址:param file: 本地文件地址:param cache: 把本地文件作为缓存条件，检查缓存是否存在，如果存在就不会下载网络文件:param unbroken: 检查下载的文件的完整性，防止因为网络问题导致文件下载完整。:param **kwargs: requests(..., **kwargs)"""
Package: lhvqt
Learnable Harmonic Variable-Q Transform (LHVQT)Implements a frontend filterbank learning module which can be initialized with complex weights for a Variable-Q Transform (lvqt_orig.py). Several techniques and variations of the module are also implemented, including:Multi-channel (harmonic) structure (lhvqt.py)Real-only weights (lvqt_real.py)Hilbert Transform for analytic filters (lvqt_hilb.py)Harmonic comb initialization (lhvqt_comb.py)Variational dropout for 1D convolutional layer (variational.py)The repository was created for my Master's Thesis,End-to-End Music Transcription Using Fine-Tuned Variable-Q Filterbanks.
It has since been updated with various improvements, and to support my new work,Learning Sparse Analytic Filters for Piano Transcription.InstallationStandard (PyPI)Recommended for standard/quick usagepip install lhvqtCloning RepositoryRecommended for running examples or making experimental changes.git clone https://github.com/cwitkowitz/lhvqt
pip install -e lhvqtUsageSeveral examples of instantiation, inference, and visualization are provided under theexamplessub-directory. A full-blown training, visualization, and evaluation example for piano transcription can be found athttps://github.com/cwitkowitz/sparse-analytic-filters.CitePlease cite whichever is more relevant to your usage.SMC 2022 Paper@inproceedings{cwitkowitz2022learning,
  title     = {Learning Sparse Analytic Filters for Piano Transcription},
  author    = {Frank Cwitkowitz and Mojtaba Heydari and Zhiyao Duan},
  year      = 2022,
  booktitle = {Proceedings of Sound and Music Computing Conference (SMC)}
}Master's Thesis@mastersthesis{cwitkowitz2019end,
  title   = {End-to-End Music Transcription Using Fine-Tuned Variable-{Q} Filterbanks},
  author  = {Cwitkowitz, Frank},
  year    = 2019,
  school  = {Rochester Institute of Technology}
}
Package: li
liis a tool to quickly fetch a license.When finishing up a project, you had two choices to fetch your license:Go to some previous projects of yours and get the license you used there. Then check if the year of the license is still valid, else change it. Estimated time: ~30 seconds.Go online and use a search engine to find the license of your choice, in plain-text. Naturally, you click on the wrong link about 13 times before you find a simple plain-text version of the license, for you to copy. Then replace the <year> and <author> fields with your data. Estimated time: ~1-2 minutes.I propose the following solution:$li-kmit-a"Your Name">LICENSEEstimated time: ~5 seconds.You can also pass a year with-y, but I reckon you’ll be happy with the
default value being the current year. The best thing is: your input is cached under$HOME/.license, so next time, all you need to type is:$li>LICENSEEstimated time: ~1 second. Estimated happiness: over 9000. You’re welcome.InstallingYou can grablioff PyPI:$pipinstallliLicenseThis project is licensed under the MIT-License.AuthorsPeter Goldsborough &cat:heart:
Package: liaa
LiaaA Python-based Distributed Hash Table!This is a fork of bmuller's original repo!This library is an asynchronous Python implementation of theKademlia distributed hash table.  It uses theasyncio libraryin Python 3 to provide asynchronous communication.  The nodes communicate usingRPC over UDPto communiate, meaning that it is capable of working behind aNAT.This library aims to be as close to a reference implementation of theKademlia paperas possible.Installationpip install kademliaUsageThis assumes you have a working familiarity withasyncio.Assuming you want to connect to an existing network:importasynciofromliaa.networkimportServerloop=asyncio.get_event_loop()# Create a node and start listening on port 5678node=Server()loop.run_until_complete(node.listen(5678))# Bootstrap the node by connecting to other known nodes, in this case# replace 123.123.123.123 with the IP of another node and optionally# give as many ip/port combos as you can for other nodes.loop.run_until_complete(node.bootstrap([("123.123.123.123",5678)]))# set a value for the key "my-key" on the networkloop.run_until_complete(node.set("my-key","my awesome value"))# get the value associated with "my-key" from the networkresult=loop.run_until_complete(node.get("my-key"))print(result)Initializing a NetworkIf you're starting a new network from scratch, just omit thenode.bootstrapcall in the example above.  Then, bootstrap other nodes by connecting to the first node you started.See the examples folder for a first node example that other nodes can bootstrap connect to and some code that gets and sets a key/value.LoggingThis library uses the standardPython logging library.  To see debut output printed to STDOUT, for instance, use:importlogginglog=logging.getLogger('liaa')log.setLevel(logging.DEBUG)log.addHandler(logging.StreamHandler())Running TestsTo run tests:pip install -r dev-requirements.txt
python -m unittestReporting IssuesPlease report all issueson github.Fidelity to Original PaperThe current implementation should be an accurate implementation of all aspects of the paper save one - in Section 2.3 there is the requirement that the original publisher of a key/value republish it every 24 hours.  This library does not do this (though you can easily do this manually).
Package: liable
In what followspython3is an alias forpython3.6or any later
version.InstallationInstall the latestpip&setuptoolspackages versionspython3-mpipinstall--upgradepipsetuptoolsReleaseDownload and install the latest stable version fromPyPIrepositorypython3-mpipinstall--upgradeliableDeveloperDownload and install the latest version fromGitHubrepositorygitclonehttps://github.com/lycantropos/liable.gitcdliablepython3setup.pyinstallBumping versionInstallbumpversion.Choose which version number category to bump followingsemver
specification.Test bumping versionbumpversion--dry-run--verbose$VERSIONwhere$VERSIONis the target version number category name, possible
values arepatch/minor/major.Bump versionbumpversion--verbose$VERSIONNote: to avoid inconsistency between branches and pull requests,
bumping version should be merged intomasterbranch as separate pull
request.Running testsPlain./run-plain-tests.sh-r$PATHS_TO_MODULESwhere$PATHS_TO_MODULESis a list of whitespace-separated paths
(absolute or relative) to targetPythonmodules (e.g.liable).
Flag-r(or its analogue--recursive) says to search
in givenPythonpaths recursively.InsideDockercontainerdocker-composeupInsideDockercontainer with remote debugger./set-dockerhost.shdocker-composeupBash script (e.g. can be used inGithooks)./run-tests.sh
Package: lia-cli
liaTable of ContentsWhy?What?InstallationUsageWhy?Remember code is poetry. And we write out own story. And for this, we need a support.Without a support, all your efforts will fail. A support takes care we do all the necessary things we would not find time during battles. We need a support. So we askedliato join us.She protects us from malicious adversaries, and heals our organization by making our poetry better and thereby our story.What?liais the best support you can hope for. She helps us to maintain our ship, fight enemies, and win customers.liais all we could hope for.Installationpip install liaUsagelia heal package_name
Package: liamcloud
# 服务 liamcloud## 目前提供的功能### 聊天机器人发消息 mkcloud.robot.chat(‘哈哈哈哈’)切换中英文服务 mkcloud.robot.setLanguage(‘en’)### MqTT功能导入方式：from mkcloud.mqtt import mqttMQTT连接mqtt.connect()信息发送mqtt.publish_message(“topic”, “messages”)信息接收def callback(topic, data): print(“CallBack -Received”, data, “topic:”, topic)mqtt.subscribe_message(“topic”,callback)
Package: liams-simple-scaffold
ScaffoldProgram to make a very simple python project scaffold based onhttps://packaging.python.org/tutorials/packaging-projects/andhttps://python-packaging.readthedocs.io/en/latest/minimal.htmlGetting StartedNAPrerequisitesNARequiredPython 3OptionalNAInstallingpip inatallRunning the programPlease see the WIKIAuthorsLiam McIntyre-https://github.com/shimbalama/LicenseThis project is licensed under the MIT License. See LICENSEAcknowledgmentsNA