Saravanan666/pypi-org huggingface dataset:
Package: tglogger
tgloggertgloggercontains utilities to build and redirect logs to Telegram chat via a bot.It has a formatter for beautiful log messages in Telegram.It tends totagcommon logs so that you can easily filter out related log messages.You can send logs to individuals, channels or groups.It works with Django (See badges for supported versions).BuildCoveragemasterdevelopmentInstallingInstall viapip:pipinstalltgloggerExampletgloggercontains a formatter which formats log records for Telegram chats and a handler which sends log records to a Telegram chat.Assuming you have a logger instance:logger=logging.getLogger(__name__)You need to have an instance ofTelegramHandlerandTelegramFormatter.fromtgloggerimportTelegramHandler,TelegramFormatterhandler=TelegramHandler(bot_token="foo",receiver="bar")# you can also set TELEGRAM_BOT_TOKEN and TELEGRAM_RECEIVER# environment variables so as not to pass these on initializationformatter=TelegramFormatter()# initialize formatterhandler.setFormatter(formatter)# inject formatter into handlerlogger.addHandler(handler)# inject handler into loggerAnd now your log records that has level aboveERRORwill be sent to the chat you have defined withreceiverby the bot that you have defined bybot_token.logger.error("foo")# you will receive a message by your botDocumentationDocumentation has more information about how to usetglogger. Refer to thedocumentation.
Package: tg-logger
Telegram loggerBridging python logging and files to tg botDocumentation is available atRead the DocsDemo is available@tg_logger_demo_bot, [repo]🗂 Table of ContentsInstallation & UsageScreenshotExamplesSimple loggingFlask loggingSetting extra parameters to handlerTgFileLogger exampleFQAHow to create a telegram bot?How to gettokenanduser_id?🚀 Installation & UsageAvailable bypip install tg-loggerUse withimport tg_logger📱 Screenshot📖 ExamplesSimple loggingimportloggingimporttg_logger# Telegram datatoken="1234567890:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"users=[1111111111]# Base loggerlogger=logging.getLogger('foo')logger.setLevel(logging.INFO)# Logging bridge setuptg_logger.setup(logger,token=token,users=users)# Testlogger.info("Hello from tg_logger by otter18")Flask loggingfromflaskimportFlaskimportloggingimporttg_logger# Telegram datatoken="1234567890:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"users=[1111111111]# Flask app setupapp=Flask(__name__)app.logger.setLevel(logging.ERROR)# flask loggertg_logger.setup(app.logger,token=token,users=users)# bridge setup@app.route('/')defhello_world():return'Hello, World!'if__name__=='__main__':app.run()Setting extra parameters to handlerimportloggingimporttg_logger# Telegram datatoken="1234567890:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"users=[1111111111]# Base loggerlogger=logging.getLogger('foo')logger.setLevel(logging.INFO)# Logging bridge setuphandler=tg_logger.setup(logger,token=token,users=users)# Setting extra paramshandler.setLevel(logging.DEBUG)# Testlogger.info("Hello from tg_logger by otter18")TgFileLogger exampleimporttg_logger# Telegram datatoken="1234567890:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"users=[1111111111]# TgFileLogger exampletg_files_logger=tg_logger.TgFileLogger(token=token,# tg bot tokenusers=users,# list of user_idtimeout=10# 10 seconds by default)file_name="test.txt"withopen(file_name,'w')asexample_file:example_file.write("Hello from tg_logger by otter18")tg_files_logger.send(file_name,"Test file")🔎 FQAHow to create a telegram bot?To create bot use officialBotFatherbot (descibedhere)How to gettokenanduser_id?Use@tg_logger_demo_botwith command/idBot'stokenis shown after new bot is madeTo getuser_iduse special bots (e.g.@userinfobot,@JsonDumpBot)
Package: tglogging
Telegram LoggerA simple python package to send your app logs to a telegram chat in realtime.Installingpip3installtgloggingExample UsageAddTelegramLogHandlerhandler to your logging config.importloggingfromtgloggingimportTelegramLogHandler# TelegramLogHandler is a custom handler which is inherited from an existing handler. ie, StreamHandler.logging.basicConfig(level=logging.INFO,format="[%(asctime)s-%(levelname)s] -%(name)s-%(message)s",datefmt='%d-%b-%y %H:%M:%S',handlers=[TelegramLogHandler(token="12345678:AbCDEFGhiJklmNoPQRTSUVWxyZ",log_chat_id=-10225533666,update_interval=2,minimum_lines=1,pending_logs=200000),logging.StreamHandler()])logger=logging.getLogger(__name__)logger.info("live log streaming to telegram.")Parameterstoken: A telegram bot token to interact with telegram API.log_chat_id: Chat id of chat to which logs are to be send.update_interval: Interval between two posting in seconds. Lower intervals will lead to floodwaits. Default to 5 seconds.minimum_lines: Minimum number of new lines required to post / edit a message.pending_logs: Maximum number of characters for pending logs to send as file.
default to 200000. this means if the app is producing a lot of logs within short span of time, if the pending logs exceeds 200000 characters it will be send as a file. change according to your app.LICENSEMIT License
Package: tg-log-handler
⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀  ╭––––––––––––––––––––––╮
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀         Информация
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀  ╰––––––––––––––––––––––╯
⠀⠀⠀     Это не мой проект! Я только доработал его.)
⠀⠀⠀⠀⠀⠀⠀    Разработчик: pypi.org/user/guyshe
⠀⠀⠀⠀⠀⠀   ╭–––––––––––––––––––––––––––––––––––––––––╮
⠀⠀⠀⠀⠀⠀⠀       Lolz: lolz.guru/members/2977610/
⠀⠀⠀⠀⠀⠀⠀  ╰–––––––––––––––––––––––––––––––––––––––––╯
Package: tg-login
tg-loginA command line tool to login into Telegram with user or bot accounts and generate session string.Installationpipinstalltg-loginUsageUsage:tg-login[OPTIONS]AcommandlinetooltologinintoTelegramwithuserorbotaccounts.

Options:--API_IDINTEGERAPIIDobtainedfrommy.telegram.org[envvar:API_ID;required]--API_HASHTEXTAPIHASHobtainedfrommy.telegram.org[envvar:API_HASH;required]-v,--versionShowversionandexit.--helpShowthismessageandexit.ReplYou may run thistg-loginonline by using this repl.Note:A python virtual environment is created before execution and deleted post execution.All sensitive user input is hidden.The session string is not printed on screen, but sent to user.
Package: tgmigrate
tgmigrate is an turbogears command extension which provide sqlalchemy migrate support.http://erosson.com/migrate/The early version of tgmigrate gives turbogears developers a quick evaluation if sqlalchemy migrate is helpful for us.Install----------------easy_install tgmigrateUsage----------------After install, tgmigrate plug an "migrate" command into tg-admin console utility.The basic syntax is ::tg-admin migrate [command]tgmigrate takes care the dburi and repository name for you.The reference procedure is:1. quickstart project as usual::$ tg-admin quickstart -i -s demo2. setup sqlalchemy dburi in demo/dev.cfg3. create initial database$ tg-admin sql create4. create repository "migration"$ tg-admin migrate createnote the default repository folder named "migration" is created in your project folder.5. move your database to version control$ tg-admin migrate version_controlor briefly::$ tg-admin migrate vc6. Now you could watch the current version in both database and repositoryshow repository version::$ tg-admin migrate v(tg-admin migrate version)show database version::$ tg-admin migrate dbv(tg-admin migrate db_version)then follow the migration doc http://erosson.com/migrate/docs/versioning.html to do the further stuff.Please post your comments or suggestions on TurboGears google group http://groups.google.com/group/turbogearsreference--------------You could use::$ tg-admin migrate helpto get all available commands and helpThe available commands are$ tg-admin migrate [command]command = ['help','create','script','commit','version','source','version_control','db_version','upgrade','downgrade','drop_version_control','manage','test']
Package: tgml
TigerGraph ML Workbenchtgmlprovides a python toolkit for machine learning practitioners to integrate TigerGraph into their existing workflow. The core component oftgmlis the graph loader, which behaves like a data loader for typical machine learning tasks. Putting differently, users can write their model training code as before but only replace the previous data loader with our graph loader; they will get batches of graph data for training as if the data is read from their local disk.tgmlalso provides syntactic sugar to the graph data processing APIs, so users can run algorithms such as PageRank on their graphs in TG as calling a normal Python function. Under the hood,tgmltakes care of all the communications with the Graph Data Processing Service and convert the final output to a format that users need (dataframes and PyG graphs for now).See thetutorial notebooksin the docs/examples folder on how to use the package. Fortgmlto work, theGraph Data Processing Servicehas to be running on the TigerGraph server.Getting StartedInstall from pypipip install tgmlInstall from github for the hottest changes:pip install git+https://github.com/TigerGraph-DevLabs/tgml.git -f https://data.pyg.org/whl/torch-1.10.0+cpu.html
Package: tgnet
tgnetDeserializes/serializes Telegram tgnet.dat format.
Can be used to extract/replace authKey and dcId.This is fork ofbatreller/telegram_android_session_converterwith support of serialization and zero dependencies.To convert the session all you need is just tgnet.dat file from the root directory of your telegram app on the phone, it's located at /data/data/org.telegram.messenger.web (or another package name, if you're using an unofficial client), it can be extracted using ADB (Android Debug Bridge).Usage>>>fromtgnetimportTGAndroidSession,NativeByteBuffer>>>withopen("tgnet.dat","rb")asf:...buf=NativeByteBuffer(f)...tgdata=TGAndroidSession.deserialize(buf)...>>>currentDcId=tgdata.headers.currentDatacenterId>>>currentDc=tgdata.datacenters[currentDcId-1]# or tgdata.currentDc()>>>print(currentDc.auth.authKeyPerm.hex())'72a9808fb4a9e51e6ca57259714c14fa83546fc9d56fcb9d7de77c59fa13b6d6...'Running testspytest-s-x--disable-warnings--cov=tgnet/test.py
Package: tg-newcalls
A simple and elegant client that allows you to make group voice calls quickly and easily.Examples•Documentation•PyPi•Channel•ChatPyTgCallsThis project allows making Telegram group call using MtProto and WebRTC, this is possible thanks to the power of NodeJS's WebRTC library and@evgeny-nadymovWhat are the supported clients?The supported clients for now are Pyrogram and Telethon, but we accept other clients too, you can open a pull request with the editsHow to install?Here's how to install the PyTgCalls lib, the commands are given below:# With Gitpipinstallgit+https://github.com/pytgcalls/pytgcalls-U# With PyPi (Recommended)pipinstallpy-tgcalls-UConversion command (Video)From file to raw videoffmpeg-i{INPUT_FILE}-frawvideo-pix_fmtyuv420p-vfscale=640:-1{OUTPUT_FILE}From H264/VP8/VP9 to Audio and Videoffmpeg-i{INPUT_FILE}-fs16le-ac1-ar{BITRATE}{OUTPUT_AUDIO_FILE}-frawvideo-r{FRAMERATE}-pix_fmtyuv420p-vfscale={SCALING}:-1{OUTPUT_VIDEO_FILE}From YouTube video/live-stream to Audio and Videoffmpeg-i"$(youtube-dl-x-g"{YOUTUBE_LINK}")"-fs16le-ac1-ar{BITRATE}{OUTPUT_AUDIO_FILE}-frawvideo-r{FRAMERATE}-pix_fmtyuv420p-vfscale={SCALING}:-1{OUTPUT_VIDEO_FILE}From YouTube Live stream to VideoImportant!The max resolution allowed by Telegram is of 720p at 30 fps
Here also listed the scaling format360p = 640480p = 854720p = 1280If you have any problem with green screen or un-synchronized video, it can be one of these problems:Invalid FFMPEG commandThe video quality specified to convert is higher than the original video oneInvalid PyTgCalls video parametersIf you're using fifo, the Fifo max buffer size is too low and this cause the lag problem.Conversion commandsFrom file to raw formatffmpeg-i{INPUT_FILE}-fs16le-ac1-ar{BITRATE}{OUTPUT_FILE}From stream link to raw formatffmpeg-y-i{STREAM_LINK}-fs16le-ac1-ar{BITRATE}{OUTPUT_FILE}From YouTube video/live-stream to raw formatffmpeg-i"$(youtube-dl-x-g"{YOUTUBE_LINK}")"-fs16le-ac1-ar{BITRATE}{OUTPUT_FILE}CreditsBig thanks to@evgeny-nadymovfor allowing us to use their code fromtelegram-react, and thanks
toalemidevfor helping to rebuild this libraryThis library is based ontgcallsjsdeveloped@AndrewLaneXand pyservercall by@Laky-64
Package: tgo
DescriptionFinds the global minimum of a function using topographical global
optimisation (tgo). Appropriate for solving general purpose NLP and blackbox
optimisation problems to global optimality (low dimensional problems).
The general form of an optimisation problem is given by:minimize f(x) subject to

g_i(x) >= 0,  i = 1,...,m
h_j(x)  = 0,  j = 1,...,pwhere x is a vector of one or more variables.f(x)is the objective
functionR^n->R,g_i(x)are the inequality constraints.h_j(x)are the equality constrains.InstallationStable:$ pip install tgoLatest:$ git clone https://bitbucket.org/upiamcompthermo/tgo
$ cd tgo
$ python setup.py install
$ python setup.py testDocumentationThe docstrings and project websitehttps://stefan-endres.github.io/tgo/contains more detailed examples, notes and performance profiles.Quick exampleConsider the problem of minimizing the Rosenbrock function. This function is implemented inroseninscipy.optimize>>>fromscipy.optimizeimportrosen>>>fromtgoimporttgo>>>bounds=[(0,2),(0,2),(0,2),(0,2),(0,2)]>>>result=shgo(rosen,bounds)>>>result.x,result.fun(array([1.,1.,1.,1.,1.]),2.9203923741900809e-18)Note that bounds determine the dimensionality of the objective function and is therefore a required input, however you can specify empty bounds usingNoneor objects like numpy.inf which will be converted to large float numbers.
Package: tg-option-container
Container for dictionary-like validated data structuresDocumentation is available on Read the Docs:http://tg-option-container.readthedocs.ioGetting startedInstall tg-option-container:pipinstalltg-option-containerThen use it in your project:fromtg_option_containerimportOption,OptionContainerclassCharacter(OptionContainer):props=[Option.string('name',None),Option.string('gender',None,choices=('M','N')),]john=Character(name='John Smith',gender='M')# This will raise: tg_option_container.types.InvalidOption: Invalid choice x for option `gender`, choices are ('M', 'N').mary=Character(name='Mary Smith',gender='x')DevelopmentYou can run the tests by runningtoxin the top-level of the
project.
Package: tgp
THERE IS NO CODE YET. I'm just namesquatting while planning so I don't have to rename everything later. Check back next week for first implementation.Terminal Game PlatformA simple platform to handle some of the annoying implementation details of creating a terminal based game.Quick-startInstallationFrom sourceClone this repo: (https://github.com/terminal-game-platform/launcher)Runpip install .orsudo pip3 install .in the root directoryDevelopment-Contribution guideInstalling development dependenciesThere are a few dependencies you will need to use this package fully, they are specified in the extras require parameter in setup.py but you can install them manually:nox   	# Used to run automated processes
pytest 	# Used to run the test code in the tests directory
mkdocs	# Used to create HTML versions of the markdown docs in the docs directoryJust go through and runpip install <name>orsudo pip3 install <name>. These dependencies will help you to automate documentation creation, testing, and build + distribution (through PyPi) automation.Folder StructureA Brief explanation of how the project is set up for people trying to get into developing for it/tgpContains all the first party modules used in tgp/docsContains markdown source files to be used withmkdocsto create html/pdf documentation./testsContains tests to be run before releaseRoot Directorysetup.py: Contains all the configuration for installing the package via pip.LICENSE: This file contains the licensing information about the project.CHANGELOG.md: Used to create a changelog of features you add, bugs you fix etc. as you release.mkdocs.yml: Used to specify how to build documentation from the source markdown files.noxfile.py: Used to configure various automated processes usingnox, these include;Building release distributionsReleasing distributions on PyPiRunning test suite agains a number of python versions (3.5-current)If anything to do with deployment or releases is failing, this is likely the suspect.There are 4 main sessions built into the noxfile and they can be run usingnox -s <session name>i.e.nox -s test:build: Creates a source distribution, builds the markdown docs to html, and creates a universal wheel distribution for PyPi.release: First runs the build session, then asks you to confirm all the pre-release steps have been completed, then runstwineto upload to PyPitest: Runs the tests specified in /tests using pytest, and runs it on python versions 3.5-3.8 (assuming they are installed)docs: Serves the docs on a local http server so you can validate they have the content you want without having to fully build them..gitignore: A preconfigured gitignore file (info on .gitignore files can be found here:https://www.atlassian.com/git/tutorials/saving-changes/gitignore)
Package: tgpirobot
🤖 TGPIROBOT - Telegram Auto Reply Bottgpirobot is a Python library that allows you to auto-reply to messages on Telegram when you are offline!🚀 FeaturesSend automatic replies when offline ✔️Block spammers who send too many messages ❌️Reply with jokes, quotes to engage users 🃏Get notifications when someone messages you 📨Customize replies easily!Demo of tgpirobot auto-replying on Telegram📥 Installationpipinstalltgpirobotgitclonehttps://github.com/hk4crprasad/tgpirobot.gitcdtgpirobot/tgpirobot
pythonmain.py-rUpdatepipinstall--upgradepirobotORpythonmain.py--update🤹 UsageGet API CredentialsVisitmy.telegram.organd loginGo to API Development toolsCreate a new appCopyapi_idandapi_hashRun the BotYourAPI_ID:YOUR_API_IDYourAPI_HASH:YOUR_API_HASHDebugmode(true/false):trueorfalse(falseisgood)Handlername(Telegram/insta/github):githubLink:https://github.com/hk4crprasadNow your account will auto-reply when offline! 🎉Its ask for Number and OtpAlso can be used likefrom tgpirobot import TgPiRobot🧑 AuthorMade with ❤️ byhk4crprasad📄 LicenseGPL-3.0
Package: tg-profiler
TurboGears ProfilerTurboGears Profiler (tg-profiler) is a TurboGears 1 extension aiming to provide
better profiling options to TG applications. It focus on lightweight profiling
which can be used in production environment, with very little overhead to the application.TurboGears Profiler is still a work in progress, and util the release of version 1.0.0, the API can
be hardly changed, without backwards-compatibility.Installation$pipinstalltg-profilerFeaturesMemory Snapshot saving as a CSV fileLicenseLicensed under the MIT licenseMIT License (MIT)
Copyright © 2015 Sthima,http://www.sthima.com.brPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 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 IN THE SOFTWARE.
Package: tgpt2
tgpt2AI for allfromtgpt2importTGPTbot=TGPT()resp=bot.chat('<Your prompt>')print(resp)# Output : How may I help you.This project allows you to interact with AI (LLaMA) without API Key.The nametgpt2is inherited from it's parent projecttgptwhich runs ongolang.PrerequisitePython>=3.9Installation and usageInstallationPick either of the following ways to get started.From pypi:pip install tgpt2Direct from sourcepip install git+https://github.com/Simatwa/tgpt2.gitClone and Installgit clone https://github.com/Simatwa/tgpt2.git
cd tgp2
pip install .UsageThis package features a ready to use commandline interface.Quick responsepython -m tgpt2 generate "<Your prompt>"Interactive modepython -m tgpt2 interactiveInstead ofpython -m tgpt2, ypu can as well use justtgpt2Developer DocsGenerate a quick responsefromtgpt2importTGPTbot=TGPT()resp=bot.chat('<Your prompt>')print(resp)# Output : How may I help you.Get back whole responsefromtgpt2importTGPTbot=TGPT()resp=bot.ask('<Your Prompt')print(resp)# Output"""{'completion': "I'm so excited to share with you the incredible experiences...", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}"""Stream ResponseJust add parameterstreamwith valuetrue.Text Generated onlyfromtgpt2importTGPTbot=TGPT()resp=bot.chat('<Your prompt>',stream=True)forvalueinresp:print(value)# output"""How mayHow may I helpHow may I help youHow may I help you today?"""Whole Responsefromtgpt2importTGPTbot=TGPT()resp=bot.ask('<Your Prompt>',stream=True)forvalueinresp:print(value)# Output"""{'completion': "I'm so", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}{'completion': "I'm so excited to share with.", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}{'completion': "I'm so excited to share with you the incredible ", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}{'completion': "I'm so excited to share with you the incredible experiences...", 'stop_reason': None, 'truncated': False, 'stop': None, 'model': 'llama-2-13b-chat', 'log_id': 'cmpl-3NmRt5A5Djqo2jXtXLBwJ2', 'exception': None}"""Note: At the time of wriiting this, Chatting conversational is not supportedAcknowledgementstgptYou
Package: tg-pubsub
tg-pubsubEasy pubsub for django models using redis messaging queue.Free software: ISC licenseDocumentation:https://tg-pubsub.readthedocs.org.FeaturesCan mark own models as listenableCan mark external models as listenableBuiltin pubsub serverCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.2 (2016-03-03)Add support for automatic pings via (TG_PUBSUB_PING_DELTA)0.1.1 (2016-01-22)Fixed some typos0.1.0 (2016-01-21)First PyPI release0.1.0-dev (2016-01-19)Initial implementation