Saravanan666/pypi-org huggingface dataset:
Package: lionhandler
Lion Handler - Loghandler application - ClientTeamAuthored by:Saulo Leão - @sleaoCoauthored by:Thiago Pinho - @thiagolrpinhoLion HandlerOver engineering things is my passion and I will do it forever. That being said, this repo includes both a server for receiving and managing logs via websockets/API and a client that you can attach to your code that will send the logs over.Setting up goalsTo better track this project, I'll write a bunch of things I think it should have in order to achieve my goals for this tool.My basic idea for this is to be able to send/receive logs and the server should store it in MongoDB, but also to have some sort of control panel, to explore the logs with analytics, maybe or something like that.The server itself should have a frontend (the control panel), with access control (a.k.a. login/logout), and the hability to createapplication tokens.Application tokenswill be used as a sort of access control to the log server and to minimize the amount of data in each message. An application token should be a HS256 encryptedJWT, with info about the app on its payload.I'm building this to work in a container based enviroment, that hosts many applications with one or more instances of each application, so there should be a way to differentiate the instances (maybe use hostnames, since each are unique to the application pod?)On receiving a connection, the server should validate the token (or deny the connection) and assign the application instance to its applicationbucketAbucketshould be a collection of logs related to an application, each log with its instance tag.ClientCan send INFO, WARNING, ERROR, CRITICAL and DEBUGCan handle both String and JSON messagesHas a fallback in case the server is unreachableConnection ManagerIn order to better manage all the socket connections from all different applications, a Connection Manager class is defined. Besides handling both instance connection and disconnection, it should be able to return a list of active Apps/Instances, following the JSON specification below{"cerco":{"running_instances":3,"instances":{"a2b5":{"socket":"hash","connected_at":"6/11/2021"},"a2b6":{"socket":"WebSocket","connected_at":"6/11/2021"},"a2b7":{"socket":"WebSocket","connected_at":"6/11/2021"}}},"midas":{...}}
Package: lion-orm
Lion ORM - возможно, самая примитивная ОРМ в мире. Она работает только с sqlite и поддерживает всего 2 типа данных: int и str. В ней нет никаких ленивых запросов и вообще, ничего интересного. Однако ее исходный код может быть вам полезен, если вы хотите узнать, как можно создать свою ОРМ.Приступим к примерам использования с подключения базы данных:from lion_orm.connect import SqliteConnect


SqliteConnect("test.db")Обратите внимание, что SqliteConnect() можно вызвать без аргументов, в этом случае база данных будет создана в оперативной памяти.Теперь попробуем создать модель данных:from lion_orm.model import Model
from lion_orm.field import Field


class CarModel(Model):
    price = Field(int)
    color = Field(str, required=True)
    brand = Field(str)Чего здесь примечательного? Во-первых, вам не нужно создавать поле id. Оно будет создано автоматически и является автоинкрементальным. Во-вторых, Field может принимать тип данных поля как в форме объекта типа данных python, так и в форме строки, соответствующей названию типа данных в sqlite. В третьих, если соответствующая данной модели таблица в базе данных еще не существует, она будет создана вместе с первым же экземпляром.Что ж, мы создали модель, давайте теперь создадим ее экземпляр:car = CarModel(price=100000, color="red", brand="audi")
car.save()Данные экземпляра модели отправляются в базу только при вызове метода save(). Имейте ввиду, что, если вы попытаетесь сохранить в базу данные экземпляра модели, где не заполнены все обязательные атрибуты, вы получите SaveEmptyModelError.У нас есть экземпляр модели, что дальше? Дальше мы будем делать запросы к базе данных. И начнем мы с select:rich_cars = car.query.select(price=100000)В данном примере мы сделали select-запрос прямо из экземпляра модели. Почему так? Ну, у нас примитивная ОРМ. А еще так можно делать в Django.Также можно выбрать все элементы класса, вызвав метод select() без аргументов:all_cars = car.query.select()Как результат select-запроса мы получаем объект класса QuerySet. По своему поведению он напоминает объект списка: по нему можно итерироваться, а также получать из него значения по индексу. Давайте попробуем:for x in all_cars:
    print(x)


first_car = all_cars[0]
print(first_car)Это работает! А еще все объекты из QuerySet можно удалить сразу, вызвав у него метод delete():all_cars.delete()Если после этого вы попытаетесь вновь проитерироваться по данному объекту QuerySet или получить значение по индексу, получите UsingDeletedQuerySetError.Разумеется, у экземпляров модели тоже есть метод delete():new_car = CarModel(price=100000, color="blue", brand="audi")
new_car.save() # экземпляр модели есть
new_car.delete() # и оп, его нетПрисвоить значение атрибутам экземпляра модели вы можете именно так, как ожидаете, что это будет работать:new_car.price = 110000
new_car.save()После сохранения экземпляра в базе, вы можете посмотреть его id:print(new_car.id)
# 1Вроде бы все, ничего не забыл. Да тут и сложно что-то забыть, ведь это самая примитивная ОРМ!
Package: liontoolkit
LIONtoolkitLIONtoolkit is a web application that allows data science enthusiasts
to create and run experiments involving machine learning and optimization
techniques via a simple browser-based drag-and-drop interface.It is an idea and is currently maintained by the people atLIONlab, University of Trento - Italy, and it is distributed under the terms and conditions of theMozilla Public License, v. 2.0.Run inside aDockercontainerInstall Docker for your platform following the instructionshere.No need to install other dependencies.Once Docker is installed and running, by using any kind of terminal launch a new container with the latest version of our image with:$ docker run -d -p 8080:5000 liontoolkit/liontoolkitNow, as long as the container is up and running, you can use LIONtoolkit by pointing your browser to:http://localhost:8080 or http://127.0.0.1:8080For other methods (pip,setuptools) and more detailed installation instructions,
seedocs/install.rst.ContributingWe welcome all contributions. Do you like LIONtoolkit and want to make it better?
You can fix some bugs or add your own plugin/module!And before opening a Pull Request, please have a look atdocs/extending.rstandCONTRIBUTING.rstto make sure your code complies with our guidelines.Thank you!
Package: lipidhandler
Work with lipid names in PythonLipidHandler is a Python package build to work with common abbreviations for lipids such asCE(20:2)orPG(18:2/20:2). Those lipid names are used in publications, data reports and data analysis tools.The main goal of LipidHandler is toparsethose lipid names, provide facilities totranslatethem into other represantations andmapthem to official identifiers.LipidHandler does not replace toolkits to work with molecules and chemical structures.:warning: LipidHandler was built for a specific research project and is not able to
solve every use case about lipid names. It overlaps with other projects such asliputils.:warning: The developer is not an expert on lipidomics, some of the naming might not make sense
from a chemistry perspective.:mailbox: Feedback through GitHub issues is appreciated.Getting startedWork with lipid namesThe Lipid classParse a lipid name:fromlipidhandlerimportLipidmylipid=Lipid.parse('CE 20:2')TheLipidhas aLipidClassprint(mylipid.lipidclass)>>>CETheLipidcontains aResidueListwhich holds theResidues.# iterate the ResidueListforresidueinmylipid.residueslist:print(residue.carbon_atoms)print(residue.double_bonds)>>>20>>>0Multiple residues and different formats are possible:mylipid=Lipid.parse("CE(20:2/18:2)")mylipid=Lipid.parse("CE 20:2/18:2")mylipid=Lipid.parse("CE(20:2_18:0)")The Reside classNext to the core attributes (C and double bonds) theResiduehas an oxidation state, a generic
chemical modification descriptor and details on the isomer.Oxidation statemylipid=Lipid.parse("CE(16:1;0)")print(mylipid.residues[0].oxidation)>>>0chemical modificationmylipid=Lipid.parse("PE(O-16:1)")print(mylipid.residues[0].modification)>>>O-isomermylipid=Lipid.parse("CE(16:1(6Z))")print(mylipid.residues[0].zstatelist[0]>>>6ZTheResidueListhas functions to aggregate over the residues:mylipid=Lipid.parse("CE(20:2/18:2)")print(mylipid.residuelist.sum().carbon_atoms)# the .sum() functions returns a Residue instancteConnect to external databasesLipidHandler can query external sources to search for terms or get identifiers from external databases.
Right now LipidHandler only works with SwissLipids but the underliying interface is generic and
can be extended.fromlipidhandler.externalapisimportSwissLipidslipids=SwissLipids.search("CE 20:2")forlinlipids:print(l)>>>CE(20:2)The output of the.search()function is aLipidListwhich containsLipidinstances. If you
search for more generic terms you get a list with multiple results.fromlipidhandler.externalapisimportSwissLipidslipids=SwissLipids.search("CE 20")forlinlipids:print(l)>>>CE(20:1)>>>CE(20:2)>>>CE(20:5)>>>CE(20:0)>>>CE(20:4)>>>CE(20:3)>>>CE(20:4)>>>CE(20:3)You can also ask for the SwissLipds ID for a specificLipidinstance:fromlipidhandler.externalapisimportSwissLipidsmylipid=Lipid.parse("CE(20:2)")db_xrefs=SwissLipids.get_xrefs(mylipid)forxrefindb_xrefs:print(xref.target_db,xref.target_id)>>>SwissLipidsSLM:00050028installpip install lipidhandlerdeveloprun testsInstall project and test dependenciespipinstall-rrequirements.txt
pipinstall-rtest_requirements.txtRun test suite on sourcespython-mpytest
Package: lipidlibrarian
Lipid LibrarianBuild and Installation InstructionsPython Virtual Environmentmake install install_optionalDocker Container (Docker < 25.0.0)docker build -t lipidlibrarian -f Containerfile .Docker Container (Docker >= 25.0.0)docker buildx -t lipidlibrarian -f Containerfile .OCI Container for Docker/Podman/Kubernetesbuildah build -t lipidlibrarian -f Containerfile .Run Lipid LibrarianCLIIn case you installed Lipid Librarian into a 'venv' virtual environment, make sure you activate it before withsource venv/bin/activate.lipidlibrarian "PC(18:1_20:0)" "410.243;0.01" "PC(56:8)"
lipidlibrarian path/to/file
cat path/to/file | lipidlibrarianDockerdocker run lipidlibrarian "PC(18:1_20:0)" "410.243;0.01" "PC(56:8)"Podmanpodman run lipidlibrarian "PC(18:1_20:0)" "410.243;0.01" "PC(56:8)"Import Python Packagefromlipidlibrarian.LipidQueryimport*query1=LipidQuery("PC(18:1_20:0)").query()query2=LipidQuery("410.243;0.01").query()query3=LipidQuery("PC(56:8)").query()forlipidinquery1:print(repr(lipid))forlipidinquery2:print(format(lipid,'json'))forlipidinquery3:print(format(lipid,'html'))
Package: lipidoz
lipidozPython utility for determination of lipid double bond position location from OzID dataContributors:Dylan Ross (dylan.ross@pnnl.gov)Aivett Bilbao (aivett.bilbao@pnnl.gov)Joon-Yong Lee (junyoni@gmail.com)Xueyun Zheng (xueyun.zheng@pnnl.gov)Documentation is available athttps://lipidoz.readthedocs.io/Beta Release (with GUI executables) available at:https://github.com/PNNL-m-q/lipidoz/releases/tag/v1.0.0
Package: lipo
LIPO is a package for derivative- and parameter-free global optimization, e.g.
for hyperparameter tuning. Is based on
thedlibpackage and provides wrappers around its optimization routine.The algorithm outperforms random search - sometimes by margins as large as 10000x. It is often preferable to
Bayesian optimization which requires "tuning of the tuner". Performance is on par with moderately to well tuned Bayesian
optimization.The provided implementation has the option to automatically enlarge the search space if bounds are found to be
too restrictive (i.e. the optimum being to close to one of them).See theLIPO algorithm implementationfor details.Agreat blog postby the author ofdlibexists, describing how it works.InstallationExecutepip install lipoUsagefromlipoimportGlobalOptimizerdeffunction(x,y,z):zdict={"a":1,"b":2}return-((x-1.23)**6)+-((y-0.3)**4)*zdict[z]pre_eval_x=dict(x=2.3,y=13,z="b")evaluations=[(pre_eval_x,function(**pre_eval_x))]search=GlobalOptimizer(function,lower_bounds={"x":-10.0,"y":-10},upper_bounds={"x":10.0,"y":-3},categories={"z":["a","b"]},evaluations=evaluations,maximize=True,)num_function_calls=1000search.run(num_function_calls)The optimizer will automatically extend the search bounds if necessary.Further, the package provides an implementation of the scikit-learn interface for
hyperparamter search.fromlipoimportLIPOSearchCVsearch=LIPOSearchCV(estimator,param_space={"param_1":[0.1,100],"param_2":["category_1","category_2"]},n_iter=100)search.fit(X,y)print(search.best_params_)Comparison to other frameworksFor benchmarks, see the notebook in thebenchmarkdirectory.scikit-optimizeThis is a Bayesian framework.+A well-chosen prior can lead to very good results slightly faster-If the wrong prior is chosen, tuning can take long-It is not parameter-free - one can get stuck in a local minimum which means tuning of the tuner can be required-LIPO can converge faster when it is close to the minimum using a quadratic approximation-The exploration of the search space is not systematic, i.e. results can vary a lot from run to runOptuna+It parallelizes very well+It can stop training early. This is very useful, e.g. for neural networks and can speed up tuning+A well-chosen prior can lead to very good results slightly faster-If the wrong prior is chosen, tuning can take long-It is not parameter-free, i.e. some tuning of the tuner can be required (the defaults are pretty good though)-LIPO can converge faster when it is close to the minimum using a quadratic approximation-The exploration of the search space is not systematic, i.e. results can vary a lot from run to run
Package: lipo2pol-fdas
DescriptionThis tool converts LineString and Point data in Geojson format to Polygon data.The package obtains information such as number of lanes,  width of lanes from OSM data. f there is lane and  width of lane information, it calculates the width  of road using them. If this data does not exist, it attempts to calculate the width of road using the pre-defined values.Usagepython3 lipo2pol.py input.geojson --output output.geojson
Package: lip-pps-run-manager
Run Manager used in the LIP PPS software stack for handling data taking and analysisFree software: MIT licenseInstallationpip install lip-pps-run-managerYou can also install the in-development version with:pip install https://github.com/cbeiraod/LIP_PPS_Run_Manager/archive/main.zipDocumentationhttps://lip-pps-run-manager.readthedocs.io/en/latest/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 toxChangelogCurrent (2023-07-25)0.3.0 (2023-07-25)Fixed the name of the loop_iterations parameter in the handle_task method.this is a breaking changeAdded status information when a looped task progresses0.2.3 (2023-07-23)Added a backup_directory property to the RunManagerAdded the copy_file_to method to the RunManagerAdded the backup_file method to the RunManagerNot numbered (2022-10-24)Added a data_directory property to the RunManager0.2.2 (2022-10-25)Added common functions for the instrumentsStarted adding SetupManager to hold the experimental setupStarted tests for instrumentsAdded library version to task report file0.2.1 (2022-10-24)Added the version of LIP-PPS-Run-Manager to the task script backupAdded the possibility to load bot details from a config file using names. Names override explicit tokens and idsStarted adding a class to handle a Keithley 6487 device0.2.0 (2022-10-19)Added TelegramReporter class, to handle a connection to telegram via the bot API and to publish messages to itIntegrated TelegramReporter into RunManager and TaskManager so that the status and progress of runs and tasks can be published to telegram for ease of monitoringChanged RunManager to use the ‘with syntax’,this is a breaking changeFixed some typos in the documentation0.1.0 (2022-09-28)First fully functional version0.0.0 (2022-09-27)First release on PyPI.
Package: lippy
Lippy - solving linear programming problems.Source Code:https://github.com/ispaneli/lippyLippyis a module for solvinglinear programming problemson Python.Provides:Simplex method in primal linear programmingSimplex method in dual linear programmingBranch and bound in integer linear programmingBrute force method in integer linear programmingCutting-plane method in integer linear programmingZero-sum game in game theory using Simplex methodSimplex method in primal linear programmingimportlippyaslpc_vec=[6,6,6]a_matrix=[[4,1,1],[1,2,0],[0,0.5,4]]b_vec=[5,3,8]simplex=lp.SimplexMethod(c_vec,a_matrix,b_vec)solution,func_value=simplex.solve()Simplex method in dual linear programmingimportlippyaslpc_vec=[6,6,6]a_matrix=[[4,1,1],[1,2,0],[0,0.5,4]]b_vec=[5,3,8]c_vec,a_matrix,b_vec=lp.primal_to_dual_lp(c_vec,a_matrix,b_vec)simplex=lp.SimplexMethod(c_vec,a_matrix,b_vec)solution,func_value=simplex.solve()Branch and bound in integer linear programmingimportlippyaslpc_vec=[3,3,7]a_matrix=[[1,1,1],[1,4,0],[0,0.5,3]]b_vec=[3,5,7]bab=lp.BranchAndBound(c_vec,a_matrix,b_vec)solution,func_value=bab.solve()Brute force method in integer linear programmingimportlippyaslpc_vec=[3,3,7]a_matrix=[[1,1,1],[1,4,0],[0,0.5,3]]b_vec=[3,5,7]force=lp.BruteForce(c_vec,a_matrix,b_vec)solution,func_value=force.solve()Cutting-plane method in integer linear programmingimportlippyaslpc_vec=[3,3,7]a_matrix=[[1,1,1],[1,4,0],[0,0.5,3]]b_vec=[3,5,7]gomory=lp.CuttingPlaneMethod(c_vec,a_matrix,b_vec)gomory.solve()Zero-sum game in game theory using Simplex methodimportlippyaslpgame_matrix=[[8,1,17,8,1],[12,6,11,10,16],[4,19,11,15,2],[17,19,6,17,16]]game=lp.ZeroSumGame(game_matrix)strategies=game.solve()LoggingExisting logging modes:FULL_LOGMEDIUM_LOGLOG_OFF(default)Logging is set when initializing a class object.For example:simplex=lp.SimplexMethod(c_vec,a_matrix,b_vec,log_mode=lp.LogMode.FULL_LOG)bab=lp.BranchAndBound(c_vec,a_matrix,b_vec,log_mode=lp.LogMode.MEDIUM_LOG)LicenseThis project is licensed under the terms of theMIT license.
Package: lips
Lorentz Invariant Phase SpaceLipsis a Python 3 library that provides a phase-space generator and manipulator that is tailored to the needs of modern theoretical calculations in quantum field theory. At present, the package is designed to handle the kinematics of scattering processes involving an arbitrary number of massless particles. Use cases include:generation of phase-space points over complex numbers ($\mathbb{C}$), finite fields ($\mathbb{F}_p$), and $p$-adic numbers ($\mathbb{Q}_p$);generation of spinor strings representing possible kinematic singularities (related to letter of the symbol alphabet);on-the-fly evaluation of arbitrary spinor-helicity expressions in any of the above mentioned fields;construction of special kinematic configurations, with efficient, hard-coded solutions available up to codimension 2;algebro-geometric analysis of irreducible varieties in kinematic space.InstallationThe package is available on thePython Package Indexpip install lipsAlternativelty, it can be installed by cloning the repogit clone https://github.com/GDeLaurentis/lips.git path/to/repopip install -e path/to/repoRequirementspipwill automatically install the required packages, which arenumpy, sympy, mpmath, pyadicThealgebraic_gemetrysubmodule requiresSingularthrough the Python interfacesyngular. Singular needs to be installed manually (e.g.apt-get install singular).Testingpytest --cov lips/ --cov-report html tests/ --verboseCitationIf you found this library useful, please consider citing it@inproceedings{DeLaurentis:2023qhd,author="De Laurentis, Giuseppe",title="{Lips: $p$-adic and singular phase space}",booktitle="{21th International Workshop on Advanced Computing and Analysis Techniques in Physics Research}: {AI meets Reality}",eprint="2305.14075",archivePrefix="arXiv",primaryClass="hep-th",reportNumber="PSI-PR-23-14",month="5",year="2023"}@phdthesis{DeLaurentis:2020xar,author="De Laurentis, Giuseppe",title="{Numerical techniques for analytical high-multiplicity scattering amplitudes}",school="Durham U.",year="2020"}
Package: lipschitz
The Lipschitz SystemWe envision Lipschitz to be an efficient and precise system for quantitative trading. While being sophisticated in functionalities, Lipschitz remains to be clear, friendly, and robust in its architecture design.Lipschitz provides three high-level features:Framework and scaffold template for implementing model-based quantitative strategiesToolchains for provisioning and evaluating quantitative strategies, including data loaders and backtesting toolsGateways to execute and monitor strategies on simulated and live trading platformsArchitecture OverviewLipschitz categorizes essential system functionalities into the following two roles:Core Components. Lipschitz currently have three types of core components, i.e., data loader, strategies, and gateways. Each type of core components is responsible for a specific type of tasks, interacting with the rest of the system using structuralized APIs.Pipeline Managers. Built on top of core components, Pipeline managers are responsible for running end-to-end pipelines in quantitative trading. Depending on the actual pipeline it manages, pipeline managers may also include functionalities such as visualization (in evaluation pipeline), or anomaly detection (in production pipeline).The illustration below depicts an overview of Lipschitz’s system architecture.Installation & QuickstartFollow the following step to install lipschitz:Code clone:git clone https://github.com/LipschitzProject/lipschitz.git
cd lipschitz
pip3 install -r requirements.txtRunning Quickstart example code:cd /examples
python example_backtest.py setting/one_product_test.jsonYou will find a file nameddemo.pdfin the current path that shows a backtest report.For the strategy design, you could refer to thesample_strategy.pyin the exmaples folder.Alternatively, you could also install lipschitz frompypi(this version might not be up-to-date with the most recent commit on themasterbranch:pip3 install lipschitzCode Standards for ContributionEnvironmentThe minimum Python version supported is 3.8Your code is expected to be executable in both MacOS and LinuxState ManagementNo global states or variables, all stateful operations should be implemented as classesLimit the use of helper functions only to generic operations that are shared among multiple parts of the codeAvoid returning multiple values from a function, instead consider to returning a class instanceName ConventionsAlways use snake_case for variable, and use PascalCase for class namesTry at all costs to give a proper, clear name to your classes, functions, arguments, and variables, from which the user can directly understand their purposesClass initialization and function calls should use named argumentsDocumentationFor each publicly available class and functions, document their purpose, parameters, and returns in the docstring format along with your code. Read thisguideKeep the documentation simple and precise, no need to repeat what is already obvious in their names, no need to include implementation details (make in-line comments instead)Code CommitsCreate a branch for each functionality that you are working on. Submit a PR to master branch to merge