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
| 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
| 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
| #!/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
| 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
| 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 | |
| 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 random | |
| import sys | |
| def build_chain(text, chain = {}): | |
| words = text.split(' ') | |
| index = 1 | |
| for word in words[index:]: | |
| key = words[index - 1] | |
| if key in chain: | |
| chain[key].append(word) |
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
| if __name__ == '__main__': | |
| message = read_file(sys.argv[1]) | |
| chain = build_chain(message) | |
| message = generate_message(chain) | |
| write_file("output.txt", message) |
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 write_file(filename, message): | |
| with open(filename, "w") as file: | |
| file.write(message) |