Saravanan666/pypi-org huggingface dataset:
Package: lazy-ops
lazy_opsLazy transposing and slicing of h5py Datasets and zarr arraysInstallation$pipinstalllazy_opsUsage:fromlazy_opsimportDatasetView# h5py #importh5pydsetview=DatasetView(dataset)# dataset is an instance of h5py.Datasetview1=dsetview.lazy_slice[1:40:2,:,0:50:5].lazy_transpose([2,0,1]).lazy_slice[8,5:10]# zarr #importzarrzarrview=DatasetView(zarray)# dataset is an instance of zarr.core.Arrayview1=zview.lazy_slice[1:10:2,:,5:10].lazy_transpose([0,2,1]).lazy_slice[0:3,1:4]# reading from view on either h5py or zarrA=view1[:]# Brackets on DataSetView call the h5py or zarr slicing method, returning the dataB=view1.dsetread()# same as view1[:]# iterating on either h5yy or zarrforibinview.lazy_iter(axis=1):print(ib[0])
Package: lazy-paged-sequence
LazyPagedSequence provides a simple iterable interface to paged data structures such as REST API clients.
This is useful when exposing paged data structures to Django’s Paginator in cases where it is not performant to fetch all records ahead of time.ContributingFork itCreate your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am ‘Added some feature’)Push to the branch (git push origin my-new-feature)Create new Pull RequestLicenseLazyPagedSequence is available under theGNU Affero General Public License.
Package: lazyparser
Lazyparser READMEDescriptionThe lazyparser module automates the parsing of arguments.
This module is based onargparsedevelopped by Steven J. Bethard.The lazyparser was written inpython 3.5with the version 1.4.0 of argparse.
It is compatible withpython 3.5or higher.DocumentationThe documentation is available onhttps://nfontrodona.github.io/Lazyparser/lazyparser.html.
The documentation was created with sphinx (v 1.7).
To build the documentation, clone the project repository, go in thedocfolder and type :makehtmlThis will create a folderdoc/build/html. This folder will contain a file namedindex.html. Double click on it to open the documentation with your web browser.InstallationTo install lazyparser, run :pipinstalllazyparser
Package: lazypkg
ContentsWhat is lazypkg?InstallationGetting startedBug reportsLicense informationCitationWhat is lazypkg?lazypkg features the LazyPkg object, a ModuleType object that lazy imports subpackages and allows access to subpackage objects. Lazy importing is when a submodule is not imported along with the top level module, but is still accessible on demand.InstallationGet the latest version of lazypkg fromhttps://pypi.python.org/pypi/lazypkg/If you have an installation of Python with pip, simple install it with:$ pip install lazypkgTo get the git version, run:$ git clone git://github.com/yoelcortes/lazypkgGetting startedLazyPkg objects are straight forward. First assume the following package structure:package/
  __init__.py
  module.py
  ...
  subpackage/
    __init__.py
    submodule.py
    ...Here is an example implementation of a LazyPkg object in the package __init__.py file:fromlazypkgimportLazyPkgfrom.moduleimportobj__all__=['obj']LazyPkg(__name__,['subpackage'])# This converts the package into a LazyPkg object and lazy imports 'subpackage'Say the subpackage __init__.py file looks like this:from.importsubmodule__all__=['submodule']print('imported subpackage')When the subpackage is accessed, only then will it be imported:>>>importpackage# Subpackages are not imported>>>package.obj# -> Works just like an ordinary package>>>package.subpackageimportedsubpackageAdditionally, subpackage object are directly accessible:>>>importpackage>>>package.submodule# -> Assuming "submodule" is not defined in the top level package,#    this will import and search subpackages for the "submodule"This is all possible because the package become a LazyPkg instance:>>>importpackage>>>type(package)lazypkg.LazyPkgBug reportsTo report bugs, please use the lazypkg’s Bug Tracker at:https://github.com/yoelcortes/lazypkgLicense informationSeeLICENSE.txtfor information on the terms & conditions for usage
of this software, and a DISCLAIMER OF ALL WARRANTIES.Although not required by the lazypkg license, if it is convenient for you,
please cite lazypkg if used in your work. Please also consider contributing
any changes you make back, and benefit the community.CitationTo cite lazypkg in publications use:Yoel Cortes-Pena. lazypkg: lazy import modules and subpackages.
https://github.com/yoelcortes/lazypkg
Package: lazypr
Tool for creating and updating pull requests on GitHub.Integrates with Jira API to fetch corresponding Jira ticket title and sets it
in pull request (mapping is done between branch name and jira ticket key
"proj_xxxx" -> "PROJ-XXXX").Pull request description template path can be specified in configuration.Supports setting team reviewers in the pull request.UsageCreate config file~/.config/lazy_pr.iniand set following values there:[default]jira-api-token=<jira api token>jira-email=<jira email>github-token=<your github token>repo=<repository>repo-path=<repository local path>pr-base=masterpr-team=<team on github>pr-desc=<pull request template file local path>Alternatively, path to .ini config file can be specified as a command line
argument (-cor--config-file-path).lazypr-c'/home/sanja/.config/lazy_pr.ini'Command line argument-csor--config-sectioncan be used to specify config
section. If not specified, "default" section is used.Options can be set either in config file, as environment variables or as
command line arguments (runlazypr --helpfor more details):usage:lazypr[-h][-cCONFIG_FILE_PATH][-csCONFIG_SECTION][-jtJIRA_API_TOKEN][-jeJIRA_EMAIL][-gtGITHUB_TOKEN][-rREPO][-rpREPO_PATH][-bBRANCH][-sPR_BASE][-tPR_TITLE][-dPR_DESC][-tmPR_TEAM]ExamplesCreate pull request for branchlp_1in repositorysanjaz/lazypr.Both branch and repository can be specified as command line args:lazypr-r"sanjaz/lazypr"-b"lp_1"`In case repository command line arg is omitted, repository will be fetched fromrepovalue in config file.lazypr-b"lp_1"In case branch is not specified, it looks for current branch in local
repository (local repository path is set inrepo-pathin .ini config file):lazyprOr local repository path can be specified as command line argument (and current
branch in local repository will be used):lazypr-rp"/home/sanja/moto/lazypr"Pull request title can be specified using command line argument-t(--title):lazypr-b"lazypr_1"-t"Test title"If not specified, title will be fetched from the corresponding Jira ticket.
Branch name is mapped to Jira ticket key as proj_xxxx -> PROJ_XXXX.Pull request description template path can be specified whether in .ini
config file (pr-desc), env variable or as a command line argument-d(--pr-desc).lazypr-d"/home/sanja/moto/lazypr/.github/PULL_REQUEST_TEMPLATE.md"Pull request base branch (target branch where the pull request will be
merged) can be specified as command line argument:lazypr-s"release"If omitted, default is specified in .ini config file (usually master).GiHub team can be assigned to review the pull request with:lazypr-tm"my-team"If omitted, default is specified in .ini config file.NotesHow to find/generate Jira API token: log in tohttps://id.atlassian.com/manage/api-tokensand click "Create API token".
For more details, checkhttps://confluence.atlassian.com/cloud/api-tokens-938839638.htmlHow to find your user Jira email:https://id.atlassian.com/manage-profile/emailHow to find/generate github token:https://github.com/settings/tokens.
Some details can be found here:https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
Package: lazy-property
Propertiesare a very useful feature of Python, effectively allowing an attribute to masquerade as a method (with no arguments other thanself). However, sometimes we want to store the results of an expensive computation in an attribute. The straightforward way to do it would be something like the following:import time

def do_some_big_calculation():
    """Simulating some ginormous calculation going on somewhere..."""
    print("{}: Calculations started...".format(time.time))
    time.sleep(5)
    print("{}: Calculations complete!".format(time.time))
    return 42

class SomeClass(object):

    def __init__(self):
        self.calculation_value = do_some_big_calculation()And that certainly works. However, this means that whenever you instantiate an object fromSomeClass, you’ll perform this calculation each time. That could be problematic…So, what we really want is for this calculation to only be done when it’s needed. In other words, what we want is for this attribute to belazy.To do that, you can create a property, and a “private” attribute, named_calculation_value, used to cache the result, like so:class SomeOtherClass(object):

@property
def calculation_value(self):

    if not hasattr(self, "_calculation_value"):
        self._calculation_value = do_some_big_calculation()

    return self._calculation_valueThis package essentially reduces this down to a decorator:import lazy_property

class YetAnotherClass(object):

    @lazy_property.LazyProperty
    def calculation_value(self):

        return do_some_big_calculation()And when called, the “calculation” is only done once:In [5]:yac = YetAnotherClass()

In [6]: yac.calculation_value
1440798443.228256: Calculations started...
1440798448.229179: Calculations complete!
Out[6]: 42

In [7]: yac.calculation_value
Out[7]: 42Note, however, that this property is not writable:In [8]: yac.calculation_value = "something_else"
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-0bbfd01ac59a> in <module>()
----> 1 yac.calculation_value = "something_else"

AttributeError: can't set attributeThat’s what theLazyWritablePropertyis for.class SomethingElse(object):

@lazy_property.LazyWritableProperty
def overwritable_calculation_value(self):

    return do_some_big_calculation()In [9]: se = SomethingElse()

In [10]: se.overwritable_calculation_value
1440798779.27305: Calculations started...
1440798784.274711: Calculations complete!
Out[10]: 42

In [11]: se.overwritable_calculation_value
Out[11]: 42

In [12]: se.overwritable_calculation_value = "foo"

In [13]: se.overwritable_calculation_value
Out[13]: 'foo'InstallationIt’s up on PyPI:pip install lazy-propertyOr, to do it the hard way, clone this repo, enter the directory into which you cloned the repo, and do apython setup.py installWait…isn’t this a solved problem?Well, yes, but I couldn’t find a lazy attribute implementation that clearly implemented laziness in the (fairly simple) way discussed above.
Package: lazy-py2neo
Wrapper around py2neo returning Futures, helping support multiple concurrent database queriesNote: This package has only been tested with py2neo version 3Drop in replacement forpy2neo.Graph:`python from py2neo import Graph `becomes`python from lazy_py2neo import Graph `After changing the import, calls that should return aFuturecan be
modified like this:`python graph = Graph() result =graph.evaluate("MATCH(node) RETURNCOUNT(node)")# result is a dict `becomes`python graph = Graph() result =graph.evaluate("MATCH(node) RETURNCOUNT(node)",as_future=True) # result is a Future evaluated_result = result.result() # evaluated_result is a dict `Home-page: UNKNOWN
Author: Bart Broere
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
Package: lazy-qa
Free software: MIT licenseInstallationpip install lazy-qaYou can also install the in-development version with:pip install https://github.com/angeleyesffx/lazy_qa/archive/master.zipDocumentationhttps://lazy_qa.readthedocs.io/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 toxChangelog0.0.0 (2022-08-20)First release on PyPI.
Package: lazyqsar
Lazy QSARA library to build QSAR models fastlyInstallationgitclonehttps://github.com/ersilia-os/lazy-qsar.gitcdlazy-qsar
python-mpipinstall-e.UsageTLDRChoose one of the available descriptors of small molecules.Fit a model using FLAML AutoML. FLAML will search several estimators, which can lead to memory issues. Restrict the list on a case-by-case basis.Get the validation of the model on the test set.Example for Binary ClassificationsGet the dataYou can find example data in the fantasticTherapeutic Data Commonsportal.fromtdc.single_predimportToxdata=Tox(name='hERG')split=data.get_split()Here we are selecting the hERG blockade toxicity dataset. Let's refactor data for convenience.# refactor fetched data in a convenient formatsmiles_train=list(split["train"]["Drug"])y_train=list(split["train"]["Y"])smiles_valid=list(split["valid"]["Drug"])y_valid=list(split["valid"]["Y"])Build a modelNow we can train a model based on Morgan fingerprints.importlazyqsaraslqmodel=lq.MorganBinaryClassifier()# time_budget (in seconds) and estimator_list can be passed as parameters of the classifier. Defaults to 20s and all the available estimators in FLAML.model.fit(smiles_train,y_train)Validate its performancefromsklearn.metricsimportroc_curve,aucy_hat=model.predict_proba(smiles_valid)[:,1]fpr,tpr,_=roc_curve(y_valid,y_hat)print("AUROC",auc(fpr,tpr))Example for RegressionsCurrently, only Morgan Descriptors and Ersilia Embeddings are available for regression modelsGet the dataYou can find example data in the fantasticTherapeutic Data Commonsportal.fromtdc.single_predimportToxdata=Tox(name='LD50_Zhu')split=data.get_split()Here we are selecting the Acute Toxicity dataset. Let's refactor data for convenience.# refactor fetched data in a convenient formatsmiles_train=list(split["train"]["Drug"])y_train=list(split["train"]["Y"])smiles_valid=list(split["valid"]["Drug"])y_valid=list(split["valid"]["Y"])Build a modelNow we can train a model based on Morgan fingerprints.importlazyqsaraslqmodel=lq.MorganBinaryClassifier()# time_budget (in seconds) and estimator_list can be passed as parameters of the classifier. Defaults to 20s and all the available estimators in FLAML.model.fit(smiles_train,y_train)Validate its performancefromsklearn.metricsimportroc_curve,aucy_hat=model.predict(smiles_valid)mae=mean_absolute_error(y_valid,y_hat)r2=r2_score(y_valid,y_hat)print("MAE",mae,"R2",r2)BenchmarkThe pipeline has been validated using the Therapeutic Data Commons ADMET datasets. More information about its results can be found in the /benchmark folder.DisclaimerThis library is only intended for quick-and-dirty QSAR modeling.
For a more complete automated QSAR modeling, please refer toZaira ChemAbout usLearn about theErsilia Open Source Initiative!
Package: lazyr
lazyrCreates lazily-imported modules in a more readable and safer way.A lazily-imported module (or a lazy module, to be short) is not physically loaded in the Python environment until its attributes are being accessed. This could be useful when you are importing some modules that are hardly used but take a lot of time to be loaded.Installation$pipinstalllazyrUsageMake a lazy moduleMakepandasbecome a lazy module, for example:>>>importlazyr>>>lazyr.register("pandas")# pandas is a lazy module from now onLazyModule(pandas)>>>importpandasaspd>>>pdLazyModule(pandas)>>>df=pd.DataFrame# pandas is actually loaded now>>>df<class'pandas.core.frame.DataFrame'>There is also a simpler way to create a lazy module, but it may causetype hintsto lose efficacy:>>>importlazyr>>>pd=lazyr.register("pandas")>>>pdLazyModule(pandas)Check if a module is lazyUseislazy()to check if a module is lazy or not:>>>lazyr.islazy(pd)TrueWake up a moduleThe lazy modules are not physically loaded until their attrubutes are imported or used, but sometimes you may want to activate a lazy module without accessing any of its attributes. On that purpose, you can 'wake' up the module like this:>>>lazyr.wakeup(pd)# pandas is woken up and loaded>>>lazyr.islazy(pd)FalseIgnore attributesYou can make a module even lazier by setting theignoreparameter ofregister(), which specifies the names of attributes to be ignored. The values of the ignored attributes will be set to None, and a lazy module will no longer be activated by the access to them.>>>importlazyr>>>lazyr.register("pandas",ignore=["DataFrame","Series"])# Ignoring DataFrame and SeriesLazyModule(pandas,ignore=['DataFrame','Series'])>>>frompandasimportDataFrame# pandas is not loaded; DataFrame is set to None>>>frompandasimportSeries# pandas is not loaded; Series is set to None>>>frompandasimportio# pandas is loaded because 'io' is not an ignored attribute>>>frompandasimportDataFrame# DataFrame is loaded this time>>>DataFrame<class'pandas.core.frame.DataFrame'>LoggingSpecify theverboseparameter when callingregister()to see what exactly will happen to a lazy module during the runtime:>>>importlazyr>>>_=lazyr.register("pandas",verbose=2)INFO:lazyr:import:pandas>>>importpandasaspdDEBUG:lazyr:access:pandas.__spec__>>>df=pd.DataFrameDEBUG:lazyr:access:pandas.DataFrameINFO:lazyr:load:pandas(.DataFrame)See AlsoGithub repositoryhttps://github.com/Chitaoji/lazyr/PyPI projecthttps://pypi.org/project/lazyr/LicenseThis project falls under the BSD 3-Clause License.Historyv0.0.16New functionislazy(), for checking the status of a module.Improved the representational strings of lazy modules.v0.0.15Various improvements.v0.0.12Prettier logs.v0.0.11Fixed the meta-data.Performance enhancements.v0.0.9Updated LICENSE.v0.0.7Removed unnecessary objects from the mainlazyrnamespace.v0.0.6Improved logging:Created a separate logger named 'lazyr' for lazy modules;More detailed logs whenverbose> 0.v0.0.4LazyModuleno longer activated by_ipython_*()or_repr_*()methods.v0.0.3Various improvements.v0.0.2New functionwakeup(), for compulsively activating modules.v0.0.1Initial release.
Package: lazyRecursion
lazyRecursionUsage Example:>>>fromlazyRecursionimportRecursiveSequence>>>>>>fibonacci=RecursiveSequence(...induction_start={0:1,1:1},...relative_indices=[-2,-1],...recursion_function=lambdax1,x2:x1+x2,...cache_file='fib_cache.json'# (optional) deactivates caching if missing...)>>>fibonacci[:10][1,1,2,3,5,8,13,21,34,55]>>>linear=RecursiveSequence(...induction_start={0:0},...relative_indices=[-1],...recursion_function=lambdax:x+5,...)>>>linear[:5][0,5,10,15,20]
Package: lazyrepr
Python mixin class for automatic object representationThis library offers a mixin classReprMixinthat implements the__repr__and_repr_pretty_methods to represent objects in a concise way.
The implementation is based on the class__init__method signature,
and will consider whether its parameters are positional or optional
to construct a representation as succinct as possible.
Positional arguments are represented as values only and
optional arguments are included only when different from their default value.Please note this is intended to be used on lightweight classes that map arguments to attributes.
Also it will not work with dataclasses that override the__repr__method.UsagefromlazyreprimportReprMixinclassMACD(ReprMixin):def__init__(self,short=12,long=26,signal=9,*,percent=False):self.short=shortself.long=longself.signal=signalself.percent=percentobj=MACD()print(obj)# >>> MACD(12, 26, 9)ExamplesExamples notebooks are in theextrasfolder.InstallationYou can install this package withpip.pip install git+ssh://git@github.com/furechan/lazyrepr.gitRelated ProjectseasyreprPython decorator to automatically generate repr strings
Package: lazyscraper
About LazyscraperLazyscraper is a simple command line tool and library, a swiss knife for scraper writers. It’s created to work only from command line and to make easier
scraper writing for very simple tasks like extraction of external urls or simple table.Supported patternssimpleul - Extracts list of urls with pattern ul/li/a. Returns array of urls with “_text” and “href” fieldssimpleopt - Extracts list of options values with pattern select/option. Returns array: “_text”, “value”exturls - Extracts list of urls that leads to external websites. Returns array of urls with “_text” and “href” fieldsgetforms - Extracts all forms from website. Returns complex JSON data with each form on the pageCommand-line toolUsage: lazyscraper.py [OPTIONS] COMMAND [ARGS]…Options:--helpShow this message and exit.Commands:
* extract   Extract data with xpath
* gettable  Extracts table with data from html
* use       Uses predefined pattern to extract page dataExamplesExtracts list of photos and names of Russian government ministers and outputs it to “gov_persons.csv”python lscraper.py extract –urlhttp://government.ru/en/gov/persons/–xpath “//img[@class=’photo’]” –fieldnames src,srcset,alt –absolutize True –output gov_persons.csv –format csvExtracts list of ministries from Russian government website using pattern “simpleul” and from UL tag with class “departments col col__wide” and outputs absolutized urls.python lscraper.py use –pattern simpleul –nodeclass “departments col col__wide” –urlhttp://government.ru/en/ministries–absolutize TrueExtracts list of territorial organizations urls from Russian tax service website using pattern “simpleopt”.python lscraper.py use –pattern simpleopt –urlhttp://nalog.ruExtracts all forms from Russian tax service website using pattern “getforms”. Returns JSON with each form and each button, input and selectpython lscraper.py use –pattern getforms –urlhttp://nalog.ruExtracts list of websites urls of Russian Federal Treasury and uses awk to extract domains.python lscraper.py extract –urlhttp://roskazna.ru–xpath “//ul[@class=’site-list’]/li/a” –fieldnames href | awk -F/ ‘{print $3}’How to use libraryExtracts all urls with fields: src, alt, href and _text from gov.uk website>>> from lazyscraper import extract_data_xpath
>>> extract_data_xpath('http://gov.uk', xpath='//a', fieldnames='src,alt,href,_text', absolutize=True)Run pattern ‘simpleopt’ against Russian federal treasury website>>> from lazyscraper import use_pattern
>>> use_pattern('http://roskazna.ru', 'simpleopt')RequirementsPython3https://www.python.orgclickhttps://github.com/pallets/clicklxmlhttp://lxml.de/
Package: lazyscribe
Lightweight, lazy experiment logginglazyscribeis a lightweight package for model experiment logging. It creates a single JSON
file per project, and an experiment is only added to the file when code finishes (errors won't
result in partially finished experiments in your project log).lazyscribealso has functionality to allow for multiple people to work on a single project.
You can merge projects together and update the list of experiments to create a single, authoritative
view of all executed experiments.Installation$python-mpipinstalllazyscribeBasic UsageThe basic usage involves instantiating aProjectand using the context manager to log
an experiment:importjsonfromlazyscribeimportProjectproject=Project(fpath="project.json")withproject.log(name="My experiment")asexp:exp.log_metric("auroc",0.5)exp.log_parameter("algorithm","lightgbm")You've created an experiment! You can view the experimental data by usinglist:print(json.dumps(list(project),indent=4))[{"name":"My experiment","author":"<AUTHOR>","last_updated_by":"<AUTHOR>","metrics":{"auroc":0.5},"parameters":{"algorithm":"lightgbm"},"created_at":"<CREATED_AT>","last_updated":"<LAST_UPDATED>","dependencies":[],"short_slug":"my-experiment","slug":"my-experiment-<CREATED_AT>","tests":[],"artifacts":[]}]Once you've finished, save the project toproject.json:project.save()Later on, you can read the project back in read-only mode ("r"), append mode ("a"),
or editable mode ("w+"):project=Project("project.json",mode="r")withproject.log(name="New experiment")asexp:# Raises a RuntimeError...
Package: lazysdk
lazysdk介绍基于Python3的懒人包
详细文档见：https://gzcaxecc4u.feishu.cn/docx/EaymdTdIQolphcxgD2jcMsjJn6c软件架构软件架构说明lazysdk.lazyprocess多进程控制lazysdk.lazywebhookwebhook推送安装教程使用pip安装普通方式安装pip3installlazysdk使用阿里镜像加速安装pip3installlazysdk-ihttps://mirrors.aliyun.com/pypi/simple使用说明lazyprocessimportlazysdktask_list=[1,2,3,4,5,6,7,8]defprocess_task(task_index,task_info):print(f'task_index:{task_index}, task_info:{task_info}')lazysdk.lazyprocess.run(task_list=task_list,task_function=process_task,subprocess_limit=2)lazywebhook目前仅支持企业微信fromlazysdkimportlazywebhooklazywebhook.send_text(webhook='webhook url')LinksPyPI Releases:https://pypi.org/project/lazysdk/