Saravanan666/pypi-org huggingface dataset:
Package: lessc
ThelesscPython package compiles content in LESS syntax into CSS by
first preprocessing it and then invoking the nodejslesscprogram to
actually compile it. The preprocessing resolves imports which allows
the LESS content to come from anywhere, including the filesystem,
zipped EGG files, databases, etc. This solves one of the greatest
limitations of the nodejs lessc program which requires all of the LESS
dependencies to be actual files and imports to be non-absolute.It is possible, butquiteimprobable, that this package turns into a
pure-Python implementation of a LESS compiler.For more information on LESS, please seehttp://lesscss.org/.ProjectHomepage:https://github.com/canaryhealth/lesscBugs:https://github.com/canaryhealth/lessc/issuesInstallation$npminstallless$exportPATH="`pwd`/node_modules/.bin:$PATH"$pipinstalllesscUsageimportlessc# compile a less asset in the "mypackage" python module:css=lessc.compile_asset('mypackage:path/to/style.less')# compile a less file on the filesystemcss=lessc.compile_file('../path/to/style.less')# compile a less file-like object# (if there are any relative imports, specifying `base` is necessary)css=lessc.compile_file(open('../path/to/style.less'))# compile a less string# (if there are any relative imports, specifying `base` is necessary)less='''
  @import "mypackage:path/to/style.less";
  // ...other less statements...
'''css=lessc.compile(less)For more import resolution control, you can specify a custom URI
resolver (which resolves a relative URI to an absolute URI) and a
custom URI loader (which loads an absolute URI), using theresolverandloaderkeywords to any compile* function:importlesscdefresolver(uri,base=None):'''
  Returns the absolute URI given a base URI and a potentially
  absolute or relative URI. Note that `base` may be ``None`` when
  the initial URI is being resolved (depending on the Compiler
  configuration).
  '''# calculate the absolute URI...returnabsolute_uridefloader(uri):'''
  Returns a file-like object that will return the content of
  the specified URI.
  '''# fetch the object defined by `uri`returnfile_like_objectcss=lessc.compile_asset(uri,resolver=resolver,loader=loader)Or you can create a custom compiler and set it as the default compiler:importlessccompiler=lessc.Compiler(resolver=my_custom_resolver,loader=my_custom_loader)lessc.set_default_compiler(compiler)# this will now use `my_custom_resolver` and `my_custom_loader`# to compile asset `uri`css=lessc.compile_asset(uri)LimitationsCurrently, there exist the following restrictions in what kind of
LESS syntax is used:Recursive imports are not supported and will be silently ignored.Only the following import keywords are explicitly supported:lesscssonceoptionalThe keywordsreference,inline, andmultipleare NOT
supported. Any other keywords may or may not be supported (since
only the above keywords were documented as of this writing,
2015/06/26).
Package: lesscache
Serverless cache backend for Django and FlaskWorking with: AWS DynamodbInstallationpippip install lesscachepipenvpipenv install lesscacheSetup on DjangoOn Django Settingsinstaled_apps=[...'lesscache.compact.django']CACHES={'default':{'BACKEND':'lesscache.compact.django.cache.DjangoCache',}}Run manage command to create cache table on Dynamodb before usingpython manage.py create_dynamodb_cacheSetup on FlaskWIP
Package: lesscode-options
lesscode_options介绍lesscode_options是自定义全局配置项，一个地方定义，全局使用示例fromlesscode_options.optionsimportdefine,optionsdefine(name="ceshi",type_=str,default="hello world",help_="说明",callback=str)define(name="age",type_=int,default=5,help_="年龄",callback=str)print(options.ceshi)print(type(options.age))options.ceshi="hello"print(options.ceshi)
Package: lesscode-tool
lesscodeToolDescriptionUsage: lesscodeTool [OPTIONS] COMMAND [ARGS]...

  低代码构建工具.

Options:
  --help  Show this message and exit.

Commands:
  new          新建一个项目,目前进支持lesscode-py模板
  sqlacodegen  生成SQLALCHEMY模型类
  subcommand   执行系统命令
  swagger      swagger api转换
Package: lesscss
AboutLessCSS is a helper which automatically compiles LESS files to CSS when LESS
files are modified. It works with Brubeck, web.py and bottle web frameworks. It
should work with other framework without any problems though it’s not tested.Note:You need to install LESS before using this.Installation$ pip install lesscssUsageAn example usagefrom lesscss import LessCSS
LessCSS(media_dir='media', exclude_dirs=['img', 'src'], based=True, compression='x')Parametersmedia_dir:Directory where you put static/media files such as css/js/img.exclude_dirs:Directories you don’t want to be searched. It’d be pointless to search for less files in an images directory. This parameter is expected to be a list.based:If it’s set True then LessCSS will generate the style-(base60).css version as well (for example; style-dHCFD.css). This is useful if you set expire times of static files to a distant future since browsers will not retrieve those files unless the name is different or the cache has expired. This parameter is expected to be a boolean value.compressed: If it’s setTruethen LessCSS will minimize the generated CSS files. This parameter is expected to be a boolean value.compression: Specifies the type of compression to use. Default to the normal compression, ‘x’. Other option is to use the YUI Compressor. See “Command-line Usage” athttp://lesscss.org/.output_dir:Directory where you put compiled CSS files if different than location of .less file.LinksDeveloper Release
Package: lessdl
English|简体中文介绍lessdl是Simple Deep Learning Toolkit的缩写，基于PyTorch，旨在用极简的接口构建神经网络和训练，能方便地复用模型，以及修改训练流程的各个环节，主要用于复现经典模型和进行一些实验。关键接口Data不同任务的数据格式和处理方法都不相同，如果对数据进行抽象处理的话，会使整个代码变得极其复杂，lessdl没有针对数据抽象单独的类，而是复用PyTorch的Dataset，只要求返回的batch数据是dict格式，例如batch={'src':src_seq,'src_size':src_size,'tgt':tgt_seq}在lessdl/data中提供了一些常用的数据处理类，可以方便地复用，比如TranslationDataset，根据两种语言的文本文件，构建一个Dataset。ModelModel的接口是forward函数，表示模型的前向计算，函数的参数可以是batch的key，或者是batch，输出也要求是一个dict，比如defforward(self,src,src_size,tgt):# do somethingoutput_logits=calc_output_logits()return{'logits':output_logits,}LossLoss的接口是数据的一个batch和模型的前向计算的输出，输出是dict，要求有key为loss，便于后面进行梯度更新 比如defforward(self,batch,out):return{'loss':loss_calc(batch,out),}Optimizer使用PyTorch的Optimizer，进行简单的包装，可以根据参数str构建需要的optimizerTrainerTrainer是主要的类，包括构建数据集、Model、Loss、Optimizer、callbacks。callbacks是训练过程中使用的，用于统计每一步训练的结果、保存断点、模型评估、earlystopping等操作。训练的流程如下:deftrain(...):prepare_callbacks()restore_training_if_necessary()foreintraining_epochs:call_callbacks_epoch_begin()forbatchindataset:call_callbacks_batch_begin()model_out=forward_model(batch)# 根据batch，调用Model的forward函数loss=calc_loss(model_out,batch)gradient_update_step()# 进行优化call_callbacks_batch_end()# 统计结果、保存断点、调整学习率等call_callbacks_epoch_end()evaluate_if_necessary()通过修改trainer，可以方便地修改数据、模型、以及训练的每个环节示例Machine Translation: Transformer, IWSLT2014BLEU结果:Modelde -> enen -> deTransformer33.2727.72Tied Transformers35.1029.07fairseq34.5428.61Ours34.3628.33ReferencefairseqAllenNLPRead TFRecord
Package: less-learn
Learning with Subset Stacking (LESS)LESS is a supervised learning algorithm that is based on training many local estimators on subsets of a given dataset, and then passing their predictions to a global estimator. You can find the details about LESS in ourmanuscript.Installationpip install less-learnorconda install -c conda-forge less-learn(see alsoconda-smithy repository)TestingHere is how you can use LESS:fromsklearn.datasetsimportmake_regression,make_classificationfromsklearn.model_selectionimporttrain_test_splitfromsklearn.metricsimportmean_squared_error,accuracy_scorefromlessimportLESSRegressor,LESSClassifier### CLASSIFICATION ###X,y=make_classification(n_samples=1000,n_features=20,n_classes=3,\n_clusters_per_class=2,n_informative=10,random_state=42)# Train and test splitX_train,X_test,y_train,y_test=\train_test_split(X,y,test_size=0.3,random_state=42)# LESS fit() & predict()LESS_model=LESSClassifier(random_state=42)LESS_model.fit(X_train,y_train)y_pred=LESS_model.predict(X_test)print('Test accuracy of LESS:{0:.2f}'.format(accuracy_score(y_pred,y_test)))### REGRESSION ###X,y=make_regression(n_samples=1000,n_features=20,random_state=42)# Train and test splitX_train,X_test,y_train,y_test=\train_test_split(X,y,test_size=0.3,random_state=42)# LESS fit() & predict()LESS_model=LESSRegressor(random_state=42)LESS_model.fit(X_train,y_train)y_pred=LESS_model.predict(X_test)print('Test error of LESS:{0:.2f}'.format(mean_squared_error(y_pred,y_test)))TutorialsOurtwo-parttutorial on Colabaims at getting you familiar with LESSregression. If you want to try the tutorials on your own computer, then you also need to install the following additional packages:pandas,matplotlib, andseaborn.RecommendationDefault implementation of LESS uses Euclidean distances with radial basis function. Therefore, it is a good idea to scale the input data before fitting. This can be done by setting the parameterscalinginLESSRegressororLESSClassifiertoTrue(this is the default value) or by preprocessing the data as follows:fromsklearn.preprocessingimportStandardScalerSC=StandardarScaler()X_train=SC.fit_transform(X_train)X_test=SC.transform(X_test)CitationOur software can be cited as:@misc{LESS,
    author = "Ilker Birbil",
    title = "LESS: LEarning with Subset Stacking",
    year = 2021,
    url = "https://github.com/sibirbil/LESS/"
  }Parallel VersionAnopenmpiimplementation of LESS is also available inanother repository.Changes in v.0.2.0Classification is added (LESSClassifier)Scaling is automatically done as default (scaling = True)The default global estimator for regression is nowDecisionTreeRegressorinstead ofLinearRegression(global_estimator=DecisionTreeRegressor)Warnings can be turned on or off with a flag (warnings = True)Changes in v.0.3.0Typos are correctedThe hidden class for the binary classifier is now separateLocal subsets with a single class are handled (the case ofConstantPredictor)AcknowledgmentsWe thank Oguz Albayrak for his help with structuring our Python scripts.
Package: lessline
LessLineLess line to read&write text fileRequirementsPython >= 3.6Installation$pipinstalllesslineExamplefromlessline.text_fileimportread,writefile='demo.txt'text='Hello word!\nThis is lessline!'write(text,file)text_new=read(file)print(len(text_new),text_new)0.1.0 (2022-10-22)Implement read&write text file
Package: lesspass
LessPass command-line interface (CLI)Installpython3 -m pip install --user lesspass # 3.6, 3.8+Usagelesspass SITE [LOGIN] [MASTER_PASSWORD] [OPTIONS]

LessPass is a stateless password manager.

positional arguments:
  site                  site used in the password generation (required)
  login                 login used in the password generation. Default to ''.
  master_password       master password used in password generation. Default to LESSPASS_MASTER_PASSWORD env variable or prompt.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -L [5-35], --length [5-35]
                        password length (default: 16, min: 5, max: 35)
  -C COUNTER, --counter COUNTER
                        password counter (default: 1)
  -p, --prompt          prompt for values interactively
  -c, --copy            copy the password to clipboard
  --exclude EXCLUDE     exclude char from generated password
  --no-fingerprint      hide visual fingerprint of the master password when you type
  --save [SAVE_PATH]    [beta] Save your password profiles. /!\ File not encrypted. Use carefully. (default: ~/.config/lesspass/profiles.json)
  --load LOAD_PATH      [beta] Load your password profiles file
  --url URL             [beta] LessPass Database URL used by --save and --load command
  -l, --lowercase       add lowercase in password
  --no-lowercase        remove lowercase from password
  -u, --uppercase       add uppercase in password
  --no-uppercase        remove uppercase from password
  -d, --digits          add digits in password
  --no-digits           remove digits from password
  -s, --symbols         add symbols in password
  --no-symbols          remove symbols from passwordExamplesno symbolslesspass site login masterpassword --no-symbolsno symbols shortcutlesspass site login masterpassword -ludonly digits and length of 8lesspass site login masterpassword -d -L8master password in env variableLESSPASS_MASTER_PASSWORD="masterpassword" lesspass site loginLicenseThis project is licensed under the terms of the GNU GPLv3.
Package: lesspass-client
LessPass ClientALessPassclient written in Python heavily
inspired bylastpass-cli.InstallationGitgit clone https://github.com/supersonichub1/lesspass-client
cd lesspass-client
poetry installHelpRunlesspass-client --helpfor the most up-to-date information..netrcUse of a.netrcfilefor supplying your LessPass login and master
password isrequired. There is currently no way to supply either using
command line arguments or environment variables; both of these methods areinsecureanyways. Use the hostlesspassfor sharing
your username and password, and the hostlesspass_genfor storing your master
password.show --formatTheshowsubcommand allows for the customization of the command's output
through the--formatoption, a lalpass show --format.
Instead of usingprintf-like formatting,lesspass-clientinstead usesPython's format string syntax, which I believe is much
more intuitive and user friendly.The format string supplies the following values:siteloginpasswordcreatedmodifiedidversioncounterlengthuppercaselowercasenumbersdigitsFor example, if you wanted to append yourFreesoundlogin to your
.netrc file:lesspass-clientshow--sitefreesound.org\--format"machine freesound login {login} password {password}"\>>~/.netrcWhat This Tool Isn'ta complete replacement forLessPass's exisiting CLI.a complete way to manage your LessPass passwordsa 1-to-1 drop-in replacement forlpassCaveotsdoesn't support password encryptiondoesn't support LessPass servers outside ofapi.lesspass.comdoesn't allow for the addition, updating, or removal of passwordsTODOerror handlingmore password operationsconfiguration (encryprion, other servers, alternate.netrclocations)
Package: les-stats
Statistics for various games (save game in system and filter statistics based on Event, Tournament or Stage)Games supportedTFTValorant (work in progress)LoL (work in progress)Installpipinstallles-statsDevInstallPoetrywith version >= 1.2.0a1Install and setup dependenciespoetry install --with dev
poetry shell
pre-commit installRun unit testpytestRun pre-commitpre-commit run --all-filesRunCreate an.envfile with this content or create environment variablesLES_STATS_TIMEZONE="TZ database name following https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
LES_STATS_DB_URL="Your db url following https://tortoise.github.io/databases.html"
LES_STATS_SALT="Salt used to hash API key of internal app"

Optional:
LES_STATS_TFT_API_KEY="tft api key"
LES_STATS_TFT_API_ROUTING="tft api routing"
LES_STATS_VALORANT_API_KEY="valorant api key"
LES_STATS_VALORANT_API_ROUTING="valorant api routing"
LES_STATS_LOL_API_KEY="lol api key"
LES_STATS_LOL_API_ROUTING="lol api routing"
LES_STATS_APP_HOST="Application bind sotcket to this host (default localhost)"
LES_STATS_APP_PORT="Application bind sotcket with this port (default 8000)"
LES_STATS_EXPORTER_ADDR="Exporter bind sotcket to this host (default localhost)"
LES_STATS_EXPORTER_PORT="Exporter bind sotcket with this port (default 9345)"
LES_STATS_BACKEND_CORS_ORIGINS="[http://localhost.fr,http://test.localhost.fr]"
LES_STATS_SENTRY_DSN="your sentry DSN"Start the apppython3 -m les_stats.mainManage API Keypython3 -m les_stats.utils.auth --helpAPIAPIs documentation are available at http://<LES_STATS_APP_HOST>:<LES_STATS_APP_PORT>/docsPrometheusStats are available at http://<LES_STATS_EXPORTER_ADDR>:<LES_STATS_EXPORTER_PORT>/metrics (work in progess)LicenceThe code is under CeCILL license.You can find all details here:https://cecill.info/licences/Licence_CeCILL_V2.1-en.htmlCreditsCopyright © Ludovic Ortega, 2022Contributor(s):-Ortega Ludovic -ludovic.ortega@lyon-esport.fr
Package: lesswatch
# lesswatchWatches LESS files, and automatically compiles them when theyare changed.## Usage$ lesswatch <DIR>## Installationpip install lesswatchorgit clone https://github.com/jkeyes/lesswatch.gitcd lesswatchpython setup.py install## External Dependencieslesswatch used the [lessc compiler](http://lesscss.org/#guide)and it must be on the PATH.First you need to download and install node.js. Download the lateststable version of [node.js](http://nodejs.org/#download) andextract the contents from the archive: `tar xf node-v0.4.12.tar.gz`.Then:$ cd node-v0.4.12$ ./configure$ make$ make installThen you need to install LESS:$ npm install -g lessTry `lessc` to see if this was successful:$ which lessc/usr/bin/lessc$ echo "body  {  color:  red; }"  > test.less$ lessc test.lessbody {color: red;}
Package: lessweb
lessweb「嘞是web」Lessweb is an extremely easy-to-use python web framework with the following goals.Simple and efficient: based on the aiohttp library IOC capabilities, native support for configuration loading and logging settings to meet production-level development requirementsPythonic: support for the latest python version and the latest python syntaxInstall lesswebTo install the latest lessweb for Python 3, please run:pip3installlesswebHello, world!Save the code below in fileindex.py:fromlesswebimportBridge,get_mapping@get_mapping('/')asyncdefhello():return{'message':'Hello, world!'}defmain():bridge=Bridge()bridge.add_route(hello)bridge.run_app()if__name__=='__main__':main()Start the application with the command below, it listens onhttp://localhost:8080/by default.python3 index.pySetting portSave the code below in fileconfig.toml:[bootstrap]port=80Then change the code to:defmain():bridge=Bridge(config='config.toml')bridge.add_route(hello)bridge.run_app()Once you run it, you can accesshttp://localhost/with your browser.You can also use environment variables to override the configuration file's contents, e.g. runBOOTSTRAP_PORT=8081 python3 index.py, then it listens onhttp://localhost:8081.LicenseLessweb is offered under the Apache 2 license.Source codeThe latest developer version is available in a GitHub repository:https://github.com/lessweb/lesswebCookbook【中文】：http://www.lessweb.cn
Package: lessweb.py
Pythonic web.py===========Making `web.py` request handling more pythonic.```pythonimport lesswebdef hello(ctx, name):if not name:name = 'World'return 'Hello, ' + name + '!'urls = ('GET', '/(.*)', hello)app = lessweb.application(urls, locals())```All those magical web.* are now available in context variable.```pythondef hello(ctx):user_data = ctx.input(color=[])if 'color' not in ctx.cookies and not user_data.color:ctx.setcookies('color', 'blue')return 'Hello, from ' + ctx.env.get('REMOTE_HOST') or ctx.ipurls = ('GET', '/', hello)import lesswebapp = lessweb.application(urls, locals())```Only a part of web.py request handling has been masked with `less.web`. Rest of them are required todo what they did already.```pythonimport webimport lesswebdef redirect_to_referer(ctx):referer = ctx.env.get('HTTP_REFERER', 'http://webpy.org')raise web.seeother(referer)urls = ('GET', '/', redirect_to_referer)app = lessweb.application(urls, locals())```It's implemented as a tiny pythonic wrapper around `web.py` request handling.The idea is to allow all request/response manipulation through `ctx`(context) of the handler function rather than module(`web`) level functions. `ctx` is basically `web.ctx` of `web.py`, which is already used to set and access request context. It also wraps other module level functionality of `web.py` such as `header`, `input`, `cookies`, `sessions` to yield a more pythonic interface.To use sessions you have to configure session store in config as follows.```pythonweb.config.sessionstore = web.session.DiskStore('sessions') # for disk store, other stores can be used similarly.```
Package: lest
LestLight Python library for testingInstallingSeeinstallingin documentation.UsageExample:Code:importlest@lest.setupdefmy_setup():print('Setup ran!')@lest.registerdeftest_adding_two_and_two():lest.assert_eq(2+2,4)@lest.registerdefsome_error_test():lest.assert_eq(2+2,5)# AssertionError@lest.registerdefsome_more_error():lest.assert_eq(a+2,4)# NameErrorlest.run(info_level='max')Output (to visible the highlighting, it's a print-screen):
Package: lestpy
lestpyOverviewWhyLestpy is aimed to model regression problems with a bunch of logical interactions. This approach is an alternative way to describe the relationship between the features and the targets.Getting StartedInstallationYou can install LestPy fromPyPI:python-mpipinstalllestpyLast releaseLespy 0.0.11python-mpipinstalllestpy--upgradeMain classes, methods and attributesInteraction
Methods:computeget_interaction_listget_interaction_dictadd_interaction_dictremove_interactionsInteractionBuilderTransformer
Methods:fittransformfit_transforminverse_transformLBM_Regression
Methods:transformfitfit_transformpredictoptimizefeatures_analysisprint_modelfitting_scoreextract_featuresDisplay
Methods:ternary_diagramresponse_surfacepareto_frontiersensibility_analysisdisplay_interactionresiduesfitmetrics_curvedescribecorr_graph (in development)Outliers_Inspection
Methods:cooks_distancemahalanobis_distancez_scoreHow toUseLestpy is designed to be used similarly to sklearn modelization classes and their methods (fit(), transform(), predict(), ...)ContributingThere are many ways to support the development of lestpy:File an issueon Github, if you encounter problems, have a proposal, etc.Send an email with ideasto the author.Submit a pull requeston Github if you improved the code and know how to use git.LinksThe source code and issue tracker of this package is to be found onGithub:pyonysos/lestpy.
Package: lesync
LesyncHttp helpers fordjango-channelsHello worldfromlesyncimportlogin_required@login_requiredasyncdefhello(request):return{'hello':request.user.username}Installpip install lesyncAddApiConsumerinto yourrouting.py:fromdjango.urlsimportpathfromchannels.routingimportProtocolTypeRouter,URLRouterfromchannels.sessionsimportSessionMiddlewareStackfromlesyncimportApiConsumerapplication=ProtocolTypeRouter({# ... websockets or something'http':SessionMiddlewareStack(URLRouter([path('/async/<path:path>',ApiConsumer),# ... fallback to sync views]),),})That's it. Now you can add async views which will be served win/async/url
prefix.RequestSubclass ofchannels.http.AsgiRequestwith:jsonattributeasync load_user()method - which returns standard django useruserattribute - it's available after callingload_user()of if you use@login_requiredor@staff_member_requireddecoratorsResponseIn addition todjango.http.HttpResponseyou can use sugary json responses and streaming:asyncdefstandard(request):returnHttpResponse('hello, world')asyncdefjson_data(request):return{'hello':'world'}asyncdefwith_status(request):return{'bad':'request'},400asyncdefwith_headers(request):return{},200,{'my':'header'}asyncdefstreaming(request):asyncdefstream():foriinrange(1,1000):yieldf'{i},{i**2}\n'awaitasyncio.sleep(.1)returnstream(),200,{'Content-Type':'text/csv'}AuthFamiliar@login_requiredand@staff_member_requireddecorators:fromlesyncimportstaff_member_required@staff_member_requiredasyncdefhello(request):return{'admin':request.user.username}Request validationYou can use@validate_queryand@validate_jsondecorators
to validate requests data. They're usingtrafaretlibrary to perform
validation, so make sure it's installed.fromlesync.trafaretimportvalidate_json@validate_json({'ids':[int],'hello?':str})asyncdeffoo(request):returnrequest.jsonTestspython-mvenv.venvsource.venv/bin/activatepipinstall-Urrequirements-dev.txtpython-mpytesttests/