Saravanan666/pypi-org huggingface dataset:
Package: litedb
liteDB.. image::https://travis-ci.org/JonathanVusich/litedb.svg?branch=master&kill_cache=1:target:https://travis-ci.org/JonathanVusich/litedb:alt: Build Status.. image::https://coveralls.io/repos/github/JonathanVusich/litedb/badge.svg?branch=master:target:https://coveralls.io/github/JonathanVusich/litedb?branch=master:alt: Coverage.. image::https://readthedocs.org/projects/litedb/badge/?version=latest:target:https://litedb.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusliteDB is a Python NoSQL database that was created to make databases easy. It is designed with clean and simple APIs, and comes in a couple of different implementations for specific use cases.When should I use liteDB?liteDB is the perfect tool for small projects where performance is of less concern than ease of use and clean, Pythonic APIs.
When you don't want to go through the hassle of setting up an SQL database but don't want to rely on JSON data storage, liteDB is the solution. It works by usingpickleto serialize arbitrary Python classes, and allows users to perform index-based searches on stored objects. It also is written using no platform-specific APIs so that it is completely cross-platform.Future planned featuresDatabase compression using gzipEncryptionBetter docsUseful examplesCurrent performance/optimization problemsNote: This section is aimed mostly at developers who need the highest levels of performance. For most tasks, LiteDB will be quite performant.The main performance cost in autoDB is the serialization and deserialization of Python objects. liteDB uses thepicklelibrary for this task since it is able to serialize arbitrary Python types, which removes the need for the user to define custom classes for serialization.picklehas a couple of downsides though, including slow performance and security issues when unencrypted. An obvious solution to this problem is to use JSON for object serialization. However, this would require all stored objects to follow a predefined format and only contain data that is easy to serialize. This is a fairly large downside, as it would involve the user having to build their system for liteDB rather than just using it as a plug-and-play solution. The serialization engine will probably have to be implemented with JSON and tested extensively before this design decision can be fully resolved.The index map can take up a considerable amount of memory when there are millions of unique objects in the database. This is due to the automatic indexing of any suitable object attribute. Perhaps the user should be able to select their desired indexes in order to save memory. Also, indexes may be able to be more efficiently implemented using lists instead of sets.Can I contribute to liteDB?Yes, you absolutely can! Any and all help with future functionality and the above issues is very welcome. Just fork the repository, and begin experimenting. If you come up with something that you believe is really good, be sure to share it by opening a PR!Development statusThis project has exited the implementation phase and has graduated to a beta release.
Package: litedfs-client
LiteDFS-ClientA distributed file system, based on Python3, tornado, inspired by HDFS.It's for data processing cache, not for permanent storage!All code based on Python3, do not use Python2!It still under development, so, maybe have some bugs or not stable enough!See more details athttps://github.com/fiefdx/LiteDFSDeploymentInstall LiteDFS-Client$pip3installlitedfs-client
Package: liteeth
__   _ __      ______  __
                                     / /  (_) /____ / __/ /_/ /
                                    / /__/ / __/ -_) _// __/ _ \
                                   /____/_/\__/\__/___/\__/_//_/

                                 Copyright 2012-2022 / EnjoyDigital

                             A small footprint and configurable Ethernet core
                                      powered by Migen & LiteX[> IntroLiteEth provides a small footprint and configurable Ethernet core.LiteEth is part of LiteX libraries whose aims are to lower entry level of
complex FPGA cores by providing simple, elegant and efficient implementations
of components used in today's SoC such as Ethernet, SATA, PCIe, SDRAM Controller...Using Migen to describe the HDL allows the core to be highly and easily configurable.LiteEth can be used as LiteX library or can be integrated with your standard
design flow by generating the verilog rtl that you will use as a standard core.[> FeaturesPHY:MII, RMII 100Mbps PHYs.GMII / RGMII /1000BaseX 1Gbps PHYs.Core:Configurable MAC (HW or SW interface)ARP / ICMP / UDP (HW or SW)Frontend:Etherbone (Wishbone over UDP: Slave or Master support)[> FPGA ProvenLiteEth is already used in commercial and open-source designs:MiSoC:http://m-labs.hk/gateware.htmlARTIQ:http://m-labs.hk/artiq/index.htmlHDMI2USB:http://hdmi2usb.tv/home/and others commercial designs...[> Possible improvementsadd standardized interfaces (AXI, Avalon-ST)add DMA interface to MACadd more documentation... See below Support and consulting :)If you want to support these features, please contact us at florent [AT]
enjoy-digital.fr.[> Getting startedInstall Python 3.6+ and FPGA vendor's development tools.Install LiteX and the cores by following the LiteX's wikiinstallation guide.You can find examples of integration of the core with LiteX in LiteX-Boards and in the examples directory.[> TestsUnit tests are available in ./test/.
To run all the unit tests:$./setup.pytestTests can also be run individually:$python3-munittesttest.test_name[> LicenseLiteEth is released under the very permissive two-clause BSD license. Under
the terms of this license, you are authorized to use LiteEth for closed-source
proprietary designs.
Even though we do not require you to do so, those things are awesome, so please
do them if possible:tell us that you are using LiteEthcite LiteEth in publications related to research it has helpedsend us feedback and suggestions for improvementssend us bug reports when something goes wrongsend us the modifications and improvements you have done to LiteEth.[> Support and consultingWe love open-source hardware and like sharing our designs with others.LiteEth is developed and maintained by EnjoyDigital.If you would like to know more about LiteEth or if you are already a happy
user and would like to extend it for your needs, EnjoyDigital can provide standard
commercial support as well as consulting services.So feel free to contact us, we'd love to work with you! (and eventually shorten
the list of the possible improvements :)[> ContactE-mail: florent [AT] enjoy-digital.fr
Package: liteexpr
liteexprA light, expression language.Language OverviewFor the language overview, see themain page.
The rest of the document describes using liteexpr with Python.Installationpip3installliteexprExampleimportliteexprsymbols=liteexpr.SymbolTable({"grades":{"alice":"A","bob":"B",}})liteexpr.eval("""PRINT("I have " + LEN(grades) + " students");PRINT("Alice's grade is " + grades.alice);""",symbols)Output:I have 2 students
Alice's grade is ALicenseApache 2.0
Package: liteflow.providers.azure
Azure synchronization providers for LiteFlowProvides support to use Azure storage as a shared work queue and distributed lock service for LiteFlowInstallingInstall the "liteflow.providers.azure" package> pip install liteflow.providers.azureUsagePass an instances of AzureQueueProvider and AzureLockProvider toconfigure_workflow_hostwhen configuring your workflow node host.fromazure.storage.commonimportCloudStorageAccountfromliteflow.coreimport*fromliteflow.providers.azureimportAzureQueueProvider,AzureLockProviderazure_storage_account=CloudStorageAccount(account_name='my account',account_key='my key')azure_queue_service=AzureQueueProvider(azure_storage_account)azure_lock_service=AzureLockProvider(azure_storage_account)host=configure_workflow_host(queue_service=azure_queue_service,lock_service=azure_lock_service)host.start()
Package: liteflow.providers.mongo
MongoDB Persistence provider for LiteFlowProvides support to persist workflows running on LiteFlow to a MongoDB database.InstallingInstall the "liteflow.providers.mongo" package> pip install liteflow.providers.mongoUsagePass an instance of MongoPersistenceProvider toconfigure_workflow_hostwhen configuring your workflow node host.fromliteflow.coreimport*fromliteflow.providers.mongoimportMongoPersistenceProvidermongodb=MongoPersistenceProvider('mongodb://localhost:27017/','liteflow')host=configure_workflow_host(persistence_service=mongodb)host.start()
Package: litefs
Build a web server framework using Python. Litefs was developed to implement a server framework that can quickly, securely, and flexibly build Web projects. Litefs is a high-performance HTTP server. Litefs has the characteristics of high stability, rich functions, and low system consumption.Author: leafcoder
Email:leafcoder@gmail.comCopyright (c) 2020, Leafcoder.
License: MIT (see LICENSE for details)
Package: litegitpuller
litegitpullerA jupyterlite extension to automate cloning of a github repository.DocsSeehttps://litegitpuller.readthedocs.io/en/latest/index.htmlRequirementsJupyterLab >= 4.0.0InstallTo install the extension, execute:pipinstalllitegitpullerUninstallTo remove the extension, execute:pipuninstalllitegitpullerContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the litegitpuller directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstalllitegitpullerIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink named@jupyterlite/litegitpullerwithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE
Package: litegrade
litegradelitegradeis a Python library that gives IPython notebook authors a simple and user friendly method of evaluating the learning retention of notebook readers. A few functionalities include:Implement in Jupyter and Google Colab notebook environmentsaskquestions anywhere in an already written notebookcheckanswers with an option of providing feedbackhandinand store answers at a selected server locationanalyzelearning retention to improve notebook contentNew Features!HTML and JavaScript interactive question formatsYou can also:Select database storage locations such as DynamoDB or Google DriveCustomize question format and styles with CSSHow to UseInstall the library[]!pipinstalllitegradeImport theasklibrary function[]fromlitegradeimportaskInvoke theaskfunction to ask the reader a question about the notebook content[]ask("Recursion question")DevelopmentWant to contribute to thelitegradeproject? Great!View some of our currentissueson GitHubAfter pulling thelitegraderepository, run the developer's setup script located in the project's home diretory. This will install any needed dependencies as well as create symbolic links used for testing.$./dev_setup.shTo run tests$pytesttest/To deploy to PyPi$.package/release
Package: litehash
# Install$pip3installlitehashUseFibonacciCalculate the checksum based on the bytes located at an increasing distance from
each other, and the file size. We will read more bytes from the
file header than from the body.frompathlibimportPathfromlitehashimportfile_to_hash_fibonacciprint(file_to_hash_fibonacci(Path('/path/to/file.dat')))EquidistantCalculate the checksum based on ten equidistant bytes, and the file size.
The very first and the very last byte of the file will be among the ten read.frompathlibimportPathfromlitehashimportfile_to_hash_equidistantprint(file_to_hash_equidistant(Path('/path/to/file.dat'),n=10))HashAlgoThe optionalHashAlgoargument allows you to select a hashing algorithm.By default, MD5 is used as a compromise between speed and size.AlgorithmDigest Size (bytes)HashAlgo.crc324HashAlgo.md524HashAlgo.sha25632frompathlibimportPathfromlitehashimportfile_to_hash_fibonacci,HashAlgoprint(file_to_hash_fibonacci(Path('/path/to/file.dat'),algo=HashAlgo.crc32))
Package: liteindex
LiteIndexEmbedded, thread and process safe, disk backed, easy to use, query-able, fast Index implementationspipinstall--upgradeliteindexDefinedIndexDocumentation|Detailed example|Benchmarksfixed schema index i.e: schema has to be defined before handnumber,boolean,datetime,string,compressed_string,blob,json,normalized_embedding, andothertypes are supported andcan be queried uponcan store any python objects with varying levels of query-abilityQuery language is subset of mongodb's. All queries are documentedseamless, very fast nearest neighbor search with filtering. a practical wrapper of faiss + sqlite. Approximate nearest neighbor search is not supported. Intended for few million vector searchworks across threads, processes seamlesslyhandy features like search and update in single query, batch operation support for update, search, del, pop etc ..in-place math operations support wherever applicable i.e: += etc can be done in single query optimallycompression is supported natively and optional custom compression dictionaries can be built automaticallyKVIndexDocumentation|Detailed example|Benchmarkssimple key value store, can store any python objects, can be queried for equality, sorting, max, min etc wherever applicablein-place math operations support wherever applicable i.e: += etc can be done in single query optimallyhas a python dict like interfacebatch operation support for update, search, del, pop etc ..ultra fast, works across threads, processes seamlesslyEviction policies supported:LRU,LFU,anyand age based invalidation and size, count based evictionfunction_cacheDocumentation|Detailed example|Benchmarksbased on KVIndex, can be used to cache function calls of any typebatch inference caching friendly
Package: litekv
LiteKV is a wrapper for sqlite3, it turns sqlite3 into a kv data store,
and has similar APIs with redis-py.Simply executepython-mlitekv(if you have installed it) orpython litekv.pyto run doctest.Usage>>>db=LiteKV(reset=True)>>>db.set('a','1')>>>db.get('a')'1'>>>db.set('a','2')>>>db.get('a')'2'>>>db.set('b','3')>>>list(db.keys())['a','b']>>>db.delete('a')>>>db.get('a')isNoneTrueBenchmark$ python -m litekv --benchmark
With rowid
Do 10000 inserts & reads
1215.88587897 Insertion per second
18041.2587533 Reads per second

Without rowid
Do 10000 inserts & reads
1182.05950852 Insertion per second
17828.1725067 Reads per second
Package: litelama
Lite Lama - A lightweight LAMA inference wrapperfromlitelamaimportLiteLamaimportrequestsfromPILimportImagefromioimportBytesIOdefdownload_image(url):response=requests.get(url)returnImage.open(BytesIO(response.content)).convert("RGB")img_url="https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"mask_url="https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"lama=LiteLama()lama.to("cuda:0")init_image=download_image(img_url).resize((512,512))mask_image=download_image(mask_url).resize((512,512))lama.predict(init_image,mask_image).save("result.png")
Package: litelearn
litelearna python library for building models without fussing
over the nitty gritty details for data munginginstallationpip install litelearnusageonce you have apandasdataframe you can create a model
for your dataset in 3 lines of code:Regression# load some datasetimportseabornassnsdataset="penguins"target="body_mass_g"df=sns.load_dataset(dataset).dropna(subset=[target])# just 3 lines of code to create and evaluate a modelimportlitelearnasllmodel=ll.regress_df(df,target)model.display_evaluation()Classification# load some datasetimportseabornassnsdataset="penguins"target="species"df=sns.load_dataset(dataset).dropna(subset=[target])# just 3 lines of code to create and evaluate a modelimportlitelearnasllmodel=ll.classify_df(df,target)model.display_evaluation()Predictionprediction is easy too, it will work on any data that resembles the training data.
dtypes don't have to match, and you can even have extra columns in your prediction data.
missing values and unknown categories will be imputed with the training data's values.df=...# load some dataframesplit=int(len(df)*0.8)train_df,val_df=df[:split],df[split:]model=...# build some modelpred=model.predict(val)# predict on unseen datafeaturesdoes all the data munging for you, including missing data, categorical data handlinguses the robustcatboostlibrary for gradient boosting, which is known for generating
high quality models with little tuningsupportsshapfor explainability.
callmodel.display_shap()ormodel.get_shap()to get the shap values for your modelsupports sklearn'spermutation importancecallmodel.display_permutation_importance()ormodel.get_permutation_importance()to get feature importances that are biased towards the model's performance on test data.supports easy pickling: to save your model simply callmodel.save("path/to/model.pkl")and to load your model callmodel.load("path/to/model.pkl")for regression models, you can callmodel.display_residuals()to see the residuals of your modelit also supports segmeents for your data using themodel.set_segments()method.
this will create a new column in your dataframe calledsegmentwhich you can use to
group your data. this is useful for seeing how your model performs on different segments of your data.
Package: litelog
LiteLog is an easy-to-use, totally standard-library Python logging utility that makes complex logging functions easy.Featuresautomatically-named per-file logfiles, specifically written next to the source files.special __debug__ log, where tagged functions can have all of their input/output/errors safely reported completely transparently and without interference.different log message levels, just like the ‘logging’ builtin.recursive calls in __debug__ are indented, so determining function call depth is natural.InstallationTo install globally, run:sudo pip install litelogTo install locally (such as within a virtual environment), run:pip install litelogUsageThe following is copy-and-pasteable code, so long as litelog is available globally:##################################### SETTING UP THE LOGGERimportosimportlitelogROOTPATH=os.path.splitext(__file__)[0]LOGPATH="{0}.log".format(ROOTPATH)# this simply specifies the absolute path -- feel free to change this.LOGGER=litelog.get(__name__,path=LOGPATH)LOGGER.info("----------BEGIN----------")# do the following step if you want# a global 'debug' log file:litelog.set_debug(__file__)####################################When pasted at the top of your program, the above lines:create a logger specifically for the current file, with the same name (ex:  test.py -> test.log)add a starting line/delimiter to the log, to indicate separate module imports/runs (by default, the logs areappendedto)creates an optional global “debug” logger, which can record the I/O/Errors of any function tagged with ‘@litelog.logwrap’ (set_debug() should only be called once)Here are the actual use case examples:@litelog.logwrap# <--- do this if you want a __debug__.log to record I/O/Error of function callsdeff():...LOGGER.info('just a test')# <--- do this if you want to log custom#      messages to the script's personal log.##################################### logging levels:LOGGER.debug(...)LOGGER.info(...)LOGGER.warning(...)LOGGER.error(...)LOGGER.critical(...)
Package: litemapy
LitemapyLitemapy's goal is to provide an easy to use way to read and edit Litematica's schematic file format in python.Litematicais Minecraft mod by maruohon.InstallationLitemapy is available on pypi:pipinstalllitemapyFeatures:Read and write .litematic filesFull support for litematics' regions conceptFull block storage supportFull support for basic metadata handling (author, name, description, block count and total volume)Partial support for entitiesPartial support for tile entitiesPartial support for pending block updatesPartial support for preview imagesDocumentationDocumentation is available on ReadTheDocs:litemapy.rtfd.io.ExampleHere is a basic example of creating a schematic, and of reading one:fromlitemapyimportSchematic,Region,BlockState# Shortcut to create a schematic with a single regionreg=Region(0,0,0,21,21,21)schem=reg.as_schematic(name="Planet",author="SmylerMC",description="Made with litemapy")# Create the block state we are going to useblock=BlockState("minecraft:light_blue_concrete")# Build the planetforx,y,zinreg.allblockpos():ifround(((x-10)**2+(y-10)**2+(z-10)**2)**.5)<=10:reg.setblock(x,y,z,block)# Save the schematicschem.save("planet.litematic")# Load the schematic and get its first regionschem=Schematic.load("planet.litematic")reg=list(schem.regions.values())[0]# Print out the basic shapeforxinreg.xrange():forzinreg.zrange():b=reg.getblock(x,10,z)ifb.blockid=="minecraft:air":print(" ",end="")else:print("#",end='')print()When ran, we get the expected output:#######       
     ###########     
    #############    
   ###############   
  #################  
 ################### 
 ################### 
#####################
#####################
#####################
#####################
#####################
#####################
#####################
 ################### 
 ################### 
  #################  
   ###############   
    #############    
     ###########     
       #######