Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
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
class MyLogger(object): | |
def debug(self, msg): | |
pass | |
def warning(self, msg): | |
pass | |
def error(self, msg): | |
#job = get_current_job() | |
#job.meta['progress'] = msg |
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
from subprocess import Popen, PIPE | |
cmd = 'python some_python_script.py' | |
p = subprocess.Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
stdout, stderr = p.communicate() | |
stdout.splitlines() |
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
# coding: utf-8 | |
""" | |
websocket connection to watson speech-to-text API | |
adapted from: https://github.com/watson-developer-cloud/speech-to-text-websockets-python | |
speech recognition using the WebSocket interface to the Watson Speech-to-Text service | |
This is an updated version of the sample websocket connection created by the IBM Watson team (@daniel-bolanos) and included in their documentation. | |
Main changes: |
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
from slackclient import SlackClient | |
import json | |
import requests | |
# Store your data output/analysis as a variable named 'attachment' | |
# See: https://api.slack.com/docs/messages | |
attachment = {"text": "And, here is an attachment"} | |
# Output to json, if in other format |
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 os | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import plotly | |
import plotly.plotly as py | |
import plotly.graph_objs as go | |
from plotly.graph_objs import * | |
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot | |
import plotly.tools as tls |
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 os | |
import traceback | |
import logging | |
import facebook | |
import requests | |
import pandas as pd | |
import json | |
import time | |
import numpy as np | |
from pandas.io.json import json_normalize |
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
web: NODE_ENV=production node server.js |
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
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
NewerOlder