https://github.com/daskol/telepyth

Telegram notification with IPython magics.

https://github.com/daskol/telepyth

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

boltdb bot golang ipython ipython-magic jupyter jupyter-notebook telegram telegram-bot telegram-notification
Last synced: 5 months ago · JSON representation

Repository

Telegram notification with IPython magics.

Basic Info
  • Host: GitHub
  • Owner: daskol
  • License: mit
  • Language: Go
  • Default Branch: main
  • Homepage:
  • Size: 167 KB
Statistics
  • Stars: 59
  • Watchers: 2
  • Forks: 3
  • Open Issues: 4
  • Releases: 1
Topics
boltdb bot golang ipython ipython-magic jupyter jupyter-notebook telegram telegram-bot telegram-notification
Created almost 9 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

TelePyth

Telegram notification with IPython magics.

Overview

TelePyth (named /teləˈpaɪθ/) — a Telegram bot that is integrated with IPython. It provides an ability to send any text notification to user from Jupyter notebook or IPython CLI.

Bot Commands

Start chat with @telepyth_bot and get access token using /start command. TelePyth Bot understands some other simple commands. Type

  • /start to begin interaction with bot;
  • /revoke to revoke token issued before;
  • /last to get current valid token or nothing if there is no active one;
  • /help to see help message and credentials.

Usage

TelePyth command is available as an IPython magic command which could be used in Jupyter notebook as well as in plain IPython, qtconsole etc. TelePyth package could be also used directly in Python. And also, there is an HTTP API through which all the things works.

shell pip install --extra-index-url https://mirror.daskol.xyz/pypi/ telepyth

IPython Magics

It is easy to send messages after token is issued. Just install telepyth package by pip install telepyth, import it and notify

```python import telepyth

%telepyth -t 123456789 %telepyth 'Very magic, wow!' ```

HuggingFace Intergration

TelePyth also provides a trainer callback for HuggingFace's transformers. There are several usage scenario. The first one is via setting reporting method in TrainingArguments.

```python import telepyth.interaction import transformers

args = TrainingArguments(outputdir, reportto=['telepyth']) ```

For more fine-grained control on how and when callback should report metrics, one can set up callback directly in a list of callbacks.

python callback = TelePythCallback(label='finetune', policy='last') trainer = Trainer(callbacks=[callback]) trainer.train()

TelePyth Client

TelepythClient allows to send notifications, figures and markdown messages directly without using magics.

```python from telepyth import TelepythClient

tp = TelepythClient() tp.sendtext('Hello, World!') # notify with plain text tp.sendtext('bold text and then italic') # or with markdown formatted text tp.sendfigure(somepyplot_figure, 'Awesome caption here!') # or even with figure ```

CLI

TelePyth package also provide command line interface (CLI). It is similar to IPython magic. For example, one can send notifcation as following.

shell telepyth -t 31415926 "Moar notifications!"

HTTP API

Note that you can use TelePyth to send notifications via Telegram without any wrappers and bindings. This is useful for bash scripting. Just request TelePyth backend directly to notify user. For instance, to send message from bash:

shell curl https://daskol.xyz/api/notify/<access_token_here> \ -X POST \ -H 'Content-Type: plain/text' \ -d 'Hello, World!' See more examples and usage details here.

Credentials

© Daniel Bershatsky <daniel.bershatsky@skolkovotech.ru>, 2017-2022

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 76
  • Total Committers: 5
  • Avg Commits per committer: 15.2
  • Development Distribution Score (DDS): 0.105
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Daniel Bershatsky d****y@s****u 68
maremun m****n@g****m 4
Andrew Grigorev a****w@e****u 2
Daniel Bershatsky d****y@g****m 1
Daniel Bershatsky d****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 6
  • Total pull requests: 4
  • Average time to close issues: 22 days
  • Average time to close pull requests: 5 days
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.25
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ei-grad (3)
  • daskol (3)
Pull Request Authors
  • ei-grad (2)
  • daskol (1)
  • maremun (1)
Top Labels
Issue Labels
enhancement (3) bug (1) help wanted (1)
Pull Request Labels
enhancement (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 8 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 16
  • Total maintainers: 1
proxy.golang.org: github.com/daskol/telepyth
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 3.2%
Forks count: 5.5%
Average: 6.3%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
pypi.org: telepyth

TelePyth: Telegram notifications in Python.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 8 Last month
Rankings
Stargazers count: 8.8%
Dependent packages count: 10.1%
Forks count: 16.9%
Average: 18.5%
Dependent repos count: 21.5%
Downloads: 35.3%
Maintainers (1)
Last synced: 6 months ago