Saravanan666/pypi-org huggingface dataset:
Package: lmdoctor
lmdoctorpip pkg for extracting and controlling concepts within language models as they generate textbuilt on 🤗 transformersit reads the model's activations during inference to determine how certain concepts (e.g. honesty) are representated, and how to control them.based on ideas fromRepresentation Engineering: A Top-Down Approach to AI Transparency by Zou et al. 2023. their original codehere.for the latest source code or to report issues, please visit theproject repository.Exampleprompt = "Tell me a fact about humans"

from lmdoctor import honesty_utils
ld = honesty_utils.LieDetector(model, tokenizer, user_tag, assistant_tag)
text = ld.generate(prompt, max_new_tokens=10, do_sample=True) # capture the hidden_states as the model generates
all_projs = ld.get_projections(honesty_extractor.direction_info) # project the hidden_states onto the direction vectors from honesty extractionprompt = "Tell me a lie about humans"Getting started[linux only]pip install lmdoctorNote: This package requires pytorch but does not include it because the specific version/cuda backend will depend the huggingface model you are using. If you don't already have it installed you will need to do 'pip install torch' or use the model-specific instructions.After install, try running honesty_example.ipynb
Package: lm-dw-deezer
LM DW DeezerInstallOnly C backendpipinstalllm-dw-deezerW Rust backend[!NOTE]
If you have already installed RUST you can jump this stepcurl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|shInstallpipinstalllm-dw-deezer[RUSTDW]Usagelm_dw_deezer--helpInside a docker containerRun in a containerdockerrun-it--rm-v"$(pwd):/Songs"python:3.12bash
Package: lmdx-flow
LMDX-flowLMDX-flow is a Python toolkit designed for document information extraction using LMDX.
It simplifies the process of creating prompts which contain document layout information and decoding LLM responses to extract valuable information from documents.What is LMDX: LANGUAGE MODEL-BASED DOCUMENT INFORMATION EXTRACTION AND LOCALIZATION?LMDX is a methodology for leveraging off-the-shelf LLMs for information extraction on
semi-structured documents.Paper :https://arxiv.org/pdf/2309.10952.pdfProposes a prompt that enables LLMs to perform the document IE task on leaf and
hierarchical entities with precise localization, including without any training data.Proposes a layout encoding scheme that communicate spatial information to the
LLM without any change to its architecture.Introduces a decoding algorithm transforming the LLM responses into extracted entities
and their bounding boxes on the document, while discarding all hallucination.Key FeaturesPrompt Generation:Easily create effective prompts based on the LMDX methodology.Response Decoding:Extract entity values and bounding boxes by decoding and grounding the LLM responses.Getting StartedInstall tesseract-OCRInstall poppler-utilspipinstalllmdx-flow## Load the tokenizerfromtransformersimportAutoTokenizertokenizer=AutoTokenizer.from_pretrained("bert-base-uncased")fromlmdx_flowimportPipelineP=Pipeline(file_path,tokenizer)prompts=P.generate_prompt(schema)answers=P.postprocess_all_chunks(llm_responses)To-doAdd support for hierarchical entitiesAdd option to use OCR-words as segment (currently uses OCR-lines as segment)ReferencesLMDX paperHugging Face Transformers LibraryExplore the potential of LMDX-flow to enhance document information extraction using LLMs with ease.
Package: lme
LMECotação London Metal ExchangeInstalando o pacote via pip$ pip install lmeInstalando via git$ git clone https://github.com/tiagocordeiro/lme.gitComo rodar o projeto (clonando via git)Clone esse repositório.Crie um virtualenv com Python 3.Ative o virtualenv.Instale as dependências.git clone https://github.com/tiagocordeiro/lme.git
cd lme
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python contrib/env_gen.pyUtilizando o pacote no terminal$ python lme/prices.py 
╔═════════════════════════════════╦════════════════════╦═════════════════╗
║ Semana do ano: 07               ║ Início: 17-02-2020 ║ Fim: 21-02-2020 ║
╚═════════════════════════════════╩════════════════════╩═════════════════╝
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel   Dolar
Data                                                                  
2020-02-17  5802.0  2153.5    1678.5  1911.0  16630.0  13070.0  4.3157
2020-02-18  5728.0  2128.0    1681.0  1901.0  16520.0  12880.0  4.3471
2020-02-19  5745.5  2126.5    1686.0  1920.0  16550.0  12700.0  4.3728
2020-02-20  5730.0  2100.0    1687.0  1939.0  16600.0  12685.0  4.3873
2020-02-21  5702.0  2086.5    1677.0  1881.0  16525.0  12440.0  4.3924
═════════════════════════════════════════════════════════════════════════
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel    Dolar
Média:      5741.5  2118.9    1681.9  1910.4  16565.0  12755.0  4.36306Python console>>> from lme.prices import last_weeks
>>> last_weeks(2)
...
╔═════════════════════════════════╦════════════════════╦═════════════════╗
║ Semana do ano: 07               ║ Início: 17-02-2020 ║ Fim: 21-02-2020 ║
╚═════════════════════════════════╩════════════════════╩═════════════════╝
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel   Dolar
Data                                                                  
2020-02-17  5802.0  2153.5    1678.5  1911.0  16630.0  13070.0  4.3157
2020-02-18  5728.0  2128.0    1681.0  1901.0  16520.0  12880.0  4.3471
2020-02-19  5745.5  2126.5    1686.0  1920.0  16550.0  12700.0  4.3728
2020-02-20  5730.0  2100.0    1687.0  1939.0  16600.0  12685.0  4.3873
2020-02-21  5702.0  2086.5    1677.0  1881.0  16525.0  12440.0  4.3924
═════════════════════════════════════════════════════════════════════════
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel    Dolar
Média:      5741.5  2118.9    1681.9  1910.4  16565.0  12755.0  4.36306Testes, contribuição e dependências de desenvolvimentoPara instalar as dependências de desenvolvimentopip install -r requirements-dev.txtBanco de dados para desenvolvimento com Dockerdocker-compose up -dPara rodar os testespytestPara criar um relatório de cobertura de testes.coverage run -m pytest -v
coverage htmlVerificando oCode stylepycodestyle .
flake8 .ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: lmfit-slider
lmfit-sliderRequirementsmatplotlibnumpyInstallationpip install lmfit-sliderUsageimport lmfit
import numpy as np

from lmfit_slider import slider


def fcn(params, x, A):
    return A*np.sin(params['k']*x)


params = lmfit.Parameters()
params.add('k', value=1, min=-10, max=10)

data_x = np.linspace(0, 2*np.pi, 6)
data = 1.5*np.sin(4*data_x)

model_x = np.linspace(min(data_x), max(data_x), 5000)

new_params = slider(
    fcn,
    params,
    data_x=data_x,
    data=data,
    args=(model_x, 1.5),
)

new_params.pretty_print()
Package: lmfit-varpro
lmfit-varproNOTE: this package is deprecated and its repository archived.DescriptionPython based implementation of variable projection extendinglmfit-py.Deprecation warningThis package has been deprecated; the functionality it provided has been integrated into thepyglotaranpackage.An early adopter version of this package was released on pypi, but it is no longer maintained. This repository is archived to serve the purpose of providing an example of how one could extend a popular Python fitting librarylmfit-pywith support for variable projection (varpro).It should be noted that this code base has not been extensively validated, beyond the checks that the unit tests provide. Anyone who wishes to re-use parts of thelmfit-varprocode base is responsible for their own due diligence.CreditsThe credits can be found in the documentationscreditssectionSpecial thanks goes out to Stefan Schütz, who provided an early C++ prototype and the first Python proof-of-concept code to build on.
Package: lmfitxps
lmfitxpsIntroductionWelcome to lmfitxps, a small Python package designed as an extension for the popular lmfit package , specifically tailored for X-ray Photoelectron Spectroscopy (XPS) data analysis.While lmfit provides simple tools to build complex fitting models for non-linear least-squares problems and applies these models to real data, as well as introduces several built-in models, lmfitxps acts as an extension to lmfit designed for XPS data analysis. lmfitxps provides a comprehensive set of functions and models that facilitate the fitting of XPS spectra. In particular, lmfitxps provides several models, which use the convolution of a gaussian with model functions of the lmfit-package.In addition to models for fittig signals in XPS data, lmfitxps introduces several background models which can be included in the fit model for fitting the data rather then substracting a precalculated background. This is the so-called active approach as suggested by A. Herrera-Gomez and generally leads to better fit results.
For further details, please refer to the documentation oflmfitxpsandlmfit!InstallationTo install lmfitxps, simply use pip:pip install lmfitxpsHow to cite
Package: lmgtfy
Command line tool forhttp://lmgtfy.com/===
[![Pypi Version](https://pypip.in/v/lmgtfy/badge.png)](https://crate.io/package/lmgtfy)
[![Downloads](https://pypip.in/d/lmgtfy/badge.png)](https://crate.io/package/lmgtfy)
[![Build Status](https://travis-ci.org/decached/lmgtfy.png?branch=master)](https://travis-ci.org/decached/lmgtfy)Features
—
Get original as well as shortened lmgtfy url for your query from command lineDependencies
—Requests$ pip install requestsXclip$ apt-get install xclipInstallation
—$ pip install lmgtfyPass a query string to lmgtfy from command line as follows` $ lmgtfy hello world Lmgtfy url:http://lmgtfy.com/?q=hello+worldShort url :http://is.gd/Hf48UY`by [@decached](http://github.com/decached) based on [lmgtfy-gem](https://github.com/prathamesh-sonpatki/lmgtfy-gem)
Package: lm-identifier
LM IdentifierWith a surge of generative pretrained language models, it is becoming increasingly important to distinguish between human and AI-generated text. Inspired byGPTZero, an app that seeks to detect AI-generated text, LM Identifier pokes at this question even further by providing a growing suite of tools to help identifywhich (publicly available) language modelmight have been used to generate some given chunck of text.InstallationLM Identifier is available on PyPI.$ pip install lm-identifierTo develop locally, first install pre-commit:$ pip install --upgrade pip wheel
$ pip install pre-commit
$ pre-commit installInstall the package in editable mode.pip install -e .UsagesWIP
Package: lmikoto-efb-qq-slave
Channel ID:milkice.qq中文文档Software dependenciesPython >= 3.6EH Forwarder Bot >= 2.0.0ffmpeglibmagicpillowInstallationThis project is still in Alpha, use at your own riskAt this stage, please follow the following steps to install this package and start testing.Install the binary dependencies and EH forwarder bot.Install via pippip3 installefb-qq-slaveEnablemilkice.qqslave channel in your<profiledirectory>/config.yaml.Usually, this file is located in~/.ehforwarderbot/profiles/default/config.yamlCreateconfig.yamlfile formilkice.qqslave channel to specify QQ Client.The detailed configuration steps for various QQ Clients are as follows.Currently efb-qq-slave only supports CoolQ ClientClients:CoolQ:CoolQ Client ConfigurationFAQsThe following content is valid for all clientsQ - How do I recall a message at the master channel (Telegram)?A - If the QQ client supports the operation, please edit the message and add therm`in the front of the message to recall the message on the QQ. Please also note that the message sent can only be recalled within 2 minutes of being sent.Q - How do I edit a message on the master channel (Telegram)?A - Directly use Telegram’s edit message featureNotesFor end users, it’s highly not recommended to test this project as mysterious bugs may occur and it’s pretty disgusting for users who have no experience with Python to deal with it.For developers, contributions & issues are welcomed.
Package: lm-infinite
LM-INFINITE: SIMPLE ON-THE-FLY LENGTH GENERALIZATION FOR LARGE LANGUAGE MODELSLM-Infinite is a solution proposed by Chi Han, Qifan Wang, Wenhan Xiong, Yu Chen, Heng Ji, and Sinong Wang to address the length generalization failure of Large Language Models (LLMs) on long sequences. LLMs, such as Transformer-based models, have shown impressive performance in various domains but struggle when it comes to longer reasoning processes or understanding larger contexts. Current pre-training schemes truncate training sequences to a fixed length, and even with relative positional encoding, LLMs struggle to generate coherent texts or perform downstream tasks after longer contexts.The authors investigate the main out-of-distribution factors contributing to this problem and propose LM-Infinite as an efficient solution. LM-Infinite only requires a Λ-shaped attention mask and a distance limit, without any parameter updates or learning. It can be applied to different LLMs using relative-position encoding methods. LM-Infinite demonstrates consistent fluency and generation quality for sequences as long as 32k tokens on datasets like ArXiv and OpenWebText2, with a decoding speedup of 2.72x. Furthermore, it continues to perform well on inputs much longer than training lengths in downstream tasks like passkey retrieval, where vanilla models fail immediately.Paper LinkAppreciationLucidrainsAgoriansInstallpip install lm-infiniteUsageimporttorchfrominfinite.mainimportLMInfinited_model=512seq_len=100n_global=100l_pretrain=50#sampleq=torch.randn(1,seq_len,d_model)k=torch.randn(1,seq_len,d_model)v=torch.randn(1,seq_len,d_model)#llm infinite modemodel=LMInfinite(d_model,n_global,l_pretrain)#forwad passoutput=model(q,k,v)print(output.shape)ArchitectureTodoLicenseMITCitations@misc{2308.16137,
Author ={Chi Han and Qifan Wang and Wenhan Xiong and Yu Chen and Heng Ji and Sinong Wang},
Title ={LM-Infinite: Simple On-the-Fly Length Generalization for Large Language Models},
Year ={2023},
Eprint ={arXiv:2308.16137},}
Package: lmirror
CopyrightLMirror is Copyright (C) 2010 Robert Collins <robertc@robertcollins.net>LMirror is free software: you can redistribute it and/or modify it under the
terms of the GNU 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 General Public License for more details.You should have received a copy of the GNU General Public License along with
this program.  If not, see <http://www.gnu.org/licenses/>.In the LMirror source tree the file COPYING.txt contains the GNU General Public
License version 3.What is LMirrorLMirror is a large scale mirroring program. lmirror is targeted at mirrors of
free software projects and other mostly-write-once environments. It has
specific support for barriers in its operations to permit the preservation of
semantic structure on disk during the mirroring process and handles 1:N
and 1:N:M mirroring situations with aplomb.HomepageLMirror is hosted on launchpad.net athttps://launchpad.net/lmirror. A mailing
list is available athttps://launchpad.net/~lmirror-dev, and the IRC channel is
#lmirror on irc.freenode.net.InstallationPlease see INSTALL.txtUsagePlease see doc/MANUAL.txtDesignPlease see doc/DESIGN.txtContributing and customisingPlease see doc/DEVELOPMENT.txt
Package: lmk
lmk - let me knowEmail notifications from the command line.Step 1Wrap your long running job inlmk:$lmk'bash ./experiments.sh'...# command runs and outputs normally[lmk]chrisc.101@gmail.comnotifiedStep 2☕Step 3Receive an email when it's done:Alternatively,lmk -reads passively from stdin:$(./experiment1.sh;experiment2.py)2>&1|lmk-
...# commands run and output normally[lmk]chrisc.101@gmail.comnotifiedInstallation$pipinstalllmkLicenseMade with ❤️ byChris Cummins. Released underMIT License.
Package: lmkapp
LMK Python ClientInstallationYou can install usingpip:pipinstall'lmkapp[cli,jupyter]'If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:jupyternbextensionenable--py[--sys-prefix|--user|--system]lmkDevelopment InstallationCreate a dev environment:python-mvenvvenvInstall the python package. This will also build the TS package.pipinstall-e".[dev,jupyter,cli,docs,types]"Docs DevelopmentTo build the docs, run:pnpmbuild:docsTo run a development server, run:pnpmdev:docsJupyter DevelopmentWhen developing your extensions, you need to manually enable your extensions with the
notebook / lab frontend. For lab, this is done by the command:jupyterlabextensiondevelop--overwrite.
pnpmbuildFor classic notebook, you need to run:jupyternbextensioninstall--sys-prefix--symlink--overwrite--pylmk
jupyternbextensionenable--sys-prefix--pylmkNote that the--symlinkflag doesn't work on Windows, so you will here have to run
theinstallcommand every time that you rebuild your extension. For certain installations
you might also need another flag instead of--sys-prefix, but we won't cover the meaning
of those flags here.How to see your changesTypescript:If you use JupyterLab to develop then you 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 widget.# Watch the source directory in one terminal, automatically rebuilding when neededpnpmwatch# Run JupyterLab in another terminaljupyterlabAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.Python:If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.Updating the versionTo update the version, install tbump and use it to bump the version.
By default it will also create a tag.pipinstallbump2version
bumpversion<pre|prekind|patch|minor|major>Publishing - PyPIBuild the python package:pnpmbuild:pythonCheck the built assets:pnpmpypi-checkPublish to the test index:pnpmpypi-upload-testInstall from test index:pipinstall--extra-index-urlhttps://test.pypi.org/simple/'lmkapp[jupyter]==<version>'Publish to real index:pnpmpypi-uploadPublishing - NPMBuild the npm package:pnpmbuild:publishPublish the npm package:pnpmnpm-publish
Package: lml
lmlseamlessly finds the lml based plugins from your current python
environment but loads your plugins on demand. It is designed to support
plugins that have external dependencies, especially bulky and/or
memory hungry ones. lml provides the plugin management system only and the
plugin interface is on your shoulder.lmlenabled applications helps your customers[1]in two ways:Your customers could cherry-pick the plugins from pypi per python environment.
They could remove a plugin usingpip uninstallcommand.Only the plugins used at runtime gets loaded into computer memory.When you would uselmlto refactor your existing code, it aims to flatten the
complexity and to shrink the size of your bulky python library by
distributing the similar functionalities across its plugins. However, you as
the developer need to do the code refactoring by yourself and lml would lend you a hand.[1]the end developers who uses your library and packages achieve their
objectives.Quick startThe following code tries to get you started quickly withnon-lazyloading.fromlml.pluginimportPluginInfo,PluginManager@PluginInfo("cuisine",tags=["Portable Battery"])classBoost(object):defmake(self,food=None,**keywords):print("I can cook%sfor robots"%food)classCuisineManager(PluginManager):def__init__(self):PluginManager.__init__(self,"cuisine")defget_a_plugin(self,food_name=None,**keywords):returnPluginManager.get_a_plugin(self,key=food_name,**keywords)if__name__=='__main__':manager=CuisineManager()chef=manager.get_a_plugin("Portable Battery")chef.make()At a glance, above code simply replaces the Factory pattern should you write
them without lml. What’s not obvious is, that once you got hands-on with it,
you can start work on how to dolazyloading.InstallationYou can install lml via pip:$pipinstalllmlor clone it and install it:$gitclonehttps://github.com/python-lml/lml.git$cdlml$pythonsetup.pyinstalllml enabled projectBeyond the documentation above, here is a list of projects using lml:pyexcelpyechartsmobanlml is available on these distributions:ARCH linuxConda forgeOpenSuseLicenseNew BSDChange log0.1.0 - 21/10/2020Updatednon class object can be a plugin too#20: When a plugin was not
installed, it now calls raise_exception method0.0.9 - 7/1/2019Updated#11: more test contents for
OpenSuse package validation0.0.8 - 4/1/2019Updated#9: include tests, docs for
OpenSuse package validation0.0.7 - 17/11/2018Fixed#8: get_primary_key will fail
when a module is loaded laterdeprecated old style plugin scanner: scan_plugins0.0.6 - 07/11/2018FixedRevert the version 0.0.5 changes. Raise Import error and log the exception0.0.5 - 06/11/2018Fixed#6: Catch and Ignore
ModuleNotFoundError0.0.4 - 07.08.2018Added#4: to find plugin names with
different naming patterns0.0.3 - 12/06/2018Addeddictcan be a pluggable type in addition tofunction,classget primary tag of your tag, helping you find out which category of plugins
your tag points to0.0.2 - 23/10/2017Updatedpyexcel#103: include
LICENSE in tar ball0.0.1 - 30/05/2017AddedFirst release
Package: lmlib
lmlibOpen-source and for PythonA Model-Based Signal Processing Library Working With Windowed Linear State-Space and Polynomial Signal Models.Website and Documentation:lmlib.chDirect Links to:APICodingExamplesSignal CatalogInstallAbout UsBibliographyInstall lmlibpip:pip install lmlibconda:see hereDeveloper InfoInstallation via:pip (dev-mode):pip install -e lmlibGit Workflow Guide
Package: lmmaes
LM-MA-ES: Limited-Memory Matrix Adaptation Evolution StrategyInstallationpip install lmmaesRun instructionsCheck thetestsFurther infoPlease refer to the following publication:https://arxiv.org/abs/1705.06693@article{DBLP:journals/corr/LoshchilovGB17,author={Ilya Loshchilov andTobias Glasmachers andHans{-}Georg Beyer},title={Limited-Memory Matrix Adaptation for Large Scale Black-box Optimization},journal={CoRR},volume={abs/1705.06693},year={2017},url={http://arxiv.org/abs/1705.06693},eprinttype={arXiv},eprint={1705.06693},biburl={https://dblp.org/rec/journals/corr/LoshchilovGB17.bib},bibsource={dblp computer science bibliography, https://dblp.org}}Also have a look at this:@article{LoshchilovGlasmachersBeyer2018,author={Loshchilov, Ilya and Glasmachers, Tobias and Beyer, Hans-Georg},title={Large Scale Black-box Optimization by Limited-Memory Matrix Adaptation},journal={IEEE Transactions on Evolutionary Computation},volume={99},year={2018},}Original Python implementation:Tobias Glasmachers[code]Refactoring, packaging and distribution:Giuseppe CuccuPypi pageSource code