Saravanan666/pypi-org huggingface dataset:
Package: python-pkg
NLTK por SEOEste proyecto utiliza NLTK para anÃ¡lisis de las palabras claves y las etiquetas.Para EmpezarLos instrucciones puede ayudarte obtener una copia del proyecto para su ordenador.Los requisitos indispensablesNecesita instalar estos antes de empieza:PythonAnacondaInstalar NLTKAbre el "Anaconda Prompt" (puede buscarlo por buscando "Anaconda" en el menÃº de Incio de Windows)Crea un virtual envconda create -n yourenvname python=x.x anacondaInstalar NLTK (anaconda es el canal)conda install -c anaconda nltkInstalar BeautifulSoup (anaconda es el canal)conda install -c anaconda beautifulsoup4Descargar El Proyecto en GitHubAhora, puede descargar el proyecto en GitHub y ejecutar el cÃ³digoEjecuciÃ³n del codÃ­goPuede ejecutar el "spider" usando el comando "python" en el sÃ­mbolo de la sistema:python todos.pyAsegurarte usar el sÃ­mbolo del sistema, activar tu virtualenv, y elegir el directorio de nivel superior del proyectoPor esto proyecto el directorio de nivel superior:EjecuciÃ³n del GUIPuede ejecutar el gui usando este comando en el sÃ­mbolo del sistema:python todouser.pyAsegurarte usar el sÃ­mbolo del sistema, activar tu virtualenv, y elegir el directorio de nivel superior del proyectoPor esto proyecto el directorio de nivel superior: guiAÃ±adir al corpusPara aÃ±adir al corpus, necesita crear un archivo txt en el directorio del corpus. Abre la aplicaciÃ³n "Bloc de notas" y escribe el corpus ahÃ­. Guardarle en la carpeta con el nombre del directorio ("LTcorpus")ReferenciassNLTK TextbookÂ¿Tienes preguntas? Enviarmelas aqui:noelle.rivera.516@gmail.com
Package: python-placebo
Placebo is a utility that help mock api endpoints in a reusable and composable way.To use placebo first we should create a placebo class for our mock. Placebo class represents a response for certain request. If url and http method of any request matches with mock, response that is described in placebo class will be return. We can create a placebo mock like this:from placebo import Placebo

class UsersResponse(Placebo):
    url = 'http://www.acme.com/api/v1/users/'
    body = json.dumps([{'name': 'Huseyin',
                        'last_name': 'Yilmaz'}])Main interface for a placebo object is a decorator. Any function that decorated with a placebo class will be mocked with that placebo class.@UserResponse.decorate
def users_api_test(self):
    ...You can decorate any function or method with this decorator. Even django views! This makes development against external apis very easy.@UserResponse.decorate
def users_list_view(request):
    ...If your code is using multiple api endpoints you can easily stack placebo decorators on top of each other.@AuthResponse.decorate
@UserResponse.decorate
def test_valid_get_user(request):
    ...

@AuthResponse.decorate(status=401)
@UserResponse.decorate
def test_cannot_authenticate(request):
    ...

@AuthResponse.decorate
@UserResponse.decorate(status=503)
def test_api_is_not_available(request):
    ...For more information, please refer todocumentation
Package: python-placeholder
Simple module for creating placeholder imagesinstall by$ pip install python-placeholderExample:fromplaceholderimportPlaceHolderImageimg=PlaceHolderImage(width=300,height=200,path='placeholder.png')img.save_image()Known bugs:if you do not provide absolute path to font to PlaceHolderImage the default font used will have very small size.if you get something like The _imagingft C module is not installed, look herehttps://stackoverflow.com/questions/4011705/python-the-imagingft-c-module-is-not-installedRun tests:You can run the testsuite with the following command:python -m unittest testsOr usetoxto test against all supported python versions.
Package: python-play
python-playpython-play is a python module that allows you to play
mp3 audio file.InstallationInstallation requirespygameInstall the module by runningpip install python-playUsageOpen python by runningpythen, type>>> from python_play.player import play_it
pygame 1.9.4
Hello from the pygame community, https://www.pygame.org/contribute.html
>>> play_it('/path/to/mp3/audio/file')
Press Ctrl+C to stopVoila!To-Do1. pause, play, rewind options
2. playlist support
3. support for playing other file formats
Package: python-plcloudclient
宝德云API SDK (http://console.plcloud.com)依赖python-keystoneclient >= 0.8.0提供的SDK有CDN (CDN服务)Ticket (工单服务)使用概述公共参数::API auth_url:http://api.plcloud.com:5001/v2.0username: 用户登录名password: 用户登录密码tenant_name: 用户登录名认证:>>> from plcloudclient.v1_0 import client
>>> username='demo'
>>> password='secreetword'
>>> tenant_name='demo'
>>> auth_url='http://api.plcloud.com:5001/v2.0'
>>> plcloud = client.Client(username=username, password=password,
...                         tenant_name=tenant_name, auth_url=auth_url)调用函数(如显示所有CDN域名):>>> from plcloudclient.v1_0 import client
>>> plcloud = client.Client(...)
>>> plcloud.cdn.list()
Package: python-plisio
Python-Plisio-SDKAboutPlisiois a payment gateway for accepting
payments in cryptocurrencies. Plisio enables your customers to pay with
15+ cryptocurrencies, including Bitcoin, Ethereum, Litecoin, Dash, etc.I'm in no way affiliated with Plisio and this is not an official SDK.InstallationInstall usingpipfromPyPI:pip install python-plisioInstall fromgitpip install git+https://github.com/amiwrpremium/python-plisio.gitUsageSeeexamplesfor more usage examples.DocumentationSeedocumentation.LicenseSeeLICENSE.DisclaimerThis is not an official SDK, and I am in no way affiliated with Plisio.
Package: python_plot_wrapper
# python_plot_wrappers
A wrapper for making polished multi-line plots with matplotlib.
I wrote this as an easy-to-access interface to make cleaner looking plot code, and not have to retype
pyplot syntax over and over. Allows for passing data in as nested dictionaries.
All lines are created using a single x-axis data set - essentially a setup to visualize parametric sweeps.See sample images by following links below:https://cloud.githubusercontent.com/assets/15716194/11058820/7b1098be-8763-11e5-91d6-53bd5d71437a.pnghttps://cloud.githubusercontent.com/assets/15716194/11058821/7b109788-8763-11e5-9c2c-ceb7db39b980.pngPre-requisites:
python + matplotlib, numpy, scipy, latex + texlive-fonts-extra, (and maybe texlive-full)Usage:plot_wrapper(plot_data, keys, labels, save_folder)Instructions:plot_data   :
Dictionary (level 1) that contains multiple  (level 2) dictionaries.
Each level 2 dictionary corresponds to a line in the figure(s), and must have the following key/value pairs:data[‘x’]      = x                 # list of x-axis values to be plotteddata[‘xlbl’]   = ‘X axis  label’   # string defining x-axis labeldata[‘lstyle’] = ‘-’               # line style. can be ‘–’, ‘-’, ‘-.’ or ‘:’. Recommend first 2data[‘mtype’]  = ‘s’               # Marker type for line. Recommend ‘s’,’o’,’^’ or ‘’ for nonedata[‘keyname’]= y                 # data to be plotted on the y axisdata[‘lcolor’] = ‘r’               # line color. Can be ‘r’, ‘b’, ‘k’, ‘m’,….keys        : list of data keys in the level-2 dictionaries that need to be plotted. If multiple level-2 dictionaries havedata under the same key name, these data sets are plotted on the same figure.labels      : y-axis labels (list of strings) that are applied to the y-axis label for each figure, corresponding to entries in the list “keys”. If keys and labels are of different lengths, the shorter list is used to generate figures since I used the zip function.save_folder : path where you want to save all images. Right now uses png format.Feel free to modify/add.
Package: pythonpm
Repositoryhttps://github.com/luisholanda/ppmFeaturesInitialize project foldersInstall project dependencies without a requirement fileRun scriptsStart your project scriptCommandsInitppm {init, i} [-h]Initialize a python module template and apyckage.jsonwith
some basic information that are asked tothe user.The module template is:┬ module_name
│     ├ __init__.py
│     └ __main__.py
└ entry_point.pyWheremodule_nameandentry_pointvalues are asked.Addppm {add, a} [-h] [-g] [--add] [<modules>]Install<modules>in a folder namedpython_modulesthat
will store allmodules that you install with ppm.If the flag--addis passed, the modules will be added to thedependenciesfield inpyckage.json.You can use the-gflag to install the packages globally.Removeppm {remove, rm} [-h] [-g] <modules>Removes a ppm installed package.Like theaddcommand, you can use the-gflag to remove
globally installed packages.Runppm run [-h] <script>Runs a script that must be specified inpyckage.json.Startppm {start, st} [-h]Same thing that theruncommand, but only runs thestartcommand.
Package: python-pm
pypm: A python-based process managerðŸ’» What is pypm?pypm is a simple, python-based process manager. You can launch and monitor processes and their resources, automatically detect changes and log outputs. It keeps running after you close the console, which is very useful when dealing with remote sessions (for example, throughssh).ðŸ“¥ How do I install it?You can install pypm via pip withpip install python-pmðŸ“– How do I use it?Basic useTo start a pypm instance, use the commandpython -m pypm init. For more info about this command, you can usepython -m pypm init --help. This starts a server on your local machine which can be interacted with through the other commands.
The next thing you're going to want to do is add a process to be monitored. You can usepython -m pypm add [name] [command]. An example would bepython -m pypm add server "python -m http.server 80", which would launch an HTTP server.
To list all current processes, usepython -m pypm list. To get the status of a specific process you can callpython -m pypm status [name], which will display a table like the one below.Killing processes is done using thekillinstruction. All other options are listed on the help menu. Stopping the pypm instance will kill all running processes. There is a simple visual interface available with the commandpython -m pypm monit.On Linux it might be useful to addalias pypm="python3 -m pypm"to your bash profile so the command syntax becomes simpler.
Package: python-pmap
# python-pmap[Clojure’s pmap](https://clojuredocs.org/clojure.core/pmap) implementation for Python.Multi-threaded versions of the following high-order functions are available:fn              | equivalent to————-   | ———————pmap.pmap|itertools.imappmap.pvalmap|toolz.dictoolz.valmappmap.pkeymap|toolz.dictoolz.keymapPackage also includespmap.Deferredandpmap.Futureclasses that may be generally useful.See includedtests/for usage examples.
Package: python-pmpm
Python manual package manager—a package manager written in Python for manually installing a compiled stack:maxdepth: 2
:numbered:
:hidden:

api/modules
CHANGELOGIntroductionPython manual package manager is a package manager written in Python for manually installing a compiled stack.
Before you proceed, you should know that for typical usage,conda(and its friendsmamba/micromamba) should be enough for the purpose.pmpmbuilt on top ofcondawhich also compile some Python packages locally.Goal:Custom compilation of some packages, possibly for optimization such as-marchand-mtunewhich is beyond whatcondaoffers.Provide fast re-compile after some small local changes, suitable for development.Approaches:conda_install: Both the conda provided stack and the compiled stack frompmpmare in the same prefix, this makes activating an environment seamless. It is achieved by cleanly compile an environment using the conda provided stack only, including compilers.system_install: The conda provided stack and the compiled stack frompmpmhas a different prefix. This makes the 2 completely separate, where the compiled stack can uses the host compilers. This is useful for example when the vendor provided MPI compilers are needed. This also has more points of failure, as we can't completely control what is in the host environment.pmpmonly serves as automation for reproducibility. But you probably need to modify howpmpmbehaves on different host, and you probably need to install packages from the OS package manager.Alternative approach:You can create a conda recipe and useconda-buildand tweak from there for customization. The only downside probably is the time it takes to re-compile after modifications.InstallationpipinstallpmpmDevelopmentgitclonehttps://github.com/ickc/python-pmpm.gitcdpython-pmpm
condaactivate
mambaenvcreate-fenvironment.yml
condaactivatepmpm
pipinstall-e.UsageUse one of the example config in this repository:pmpmconda_install"$HOME/pmpm-test"--fileexamples/....ymlDesignWhen installing from a YAML file such as those given in theexamples/directory,pmpmbehaves as a superset of conda/mamba with an extra_pmpmkey in the YAML configuration.pmpmwill compile packages available inpmpm.packagesafter the conda environment is created,
as defined in the YAML file.
Package: python-poco
python-poco provides classes that can be used to integrate your software with
the South African postal code lookup service athttp://poco.co.za.  Basic usage
is crazy simple:#!/usr/bin/env python

from poco.poco import PocoSearcher

results = PocoSearcher.results_as_dicts('Wingate Park')
objects = PocoSearcher.results_as_objects('Wingate Park')In the above example, ‘results’ is a list which contains dictionaries with the
following keys:id,suburb,area,postal,street.
Similarly, ‘objecst’ is a list which contains objects of thePocoLocationclass.  ThePocoLocationclass has the same keys mentioned above as class
attributes.  So basically, useresults_as_dictsorresults_as_objects,
depending on what your application needs.One important caveat:The following rules apply:The search term cannot be empty.The search term must contain at least 3 characters.An exception of typerequests.exceptions.HTTPErrorwill be raised if the above
requirements are not met.For reference, the Poco API documentation is available athttp://poco.co.za/api/.
Package: python-polar-coding
Python-polar-codingA package for Polar codes simulation.Installationpipinstallpython-polar-codingExampleHere is a simple example of simulation usingpython_polar_coding.Binary messages encoded with Polar code, modulated using BPSK, transmitted over
channel with AWGN and decoded usingFast SSCalgorithm.frompython_polar_coding.channelsimportSimpleBPSKModulationAWGNfrompython_polar_coding.polar_codesimportFastSSCPolarCodecfrompython_polar_coding.simulation.functionsimport(compute_fails,generate_binary_message,)N=128K=64design_snr=2.0messages=10000# SNR in [.0, .5, ..., 4.5, 5]snr_range=[i/2foriinrange(11)]codec=FastSSCPolarCodec(N=N,K=K,design_snr=design_snr)bpsk=SimpleBPSKModulationAWGN(fec_rate=K/N)result_ber=dict()result_fer=dict()forsnrinsnr_range:ber=0fer=0for_inrange(messages):msg=generate_binary_message(size=K)encoded=codec.encode(msg)transmitted=bpsk.transmit(message=encoded,snr_db=snr)decoded=codec.decode(transmitted)bit_errors,frame_error=compute_fails(msg,decoded)ber+=bit_errorsfer+=frame_errorresult_ber[snr]=berresult_fer[snr]=ferCurrent progressPolar code constructionArikan's Bhattacharyya boundsSection V.ADecodingSC DecodingSC LIST DecodingFast SSC DecodingRC SCAN DecodingGeneralized Fast SSC DecodingModulationBPSKTODOPolar code constructionArikan’s Monte-Carlo estimationSection V.BTrifonov’s Gaussian approximationSection V.DDecodingSC STACK DecodingFast SSC List DecodingGeneralized Fast SSC LIST DecodingCRC-aided decodersModulationQ-PSK4-QAMLicenseMIT License
Package: python-polly
python-pollypython-polly is a simple wrapper around AWS's text-to-speech service Polly.Features are:Cache requests to AWS Polly locallyTokenize input text into sentences or words in order to maximize usage of cachePlayback queue for audio outputClient-server setup to support concurrent output by multiple applicationsSetuppip install --user python-polly[server]Most of the dependencies are only required by the server so I put them in as an extra option.
To get the dependencies for the server usepython-polly[server]otherwise justpython-polly.UsageServerStart the server. Default port is 6000.polly serverClientCLIpolly say "hello world"Pythonimport polly.client
polly.client.say('hello world')Any other JSON-RPC client e.g. cURLcurl -d '{"id": "null", "jsonrpc": "2.0", "method": "say", "params": ["hello", "Joanna", "sentence", true]}' localhost:6000LinksPlaybackhttps://people.csail.mit.edu/hubert/pyaudio/docs/#example-callback-mode-audio-i-ohttps://github.com/spatialaudio/python-sounddevice/blob/master/examples/play_long_file.py
Package: python-polyglot
PolyglotFind the percentage of programming languages used in your project📖 Documentation·Report a Bug·Request Feature🙉 About The ProjectFind the percentage of programming languages used in your project⚡ Getting StartedIn order to get started, please installpip.📝 Prerequisitespipsudoapt-getinstallpython3-pipLearn more about piphere⬇️ InstallationInstall pip packages# install the python-polyglot package using pippip3installpython-polyglot🎉 UsageOnce Polyglot is all setup and good to go, implementing is easy as pie.🔰 Initial SetupYou can initialize Polyglot with the example below:frompolyglot.coreimportPolyglotdirname="path/to/directory"polyglot=Polyglot(dirname)polyglot.show(display=True)Read the complete polyglot documentationhereContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.Forkthe ProjectCreate your Feature Branch (git checkout -b feature)Commit your Changes (git commit -m 'Add some features')Push to the Branch (git push origin feature)Open a Pull Request📰 LicenseDistributed under the MIT license. SeeLICENSEfor more information.📞 ContactPranav Baburaj -pranavbaburaj@zohomail.com
Package: python-polymorphism
What this repository containsA simple utility library that allow you to use OOP Like Polymorphic Function in pythonInstallation:install the packagepip install python-polymorphismHow to useIn a Class modulefrompython_polymorphismimportPolypolymorphic=Poly()classPolyClass():@polymorphic.this()deftest_poly_fn(self,my_first_test_argument):return'my_first_test_argument'@polymorphic.this()deftest_poly_fn(self,my_second_test_argument):return'my_second_test_argument'print(PolyClass().test_poly_fn(my_first_test_argument=1))# => 'my_first_test_argument'print(PolyClass().test_poly_fn(my_second_test_argument=1))# => 'my_second_test_argument'ConstraintsIt works on python class only;The polymorphed function has to be called with kwargs;Default parameters do not help differentiate one function from another.
Package: python-pom
AnnotationPOM is Page-Object-Model microframework to develop web UI tests easy, quickly and with pleasure.ArchitecturePOM provides API to manipulate with web UI elements and pages in browser. Under hood it uses selenium.
Before to act with UI element POM waits for its visibility, because in user cases user can’t interact with UI element if it isn’t visible at display.
POM provides tree hirarchy to request UI elements with UI caching mechanism at each level.POM doesn’t useimplicit_waitmethod to wait UI element, because implicit_wait waits until element is present at DOM even if it isn’t visible. And also implicit_wait has conflict with caching mechanism, that leads to long requests in some cases.So POM has own implementation to wait element before interact. It leads to additinal webdriver request before interact with UI element, but provide reliable and simple architecture, without speed degradation.How to startLet imagine simple testcase:Go tohttps://facebook.comFill login / password fields with 'admin' / 'admin' valuesClick button loginAssert page to log in is openedAssert alert message is openedIts implementation with POM:importunittestimportpomfrompomimportuifromselenium.webdriver.common.byimportBy@ui.register_ui(field_login=ui.TextField(By.NAME,'email'),field_password=ui.TextField(By.NAME,'pass'))classFormLogin(ui.Form):"""Form to login."""@ui.register_ui(form_login=FormLogin(By.ID,'login_form'))classPageMain(pom.Page):"""Main page."""url='/'@ui.register_ui(alert_message=ui.Block(By.CSS_SELECTOR,'div.uiContextualLayerPositioner'))classPageLogin(pom.Page):"""Login page."""url='/login'@pom.register_pages([PageMain,PageLogin])classFacebook(pom.App):"""Facebook web application."""def__init__(self):super(Facebook,self).__init__('https://www.facebook.com','firefox')self.webdriver.maximize_window()self.webdriver.set_page_load_timeout(30)classTestCase(unittest.TestCase):defsetUp(self):self.fb=Facebook()self.addCleanup(self.fb.quit)deftest_facebook_invalid_login(self):"""User with invalid credentials can't login to facebook."""self.fb.page_main.open()withself.fb.page_main.form_loginasform:form.field_login.value='admin'form.field_password.value='admin'form.submit()assertself.fb.current_page==self.fb.page_loginassertself.fb.page_login.alert_message.is_presentTo launch example:Save example code in filetest_pom.pyInstall POM frameworkpip installpython-pomLaunch test examplepython-munittest test_pomFull example of usage is inhttps://github.com/sergeychipiga/horizon_autotests.Supported UI componentsIn progress…
Package: python-pong
python-pongpython-pong is a simple Python library for quickly setting up components and games of Pong in Pygame.Installationpython-pong can be installed from PyPI using pip. Simply run the commandpython -m pip install python-pongglobally, or in your virtual Python project environment, wherepythonis your current Python distribution.UsageThe contents of the python-pong libraries packages is shown in the following:pong.componentsBall.py
    class Ball(screen: pygame.Surface, radius: float)
        def get_x()
        def set_x(x: int)
        def get_y()
        def set_y(y: int)
        def get_radius()
        def get_velocity()
        def set_velocity(velocity: pygame.Vector2)
        def update()
        
Controller.py
    class Controller(screen: pygame.Surface, rectangle: pygame.Rect)
        def get_x()
        def get_y()
        def get_width()
        def get_height()
        def get_velocity()
        def set_velocity(velocity: pygame.Vector2)
        def update()
        
Text.py 
    class Text(screen: pygame.Surface, coordinates: tuple[float, float]))
        def get_text()
        def set_text(x: int)
        def update()pong.gameBasic.py
    class Basic(
        controller_width=1/20,
        controller_height=2/3,
        player_velocity=None,
        ball_velocity=None,
        frame_rate=60,
        tick_rate=40#
    )pong.utilitycolours.py
    WHITE = (255, 255, 255)
    BLACK = (0, 0, 0)An example of the python-pong library being used to create a game of Pong from the Basic class is shown below:frompong.game.BasicimportBasicdefmain():# Create a Pong gameBasic()if__name__=="__main__":main()
Package: python-popcon
python-popconGet Debianpopularity contestvalues for given
packages.Installation$pipinstallpopconUsageThe usage of this module is easy:>>>importpopcon>>>popcon.packages(['reportbug-ng']){'reportbug-ng':323}>>>popcon.packages(['reportbug-ng','reportbug']){'reportbug-ng':323,'reportbug':75065}The raw data (vote, old, recent, no-file) is also available, the sum of the raw
numbers is the number of installations as reported bypopcon.package.>>>popcon.packages_raw(['reportbug-ng','reportbug']){'reportbug-ng':Package(vote=50,old=187,recent=86,no_files=0),'reportbug':Package(vote=5279,old=59652,recent=10118,no_files=16)}Behind the scene popcon will try to use cached information saved in a file in
the ~/.cache/popcon directory. If the relevant file is not available, or older
thanEXPIRYseconds (default is 7 days) it will download fresh data and save
that.The cached data will be kept in memory unlessKEEP_DATAis set to False.Command Line Interfacepopcon reportbug python
             PACKAGE VALUE
           reportbug 180558
              python 110709it also supports a more verbose mode on the command line:popcon --verbose reportbug python
             PACKAGE VOTE       OLD        RECENT     NO FILES
           reportbug 5929       149243     25315      71
              python 3985       103591     3066       67