Saravanan666/pypi-org huggingface dataset:
Package: la-catch
la-catchDecorator and context manager to catch exception(s) and call a function to handle the error.installpip install la-catchusageThere is two ways to usecatch:Context ManagerDecoratorcontext managerCatch exception and do nothing:fromla_catchimportCatchdeffunc():withCatch(TypeError):raiseTypeError("example")Catch exception and call callback passing exception:fromla_catchimportCatchdefon_error(exception):print(exception)deffunc():withCatch(TypeError,on_error):raiseTypeError("example")Catch exception and call callback passing keywords arguments and exception:fromla_catchimportCatchdefon_error(message,exception):print(message,exception)deffunc():withCatch(TypeError,on_error,"WARNING:"):raiseTypeError("example")Catch multiple exceptions:fromla_catchimportCatchdeffunc():withCatch((TypeError,FileNotFoundError)):raiseFileNotFoundError("example")decoratorMake sure that the callback signature identical to the function signature.Catch exception and returnNone:fromla_catchimportCatch@Catch(TypeError)deffunc():raiseTypeError("example")Catch exception and return a value:fromla_catchimportCatch@Catch(TypeError,10)deffunc():raiseTypeError("example")Catch exception and call callback passing exception:fromla_catchimportCatchdefon_error(exception):print(exception)@Catch(TypeError,on_error)deffunc():raiseTypeError("example")Catch exception and call callback passing decorated function arguments and exception:fromla_catchimportCatchdefon_error(message,exception):print(message,exception)@Catch(TypeError,on_error)deffunc(message="WARNING:"):raiseTypeError("example")Chain catchs:fromla_catchimportCatchdefon_file_not_found_error(exception):print(exception)defon_typerror(exception):print(exception)@Catch(FileNotFoundError,on_file_not_found_error)@Catch(TypeError,on_typerror)deffunc():raiseFileNotFoundError("example")raiseTypeError("example")notesInitialization arguments are used by context manager and ignored by decorators, because:Would have to decide a priority between intialization arguments and function argumentsPassing default values to callback would need me to know the function argumentsWhen chaining decorators, wasn't possible to discover the function parameters because decorators would give(*args, **kwargs)When chaining decorators, wasn't possible to discover the default values because decorators would give(*args, **kwargs)
Package: lacbd
lacbdlacbd is a Python library written in Rust that implements the Aho Corasick algorithm for fast subsentence
matching of many keywords against one string.You can find the actual Rust library asnitros12/like-aho-corasick-but-different.FeaturesSupports arbitrary values associated with each keywordOperates on Unicode word bounds, rather than naïve substring matchingCase insensitive10× faster than an equivalent regexNone of the existing python libraries fit my needs.LicenseThis library is AGPLv3+ licensed. That may seem like an odd choice for a library. However, doing so ensures
that users of this code must make their application open source, even if run as a service (such as in a Discord bot).
If you want to use this to make proprietary software, look somewhere else.Copyright © 2019 Ben Simms and Ben MintzThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.You should have received a copy of the GNU Affero General Public License
along with this program.  If not, seehttps://www.gnu.org/licenses/.
Package: lacbox
The lacboxThis package contains functions that are useful in DTU Wind Energy course
46320: Loads, Aerodynamics, and Control of Wind Turbines.Installation and updatingIt is recomented to installlacboxvia pip:pipinstalllacboxIf you have lacbox installed and need the newest version, you can upgrade:pipinstall--upgradelacboxIf you want the files locally to look at/modify the source code, first clone
(requires git) or download the package from the GitLab repository. Open an
Anaconda terminal in thedtulacfolder and enterpip install -e .. Don't
forget the period at the end! This creates an "editable" installation, so any
changes you make to the files will impact the package.DocumentationThe project documentation can be found here:https://lac-course.pages.windenergy.dtu.dk/dtulacSource codeThe source code for the project is here:https://gitlab.windenergy.dtu.dk/lac-course/dtulacAuthors and acknowledgmentContributor list:Jenni RinkerKenneth LønbækRasmus Sode LundLicenseThis project is licensed under MIT license.
Package: lace
lacePolygonal mesh library developed at Body Labs.The library is under active maintenance, and the goals are compatible with that:Keep the library working in current versions of Python and other tools.Make bug fixes.Provide API stability and backward compatibility with the upstream version.Respond to community contributions.The eventual goal is to perform a rewrite of the loader and core mesh
functionality with quad support as part of a"lace-core" projectand consider how to handle the extensive mesh manipulation functions which
remain.InstallationInstall dependenciesMac OS:brewupdate&&brewinstallboost
pipinstallnumpy==1.13.1
pipinstalllaceLinux:apt-getinstall-y--no-install-recommendslibsuitesparse-devlibboost-dev
pipinstallnumpy==1.13.1
pipinstalllaceDocker:docker build .Install the librarypipinstalllaceDevelopmentpipinstall-rrequirements_dev.txt
pipinstall-e.
raketestrakelintContributeIssue Tracker:https://github.com/lace/lace/issuesSource Code:https://github.com/lace/lacePull requests welcome!SupportIf you are having issues, please let us know.AcknowledgementsThis library was refactored from legacy code at Body Labs byAlex Weiss,
with portions byEric Rachlin,Paul Melnikow,Victor Alvarez,
and others. It was extracted from the Body Labs codebase and open-sourced byGuillaume Marceau. In 2018 it wasforked by Paul Melnikowand
published asmetabolace. Thanks to a repository and package
transfer from Body Labs, the fork has been merged back into the original.Similar projectsThere is an unrelated permissively licensed mesh manipulation library calledTrimeshwhich provides some similar functionality.LicenseThe project is licensed under the two-clause BSD license.This project uses the RPly library to read and write PLY files, by Diego Nehab,
IMPA, distributed under the MIT License.http://www.impa.br/~diego/software/rply
Package: lacebuilder
LacebuilderLacebuilder is a friendly command-line application that generates packages for theLacein-browser OCR to TEI web editing application. Point it to an image directory and corresponding hOCR output directory, as well as to a simple xml metadata file, and it produces the .xar packages that can be installed in Lace through eXist-db’s drag-and-drop package manager.Free software: BSD licenseDocumentation:https://lacebuilder.readthedocs.io.FeaturesGemerates a base image package for all derived OCR runs, binarizing all imagesGenerates OCR output packages with the enhanced data used to make editing OCR easy in Lace, including word spellcheck status and dehyphenationAutomatically corrects the word bounding boxes of kraken hOCR outputExampleslacebuilder offers two subcommands,packimagesandpacktexts. These have their own parameters. The parameters--outputdirand--metadatafileare common to both of the subcommands, so they are set before them. At present, you cannot chain the subcommands. To access the--helpfor the subcommands, you must properly set these output parameters, thus:lacebuilder --outputdir /tmp/ --metadatafile /tmp/myfile_meta.xml packtexts --helpBuilding an image package:lacebuilder --outputdir /home/brucerob/ --metadatafile ~/Test_Lacebuilder/552464779_meta.xml packimages  --imagedir ~/Test_Tarantella/test outputdir: /home/brucerob/
generating image xar archive
Binarizing and compressing images
image archive of 111 images saved to /home/brucerob/552464779_images.xarMore information is required to build an hOCR output text package because Lace uses it to store multiple OCR ‘runs’ of a given image set and eventually to search and compile runs that have been completed using the same classifier:lacebuilder --outputdir /home/brucerob/ --metadatafile ~/Test_Tarantella/552464779_meta.xml packtexts  --hocrdir ~/Test_Tarantella/test_hocr_out/ --classifier ~/Downloads/Kraken-Greek-Classifiers-and-Samples/porson_2020-10-10-11-54-25_best.mlmodel --imagexarfile ~/552464779_images.xar
dehyphenating
spellchecking
generating hocr xar
accuracy 91%, Greek acc. 91%; completed 00%, Greek completed 00%
total:  20669 ; total correct: 11369
writing this data to  /tmp/tmpo0_6nin6total.xml
text archive from date 2021-01-30-16-05-42 saved to /home/brucerob/552464779-2021-01-30-16-05-42-porson_2020-10-10-11-54-25_best-texts.xarCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-01-25)First release on PyPI.
Package: lacerta
lacertaInteractive data viz for science and engineering. Long-term goal is forlacertato be forbokehwhatseabornis formatplotlib- strongly opinionated default settings, usability enhancements and auto-formatting that generate beautiful and interpretable viz in one function call.pip install lacertaHeatmap ScatterGenerate a correlation heatmap (defaults to Pearson coef.) from the numerical columns of a providedDataFrame, and reveal the underlying x/y scatter plot for each cell on click, complete with information-rich hover tools, scroll-zoom and pan.See the providedheatmap_scatter notebookfor an example.
Package: laceworkreports
Lacework Reports CLI/SDKlaceworkreports is a Python cli/package for creating reports from Lacework data.🚀 FeaturesRetrieve Lacework API data from activities, entities, queries, configsSave results as csv, json, or to postgresTransform results using jinja templateOverride returned field names using field_map (supports nested json notation: parent.child.value)Stores complex json objects as JSONB in postgresFlatten json structures before writingCLI Usagelaceworkreportsexportvulnerabilitieshostscsv--file-path="export.csv"SeeCLI READMEfor details.SDK Usagefromlaceworkreportsimportcommonfromlaceworkreports.sdk.DataHandlersimport(DataHandlerTypes,ExportHandler,QueryHandler,)eh=ExportHandler(format=DataHandlerTypes.CSV,results=QueryHandler(client=LaceworkClient(),type=common.ObjectTypes.Activities.value,object=common.ActivitiesTypes.DNSSummaries.value,filters=[{"field":"mid","expression":"eq","value":851}],returns=["fqdn"],).execute(),file_path="export.csv",).export()Seeexample.pyfor details.Installationpipinstall-Ulaceworkreportsor install withPoetrypoetryaddlaceworkreportsThen you can runlaceworkreports--helpor withPoetry:poetryrunlaceworkreports--helpor run withdocker:dockerrun--rm-it--namelaceworkreports\-v~/.lacework.toml:/home/user/.lacework.toml-v$(pwd)/reports:/app/reports\laceworkps/laceworkreports:latest--helpor run withdockerand start a shell:dockerrun--rm--entrypoint="/bin/bash"-it--namelaceworkreports\-v~/.lacework.toml:/home/user/.lacework.toml-v$(pwd)/reports:/app/reports\laceworkps/laceworkreports:latest--helpor run withdockerand force uid:gid on the volume mount (may be required for write permissions):dockerrun--rm-it\--namelaceworkreports\-v~/.lacework.toml:/home/user/.lacework.toml\-v$(pwd)/reports:/app/reports\--env=HOME=/home/user\--user$UID:$GID\laceworkps/laceworkreports:latest📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.List of labels and corresponding titlesLabelTitle in Releasesenhancement,feature🚀 Featuresbug,refactoring,bugfix,fix🔧 Fixes & Refactoringbuild,ci,testing📦 Build System & CI/CDbreaking💥 Breaking Changesdocumentation📝 Documentationdependencies⬆️ Dependencies updates🛡 LicenseThis project is licensed under the terms of theBSD-3license. SeeLICENSEfor more details.📃 Citation@misc{laceworkreports,author={Lacework Inc.},title={laceworkreports is a Python cli/package for creating reports from Lacework data.},year={2022},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/laceworkps/laceworkreports}}}
Package: laceworksdk
Lacework Python SDKlaceworksdkis a community developed Python library for interacting with the Lacework APIs.The purpose of this library is to simplify the common tasks required for interacting with the Lacework API, and allow
users write simple code to automate tasks related to their Lacework instance(s). From data retrieval to configuration,
this library aims to expose all publicly available APIs. For example, the following code would authenticate,
fetch events, fetch host vulnerabilities, and fetch container vulnerabilities. The latest version of the SDK supports
expressive searches as enabled by v2 of the Lacework APIs.For more information read thedocumentationfromlaceworksdkimportLaceworkClientlw=LaceworkClient()# This would leverage your default Lacework CLI profile.lw=LaceworkClient(account="ACCOUNT",subaccount="SUBACCOUNT",api_key="API KEY",api_secret="API SECRET")events=lw.events.search(json={"timeFilter":{"startTime":start_time,"endTime":end_time}})host_vulns=lw.vulnerabilities.hosts.search(json={"timeFilter":{"startTime":start_time,"endTime":end_time}})container_vulns=lw.vulnerabilities.containers.search(json={"timeFilter":{"startTime":start_time,"endTime":end_time},"filters":[{"field":"imageId","expression":"eq","value":"sha256:657922eb2d64b0a34fe7339f8b48afb9f2f44635d7d6eaa92af69591d29b3330"}]})RequirementsPython 3.8 or higherLacework API CredentialsAccount NameAPI KeyAPI SecretHow-ToThe following information is required to instantiate a LaceworkClient instance:account: The Lacework account/organization domain. (xxxxx.lacework.net)api_key: The API Key that was generated from the Lacework UI/API.api_secret: The API Secret that was generated from the Lacework UI/API.Optionally, you can also set a Lacework Sub-Account using thesubaccountparameter.To generate API credentials, you'll need to do the following in Lacework:In the Lacework web interface, go to Settings -> API KeysCreate a new API Key and download information the credentials.Environment VariablesIf you wish to configure the LaceworkClient instance using environment variables, this module honors the same
variables used by the Lacework CLI. Theaccount,subaccount,api_key,api_secret, andprofileparameters
can all be configured as specified below.Environment VariableDescriptionRequiredLW_PROFILELacework CLI profile to use (configured at ~/.lacework.toml)NLW_ACCOUNTLacework account/organization domain (i.e.<account>.lacework.net)YLW_SUBACCOUNTLacework sub-accountNLW_API_KEYLacework API Access KeyYLW_API_SECRETLacework API Access SecretYInstallationInstalling and upgradinglaceworksdkis easy:Install via PIP$ pip install laceworksdkUpgrading to the latest Version$ pip install laceworksdk --upgradeExamplesAre you looking for some sample scripts? Check out theexamplesfolder!Contributing
Package: lackadaisical
Lackadaisicaladjective: lacking spirit or liveliness.Lackadaisicalis a Python package for keeping an eye on slow code.UsageTo assert that a block of code should execute and return within a number of seconds, uselackadaisical.assert_faster_thanas either a decorator or a context manager.For example,assert_faster_thanwill raiselackadaisical.TooSlowif this test doesn't finish within 30 seconds of starting:fromlackadaisicalimportassert_faster_than@assert_faster_than(30)deftest_my_slow_function()->None:my_slow_function()In this example, the test's setup is free to take as long as it needs and only the slow function is monitored:fromlackadaisicalimportassert_faster_thandeftest_my_slow_function()->None:data=my_slow_preparation()withassert_faster_than(30):my_slow_function(data)assert_faster_thanwill not interrupt your code's execution after its time has elapsed, butlackadaisical.TooSlowwill report the difference between the actual and expected execution times to help you diagnose the problem.Operation took 2.6 seconds (expected 2.0 at most)InstallationLackadaisical requires Python 3.9 or later and can be installed fromPyPI.pipinstalllackadaisicalSupportPlease submit all your questions, feature requests and bug reports atgithub.com/cariad/lackadaisical/issues. Thank you!LicenceLackadaisical isopen-sourceand released under theMIT License.You don't have to give attribution in your project, but -- as a freelance developer with rent to pay -- I appreciate it!AuthorHello! 👋 I'mCariad Eccleston, and I'm a freelance Amazon Web Services architect, DevOps evangelist, CI/CD pipeline engineer and backend developer.You can find me atcariad.earth,github/cariad,linkedin/cariadand on Mastodon at@cariad@tech.lgbt.
Package: la-com-request-parser
LabAutomation Communication Request ManagerIn the context of a physics lab automation project, this package aims to simplify communication with different devices.
Communication is based on 0mq and json-based messages. This package is meant to be used in combination with a 0mq-based device server.Sending a requestThe only relevant function to use is ReqParser.request():
Parameters:device: to be addressed device name as string (defined in Device Server)action: requested action as string ("connect", "disconnect", "test", arbitrary)payload: values to be passed for arbitrary actionReturns:status: True (successful) or False (communication request failed)info: string of more detailed informationIncluding / Replacing Communication ManagerBy using the following import line, the package can be used:
from la_com_request_parser.com_request_parser import ReqParserIf you previously used the Communication Manager and it is deeply rooted in the project you can just import the
following line to maintain full functionality:
from la_com_request_parser.com_request_parser import ReqParser as CommunicationManager
Package: lacquer
lacquer is a python port of Presto’s SQL Parser.Currently, it doesn’t support all the same features as Presto’s parser,
but it can parse most SELECT queries and produce the python-equivalent
syntax tree, as well as write the tree back out to SQL.It was written for theLSST projectto enable
support for the Astronomical Data Query Language.It has two dependencies, PLY and future.It is tested with 2.7 and 3.5.LinksGitHubdevelopment version
Package: lacrosse-view
La Crosse ViewA library for retrieving data fromLa Crosse View-connected sensors.DisclaimerThis library isNOTfor the Jeelink LaCrosse sensors. You can find that libraryhere.
There is also aHome Assistant integrationfor the Jeelink LaCrosse sensors.InstallationRun this in your terminal:pip install lacrosse_viewUsageThis example shows how to get the latest data from every sensor connected to the first location on your account.fromlacrosse_viewimportLaCrosseimportasynciofromdatetimeimportdatetime,timedeltaimporttimeasyncdefget_data():api=LaCrosse()# Log in to your LaCrosse View accountawaitapi.login('username','password')# Get the sensors from the first location on the accountlocations=awaitapi.get_locations()startTime=datetime.now()-timedelta(minutes=1)endTime=datetime.now()startTimeUnix=time.mktime(startTime.timetuple())endTimeUnix=time.mktime(endTime.timetuple())sensors=awaitapi.get_sensors(locations[0],tz="America/Vancouver",start=startTimeUnix,end=endTimeUnix)forsensorinsensors:forfieldinsensor.sensor_field_names:# Each value is a dictionary with keys "s" and "u". "s" is the value and "u" is the Unix timestamp for it.value=sensor.data[field]["values"][-1]["s"]print(f"{sensor.name}{field}:{value}")awaitapi.logout()asyncio.run(get_data())Questions?If you have any questions, please, don't hesitate toopen an issue.
Package: lacss
LACSSLACSS is a deep-learning model for single-cell segmentation from microscopy images.References:IEEE TMI doi:10.1109/TMI.2023.3312988Communications Biology 6,232 (2023)Installationpip install lacssFor more details, seedocumentationWhy LACSS?LACSS is designed to utilize point labels for model training. You have three options:MethodData(left) / Label(right)PointPoint + MaskSegmentationYou can of course also combined these labels in any way you want.What is included?A library for training LACSS model and performing inferenceA few pretrained models as transfer learning starting pointSMC-based cell tracking utility for people interested in cell trackingHow to generate point label?If your data include nuclei counter-stain, the easist way to generate point label for your image is to use ablob detectionalgorithm on the nuclei images:Give it a try:Model trainingSupervised TrainingWith point label + maskWith point label onlyInferenceDocumentationAPI documentation
Package: lactolyse
DevelopmentThis project requires Docker for running analysis and dependencies. If you
are not familiar with it, follow theofficial tutorial.To install the package in the development (editable) mode, first clone the
repository:$git@github.com:dblenkus/lactolyse.git$cdlactolyseYou should create and activate a fresh virtual environment for this project:$python3-mvenv--promptlactolyse.venv$source.venv/bin/activateAnd then install it with pip:$python-mpipinstall-e.Test project is in thetestsdirectory, so you should run the rest of
commands in there:$cdtestsFirst start Docker containers for PostgreSQL and Redis services:$docker-composeup-dThen, if you are setting up the environment for the first time, prepare the
database:$./manage.pymigrate$./manage.pycreatesuperuserAnd finally run the development server and background worker (in two separate
terminals):$./manage.pyrunserver$./manage.pyrunworkerlactolyse.runanalysis
Package: lacuscore
Modulable LacusLacus, but as a simple module.InstallationpipinstalllacuscoreDesignLacusCoreis the part taking care of enqueuing and capturing URLs or web enabled documents.
It can be used as a module in your own project, see below for the usageLacusis the webservice that usesLacusCore,
and you can usePylacusto query it.Theenqueue,get_capture_status, andget_capturemethods ifLacusCoreandPyLacushave
the same parameters which means you can easily use them interchangeably in your project.For more information regarding the usage of the module and a few examples, please refer tothe documentation
Package: lad
Least absolute deviations with L1 regularization using majorization-minimization.
In estimation theory terms, this is the Maximum A Posterior (MAP) estimator for
a Laplacian likelihood with Laplacian prior, i.e.The MM algorithm update turns out to bewhich belongs to the class of iterative reweighted least-squares:https://en.wikipedia.org/wiki/Iteratively_reweighted_least_squaresPython VersionTo install the development version, proceed as follows:git clone https://github.com/mirca/lad.git
pip install -e ladOr install the lastest version on PyPi:pip install ladInstallation dependencies:- tensorflowTest dependencies:- numpy
- tensorflow
- pytest
- pytest-covR versionInside the R console, type:devtools::install_github("mirca/lad/r/lad")
Package: ladata
Logical Analysis of DataThis packages contains the tools necessary to build an LAD model.Free software: BSD licenseDocumentation:https://ladata.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-11-26)First release on PyPI.