- Define a question
- Gather information and resources (observe)
- Form an explanatory hypothesis
- Test the hypothesis by performing an experiment and collecting data in a reproducible manner
- Analyze the data
- Interpret the data and draw conclusions that serve as a starting point for new hypothesis
- Publish results
- Retest (frequently done by other scientists)
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
| import os | |
| import random | |
| from datetime import datetime as date | |
| def get_voice(): | |
| # "Samantha" | |
| return "Tessa" | |
| def run_voice_command(text, voice): | |
| return os.system("say \"%s\" --voice=%s" % (text.encode('utf-8'), voice)) |
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
| import feedparser | |
| import os | |
| import random | |
| from talker import say_text | |
| from talker import greeting | |
| def get_entries(url): | |
| return feedparser.parse(url).entries | |
| def format_entry(entry): |
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
| say "I am your father" | |
| say "Nooooooooo" |
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
| between | |
| not between | |
| equal to | |
| not equal to | |
| greater than | |
| less than | |
| greater than or equal to | |
| less than or equal to |
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
| var Client = require('ssh2').Client; | |
| var conn = new Client(); | |
| conn.on('ready', function() { | |
| console.log('Client :: ready'); | |
| conn.shell(function(err, stream) { | |
| if (err) throw err; | |
| stream.on('close', function() { | |
| console.log('Stream :: close'); | |
| conn.end(); |
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
| { | |
| "name": "connection-helper", | |
| "version": "0.0.1", | |
| "description": "Execute shell commands on one or more remote computers via SSH", | |
| "license": "MIT", | |
| "scripts": { | |
| "start": "node index.js" | |
| }, | |
| "dependencies": { | |
| "ssh2": "0.5.5" |
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
| ssh $(vagrant ssh-config | awk 'NR>1 {print " -o "$1"="$2}') localhost |
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
| import feedparser | |
| import os | |
| import random | |
| import time | |
| from bs4 import BeautifulSoup | |
| def download_file(url): | |
| os.system('curl -o index.html %s' % url) | |
| def get_entries(url): |
tail -f /var/log/td-agent/td-agent.log # Look at the Fluetd logs
cat /etc/td-agent/td-agent.conf # Look at the configuration of the Fluentd agent
/etc/init.d/td-agent restart # Restart the Fluentd agent
/usr/sbin/td-agent-gem install fluent-plugin-sql # Install libraries