Saravanan666/pypi-org huggingface dataset:
Package: luga
LugaA blazing fast language detection using fastText's language models.Lugais a Swahili word for language.fastTextprovides blazing-fast
language detection tool. Lamentably,fastText'sAPI is beauty-less, and the documentation is a bit fuzzy.
It is also funky that we have to manuallydownloadand load models.Here is wherelugacomes in. We abstract unnecessary steps and allow you to do precisely one thing: detecting text language.cover imageStand Still. Stay Silent- The relationships between Indo-European and Uralic languages by Minna Sundberg.Show, don't tellInstallationpython-mpipinstall-UlugaUsage:⚠️ Note: The first usage downloads the model for you. It will take a bit longer to import depending on internet speed.
It is done only once.fromlugaimportlanguageprint(language("the world ended yesterday"))# Language(name='en', score=0.9804665446281433)With the list of texts, we can create a mask for a filtering pipeline, that can be used, for example, with DataFramesfromlugaimportlanguageimportpandasaspdexamples=["Jeg har ikke en rød reje","Det blæser en halv pelican","We are not robots yet"]languages(texts=examples,only_language=True,to_array=True)=="en"# output# array([False, False, True])dataf=pd.DataFrame({"text":examples})dataf.loc[lambdad:languages(texts=d["text"].to_list(),only_language=True,to_array=True)=="en"]# output# 2    We are not robots yet# Name: text, dtype: objectWithout Luga:Download the modelwgethttps://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin-O/tmp/lid.176.binLoad and useimportfasttextPATH_TO_MODEL='/tmp/lid.176.bin'fmodel=fasttext.load_model(PATH_TO_MODEL)fmodel.predict(["the world has ended yesterday"])# ([['__label__en']], [array([0.98046654], dtype=float32)])Dev:poetryrunpre-commitinstallRelease Flow# assumes git push is completedgittag-l#  lists tagsgittagv*.*.*# Major.Minor.Fixgitpushorigintagv*.*.*# to delete tag:gittag-dv*.*.*&&gitpushorigintag-dv*.*.*# change project_toml and __init__.py to reflect new versionTODO:refactor artifacts.pyauto checkers with pre-commit | invokewrite more testswrite github actionscreate an intelligent data checker (a fast List[str], what do with none strings)make it faster with Cythonget NDArray typing correctlyfixartifacts.pyline 111 cast to List[str] that causes issuesremove nptyping when more packages move to numpy > 1.21
Package: lugat
LügatTDK Güncel Türkçe Sözlükiçin komut satırı arabirimi.Nasıl Yüklenir?pip (Python 3) ilepipinstalllugatDocker ile kullanmak isterseniz aşağıdaki fonksiyonu profil dosyanıza(.bash_rc, .zsh_rc vb.) ekleyebilirsiniz.functionlugat(){dockerrun-it--rmademozay/lugat$@}Nasıl Kullanılır?Komut satırındalugat<kelime,atasözü,deyimvb.># Atasözleri, deyimler, birleşik fiiller ve birleşik kelimeler gibi detaylar içinlugat-h<kelime,atasözü,deyimvb.>Python paketi olarakfromlugatimportlookup,LookupExceptiontry:word=lookup(search)variations=word.get_variations()# kelimenin tüm varyasyonlarıforvinvariations:print(v.name)# varyasyonun özel ismiprint(v.origin)# kelimenin kökeniprint(v.meanings)# özellikleri ve örnekleriyle birlikte kelimenin anlamlarıprint(v.compound_words)# ilgili birleşik kelimelerprint(v.proverbs)# ilgili atasözleri, deyimler ve birleşik fiillerexceptLookupException:passAlfredileLugat.alfredworkflow'u indirip kurduktan sonra bir kısayol atamanız gerekecek.
BenOption + Shift + Lkombiyasyonunu kullanıyorum. Eğer kısayol atamak istemezseniz, Alfred'elügatyazdıktan sonra yine arama yapabilirsiniz.Command + Lkısayolu ile, Alfred ekranına sığmayan tanımları ve kullanım örnekleriniLarge Typeile görüntüleyebilirsiniz.Command + Enterkısayolu ile, ilgili sonuçları terminalde görüntüleyebilirsiniz.Sistemde seçili olan bir kelimeyi direkt olarak aramak istediğiniz takdirde; Alfred kısayolunu ayarladığınız pencerede,ArgumentiçinSelection on macOSseçili olmalı.Not:Alfred, yalnızca macOS üzerinde çalışan bir üretkenlik uygulaması, başarılı bir Spotlight alternatifi.
Package: lugatim-cli
Command-line tool for Kubbealti Lugati:lugatim.com, with rich output.pip install lugatim-cliUsagelugatim <word>lugatim <word> -a
#shows all resultslugatim <word> -p
# returns plain text outputArguments-h, --help     show this help message and exit
  -p, --plain    returns plain text output
  -a, --all      show all results
  -v, --version  show program's version number and exitRequirementsPython >3.5Dependenciesrequestsbeautifulsoup4richlxmlLicenseCC0
Package: luhncheck
LuhnCheckA Python package to validate identification numbers using the Luhn algorithm
with additional optional checks.OverviewThe Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10"
algorithm, named after its creator, IBM scientist Hans Peter Luhn, is a simple
checksum formula used to validate a variety of identification numbers, such as:US National Provider Identifier numbers.Canadian Social Insurance Numbers.Saudi Arabia National and Resident ID numbers.South African ID numbers.Swedish National identification numbers.Swedish Corporate Identity Numbers (OrgNr).Greek Social Security Numbers (ΑΜΚΑ).Credit card numbers.IMEI numbers.The algorithm is in the public domain and is in wide use today. It was designed
to protect against accidental errors. Most credit cards and many government
identification numbers use the algorithm to distinguish valid numbers from
mistyped or otherwise incorrect numbers.FeaturesSimple API to validate numbers based on the Luhn algorithm.Extended validation to cover number length and prefix(es).Can validate numbers containing hyphens or spaces.Works on Python 3.8+ with zero dependencies.Thoroughly tested with 100% test coverage.InstallationTo install usingpip, run:pipinstallluhncheckUsage Examples>>>fromluhncheckimportis_luhn>>># Simple checksum validation>>>is_luhn("1101798278")True>>># Additional check for length (9 digits)>>>is_luhn("1101798278",9)False>>># Additional checks for prefix (either 1 or 2)>>>is_luhn("1101798278",10,["1","2"])True>>># Validate numbers containing hyphens>>>is_luhn("01-055102-109831-4",None,"01")TrueAPI Referencefunctionis_luhnis_luhn(number:str,length:int|None=None,prefix:str|list[str]|None=None)->boolValidate checksum and format of an identification number based on the Luhn
algorithm.Args:number: Identification number to validate.length: How many digits the number must contain. (The default isNone,
which implies skipping the length check).prefix: Exact digit(s) the number must start with. When a list of digits
is provided, one of the values must match. (The default isNone, which
implies skipping the prefix check).Returns:Truewhen the number is valid; otherwise,False.LicenseThis project is licensed under the terms of the MIT license.
Package: luhnchecker
LuhnChecker - Credit Card Validation and GenerationLuhnChecker is a Python library for validating, generating, and processing credit card numbers. This package provides a simple interface to implement the Luhn algorithm (also known as the mod 10 algorithm) which is widely used for validation of identification numbers.FeaturesValidate credit card numbers using the Luhn algorithm.Generate valid credit card numbers for testing purposes.Mask credit card numbers for secure display.Determine the credit card issuer from the card number.InstallationTo install LuhnChecker, simply use pip:pipinstallluhncheckerUsageHere's how to use LuhnChecker in your Python code:Validating a Credit Card Numberfromluhnchecker.luhnimportLuhncard_number="1234567812345670"ifLuhn.check_luhn(card_number):print(f"{card_number}is a valid credit card number.")else:print(f"{card_number}is an invalid credit card number.")Generating a Credit Card Numbergenerated_card_number=Luhn.generate_luhn()print(f"Generated card number:{generated_card_number}")Masking a Credit Card Numbermasked_number=Luhn.mask_card_number(card_number)print(f"Masked card number:{masked_number}")Determining the Credit Card Issuerissuer=Luhn.credit_card_issuer(card_number)print(f"The issuer of the card number{card_number}is{issuer}.")ContributingWe welcome contributions to LuhnChecker! Here's how you can set up the project for development:Clone the repository:gitclonehttps://github.com/software-students-fall2023/3-python-package-exercise-111Navigate to the project directory:cd3-python-package-exercise-111Install the project along with its development dependencies using pipenv:pipenvinstall--devActivate the virtual environment:pipenvshellMake changes and run the tests to ensure everything is working:pytestTeamMerlin LiStevenHarleyZhiyi (Valery)LicenseDistributed under the GNU General Public License v3.0. SeeLICENSEfor more information.PyPILuhnChecker is also available through the Python Package Index (PyPI):luhnchecker on PyPI
Package: luhn-formula
luhn-formulaAnother python package of number validator and check digit generator based on Luhn's formula 😉. Luhn's formula was designed to protect against accidental input errors.Usageinstallpip install luhn-formulaorgit clone git@github.com:code-127/luhn-formula-py.gitExample>>> from luhnformula import luhnformula as lf
>>> lf.getcheckdigit("12345")
'5'
>>> lf.addcheckdigit("12345")
'123455'
>>> lf.isvalid("123455")
TrueFunctionchecksum(number: str) -> intChecksum vith the luhn formula
Args:
    number : Number to calculate
return:
    Result of luhn formulaisvalid(number: str) -> bool:Validate number with the Luhn formula.
Args:
    number: Number to validate.
Returns:
    ``True`` when the: number is valid, otherwise ``False``.getcheckdigit(number: str) -> str:Generate check digit with the Luhn formula for a number.
Args:
    number: Number used to generate the check digit.
Return:
    the check digit for a number.
Raise error:
    ValueError : Invalid number.addcheckdigit(number: str) -> str:Generate and add check digit with the luhn formula for a number
Args:
    number: Number used to generate the check digit.
Return:
    the number with the check digit.
Raise error:
    ValueError : Invalid number.
Package: luhnmod10
A fast and simple in-place implementation of theluhn check algorithmin Python. Implementations in other languages can be found atgithub.com/luhnmod10.UsageInstall the package:pip install luhnmod10Or:easy_install luhnmod10Then:fromluhnmod10luhnmod10.valid('4242424242424242')ContributingContributions are welcome! If you can improve the execution time of this implementation without increasing its complexity, please open a pull request. To test your change, runmakein the repository to run the tests and the benchmarks.
Package: lui-calculator
LUI-calculatorLUI-calculator is a calculator forLow User Interactivityenvironments, so basically you input a one line calculation, and it output in text or an image.
Based onsympy, it can do a lot of cool calculation.Some examples.1+1 => 2
sqrt(2)+pi => √2 + π ≈ 4.555806215962888
cos 5 => cos(5) ≈ 0.28366218546322625
1/5 => 1/5 = 0.2
1/3 => 1/3 ≈ 0.3333333333333333
e^(pi*i) => -1
3x=5 => {5/3}
Package: luigi-completion
luigi_completioncompletion for luigi on bash, zsh, xonshInstallpip install luigi_completionAnd set completion scriptbash:https://github.com/vaaaaanquish/luigi_completion/blob/master/luigi_completion/luigi_completion.bashzsh:https://github.com/vaaaaanquish/luigi_completion/blob/master/luigi_completion/luigi_completion.zshUsagecd [luigi Project Directory]
mklcomp main.py    # make .luigi_completion fileInput [TAB] key afterpythonorluigicommand in CLI.
Package: luigi-daisy
# daisyThin wrapper of [luigi](https://github.com/spotify/luigi) for utility.# Features## Formatted local targetsClasses inheriting `daisy.FormattedLocalTargetBase` is providedfor dumping and loading objects by one-liner.``` pythonimport daisyimport pandas as pddf = pd.DataFrame({"a": [1,2,3], "b": [4,5,6]})df# =>#    a  b# 0  1  4# 1  2  5# 2  3  6targ = daisy.CsvTarget("./output.csv")# dumpingtarg.dump(df)# loadingdf2 = targ.load()df2# =>#    a  b# 0  1  4# 1  2  5# 2  3  6# `daisy.FormattedLocalTargetBase` also inherits `luigi.LocalTaget`# so that original api is also enabled.with targ.open("r") as fd:s = fd.read()```## Default output for task`daisy.Task` inherits `luigi.Task` and provides default `output` features.By setting file extension via `ext` attribute,daisy automatically configure corresponding `FormattedLocalTarget` with default file name.### Single output``` pythonclass TaskA(daisy.Task):param1 = daisy.Parameter()ext = "csv"```is equivalent to:``` pythonclass TaskA(luigi.Task):param1 = luigi.Parameter()def output(self):return daisy.CsvTarget("./data/TaskA/TaskA(param1={}).csv".format(self.param1))```### Multiple outputs``` pythonclass TaskA(daisy.Task):param1 = daisy.Parameter()ext = {"vectors": "npy","metadata": "json"}```is equivalent to:``` pythonclass TaskA(luigi.Task):param1 = luigi.Parameter()def output(self):return {"vectors": daisy.NpyTarget("./data/TaskA/TaskA(param1={}).npy".format(self.param1)),"metadata": daisy.JsonTarget("./data/TaskA/TaskA(param1={}).json".format(self.param1))}```Available extension and file types are as follows:| Target class | Object type | extension || --- | --- | --- || `CsvTarget` | `pandas.DataFrame` | `csv` || `NpyTarget` | `numpy.ndarray` | `npy` || `JsonTarget` | `dict` | `json` || `PickleTarget` | `object` | `pkl` `pickle` || `FeatherTarget` | `pandas.DataFrame` | `feather` |view [source code](./daisy/formatted_target.py) for detail.## ConfigurationFor configuration, edit `[daisy]` section of `luigi.cfg`.``` INI[daisy]# default output directorydata_dir = luigi.Parameter("./data")```
Package: luigi-monitor
## Luigi Monitor[![Pypi Latest Version](https://img.shields.io/pypi/v/luigi-monitor.svg)](https://img.shields.io/pypi/v/luigi-monitor.svg)[![License](https://img.shields.io/pypi/l/luigi-monitor.svg)](https://img.shields.io/pypi/l/luigi-monitor.svg)[![Python Versions](https://img.shields.io/pypi/pyversions/luigi-monitor.svg)](https://img.shields.io/pypi/pyversions/luigi-monitor.svg)[![Pypi Format](https://img.shields.io/pypi/format/luigi-monitor.svg)](https://img.shields.io/pypi/format/luigi-monitor.svg)[![Build Status](https://travis-ci.org/hudl/luigi-monitor.svg?branch=master)](https://travis-ci.org/hudl/luigi-monitor)![message](https://raw.github.com/hudl/luigi-monitor/master/message.png)Send summary messages of your Luigi jobs to Slack.### Overview[Luigi](https://github.com/spotify/luigi) is a great tool for makingjob pipelines, but it's hard to know the status of a run. Luigi hassupport for error emails, but this requires configuring your machineto send email, which is a hassle for short-lived EMR clusters. Further,it sends an email for every failure, which can quickly swamp your inbox.By contrast, this tool gathers all your failures and missing dependenciesand sends a summary Slack message when the job is finished.### UsageWith default app username:```pythonimport luigifrom luigi_monitor import monitor...if __name__ == "__main__":with monitor(slack_url=<your_slack_url>, max_print=10):luigi.run(main_task_cls=MainClass)```With dynamic app username:```pythonimport luigifrom luigi_monitor import monitor...if __name__ == "__main__":with monitor(slack_url=<your_slack_url>, max_print=10, username="FooBar Monitor"):luigi.run(main_task_cls=MainClass)```Monitoring and notifying on various events:Currently supports: `SUCCESS`, `DEPENDENCY_MISSING`, and `FAILURE`By default, all three of the above are monitored and notified on. If, `SUCCESS` event is monitored andall tasks succeed then the notification text is "Job ran successfully" instead of listing _all_successful tasks.```pythonimport luigifrom luigi_monitor import monitor...if __name__ == "__main__":with monitor(slack_url=<your_slack_url>, events=['DEPENDENCY_MISSING', 'FAILURE']):luigi.run(main_task_cls=MainClass)```Alternatively:`luigi-monitor --module path.to.module TaskName`NB: if you plan to use luigi-monitor from the command line, set options using `luigi.cfg`:```[luigi-monitor]slack_url=<slack_hook>max_print=<int>username=<string>```This is a work in progress. Particularly, note that:* It only sends notifications via Slack
Package: luigi-monkey-patch
Luigi is a Python (2.7, 3.3, 3.4, 3.5) package that helps you build complex
pipelines of batch jobs. It handles dependency resolution, workflow management,
visualization, handling failures, command line integration, and much more.Current Luigi has some issues in s3 file iteration in production. When the file
is too large, Amazon s3 would tend to disconnect first. Any application should
support retry based on current status to aquire the whole part. This project add
this part for luigi s3 file iteration feature.Getting StartedRunpip install luigi_monkey_patchto install the latest stable version fromPypi. Documentation and any issues are hostedhere.Modified Functionsluigi.s3.ReadableS3File.closeluigi.s3.ReadableS3File.__iter__AuthorsLuigi was built atSpotify.
This patch is done byZenix Huang.
Package: luigi-soft-failures
Provides a decorator for Luigi tasks that allows them to failsoftly. Tasks that fail softly are seen by Luigi as complete, and thus don't prevent dependent tasks from running. The dependent task can check if it's dependencies actually ran successfully or failed softly.Installationpip install luigi_soft_failuresUsagefromluigi_soft_failuresimportsoftly_failingUse as class decorator:@softly_failing(catch_all=True,propagate=True)classSomeTask(luigi.Task):...Or on demand in the requiring task:defrequires(self):returnsoftly_failing(catch_all=True)(SomeTask)(some_param=42)The dependent task can check the status of it's dependencies usingfailed_softly:defrun(self):ifself.requires().failed_softly():...For a complete example seeas_decorator.py.APIsoftly_failingaccepts the following parameters:catch_all(bool, defaultFalse):WhenTrue, any exception thrown in the task'srunmethod will lead to a soft failure. Otherwise, soft failures can be generated manually by callingself.fail_softly('Some error message')from the task'srunmethod and exiting the method without exception.propagate(bool, defaultFalse):WhenTrue, the task fails softly if any of it's dependencies failed softly, andrunis never executed. Otherwise,runis executed as if the dependencies ran successfully.output_dir(str, defaultNone): Describedbelow.Storage of soft failure reportsWhan the wrapped task fails softly, it creates a report with the failure message or exception traceback to indicate this. These reports are stored in a directory specified in one of the following ways (in this order of precedence):output_dirparameter passed tosoftly_failingSpecified inluigi.cfg:[luigi_soft_failures.Config]
output_dir=/some/pathEnvironment variableLUIGI_SOFT_FAILURES_OUTPUT_DIRDefault./soft_failures/LimitationsSoft failure status is stored using aLocalTarget, so a local storage that all workers have access to is required.In the Luigi visualizer, softly failed tasks are shown as complete.Pull requests to address these are very welcome!
Package: luis
pyluisThis is a Python interface toMicrosoft LUIS <https://luis.ai/>(Language Understanding Intelligent Service).How to use itAfter you have created and published your LUIS application, you can
use it to analyze text:>>> import luis

# Use the URL LUIS gives you when you publish your app.
>>> l = luis.Luis(url='https://https://api.projectoxford.ai/luis/...')

# Send text to be analyzed:
>>> r = l.analyze('fly forward 10 feet')

# See all identified intents:
>>> print r.intents
[<Intent intent=u'TRANSLATE' score=1.0>,
 <Intent intent=u'None' score=0.015184097>,
 <Intent intent=u'ROTATE' score=0.00713030435>,
 ...]

# See all identified entities:
>>> print r.entities
[<Entity entity=u'forward' type=u'FORWARD' score=0.9585199 start_index=4 end_index=10>,
 <Entity entity=u'10 feet' type=u'builtin.dimension' score=0.9829198 start_index=12 end_index=18>]

# What was the highest-scored intent?
>>> best = r.best_intent()
>>> print best
<Intent intent=u'TRANSLATE' score=1.0>
>>> print best.intent
u'TRANSLATE'
>>> print best.score
1.0
Package: luis-v-subtitler
A Python package to use AI to subtitle any video in any languageFree software: MIT licenseInstallationpip install luis-v-subtitlerYou can also install the in-development version with:pip install https://github.com/LuisAVasquez/python-luis-v-subtitler/archive/main.zipDocumentationhttps://python-luis-v-subtitler.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2023-12-04)First release on PyPI.
Package: luisy
luisyThis tool is an extension for the Python Frameworkluigiwhich helps to build
reproducable and complex data pipelines for batch jobs. Visit ourdocsto learn more!How to install?How to test?How to contribute?Third-Party licencesHow to use?This is how an end-to-endluisypipeline may look like:importluisyimportpandasaspd@luisy.raw@luisy.csv_output(delimiter=',')classInputFile(luisy.ExternalTask):label=luisy.Parameter()defget_file_name(self):returnf"file_{self.label}"@luisy.interim@luisy.requires(InputFile)classProcessedFile(luisy.Task):defrun(self):df=self.input().read()# Some more preprocessings# ...# Write to diskself.write(df)@luisy.finalclassMergedFile(luisy.ConcatenationTask):defrequires(self):forlabelin['a','b','c','d']:yieldProcessedFile(label=label)How to install?Stable Branch:mainMinimum python version: 3.8Install luisy withpipinstallluisyHow to test?To run all unittests that are inside the tests directory use the following command:pytestHow to contribute?Please have a look at ourcontribution guide.Third-Party LicensesRuntime dependenciesNameLicenseTypenumpyBSD-3-Clause LicenseDependencypandasBSD 3-Clause LicenseDependencynetworkxBSD-3-Clause LicenseDependencyluigiApache License 2.0DependencydistlibPython licenseDependencymatplotlibOtherDependencyazure-storage-blobMIT LicenseDependencytablesBSD licenseDependencypipdeptreeMIT LicenseDependencyrequirements-parserApache License 2.0DependencypyarrowApache License 2.0DependencysparkApache License 2.0DependencyDevelopment dependencyNameLicenseTypesphinxBSD-2-ClauseDependencysphinx_rtd_themeMIT LicenseDependencyflake8MIT LicenseDependencypytestMIT LicenseDependencypytest-flake8BSD LicenseDependencypytest-covMIT LicenseDependencypip-toolsBSD 3-Clause LicenseDependency
Package: lukai
Luk.ai Python Management LibraryThis is a library for uploading machine learning models toLuk.ai.Upload ModelsYou'll need tocreate an API tokenfirst.importlukai# ... your model definition codesess=tf.Session()sess.run(tf.initialize_all_variables())# Sets the Luk.ai API token.lukai.set_api_token('<your token>')# Uploads the model to Luk.ai and creates a training job.lukai.upload(session=sess,domain='<your domain>',model_type='<your model type>',name='Hello World',description='This is the first model I'veuploaded!',hyper_params=lukai.HyperParams(num_clients=10,batch_size=10,num_rounds=100,learning_rate=learning_rate,num_local_rounds=10,),metrics={accuracy:lukai.REDUCE_MEAN,},event_targets={lukai.EVENT_TRAIN:(keep_prob.assign(0.5),),lukai.EVENT_INFER:(keep_prob.assign(1.0),),lukai.EVENT_EVAL:(keep_prob.assign(1.0),),},)See thefull mnist example.Export ModelsYou can also directly output themodel.tar.gzfile if you'd like.fromlukaiimportsaver# ... your model definition codesess=tf.Session()sess.run(tf.initialize_all_variables())print('Node names: x ={}, y_ ={}, train_step ={}, w ={}, b ={}, y ={}'.format(x.name,y_.name,train_step.name,w.name,b.name,y.name,))saver.save(sess)See thefull leastsquares example