Saravanan666/pypi-org huggingface dataset:
Package: pyrestclient
RESTClientThe cross-platform tool to work with http.InstallationFor most users, the recommended method to install is via pip:pip install pyrestclientor from source:python setup.py installImportfrompyrestclientimportRESTClientChangelogUNRELEASED1.1.9 (31.05.2023)auth_key attr added to customize auth responseAuthToken removed. all it methods moved inside core classdebug log extended1.1.8 (13.09.2022)Read timeout adjustment added. From now on you can set read and connection timeout simultaneously"auth_timeout" renamed to "connect_timeout" and value reduced to 5"read_timeout" global param added. Default value - 60.logger_enabled renamed to log_enabledlogger_level renamed to log_levelminor refactoring1.1.7.post0 (8.07.2022)logger error fixedlog level handler added1.1.7 (8.07.2022)typo fixedrequested_url() refactoredencode_to_base64 logger added"[Response]" replaces with the "<-"1.1.6 (3.06.2022)logger name is nowRESTClient1.1.5 (24.05.2022)Breaking changes:
REST assertion renamed and changed:return bool nowis_success()is_ok()is_not_found()is_bad_request()is_unauthorized() new method1.1.4 (23.05.2022)response logger addedjson_data() removed1.1.3 (17.04.2022)updated to manage logger state1.1.2 (29.03.2022)'host' attr is '127.0.0.1' by default'auth_timeout=7': new attr added'.encode_to_base64()': new method addedplogger package added as dependencyinternal logger removed as unused1.1.1 (15.02.2022)wait_service_start fixed. added interval parameter1.1.0 (8.02.2022)Fixed custom header usage1.0.9.post0 (29.12.2021)Fixed get token logger1.0.9 (06.12.2021)token property changed to catch unavailability occasions (not verifying base URL availability)1.0.8.post0 (31.08.2021)post without data fixedrefactored custom header1.0.8 (31.08.2021)logger added as attr1.0.7 (21.05.2021)POST, PUT, DELETE extended with header=None param1.0.6 (24.02.2021)refactoring. used lazy initialization to get tokenwait_service_start: for the is_service_initialized under the hood used 0.1 sec by default1.0.5 (24.02.2021)is_service_initialized updated to use timeout1.0.4 (21.12.2020)logger auth link fixed1.0.3 (21.12.2020)header param added to the GET method1.0.2 (31.10.2020)New base method added:is_host_available (Check remote host availability using socket and specified port)is_service_initialized (GET https://{IP}:{PORT})wait_service_start1.0.1 (29.10.2020)PUT fixedRESTClient inherited from RESTAssertion. No need to import RESTAssertion directly#####1.0.0 (14.10.2020)removed "extend_header"#####0.1.0 (21.05.2020)file logging removed#####0.0.9 (28.03.2020)
DELETE fixed
POST: added file support#####0.0.8 (28.03.2020)
header typing hint fixed. Now it is dict#####0.0.7 (10.03.2020)Added query_params to all methodsPOST method was refactored to use .send_request()#####0.0.6 (01.03.2020)removed full_url param. now it will automatically convert url. use "http[s]://site.com" format in methods to use full url.code refactoring#####0.0.5 (01.03.2020)query params refactored to use urlencodeadded DELETE method0.0.4 (27.02.2020)should_be_bad_request: assert text fixed
...0.0.1 (9.02.2020)initial commit
Package: pyresto
ExamplesGitHubimport pyresto.apis.github as GitHub

user = GitHub.User.get('berkerpeksag')
print 'Watchers: {0:d}'.format(sum(r.watchers for r in user.repos))Bugzillafrom pyresto.apis.bugzilla import mozilla

mozilla.auth(username='<USERNAME>', password='<PASSWORD>')
bug = mozilla.Bug.get('774141')
print bug.id, bug.status, bug.summary
# 774141 NEW Add generic Bugzilla Python client APIInstallationTo install Pyresto, simply:pip install pyrestoDocumentationDocumentation hosted onRead the Docs.LicenseAll files that are part of this project are covered by the following license, except where explicitly noted.This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one athttp://mozilla.org/MPL/2.0/.
Package: pyreststore
.. -*- coding: utf-8; mode: rst; -*-.. Pyreststore introduction https://github.com/peterdv/pyreststore.. To be able to generate PDF files, install the texlive-latex-extra package.. For the Python documentation,this convention is used which you may follow:• # with overline, for parts• * with overline, for chapters• =, for sections• -, for subsections• ^, for subsubsections• ", for paragraphsPyreststore introduction========================.. image:: https://travis-ci.org/peterdv/pyreststore.svg?branch=master:target: https://travis-ci.org/peterdv/pyreststore`Pyreststore`_ is a `Python`_ implementation of a `REST`_ based storage,a web application capable of storing bitbuckets serialized as plain text.This is a varation of the `pastebin type`_ web applications implemented in`Python`_ on top of `Django`_ and the associated `Django REST framework`_... _`Pyreststore`: https://github.com/peterdv/pyreststore.. _`Python`: https://www.python.org/.. _`REST`: https://en.wikipedia.org/wiki/Representational_state_transfer.. _`pastebin type`: https://en.wikipedia.org/wiki/Pastebin.. _`Django`: https://www.djangoproject.com/.. _`Django REST framework`: http://tomchristie.github.io/django-rest-framework/Plenty of fine pastebin applications exist, so why create yet another one ?The answer is quite simply: because I could.Professionally I found myself in need of anenterprise level, internal pastebin service,and none of the existing ones I considered did quite fit the bill.This, in combination with a summer vacation cumming up,made the decission to roll my own -and dig into Django along the way - an easy decission.So pyreststore is used to fill a very specific need we hadin our systems landscape,and at the same time it is a personal learning experience for me.The implementation is inspired of my starting points learning aboutDjango and Rest: The excelent `Django REST framwork Tutorial`_and `Django Tutorial`_,without those I would not have embarked on this journey... _`Django REST framwork Tutorial`: http://tomchristie.github.io/django-rest-framework/#tutorial.. _`Django Tutorial`: https://docs.djangoproject.com/en/1.8/intro/tutorial01/If You consider using this code, please remember that it was implementedspecifically for the two purposes stated above.You should carefully consider which support level You need,adopting this code implies that You will maintain the code yourself !If You are capable and willing to do this, please dig in - and considercontributing here.We have a single enterprise deployment of a slightly adapted version ofpyreststore, but I do not have ressources to support pyreststore in general.If You decide to go ahead, please read the `License`_ file,it should be wide enough to fit most purposes,and consult the `installation`_ notes... _`License`: ./LICENSE.. _`installation`: doc/installation.rstI sincerely hope that You have as much fun as I have had !`Peter Dahl Vestergaard`_.. _`Peter Dahl Vestergaard`: https://dk.linkedin.com/in/peterdahlvestergaard.. include:: doc/installation.rst.. EOF
Package: pyRestTable
pyRestTableFormat a nice table in reST (reStructuredText) from Python.Each cell may have multiple lines, separated by a newline.
The content of each cell will be rendered as str(cell).
At present,pyRestTableonly supports tables with content
that does not span any cells (no rowspans or columnspans).termdescriptionInstall with condaconda install -c conda-forge pyRestTableInstall with pippip install pyRestTableauthorPete R. Jemianemailprjemian@gmail.comcopyright2014-2022, Pete R. JemianlicenseCreative Commons Attribution 4.0 International Public License (seeLICENSE.txt)docshttps://prjemian.github.io/pyRestTableURLhttps://github.com/prjemian/pyRestTableTODOhttps://github.com/prjemian/pyRestTable/issuescitationsplatformsPython versionscondaPyPIreview
Package: pyresty
#pyresty`pyresty` is a requests wrapper inspired by [micha/resty](http://github.com/micha/resty). It provides a simple, concice shell interface for interacting with RESTservices.##Quick StartInstall pyresty however you desire. I recommend `pip`.```$ pip install pyresty```Add a host to the configuration (ad-hoc hosts to be added soon):```$ pyresty add localhost http://localhost:8000/v2.0```Set the global host to your target:```$ pyresty localhost```Make requests:```$ GET /things{[{"id": 1, "name": "superwidget"}, {"id": 2, "name": "not_cool_widget"}]}$ DELETE /things/1```Switch hosts if you want:```$ pyresty production_server```##Upcoming Features:* ad-hoc host definition: `pyresty http://random.com`* session recording and playback* token loading from environment* auth plugins* host sections with more options* output options* vi integration
Package: pyresumize
Introductionpyresumize is a python module to extract useful information from resume and generate a json string out of it. Currently it supports only pdf,docx files as input .TodoProper Logging to be addedSupport for other formatsPerformance ImprovementsBug FixesCustom configuration of input dataNotesThe Skills , Employers and Education is given as .csv inputs to the engine and you can see a reference implementation in the data folder.DesignClass DiagramPackage DiagramI have changed the Design in such a way that the developers can create own parsing rules and set those to the Parser to bring in flexibility.Currently we have the below interfaces exposed and the developers can override the process method to bring in custom processing rules.EmployerBaseInterface:Searches for company information in the resume and identifies the employment information from resume. The builtin module uses NER model from a set of 1500+ employers . I already have a plan to list all the employers based on countries (Future Releases)EducationBaseInterfaceProcess Education Details together with universities .Similarly the data is very primitive , I need to update the input csv files based on countries(future releases)EmailBaseInterfaceCheck for email addresses in the resume and returns if found one.PhoneBaseInterfaceProcess phone numbers in the resume text, if there are more than one phone number found , returns a concatenated string with commas.NameBaseInterfaceProces the Name of the candidate .SkillBaseInterface:Process the skills section . returns a list of identified skills in a resume. I used a linked in scrapped input for this module.Sometimes you will be in a need to extend there interfaces , Then create a class like below to have custom parsing.class RemoteCompaniesChecker (EmployerBaseInterface):
    def process(self,resumetext):
    #Call a remote API and pass the text info
    return list[]The ResumeEngine class has below member functions and with one of these you can apply your custom engineset_skills_engine(self, engine):    
set_name_engine(self, engine):    
set_name_engine(self, engine):    
set_email_engine(self, engine):    
set_education_engine(self, engine):    
set_employer_engine(self, engine):Currently the Engine supports PDF and DOCX File extensions . Incase if you want to use a different parsing mechanism for a particular type of file, you can extend AbstractFileProcessor and use add_custom_text_processor method to register your own text processing features.Usagehttps://pypi.org/project/pyresumize/. The module can be installed usingpip install pyresumizeThen do the belowpython -m spacy download en_core_web_lg    
python -m nltk.downloader words    
python -m nltk.downloader stopwords    
from pyresumize import ResumeEngine    
r_parser=ResumeEngine()    
r_parser.set_custom_keywords_folder("data")    
json=r_parser.process_resume(file)    
print(json)
Package: pyretailscience
PyRetailScience⚡ Democratizing retail data analytics for all retailers ⚡🤔 What is PyRetailScience?pyretailscience is a Python package designed for performing analytics on retail data. Additionally, the package includes functionality for generating test data to facilitate testing and development.InstallationTo install pyretailscience, use the following pip command:pipinstallpyretailscienceQuick StartGenerating Simulated DataThepyretailsciencepackage provides a command-line interface for generating simulated transaction data.Usagepyretailscience--config_file=<config_file_path>[--verbose=<True|False>][--seed=<seed_number>][output]Options and Arguments--config_file=<config_file_path>: The path to the configuration file for the simulation. This is a required argument.--verbose=<True|False>: Optional. Set toTrueto see debug messages. Default isFalse.--seed=<seed_number>: Optional. Seed for the random number generator used in the simulation. If not provided, a random seed will be used.[output]: Optional. The path where the generated transactions will be saved in parquet format. If not provided, the transactions will be saved in the current directory.Examples# Get the default transaction config filewgethttps://raw.githubusercontent.com/Data-Simply/pyretailscience/0.1.1/data/default_data_config.yaml# Generate the data filepyretailscience--config_file=default_data_config.yaml--seed=123transactions.parquetThis command will generate a file namedtransactions.parquetwith the simulated transaction data, using the configuration file at default data configuration file, and a seed of123for the random number generator.ContributingWe welcome contributions from the community to enhance and improve pyretailscience. To contribute, please follow these steps:Fork the repository.Create a new branch for your feature or bug fix.Make your changes and commit them with clear messages.Push your changes to your fork.Open a pull request to the main repository'smainbranch.Please make sure to follow the existing coding style and provide unit tests for new features.ContributorsMade withcontrib.rocks.LicenseThis project is licensed under the Elastic License 2.0 - see theLICENSEfile for details.
Package: pyretis
PyRETISPyRETIS is a library forrare event simulationswith emphasis on methods based on transition interface sampling
replica exchange transition interface sampling.PyRETIS is open source (see the COPYING file)
and can be interfaced with other simulation packages such as GROMACS or
CP2K.The documentation is located athttp://www.pyretis.orgor it can
found in the docs directory of the source code.
Package: pyretries
PyRetriesA retry library for Python. This library allows:Creating custom strategiesApplying hooks before and after executing function (useful for custom logging)Applying hook to when function raised an error (useful for incriminating metrics)Applying multiple retry strategiesFully typedSeedocumentationfor more information.InstallingThe package is available throughPypi. You can install usingpipor any of your favorite package manager:pipinstallpyretriesOr usingpoetrypoetryaddpyretries
Package: pyretroprint
PyRetroPrintWelcome to PyRetroPrint, your one-stop shop for Reagan-era hardcopy!IntroductionRetro-printing emulation in python!This utility is designed be used in a printing pipeline from obsolete
software.  Anything that is equipped to print to an Epson FX-80 IBM
Proprinter, or HP Laserjet I or II can now use your modern CUPS-supported
printer, or simply output PDF documents.For applications that support Atari 825, FX-80 and Compatibles, you can:Render PRN files or streams to PDFPrint formatted text to the terminalSend PDF output to networked printersBe used as a pipe forAtariSIO'satariserverPrint directly from Atari 800XL to e.g. CUPS-compatible printersInstallationPyRetroPrint can be installed usingpip:pipinstallpyretroprintFor development versions (recommended):python3-mvenvprptestcdprptest.bin/activatepipinstallcairopipinstall-ihttps://test.pypi.org/simple/pyretroprintHow to UseOnce the software is installed, simply pipe output of your prints to the
main script:|pyretroprint-ppdf-o/tmp/myretroprint.pdf--inputor-i, specifies the source PRN file (defaults tostdin).--sizeor-s, sets A4 or Letter sizes, defaults to A4.--printeror-Pwill tell PyRetroPrint which printer type to emulate.--presenteror-pdetermines which output type to use:pdforterminalwhich prints formatted text to the terminal (default).--outputor-o, specifies the destination file (defaults todefault.pdffor PDF, orstdoutfor terminal).PhilosophyWe think you should be able boot your Atari 800 XL, startAtariWriter+and type in your document, hit print, and walk over
to your networked laser printer and pick up your beautiful, monospaced
hard-copy.The same goes for your old term paper, your 80s diary, or anything else you
might have on a computer or piece of software specced out before 1990.
Package: pyRETS
======pyRETS======pyRETS is a Pure Python library for accessing RETS Servers to downloadReal Estate Listings.libRETS is a great library but takes to long to setup and manage when you run acluster of import workers and it has a tendancy to require newer versions ofpackages than are available from RHEL6 without compiling the required packagesfrom source. And so pyRETS is born from pure python so we can `pip` and `puppet`our rets library without fear of having to break packages on our servers.This library is still under development.Recusing Metadata Example:pyrets = pyRETS('serverurl', 'username', 'password')if (pyrets.Login()):for resource in pyrets.GetMetadata().GetMetadataAsObject().Resource:print "Found Resource:", resource.ResourceIDif "Class" in resource:for a in resource.Class:print "- Found Class:", a.ClassNameif "Field" in a:for b in a.Field:print "  - Found Field:", b.SystemNameif "Object" in resource:for c in resource.Object:print "  - Found Object:", c.ObjectTypeif "LookupType" in resource:for d in resource.LookupType:print "    - Found LookupType:", d.LookupNameif "Lookup" in d:for e in d.Lookup:print "      - Found LookupValue:", e.ShortValue,",", e.LongValue
Package: pyreunion
A Disjoint-Set data structure (aka Union-Find w/ Rank)What is Union-Find?Suppose you have a collectionSof elementse1,e2,...,en, and wish to group them into different collections using operations:"puteiandejinto the same group" (union),"give me a representative of the groupeibelongs to" (find).Then a Union-Find data structure helps to store the underlying groups very efficiently and implements this API.Note: The variant implemented uses Path Compression to further improve the performance.(Some) ApplicationsDetect Cycles in Graph: Given a graphG, we can put the endpoints of edges into the same group (same connected component) unless there is a pair of endpoints(ei, ej)that share a group representative. If that happens, there was already a path existing between them, and adding this edge will add multiple paths, which cannot be the case for acyclic graphs.Number of connected components in Graph: Given a graphG, put the endpoints of edges into the same group (same connected component). Once all nodes are exhausted, the number of groups formed is the number of connected components inG.Someinteresting lecture notesregarding Union-Find.UsageSetupUsing any of the package installers, installpyreunionfrom the PyPi.For example,pip install pyreunion.APIExample 1Task: Create a UnionFind data structure of arbitrary size that containsusizeat its elements.
Then, union a few elements and capture the state of the data structure after that.Solution:importpyreuniondefmain():# Create an empty UnionFind data structure.uf=pyreunion.UnionFind()print("Initial state:",uf.str())print("All elements form their own group (singletons).")print(uf.subsets())uf.union(2,1)print("After combining the groups that contains 2 and 1:",uf.str())uf.union(4,3)print("After combining the groups that contains 4 and 3:",uf.str())uf.union(6,5)print("After combining the groups that contains 6 and 5:",uf.str())hs1={1,2}hs2={3,4}hs3={5,6}subsets=uf.subsets()assert(len(subsets)==3)assert(hs1insubsets)assert(hs2insubsets)assert(hs3insubsets)uf.union(1,5)print("After combining the groups that contains 1 and 5",uf.str())subsets=uf.subsets()assert(len(subsets)==2)forxinhs1:hs3.add(x)assert(hs3insubsets)assert(hs2insubsets)# It is possible to iterate over the subsets.forpartitioninuf.subsets():print(partition)if__name__=='__main__':main()PerformanceThe underlying implementation uses Path Compression and is written in Rust.
The implementation and some performance statistics are availablehere.
Package: pyrevdns
PYrevDNSPYrevDNS is a simple tool for performing reverse DNS lookups on IP addresses. It can be used to perform a single lookup
or to perform lookups on a list of IP addresses.Installation Through PIPTo install dependencies, use the following command:pip3install-rrequirements.txtTo import certify as module, install it using the following command:pip3installpyrevdnsInstallation with DockerThis tool can also be used withDocker. To set up the Docker environment, follow these steps (trying using with sudo, if you get any error):dockerbuild-tpyrevdns:latest.ORPull directly fromDocker Hub:dockerpullshivamsaraswat/pyrevdns:latestUsing the PYrevDNS as command-line toolTo run the PYrevDNS on an IP address, provide the IP address with the -ip flag:python3pyrevdns-ip216.58.196.110For an overview of all commands use the following command:python3pyrevdns-hThe output shown below are the latest supported commands.usage:pyrevdns[-h][-v][-ipIP][-lLIST][-d][-tTHREADS][-rRESOLVER][-oOUTPUT][-silent]PYrevDNS(ReverseDNSlookuptool)options:-h,--helpshowthishelpmessageandexit-v,--versionshowprogram'sversionnumberandexitINPUT:-ipIPInputIPaddress-lLIST,--listLISTInputlistofIPaddresses-d,--domainOutputonlydomains

CONFIGURATION:-tTHREADS,--threadsTHREADSNumberofthreadstouse-rRESOLVER,--resolverRESOLVERIPoftheDNSresolvertouseforlookups(default:8.8.8.8)OUTPUT:-oOUTPUT,--outputOUTPUTOutputfile-silentdisplaysilentoutput

Example:python3pyrevdns-ip216.58.196.110ExamplesExample 1:Reverse DNS on the IP address 216.58.196.110 with the help of 1.1.1.1 DNS Resolver.>python3pyrevdns-ip216.58.196.110-r1.1.1.1

██████╗██╗██╗██████╗███████╗██╗██╗██████╗███╗██╗███████╗
██╔══██╗╚██╗██╔╝██╔══██╗██╔════╝██║██║██╔══██╗████╗██║██╔════╝
██████╔╝╚████╔╝██████╔╝█████╗██║██║██║██║██╔██╗██║███████╗
██╔═══╝╚██╔╝██╔══██╗██╔══╝╚██╗██╔╝██║██║██║╚██╗██║╚════██║
██║██║██║██║███████╗╚████╔╝██████╔╝██║╚████║███████║
╚═╝╚═╝╚═╝╚═╝╚══════╝╚═══╝╚═════╝╚═╝╚═══╝╚══════╝CodedwithLovebyShivamSaraswat(@cybersapien)# 216.58.196.110  maa03s19-in-f110.1e100.netExample 2:Reverse DNS on the list of IP addresses with the help of 1.1.1.1 DNS Resolver.>python3pyrevdns--listtest.txt-r1.1.1.1

██████╗██╗██╗██████╗███████╗██╗██╗██████╗███╗██╗███████╗
██╔══██╗╚██╗██╔╝██╔══██╗██╔════╝██║██║██╔══██╗████╗██║██╔════╝
██████╔╝╚████╔╝██████╔╝█████╗██║██║██║██║██╔██╗██║███████╗
██╔═══╝╚██╔╝██╔══██╗██╔══╝╚██╗██╔╝██║██║██║╚██╗██║╚════██║
██║██║██║██║███████╗╚████╔╝██████╔╝██║╚████║███████║
╚═╝╚═╝╚═╝╚═╝╚══════╝╚═══╝╚═════╝╚═╝╚═══╝╚══════╝CodedwithLovebyShivamSaraswat(@cybersapien)# 216.58.196.110  maa03s19-in-f110.1e100.net# 173.0.84.203    m.paypal.com# 185.199.109.153 cdn-185-199-109-153.github.comUsing the PYrevDNS as moduleExamplesExample 1importpyrevdns

print(pyrevdns.Pyrevdns.lookup('216.58.196.110',only_domain=True))# maa03s19-in-f110.1e100.netExample 2importpyrevdns

print(pyrevdns.Pyrevdns.lookup('216.58.196.110',resolver_ip='1.1.1.1'))# 216.58.196.110  maa03s19-in-f110.1e100.netUsing the Docker ContainerA typical run through Docker would look as follows:dockerrun-it--rmpyrevdns-ip216.58.196.110