Saravanan666/pypi-org huggingface dataset:
Package: py-linkedlist
Py-linkedlistWork with linkedlists datastructure in PythonInstallationpip install py-linkedlistImport Package# Importing linkedlist to your code
from linkedlist import linkedlistCreating First LinkedlistInitialising a linkedlist
l_list = linkedlist()Adding Elements in the Linkedlist#Adding First element to the linkedlist
l_list.add(10)# Appending a list to the linkedlist
l_list.add([1, 2])# Appending a tuple to the linkedlist
l_list.add((3, 4, 3))# Adding new element at head position in linkedlist
l_list.addAtHead(20)Any data type including String, Dictonary, Sets etc. can be added to linkedlistPrinting the Linkedlist# Priting the linkedlist to console
l_list.show()

output: 20->10->1->2->3->4->3Get Linkedlist length# Returns length of linkedlist
print(l_list.length())

output: 7Deleting Linkedlist elements# Remove first occurance of an element (3) 
# l_list: 20->10->1->2->3->4->3

l_list.removeElement(3)
l_list.show()

output: 20->10->1->2->4->3# Remove using element position 
# l_list: 20->10->1->2->4->3

l_list.removeAtLoc(2)
l_list.show()

output: 20->1->2->4->3# Remove Head/First element in linkedlist 
# l_list: 20->1->2->4->3

l_list.removeHead()
l_list.show()

output: 1->2->4->3# Remove Tail/Last element in linkedlist 
# l_list: 1->2->4->3

l_list.removeTail()
l_list.show()

output: 1->2->4# Remove All elements in linkedlist 
# l_list: 1->2->4->3

l_list.removeAll()
l_list.show()

output: NoneChecking Linkedlist is Empty/Not# Checking the linkedlist is Empty/Not

print(l_list.isEmpty())

output: TrueIndexing Linkedlist element with location# Get Linkedlist with location. Linkedlist are zero-indexed based
l_list.add((13, 41, 34))
print(l_list.eleAt(2))

output: 34Uninstall Packagepip uninstall py-linkedlist
Package: pylinkgrammar
DescriptionLinkGrammar is a sentence parsing system developed at Carnegie Mellon University by John Lafferty, Daniel Sleator, Davy Temperley and othersLinkGrammar is written in C.  This package contains a Pythonic interface to the C library.Sourcecode is hosted on BitBucket:https://www.bitbucket.org/metametrics/pylinkgrammar/InstallYou’ll need to build and install linkgrammar before running setup.py. Verified to work with linkgrammar 4.7.6 and above.On Ubuntu systems you install the dependencies like so:sudo apt-add-repository ppa:python-pylinkgrammar/getsome
sudo apt-get install liblink-grammar4Then to install pylinkgrammar:pip install pylinkgrammarHow to useParsing simple sentences:>>> from pylinkgrammar.linkgrammar import Parser
>>> p = Parser()
>>> linkages = p.parse_sent("This is a simple sentence.")
>>> len(linkages)
2
>>> print linkages[0].diagram

        +-------------------Xp------------------+
        |              +--------Ost-------+     |
        |              |  +-------Ds------+     |
        +---Wd---+-Ss*b+  |     +----A----+     |
        |        |     |  |     |         |     |
    LEFT-WALL this.p is.v a simple.a sentence.n .
Package: pylinkmobile
# pylinkmobilepylinkmobile is a Python module for interacting with the Link Mobile Solutions API.The API documentation is available here:http://msgw.linkmobility.com/MessageService.htm## InstallationInstall `pylinkmobile` (available on PyPi):pip install pylinkmobile## Usagefrom linkmobile.service import MessageServiceservice = MessageService(username='YOUR_USERNAME', password='YOUR_PASSWORD', debug=False)# Send SMSsms = service.sms(Data='Hello World!',Originator='Santa',Msisdn='+4700000000')response = sms.send()
Package: py-link-monitor
py-link-monitorLink monitor written on Python that uses command line ping utilityInstallationpip install py-link-monitorUsage$ py_link_monitor -t 8.8.8.8Sample outputmonitor Status changed to ALIVE for monitor of 8.8.8.8 at 2023-05-16T15:51:15.184630
monitor Status changed to FAIL for monitor of 8.8.8.8 at 2023-05-16T15:52:21.319762
monitor Status changed to ALIVE for monitor of 8.8.8.8 at 2023-05-16T15:52:26.512260
Package: pylinky
Get your consumption data from your Enedis account (www.enedis.fr)In order to use the library, you need an account onhttps://datahub-enedis.fr/.
You need to create a Data Connect Application and as of May 2020 you will get
your client_id by mail and your client_secret by SMS after a week or so…
With these credentials, you can only access the Sandbox environment… You need
to sign a contract and probably wait more to get Production credentials…The library uses requests and requests_oauthlib to cope with the OAuth 2.0
protocol. It uses an AbstractAuth class to let a developer override the refresh
token function and route it via their own external service.
It also let the storage of the token between sessions to the developer.InstallationThe easiest way to install the library is usingpip:pip install pylinkyYou can also download the source code and install it manually:cd /path/to/pylinky/
python setup.py installUsagePrint your current datapylinky -c <client_id> -s <client_secret> -u <redirect_url>Dev envcreate virtual env and install requirementsvirtualenv -p /usr/bin/python3.5 env
pip install -r requirements.txt
Package: pylinlin
pylinlinNice linear algebra library in pythonExamplesfrompylinlin.matriximportMatrixfrompylinlin.lu_factorizationimportcompute_lu_factorizationfrompylinlin.qr_factorizationimportcompute_qr_factorization# Create matrixmatrix=Matrix.from_cols([[1,2,3],[4,5,6],[7,8,10]])# preferred way to initialize a matrixmatrix2=Matrix.from_rows([[1,2,3],[4,5,6],[7,8,9]])column_as_list=[1,2,3,4,5]column_vector=Matrix.from_cols([column_as_list])# column vectors can be represented as matricesmagnitude_sq=column_vector.transpose().multiply(column_vector).get(0,0)# 55print(matrix.size())# Get dimensions of matrix (rows, columns)print(matrix.get_col(0))# Get first column from matrixprint(matrix.get_row(1))# Get second row from matrixprint(matrix.all_cols())# List of matrix columnsmatL,matU=compute_lu_factorization(matrix)matQ,matR=compute_qr_factorization(matrix)print(matQ.all_cols())print(matQ.transpose().multiply(matQ).all_cols())# approximately an identity matrixproduct=matrix.multiply(matrix)# matrix multiplicationGoalsTest-driven developmentProfiling of performanceProfiling of numerical stabilityLightweight, easy to port over to other languagesTODOsAlgorithmsLU factorizationLU factorization with partial pivotingQR factorization with householder matricesQR factorization with pivotingGram Schmidt and Modified Gram Schmidt (help wanted!)Spectral decompositionSVDConjugate gradientsCondition number of a matrixJacobi SVDPower iterationMatrix PseudoinverseProfilingProfile time taken varying size of matricesProfile time taken to solve linear system comparing different algorithmsGraph error distribution on random matricesOthersMake curve fitting demonstrationMake IK demonstration
Package: pyLINQ
This library makes filtering and sorting lists easier.Here is how easy it is to use>>> my_list = List([1,-9,5,2,1])
>>> my_list.select("abs(x)").where("x>3") # get all elements where the absolute value is greater than 3.
[9,5]
>>> my_list.first("x % 2 == 0") # get the first even number
2
>>> name_list = List(['harry','tina','jeff','hank','john','tom','jeremy','brenda','steve'])
>>> name_list.groupby("x[0]")
[{'h': ['harry', 'hank']}, {'t': ['tina', 'tom']}, {'j': ['jeff', 'john', 'jeremy']}, {'b': ['brenda']}, {'s': ['steve']}]Here is a list of functionsList of Methods for List Objectfunction nameexample call with parameteroutputanyFalseFalseallFalseTrueconcatTrueTruecountTrueTruedistinctTrueTrueduplicateFalseFalseelementTrueTrueexcept_setFalseTruefirstTrueTruegroupbyTrueTrueintersectTrueTruelastTrueTruemaxTrueTrueminTrueTrueoftypeTrueTrueorderbyTrueTrueselectTrueTrueskipwhileTrueTruesumTrueTruetakewhileTrueTrueunionTrueTruewhereTrueTrue
Package: py-linq
py-linqLINQ (Language Integrated Query) is a popular querying language available in .NET. This library ports the language so
that developers can query collections of objects using the same syntax. This library would be useful for Python developers
with experience using the expressiveness and power of LINQ.InstallAvailable as a package from PyPI.pipinstallpy-linqUsageTo access the LINQ functions an iterable needs to be wrapped by the Enumerablefrompy_linqimportEnumerablemy_collection=Enumerable([1,2,3])DocumentationPlease visit the projectsitefor better documentationContributingContributions are welcomed. This project usespoetryto handle the few library dependencies.Pre-commitis also used so that formatting and linting checks are performed on commit.Clone the repository usinggit clone https://github.com/viralogic/py-enumerable.gitInstall poetry globally as per the instructionshereCD into the root of your cloned repository directory andpoetry installto install all packages from the repository Pipfile.Installpre-commitby typingpoetry run pre-commit installYou should now be ready to start coding!
Package: pylinqext
pylinqextpylinqext is a package for C#er to write code like LINQ.Usagefrompylinqextimportpylistfrompylinqextimportenumerablee=enumerable([1,2,3,4,5,6,7,8,9,0])e.where(lambdax:x%2==0)\.select(lambdax:x*x)\.where(lambdax:30<x)\.to_pylist()\.for_each(lambdax:print(x))Output:36
64frompylinqextimportenumerable,pydictd=pydict({1:1,2:4,3:9})d.items()\.where(lambdax:x[0]>=2)\.to_pydict(lambdax:x[0],lambdax:x[1])\.for_each(lambdak,v:print(f"key={k},value={v}"))Output:key=2,value=4
key=3,value=9Installpip install pylinqextVersionv0.0.1-alphafirst commitv0.0.2implement single, aggregate, etcv0.0.3readonlylist, some methodsv0.5.0rename project to pylinqextv0.5.1enumerableimplement to_pydict()pydictitems() / keys() / values() return pylistcopy() return pydictclassenumerablepylistpydictpyreadonlylistSupport〇：implemented△：not implemented×：not suppotSupportMethodMemo〇aggregate〇all〇any〇append〇as_enumerableimplemented to pylist〇average×cast〇chunk〇concat〇contains〇count×default_if_empty〇distinct〇distinct_by〇element_at〇element_at_or_default×empty〇exceptnamed:set_difference〇except_bynamed:set_difference_by〇first〇first_or_default×group_by×group_join〇intersect△intersect_by〇max△max_by〇min△min_by〇of_type×order×order_by×order_by_descending×order_descending〇prepend〇range〇repeat〇reverse〇select〇select_many×sequential_equal〇single〇single_or_default〇skip△skip_last〇skip_while〇sum〇take△take_last〇take_while×then_by×then_by_descending×to_array〇to_dict△to_set〇to_listuseto_pylistto write method chain.×to_lookup〇to_readonly_list〇union△union_by〇where〇zip
Package: pylinreg
PyLinRegLinear Regression Model with only Python Standard Library based on
Ordinary Least Squares (OLS) MethodQuickstartRequirementsThis module use Python Standard Library only. Python version should be higher than3.6Installpip install pylinregHow to UseThis code works as module not a script.Importimport pylinregCreate linear regression model objectpredictors = [1, 2, 3, 4, 5]
targets = [15, 25, 35, 45, 55]
Model = pylinreg.LinearModel(predictors, targets)Get values of slope and interceptslope = Model.slope
intercept = Model.interceptGet predictionpredictor = 6
prediction = Model.make_prediction(predictor)The prediction is65.Helphelp(pylinreg)ExamplesExamples are available in thetest.pyLicenseThe content of this repository is licensed underMIT license. For more details, checkLICENSE
Package: pylint2codeclimate
Pylint reporter class to export results in codeclimate format, originally fromhttps://github.com/mikebryant/codeclimate-pylint/blob/master/codeclimate_reporter.pyIt can be used in a gitlab-ci.yml stage like:codequality:
  stage: test
  script:
    - pip install pylint2codeclimate pylint
    - pylint -f pylint2codeclimate.CodeClimateReporter *.py > codeclimate.json
  artifacts:
    when: always
    paths: [codeclimate.json]
Package: pylint2junit
Provides junit xml from eitherpylint –output-format=pylint2junit.JunitReporteror a shell script to convert pylint text/parsable output to an xml file.Installpip install pylint2junitUsageOutput formatterpylint –output-format=pylint2junit.JunitReporter exampleConversion scriptpylint –output-format=parseable example > pylint_results.txt
pylint2junit –input=pylint_results.txt –output=pylint_results.txtBuildingValidate no pylint problempylint pylint2junit testsBuildpython setup.py bdsit_wheel
Package: pylint-absolute-imports
Pylint force absolute imports pluginWhat for?FollowingPEP8 recommendation about imports,importstatements should be absolute :Standard library code should avoid complex package layouts and always use absolute imports.# project/# |---- __init__.py# |---- employee.pyfrom.employeeimportEmployee# <- BADfromproject.employeeimportEmployee# <- GoodInstallationpipinstallpylint_absolute_importsUsageInpylint.rc:[MASTER]load-plugins=pylint_absolute_importsOr, in terminal:pylint--load-pluginspylint_absolute_importsfoo.py
Package: pylint-actions
Pylint plugin for GitHub Actions annotationsThis is a plugin forPylintthat allows it to output annotations
in the format that GitHub Actions understands.
See annotations fromexamplesworkflows.
Also these annotations will be displayed in your pull requests changesInstallationSo simple:pipinstallpylint-actionsUsageAdd the following to yourpyproject.tomlfile:[tool.pylint.main]load-plugins="pylint_actions"Or load the plugin with any available pylint configuration variants except command line arguments.Next, run pylint with the--output-format=actionsoption, or shorted-f actions.In your GitHub Actions workflow, use it like this:-name:Run pylintrun:poetry run pylint -f actions src
Package: pylint-af
pylint_afpylint_afis a Python package that allows you to check the Python code for compliance with PEP8.PrerequisitesBefore you begin, ensure you have installed the latest version of Python.Installingpylint_afTo installpylint_af, follow these steps:Linux and macOS:pip3 install pylint-afWindows:pip install pylint-afUsingpylint_afThere are examples of how to usepylint_af.To use thePyLinterclass, import it as shown below:>>> from pylint_af import PyLinterSimple checking without additional options:>>>  PyLinter().check()

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)Simple checking with printed pylint options:>>>  PyLinter(is_printed=True).check()
--ignore-imports=yes
***
--------------------------------------------------------------------
Your code has been rated at ...Here***is the list of inspected files.Example of checking with ignored pylint statements.>>>  PyLinter(is_printed=True, ignored_statements={'C0114'}).check()
--ignore-imports=yes
--disable=C0114
***
--------------------------------------------------------------------
Your code has been rated at ...Seepylint documentationto study the full list of pylint statements.Example of checking with ignored paths.>>> PyLinter(is_printed=True, ignored_paths={'example'}).check()
--ignore-imports=yes
--disable=C0114
***
--------------------------------------------------------------------
Your code has been rated at ...Here***is the list of all inspected files
in the current work directory except files in 'example' folder.Checking in other directory.>>> PyLinter(root_directory='C:\\other').check()
--------------------------------------------------------------------
Your code has been rated at ...Contributing topylint_afTo contribute topylint_af, follow these steps:Fork this repository.Create a branch:git checkout -b <branch_name>.Make your changes and commit them:git commit -m '<commit_message>'Push to the original branch:git push origin <project_name>/<location>Create the pull request.Alternatively see the GitHub documentation oncreating a pull request.Contributors@AlbertFarkhutdinovContactIf you want to contact me you can reach me atalbertfarhutdinov@gmail.com.LicenseThis project uses the following license:MIT License.
Package: pylint-airflow
Pylint plugin for static code analysis on Airflow code.UsageInstallation:pipinstallpylint-airflowUsage:pylint--load-plugins=pylint_airflow[your_file]This plugin runs on Python 3.6 and higher.Error codesThe Pylint-Airflow codes follow the structure{I,C,R,W,E,F}83{0-9}{0-9}, where:The characters show:I= InfoC= ConventionR= RefactorW= WarningE= ErrorF= Fatal83is the base id (see all herehttps://github.com/PyCQA/pylint/blob/master/pylint/checkers/__init__.py){0-9}{0-9}is any number 00-99The current codes are:CodeSymbolDescriptionC8300different-operator-varname-taskidFor consistency assign the same variable name and task_id to operators.C8301match-callable-taskidFor consistency name the callable function ‘_[task_id]’, e.g. PythonOperator(task_id=’mytask’, python_callable=_mytask).C8302mixed-dependency-directionsFor consistency don’t mix directions in a single statement, instead split over multiple statements.C8303task-no-dependenciesSometimes a task without any dependency is desired, however often it is the result of a forgotten dependency.C8304task-context-argnameIndicate you expect Airflow task context variables in the **kwargs argument by renaming to **context.C8305task-context-separate-argTo avoid unpacking kwargs from the Airflow task context in a function, you can set the needed variables as arguments in the function.C8306match-dagid-filenameFor consistency match the DAG filename with the dag_id.R8300unused-xcomReturn values from a python_callable function or execute() method are automatically pushed as XCom.W8300basehook-top-levelAirflow executes DAG scripts periodically and anything at the top level of a script is executed. Therefore, move BaseHook calls into functions/hooks/operators.E8300duplicate-dag-nameDAG name should be unique.E8301duplicate-task-nameTask name within a DAG should be unique.E8302duplicate-dependencyTask dependencies can be defined only once.E8303dag-with-cyclesA DAG is acyclic and cannot contain cycles.E8304task-no-dagA task must know a DAG instance to run.DocumentationDocumentation is available onRead the Docs.ContributingSuggestions for more checks are always welcome, please create an issue on GitHub. ReadCONTRIBUTING.rstfor more details.
Package: pylint-args
pylint-kwargs-orderAboutpylint-kwargs-orderis aPylintplugin for checking order of the passing keyword arguments to the function.InstallationTo install:pip install pylint-kwargs-orderUsageEnsurepylint-kwargs-orderis installed and on your path and then execute:pylint --load-plugins pylint_kwargs_order [..other options..] <path_to_your_sources>FeaturesJust checks that the keyword arguments are passed to the function in alphabetical orderContributingIssues
Package: pylint-behave
pylint-behavepylint-behaveis a Pylint plugin to improve code analysis when analyzing a Behave project.Table of contentsGet startedInstallationUsageFeaturesTestingRequirementsSet Python versionsRunLicenseChangelogGet startedInstallationThis plugin can be simply installed by running:pipinstallpylint-behaveif you want to install from a source distribution:gitclonehttps://github.com/eccanto/pylint-behave.gitcdpylint-behave/
pythonsetup.pyinstallUsageEnsurepylint-behaveis installed and on yourPATH:pylint--load-plugins=pylint_behave[options..]<path_to_your_code>FeaturesPrevents warnings aboutredefined namesin the Behave steps (step_impl).@step('step 1')defstep_impl():pass@given('given 1')defstep_impl():passPrevents warnings aboutno namesin the Behave module (step,given,when, etc.).frombehaveimportstep,givenTestingRequirementspip3install-rrequirements.txtSet Python versionsInstallpyenvInstall python versions:forpython_versionin"3.7""3.8""3.9""3.10""3.11""3.12";dopyenvinstall${python_version};doneEnable python versions:pyenvlocal"3.7""3.8""3.9""3.10""3.11""3.12"RunWe usetoxandpytestto run the
test suite:toxto run the test suite for a particular Python version, you can do:tox-epy37LicenseMITChangelog1.0.2 - Extended support for Python 3.10, 3.11 and 3.12, and update the documentation.1.0.1 - Compatibility with pylint outdated versions.1.0.0 - Initial version.
Package: pylint-blocking-calls
Pylint Blocking Calls CheckerThis is a pylint plugin that checks for blocking calls in your async python code.InstallationThe best way to install the plugin is to use pip as follows:pipinstallpylint-blocking-callsUsageLet's start with an example:importasyncioimporttimedefblocking_function():time.sleep(5)# an example of a IO-bound operationasyncdefasync_function():blocking_function()# <- This call blocks the event loop!defsome_another_function():blocking_function()asyncdefasync_function2():some_another_function()# <- This call also implicitly blocks the event loop.asyncdefmain():time_before=time.time()awaitasyncio.gather(async_function(),async_function2())time_after=time.time()# This can take 5 seconds but actually takes 10, because both async functions block the event loopprint(f"Time elapsed:{(time_after-time_before):.0f}seconds")if__name__=="__main__":asyncio.run(main())Save the file with the name "example.py" and run the following command:BLOCKING_FUNCTION_NAMES="^blocking_function$"pylint--load-plugins=pylint_blocking_callsexample.pyThis should provide the following output:*************Moduleexample
example.py:9:4:W0002:blocking_function(blocking-call)example.py:17:4:W0002:some_another_function->blocking_function(blocking-call)Plugin configurationPlugin supports configuration via the following environment variables:# requiredexportBLOCKING_FUNCTION_NAMES=""# comma-separated list of regexps that match blocking function names in your project# optionalexportSKIP_FUNCTIONS=""# comma-separated list of regexps that match function names that should be skippedexportSKIP_MODULES=""# comma-separated list of regexps that match module names that should be skippedexportSKIP_DECORATED=""# comma-separated list of regexps that match decorator names that should be skippedSee thetests/test_blocking_calls.pyfile for a real configuration example.Production setupThe plugin is designed to be used in a CI/CD pipeline.NOTE:When running on a multiple files, you must run pylint with the single process mode (--jobs=1), otherwise there could be a race condition and the plugin may be not working correctly.Consider the following workaround in production:# ... as a part of your CI/CD pipelineexportBLOCKING_FUNCTION_NAMES="...."exportSKIP_FUNCTIONS="...."exportSKIP_MODULES="...."exportSKIP_DECORATED="...."# run pylint with multiple cores for better performancepylint--disable=blocking-call$(REPO_DIR)/src# run pylint with a single core to check for blocking callspylint-j1--disable=all--enable=blocking-call$(REPO_DIR)/srcMotivationThis plugin was created to help us find blocking calls in our async code.We use it in our CI pipeline to prevent blocking calls from being merged into the master branch.Please share your feedback and ideas in the issues section.External linksView the plugin page onPyPi.
Package: pylint-boolean-naming
Pylint Boolean Naming CheckerThis is apylintChecker to enforce variables with boolean results include common phrases implying True/False states.Inspiration taken from hereCame across this [issue](https://github.com/pylint-dev/pylint/issues/9409) and thought it would be cool to try and do it myself.How to UseInstall the package and then add it to the pylint runtime plugins.# assuming git cloning until PyPI publishgitclone...cdpylint-boolean-naming
pipinstall.# inside your code basepylint--load-pluginspylint-boolean-naming\...# other commandsCode QualityUsepre-commitfor general code quality and as a CI checker. This has hooks for:
-MyPy-Ruff-PoetryContributingWe welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, creating issues because you found a bug or want a feature, etc. Everything is much appreciated!