Saravanan666/pypi-org huggingface dataset:
Package: lrgs
LRGS: Linear Regression by Gibbs SamplingCode implementing a Gibbs sampler to deal with the problem of multivariate linear regression with uncertainties in all measured quantities and intrinsic scatter. Full details can be found in this paper (1509.00908), the abstract of which appears below. (The paper describes an implementation in the R language, while this package is a port of the method to Python.)Kelly (2007, hereafter K07) described an efficient algorithm, using Gibbs sampling, for performing linear regression in the fairly general case where non-zero measurement errors exist for both the covariates and response variables, where these measurements may be correlated (for the same data point), where the response variable is affected by intrinsic scatter in addition to measurement error, and where the prior distribution of covariates is modeled by a flexible mixture of Gaussians rather than assumed to be uniform. Here I extend the K07 algorithm in two ways. First, the procedure is generalized to the case of multiple response variables. Second, I describe how to model the prior distribution of covariates using a Dirichlet process, which can be thought of as a Gaussian mixture where the number of mixture components is learned from the data. I present an example of multivariate regression using the extended algorithm, namely fitting scaling relations of the gas mass, temperature, and luminosity of dynamically relaxed galaxy clusters as a function of their mass and redshift. An implementation of the Gibbs sampler in the R language, called LRGS, is provided.For questions, comments, requests, problems, etc. use theGitHub issues.StatusLRGS for Python is currently in alpha. It has not been vetted for all possible combinations of univariate/multivariate covariates and responses. Some features of the R version are not implemented, in particular the Dirichlet process prior.A submodule,lrgs.trunc, has been added to facilitate modeling of truncated data sets (see1901.10522). This submodule depends on the external packageLMC. It has no analog in the R version of LRGS.SeeVERSION.md.InstallationAutomaticInstall from PyPI by runningpip install lrgs. Note that PyPI may not have the latest version.ManualDownloadlrgs/and put it somewhere on yourPYTHONPATH. You will need to have thenumpyandscipypackages installed.Usage and HelpDocumentation is sparse at this point, but an example notebook can be foundhere.
Package: lribeiro.cherrypy.authorizer
Extensible session based authentication and claims based authorization tool for CherryPy.Includes authentication controllers for default dispatcher and method dispatcher.Default authentication controllers are provided inlribeiro.cherrypy.authorizer.authenticationfor default
dispatcher and method dispatcher.Note that if you have a callable class, the class itself must be decorated with@authorize.Developed under Python3.4 and tested against Python2.7, Python3.4 and pypy.Example:importcherrypyfromlribeiro.cherrypyimportauthorizerfromlribeiro.cherrypy.authorizerimportauthorizefromlribeiro.cherrypy.authorizer.authenticationimportIdentity,AuthControllerDefaultDispatcher# authenticator function signature can be whatever you'd like,# as soon as you pass the correct parameters via Http POSTdef_authenticator(username,password):ifusername=='user'andpassword=='pass':returnIdentity('id','user')def_authorizer(claims):if'read'inclaimsandclaims['read']=='page':returnTrueif'write'inclaimsandclaims['write']=='page':returnTruereturnFalseclassArea1:@cherrypy.expose@authorize({'read':'page'})defindex(self):return'authorized'@authorizeclassArea2:@cherrypy.exposedefindex(self):return'authorized'@cherrypy.expose@authorize({'write':'site'})defrestricted(self):return'restricted'@authorize# callable class itself must be decorated, not the __call__ methodclassArea3:exposed=Truedef__call__(self):return'callable class'classRoot:@cherrypy.exposedefindex(self):pass@cherrypy.exposedefprocess_login(self,username,password):try:authenticate(username=username,password=password)raisecherrypy.HTTPRedirect('/area1')exceptAuthenticationError:raisecherrypy.HTTPError(403)if__name__=='__main__':conf={'/':{'tools.sessions.on':True,'tools.authorizer.on':True,'auth.authenticator':_authenticator,'auth.authorizer':_authorizer,'auth.login_page':'/login','auth.login_redirect':'/logged_in','auth.logout_redirect':'/logged_out','auth.unauthorized_redirect':'/unauthorized'}}root=Root()root.area1=Area1()root.area2=Area2()root.auth=AuthControllerDefaultDispatcher()cherrypy.quickstart(root,'/',conf)
Package: lribeiro.cherrypy.authorizer.mongoengine
Basic user model, authenticator and authorizer for lribeiro.cherrypy.authorizer and mongoengineUsage:importcherrypyfromlribeiro.cherrypy.authorizerimportauthorizefromlribeiro.cherrypy.authorizer.authenticationimportAuthControllerDefaultDispatcherfromlribeiro.cherrypy.authorizer.mongoengine.authimportauthenticator,authorizerclassRoot:@cherrypy.exposedefindex(self):return'index'@cherrypy.expose@authorizedefauth_required(self):return'auth required'@cherrypy.expose@authorize({'read':'page','write':'log'})defauthorized(self):return'authorized'@cherrypy.expose@authorize({'edit':['page','site']})defunauthorized(self):return'unauthorized'config={'/':{'tools.sessions.on':True,'tools.authorizer.on':True,'auth.authenticator':authenticator,'auth.authorizer':authorizer,'auth.login_page':'/login'}}if__name__=='__main__':root=Root()root.auth=AuthControllerDefaultDispatcher()cherrypy.quickstart(root,'/',config)
Package: lribeiro.cherrypy.authorizer.neomodel
Basic user model, authenticator and authorizer for lribeiro.cherrypy.authorizer and neomodelUsage:importcherrypyfromlribeiro.cherrypy.authorizerimportauthorizefromlribeiro.cherrypy.authorizer.authenticationimportAuthControllerDefaultDispatcherfromlribeiro.cherrypy.authorizer.neomodel.authimportauthenticator,authorizerclassRoot:@cherrypy.exposedefindex(self):return'index'@cherrypy.expose@authorizedefauth_required(self):return'auth required'@cherrypy.expose@authorize({'read':'page','write':'log'})defauthorized(self):return'authorized'@cherrypy.expose@authorize({'edit':['page','site']})defunauthorized(self):return'unauthorized'config={'/':{'tools.sessions.on':True,'tools.authorizer.on':True,'auth.authenticator':authenticator,'auth.authorizer':authorizer,'auth.login_page':'/login'}}if__name__=='__main__':root=Root()root.auth=AuthControllerDefaultDispatcher()cherrypy.quickstart(root,'/',config)
Package: lribeiro.cherrypy.templating
Template rendering tool for cherrypy.It does not render any template, so you must provide a renderer for your template system to do the actual rendering.The renderer must be a callable accepting two arguments:The name of the template to be renderedA context object, which can be adictor any other object that your template system can handleThe template name comes from the@templatedecorator argument and the context is the value return from the handler.Renderer parametersYou can optionally pass parameters to your renderer function by just passing additional arguments to the@templatedecoratorclassController:@cherrypy.expose@template('template_name','some arg',some='keyword arg')# pass your additional parameters heredefhandler():passdefrenderer(template_name,context,*args,**kwargs):# and do something with the parameters herepassDeveloped under Python3.4 and tested against Python2.7, Python3.4 and pypy.Usage:fromosimportpathimportcherrypyimportpystachefromlribeiro.cherrypy.templatingimporttemplatedef_renderer(template_name,context):"""
    Template renderer using Pystache
    """search_dir=path.join(path.dirname(path.abspath(__file__)),'templates')renderer=pystache.Renderer(file_extension='html',search_dirs=search_dir)template_str=renderer.load_template(template_name)returnrenderer.render(template_str,context)classRoot:@cherrypy.expose@template('index')defindex(self):return{'name':'Lorem','lastname':'Ipsum'}@cherrypy.expose@template('page')defpage(self):return{'name':'Lorem','lastname':'Ipsum'}@cherrypy.expose@template('page_with_args','some','arg')defpage_with_args(self):return{'name':'Lorem','lastname':'Ipsum'}@cherrypy.expose@template('page_with_args',some='keyword arg')defpage_with_args(self):return{'name':'Lorem','lastname':'Ipsum'}config={'/':{'templating.renderer':_renderer,}}if__name__=='__main__':cherrypy.quickstart(Root(),'/',config)
Package: lribeiro.cherrypy.templating.genshi
Genshi renderer forlribeiro.cherrypy.templatingIt has three optional config entries:templating.genshi.template_directories: can be a path to the templates directory, list of paths, or anythinggenshi.template.TemplateLoaderaccepts. If none is given,{root moduledirectory}/templatesis used as the template diretory.templating.genshi.loader_options:dictcontaining additional arguments passed to the TemplateLoader constructortemplating.genshi.render_options:dictcontaining arguments used when rendering the template, for example, {‘method’: ‘html’, ‘doctype’: ‘html-transitional’}You can also pass arguments to the render via@templatedecorator args and kwargs.classController:@cherrypy.expose@template('template_name.html',method='xhtml',doctype='xhtml11')defhandler(self):passWhen setting the template name, remember thatGenshi interprets a leading slash as an absolute path! So the following would probably raise a TemplateNotFound:classWrongController:@cherrypy.expose# pay attention to the leading slash# Genshi will look for a 'wrong_template_name.html' file on the root of the filesystem@template('/wrong_template_name.html')defwrong_handler(self):passDeveloped under Python3.4 and tested against Python2.7, Python3.4 and pypy.Usage:importcherrypyfromlribeiro.cherrypy.templatingimporttemplatefromlribeiro.cherrypy.templating.genshiimportrendererclassRoot(object):@cherrypy.expose@template('index.html')defindex(self):return{'context':'variables'}@cherrypy.expose@template('/var/templates/page.html')# absolute pathdefpage(self):return{'context':'variables'}config={'/':{'templating.renderer':renderer,'templating.genshi.template_directories':['templates',# relative to the module where the root class was declared'/var/templates'# absolute path],'templating.genshi.loader_options':{'default_encoding':'utf-8'},# this is optional'templating.genshi.render_options':{'method':'html','doctype':'html5'}# this is also optional}}if__name__=='__main__':cherrypy.quickstart(Root(),'/',config)
Package: lribeiro.cherrypy.templating.mako
Mako renderer forlribeiro.cherrypy.templatingIt has two optional config entries:templating.mako.template_directories: can be a path to the templates directory, absolute (with leading slash) or relative to the root module location, or a list of paths. If none is given,{rootdirectory}/templatesis used.templating.mako.config: any additional arguments to be passed to the TemplateLookup constructorDeveloped under Python3.4 and tested against Python2.7, Python3.4 and pypy.Usage:importcherrypyfromlribeiro.cherrypy.templatingimporttemplatefromlribeiro.cherrypy.templating.makoimportrendererclassRoot(object):@cherrypy.expose@template('index.html')defindex(self):return{'context':'variables'}@cherrypy.expose@template('/page.html')defpage(self):return{'context':'variables'}config={'/':{'templating.renderer':renderer,'templating.mako.template_directories':'mako_templates',# optional'templating.mako.config':{'module_directory':'/tmp/modules'}# also optional}}if__name__=='__main__':cherrypy.quickstart(Root(),'/',config)
Package: lrjson
LRJsonConvert Lightroom Template file (.ltemplate) into manipulable JSON fileInstallYou can install LRJson either via pip (PyPI) or from source. To install using pip:python3-mpipinstalllrjsonOr manually:gitclonehttps://github.com/remiflavien1/lrjsoncdlrjson
python3setup.pyinstallCLIRealy simple CLI :Take aLightroom Template (.lrtemplate)file and convert it intoJSONfile :$lrsonmyfilter.lrtemplate
FileconvertedwithSuccessYou can print output with-p|--printflag :$ lrson myfilter.lrtemplate -p
{
    "id": "A76FFDE6-31E0-4FF6-AD4E-FF6F9EE930E9",
    "internalName": "mytemplate",
    "title": "myTemplate",
    "type": "Develop",
    "value": {
        "settings": {
            "Blacks2012": 40,
            "Clarity2012": 18,
            "ColorNoiseReduction": 5,
            "ColorNoiseReductionDetail": 50,
            "ColorNoiseReductionSmoothness": 50,
            "Contrast2012": 49,
            "HueAdjustmentRed": 9,
            "HueAdjustmentYellow": -89,
            "LuminanceAdjustmentAqua": -50,
            "LuminanceAdjustmentBlue": 34,
            "LuminanceAdjustmentGreen": 5,
            "LuminanceAdjustmentMagenta": 1,
            "LuminanceAdjustmentOrange": -1,
            "LuminanceAdjustmentPurple": 40,
            "LuminanceAdjustmentRed": 0,
            "LuminanceAdjustmentYellow": 37,
            "LuminanceNoiseReductionContrast": 0,
            "LuminanceNoiseReductionDetail": 50,
            "LuminanceSmoothing": 0,
            "ParametricDarks": 0,
            "ParametricHighlightSplit": 48,
            "ParametricHighlights": 0,
            "ParametricLights": 0,
            "Tint": 33,
            "ToneCurveName2012": "Custom",
            "ToneCurvePV2012": [
                14,
                25,
                94,
                112,
                198,
                170,
                255
            ],
            "ToneCurvePV2012Blue": [
                0,
                0,
                255
            ],
            "ToneCurvePV2012Green": [
                0,
                0,
                255
            ],
            "ToneCurvePV2012Red": [
                0,
                0,
                255
            ],
            "Vibrance": 1,
            "WhiteBalance": "Custom",
            "Whites2012": 55,
            "orientation": "AB"
        },
        "uuid": "28ACD78F-6C28-4A38-B09E-A62718A4C073"
    },
    "version": 0
}APIThere is only one function.Just import it and use it.>>>fromlrjsonimportconvert_lr_to_jsonascvj>>>cvj.convert("myFilter.lrtemplate","output.json")
Package: lrl
lrl: Learn Reinforcement LearningSeeherefor complete documentation.Overviewlrl is a Python package for applying (and hopefully, learning!) basic Reinforcement Learning algorithms.  It is intended to be an early stepping stone for someone trying to understanding the basic concepts of planning and learning, providing out-of-the-box implementations of some simple environments and algorithms in a well documented, readable, and digestible way to give someone platform from which to build understanding.The overall goal of the author in writing this package was to provide people interested in Reinforcement Learning a starting point and handrail to help them as they began learning.  The fastest, most efficient implementation is less important here than code which can be read and learned from by someone new to the topic and with intermediate Python skills.The idea behind this package originated as material to support students completing the Georgia Tech OMSCS class CS 7641: Machine Learning.  CS 7641 takes a top-down approach to learning Machine Learning, whereby students are encouraged to find existing implementations of the algorithms discussed and apply them to gain a feel for their overall properties and pitfalls.  While Python implementations for Supervised Learning are well represented (scikit-learn) and a student-driven project for Randomized Optimization and Search (mlrose) is available, robust and well-commented implementations for simple Reinforcement Learning were less ubiquitous.  This package attempts to fill that void.Installation Instructionslrl is accessible using pippip install lrlor, you can pull the source to your working directory so you can play along at homegit clone https://github.com/ca-scribner/lrl.git lrl
pip install -e lrl
Package: lrmatrix
Logic Rules MatrixLogic Rules Matrix is a package to support theExplainable Matrix - ExMatrixandmultiVariate dAta eXplanation - VAXmethods. Both ExMatrix and VAX employ a matrix-like visual metaphor for logic rules visualization, where rules are rows, features (variables) are columns, and rules predicates are cells.The ExMatrix must be used for model (predictive) explanations (model interpretability/explainability), while VAX must be employed for data (descriptive) explanations (phenomenon understanding).[1] Popolin Neto, M. (2021). Random Forest interpretability - explaining classification models and multivariate data through logic rules visualizations. Doctoral Thesis, Instituto de Ciências Matemáticas e de Computação, University of São Paulo, São Carlos. doi:10.11606/T.55.2021.tde-03032022-105725.BibTeX:@phdthesis{PopolinNeto:2021:Thesis, doi = {10.11606/t.55.2021.tde-03032022-105725}, publisher = {Universidade de São Paulo,  Agência {USP} de Gestão da Informação Academica ({AGUIA})}, author = {Mário Popolin{ }Neto}, title = {Random Forest interpretability - explaining classification models and multivariate data through logic rules visualizations}}[2] M. Popolin Neto and F. V. Paulovich, "Explainable Matrix - Visualization for Global and Local Interpretability of Random Forest Classification Ensembles," in IEEE Transactions on Visualization and Computer Graphics, vol. 27, no. 2, pp. 1427-1437, Feb. 2021, doi: 10.1109/TVCG.2020.3030354.BibTeX:@article{PopolinNeto:2020:ExMatrix, author={Popolin{ }Neto, Mário and Paulovich, Fernando V.}, journal={IEEE Transactions on Visualization and Computer Graphics}, title={Explainable Matrix - Visualization for Global and Local Interpretability of Random Forest Classification Ensembles}, year={2021}, volume={27}, number={2}, pages={1427-1437}, doi={10.1109/TVCG.2020.3030354}}[3] M. Popolin Neto and F. V. Paulovich, "Multivariate Data Explanation by Jumping Emerging Patterns Visualization," in IEEE Transactions on Visualization and Computer Graphics, 2022, doi: 10.1109/TVCG.2022.3223529.BibTeX:@article{PopolinNeto:2022:VAX, author={Popolin{ }Neto, Mário and Paulovich, Fernando V.}, journal={IEEE Transactions on Visualization and Computer Graphics}, title={Multivariate Data Explanation by Jumping Emerging Patterns Visualization}, year={2022}, volume={}, number={}, pages={1-16}, doi={10.1109/TVCG.2022.3223529}}
Package: lrparsing
Lrparsing provides both an LR(1) parser and a
tokeniser.  It differs from other Python LR(1) parsers in
using Python expressions as grammars, and offers simple to use
disambiguation tools.The result is something that is powerful yet concise.  For simple
tasks this means it can be thought of as an extension to Python’s
existing re module, used when regular expressions become
too cumbersome.   For complex tasks lrparsing offers a high speed
parser (very roughly 25us per token from string to parse tree
on a desktop CPU), pre-compilation of the grammar and error recovery
hooks so parsing can continue after an error is found.In addition to extensive documentation it comes with a parser for
Sqlite3 data manipulation statements and a Lua 5.2 to Python
compiler as examples.  The documentation can be read online athttp://lrparsing.sourceforge.net/doc/html/.
Package: lrplots
longread_plotsA collection of plots for long read sequencing FastQ files from devices like Oxford Nanopore's MinION and PromethION.Dependenciespipinstall--user--upgradepandasseabornNote that matplot lib >= 3.0.0 is needed.
Python >= 3.5 is therfore recommended, otherwise plots might be corrupted.InstallationFrom PyPi:pip3install--userlrplotsFrom the release tar.gz:python3setup.pyinstall--userUsageWith the pip3 installation it should be in your PATH and you should be able to just call:lrplotexample.fastqIf the command can't be found, pip3 installed it in a path that is not in your PATH variable.
You can then find it with:find~-namelrplotorfind/usr/local-namelrplotThen either add the containing directory to your PATH or just use the full path.You can also call it like a script with python3 (or whatever your python3 is called):python3bin/lrplotsexample.fastqOutput
Package: lrrr
LrrrWork in progressMIT LicenseCopyright (c) 2020 Kevin J. WalchkoPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: lr_schedules
lr_schedulesThis project currently just containsLinearScheduler, for custom linear learning rate schedules.fromlr_schedulesimportLinearSchedulerimportmatplotlib.pyplotaspltimporttorchPyTorch example, triangletimes=[0,0.5,1]values=[0,1,0]W=torch.tensor([1.0],requires_grad=True)optimizer=torch.optim.SGD([W],lr=0.1)linear_scheduler=LinearScheduler(times,values,total_training_steps=100)scheduler=torch.optim.lr_scheduler.LambdaLR(optimizer,linear_scheduler)lr_vals=[]forstepinrange(100):optimizer.zero_grad()loss=torch.sum(W**2)loss.backward()optimizer.step()scheduler.step()lr_vals.append(optimizer.param_groups[0]["lr"])plt.figure(figsize=(5,2))plt.plot(lr_vals)plt.xlabel("Training step")plt.ylabel("Learning rate")plt.show()Pytorch example, ramp up and downtimes=[0,0.1,0.9,1]values=[0,1,0.9,0]W=torch.tensor([1.0],requires_grad=True)optimizer=torch.optim.SGD([W],lr=0.1)linear_scheduler=LinearScheduler(times,values,total_training_steps=100)scheduler=torch.optim.lr_scheduler.LambdaLR(optimizer,linear_scheduler)lr_vals=[]forstepinrange(100):optimizer.zero_grad()loss=torch.sum(W**2)loss.backward()optimizer.step()scheduler.step()lr_vals.append(optimizer.param_groups[0]["lr"])plt.figure(figsize=(5,2))plt.plot(lr_vals)plt.xlabel("Training step")plt.ylabel("Learning rate")plt.show()Pytorch example, specifying absolute number of stepstimes=[0,12,90,100]values=[0,1,0.8,0]W=torch.tensor([1.0],requires_grad=True)optimizer=torch.optim.SGD([W],lr=0.1)linear_scheduler=LinearScheduler(times,values)scheduler=torch.optim.lr_scheduler.LambdaLR(optimizer,linear_scheduler)lr_vals=[]forstepinrange(100):optimizer.zero_grad()loss=torch.sum(W**2)loss.backward()optimizer.step()scheduler.step()lr_vals.append(optimizer.param_groups[0]["lr"])plt.figure(figsize=(5,2))plt.plot(lr_vals)plt.xlabel("Training step")plt.ylabel("Learning rate")plt.show()Dev set up of repoClone the repoInstallpoetry(repo was run with python3.9)Runpoetry install --with docsRunpoetry run pre-commit install
Package: lrsplines
This is a cython-based Python wrapper around theLRSplineslibrary, a C++ implementation
of locally refined B-splines.InstallingLRSplines is available on PyPi.:pip install lrsplinesUsageThere are two modules for interacting with LRSplines.Thelrspline.rawmodule contains an API that is identical (so
far as feasible) to the C++ interface of the backend library.Thelrsplinemodule contains a Pythonic interface to the same
library.In addition, thelrsplinesmodule is available, but is deprecated
and should not be used.