Saravanan666/pypi-org huggingface dataset:
Package: lempel-ziv-complexity
This repository contains a small, simple and efficient implement of theLempel-Ziv complexityalgorithm.ExamplesSimple usageIf thelempel_ziv_complexity.pyfile is accessible in your PATH or in Python’s path:>>>fromlempel_ziv_complexityimportlempel_ziv_complexity>>>s='1001111011000010'>>>lempel_ziv_complexity(s)# 1 / 0 / 01 / 11 / 10 / 110 / 00 / 0108DocumentationSeethis file.With the C extensionIf thelempel_ziv_complexity.sofile is accessible in your PATH or in Python’s path, the same can be used.Small benchmarkThere is also a Cython version, to have a faster implementation:$ipython...>>>s='1001111011000010'>>>%timeitlempel_ziv_complexity(s)6.1µs±33.6nsperloop(mean±std.dev.of7runs,100000loopseach)>>>%timeitlempel_ziv_complexity_cython(s)132ns±2.55nsperloop(mean±std.dev.of7runs,10000000loopseach)The speedup is typically between x50 and x100.
It is not shipped with thePyPiversion, seedirectly on GitHubif needed.Demo on aJupyter notebookSee this notebook:on nbviewever.Install and buildManually ?Easy!Clone this repository, go in the folder, compile, test, and if it works,
install it.cd/tmp/gitclonehttps://GitHub.com/Naereen/Lempel-Ziv_ComplexitycdLempel-Ziv_Complexity/src/makebuildmaketest# should passmakeinstall# mv the build/lib*/*.so files where you need themBe sure to include the dynamic library when you need it, or in a folder
accessible by your Python interpreter (somewhere insys.path). The
file islempel_ziv_complexity_cython.so(for Python 2) or thelempel_ziv_complexity_cython.cpython-35m-x86_64-linux-gnu.so(for
Python 3.5, or higher, adapt the name).With pip ?This project is hosted onthe Pypi package repository.sudopipinstalllempel_ziv_complexitypython-c"from lempel_ziv_complexity import lempel_ziv_complexity; print(lempel_ziv_complexity('1001111011000010') == 6)"# testAboutLanguage?Python v2.7+ or Python v3.1+.Numbacan be used to speed up the pure
Python version.Cythonisneededto build the C extension
(faster).License ?MIT Licensed(fileLICENSE). ©Lilian
Besson, 2017.
Package: lemur
LemurLemur manages TLS certificate creation. While not able to issue certificates itself, Lemur acts as a broker between CAs
and environments providing a central portal for developers to issue TLS certificates with ‘sane’ defaults.Lemur aims to support the 3 most recent python releases which have been released for at least a year. For example, if python3.12 released last month, we’d aim to support versions 3.9, 3.10, and 3.11.
We deploy on Ubuntu and develop mostly on OS X.Project resourcesLemur Blog PostDocumentationSource codeIssue trackerDocker
Package: lemuria
LemuriaAboutLemuria is a application for replaying recorded APD files as a virtual TCP device. Other programs (e.g. Acheron) can connect to this virtual device and see the recorded data as if it was being generated live.The Asphodel communication protocol was developed by Suprock Technologies (http://www.suprocktech.com)LicenseLemuria is licensed under the ISC license.The ISC license is a streamlined version of the BSD license, and permits usage in both open source and propretary projects.
Package: len
lenLenWARNING: This repo is in development. It was automatically generated withmkpylib. If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality isprint('TODO').If you really want to try it out, feel free. I recommend reading through thetestsand commit history to see if it does what you need, orask mefor status updates.Stay tuned!Installpip3 install -U lenOr develop locally:git clone https://github.com/shawwn/len ~/len
cd ~/len
python3 setup.py developUsageimportlenprint('TODO')LicenseMIT. SeeLICENSEfile.ContactA library byShawn Presser. If you found it useful, please considerjoining my patreon!My Twitter DMs are always open; you shouldsend me one! It's the best way to reach me, and I'm always happy to hear from you.Twitter:@theshawwnPatreon:https://www.patreon.com/shawwnHN:sillysaurusxWebsite:shawwn.com
Package: len8
len8A utility for keeping line lengths withinPEP 8standards.FeaturesAn easy-to-use CLI (command-line interface)Check a single file, directory, or multiple files and directoriesExclude files and directories from being checkedSet different maximum lengths for both code and documentationMinimal dependenciesInstallationYou need Python 3.6.0 or greater to run len8.To install the latest stable version of len8, use the following command:pipinstalllen8You can also install the latest development version using the following command:pipinstallgit+https://github.com/parafoxia/len8You may need to prefix these commands with a call to the Python interpreter depending on your OS and Python configuration.QuickstartTo get started checking your Python projects with len8:Using the terminal# Check all files in the CWDlen8.# Check all files in `tests` directory and `stats.py` file in CWDlen8testsstats.py# Check all files in two particular directorieslen8my_packagetests# Excluding file 'config.py' and directory 'secrets'# By default '.venv', 'venv', and '.nox' are excludedlen8-xconfig.py,secrets.# Check 'project' dir and increase maximum allowed line lengths# Note that line lengths for comments and docs stay at 72len8-lproject# Increase to 88 (black's default)len8-ll/home/project# Increase to 99 (max allowed by PEP 8)# Check using custom line lengthslen8-c150.# Increase code to 150len8-d100.# Increase docs to 100len8-ll-d99.# Increase code and docs to 99# Check only one file 'important.py'len8important.py
len8./dir/important.py# Check using multiple flags at oncelen8-lxignoreme.py./project_dirIn a Python scriptfromlen8importChecker# Instantiate a new Checker, with strict mode set to Truechecker=Checker(strict=True)# Set attributes after instantiationchecker.extend=2checker.exclude=["excluded_dir"]checker.strict=False# Set line lengths after instantiationchecker.set_lengths(code=100,docs=80)# Checks everything in the cwdbad_lines=checker.check(".")# Because strict mode is set to False and no error is raised, we# print the returned value from the check methodprint(bad_lines)Configurationlen8 supports toml configuration files, by defaultpyproject.tomlin your project
root will be used. You may specify a different configuration file via the--configcli flag.Available configuration options:include: An array of files/directories len8 should check.exclude: An array of files/directories to exclude from checking.code-length: The maximum line length for code.docs-length: The maximum line length for comments and documentation.strict: Whether or not len8 should raise an exception if lines are too long.[tool.len8]include=["myapp"]exclude=["secrets","testing"]code-length=88docs-length=69strict=trueIt's easy to take advantage of configuration files from a Python script as well.fromlen8importChecker,Config# Validchecker=Checker.from_config("./myconfig.toml")# Also validcfg=Config("./myconfig.toml")checker=Checker.from_config(cfg)Contributinglen8 is open to contributions. To find out where to get started, have a look at thecontributing guide.LicenseThe len8 module for Python is licensed under theBSD 3-Clause License.
Package: lenden
lendenExchange Workflow Data📙lenden for  exchangeThis library allows to express in a Json format the  output of the aRadiomicspipeline.InstallationTo install execute the commandpipinstalllendenUse examplesAn example pipeline with two outputs results.fromlenden.dataexportimport*result1=DataResults(Description="Do exercitation occaecat Lorem dolore labore culpa quis.",Help="Aliquip commodo sunt adipisicing officia irure laborum reprehenderit nulla consectetur in minim.",Type=ResultType.image,Path="/path/to/image",Size=ResultSizeType.normal,Format="%20f")result2=DataResults(Description="Sit pariatur magna nisi do.",Help="Velit id adipisicing tempor Lorem. Tempor dolore proident ea quis.",Type=ResultType.percent,Path="/path/to/fileresult",Size=ResultSizeType.wide,Format="RGB(2,3,4)")# Result without Errordata=DataExport(Version=0.1,HasError=False,DisplayType=DisplayType.grid,Results=[result1,result2],CleanPatterns=['*.tmp'],Logs=None)print(data.getJSON())Then the output is:{"Version":0.1,"HasError":false,"DisplayType":"grid","Results":[{"Description":"Do exercitation occaecat Lorem dolore labore culpa quis.","Help":"Aliquip commodo sunt adipisicing officia irure laborum reprehenderit nulla consectetur in minim.","Type":"image","Path":"/path/to/image","Size":"normal","Format":"%20f"},{"Description":"Sit pariatur magna nisi do.","Help":"Velit id adipisicing tempor Lorem. Tempor dolore proident ea quis.","Type":"percent","Path":"/path/to/fileresult","Size":"wide","Format":"RGB(2,3,4)"}],"CleanPatterns":["*.tmp"],"Logs":{"Description":"","Path":[]}}If exist an error then# Result with errordataWithError=DataExport(Version=0.1,HasError=True,DisplayType=DisplayType.grid,Results=[],CleanPatterns=['*.tmp'],Logs=DataLog("Voluptate sint sint eu aliqua consequat culpa nisi fugiat nostrud aute adipisicing.",["/path/log1","/path/log2","/path/log3"]))print(dataWithError.getJSON())Then the output is:{"Version":0.1,"HasError":true,"DisplayType":"grid","Results":[],"CleanPatterns":["*.tmp"],"Logs":{"Description":"Voluptate sint sint eu aliqua consequat culpa nisi fugiat nostrud aute adipisicing.","Path":["/path/log1","/path/log2","/path/log3"]}}
Package: lender
Lender - memo in everywhere# 提交到pypipython-mtwineuploaddist/*TODO首页调整为：hello、置顶、搜索、正文过长时展开收起添加笔记详情页导出笔记标签过滤全文搜索每条笔记可以置顶，可以选择置顶和管理置顶回到上次编辑配置项：行距、行号从知乎复制公式双模式的编辑器自动切换，焦点离开就进入显示模式，焦点激活就进入编辑模式中文输入法和mediumeditor打架了，onCompositionStart和compositionend光标在每行的最前面的时候就看不见了d@2023/02/12当前的笔记新建的时候时间也是“凌晨12:00”d@2023/02/12参考资料tornadohttps://editorjs.io/getting-started/https://github.com/codex-team/editor.js/blob/next/types/configs/editor-config.d.ts
Package: lenders-sentry-utils
Lenders Sentry UtilsThis is a package containing Sentry related utilities used across several Lenders Cooperative projects.Installation$ pip install lenders-sentry-utilsUsageThere are two major components in the package,sentry_initandTrafficSplittingHttpTransport.
These are explained in the sections below.
Additionally, there is one minor component,capture_exception.
This is a simple wrapper forsentry_sdk.capture_exceptionthat adds an event processor to protect a request's body if it exists in the event.Sentry InitThis package'ssentry_initis a wrapper forsentry_sdk.initwith default values and automatic checking of environment variables.
The following table lists each parameter and its relevant information.
Any parameter with no description directly corresponds to asentry_sdk.initoption.Parameter nameTypeDefault valueDescriptionenvEnvNoneAn Env object to search ifdsn,environment, orreleaseare not passeddsnstrenv("SENTRY_DSN")environmentstrenv("BASE_URL")releasestrenv("VERSION")debugboolFalsesend_default_piiboolTruetraces_sample_ratefloat0.1integrationsListDjango, Celery, Redis integrationstransportTransportHTTPTransportbefore_sendfunctionNoneNote:env,dsn, andenvironmentare dependent on each other to a certain degree.
Ifdsnorenvironmentare not passed as parameters,envmust be passed in order to pull the corresponding environment variable.
Additionally, ifdsnorenvironmentare passed, the passed value will be used even if the corresponding environment variable exists inenv.releaseis similar todsnandenvironment, but it is fully optional.Sentry Init Examplesfromlenders_sentry_utilsimportsentry_initfromenvironimportEnvenv=Env(SENTRY_DSN=(str,'https://PK@sentry.io/0'),BASE_URL=(str,'base.com'),)# Minimum viable function callsentry_init(env=env)# Forcing a DSN that's not in the environmentdifferent_dsn='https://different@not.sentry.io/3'sentry_init(env=env,dsn=different_dsn)# Setting DSN and environment without using environment variablessentry_init(dsn=different_dsn,environment='special.env.com')TrafficSplittingHttpTransportTrafficSplittingHttpTransportis a custom transport that splits transaction events to a second DSN while still sending error events to the primary DSN.
This is usually done for billing purposes to ensure that all errors can be reported to Sentry.
To use this transport, the environment variableSENTRY_TRANSACTIONS_DSNmust be set with the second DSN as its value.
If this environment variable is not set, transaction events will instead be discarded.TrafficSplittingHttpTransport Examplesimportlenders_sentry_utilsaslsufromenvironimportEnvdrop_transactions_env=Env(SENTRY_DSN=(str,'https://error_dsn@sentry.io/0'),BASE_URL=(str,'base.com'),)send_transactions_env=Env(SENTRY_DSN=(str,'https://error_dsn@sentry.io/0'),BASE_URL=(str,'base.com'),SENTRY_TRANSACTIONS_DSN=(str,'https://transactions_dsn@sentry.io/0'),)# Example 1: Sending transaction eventslsu.sentry_init(env=send_transactions_env,transport=lsu.TrafficSplittingHttpTransport)# Example 2: Ignoring transaction eventslsu.sentry_init(env=drop_transactions_env,transport=lsu.TrafficSplittingHttpTransport)
Package: lendingclub2
Lending Club APIWelcome to the unofficial Lending Club Python API. This library is inspired by
theLendingClublibrary, but
utilizes the REST API endpoints and applies the
from Lending Club. For more complete information about Lending Club's REST
API, please go tothis page.RequirementsThis library expects that the user has pre-generated the Authentication key.
If you are unfamiliar with it, please go to Lending Clubdocumentation pageto find the instructions on how to generate one.The authentication key can be passed to the application as an environment
variable ($LENDING_CLUB_API_KEY) or using the configuration file.User is also expected to know their investor ID number. Please login to your
Lending Club account to find your investor ID number. The investor ID number
can be passed to the application as an environment variable
($LENDING_CLUB_INVESTOR_ID) or using the configuration file.Configuration FileIf user chooses to specify either the authentication key or investor ID number
using the configuration file, the configuration file has to include the
following information:[access]
api_key = THIS_IS_EXAMPLE_API_KEY=

[account]
investor_id = 123456789The location of the configuration file by default is$HOME/.lendingclub,
but user can override it by specifying the custom path using$LENDING_CLUB_CONFIGenvironment variable.Examplesfromlendingclub2.accountimportInvestorAccount# Find information about account's available balanceaccount=InvestorAccount()print(account.available_balance)
Package: lend-saas
Lend-SaaSA LendingSaaS Python Client LibraryFor an overview of the LendSaaS API,click here.RequirementsPython >= 3.6Getting startedpip install lend-saaslend-saasis simple to use -- take a look at the below example:fromlendSaaSimportLendClientls=LendClient('api_key','client_name')Available methods:Leads Object (ls.leads)# For example:df=ls.leads.get_lead(lead_id)print(df.head(2))get_leads(submittedMinDate, submittedMaxDate, offset, limit=1000)- Get a list of leads to dataframeget_lead(lead_id)-
Get info about specific lead. Use LeadId from get leads query.get_lead_payment_promise(lead_id)-
Get info payment promise. Use LeadId from get leads query.get_lead_external_data(lead_id)-
Get external data on specific lead. Use LeadId from get leads query.
Possible Values are in DocStringget_notes(lead_id, startDate, endDate, offset, limit=5000)-
Get notes about leads. Use LeadId from get leads query.get_ach_schedule(lead_id, startDate, endDate, offset, limit=5000)-
Get info about ach payment schedule. Use LeadId from get leads query.get_underwriting_info(lead_id, submittedMinDate, submittedMaxDate, offset, limit=5000)-
Get info about underwriting info. Use LeadId from get leads query.Funding Object (ls.funding)get_account_monitoring(amStatusId, wlpId, includeClosedDeals)- Get a dataframe of account monitoring. Args are required.get_funding_stats(sdate, edate)-
Get dataframe of funding stats based on date parametersUnderwriting Object (ls.Underwriting)get_offers(leadId, offset, limit=1000)- Get a list of offers given to dataframeget_positions(leadId, offset, limit=1000)- Get a list of positions to dataframe - offset and limit are required fields.get_offer(offer_id)- Get info on specific offerget_stips(leadId, offset, limit=1000)- Get a list of stips to dataframeget_principals(leadId, offset, limit=1000)- Get a list of principals to dataframeget_banking_worksheet(leadId, offset, limit=1000)- Get a list of banking worksheets to dataframe. Needs more work to flatten out actual worksheet column.get_uw_status_history(leadId, offset, limit=1000)- Get a list of uw status to dataframeget_lead_isos(leadId, offset, limit=1000)- Get a list of lead isos to dataframeget_syndication_info(leadId, offset, limit=1000)- Get a list of syndication info to dataframeget_fees(leadId, offset, limit=1000)- Get a list of fee info to dataframeget_external_data(lead_id, offset, limit=100, source='experian', product=['Credit Profile', 'Bank Statements'])-
Get info about specific lead. Use LeadId from get leads query.
Possible Values are in DocStringTestsNot working as of yetTO DOFinish Tests with Mock API
Package: lendsmart-api
lendsmart_apipythonThe official python library for theLendsmart API v1` in python.This library is currently in beta.https://badge.fury.io/py/lendsmart-api.svgPre reqspython 3install virtualenv using below commandpip install virtualenvActivate virtual environment. ./venv/bin/activateInstallationpip install lendsmart_apiUsageYou will need the service account private key files to access Lendsmart.Only a limited set of API is supported.ClientCreate clientUpdate DocumentBuilding from SourceTo build and install this package:Clone this repositorycd core_api

    virtualenv venv

    ./setup.py installTesting individuallyMake sure theprereqs, andbuilding from sourceare completecd lendsmart_python

    . venv/bin/activate

    python3 get_documents_test.pyLocal testing with lendsmart_api packageSet environment path to your local file path in your python fileimport sys
sys.path.append('/home/lendsmart/code/lendsmart/workspace/py_lscommon/core_api/')remove old package which is in virtual environmentrm -r /venv/lib/python3.8/site-packages/lendsmart_apiAuto testsTests live in thetestsdirectory.  When invoking tests, make sure you are
in the root directory of this project.  To run the full suite across all
supported python versions, use tox_:toxRunning tox also runs pylint and coverage reports.The test suite uses fixtures stored as JSON intest/fixtures.  These files
contain sanitized JSON responses from the API - the file name is the URL called
to produce the response, replacing any slashes with underscores.Test classes should extendtest.base.ClientBaseCase.  This provides them
withself.client, aLendsmartClientobject that is set up to work with
tests.  Importantly, any GET request made by this object will be mocked to
retrieve data from the test fixtures.  This includes lazy-loaded objects using
this client (and by extension related models).When testing against requests other than GET requests,self.mock_post(and
equivalent methods for other HTTP verbs) can be used in awithblock to
mock out the intended request type.toxLicenseMITAuthorLendsmart Inc, USA
Package: lendsmart-reva
Reva CLIThe Reva CLI is used to manage Lendsmart deployment from the command line.The primary intent is:mirror prod and QAmake the deploys smooth with no manual intervention.OverviewThe goals of this project is to make deployments more flexible, and make the deployments faster.Installationpip install lendmart_revaConfigurationStep 1: export# Here the home is the root user home directory
export LENDSMART_REVA_HOME=$HOME (or)

# Here the home is the directory `/home/makesh`
export LENDSMART_REVA_HOME="/home/makesh"

# Here the ui home is the path to where the code of ui exists
export LENDSMART_REVA_UI_HOME='/home/makesh/ui'

# Here the ui home is the path to where the code of worklet exists
export LENDSMART_REVA_WORKLET_HOME="/home/makesh/worklet"Step 3: mkdir revacd $LENDSMART_REVA_HOME

mkdir $LENDSMART_REVA_HOME/revaStep 3: reva.confCopy the conf file to location$LENDSMART_REVA_HOME/reva/config.json{"dev":{"api_root":"https://devapi.lendsmart.ai/api/v1","application_graphql_endpoint":"https://devappgraphql.lendsmart.ai/v1/graphql","application_graphql_auth_token":"","lendsmart_access_token":"<dev-lendsmart-access-token>"},"prod":{"api_root":"https://apiprod.lendsmart.ai/api/v1","application_graphql_endpoint":"https://devappgraphql.lendsmart.ai/v1/graphql","application_graphql_auth_token":"","lendsmart_access_token":"<prod-lendsmart-access-token>"}}💁 Please update the aut_token, namespace and lendsmart_access_token for the appropriate environments. This is purposefully left out for security reasons.Command Topicsreva namespaces- manage namespaces on Lendsmartreva workflows- manage workflow configurationreva loanproducts- manage loanproducts configurationreva sitesettings- manage sitesettings configurationreva worklet- manage worklet configurationReferencesCLIConfiguration conf/reva.py
Package: lenet5
Paper-Implementation-TemplateA simple implementation of LeNet5 for practice for the book "Pytorch Pocket Reference"LeNet is abunch of convolution and linear layers with max pools.Paper LinkAppreciationLucidrainsAgoriansInstallpip install lenet5Usageimporttorchfromlenet5importLeNet5x=torch.randn(1,3,32,32)model=LeNet5()result=model(x)print(result)print(result.shape)print(result.dtype)ArchitectureTodoLicenseCitations
Package: length-extension-tool
HashToolsThis is a pure python project implementing hash length extension attack. It also supports the implementation of some popular hashing algorithms.Currently Supported AlgorithmsAlgorithmImplementationLength Extension AttackMD5:white_check_mark::white_check_mark:SHA1:white_check_mark::white_check_mark:SHA224:white_check_mark::x:SHA256:white_check_mark::white_check_mark:SHA384:white_check_mark::x:SHA512:white_check_mark::white_check_mark:InstallationpipinstallHashToolsUsageUsing algorithm normallyUsingupdatemethod (likepython hashlib)importHashToolsmagic=HashTools.new(algorithm="sha256")magic.update(b"Hello World!")print(magic.hexdigest())or just one lineimportHashToolsmsg=b"Hello World!"print(HashTools.new(algorithm="sha256",raw=msg).hexdigest())Using hash length extension attackUsingextensionmethodimportHashToolsfromosimporturandom# setup contextsecret=urandom(16)# idk ¯\_(ツ)_/¯original_data=b"&admin=False"sig=HashTools.new(algorithm="sha256",raw=secret+original_data).hexdigest()# attackappend_data=b"&admin=True"magic=HashTools.new("sha256")new_data,new_sig=magic.extension(secret_length=16,original_data=original_data,append_data=append_data,signature=sig)TestingCompare my implementation withpython hashlibdeftest_imple():algorithms=["md5","sha1","sha224","sha256","sha384","sha512"]print("> Implementation test...")foralginalgorithms:msg=urandom(randint(0,1024))py_hash=hashlib.new(alg)my_hash=HashTools.new(alg)py_hash.update(msg)my_hash.update(msg)test1=py_hash.hexdigest()test2=my_hash.hexdigest()iftest1!=test2:print(f"[!]{alg.ljust(6)}failed the validation test!")print(test1)print(test2)exit(1)else:print(f"[+]{alg.ljust(6)}passed the validation test!")print("> All test passed!!!")Testing length extension attackdeftest_attack():algorithms=["md5","sha1","sha256","sha512"]print("> Implementation test...")foralginalgorithms:# setup contextlength=randint(0,1024)secret=urandom(length)# idk ¯\_(ツ)_/¯original_data=b"admin=False"sig=HashTools.new(algorithm=alg,raw=secret+original_data).hexdigest()# attackappend_data=b"admin=True;"magic=HashTools.new(alg)new_data,new_sig=magic.extension(secret_length=length,original_data=original_data,append_data=append_data,signature=sig)ifnew_sig!=HashTools.new(algorithm=alg,raw=secret+new_data).hexdigest():print(f"[!] Our attack didn't work with{alg.ljust(6)}")exit(1)else:print(f"[+]{alg.ljust(6)}passed")print("> All test passed!!!")LicenseMIT LicenseReferencesPub, F. I. P. S. (2012). Secure hash standard (shs). Fips pub, 180(4).