Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A Tensorflow/Keras callback which sends information about your model training, on various messaging platforms.
Using pip
:
pip install keras-notify
Import the required module and add it to the list callbacks while training your model.
Example:
>>> from keras-notify import TelegramCallback
>>> telegram_callback = TelegramCallback('<BotToken>',
'<ChatID>',
'CNN Model',
['loss', 'val_loss'],
['accuracy', 'val_accuracy'],
True)
>>> model.fit(x_train, y_train,
batch_size=32,
epochs=10,
validation_data=(x_test, y_test),
callbacks=[telegram_callback])
/help
to get list of all commands./newbot
to create a new bot and complete the setup.https://api.telegram.org/bot<BOT_TOKEN>/getUpdates
(replace <BOT_TOKEN> with your bot token)chat id
of the user you want to send messages to.chat id
only if you send the message first and then go to the above url.TelegramCallback()
class.TelegramCallback(bot_token=None, chat_id=None, modelName='model', loss_metrics=['loss'], acc_metrics=[], getSummary=False):
Arguments:
bot_token
: unique token of Telegram bot {str}
chat_id
: Telegram chat id you want to send message to {str}
modelName
: name of your model {str}
loss_metrics
: loss metrics you want in the loss graph {list of strings}
acc_metrics
: accuracy metrics you want in the accuracy graphs {list of strings}
getSummary
: Do you want message for each epoch (False) or a single message containing information about all epochs (True). {bool}
SlackCallback()
class.SlackCallback(bot_token=None, chat_id=None, modelName='model', loss_metrics=['loss'], acc_metrics=[], getSummary=False):
Arguments:
webhookURL
: unique webhook URL of the app {str}
channel
: channel name or username you want to send message to {str}
modelName
: name of your model {str}
loss_metrics
: loss metrics you want in the loss graph {list of strings}
acc_metrics
: accuracy metrics you want in the accuracy graph {list of strings}
getSummary
: Do you want message for each epoch (False) or a single message containing information about all epochs (True). {bool}
Sending images in Slack is not supported currently.
FAQs
A small notification package providing keras events on Telegram or Slack
We found that keras-notify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.