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 hidden or 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 hidden or 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 hidden or 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 |
OlderNewer