https://github.com/louishenrifranc/facebooklog
Send plots and logs of your training model to your Messenger account
https://github.com/louishenrifranc/facebooklog
facebook logs machine-learning messenger plot plots send
Last synced: about 1 year ago
JSON representation
Send plots and logs of your training model to your Messenger account
- Host: GitHub
- URL: https://github.com/louishenrifranc/facebooklog
- Owner: louishenrifranc
- License: mit
- Created: 2016-12-28T15:24:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-28T15:52:35.000Z (over 9 years ago)
- Last Synced: 2025-02-09T20:17:34.615Z (over 1 year ago)
- Topics: facebook, logs, machine-learning, messenger, plot, plots, send
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
* Simple script to send plots and logs via Facebook Messenger.
* Extend the idea of  for Messenger.
* Usage for ML/DL: __Get noticed when training tasks is over.__
## Installation
```bash
git clone https://github.com/louishenrifranc/facebooklog.git
cd facebooklog
python setup.py install
```
## Usage
### Create a MessengerLog object
Need a facebook account (email, password)
```python
messenger = MessengerLog(username, password)
```
If you want to send to a thread group, fill the parameter ```thread_id```, with the thread id of the conversation, otherwise logs are sent to the same account as the sender.
### Send pyplot plot
```python
X, y = [], []
for x in xrange(100):
X.append(x)
y.append(x * 2)
plt.plot(X, y)
messenger.send_plot(caption='New plot')
```
### Log console outputs
* Replace all calls to ```print()``` by a call to the ```MessengerLog``` object.
* Send all the logs at the end with the command:
```python
messenger.send_log_file()
```
### Send a single message
```python
messenger.send_msg("Min loss: %f" % min_loss)
```