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 boto3 | |
| access_key = "YOUR_ACCESS_KEY" | |
| access_secret = "YOUR_ACCCESS_SECRET" | |
| region ="YOUR_REGION" | |
| queue_url = "YOUR_QUEUE_URL" | |
| def post_message(client, message_body, url): | |
| response = client.send_message(QueueUrl = url, MessageBody= message_body) |
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 boto3 | |
| access_key = "YOUR_ACCESS_KEY" | |
| access_secret = "YOUR_ACCCESS_SECRET" | |
| region ="YOUR_REGION" | |
| queue_url = "YOUR_QUEUE_URL" | |
| def build_speechlet_response(title, output, reprompt_text, should_end_session): | |
| return { | |
| 'outputSpeech': { |
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 boto3 | |
| import os | |
| import time | |
| access_key = "ACCESS_KEY" | |
| access_secret = "ACCESS_SECRET" | |
| region = "REGION" | |
| queue_url = "QUEUE_URL" | |
| def pop_message(client, url): |
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
| #!/bin/bash | |
| tvservice -o |
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
| def calculate_single_body_acceleration(self, body_index): | |
| G_const = 6.67408e-11 #m3 kg-1 s-2 | |
| acceleration = point(0,0,0) | |
| target_body = self.bodies[body_index] | |
| k1 = point (0,0,0) | |
| k2 = point (0,0,0) | |
| k3 = point (0,0,0) | |
| k4 = point (0,0,0) | |
| tmp_loc = point (0,0,0) |
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 math | |
| import random | |
| import matplotlib.pyplot as plot | |
| from mpl_toolkits.mplot3d import Axes3D | |
| class point: | |
| def __init__(self, x,y,z): | |
| self.x = x | |
| self.y = y | |
| self.z = z |
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
| // Controls a threaded stepper motor to open levered board at same rate the earth spins | |
| // for astrophotograph. | |
| byte directionPin = 3; | |
| byte stepPin = 2; | |
| byte ledPin = 13; | |
| float adjacent = 0.24; | |
| float earth_rads_per_s = 0.00007272205; |
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
| client_id = 'Your Genius Client ID' | |
| client_secret = 'Your Genius Client Secret' | |
| client_access_token = 'Your Genius Access Token' | |
| import plot_albums | |
| import string | |
| import requests | |
| import nltk | |
| from sys import argv | |
| from bs4 import BeautifulSoup |
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 matplotlib.pyplot as plt | |
| from matplotlib import rcParams | |
| def plot_album_ngrams(albums, artist): | |
| pos = list(range(len(albums))) | |
| width = 0.25 | |
| rcParams.update({'figure.autolayout': True}) | |
| fig, ax = plt.subplots(figsize=(12,6)) |
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
| # External module imp | |
| import RPi.GPIO as GPIO | |
| import datetime | |
| import time | |
| init = False | |
| GPIO.setmode(GPIO.BOARD) # Broadcom pin-numbering scheme | |
| def get_last_watered(): |