This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is an example of how to send data to Slack webhooks in Python with the | |
requests module. | |
Detailed documentation of Slack Incoming Webhooks: | |
https://api.slack.com/incoming-webhooks | |
''' | |
import json | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is an example of the server-side logic to handle slash commands in | |
Python with Flask. | |
Detailed documentation of Slack slash commands: | |
https://api.slack.com/slash-commands | |
Slash commands style guide: | |
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.path import Path | |
from matplotlib.spines import Spine | |
from matplotlib.projections.polar import PolarAxes | |
from matplotlib.projections import register_projection | |
def radar_factory(num_vars, frame='circle'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_dump -Fc -v -U user_name -d db_name -t table_name > /path/to/file.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is an example of how to use the Slack Real Time Messaging API using | |
Python and the python-slackclient. | |
The example below originates from the python-slackclient documentation. | |
See https://github.com/slackhq/python-slackclient#real-time-messaging | |
This is everything you can do with the client: | |
Connect to a Slack RTM websocket. This is a persistent connection from which you can read events. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
______ ______ ______ __ __ __ ______ | |
/\ == \ /\ __ \ /\__ _\ /\ \/ / /\ \ /\__ _\ | |
\ \ __< \ \ \/\ \ \/_/\ \/ \ \ _"-. \ \ \ \/_/\ \/ | |
\ \_____\ \ \_____\ \ \_\ \ \_\ \_\ \ \_\ \ \_\ | |
\/_____/ \/_____/ \/_/ \/_/\/_/ \/_/ \/_/ | |
This is a sample Slack bot built with Botkit. | |
This bot demonstrates many of the core features of Botkit: | |
* Connect to Slack using the real time API | |
* Receive messages based on "spoken" patterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
______ ______ ______ __ __ __ ______ | |
/\ == \ /\ __ \ /\__ _\ /\ \/ / /\ \ /\__ _\ | |
\ \ __< \ \ \/\ \ \/_/\ \/ \ \ _"-. \ \ \ \/_/\ \/ | |
\ \_____\ \ \_____\ \ \_\ \ \_\ \_\ \ \_\ \ \_\ | |
\/_____/ \/_____/ \/_/ \/_/\/_/ \/_/ \/_/ | |
This is a sample Slack bot built with Botkit. | |
This bot demonstrates many of the core features of Botkit: | |
* Connect to Slack using the real time API | |
* Receive messages based on "spoken" patterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib | |
import requests | |
from pprint import pprint | |
from os.path import expanduser | |
headers = { | |
'Content-Type': 'application/octet-stream', | |
'Ocp-Apim-Subscription-Key': 'your-api-key', |
NewerOlder