Saravanan666/pypi-org huggingface dataset:
Package: pygtail
A python “port” oflogcheck’s logtail2.Pygtail reads log file lines that have not been read. It will even
handle log files that have been rotated.UsageFrom the command line:Usage: pygtail.py [options] logfile

Print log file lines that have not been read.

Options:
  -h, --help            show this help message and exit
  -o OFFSET_FILE, --offset-file=OFFSET_FILE
                        File to which offset data is written (default:
                        <logfile>.offset).
  -p, --paranoid        Update the offset file every time we read a line
                        (as opposed to only when we reach the end of the
                        file).
  -n N, --every-n=N     Update the offset file every N'th time we read a
                        line (as opposed to only when we reach the end of
                        the file).
  --no-copytruncate     Don't support copytruncate-style log rotation.
                        Instead, if the log file shrinks, print a warning.
  --read-from-end       Read log file from the end if offset file is
                        missing. Useful for large files.
  --log-pattern         Custom log rotation glob pattern. Use %s to
                        represent the original filename. You may use this
                        multiple times to provide multiple patterns.
  --full_lines          Only log when line ends in a newline `\n`
                        (default: False)
  --encoding ENCODING   Encoding to use for reading files (default: system
                        encoding)
  --version             Print version and exit.In your code:frompygtailimportPygtailforlineinPygtail("some.log"):sys.stdout.write(line)An example showing iterating over lines with offsets and manual control over offset updates:importpygtailtail=pygtail.Pygtail(logfile,save_on_end=False,copytruncate=False)forline,offsetintail.with_offsets():# Do someting# figure out right offset to savetail.write_offset_to_file(right_offset)ContributingPull requests are very much welcome, but I will not merge your changes if you don’t include a test. Run tests withpython setup.py test.Build status
Package: pygtaw
A tiny Google Translate API wrapper written in Python. An API key is needed to use this. More information on obtaining the API key can be found on theGoogle Translate API site.The full list ofsupported languages.UsageTo install:pip install pygtaw.Identify your api key and make a new Client object.>>>importpygtaw>>>api_key='ENTER_API_KEY'>>>client=pygtaw.Client(api_key)To make the translation request:>>>query='Hello, world!'>>>target='Korean'>>>source='English'>>>translation=client.translate(query,target,source)>>>>>>printtranslation.translated_text안녕하세요You can send a translation request without a source as well–the Google Translate API can detect the source language:>>>translation=client.translate('Hello',target='Spanish')>>>printtranslation.translated_textHola>>>printtranslation.detected_source_languageEnglishTestsCurrently, tests are made by making requests to Google Translate API. To run the tests, make akeyfile in thetestsfolder and make sure it’s added to.gitignore.
Package: pyGTC
What is a Giant Triangle Confusogram?A Giant-Triangle-Confusogram (GTC, aka triangle plot) is a way of
displaying the results of a Monte-Carlo Markov Chain (MCMC) sampling or similar
analysis. (For a discussion of MCMC analysis, see the excellentemceepackage.) The recovered parameter constraints are displayed on a grid in which
the diagonal shows the one-dimensional posteriors (and, optionally, priors) and
the lower-left triangle shows the pairwise projections. You might want to look
at a plot like this if you are fitting a model to data and want to see the
parameter covariances along with the priors.Here’s an example of a GTC with some random data and arbitrary labels:pygtc.plotGTC(chains=[samples1,samples2],
              paramNames=names,
              chainLabels=chainLabels,
              truths=truths,
              truthLabels=truthLabels,
              priors=priors,
              paramRanges=paramRanges,
              figureSize='MNRAS_page')But doesn’t this already exist in corner.py, distUtils, etc…?Although several other packages exists to make such a plot, we were unsatisfied
with the amount of extra work required to massage the result into something we
were happy to publish. Withpygtc, we hope to take that extra legwork out of
the equation by providing a package that gives a figure that is publication
ready on the first try! You should try all the packages and use the one you like
most; for us, that ispygtc!InstallationFor a quick start, you can install with eitherpiporconda. Either will install the required
dependencies for you (packaging,numpy, andmatplotlib):$ pip install pygtcor, if you useconda:$ conda install pygtc -c conda-forgeFor more installation details, see thedocumentation.DocumentationDocumentation is hosted atReadTheDocs. Find
an exhaustive set of examples there!CitationIf you use pygtc to generate plots for a publication, please cite as:@article{Bocquet2016,
  doi = {10.21105/joss.00046},
  url = {http://dx.doi.org/10.21105/joss.00046},
  year  = {2016},
  month = {oct},
  publisher = {The Open Journal},
  volume = {1},
  number = {6},
  author = {Sebastian Bocquet and Faustin W. Carter},
  title = {pygtc: beautiful parameter covariance plots (aka. Giant Triangle Confusograms)},
  journal = {The Journal of Open Source Software}
}Copyright 2016, Sebastian Bocquet and Faustin W. Carter
Package: pygtfs
[![Travis](https://img.shields.io/travis/jarondl/pygtfs/master.svg?style=flat-square)](https://travis-ci.org/jarondl/pygtfs)
[![PyPI](https://img.shields.io/pypi/v/pygtfs.svg)](https://pypi.python.org/pypi/pygtfs)Overviewpygtfs is a library that models information stored in Google’s
[General Transit Feed Specification (GTFS)](https://developers.google.com/transit/)
format. GTFS is a format designed to specify information about a transit
system, such as a city’s subways or a private company’s bus services. pygtfs
stores information in an SQLite database using SQLAlchemy to facilitate the
storage of Python objects in a relational database.pygtfs is a fork of @eoghanmurray’s fork of a @andrewblim’s gtfs-sql which is
a fork of @bmander’s gtfs. See the git logs for more fun history.License: MIT, included inlicense.txt.Dependencies[SQLAlchemy](http://www.sqlalchemy.org/) 0.7.8. Used for all mapping of GTFS
objects to the relational DB. You’ll need to be familiar with it to read the
code; the [documentation](http://docs.sqlalchemy.org/) is pretty solid.[pytz](http://pytz.sourceforge.net/) 2012d. A few GTFS fields are expected
to be in a [tz time zone format](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones).[six](http://pythonhosted.org/six/). Used in order to support python2 and
python3 in a single code base.[docopt](http://docopt.org/). Pythonic command line arguments parser, that
will make you smileInstallationGet [setuptools](http://pypi.python.org/pypi/setuptools) if you don’t have it,
clone the repo, and usepython setup.py install.DocumentationHosted onhttps://pygtfs.readthedocs.org/TODOImprove testing; add some unit testing framework and test with a variety of GTFS data feeds.Add more docsWhy fork?natively support several gtfs feeds per databaseless SLOC, more DRYadd python3 supportrenamed to a more generic namewill continue to maintain
Package: pygtfslib
PyGTFSLibA python library for theGTFS format.So far, this is only a loose, incomplete collection of rather low-level tools for parsing GTFS feeds.
The motivation for this library is to consolidate GTFS related code used atgeOpsin a single library. This is still work in progress, so breaking changes are to be expected.This library aims to be efficient in terms of parsing time and memory usage to allow processing
a large number of feeds.InstallationInstall the latest stable release from PyPI with pip:pipinstallpygtfslibModulesSpatialThepygtfslib.spatialmodule contains classes and functions related to spatial data.
So far, there is only one functionread_shapesthat can be used to parseshapes.txtusing
a generic factory that accepts an iterable ofpygtfslib.spatial.ShapeRowinstances.TemporalThepygtfslib.temporalmodule contains classes and functions related to temporal data.
So far, it provides functions to parse calendar and frequency entries and stop times.
It also provides aTimeCacheclass that accelerates conversion of GTFS timezone, operating day
and time delta to a timezone-aware pythondatetime.datetime.MOTThepygtfslib.motmodule contains tools related to GTFS route types / mode of transportation.
So far, there is a functionroute_type_to_motthat can convert a GTFS route type or extended route type
to a MOT string that can be used in thegeOps routing engine.CSVThepygtfslib.fast_csvmodule contains low-level tools for CSV parsing.
There are two generator functions that allow to iterate over a CSV file yielding rows asdicts
ornamedtuples. They are built on top of the builtin python CSV reader but they are faster than
the builtinDictReader.Issue TrackerPlease usethe GitHub issue trackerto report bugs/issues.DevelopmentContributingIf you want to contribute to the pygtfslib library, you can make a pull request atGitHub.
Before working on major features/changes, please consider contacting us about your plans.
Seeour GitHub pagefor contact details.Editable InstallationClone this repo and enter the corresponding directory.
Create a virtual environment, then install frozen requirements, dev-requirements
and this library in editable mode:python3.7-mvenvenv
.env/bin/activate
pipinstall-Upip
pipinstall-rrequirements.txt-rdev-requirements.txt-e.Keep env activated for all following instructions.Pre-Commit HooksEnable pre-commit hooks:pre-commitinstallFrom time to time (not automated yet) runpre-commitautoupdateto update frozen revs.Run testsRun tests and analyze code coverage:pytest--cov=pygtfslib--cov-reportterm--cov-fail-under=40pygtfslib
Package: pygti
HVV Geofox Python LibraryAboutThis library is a python wrapper for accessing the geofox api. This api is used to get information about the public transport in Hamburg, Germany.How to get the api credentialsYou have to apply for credentials via the HVV website. You can see their official guidehere(the page is only available in German).They will send you a contract you will have to sign and send back. After about a week, you will receive your api credentials.DocumentationThis library uses the same data types and parameters as specified in theGTI documentation. It features client side validation of the parameters.InstallationInstall thepackage from pypi.pipinstallpygtiUsageSee the examples on how to use the library atexamples.py, and see theGTI documentationfor in-depth explanation of parameters.There is also aGlitch exampleavailable. Try it out and if you want to see how it's done, justremix the app.A minimal working example is shown below:frompygti.gtiimportGTI,AuthimportasyncioimportaiohttpGTI_USER=""# your api usernameGTI_PASS=""# your api passwordasyncdefmain():asyncwithaiohttp.ClientSession()assession:auth=Auth(session,GTI_USER,GTI_PASS)gti=GTI(auth)ir=awaitgti.init()# see the examples.py file for more functionality and use of the payloadsasyncio.run(main()):exclamation:If using Python 3.8: Version 3.6.2 of aiohttp uses a different EventLoopPolicy so running this MWE will currently result in an error displayed in the console! It should not affect the functionality. This should be fixed with a newer version of aiohttp. For a workaround look into theexamples.pyfile. For more information see thisIssue.Progress1. init2. checkName3. getRoute4. departureList5. getTariff6. departureCourse7. listStations8. listLines9. getAnnouncements10. getIndividualRoute11a. getVehicleMap11b. getTrackCoordinates12. checkPostalCode13. getStationInformation14. tariffZoneNeighbours15. tariffMetaData16. singleTicketOptimizer17. ticketListDevelopingSome files in this project are generated based on the WADL and XSD schema files from GTI.
To generate them, install the dev dependencies and run the script:pipinstall-rrequirements_dev.txt
pythonscript/generate.pyContributions are welcome!If you want to contribute to this, please read theContribution guidelines
Package: pyg-timeseries
pyg-timeseriespandas is great but pyg-timeseries introduces a few improvements.pyg is designed so that for dataframes/series without nans, it matches pandas exactlyconsistent treatments of nan's: unlike pandas, pyg ignores nans everywhere in its calculations.np.ndarray and pandas dataframes are treated the same and pyg operates on np.arrays seemlesslystate-management: pyg introduces a framework for returning not just the timeseries, but also the state of the calculation. This can be fed into the next calculation batch, allowing us not to have to 're-run' everything from the distant past.performance-wise, pyg is implemented via numba with performance times comparable to pandaspip install fromhttps://pypi.org/project/pyg-timeseries/
Package: pygtk-form
PYGTK FORMCreate forms very easily for your scripts with GTK !
Just call a function, with the data you want to recover, and a callback!Install the module with:pip install pygtk_formRead the documentation please!In addition, it takes time to write ...The documentation in questionExampleAnd here is the (very simple code) !import pygtk_form

def say_hello(data):
	if data:
		print("Hello " + data["pseudo"] + ", I know you are using " + data["distribution"] + "!")
	else:
		print("Ho no ... You canceled ...")

pygtk_form.spawn_form({
	"title": "Cool form",
	"default_size": [400, 300],
	"theme": "windows_light",
	"resizable": True,
	"fields": [
		{
			"id": "pseudo",
			"type": "text",
			"text": "",
			"label": "Your username",
			"max_length": 255
		},
		{
			"id": "distribution",
			"type": "combobox",
			"label": "What distribution do you use ?",
			"default": "manjaro",
			"items": [
				{"id": "fedora", "name": "Fedora"},
				{"id": "ubuntu", "name": "Ubuntu"},
				{"id": "debian", "name": "Debian"},
				{"id": "manjaro", "name": "Manjaro"},
				{"id": "arch", "name": "Arch (BTW)"}
			]
		}
	]
}, say_hello)
Package: pygtkhelpers
PyGTKHelpers is a library to assist the building of PyGTK applications. It is
intentionally designed to benon-frameworky, and blend well with your
particular style of PyGTK development.PyGTKHelpers provides a number of widespread features including: View
delegation, MVC, mixed GtkBuilder/Python views, widget proxying, signal
auto-connection, object-base lists and trees, a number of helper widgets,
utility functions for assisting creating new GObject types, unit testing
helpers and utilities to help debug PyGTK applications.
Package: pygtkquery
pygtkquery is a GTK based command runner in pythonSounds pretty vague, but it's an accurate description as pygtkquery can beextended to run all sorts of commands.  When run, it will pop up a windowasking for a response to a query, and then it will execute a command basedon the response.  Currently supported queries are:"ssh" - asks what host you would like to ssh to, opens up new terminal withssh connection"man" - asks what man page you would like to display, opens up new terminalwith that man page"run" - asks what command you would like to run
Package: pygtkspellcheck
Python GTK SpellcheckPython GTK Spellcheck is a simple but quite powerful spellchecking library for GTK written in pure Python. It's spellchecking component is based onEnchantand it supports both GTK 3 and 4 viaPyGObject.⚡️ News:Thanks to@cheywood, Python GTK Spellcheck now supports GTK 4! 🎉🟢 Status:This project is mature, actively maintained, and open to contributions and co-maintainership.✨ Featuresspellcheckingbased onEnchantforGtkTextViewsupport for word, line, and multilineignore regular expressionssupport for bothGTK 3 and 4viaPyGObjectfor Python 3configurable extra word characters such as'localized names of the available languages based onISO-Codessupport for custom ignore tags and hot swap ofGtkTextBuffersupport for Hunspell (LibreOffice) and Aspell (GNU) dictionaries🚀 Getting StartedPython GTK Spellcheck is available from thePython Package Index:pipinstallpygtkspellcheckDepending on your distribution, you may also find Python GTK Spellcheck in your package manager.
For instance, on Debian you may want to install thepython3-gtkspellcheckpackage.🥳 ShowcaseOver time, several projects have used Python GTK Spellcheck or are still using it. Among those are:Nested Editor: “Specialized editor for structured documents.”Cherry Tree: “A hierarchical note taking application, […].”Zim: “Zim is a graphical text editor used to maintain a collection of wiki pages.”REMARKABLE: “The best markdown editor for Linux and Windows.”RedNotebook: “RedNotebook is a modern journal.”Reportbug: “Reports bugs in the Debian distribution.”UberWriter: “UberWriter is a writing application for markdown.”Gourmet: “Gourmet Recipe Manager is a manager, editor, and organizer for recipes.“🔖 VersionsVersion numbers followSemantic Versioning. However, the update from 3 to 4 pertains only API incompatible changes inoxt_extractand not the spellchecking component. The update from 4 to 5 removed support for Python 2, GTK 2,pylocales, and theoxt_extractAPI. Otherwise, the API is still compatible with version 3.📚 DocumentationThe documentation is available atRead the Docs.🏗 ContributingWe welcome all kinds of contributions! ❤️For minor changes and bug fixes feel free to simply open a pull request. For major changes impacting the overall design of Python GTK Spellcheck, please firststart a discussionoutlining your idea.By submitting a PR, you agree to license your contributions under “GPLv3 or later”.
Package: pygtm
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.Description: # PyGTMA python implementation of Generative Topographic Mapping.**This is beta release.**For example, this project has no test as you can see.## Requirements- numpy- scipy- scikit-learn## Getting StartedTo install PyGTM, use `pip````bash$ pip install -U pygtm```The pygtm package inherits scikit-learn classes.```pythonfrom pygtm import GTMfrom sklearn.datasets import load_irisfrom sklearn.preprocessing import StandardScalerfrom sklearn.pipeline import make_pipelineiris = load_iris()model = make_pipeline(StandardScaler(),GTM(n_components=2))embedding = model.fit_transform(iris.data)```## References- [GTM: The Generative Topographic Mapping](https://www.microsoft.com/en-us/research/publication/gtm-the-generative-topographic-mapping/)- [Development of the Generative Topographic Mapping](https://www.microsoft.com/en-us/research/publication/developments-of-the-generative-topographic-mapping/)Platform: UNKNOWN
Package: pygtools
This is a small plugin for pygame, which provides
some tools to make creating games with pygame easier.
The package is still incomplete as just one module, thescreenmanagerwhich makes it easier to create scenes in pygame.complete documentationdependenciespython 3pygame 2.0.0 ou superiorinstallationat a command prompt typepip install pygtoolsresourcesOBS: initially PygTools only has one module, but tools will be added over
timecreating multiple screens for pygamescreen manager with minimal syntax based on kivy screen manager
Package: pygtrans
pygtrans谷歌翻译, 支持APIKEYGithub语言支持列表安装pipinstall-Upygtrans
pipinstallgit+ssh://git@github.com/foyoux/pygtrans.git
pipinstallgit+https://github.com/foyoux/pygtrans.git基本功能获取语言支持列表自动检测语言, 支持批量文本/HTML 翻译, 支持批量支持 TTS快速入门frompygtransimportTranslateclient=Translate(proxies={'https':'http://localhost:10809'})# 检测语言text=client.detect('Answer the question.')asserttext.language=='en'# 翻译句子text=client.translate('Look at these pictures and answer the questions.')asserttext.translatedText=='看这些图片，回答问题。'# 批量翻译texts=client.translate(['Good morning. What can I do for you?','Read aloud and underline the sentences about booking a flight.','May I have your name and telephone number?'])assert[text.translatedTextfortextintexts]==['早上好。我能为你做什么？','大声朗读并在有关预订航班的句子下划线。','可以给我你的名字和电话号码吗？']# 翻译到日语text=client.translate('请多多指教',target='ja')asserttext.translatedText=='お知らせ下さい'# 翻译到韩语text=client.translate('请多多指教',target='ko')asserttext.translatedText=='조언 부탁드립니다'# 文本到语音tts=client.tts('やめて',target='ja')open('やめて.mp3','wb').write(tts)最佳实践pygtrans中包含两个翻译模块Translate:完全免费，支持批量从2021年9月15日开始, 需要翻墙才能使用, 具体参考#8ApiKeyTranslate: 需要有效的谷歌翻译API KEY，谷歌提供免费试用Translate的最佳实践:http代理：Translate(proxies={"https": "http://localhost:10809"})socks5代理:Translate(proxies={"https": "socks5://localhost:10808"})重要：尽量一次性多翻译，减少请求次数，参考#13，比如一次性翻译 2000 / 5000 / 10000
Package: pygtranslate
gtranslate-pythonPythonic interface with CLI to Google's free Translate API.Features:Supports request splitting for large requests (>4000 chars default) to circumventGETchar limit. Requests will be split on end of sentences preferably to preserve quality of translation.Proxy support viaHTTPS_PROXYenvironment variable.Agent spoofing.Uses google's auto language detection where possible by default if not explicitly specified.Usage:client = Translator()
client.translate('Bonjour', from_lang='fr', to_lang='en')
>>> 'Hello'Command Line tool:python translator.py -t en -f fr -q "Bonjour"
>>> HelloLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: pygua64
64卦代替base64examplefrom pygua64 import gua64
r = gua64.encode('hello，世界'.encode())
print(r.decode())

r = gua64.decode('䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒☯'.encode())
print(r.decode())
Package: pyguacamole
A Python client library for communication withGuacamoleserver (guacd)InstallationUsing pip$ pip install pyguacamoleFrom source$ python setup.py installUsageGuacamoleClient handles communication with a runningguacdserver viaGuacamole Protocol.GuacamoleClient must be used by a broker server which handles communication with a Javscript application running in the browser. GuacamoleClient implements the methods that enables communication with guacd server (send & receive).First step should be establishinghandshakewith guacd server, then
Broker server should handle instruction sending and receiving:send: send instructiontoguacd serverreceive: receive instructionfromguacd server>>> from guacamole.client import GuacamoleClient
>>> client = GuacamoleClient('127.0.0.1', 4822)
>>> client.handshake(protocol='rdp', hostname='localhost', port=3389)Once instruction is received from guacd server, it should be sent immediately to the browser>>> instruction = client.receive()
>>> instruction
'4.size,1.0,4.1024,3.768;'and once instruction is sent from browser, it should be sent immediately to guacd server>>> instruction = '5.mouse,3.400,3.500;'
>>> client.send(instruction)NotesPyGuacamole is released under theMIT Licenseand is based on the initial effort by Rescaledjango-guacamoleproject.