Saravanan666/pypi-org huggingface dataset:
Package: py-google-shopping
Python client for Google Content API for Shopping v2.1Installationpipinstallpy-google-shoppingFeaturesHandles OAuth2 sanely through ENV variablesHandles pagination with iteratorsPads and adds checksum to GTIN of products automaticallyWorks well with Django and other frameworksUsageBasicexportGOOGLE_SHOPPING_CLIENT_ID=my_client_idexportGOOGLE_SHOPPING_CLIENT_SECRET=my_client_secretexportGOOGLE_SHOPPING_REFRESH_TOKEN=my_refresh_tokenfromgoogle_shoppingimportMerchantmerchant_id='536476575676'merchant=Merchant(merchant_id,country_code='UK')# Get product resourceproduct_resource=merchant.products.get(1234)# Get all productsproducts=list(merchant.products.list())# Iterate through products (generator)forproductinmerchant.products.list():printproduct.title# Delete product resourceproduct=Product.objects.order_by('?').first()merchant.products.delete(product.id)LicenseLicense stuff ishere.SupportThis version is a backport of the previous version byNamNgo. We’ll continue to support it! 😉
Package: pygooglevoice
Joe McCall & Justin QuickExposing the Google Voice “API” to the Python languageGoogle Voice for Python Allows you to place calls, send sms, download voicemail, and check the various folders of your Google Voice Accounts.
You can use the Python API or command line script to schedule calls, check for new recieved calls/sms, or even sync your recorded voicemails/calls.
Works for Python 2 and Python 3Full documentation is available up athttp://sphinxdoc.github.com/pygooglevoice/
Package: pygoogling
Using google search engine from pythonTested python versionpython 2.7.6python 3.4.3Installation$pipinstallpygooglingUsageFor now, this library only contain one class,GoogleSearch. Here is a short description to use this library.frompygoogling.googlingimportGoogleSearchgoogle_search=GoogleSearch('python')google_search.start_search(max_page=3)print(google_search.search_result)# will print the url as list of stringgoogle_search.more_page(4)# to search 4 extra pagesprint(google_search.search_result)# the result will be added to current resultThe keyword is the only requirement to initiate this class. Themax_pageparameter is used to determine how many google web page result you want to parse. By default,max_pagewill be one. TheGoogleSearch.more_page()is a method used to do extra search. The only required parameter is how many more pages you want to get the result of google search.
Package: pygopac
pygopacA simple library for working with pac files.Examplesimportgopacpath=gopac.download_pac_file('https://host.com/proxy.pac')proxy=gopac.find_proxy(path,'https://www.some-site.com')You can find other usage examples in the "examples" folder.Build wheelRequirements:pythongolang >= 1.20 (The path to the executable filegoshould be in the PATH environment variable.
If thego versioncommand is executed without errors, then everything is correctly configured.)access to the internetBuild dist using standard tools:make build-dist
Package: pygopher-interfaces
Go-style interfaces for PythonInterfaces in the Go programming language are a bit different than those found in Java or C++, as they
areimplicit.  This means that there is no explicit “implements” relationship
between the interface definition and an implementation of the defined interface.  A type implements an interface by
implementing all of the methods defined.  When we wish to define an interface in Python, we typically use abstract
base classes to define them because we can enforce implementation of methods.  This requires us to use inheritance,
which couples the interface and the implementation.This package emulates Go-style interfaces by creating anInterfacemetaclass that can be used to construct Python
classes that overrideissubclassto test whether a class implements the methods of the interface class, rather than
whether it inherits from the interface class.This is a tiny package that emulates on of my favorite features of Go.Installationpip install pygopher-interfaces#or:#pipenvinstallpygopher-interfaces#poetryaddpygopher-interfacesUsageTo create an interface class, use theInterfacemetaclass.frompygopher.interfacesimportInterfaceclassRepositoryInterface(metaclass=Interface):defget(account_id:int)->Account:raiseNotImplementedErrordefadd(account:Account):raiseNotImplementedErrorclassMysqlRepository:defget(account_id:int)->Account:...defadd(account:Account):...>>>issubclass(MysqlRepository,RepositoryInterface)True
Package: pygora-phchcc
pygoraA web crawler library that fetches and parses data fromBC Agora Portal.Getting started (Python 3):pip install pygora-phchccExampleslog in agora, download and print links to all subject pagesfrompygoraimport*session,gen_time=get_session("myAgoraUsername","myAgoraPassword",check_valid=True)# if gen_time == 0, we know something goes wrong (maybe you did not input the correct credential)print(gen_time)subjects=download_subjects(session,simple=True)# simple: each subject is a stringfori,lineinenumerate(subjects):print(i,line)# subjects = download_subjects(session) #eacg subject is a dict, with more informationcache the username and password so that you don't have to write them explicitly in a scriptfrompygoraimport*# to set credential, run it once so that username & password are stored locallyset_credential("myAgoraUsername","myAgoraPassword")# to clear out credentialset_credential("","")example ofparse_subject_page: print out all biology courses (school and subject codes can be found insubject.txt), provided that if you have runset_credentialfrompygoraimport*session,gen_time=get_session(*get_credential(),check_valid=True)# if you are confident that your username & password are correct, do# session, gen_time = get_session(*get_credential())url=SUBJECT_URL.format('2MCAS','2BIOL')# get you a url stringresp=session.get(url)# use your session to HTTP get the urlcourses=parse_subject_page(resp)# parse the subject pageforcourseincourses:print(course)example ofparse_course_page: print all information on a course page (the course code can be found in the output ofparse_subject_page)frompygoraimport*session,gen_time=get_session(*get_credential())url=COURSE_URL.format('ACCT102101')# a dummy dict in this example, could be your data fetched from databaseinfo_dict=dict()resp=session.get(url)parse_course_page(resp,info_dict)# update the dictforkey,valueininfo_dict.items():print(key,value)Related Projectsthe backend ofEagleVisionthe backend ofNew PEPS (planning)Join Dev Team / Contact Us:open an issue on Github to announce the feature/bug that you want to work onor through email: (Haochen) phchcc_at_gmail_dot_comor search our names in BC directorySpecial ThanksSpecial thanks to people who made EagleVision (this project's prototype) and pygora alive (names are listed in alphabetical order):Baichuan (Patrick) Guo-- the original "Honest Team"David Shen-- the EagleVision Dev TeamEstevan Feliz-- the original "Honest Team" & the EagleVision Dev TeamRoger Wang-- the EagleVision Dev TeamYuning (Tommy) Yang-- the original "Honest Team"Yuxuan (Jacky) Jin-- the EagleVision Dev Team
Package: pygore
pyGoRE - Python library for analyzing Go binariesHow to useUsepip install pygoreto download and install the library.Import it into your project.Write a new cool tool.Sample codeimportpygoretestfile='/path/to/go/binary/file'f=pygore.GoFile(testfile)c=f.get_compiler_version()print('Compiler:{}\nTimestamp:{}\nSHA{}\n'.format(c.name,c.timestamp,c.sha))pkgs=f.get_packages()types=f.get_types()f.close()forpinpkgs:print('Package:{}'.format(p.name))print("Functions:")forfinp.functions:print('{}from{}to{}'.format(f.name,hex(f.offset),hex(f.end)))print("Methods:")forminp.methods:print('{}{}from{}to{}'.format(m.receiver,m.name,hex(m.offset),hex(m.end)))print("Types:")fortintypes:print('Package path:{}| Type name:{}'.format(t.packagePath,t.name))
Package: pygorithm
Pygorithm=========.. image:: https://readthedocs.org/projects/pygorithm/badge/?version=latest:target: http://pygorithm.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://img.shields.io/badge/Python-3.6-brightgreen.svg:target: https://github.com/OmkarPathak/pygorithm:alt: Python 3.6| A Python module to learn all the major algorithms on the go!| Purely for educational purposesFeatures~~~~~~~~* Super easy to use* A very easy to understand `Documentation <http://pygorithm.readthedocs.io/en/latest/>`_* Get the code right in your editor* Get time complexities on the goInstallation~~~~~~~~~~~~* Just fire the following command in your terminal:::pip3 install pygorithm- | It's that easy. If you are using Python 2.7 use pip instead. Depending on your| permissions, you might need to use ``pip install --user pygorithm`` to install.* Or you can download the source code from `here <https://github.com/OmkarPathak/pygorithm>`_, and then just install the package using::python setup.py installQuick Start Guide~~~~~~~~~~~~~~~~~* To sort your list.. code:: python>>> from pygorithm.sorting import bubble_sort>>> my_list = [12, 4, 3, 5, 13, 1, 17, 19, 15]>>> sorted_list = bubble_sort.sort(my_list)>>> print(sorted_list)>>> [1, 3, 4, 5, 12, 13, 15, 17, 19]* To get the code for function used.. code:: python>>> from pygorithm.sorting import bubble_sort>>> code = bubble_sort.get_code()>>> print(code)* To get the time complexity of an algorithm.. code:: python>>> from pygorithm.sorting import bubble_sort>>> time_complexity = bubble_sort.time_complexities()>>> print(time_complexity)* To see all the available functions in a module, you can just type ``help()`` with the module name as argument. For example,.. code:: python>>> from pygorithm import sorting>>> help(sorting)Help on package pygorithm.sorting in pygorithm:NAMEpygorithm.sorting - Collection of sorting methodsPACKAGE CONTENTSbubble_sortbucket_sortcounting_sortheap_sortinsertion_sortmerge_sortmodulesquick_sortselection_sortshell_sortTests~~~~~* Just type in the following command to run the tests::python3 -m unittest* This will run all the tests defined in the files of the ``tests/`` directoryDonation~~~~~~~~If you have found my softwares to be of any use to you, do consider helping me pay my internet bills. This would encourage me to create many such softwares :)- `PayPal <https://paypal.me/omkarpathak27>`_- `₹ (INR) <https://www.instamojo.com/@omkarpathak/>`_
Package: pygorpho
pygorphoPython bindings forgorpho.This is a Python library for fast 3D mathematical morphology using CUDA. Currently, the library provides:Dilation and erosion for grayscale 3D images.Support for flat or grayscale structuring elements.A van Herk/Gil-Werman implementation for fast dilation/erosion with flat line segments in 3D.Automatic block processing for 3D images which can't fit in GPU memory.Documentationcan be found onhttps://pygorpho.readthedocs.ioInstallationFirst, make sure you haveCUDA Toolkit9.2 or later installed. Then, install with pip:pip install pygorphoInstalling from sourceAgain, make sure you haveCUDA Toolkit9.2 or later installed. Also, you need a compatible C++ compiler, which supports C++14. Then, following these instructions should allow you to build and install the package:Clone the repo:git clone https://github.com/patmjen/pygorpho.gitChange directory:cd pygorphoInstall the required Python packages:pip install numpy scikit-build cmake ninjaBuild and install:python setup.py installThat should be it! To test, runpython, and try toimport pygorpho as pg.
Package: pygoss
goss- General ODE System Solvergossis python wrapper around a C++ library for solving ordinary differential equations with a variety of different schemes.Documentation is hosted athttps://computationalphysiology.github.io/gossSource code is found athttps://github.com/ComputationalPhysiology/gossMotivationThe general idea is that you define your ODE in agotran ode fileand hand the ode over togoss.First define the ode in a gotran ODE file# lorentz.ode
parameters(
sigma=10.0,
rho=28.0,
beta=8/3
)

# The values of the states represent the initial conditions
states(
x=0.0,
y=1.0,
z=1.05
)

dx_dt = sigma * (y - x)
dy_dt = x * (rho - z) - y
dz_dt = x * y - beta * zYou can now solve the ode as followsimportnumpyasnpimportmatplotlib.pyplotaspltfromgotranimportload_odeimportgoss# Import the ode in gotranlorentz=load_ode("lorentz.ode")# Jit compile the code for the right hand sideode=goss.ParameterizedODE(lorentz)# Select a solver and instantiate the solversolver=goss.solvers.RKF32(ode)# Select the time steps you want to solve fort=np.linspace(0,100,10001)# Solve the systemu=solver.solve(t)# Plot the solutionfig=plt.figure()ax=fig.add_subplot(projection="3d")ax.plot(u[:,0],u[:,1],u[:,2],lw=0.5)ax.set_xlabel("X Axis")ax.set_ylabel("Y Axis")ax.set_zlabel("Z Axis")ax.set_title("Lorenz Attractor")plt.show()For more examples, check out thedemo folderThere is also a command line interface that can be used to list the available solvers, run the solver and generate the goss codeInstallYou can install goss with pippython -m pip install pygossSeeinstallation instructionsfor more optionsKnown issuesThere is currently an issue on Apple Silicon with exceptions raised from by the jit compiled code which means theone testis not passing. An issue has been filed for thishereContributingContributions are very welcomed. To contribute please fork the repo, create a branch a submit a pull request. Before the pull request can be accepted it has to pass the test suit for the python and C++ code. Also note that we try to enforce an consistent coding style. To ensure that you follow the coding style you can install the pre-commit hook in the repopython -m pip install pre-commit
pre-commit installFor every future commit, you will now run a set of tests that will make sure that you follow the coding style.See thecontributing sectionfor more info.Licensegossis licensed under the GNU LGPL, version 3 or (at your option) any later version.
Package: pygossip
Python GOSSiP library and server.
As SPF is implemented, spammers will also adopt SPF.  With forging
under control, the next step is to track the reputation of domains.
GOSSiP tracks the ratio of spam to ham for the last 1000 messages from
each domain, and computes a reputation score from that that ranges
from -100 to +100.  It also computes a confidence score that increases
from 0 to 100 with the number and freshness of the observations.
It can also check with peers, and combine scores.  Observations are
provided by a spam filter or user feedback.  Pygossip is supported
by pymilter.Seehttp://gossip-project.sourceforge.net/http://pymilter.sourceforge.net/
Package: py-go-template
Go-templateBased onhttps://github.com/harsh-98/go-template!!! Donot workin Linux AlpineOverviewPython bindings for go text/template withsprigandhelmfilefunctionsQuickstartBuild from sourcesgo_templatetested by Python 3.8+.# install go
make libExampleContent of sample.tmpl{{.Count}} items are made of {{.Material}}Render template from dict values>>> import go_template
>>> from pathlib import Path
>>> values = {"Count": 12, "Material": "Wool"}
>>> go_template.render(Path('tests/sample.tmpl'), values)
b'12 items are made of Wool'Content of values.ymlCount: 12
Material: WoolRender template from values.yml file>>> import go_template
>>> from pathlib import Path
>>> go_template.render_from_values_file(Path('tests/sample.tmpl'), Path('tests/values.yml'))
b'12 items are made of Wool'NOTE: Paths provided to render_template should either be absolute path or relative to directory where it is ran.Build shared libraryFor building a fresh shared object of text/template, you must have golang^1.5 installed.make libThis will createtemplate.soin thebindfolder.MotivationCurrently, there is no python package which exposes golangtext/templatefunctionality to python. And I am in the process of learning about interoperability between different languages. So, I started working on this as a learning project.ExplanationGolang library cannot be directly used in python. Firstly, we have to compile it as shared object or archive for interoperability with C. And then create python bindings for this C object.CPythonis the original Python implementation and provides cpython API for creating python wrapper, but the wrapping code is in C. There is a librarygopywhich exactly uses this approach. But it works only on go1.5 and for python2.If we want to write the wrapping code in python, there areCythonandctypes. Ctypes allow directly importing the C library and calling functions through its interface. This project usesctypesfor calling go functions.When a golang library is compiled as shared object,cgohandles exposing functions and data type conversion. Using ctypes, we can only modify simple data type, string, int, float, bool. I tried converting python class to golang struct, but it failed.So, I created a golang wrapper over text/template library, which takes simple datatypes. And handles complex operation in this layer. Then a python wrapper over this layer usingctypes.It is far from complete and doesn't use the best approach. Currently, it has only one function which takes path of template and value file. And depending on the third argument, either writes to stdout if empty  or to file if given its path.LicenseThis project is licensed underMITLicense.
Package: pygoto
PygotoUse goto in PythonInstallationFrom PyPIpip3installpygotoFrom GitHubpip3installgit+https://github.com/donno2048/pygotoUsage / Examplesfromgotoimportgotoflag=Falseflag=notflagprint(0)ifflag:goto(3)print(1)001fromgotoimportgotosum=0foriinrange(10):sum+=iifi==5:goto(7)print(sum)15fromgotoimportgotodefzero():1/0goto(5)zero()print("Done!")Done!fromgotoimportgotodefzero():1/0goto(4)zero()print("Done!")Traceback(mostrecentcalllast):File"main.py",line4,in<module>zero()File"main.py",line2,inzerodefzero():1/0ZeroDivisionError:divisionbyzerofromgotoimportgotodefzero():1/0goto(3)zero()print("Done!")Youhavepassedtherecursionlimit,pleasecheckyourgoto
Package: pygount
pygountPygount is a command line tool to scan folders for source code files and
count the number of source code lines in it. It is similar to tools likesloccountandclocbut uses thepygmentspackage to analyze the source code and consequently can analyze anyprogramming language supported by pygments.The name is a combination of pygments and count.Pygount is open source and distributed under theBSD license. The source
code is available fromhttps://github.com/roskakori/pygount.QuickstartFor installation run$pipinstallpygountTo get a list of line counts for a projects stored in a certain folder run for
example:$pygount~/projects/exampleTo limit the analysis to certain file types identified by their suffix:$pygount--suffix=cfg,py,yml~/projects/exampleTo get a summary of each programming language with sum counts and percentage:$pygount--format=summary~/projects/exampleTo analyze a remote git repository directly without having to clone it first:$pygount--format=summaryhttps://github.com/roskakori/pygount.gitYou can pass a specific revision at the end of the remote URL:$pygount--format=summaryhttps://github.com/roskakori/pygount.git/v1.5.1This example results in the following summary output:┏━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━┓
┃ Language         ┃ Files ┃     % ┃ Code ┃    % ┃ Comment ┃    % ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━┩
│ Python           │    18 │  47.4 │ 2132 │ 63.6 │     418 │ 12.5 │
│ TOML             │     2 │   5.3 │ 1204 │ 82.7 │       1 │  0.1 │
│ reStructuredText │     9 │  23.7 │  566 │ 64.8 │       1 │  0.1 │
│ Markdown         │     3 │   7.9 │   53 │ 49.1 │       0 │  0.0 │
│ Batchfile        │     1 │   2.6 │   24 │ 68.6 │       1 │  2.9 │
│ Text only        │     2 │   5.3 │   24 │ 82.8 │       0 │  0.0 │
│ Bash             │     2 │   5.3 │   12 │ 80.0 │       3 │ 20.0 │
│ Makefile         │     1 │   2.6 │    9 │ 45.0 │       7 │ 35.0 │
├──────────────────┼───────┼───────┼──────┼──────┼─────────┼──────┤
│ Sum              │    38 │ 100.0 │ 4024 │ 68.4 │     431 │  7.3 │
└──────────────────┴───────┴───────┴──────┴──────┴─────────┴──────┘Plenty of tools can post process SLOC information, for example theSLOCCount plug-infor theJenkinscontinuous integration server.A popular format for such tools is the XML format used by cloc, which pygount
also supports and can store in an output file:$pygount--format=cloc-xml--out=cloc.xml~/projects/exampleTo get a short description of all available command line options use:$pygount--helpFor more information and examples read the documentation chapter onUsage.ContributionsTo report bugs, visit theissue tracker.In case you want to play with the source code or contribute improvements, seeCONTRIBUTING.Version historySeeCHANGES.
Package: pygouv
pygouvpygouvis anon officialPython API wrapper fordata.gouv.fr, the French Official Open Data Portal.InstallationYou can installpygouvwith:pip install pygouvUsageimportpygouvasgvgv.home( ) and gv.home_compact()Displays the datasets that are currently exhibited within the home page of the data.gouv.fr portal.gv.home()returns all the columns that are provided by the data.gouv API and can be overwhelming. In this context, there is thegv.home_compact()that as its name implies much more compact and contains only the most important columns:id, title, last_updategv.site_metrics( )Provides global metrics related to the data.gouv.fr portal:gv.search( ) and gv.search_compact()Searches for specific data sets through the data.gouv API according to the pattern provided into thequeryparameter. It takes three argumentsquery,pageandpage_size:gv.search(query='cafÃ©s Ã  paris',page=0,# look at page 0 (the default)page_size=20)# pull 20 resultsgv.search()returns all the columns provided by the API.gv.search_compact()returns only three columns:id, description, last_updategv.explain( )Provides inFrencha detailed description of a data set. It takes one mandatory argument which is thedataset_idthat you can get from output of thesearch()function.print(gv.explain('5f9b902d3784843c84d5f959'))**Ce jeu de donnÃ©es recense les dÃ©clarations de terrasse Ã©phÃ©mÃ¨re.**

La Ville de Paris a pris la dÃ©cision d'autoriser l'extension gratuite des terrasses pour les cafÃ©s, bars et restaurants.

Habituellement soumises Ã  une autorisation, les extensions provisoires sont exceptionnellement enregistrÃ©es Ã  titre gratuit, et sont valables jusqu'en juin 2021.

La dÃ©claration est effectuÃ©e via un tÃ©lÃ©service sur Paris.fr. Chaque commerÃ§ant doit signer et afficher une charte d'engagement.

[Plus d'informations: sur Paris.fr](https://www.paris.fr/pages/reouverture-des-bars-et-restaurants-agrandir-ou-creer-sa-terrasse-7847)

Description des donnÃ©es :

Â· \- Reference DÃ©claration (NumÃ©ro de la dÃ©claration)

Â· \- Nom Commerce

Â· \- Adresse Commerce et coordonnÃ©es gÃ©ographiques (X ; Y)gv.resources( ) and gv.resources_compact():gv.resources()lists all the available resources within a specific data set.gv.resources_compact()is its equivalent except that it returns only two columns:format, urlgv.resources('5f9b902d3784843c84d5f959')suggest_territory( )Returns suggested territory pages according to the query provided by the user:gv.suggest_territory(query='paris',result_size=10)Code of ConductPlease note that thepygouvproject is released with aContributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Package: pygov-br-mj
Pygov-br é uma lib que tem o objetivo de unificar as API’s de dados abertos
governamentais brasileiros. Atualmente, a pygov-br tem suporte para:Webservices da Câmara dos DeputadosInstalaçãopip install pygov-brUtilizaçãofrom pygov_br.camara_deputados import cd
cd.deputies.all()