Saravanan666/pypi-org huggingface dataset:
Package: py-newscollector
Python NewsCollectorAs the internet has grown, the availablesources of information at our disposal have equally grown. Nowadays, if you want to update yourself with the most important news of the day, you have avast variety of news sourcesto choose from. Since we have that many news sources at our disposal, instead of manually going through all their content...Couldn't we let automation pick the top news stories from various newspapers for us, and nicely combine them into a newsletter?This is what the Python NewsCollector can do for us!For adetailed usage guide, please refer to the officialNewsCollector Usage Documentation.Read more about how the algorithm of NewsCollector works inmy Medium article.DescriptionThe Python NewsCollector lets you define a variety of news sources from which it will pick themost relevant articlesand bundle these in anice HTML-based newsletter.View the full sample newsletter in PDF formathere.The NewsCollector algorithmscrapesthe source links provided and compares the articles it found based on theirsimilarity. If it finds multiple articles from different sources covering similar topics, these will be considered as beingrelevant articlesand will be included in the output newsletter.Basic UsageYou can run the NewsCollector algorithm as follows:fromnewscollectorimport*newsletter=NewsCollector()output=newsletter.create()This will run the full NewsCollector pipeline by scraping the sources from thesources.jsonfile and outputting an HTML newsletter.Theoutputobject will hold the location path of the generated newsletter, so that you can easily retrieve it programmatically:output>'C:\\Output\\Path\\newsletter.html'CLI UsageThe NewsCollector can also be run directly via the CLI with the following parameters:newscollector.py[-h][-s[SOURCES]][-n[NEWS_NAME]][-d[NEWS_DATE]][-t[TEMPLATE]][-o[OUTPUT_FILENAME]][-a[AUTO_OPEN]][-r[RETURN_DETAILS]]OutputThe NewsCollector will output anHTML newsletterwith the mostrelevant articlesit found while scraping the sources provided.By default, the output newsletter will becreated as an HTML filein the installation directory of your package, saved in the folderrenderedunder the filenamenewsletter_YYYY-MM-DD.html, where the date is the respective date the NewsCollector scraped its articles from.View the full sample newsletter in PDF formathere.To adjust the default settings, please refer toAdditional Parameters.Additional ParametersYou can customize the NewsCollector algorithm with the following optional parameters:newsletter=NewsCollector(sources="sources.json",news_name="Daily News Update",news_date=date.today(),template='newsletter.html',output_filename='default',auto_open=False,return_details=False)For adetailed usage guide, please refer to the officialNewsCollector Usage Documentation.
Package: pynewtonmath
BasicsPyNewtonMath is a Python 3.x API wrapper providing full support for thenewton micro-service, which isavailable on GitHub.Newton does anything from numerical calculation to symbolic math
parsing.InstallationUsing pip:pip install pynewtonmathFrom GitHub:pip install git+https://github.com/benpryke/pynewtonmathUsageimportpynewtonmathasnewtonnewton.derive('x^2')# -> '2 x'newton.cos('pi')# -> -1newton.zeroes('x^2+2x')# -> [-2, 0]No instantiation requiredSupports natural return typesThe following methods take optional extra arguments for convenience. As
per the API, if these are not specified they must be included before a
horizontal bar'|'in the expression for newton.newton.log('2|8')# -> 3newton.log(8,base=2)# -> 3newton.tangent('2|x^3')# -> '12 x + -16'newton.tangent('x^3',x=2)# -> '12 x + -16'newton.area('2:4|x^3')# -> 60newton.area('x^3',start=2,end=4)# -> 60Seethe newton API GitHub repofor the full list of endpoints.
Package: pyne-xmas-elves
The annual Christmas Elves game server and clientPython North East December brings you the Christmas Elf Challenge. Your task,
should you choose to accept it, is to collect the mostRunning your GameThis part of the guide will give you the instructions to set up the game so you
can start trying to set a high score!InstallationMake sure you have Python installed - if you have Windows, check out theBeginner’s Guide of the Xmas Elves document.Once you’re ready, you can get the client code running:pyvenvvenv.venv/bin/activatepipinstallpyne-xmas-elvesBuilding your BotCreate your game file, calledgame.py:frompyne_xmas_elves.clientimportBaseGameclassGame(BaseGame):"""Your main Game Class.
    """PLAYER_NAME='Tom Cooper'defturn(self,elves_available):"""Take a single turn.

        The elves_available argument will tell you how many elves you can use
        as a guide.
        """send_to_woods=elves_available//2send_to_forest=(elves_available-send_to_woods)//2send_to_mountains=elves_available-send_to_forestreturn(send_to_woods,send_to_forest,send_to_mountains)Helper AttributesWhile taking a turn, you can access the following attributes onself:amount_raised- total money raisedcurrent_turn- the current turn numberlast_turn- what the last turn number will beprevious_weather- the weather from the previous expeditionRun the gameAfter creating your bot, you can run the game:elvesgameRunning the ServerInstalling DependenciesThe server is self-contained with an SQLite database, so just install the
requirements:pipinstall-rrequirements.txtRunningWe’re using Django Channels, so running the server is as easy as:pythonserver/manage.pyrunserverThe APITo interact with the server session, we use a simple REST API to send new data
into the server. The full API docs can be found by running a server and
navigating to/docs/.Starting a New SessionTo start a new session, send aPOSTrequest with anamevariable
form-encoded tohttps://<host>/sessions/:curlhttps://example.com/sessions/-XPOST-dplayer_name="Scott"and you’ll get a simple JSON object back with asessionURL that you post your
turns against.Taking a TurnTo take a turn, make aPOSTrequest against thedayendpoint of a session.Instructions and RulesSee theattached Google Docfor the rules and any of the
latest tips and tricks.
Package: pynext
Pynext - Discord API Wrapper for selfbots written from scratch in Python.⚠️ Project only for educational purposes!⚠️ Project is still under development. It may contain bugs, and future updates will bring breaking changes.💢 RequirementsPython 3.9 or newer.🔧 Pynext FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in bothspeedandmemory.Properly typehinted.Support for multiple accounts.🛠️ Installationpipinstall-Upynext💫 ExampleSee more examples on:GithuborDocs.frompynextimportPynextClient,SelfBot,GuildMessage,PrivateMessagefromtypingimportUnionclient=PynextClient(chunk_guilds=False)@client.dispatcher.listen('on_user_ready')asyncdefon_ready(user:SelfBot):print("User:{}is ready!".format(user))@client.dispatcher.listen('on_message_create')asyncdefon_message(selfbot:SelfBot,message:Union[PrivateMessage,GuildMessage]):ifmessage.content=="?ping":awaitmessage.reply(selfbot,content=f"**Pong!**{round(selfbot.latency*1000)}ms")client.run("TOKEN_1","TOKEN_2")🧷 LinksDocumentationReport a bug or feature📋 TodoVoice Support.Message components (Buttons, Select Menus).Official support for context commands.Support for voice messages.Extensions (Cogs).Full api covarage.
Package: py-nextbus
A minimalistic Python 3 client to simplify making requests to the NextBus API. Response content can be returned as either JSON or XML, using the respective NextBus public feed.All commands in the NextBus API as of revision 1.23 are supported.See the NextBus XML feed documentation for more information:https://www.nextbus.com/xmlFeedDocs/NextBusXMLFeed.pdfNote: Other than the output format, the NextBus XML feed and JSON feeds are the same. The XML feed documentation also applies to the JSON feed.InstallationInstall with Pip:pip install py-nextbusUsage>>> import py_nextbus
>>> client = py_nextbus.NextBusClient(output_format='json')
>>> agencies = client.get_agency_list()
Package: py-nextbusnext
py_nextbusnextThis is forked from py_nextbus for maintanenceIt is no longer API compatible to the upstreamA minimalistic Python 3 client to simplify making requests to the NextBus API. Response content can be returned as either JSON or XML, using the respective NextBus public feed.All commands in the NextBus API as of revision 1.23 are supported.See the NextBus XML feed documentation for more information:https://retro.umoiq.com/xmlFeedDocs/NextBusXMLFeed.pdfNote: Other than the output format, the NextBus XML feed and JSON feeds are the same. The XML feed documentation also applies to the JSON feed.InstallationInstall with pip:pip install py-nextbusnextUsage>>> import py_nextbus
>>> client = py_nextbus.NextBusClient(output_format='json')
>>> agencies = client.get_agency_list()
Package: pynextcaller
nextcaller-python-api=====================[![Build Status](https://travis-ci.org/Nextcaller/nextcaller-python-api.svg?branch=master)](https://travis-ci.org/Nextcaller/nextcaller-python-api)A Python wrapper around the Nextcaller API.The library supports python versions 2.6, 2.7, 3.2, 3.3, 3.4Installation------------**Dependencies**:* requests**Installation**:*cloning from the GitHub repo*:$ git clone git://github.com/nextcaller/Nextcaller-python-api.git$ cd nextcaller-python-api$ python setup.py test$ python setup.py build$ python setup.py install*use pip with the GitHub repo*:$ pip install -U git+git://github.com/nextcaller/nextcaller-python-api.git*use pip with pypi*:$ pip install -U pynextcallerDocumentation------------Full documentation see [here](https://nextcaller.com/documentation/#/getting-started/python)
Package: pynextflow
DescriptionCreate pipelines adding @nf.process and @nf.workflow decorators
and run them with Nextflow from python.Exampleimport pynextflow as nf

@nf.process(echo=True)
def hello(cheers: str) -> nf.bash:
    return f"echo {cheers}"

with nf.Nextflow():
    hello(["hola", "hello", "ciao"])
Package: pynfc
ctypeslibconverted libnfc and libfreefare with just enough of the interals to actually be usable.sudo apt install libfreefare-dev
pip install pynfcfrom pynfc import Nfc, Desfire, Timeout

n = Nfc("pn532_uart:/dev/ttyUSB0:115200")

DESFIRE_DEFAULT_KEY = b'\x00' * 8
MIFARE_BLANK_TOKEN = b'\xFF' * 1024 * 4

for target in n.poll():
    try:
        print(target.uid, target.auth(DESFIRE_DEFAULT_KEY if type(target) == Desfire else MIFARE_BLANK_TOKEN))
    except TimeoutException:
        pass
Package: pyNFFT
“The NFFT is a C subroutine library for computing the
nonequispaced discrete Fourier transform (NDFT) in one or more dimensions, of
arbitrary input size, and of complex data.”The NFFT library is licensed under GPLv2 and available at:http://www-user.tu-chemnitz.de/~potts/nfft/index.phpThis wrapper provides a somewhat Pythonic access to some of the core NFFT
library functionalities and is largely inspired from the pyFFTW project
developped by Henry Gomersall (http://hgomersall.github.io/pyFFTW/).This project is still work in progress and is still considered beta quality. In
particular, the API is not yet frozen and is likely to change as the
development continues. Please consult the documentation and changelog for more
information.
Package: pyNFFT2
“The NFFT is a C subroutine library for computing the
nonequispaced discrete Fourier transform (NDFT) in one or more dimensions, of
arbitrary input size, and of complex data.”The NFFT library is licensed under GPLv2 and available at:http://www-user.tu-chemnitz.de/~potts/nfft/index.phpThis wrapper provides a somewhat Pythonic access to some of the core NFFT
library functionalities and is largely inspired from the pyFFTW project
developped by Henry Gomersall (http://hgomersall.github.io/pyFFTW/).This project is still work in progress and is still considered beta quality. In
particular, the API is not yet frozen and is likely to change as the
development continues. Please consult the documentation and changelog for more
information.
Package: pynfftls
PyNFFTlsThis Python module provides the Fast Lomb-Scargle periodogram
developed by B. Leroy (2012, Astron. Astrophys. 545, A50)It is based on the Non-equispaced Fast Fourier Transform (NFFTnhttp://www-user.tu-chemnitz.de/~potts/nfft/) as well as the FFTW3 library (http://www.fftw.org/).
Both librairies must be installed.Calling sequence:(f,p) = period(t,y,ofac,hifac)For more details, see the associated documentation
For a complete example, see nfftls_test.pyThis Python module also provides the following methods:
- the Non-equidistant Fast Fourier Transform (NFFT) of a time series: (f,A) = nfft(t,y,p,d). For more details, see the associated documentation
- the Discrete  Fourier Transform  (DFT) of a time series: A = dft(t,y,f). For more details, see the associated documentationFor a complete example, see nfftls_test2.pyChange history:
1.6 (29/11/2020): module made compatible with NFFT version 3.5.3
1.5 (2/02/2020): module interface is now based on Cython, module now compatible with python 3
1.4 (11/04/2019): interface of nfft() changed, this function can now compute an over-sampled fourier transform
1.3 (10/04/2019):  correct a bug that lead to over-estimate the frequency by a relative factor of 1e-5
1.2 (4/06/2013):
1.1 (18/01/2013):
1.0 (3/01/2013): initial versionSamadi, LESIA (http://lesia.obspm.fr), Observatoire de Paris, 22 Dec. 2012
Package: pynfold
PynFoldpynFold (pronounced pen-fold) is a pythonic implementation of (eventually)
many of the RooUnfold ROOT Unfolding Framework aiming to compare unfolding
methods with those provided outisde of high energy physics and to increase
to robustness of a flexible re-usable codebase.The fbu algorithm implemented here is the fully basian unfolding method
based code developed by Clement Helsens, Davide Gerbaudo, and Francesco RubboUnfolding relates to the problem of estimating probability distributions
in cases where no parametric form is available,
and where the data are subject to additional random fluctuations due
to limited resolution.
The same mathematics can be found under the general heading of
inverse problems, and is also called deconvolution or unsmearing.This type of equation is also known as the Fredholm integral of the first kind.
The Kernel K, acts as a smoothing matrix in the forward detector and
we can interpret its elements as a matrix of probabilites,
strictly positive between 0 and one.
Inverting the matrix (if possible) resutls in strictly non-probabilistic terms
that, instead of smothing, add large high frequency components due to
arbitrarily small fluctuations.
The goal of unfolding is to impose some knowledge about the smoothness of this
matrix onto the inversion to suppress such high frequency elements.This project is currently under development.
If you would like to be involved please contact vincent.croft at cern.ch.Licensepynfoldis licensed under the terms of the MIT license. See the file
“LICENSE” for information on the history of this software, terms & conditions
for usage, and a DISCLAIMER OF ALL WARRANTIES.All trademarks referenced herein are property of their respective holders.Copyright (c) 2018–, Vincent Alexander Croft,
New York University Department of Physics and DIANA-HEP
Package: pynfse
PyNFSeA biblioteca PyNFSe funciona como um facilitador para os desenvolvedores que precisam gerir a emissão de Nota Fiscal de Serviços por meio eletrônico. As funcionalidades desta biblioteca são:Criação dos XMLs de RPS (Recibo Provisório de Serviço)Criação dos XML dos Lotes RPS.Envio dos lotes de RPSs, realizando a comunicação com o webservice da respectiva prefeituraConsulta e Cancelamento de NFS-es emitidasAlém disso a PyNFSe possui uma CLI para operação via linha de comando.Cidades AtendidasCuritibaInstalaçãoVia PyPIpip install PyNFSeougit clone https://github.com/marcelobelli/PyNFSe.gitcd PyNFSepip install -r requirements.txtProblemasDescobrir o problema de conexão quando atualiza o requests
para versões superiores a 2.11.1 e o cryptography está instaladoRoadmapTornar disponível no PyPIAdicionar novas cidadesDocumentação
Package: pyng3
A Pythonpingwrapper for pretty and fast network assessment.RequirementsPython 2.7+ or Python 3+pip or pip3 (to install)Mac/LinuxInstallationRunpip install pyng3, or runpip3 install pyng3How to UseRunpyngorpyng3.  You can pass a host (defaults to www.google.com),
and -p for a finite number of pings.Featurescolorized output for easy visualizationlog scale to handle all ranges of latencyspecify host and number of pings (-1 is infinite)< 80 characters wide!Tested with Python 2.7 and Python 3.6Un-FeaturesNot tested on LinuxNo support for specifying ping rate
Package: pyngboard
PyngboardThis project provides a python library for accessingPingboardresources.InstallationTo install pyngboard you can use pip:$pipinstallpyngboardUsage and CredentialsYou’ll need a Pingboardclient_idandclient_secretand use it as constructor args:frompyngboardimportPingboardClientclient=PingboardClient(client_id='<a_client_id>',client_secret='<a_client_secret>')You can also skip constructor args and library will lookup credentials in the following order:Environment variablesPINGBOARD_CLIENT_IDandPINGBOARD_CLIENT_SECRETA.pingboardfile located at user home with the following content:client_id=<a_client_id>client_secret=<a_client_secret>LicenseThis project’s source code and it’s documentation is released under theMIT License.
Package: py-ng-deploy
py-ng-deployRequirementsnodeangular-clipython3InstallRecomendedpip install py-ng-deployAlternativeClone this repo:$ git clone https://github.com/ccmorataya/py-ng-deploy.gitChange dir topy-ng-deploy:$ cd py-ng-deployInstall withsetup.py:$ python setup.py installUsageInfoShows version, simple usage and notify if the actual folder doesn't has an rc file.$ pyngDeployNOTEpyngDeployneeds to be runned inside the angular projectInitialize project$ pyngDeploy initAfterinitis required to edit the .pyngdeployrc file with the following structure:[dev]Host=localhostUsername=userPassword=passRemoteDir=/remote/dir/path[prod]Host=localhostUsername=userPassword=passRemoteDir=/remote/dir/pathRemember to exclude the.pyngdeployrcfile from gitBuild and upload (development)$ pyngDeploy devBuild and upload (production)$ pyngDeploy prodBuild with hash in<title>and upload (development)$ pyngDeploy dev --hashRestore last backup$ pyngDeploy dev --restoreTODOAvoid leavingNonethecnopts.hostKeysChange rcfile to configuration file (.ini)Add colors topyngDeploymessagesAdd check for .pyngdeployrc whenpyngDeployis lauched and send warningImprove upload integration from Windows to LinuxAddPortkey in .pyngdeployrc and read itAdd flag--skip-build
Package: pyngen
PyNgenCli and python library for using Ngen.Installationpip3installpyngenUsage Python ModulefrompyngenimportPyNgen#Create object PyNgenngen=PyNgen("https://ngen.example.com/api","YOUR_API_KEY")#Minimum data required.#Add a new Incident for IP "163.10.0.2" for feed "shodan" and Type "open_dns"incident_id=ngen.newIncident("163.10.0.2","shodan","open_dns")#upload with txt evidenceanother_incident_id=ngen.newIncident("163.0.0.99","another_feed","another_incident_type",evidence_text="text_evidence",notes="Notes for this incident",impact="low",urgency="medium")Usage CLIngeninit-apikey<apikey>-urlhttps://<ngenurl>/apingennewincident-feedshodan-address163.10.0.2-typeopen_dnsngenreportcsv-feedexternal_report-typeminer-pathpath/to/file.csv-addressheaderip
Package: pyngeso
pyngesoSimple python wrapper for the National Grid ESO Portal.Getting startedExample usagefrompyngesoimportNgEsoresource="historic-day-ahead-demand-forecast"date_col="TARGETDATE"start_date="2018-01-01"end_date="2018-01-01"client=NgEso(resource)# returns content of responser:bytes=client.query(date_col=date_col,start_date=start_date,end_date=end_date)Tested reportsQueryable via NG's apihistoric-day-ahead-demand-forecastday-ahead-demand-forecasthistoric-2day-ahead-demand-forecast2day-ahead-demand-forecasthistoric-2-14-days-ahead-demand-forecasthistoric-day-ahead-wind-forecastday-ahead-wind-forecast14-days-ahead-wind-forecastdemand-data-updatedc-results-summarydc-dr-dm-linear-ordershistoric-demand-data-{year}[2009-2022]historic-frequency-data[Jan21-Jan22]transmission-entry-capacity-tec-registerdx-eac-eso-results-summarydx-eac-eso-sell-ordersdx-eac-eso-buy-ordersDownload of fileshistoric-generation-mix
Package: pyngham
PyNGHamOverviewThe PyNGHam library is a Python version of the original NGHam protocol library written in C by Jon Petter Skagmo (LA3JPA).The original implementation and a further description of the protocol can be foundhere.Dependenciescrc- v3.0.0InstallingThis library is available in the PyPI repository, and can be installed with the following command:pip install pynghamOr, directly from the source files:python setup.py installDocumentationThe documentation page is availablehere. Instructions to build the documentation page are described below.Contributing instructions are also availablehere.DependenciesSphinx- v6.1.3sphinx-rtd-theme- v1.1.1crc- v3.0.0Building the DocumentationThe documentation pages can be built with Sphinx by running the following command inside thedocsfolder:make htmlUsage ExampleThe usage of the library is pretty straightforward, after the initialization, there are two methods: one to encode a list of bytes, and other to decode a packet. Below there is a basic usage example:frompynghamimportPyNGHampngh=PyNGHam()data=[0,1,2,3,4,5,6,7,8,9]pkt=pngh.encode(data)print("Encoded packet:",pkt)pl,errors,errors_pos=pngh.decode(pkt)print("Decoded data:",pl)print("Number of errors:",errors)print("Errors positions:",errors_pos)More usage examples can be found in the documentationpage.LicenseThis project is licensed under LGPLv3 license.
Package: pynghttp2
pynghttp2 are simple asyncio Python bindings based on ctypes for thenghttp2library. The only thing you need is alibnghttp2version on your system.On Debian-based systems you can install nghttp2 simply via apt:apt-getinstalllibnghttp2-14The project was created in the context of a student work for an HTTP/2 protocol
gateway in theµPCNproject - an implementation of Delay-tolerant Networking
(DTN) protocols.Installationpipinstallpynghttp2ExamplesHigh-Level APIfrompynghttp2importhttp2# GET requestresp=awaithttp2.get('http://localhost:64602/ping')content=awaitresp.text()assertcontent=='pong'# POST requestmessage=b"Lorem ipsum dolorem"resp=awaithttp2.post('http://localhost:64602/echo',data=message)echo=awaitresp.read()assertecho==messageClient Sessionfrompynghttp2importClientSession# Multiplex two requestsasyncwithClientSession(host='localhost',port=64602)assession:stream1=session.get('http://localhost:64602/stream')stream2=session.get('http://localhost:64602/stream')awaitasyncio.gather(stream1.read(),stream2.read())Server Sessionimportasynciofrompynghttp2importServerSessionasyncdefhandle_request(req):"""Echo the request body"""msg=awaitreq.read()awaitreq.response(200,data=msg)withServerSession(host='localhost',port=8080)assession:whileTrue:# Wait for next incoming requestreq=awaitsession# Handle each request in its own task to be able to multiplex# multiple requests and responsesasyncio.ensure_future(handle_request(req))