Saravanan666/pypi-org huggingface dataset:
Package: leuvenmapmatching
Leuven.MapMatchingAlign a trace of GPS measurements to a map or road segments.The matching is based on a Hidden Markov Model (HMM) with non-emitting
states. The model can deal with missing data and you can plug in custom
transition and emission probability distributions.Main reference:Meert Wannes, Mathias Verbeke, "HMM with Non-Emitting States for Map Matching",
European Conference on Data Analysis (ECDA), Paderborn, Germany, 2018.Other references:Devos Laurens, Vandebril Raf (supervisor), Meert Wannes (supervisor),
"Trafﬁc patterns revealed through matrix functions and map matching",
Master thesis, Faculty of Engineering Science, KU Leuven, 2018Installation and usage$ pip install leuvenmapmatchingMore information and examples:leuvenmapmatching.readthedocs.ioDependenciesRequired:numpyscipyOptional (only loaded when methods are called to rely on these packages):matplotlib:
For visualisationsmopy:
For visualisationnvector:
For latitude-longitude computationsgpxpy:
To import GPX filespykalman:
So smooth paths using a Kalman filterpyproj:
To project latitude-longitude coordinates to an XY-planertree:
To quickly search locationsContactWannes Meert, DTAI, KU Leuvenwannes.meert@cs.kuleuven.behttps://dtai.cs.kuleuven.beMathias Verbeke, Sirrismathias.verbeke@sirris.behttp://www.sirris.be/expertise/data-innovationDeveloped with the support ofElucidata.be.LicenseCopyright 2015-2022, KU Leuven - DTAI Research Group, Sirris - Elucidata GroupApache License, Version 2.0.
Package: leval
LevalA limited expression evaluatorA little more suited for dynamic usage thanast.literal_eval()while remaining as safe as the functions you pass in.Under the hood, it uses theastmodule to parse the expression,
then walks the AST in Python to evaluate the result. You can
also specify a depth limit for the complexity of the expression,
as well as a time limit for the evaluation.Example usageSimple APIFor many use cases, thesimple_eval()function is sufficient.
You can specify a depth limit and a time limit, and optional mappings
of variables and functions.Thevaluesmapping can also be keyed by a tuple of strings, which
is what attribute accesses are folded to.Operations are generally limited to numbers only in the simple API.fromleval.simpleimportsimple_evalassertsimple_eval('1 + 2')==3assertsimple_eval('x < -80 or x > 125 or x == 85',values={'x':85})assertsimple_eval('abs(x) > 80',values={'x':-85},functions={'abs':abs})assertsimple_eval('x.y.z + 8',values={('x','y','z'):34})==42Advanced APIUnder the hood,simple_evalsimplyinitializes an evaluation universe, which defines the functions, variables
and operations availablecreates an Evaluator to evaluate the expression with the given universeBoth of these classes are designed to be easily subclassable. There are examples
in thetest_leval.pyfile.
Package: levdict
levdictThis module allows to handle dictionaries keys as attributes.
It has four classes:LevDict: The base class, it acts as a dictionary but with the added feature of treating
consists of a main class LevDict, which allows to treat dictionaries as attributes.LevDictJson: Derived from LevDict, reads and writesjsonfilesLevDictToml: Derived from LevDict, reads and writestomlfiles (depends on toml)LevDictYaml: Derived from LevDict, reads and writesyamlfiles (depends on pyyaml)and three derived classes that allow using respectively toml, json and yaml for configuration purposes.InstallationThe module is currently in production.python -m pip install levdictLevDict basic usaged = LevDict(name="John", surname="Doe")
surname = d.surname
surname = d["surname"]
d.name = "Peter"
d.update(name="Albert")
d.surname="Hall"More in the examples folder.Project Tree Structure.
├── LICENSE
├── Makefile
├── Pipfile
├── Pipfile.lock
├── README.md
├── examples
│   ├── example1.py
│   ├── example2.ini
│   ├── example2.py
│   ├── example3.py
│   ├── example3.toml
│   ├── example3_mod.toml
│   ├── example4.json
│   └── example4.py
├── pyproject.toml
├── scripts
│   └── levmake.py
├── src
│   └── levdict
│       ├── __init__.py
│       ├── levdict_base.py
│       ├── levdict_json.py
│       ├── levdict_toml.py
│       └── levdict_yaml.py
└── tests
    ├── __init__.py
    ├── examples
    │   ├── example.toml
    │   ├── example1.json
    │   ├── example1.toml
    │   ├── example1.yaml
    │   └── example1_mod.toml
    ├── test_basic.py
    └── test_levdict.py

7 directories, 28 files
Package: level1c4pps
[![Build status](https://github.com/foua-pps/level1c4pps/workflows/CI/badge.svg?branch=master)](https://github.com/foua-pps/level1c4pps/workflows/CI/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/foua-pps/level1c4pps/badge.svg)](https://coveralls.io/github/foua-pps/level1c4pps?branch=master)Tools to generate NWCSAF/PPS level-1C formattet netCDF files from various
agency specific level-1 formats. So far, supportsEUMETSAT Meteosat Second Generation SEVIRI HRIT level-1.5NOAA AVHRR GACMERSI-2 level-1MODIS level-1AVHRR eps level-1bAVHRR AAPP level-1bVIIRS level-1bSLSTR level-1bEPS-SG MetImage level-1 test dataEUMETSAT AVHRR GAC FDR
Package: leveldb-cli
A command-line interface for LevelDB, an on-disk key-value database.Installation:$ pip install leveldb-cliExample:$ leveldb create -d my.db
$ leveldb put 1 2 -d my.db
$ leveldb get 1 -d my.db
2
$ leveldb delete 1 -d my.db
$ leveldb get 1 -d my.db
Error: key 1 does not existSee alsohttp://en.wikipedia.org/wiki/LevelDB
Package: leveldb-export
LevelDB ExportThis package allows to export documents from a LevelDB file. For instance it can be used to extract documents from a previously created Firestore export. Note, this package is a fork fromlabbots/firestore-export-json. This fork is different in:Makes it an installable package. The original is designed to run as a script.Solves some parsing issues regarding arrays.InstallationInstall the package from pypi.pipinstallleveldb-exportExampleUse the functionparse_leveldb_documentsto parse documents from a LevelDB / Firestore dump. As input either:Use path to fileUse open file handleFor example>>>fromleveldb_exportimportparse_leveldb_documents>>>docs=list(parse_leveldb_documents("./firestore/export-0"))>>>print(f"Got{len(docs)}documents")Got288documents
Package: leveldb-py
Py LevelDBA Cython wrapper for Mojang's modified LevelDB library.Installpip install pyleveldbUsefromleveldbimportLevelDBdb=LevelDB("path/to/db",create_if_missing=True)db.put(b"greetings",b"Hello world")print(db.get(b"greetings"))# b"Hello world"See thesource codefor full documentation.
Package: leveldb-shelve
LevelDB Backend for Python shelve moduleInstallpip install leveldb-shelveUsageimport leveldb_shelve

with leveldb_shelve.open("/tmp/db_path") as d:
    d["a"] = {"c": "CCC"}
    print(d["a"])
    del d["a"]

# see shelve docs for details https://docs.python.org/3.8/library/shelve.html
Package: levelling
Discord LevellingA package built for discord.py developers who want to
easily and seamlessly integrate a levelling system into
their bots.Key featuresEasy database integration foranydatabase systemFully testedHighly customizablePlug & PlayExample usageimportosimportdiscordfromdiscord.extimportcommandsfromlevellingimportLevel,LevelUpPayloadclassBot(commands.Bot):def__init__(self,*args,**kwargs):super().__init__(*args,**kwargs)self.level=Level(self)asyncdefon_ready(self):print(f"-----\nLogged in as:{self.user.name}:{self.user.id}\n-----")asyncdefon_message(self,message):leveled_up=awaitself.level.propagate(message)ifleveled_up:awaitself.on_level_up(leveled_up)awaitself.process_commands(message)asyncdefon_level_up(self,payload:LevelUpPayload):# This is triggered when a LevellingMember levels upmember=payload.guild.get_member(payload.member.id)embed=discord.Embed(title=f"`{member.display_name}` has leveled up to level `{payload.level}`!")awaitpayload.channel.send(embed=embed)bot=Bot(command_prefix="!",intents=discord.Intents.all())@bot.command()asyncdefleaderboard(ctx):leaderboard_members=awaitbot.level.leaderboard()desc="\n".join(f"<@{m.id}> - level `{m.level}`"forminleaderboard_members)awaitctx.send(f"Here's our leaders!\n---\n\n{desc}")if__name__=="__main__":token=os.getenv("TOKEN")bot.run(token)Documentation | Examples | SupportFor documentation and examples,see hereJoin the MenuDocs' discord server for support with this package!https://discord.gg/menudocsor dm us on twitter!https://twitter.com/menudocs
Package: leven
Levenshtein edit distance library for Python, Apache-licensed.
Written by Lars Buitinck, Netherlands eScience Center, with contributions
from Isaac Sijaranamual, University of Amsterdam.Performs distance computations on either byte strings or Unicode codepoints.InstallationMake sure you have Cython and a C++ compiler installed:pip install cythonInstalling a C++ compiler is so platform-dependent that I won’t show
instructions. Consult your package manager.Then:python setup.py installTo run the tests, but not to actually use leven, you need six and Nose.Usage>>> from leven import levenshtein
>>> levenshtein("hello, world!", "goodbye, cruel world!")
13About the implementationThe core algorithms have been implemented in C++. I used this instead of C
to get templates, easier memory management and a better standard library,
so the C++ code probably looks C-ish.TodoImplement Ukkonen’s algorithm for bounded Levenshtein distanceImplement Levenshtein automata for fast neighbor search in string spacesImplement weighted Levenshtein distance
Package: leven-search
Efficient and Flexible Searching Within Levenshtein DistanceIntroductionWelcome to Leven-Search, a library designed for efficient and fast searching
of words within a specified Levenshtein distance.This library is designed with Kaggle developers and researchers in mind
as well as all others who deal with natural language processing, text analysis,
and similar domains where the closeness of strings is a pivotal aspect.What is Levenshtein Distance?Levenshtein distancemeasures the difference between two
sequences.
In the context of strings, it is the minimum number of single-character edits
(insertions, deletions, or substitutions) required to change one word into another.For example, the Levenshtein distance between "table" and "marble" is 2:table→mable(substitution oftfor `m')mable→marble(insertion ofr)Design GoalsThe library is designed with the following goals in mind:Efficient indexing of large datasets of words. Indexing about 40k words from the
Brown corpus takes about 300ms on a modern laptop, and the index takes about 53MB of RAM.Flexibility in searching. The library allows searching for words within a specified
Levenshtein distance also allows configuring specific edit costs for each operation.
It allows to configure other distances, like akeyboard distance.Extensibility. The library is designed to be easily extensible to support other edit distances,
such asDamerau-Levenshtein distanceorJaro-Winkler distance.PerformanceExample performance of the library on a Brown corpus (only words larger than 2 characters) and a modern laptop:DistanceTime per 1000 searches(in seconds)00.014610.39331 (*)0.415427.9556(*) with the per-letter cost granularityInstallationTo install the library, simply run:pipinstallleven-searchUsageFirst, import the library:importleven_searchaslevThen, create a LevenSearch object:searcher=lev.LevenSearch()Next, add words to the searcher:searcher.insert("hello")searcher.insert("world")Finally, search for words within a specified Levenshtein distance:searcher.find_dist("mello",1)Result:
	hello: ResultItem(word='hello', dist=1, updates=[m -> h])ExampleThe following example shows how to use the library to search for words within a Brown corpus:importnltkimportleven_searchaslev# Download the Brown corpusnltk.download('brown')# Create a LevenSearch objectsearcher=lev.LevenSearch()forwinnltk.corpus.brown.words():iflen(w)>2:searcher.insert(w)# Search for words within a Levenshtein distancesearcher.find_dist('komputer',1)Result:
	computer: ResultItem(word='computer', dist=1, updates=[k -> c])Search for words within a Levenshtein distance with custom costscost=lev.GranularEditCostConfig(default_cost=2,edit_costs=[lev.EditCost('k','c',0.1)])searcher.find_dist('komputer',2,cost)Result:
      computer: ResultItem(word='computer', dist=0.1, updates=[k -> c])searcher.find_dist('yomputer',2,cost)Result:
      computer: ResultItem(word='computer', dist=2, updates=[y -> c])searcher.find_dist('yomputer',1,cost)Result:
      None
Package: levenshtein-coding
Python package implementing Levenshtein coding.How do I install this package?As usual, just download it using pip:pipinstalllevenshtein_codingTests CoverageSince some software handling coverages sometime get slightly different results, here’s three of them:Usage examplefromlevenshtein_codingimagelevenshtein_coding,decode_levenshtein_codinglevenshtein_coding(14)# 11101110assertdecode_levenshtein_coding(levenshtein_coding(14))==14# True
Package: levenshtein-distance
levenshtein-distanceCompute operational differences between two sequences/texts using the Levenshtein algorithmInstallation:pip install levenshtein-distanceUsage:Regular Usage:fromlevenshtein_distanceimportLevenshteinlev_object=Levenshtein('test','text')distance=lev_object.distance()ratio=lev_object.ratio()array=lev_object.sequence_array()With replace operation cost of 2:lev_object=Levenshtein('test','text').set_replace_cost(2)distance=lev_object.distance()ratio=lev_object.ratio()array=lev_object.sequence_array()
Package: levenshtein-package
The Levenshtein distance is a string metric for measuring the difference
between two strings. With this package you can calculate the Levenshtein
distance and ratio between two words, or get the most similar word in a
list of words.More info athttps://en.wikipedia.org/wiki/Levenshtein_distanceInstallationpipinstalllevenshtein-packageAvailable methodscalculate_distancecalculate_similarityget_most_similar_in_listExamples>>>fromlevenshteinimportcalculate_distance,calculate_similarity,get_most_similar_in_list>>>calculate_distance("apple","pear")4>>>calculate_similarity("apple","pear")0.4444444444444444>>>get_most_similar_in_list("apple",["pear","peach","apricot","banana"])'pear'
Package: levenshtein_py
levenshtein_pyLibrary for Python3 that uses the levenshtein-rs.How to import# pylint: disable=no-name-in-modulefromlevenshtein_pyimportLevenshteinPySignature and how to use/***FilterfunctionreturnsfiltedcollectionbyLevenshteinAlgorithm.*@inputstr.*@distanceint(cantbelowerthan0).*@collectionList[str]-collectiontosearchover.*@returnsList[str]-filteredcollection.*/LevenshteinPy.filter(input:str,distance:int,collection:List[str])->List[str]Used librarieshttps://github.com/wooorm/levenshtein-rshttps://github.com/PyO3/pyo3
Package: leveropen
leveropenLever Open API Python WrapperThis project enables access to Lever Open data using Python.View the documentationInstallationpip install leveropenUsage ExampleNote: This example uses the additional python package matplotlibimportmatplotlib.pyplotaspltfromtqdmimporttqdmfromleveropenimportLeverlever=Lever(access_token="your-unique-access-token")dataset=lever.get_datasets_by_collection("Gross Domestic Product (GDP)")[0]fig,ax=plt.subplots()forseriesintqdm(dataset.get_series(),desc="Parsing series objects",unit="SeriesObjects"):data=series.get_data()["Value"]data.plot(title=f"Collection:{dataset.collection}\nTopic:{dataset.topic}",ax=ax,label=series.name,)ax.legend()plt.show()Console:Parsing datasets: 100%|██████████| 1/1 [00:00<00:00, 321.95datasets/s]✔ Loading datasets successful✔ Loading series data successfulParsing series: 100%|██████████| 5/5 [00:00<00:00, 19765.81series/s]Parsing series objects: 100%|██████████| 5/5 [00:05<00:00,  1.16s/SeriesObjects]Linkshttps://www.leveropen.com
Package: levi
LeviDelta Lake helper methods.  No Spark dependency.InstallationInstall the latest version withpip install levi.Delta File StatsThedelta_file_statsfunction provides information on the number of bytes in files of a Delta table.  Example usage:importlevifromdeltalakeimportDeltaTabledt=DeltaTable("some_folder/some_table")levi.delta_file_sizes(dt)# return value{'num_files_<1mb':345,'num_files_1mb-500mb':588,'num_files_500mb-1gb':960,'num_files_1gb-2gb':0,'num_files_>2gb':5}This output shows that there are 345 small files with less than 1mb of data and 5 huge files with more than 2gb of data.  It'd be a good idea to compact the small files and split up the large files to make queries on this Delta table run faster.You can also specify the boundaries when you invoke the function to get a custom result:levi.delta_file_sizes(dt,["<1mb","1mb-200mb","200mb-800mb","800mb-2gb",">2gb"])Skipped statsProvides information on the number of files and number of bytes that are skipped for a given set of predicates.importlevidt=DeltaTable("some_folder/some_table")levi.skipped_stats(dt,filters=[('a_float','=',4.5)])# return value{'num_files':2,'num_files_skipped':1,'num_bytes_skipped':996}This predicate will skip one file and 996 bytes of data.You can useskipped_statsto figure out the percentage of files that get skipped.  You can also use this information to see if you should Z ORDER your data or otherwise rearrange it to allow for better file skipping.Get Latest Delta Table VersionThelatest_versionfunction gets the most current Delta Table version number and returns it.importlevifromdeltalakeimportDeltaTabledt=DeltaTable("some_folder/some_table")levi.latest_version(dt)# return value2
Package: levish
levish: Create your own ShellInstallationInstall levish using pip:pip install levishGetting startedUsing levish is very easy. We start by importing the 'Shell' class and creating a new Shell object.fromlevishimportShellsh=Shell("MyShell")After that we can create our first command. We do that by first creating a simple function. The function has to take varargs called '*args'. Then we can add the function to our Shell object using the add_command() method. Pass in our new created function and add a simple description using the 'description' argument.defhello(*args):print("what's up?")sh.add_command(hello,description="This command prints hello!")Now we just need to run our shell. We do that by executing the run() function of our Shell object.Complete codefromlevishimportShellsh=Shell("MyShell")defcmd_hello(*args):print("hello!")sh.add_command(hello,description="This command prints hello!")sh.run()Output[>] hello
hello!Other examples can be found in the examples folder.
Package: levis-pdfparse
SciPDF ParserA Python parser for scientific PDF based onGROBID.InstallationUsepipto install from this Github repositorypipinstallgit+https://github.com/titipata/scipdf_parserNoteWe also need anen_core_web_smmodel for spacy, where you can runpython -m spacy download en_core_web_smto download itYou can change GROBID version inserve_grobid.shto test the parser on a new GROBID versionUsageRun the GROBID using the given bash script before parsing PDFbashserve_grobid.shThis script will download GROBID and run the service at default port 8070 (see morehere).
To parse a PDF provided inexample_datafolder or direct URL, use the following function:importscipdfarticle_dict=scipdf.parse_pdf_to_dict('example_data/futoma2017improved.pdf')# return dictionary# option to parse directly from URL to PDF, if as_list is set to True, output 'text' of parsed section will be in a list of paragraphs insteadarticle_dict=scipdf.parse_pdf_to_dict('https://www.biorxiv.org/content/biorxiv/early/2018/11/20/463760.full.pdf',as_list=False)# output example>>{'title':'Proceedings of Machine Learning for Healthcare','abstract':'...','sections':[{'heading':'...','text':'...'},{'heading':'...','text':'...'},...],'references':[{'title':'...','year':'...','journal':'...','author':'...'},...],'figures':[{'figure_label':'...','figure_type':'...','figure_id':'...','figure_caption':'...','figure_data':'...'},...],'doi':'...'}xml=scipdf.parse_pdf('example_data/futoma2017improved.pdf',soup=True)# option to parse full XML from GROBIDTo parse figures from PDF usingpdffigures2, you can runscipdf.parse_figures('example_data',output_folder='figures')# folder should contain only PDF filesYou can see example output figures infiguresfolder.
Package: levitate
Welcome to theLevitateresearch project python toolbox.
The primary goal of this toolbox is to provide a collection of algorithms and design patterns to aid researchers working with acoustic levitation and related topics, e.g. mid-air haptic feedback or parametric audio.Project Website:http://www.levitateproject.orgSource code and issue tracker:https://github.com/AppliedAcousticsChalmers/levitateDocumentation:https://levitate.readthedocs.ioInstallationDepending on your needs the package can be installed from multiple sources.
The easiest is to use pip to install the latest stable release from PyPI:pip install levitateYou can also install more recent versions directly from github:pip install git+https://github.com/AppliedAcousticsChalmers/levitate.git@devleopTo contribute to the development the recommended installation is to clone the repository and use conda to get the requirements in a new virtual environment:git clone https://github.com/AppliedAcousticsChalmers/levitate.git
cd levitate
conda env createThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 737087.
Package: levit-report
Levit-reportThis library makes it easy to manage and render a set of relatorio-based reports in a Django applicationCompatibility MatrixLevit-reportis compatible with the following matrixPy 3.5Py 3.6Py 3.7Py 3.8Django 2.0YesYesYesYesDjango 2.1YesYesYesYesDjango 2.2YesYesYesYesDjango 3.0NOYesYesYesInstallationpip install levit-reportConfigurationAddlevit_reportto yourINSTALLED_APPS:## settings.py

INSTALLED_APPS = (
    ...
    'levit_report',
)Import the built-in urls into yoururls.py## urls.py

...
from levit_report import urls as report_urls

...
urlpattern = [
    ...
    path('reports/', include(report_urls)),
]UsageBefore being able to use this package you will first have to create aRelatoriotemplate. The "object"
of the report will be available inside the report aso(as in object).Once you have created your templte, go to the admin and add a newDocument(in theLevit_Reportsection).You'll then be able to upload your relatorio template and associate it with a ContentType.In order to use the "convert to" feature, you'll need you have LibreOffice headless installed.:warning: LibreOffice headless fails silently when a regular LibreOffice window is open on
the same machine.In order to use the "Merge with tos" feature (only available for pdf's), you'll need:to have pdfunite installedhave given the full path to a pdfTOS_FILEin yoursettings.pylike this## settings.py

TOS_FILE = os.path.join(BASE_DIR, 'documents', 'tos.pdf')Once this is done, you'll be able to download a rendered version of your report athttp://localhost:8000/reports/&lt;document_slug&gt;/&lt;target_object_id&gt;/You'll also be able to download a ip containing several rendered reports by pointing
your browser athttp://localhost:8000/reports/&lt;document_slug&gt;/?ids[]=&lt;target_object_id&gt;&ids[]=&lt;target_object_2_id>...This project is licensed under theMIT License