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 urllib.request, os, praw, datetime | |
from bs4 import BeautifulSoup | |
from sys import argv | |
script, sub, lim = argv | |
r = praw.Reddit(user_agent = 'RedditScraper1.0 by /u/I_Am_Treebeard') | |
subreddit = r.get_subreddit(sub) | |
directory = '/Users/admin/desktop/%s (%s)' % (sub, datetime.date.today()) | |
if not os.path.exists(directory): os.makedirs(directory) | |
collectpath = directory + '/All_Pictures' |
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
int latch = 7; //signals controller to latch button states | |
int pulse = 5; //toggle to shift out button states | |
int data = 9; //data in line | |
int data_byte; //byte that stores button states | |
int count[] = {0,0,0,0,0,0,0,0}; //each value stores 1 or 0 indicating whether a key is currently pressed | |
char keys[] = {'a','b','s','d','u','j','l','r'}; //keyboard keys to be pressed | |
int tempbit; //iterates over the data_byte to grab each button's state | |
void setup() { | |
pinMode(latch, OUTPUT); |
NewerOlder