diff --git a/.gitignore b/.gitignore index 7613256..7505e99 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ __pycache__ wifi*.json config.json +cmd.exe.lnk +tilda_tools.bat \ No newline at end of file diff --git a/DevRant/main.py b/DevRant/main.py new file mode 100644 index 0000000..00920aa --- /dev/null +++ b/DevRant/main.py @@ -0,0 +1,82 @@ +"""DevRant Client for TiLDA-MK4 +""" +___name___ = "DevRant" +___license___ = "MIT" +___dependencies___ = ["app", "wifi", "http", "ugfx_helper"] +___categories___ = ["Other"] +___launchable___ = True + +import ugfx, wifi, http, json, utime, ugfx_helper, dialogs, app + +char_ln = 25 +ln_pg = 19 + +def loop(): + skip = 0 + while True: + ugfx.clear(ugfx.html_color(0x544c6d)) + data= json.loads(http.get("https://devrant.com/api/devrant/rants?app=3&sort=top&range=day&limit=1&skip="+str(skip)).raise_for_status().content)["rants"][0] + + text=data["text"].split(" ") + screens = [[]] + line = "" + screen = 0 + for word in text: + if len(line+word)+1 >= char_ln: + if len(screens[screen]) >= ln_pg: + screen+=1 + screens.append([]) + screens[screen].append(line) + line=word + else: + line = line + " " + word + if len(screens[screen]) < ln_pg: + screens[screen].append(line) + else: + screens.append([line]) + + + hold=True + page = 0 + while hold: + ugfx.clear(ugfx.html_color(0x544c6d)) + ugfx.area(0,0,240,35,ugfx.html_color(0x41476d)) + ugfx.text(5,5,str(data["score"])+"++ " + data["user_username"] + ":",ugfx.BLACK) + + ugfx.text(5,20,"Page: " + str(page+1) + "/" + str(len(screens)),ugfx.BLACK) + count = 0 + for line in screens[page]: + ugfx.text(5,35+count*15,line,ugfx.BLACK) + count+=1 + hold_btn = True + while hold_btn: + if tilda.Buttons.is_pressed(tilda.Buttons.BTN_Menu): + return + if tilda.Buttons.is_pressed(tilda.Buttons.BTN_A): + skip += 1 + hold_btn = False + hold = False + while tilda.Buttons.is_pressed(tilda.Buttons.BTN_A): + utime.sleep_ms(10) + if tilda.Buttons.is_pressed(tilda.Buttons.JOY_Right): + if page < len(screens)-1: + page += 1 + hold_btn = False + while tilda.Buttons.is_pressed(tilda.Buttons.JOY_Right): + utime.sleep_ms(10) + if tilda.Buttons.is_pressed(tilda.Buttons.JOY_Left): + if page > 0: + page -= 1 + hold_btn = False + while tilda.Buttons.is_pressed(tilda.Buttons.JOY_Left): + utime.sleep_ms(10) + + +ugfx_helper.init() +ugfx.clear() +ugfx.text(5,5, "DevRant for the TiLDA Mk4", ugfx.BLACK) +ugfx.text(5, 40, "Connecting To WIFI", ugfx.BLACK) +wifi.connect() +ugfx.text(5, 40, "Connecting To WIFI", ugfx.WHITE) +loop() +app.restart_to_default() diff --git a/badge_store/main.py b/badge_store/main.py index 5c158c1..5708631 100644 --- a/badge_store/main.py +++ b/badge_store/main.py @@ -90,7 +90,7 @@ def show_update(): update = prompt_boolean("Do you want to update all apps on this badge?", title="Update all Apps", true_text="OK", false_text="Back") if update: clear() - with WaitingMessage(title="Updating Apps...", text="Getting updates...") as message: + with WaitingMessage(title=title, text="Getting updates...") as message: update_text = "Downloading files:" installers = store.install(_get_current_apps()) n = len(installers) diff --git a/bf-interpreter/main.py b/bf-interpreter/main.py new file mode 100644 index 0000000..c409026 --- /dev/null +++ b/bf-interpreter/main.py @@ -0,0 +1,208 @@ +"""Simple brainfuck (an esoteric programming language) interpreter. + +Runs very slowly... prints sierpinski triangle""" + +___name___ = "bf interpreter" +___license___ = "MIT" +___dependencies___ = ["sleep", "app"] +___categories___ = ["Other"] + +import ugfx, os, time, sleep, app +from tilda import Buttons +from time import sleep_ms + +# initialize screen +ugfx.init() +ugfx.clear() + +ugfx.set_default_font(ugfx.FONT_TITLE) + + +Prog=""" + +>-[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>++[-]->>>>+>>>+>>>+>>>+>>>+> + >>+>>>+>>>+>>>++[-<+]-<<<<+<<++++[->++++++++<]<++[------>+<]>++<<+[--->++<]>++ +<<-[--->+<]>------<+[-<+]-<[>>+[->+]-<[-]<<[-]+++[>[-]++++++++++.[-]+++[>+[>>+<< +-]>>[<<++[-<+]->++[->+]->-]<<+[-<+]->-[-[-[-[-[-[-[-[->>>]>>>]>>>]>>>]>>>]>>>]>> +>]>>>]>>>>>>>>>>>>>>>>>>>>> > > > > > > > > > > > > >>>>>>>>>>[+[-<+]-<<<<<<.>>> +>>>>]>[+[-<+]-<<<< <<<.>>>>>>>>]>[+[- +<+]-<<<<<<<<.>>> tic tac toe >>>>>>]+[-<+]-<< +<<<.>>>-]<-]+++ to play: type a number (1 to 9) to +++++++.[-]<<<< +<<[<<<<<<<<<<<+ place an X at that grid location [--->++<]>+++.[ +->+++++++<]>.++ ++++.-[---->+<] +>+++.---[->+++<] [ http://mitxela.com/ ] >.+++[->++++<]>+ +.+++++.-[->+++++<] >.[--->+<]>-.+[-<+ +]-<[-]>>>>]<[<<<<<<<++++[++++>---<]>+.[++++>---<]>-.+++[->+++<]>++.+[--->+<]>+.+ +[---->+<]>+++.[--->+<]>-.[-]+[-<+]-<[-]>>>>]<[<<<<<<<<<<+[--->++<]>+++.[->++++++ ++<]>.++++++.-[---->+<]>+++.++++++[->++<]>.+[--->+<]>.++++.++++[->+++<]>.--[--->+ +<]>.[--->+<]>-.+[-<+]-<[-]>>>>]<+[-<+]-<[>>->>>>>>+[-<<<<[-]<<[-]>>>>-[>>[-]+<<+ +<[-]<[-]<[-]<[-]-[----->+<]>---<,>[-<->]<[>>+>+<<<-]>>[<<+>>-]+++++++++[->-[<<]> +]>>-]<<<<[-]>>>>[-]+<<<<<<[>>+>+<<<-]>>[<<+>>-]>>]>>-<<<[-]<<[<->-]<-[-[-[-[-[-[ +-[-[->>>]>>>]>>>]>>>]>>>]>>>]>>>]>>>]]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +>[->++[-<+]->>>>>[>>>[>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>>>>[> +>>[>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>>>>>>>>>>>>>[>>>[>>>[+[- +<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<[-] +++[->+]->]]]+[-<+]->>>>>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+ +[-<+]->>>>>>>>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>> +>[>>>>>>>>>>>>[>>>>>>>>>>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>[>> +>>>>[>>>>>>[+[-<+]-<<<<<<<<<[-]++[->+]->]]]+[-<+]-<<<<<<<<<-[++[->+]-<<<<<<<<<<[ +-]++[->+]->>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->]+[-<+]->>>>>>>[+[-<+]-<<<<<<<<<<[-]+ +[->+]->]+[-<+]->>>>>>>>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->]+[-<+]->>>>>>>>>>>>>[+[-< ++]-<<<<<<<<<<[-]+[->+]->]+[-<+]->>>>>>>>>>>>>>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->]+[ +-<+]->>>>>>>>>>>>>>>>>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->]+[-<+]->>>>>>>>>>>>>>>>>>> +>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->]+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>>[+[-<+]-<<<<<<< +<<<[-]+[->+]->]+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>>>>>[+[-<+]-<<<<<<<<<<[-]+[->+]->] ++[-<+]-<<[-]>[-]+>>>>>>[>>>[>>[+[-<+]-<[-]<[-]++++[->+]->]]]>+[-<+]->>>>>[>>[>>> +>[+[-<+]-<[-]<[-]+++[->+]->]]]>+[-<+]->>>>[>>>>[>>>[+[-<+]-<[-]<[-]++[->+]->]]]> ++[-<+]->>>>>>>>>>>>>>[>>>[>>[+[-<+]-<[-]<[-]+++++++[->+]->]]]>+[-<+]->>>>>>>>>>> +>>>[>>[>>>>[+[-<+]-<[-]<[-]++++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>[>>>>[>>>[+[-<+] +-<[-]<[-]+++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>>[>>>[>>[+[-<+]-<[-]<[-]++ +++++++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>>[>>[>>>>[+[-<+]-<[-]<[-]+++++++ +++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>[>>>>[>>>[+[-<+]-<[-]<[-]++++++++[->+] +->]]]>+[-<+]->>>>>[>>>>>>>>>[>>>>>>>>[+[-<+]-<[-]<[-]++++++++[->+]->]]]>+[-<+]-> +>>>>[>>>>>>>>[>>>>>>>>>>[+[-<+]-<[-]<[-]+++++[->+]->]]]>+[-<+]->>>>[>>>>>>>>>>[> +>>>>>>>>[+[-<+]-<[-]<[-]++[->+]->]]]>+[-<+]->>>>>>>>[>>>>>>>>>[>>>>>>>>[+[-<+]-< +[-]<[-]+++++++++[->+]->]]]>+[-<+]->>>>>>>>[>>>>>>>>[>>>>>>>>>>[+[-<+]-<[-]<[-]++ +++++[->+]->]]]>+[-<+]->>>>>>>[>>>>>>>>>>[>>>>>>>>>[+[-<+]-<[-]<[-]+++[->+]->]]]> ++[-<+]->>>>>>>>>>>[>>>>>>>>>[>>>>>>>>[+[-<+]-<[-]<[-]++++++++++[->+]->]]]>+[-<+] +->>>>>>>>>>>[>>>>>>>>[>>>>>>>>>>[+[-<+]-<[-]<[-]+++++++[->+]->]]]>+[-<+]->>>>>>> +>>>[>>>>>>>>>>[>>>>>>>>>[+[-<+]-<[-]<[-]++++[->+]->]]]>+[-<+]->>>>>[>>>>>>>>>>>> +[>>>>>>>>>>>[+[-<+]-<[-]<[-]++++++++++[->+]->]]]>+[-<+]->>>>[>>>>>>>>>>>>>[>>>>> +>>>>>>>[+[-<+]-<[-]<[-]++[->+]->]]]>+[-<+]->>>>>>>>>>>[>>>>>>[>>>>>[+[-<+]-<[-]< +[-]++++++++[->+]->]]]>+[-<+]->>>>>>>>>>[>>>>>>>[>>>>>>[+[-<+]-<[-]<[-]++++[->+]- +>]]]>+[-<+]->>>>>>[>>>[>[+[-<+]-<[-]<[-]++++[->+]->]]]>+[-<+]->>>>>>[>[>>>>>[+[- +<+]-<[-]<[-]+++[->+]->]]]>+[-<+]->>>>[>>>>>[>>>[+[-<+]-<[-]<[-]++[->+]->]]]>+[-< ++]->>>>>>>>>>>>>>>[>>>[>[+[-<+]-<[-]<[-]+++++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>> +[>[>>>>>[+[-<+]-<[-]<[-]++++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>[>>>>>[>>>[+[-<+]-< +[-]<[-]+++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>[>>>[>[+[-<+]-<[-]<[-]++++ +++++++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>[>[>>>>>[+[-<+]-<[-]<[-]++++++++ ++[->+]->]]]>+[-<+]->>>>>>>>>>>>>>>>>>>>>>[>>>>>[>>>[+[-<+]-<[-]<[-]++++++++[->+] +->]]]>+[-<+]->>>>>>[>>>>>>>>>[>>>>>>>[+[-<+]-<[-]<[-]++++++++[->+]->]]]>+[-<+]-> +>>>>>[>>>>>>>[>>>>>>>>>>>[+[-<+]-<[-]<[-]+++++[->+]->]]]>+[-<+]->>>>[>>>>>>>>>>> +[>>>>>>>>>[+[-<+]-<[-]<[-]++[->+]->]]]>+[-<+]->>>>>>>>>[>>>>>>>>>[>>>>>>>[+[-<+] +-<[-]<[-]+++++++++[->+]->]]]>+[-<+]->>>>>>>>>[>>>>>>>[>>>>>>>>>>>[+[-<+]-<[-]<[- +]++++++[->+]->]]]>+[-<+]->>>>>>>[>>>>>>>>>>>[>>>>>>>>>[+[-<+]-<[-]<[-]+++[->+]-> +]]]>+[-<+]->>>>>>>>>>>>[>>>>>>>>>[>>>>>>>[+[-<+]-<[-]<[-]++++++++++[->+]->]]]>+[ +-<+]->>>>>>>>>>>>[>>>>>>>[>>>>>>>>>>>[+[-<+]-<[-]<[-]+++++++[->+]->]]]>+[-<+]->> +>>>>>>>>[>>>>>>>>>>>[>>>>>>>>>[+[-<+]-<[-]<[-]++++[->+]->]]]>+[-<+]->>>>>>[>>>>> +>>>>>>>[>>>>>>>>>>[+[-<+]-<[-]<[-]++++++++++[->+]->]]]>+[-<+]->>>>[>>>>>>>>>>>>> +>[>>>>>>>>>>>>[+[-<+]-<[-]<[-]++[->+]->]]]>+[-<+]->>>>>>>>>>>>[>>>>>>[>>>>[+[-<+ +]-<[-]<[-]++++++++[->+]->]]]>+[-<+]->>>>>>>>>>[>>>>>>>>[>>>>>>[+[-<+]-<[-]<[-]++ +++[->+]->]]]>+[-<+]-<[>>+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>>>>>[+[-<+]-<[-]<[-]+++++ ++++++[->+]->]+[-<+]->>>>>>>>>>>>>>>>>>>>>>[+[-<+]-<[-]<[-]++++++++[->+]->]+[-<+] +->>>>>>>>>>[+[-<+]-<[-]<[-]++++[->+]->]+[-<+]->>>>[+[-<+]-<[-]<[-]++[->+]->]+[-< ++]->>>>>>>>>>>>>>>>>>>>>>>>>[+[-<+]-<[-]<[-]+++++++++[->+]->]+[-<+]->>>>>>>>>>>> +>>>>>>>[+[-<+]-<[-]<[-]+++++++[->+]->]+[-<+]->>>>>>>>>>>>>[+[-<+]-<[-]<[-]+++++[ +->+]->]+[-<+]->>>>>>>[+[-<+]-<[-]<[-]+++[->+]->]+[-<+]->>>>>>>>>>>>>>>>[+[-<+]-< +[-]<[-]++++++[->+]->]+[-<+]->]>>+[-<+]-<<<<[+[->+]->>>>>>>>>>>>>>>>>[+[-<+]-<[-] +<[-]++[->+]->]+[-<+]->]>>>>+[-<+]-<<[>>>+[-<+]-<[-]<[+[-<+]->++[->+]-<<-]+[-<+]- +>-[-[-[-[-[-[-[-[->>>]>>>]>>>]>>>]>>>]>>>]>>>]>>>]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +>>>>>>>>>>>>>->>++[-<+]->]>>>>+[-<+]-<<[-]>>>+[-<+]-<<<<[-]>>>>>+[-<+]->>>>>>[>> +>[>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>>>>>[>>>[>>>[+[-<+]-<<< +<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>>>>>>>>>>>>>>[>>>[>>>[+[-<+]-<<<<<<<<<< +<[-]++[->+]->]]]+[-<+]->>>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]-> +]]]+[-<+]->>>>>>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]->]]]+[-<+]- +>>>>>>>>>>>>[>>>>>>>>>[>>>>>>>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>[ +>>>>>>>>>>>>[>>>>>>>>>>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]->]]]+[-<+]->>>>>>>>>>>>[> + >>>>>[>>>>>>[+[-<+]-<<<<<<<<<<<[-]++[->+]->]]]+[-<+]-<[-]]++[->+]->]+[-<+]-<+[ + -<+]-<]>>+[->+]->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+[-[-]<+]-<+[-[-]<+]-<+>] +""" + + + +# Hello World +#Prog="++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." + +# Sierpinski +Prog=""" +++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[ + -<<<[ + ->[+[-]+>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<< + ]>.>+[>>]>+ +]""" + + + + +buf="" +def output(t): + global buf + buf+=t + buf=buf[-(16*80):] + ugfx.clear() + lines=buf.split("\n") + lines=lines[-16:] + for i,v in enumerate(lines): + ugfx.text(5,i*20+5, v+" ", ugfx.BLACK) + +lastpushed=0 +def pushed(n): + global Tape, TP, waiting + if (waiting): + output(n+" \n") + Tape[TP]=ord(n) + waiting=False + + + +Buttons.enable_interrupt(Buttons.BTN_1, lambda button_id:pushed("1"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_2, lambda button_id:pushed("2"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_3, lambda button_id:pushed("3"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_4, lambda button_id:pushed("4"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_5, lambda button_id:pushed("5"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_6, lambda button_id:pushed("6"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_7, lambda button_id:pushed("7"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_8, lambda button_id:pushed("8"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_9, lambda button_id:pushed("9"), on_press=True, on_release=False) +Buttons.enable_interrupt(Buttons.BTN_0, lambda button_id:pushed("0"), on_press=True, on_release=False) + + + +output("Loading...") + + + + +waiting=False +Prog+='\0' +Tape=[0]*256 +PP=-1 +TP=0 +while True: + if (waiting): + sleep_ms(200) + else: + PP=PP+1 + if (PP>=len(Prog)): + waiting=True + output("END!") + elif (Prog[PP]=="+"): + Tape[TP]=Tape[TP]+1 + elif (Prog[PP] =="-"): + Tape[TP]=Tape[TP]-1 + elif (Prog[PP] ==">"): + TP=TP+1 + elif (Prog[PP] =="<"): + TP=TP-1 + elif (Prog[PP] =="."): + output(chr(Tape[TP])) + elif (Prog[PP] ==","): + waiting=True + elif (Prog[PP] =="["): + if (Tape[TP]==0): + depth=1 + while (depth>0): + PP=PP+1 + if (Prog[PP]=="]"): + depth = depth - 1 + if (Prog[PP]=="["): + depth = depth + 1 + elif (Prog[PP] =="]"): + if (Tape[TP]!=0): + depth=1 + while (depth>0): + PP=PP-1 + if (Prog[PP]=="]"): + depth = depth + 1 + if (Prog[PP]=="["): + depth = depth - 1 + diff --git a/cards_against_emf/cards.json b/cards_against_emf/cards.json new file mode 100644 index 0000000..2711b2a --- /dev/null +++ b/cards_against_emf/cards.json @@ -0,0 +1,4272 @@ +{ + "blackCards": [ + { + "text": "Why can't I sleep at night?", + "pick": 1 + }, + { + "text": "I got 99 problems but _ ain't one.", + "pick": 1 + }, + { + "text": "What's a girl's best friend?", + "pick": 1 + }, + { + "text": "What's that smell?", + "pick": 1 + }, + { + "text": "This is the way the world ends / This is the way the world ends / Not with a bang but with _.", + "pick": 1 + }, + { + "text": "What is Batman's guilty pleasure?", + "pick": 1 + }, + { + "text": "TSA guidelines now prohibit _ on airplanes.", + "pick": 1 + }, + { + "text": "What ended my last relationship?", + "pick": 1 + }, + { + "text": "MTV's new reality show features eight washed-up celebrities living with _.", + "pick": 1 + }, + { + "text": "I drink to forget _.", + "pick": 1 + }, + { + "text": "I'm sorry, Professor, but I couldn't complete my homework because of _.", + "pick": 1 + }, + { + "text": "Alternative medicine is now embracing the curative powers of _.", + "pick": 1 + }, + { + "text": "What's that sound?", + "pick": 1 + }, + { + "text": "What's the next Happy Meal® toy?", + "pick": 1 + }, + { + "text": "It's a pity that kids these days are all getting involved with _.", + "pick": 1 + }, + { + "text": "In the new Disney Channel Original Movie, Hannah Montana struggles with _ for the first time.", + "pick": 1 + }, + { + "text": "_. That's how I want to die.", + "pick": 1 + }, + { + "text": "What does Dick Cheney prefer?", + "pick": 1 + }, + { + "text": "What's the most emo?", + "pick": 1 + }, + { + "text": "Instead of coal, Santa now gives the bad children _.", + "pick": 1 + }, + { + "text": "Next from J.K. Rowling: Harry Potter and the Chamber of _.", + "pick": 1 + }, + { + "text": "A romantic, candlelit dinner would be incomplete without _.", + "pick": 1 + }, + { + "text": "White people like _.", + "pick": 1 + }, + { + "text": "_. Betcha can't have just one!", + "pick": 1 + }, + { + "text": "War!

What is it good for?", + "pick": 1 + }, + { + "text": "BILLY MAYS HERE FOR _.", + "pick": 1 + }, + { + "text": "_. High five, bro.", + "pick": 1 + }, + { + "text": "During sex, I like to think about _.", + "pick": 1 + }, + { + "text": "What did I bring back from Mexico?", + "pick": 1 + }, + { + "text": "What are my parents hiding from me?", + "pick": 1 + }, + { + "text": "What will always get you laid?", + "pick": 1 + }, + { + "text": "What would grandma find disturbing, yet oddly charming?", + "pick": 1 + }, + { + "text": "What did the U.S. airdrop to the children of Afghanistan?", + "pick": 1 + }, + { + "text": "What helps Obama unwind?", + "pick": 1 + }, + { + "text": "What's there a ton of in heaven?", + "pick": 1 + }, + { + "text": "Major League Baseball has banned _ for giving players an unfair advantage.", + "pick": 1 + }, + { + "text": "When I am a billionaire, I shall erect a 50-foot statue to commemorate _.", + "pick": 1 + }, + { + "text": "What's the new fad diet?", + "pick": 1 + }, + { + "text": "When I am the President of the United States, I will create the Department of _.", + "pick": 1 + }, + { + "text": "_. It's a trap!", + "pick": 1 + }, + { + "text": "How am I maintaining my relationship status?", + "pick": 1 + }, + { + "text": "What will I bring back in time to convince people that I am a powerful wizard?", + "pick": 1 + }, + { + "text": "While the United States raced the Soviet Union to the moon, the Mexican government funneled millions of pesos into research on _.", + "pick": 1 + }, + { + "text": "Coming to Broadway this season, _: The Musical.", + "pick": 1 + }, + { + "text": "What's my secret power?", + "pick": 1 + }, + { + "text": "What gives me uncontrollable gas?", + "pick": 1 + }, + { + "text": "But before I kill you, Mr. Bond, I must show you _.", + "pick": 1 + }, + { + "text": "What never fails to liven up the party?", + "pick": 1 + }, + { + "text": "What am I giving up for Lent?", + "pick": 1 + }, + { + "text": "What do old people smell like? ", + "pick": 1 + }, + { + "text": "The class field trip was completely ruined by _.", + "pick": 1 + }, + { + "text": "When Pharaoh remained unmoved, Moses called down a plague of _.", + "pick": 1 + }, + { + "text": "I do not know with which weapons World War III will be fought, but World War IV will be fought with _.", + "pick": 1 + }, + { + "text": "What's Teach for America using to inspire inner city students to succeed?", + "pick": 1 + }, + { + "text": "In Michael Jackson's final moments, he thought about _.", + "pick": 1 + }, + { + "text": "Why do I hurt all over?", + "pick": 1 + }, + { + "text": "Studies show that lab rats navigate mazes 50% faster after being exposed to _.", + "pick": 1 + }, + { + "text": "Why am I sticky?", + "pick": 1 + }, + { + "text": "What's my anti-drug?", + "pick": 1 + }, + { + "text": "And the Academy Award for _ goes to _.", + "pick": 2 + }, + { + "text": "For my next trick, I will pull _ out of _.", + "pick": 2 + }, + { + "text": "_: Good to the last drop.", + "pick": 1 + }, + { + "text": "What did Vin Diesel eat for dinner?", + "pick": 1 + }, + { + "text": "_: kid-tested, mother-approved.", + "pick": 1 + }, + { + "text": "What gets better with age?", + "pick": 1 + }, + { + "text": "I never truly understood _ until I encountered _.", + "pick": 2 + }, + { + "text": "Rumor has it that Vladimir Putin's favorite delicacy is _ stuffed with _.", + "pick": 2 + }, + { + "text": "Lifetime® presents _, the story of _.", + "pick": 2 + }, + { + "text": "Make a haiku.", + "pick": 3 + }, + { + "text": "In M. Night Shyamalan's new movie, Bruce Willis discovers that _ had really been _ all along.", + "pick": 2 + }, + { + "text": "_ is a slippery slope that leads to _.", + "pick": 2 + }, + { + "text": "In a world ravaged by _, our only solace is _.", + "pick": 2 + }, + { + "text": "That's right, I killed _. How, you ask? _.", + "pick": 2 + }, + { + "text": "When I was tripping on acid, _ turned into _.", + "pick": 2 + }, + { + "text": "_ + _ = _.", + "pick": 3 + }, + { + "text": "What's the next superhero/sidekick duo?", + "pick": 2 + }, + { + "text": "Dear Abby,

I'm having some trouble with _ and would like your advice.", + "pick": 1 + }, + { + "text": "After the earthquake, Sean Penn brought _ to the people of Haiti.", + "pick": 1 + }, + { + "text": "In L.A. County Jail, word is you can trade 200 cigarettes for _.", + "pick": 1 + }, + { + "text": "Maybe she's born with it. Maybe it's _.", + "pick": 1 + }, + { + "text": "Life for American Indians was forever changed when the White Man introduced them to _.", + "pick": 1 + }, + { + "text": "Next on ESPN2, the World Series of _.", + "pick": 1 + }, + { + "text": "Step 1: _. Step 2: _. Step 3: Profit.", + "pick": 2 + }, + { + "text": "Here is the church
Here is the steeple
Open the doors
And there is _.", + "pick": 1 + }, + { + "text": "How did I lose my virginity?", + "pick": 1 + }, + { + "text": "During his childhood, Salvador Dalí produced hundreds of paintings of _.", + "pick": 1 + }, + { + "text": "In 1,000 years, when paper money is a distant memory, how will we pay for goods and services?", + "pick": 1 + }, + { + "text": "What don't you want to find in your Kung Pao chicken?", + "pick": 1 + }, + { + "text": "The Smithsonian Museum of Natural History has just opened an exhibit on _.", + "pick": 1 + }, + { + "text": "Daddy, why is Mommy crying?", + "pick": 1 + }, + { + "text": "What brought the orgy to a grinding halt?", + "pick": 1 + }, + { + "text": "When I pooped, what came out of my butt?", + "pick": 1 + }, + { + "text": "In the distant future, historians will agree that _ marked the beginning of America's decline.", + "pick": 1 + }, + { + "text": "What's the gift that keeps on giving?", + "pick": 1 + }, + { + "text": "This season on Man vs. Wild, Bear Grylls must survive in the depths of the Amazon with only _ and his wits.", + "pick": 1 + }, + { + "text": "Michael Bay's new three-hour action epic pits _ against _.", + "pick": 2 + }, + { + "text": "And I would have gotten away with it, too, if it hadn't been for _!", + "pick": 1 + }, + { + "text": "In a pinch, _ can be a suitable substitute for _.", + "pick": 2 + }, + { + "text": "What has been making life difficult at the nudist colony?", + "pick": 1 + }, + { + "text": "Science will never explain the origin of _.", + "pick": 1 + }, + { + "text": "In Rome, there are whisperings that the Vatican has a secret room devoted to _.", + "pick": 1 + }, + { + "text": "I learned the hard way that you can't cheer up a grieving friend with _.", + "pick": 1 + }, + { + "text": "When all else fails, I can always masturbate to _.", + "pick": 1 + }, + { + "text": "An international tribunal has found _ guilty of _.", + "pick": 2 + }, + { + "text": "In its new tourism campaign, Detroit proudly proclaims that it has finally eliminated _.", + "pick": 1 + }, + { + "text": "In his new self-produced album, Kanye West raps over the sounds of _.", + "pick": 1 + }, + { + "text": "The socialist governments of Scandinavia have declared that access to _ is a basic human right.", + "pick": 1 + }, + { + "text": "He who controls _ controls the world.", + "pick": 1 + }, + { + "text": "Dear Sir or Madam, We regret to inform you that the Office of _ has denied your request for _.", + "pick": 2 + }, + { + "text": "The CIA now interrogates enemy agents by repeatedly subjecting them to _.", + "pick": 1 + }, + { + "text": "_ would be woefully incomplete without _.", + "pick": 2 + }, + { + "text": "During his midlife crisis, my dad got really into _.", + "pick": 1 + }, + { + "text": "Before I run for president, I must destroy all evidence of my involvement with _.", + "pick": 1 + }, + { + "text": "My new favorite porn star is Joey \"_\" McGee.", + "pick": 1 + }, + { + "text": "In his newest and most difficult stunt, David Blaine must escape from _.", + "pick": 1 + }, + { + "text": "This is your captain speaking. Fasten your seatbelts and prepare for _.", + "pick": 1 + }, + { + "text": "My mom freaked out when she looked at my browser history and found _.com/_.", + "pick": 2 + }, + { + "text": "The Five Stages of Grief: denial, anger, bargaining, _, acceptance.", + "pick": 1 + }, + { + "text": "Members of New York's social elite are paying thousands of dollars just to experience _.", + "pick": 1 + }, + { + "text": "I went from _ to _, all thanks to _.", + "pick": 3 + }, + { + "text": "Little Miss Muffet Sat on a tuffet, Eating her curds and _.", + "pick": 1 + }, + { + "text": "This month's Cosmo: \"Spice up your sex life by bringing _ into the bedroom.\"", + "pick": 1 + }, + { + "text": "If God didn't want us to enjoy _, he wouldn't have given us _.", + "pick": 2 + }, + { + "text": "My country, 'tis of thee, sweet land of _.", + "pick": 1 + }, + { + "text": "After months of debate, the Occupy Wall Street General Assembly could only agree on \"More _!\"", + "pick": 1 + }, + { + "text": "I spent my whole life working toward _, only to have it ruined by _.", + "pick": 2 + }, + { + "text": "Next time on Dr. Phil: How to talk to your child about _.", + "pick": 1 + }, + { + "text": "Only two things in life are certain: death and _.", + "pick": 1 + }, + { + "text": "Everyone down on the ground! We don't want to hurt anyone. We're just here for _.", + "pick": 1 + }, + { + "text": "The healing process began when I joined a support group for victims of _.", + "pick": 1 + }, + { + "text": "The votes are in, and the new high school mascot is _.", + "pick": 1 + }, + { + "text": "Charades was ruined for me forever when my mom had to act out _.", + "pick": 1 + }, + { + "text": "Before _, all we had was _.", + "pick": 2 + }, + { + "text": "Tonight on 20/20: What you don't know about _ could kill you.", + "pick": 1 + }, + { + "text": "You haven't truly lived until you've experienced _ and _ at the same time.", + "pick": 2 + }, + { + "text": "Hey baby, come back to my place and I'll show you _.", + "pick": 1 + }, + { + "text": "My gym teacher got fired for adding _ to the obstacle course.", + "pick": 1 + }, + { + "text": "Finally! A service that delivers _ right to your door.", + "pick": 1 + }, + { + "text": "To prepare for his upcoming role, Daniel Day-Lewis immersed himself in the world of _.", + "pick": 1 + }, + { + "text": "My life is ruled by a vicious cycle of _ and _.", + "pick": 2 + }, + { + "text": "During high school, I never really fit in until I found _ club.", + "pick": 1 + }, + { + "text": "Money can't buy me love, but it can buy me _.", + "pick": 1 + }, + { + "text": "Listen, son. If you want to get involved with _, I won't stop you. Just steer clear of _.", + "pick": 2 + }, + { + "text": "A successful job interview begins with a firm handshake and ends with _.", + "pick": 1 + }, + { + "text": "Call the law offices of Goldstein & Goldstein, because no one should have to tolerate _ in the workplace.", + "pick": 1 + }, + { + "text": "Lovin' you is easy 'cause you're _.", + "pick": 1 + }, + { + "text": "The blind date was going horribly until we discovered our shared interest in _.", + "pick": 1 + }, + { + "text": "What left this stain on my couch?", + "pick": 1 + }, + { + "text": "Turns out that _-Man was neither the hero we needed nor wanted.", + "pick": 1 + }, + { + "text": "After months of practice with _, I think I'm finally ready for _.", + "pick": 2 + }, + { + "text": "In the seventh circle of Hell, sinners must endure _ for all eternity.", + "pick": 1 + }, + { + "text": "As part of his daily regimen, Anderson Cooper sets aside 15 minutes for _.", + "pick": 1 + }, + { + "text": "When you get right down to it, _ is just _.", + "pick": 2 + }, + { + "text": "Having problems with _? Try _!", + "pick": 2 + }, + { + "text": "And what did you bring for show and tell?", + "pick": 1 + }, + { + "text": "I'm not like the rest of you. I'm too rich and busy for _.", + "pick": 1 + }, + { + "text": "With enough time and pressure, _ will turn into _.", + "pick": 2 + }, + { + "text": "_: Hours of fun. Easy to use. Perfect for _!", + "pick": 2 + }, + { + "text": "_. Awesome in theory, kind of a mess in practice.", + "pick": 1 + }, + { + "text": "As part of his contract, Prince won't perform without _ in his dressing room.", + "pick": 1 + }, + { + "text": "Man, this is bullshit. Fuck _.", + "pick": 1 + }, + { + "text": "Dear Leader Kim Jong-un,
our village praises your infinite wisdom with a humble offering of _.", + "pick": 1 + }, + { + "text": "_ may pass, but _ will last forever.", + "pick": 2 + }, + { + "text": "She's up all night for good fun.
I'm up all night for _.", + "pick": 1 + }, + { + "text": "Alright, bros. Our frat house is condemned, and all the hot slampieces are over at Gamma Phi. The time has come to commence Operation _.", + "pick": 1 + }, + { + "text": "The Japanese have developed a smaller, more efficient version of _.", + "pick": 1 + }, + { + "text": "In return for my soul, the Devil promised me _, but all I got was _.", + "pick": 2 + }, + { + "text": "You guys, I saw this crazy movie last night. It opens on _, and then there's some stuff about _, and then it ends with _.", + "pick": 3 + }, + { + "text": "_ will never be the same after _.", + "pick": 2 + }, + { + "text": "Wes Anderson's new film tells the story of a precocious child coming to terms with _.", + "pick": 1 + }, + { + "text": "In the beginning, there was _.
And the Lord said, \"Let there be _.\"", + "pick": 2 + }, + { + "text": "What's fun until it gets weird?", + "pick": 1 + }, + { + "text": "We never did find _, but along the way we sure learned a lot about _.", + "pick": 2 + }, + { + "text": "You've seen the bearded lady!
You've seen the ring of fire!
Now, ladies and gentlemen, feast your eyes upon _!", + "pick": 1 + }, + { + "text": "How am I compensating for my tiny penis?", + "pick": 1 + }, + { + "text": "I'm sorry, sir, but we don't allow _ at the country club.", + "pick": 1 + }, + { + "text": "2 AM in the city that never sleeps. The door swings open and she walks in, legs up to here. Something in her eyes tells me she's looking for _.", + "pick": 1 + }, + { + "text": "As king, how will I keep the peasants in line?", + "pick": 1 + }, + { + "text": "Oprah's book of the month is \"_ For _: A Story of Hope.\"", + "pick": 2 + }, + { + "text": "Do not fuck with me! I am literally _ right now.", + "pick": 1 + }, + { + "text": "Adventure.
Romance.
_.

From Paramount Pictures, \"_.\"", + "pick": 2 + }, + { + "text": "I am become _, destroyer of _!", + "pick": 2 + }, + { + "text": "It lurks in the night. It hungers for flesh. This summer, no one is safe from _.", + "pick": 1 + }, + { + "text": "If you can't handle _, you'd better stay away from _.", + "pick": 2 + }, + { + "text": "This is the prime of my life. I'm young, hot, and full of _.", + "pick": 1 + }, + { + "text": "I'm pretty sure I'm high right now, because I'm absolutely mesmerized by _.", + "pick": 1 + }, + { + "text": "This year's hottest album is \"_\" by _.", + "pick": 2 + }, + { + "text": "Every step towards _ gets me a little closer to _.", + "pick": 2 + }, + { + "text": "Forget everything you know about _, because now we've supercharged it with _!", + "pick": 2 + }, + { + "text": "Honey, I have a new role-play I want to try tonight! You can be _, and I'll be _.", + "pick": 2 + }, + { + "text": "Do the Dew ® with our most extreme flavor yet! Get ready for Mountain Dew _!", + "pick": 1 + }, + { + "text": "Armani suit: $1,000. Dinner for two at that swanky restaurant: $300. The look on her face when you surprise her with _: priceless.", + "pick": 1 + }, + { + "text": "In his new action comedy, Jackie Chan must fend off ninjas while also dealing with _.", + "pick": 1 + }, + { + "text": "Well what do you have to say for yourself, Casey? This is the third time you've been sent to the principal's office for _.", + "pick": 1 + }, + { + "text": "Here at the Academy for Gifted Children, we allow students to explore _ at their own pace.", + "pick": 1 + }, + { + "text": "Heed my voice, mortals! I am the god of _, and I will not tolerate _!", + "pick": 2 + }, + { + "text": "I don't mean to brag, but they call me the Michael Jordan of _.", + "pick": 1 + }, + { + "text": "Why am I broke?", + "pick": 1 + }, + { + "text": "Help me doctor, I've got _ in my butt!", + "pick": 1 + }, + { + "text": "Hi MTV! My name is Kendra, I live in Malibu, I'm into _, and I love to have a good time.", + "pick": 1 + }, + { + "text": "Patient presents with _. Likely a result of _.", + "pick": 2 + }, + { + "text": "Life's pretty tough in the fast lane. That's why I never leave the house without _.", + "pick": 1 + }, + { + "text": "What's making things awkward in the sauna?", + "pick": 1 + }, + { + "text": "Get ready for the movie of the summer! One cop plays by the book. The other's only interested in one thing: _.", + "pick": 1 + }, + { + "text": "Having the worst day EVER. #_", + "pick": 1 + }, + { + "text": "In his farewell address, George Washington famously warned Americans about the dangers of _.", + "pick": 1 + }, + { + "text": "Don't forget! Beginning this week, Casual Friday will officially become \"_ Friday.\"", + "pick": 1 + }, + { + "text": "What killed my boner?", + "pick": 1 + }, + { + "text": "Yo' mama so fat she _!", + "pick": 1 + }, + { + "text": "Well if _ is good enough for _, it's good enough for me.", + "pick": 2 + }, + { + "text": "Hi, this is Jim from accounting. We noticed a $1,200 charge labeled \"_\". Can you explain?", + "pick": 1 + }, + { + "text": "Do you lack energy? Does it sometimes feel like the whole world is _? Zoloft.®", + "pick": 1 + }, + { + "text": "WHOOO! God damn I love _!", + "pick": 1 + }, + { + "text": "Now in bookstores: \"The Audacity of _\", by Barack Obama.", + "pick": 1 + }, + { + "text": "And today's soup is Cream of _.", + "pick": 1 + }, + { + "pick": 1, + "text": "I work my ass off all day for this family, and this is what I come home to? _!?" + }, + { + "pick": 1, + "text": "I have a strict policy. First date, dinner. Second date, kiss. Third date, _." + }, + { + "pick": 1, + "text": "When I was a kid, we used to play Cowboys and _." + }, + { + "pick": 1, + "text": "This is America. If you don't work hard, you don't succeed. I don't care if you're black, white, purple, or _." + }, + { + "pick": 1, + "text": "You Won't Believe These 15 Hilarious _ Bloopers!" + }, + { + "pick": 1, + "text": "James is a lonely boy. But when he discovers a secret door in his attic, he meets a magical new friend: _." + }, + { + "pick": 1, + "text": "Don't worry kid. It gets better. I've been living with _ for 20 years." + }, + { + "pick": 1, + "text": "My grandfather worked his way up from nothing. When he came to this country, all he had was the shoes on his feet and _." + }, + { + "pick": 1, + "text": "Behind every powerful man is _." + }, + { + "pick": 1, + "text": "You are not alone. Millions of Americans struggle with _ every day." + }, + { + "pick": 1, + "text": "Come to Dubai, where you can relax in our world famous spas, experience the nightlife, or simply enjoy _ by the poolside." + }, + { + "pick": 1, + "text": "\"This is madness.\" \"No, THIS IS _!\"" + }, + { + "pick": 1, + "text": "Listen Gary, I like you. But if you want that corner office, you're going to have to show me _." + }, + { + "pick": 1, + "text": "I went to the desert and ate of the peyote cactus. Turns out my spirit animal is _." + }, + { + "pick": 1, + "text": "And would you like those buffalo wings mild, hot, or _?" + }, + { + "pick": 1, + "text": "The six things I could never do without: oxygen, Facebook, chocolate, Netflix, friends, and _ LOL!" + }, + { + "pick": 1, + "text": "Why won't you make love to me anymore? Is it _?" + }, + { + "pick": 1, + "text": "Puberty is a time of change. You might notice hair growing in new places. You might develop an interest in _. This is normal." + }, + { + "pick": 1, + "text": "I'm sorry, Mrs. Chen, but there was nothing we could do. At 4:15 this morning, your son succumbed to _." + }, + { + "pick": 1, + "text": "I'm Miss Tennessee, and if I could make the world better by changing one thing, I would get rid of _." + }, + { + "pick": 1, + "text": "Tonight we will have sex. And afterwards, If you'd like, a little bit of _." + }, + { + "pick": 1, + "text": "Everybody join hands and close your eyes. Do you sense that? That's the presence of _ in this room." + }, + { + "pick": 1, + "text": "To become a true Yanomamo warrior, you must prove that you can withstand _ without crying out." + }, + { + "pick": 1, + "text": "Y'all ready to get this thing started? I'm Nick Cannon, and this is America's Got _." + }, + { + "pick": 1, + "text": "If you had to describe the Card Czar, using only one of the cards in your hand, which one would it be?" + }, + { + "pick": 2, + "text": "_ be all like _." + }, + { + "pick": 1, + "text": "Art isn't just a painting in a stuffy museum. Art is alive. Art is _." + }, + { + "pick": 1, + "text": "As reparations for slavery, all African Americans will receive _." + }, + { + "pick": 1, + "text": "As Teddy Roosevelt said, the four manly virtues are honor, temperance, industry, and _." + }, + { + "pick": 1, + "text": "Best you go back where you came from, now. We don't take too kindly to _ in these parts." + }, + { + "pick": 1, + "text": "CNN breaking news! Scientists discover _." + }, + { + "pick": 1, + "text": "Coming to Red Lobster® this month, _." + }, + { + "pick": 1, + "text": "Congratulations! You have been selected for our summer internship program. While we are unable to offer a salary, we can offer you _." + }, + { + "pick": 1, + "text": "Dance like there's nobody watching, love like you'll never be hurt, and live like you're _." + }, + { + "pick": 1, + "text": "Errbody in the club _." + }, + { + "pick": 1, + "text": "Feeling so grateful! #amazing #mylife #_." + }, + { + "pick": 1, + "text": "Girls just wanna have _." + }, + { + "pick": 1, + "text": "Google Calendar alert: _ in 10 minutes." + }, + { + "pick": 1, + "text": "I don't believe in God. I believe in _." + }, + { + "pick": 1, + "text": "I got rhythm, I've got music, I've got _. Who could ask for anything more?" + }, + { + "pick": 1, + "text": "I may not be much to look at, but I fuck like _." + }, + { + "pick": 1, + "text": "I tell you, it was a non-stop fuckfest. When it was over, my asshole looked like _." + }, + { + "pick": 1, + "text": "I'll take the BBQ bacon burger with friend egg and fuck it how about _." + }, + { + "pick": 1, + "text": "I'm sorry, sir, but your insurance plan doesn't cover injuries caused by _." + }, + { + "pick": 1, + "text": "I've had a horrible vision, father. I saw mountains crumbling, stars falling from the sky. I saw _." + }, + { + "pick": 1, + "text": "If at first you don't succeed, try _." + }, + { + "pick": 1, + "text": "In the 1950s, psychologists prescribed _ as a cure for homosexually." + }, + { + "pick": 1, + "text": "LSD + _ = really bad time." + }, + { + "pick": 1, + "text": "\"Mom's to-do list:
- Buy Groceries.
- Clean up _.
- Soccer Practice.\"" + }, + { + "pick": 1, + "text": "Most Americans would not vote for a candidate who is openly _." + }, + { + "pick": 1, + "text": "No, no, no, no, no, no, NO! I will NOT let _ ruin this wedding." + }, + { + "pick": 1, + "text": "Oh no! Siri, how do I fix _?" + }, + { + "pick": 1, + "text": "One more thing. Watch out for Big Mike. They say he killed a man with _." + }, + { + "pick": 1, + "text": "Ooo, daddy like _." + }, + { + "pick": 1, + "text": "Poor Brandon, still living in his parent's basement. I heard he never got over _." + }, + { + "pick": 1, + "text": "Run, run, as fast as you can! You can't catch me, I'm _!" + }, + { + "pick": 1, + "text": "She's a lady in the streets, _ in the sheets." + }, + { + "pick": 1, + "text": "She's just one of the guys, you know? She likes beer, and football, and _." + }, + { + "pick": 1, + "text": "Son, take it from someone who's been around the block a few times. Nothin' puts her in the mood like _." + }, + { + "pick": 1, + "text": "Summer lovin', had me a blast. _, happened so fast." + }, + { + "pick": 1, + "text": "\"The top Google auto-complete results for \"Barack Obama\":
- Barack Obama Height.
- Barack Obama net worth.
- Barack Obama _.\"" + }, + { + "pick": 1, + "text": "Then the princess kissed the frog, and all of a sudden the frog was _!" + }, + { + "pick": 1, + "text": "There is no God. It's just _ and then you die." + }, + { + "pick": 1, + "text": "This Friday at the Liquid Lunge, it's _ Night! Ladies drink free." + }, + { + "pick": 1, + "text": "We do not shake with our left hands in this country. That is the hand we use for _." + }, + { + "pick": 1, + "text": "Well if _ is a crime, then lock me up!" + }, + { + "pick": 1, + "text": "Well, shit. My eyes ain't so good, but I'll eat my own boot if that ain't _!" + }, + { + "pick": 1, + "text": "What are all those whales singing about?" + }, + { + "pick": 1, + "text": "What sucks balls?" + }, + { + "pick": 1, + "text": "What totally destroyed my asshole?" + }, + { + "pick": 1, + "text": "What turned me into a Republican?" + }, + { + "pick": 1, + "text": "What will end racism once and for all?" + }, + { + "pick": 1, + "text": "What's a total waste of Hillary Clinton's time?" + }, + { + "pick": 1, + "text": "What's about to take dance floor to the next level?" + }, + { + "pick": 1, + "text": "What's the gayest?" + }, + { + "pick": 1, + "text": "What's the most problematic?" + }, + { + "pick": 1, + "text": "Why am I laughing and crying and taking off my clothes?" + }, + { + "pick": 1, + "text": "With a one-time gift of just $10, you can save this child from _." + }, + { + "pick": 1, + "text": "You know who else liked _? Hitler." + }, + { + "pick": 1, + "text": "You won't believe what's in my pussy. It's _." + }, + { + "text": "Siskel and Ebert have panned _ as \"poorly conceived\" and \"sloppily executed.\"", + "pick": 1 + }, + { + "text": "Up next on Nickelodeon: \"Clarissa Explains _.\"", + "pick": 1 + }, + { + "text": "Believe it or not, Jim Carrey can do a dead-on impression of _.", + "pick": 1 + }, + { + "text": "It's Morphin' Time! Mastadon! Pterodactyl! Triceratops! Sabertooth Tiger! _!", + "pick": 1 + }, + { + "text": "I'm a bitch, I'm a lover, I'm a child, I'm _.", + "pick": 1 + }, + { + "text": "How did Stella get her groove back?", + "pick": 1 + }, + { + "text": "Tonight on SNICK: \"Are You Afraid of _?\"", + "pick": 1 + }, + { + "pick": 1, + "text": "And in the end, the dragon was not evil; he just wanted _." + }, + { + "pick": 2, + "text": "Critics are raving about HBO's new Game of Thrones spin-off, \"_ of _.\"" + }, + { + "pick": 1, + "text": "Having tired of poetry and music, the immortal elves now fill their days with _." + }, + { + "pick": 1, + "text": "Legend tells of a princess who has been asleep for a thousand years and can only be awoken by _." + }, + { + "pick": 1, + "text": "Who blasphemes and bubbles at the center of all infinity, whose name no lips dare speak aloud, and who gnaws hungrily in inconceivable, unlighted chambers beyond time?" + }, + { + "pick": 1, + "text": "Your father was a powerful wizard, Harry. Before he died, he left you something very precious: _." + }, + { + "pick": 1, + "text": "I'm Bobby Flay, and if you can't stand _, get out of the kitchen!" + }, + { + "pick": 1, + "text": "It's not delivery. It's _." + }, + { + "pick": 1, + "text": "Aw babe, your burps smell like _!" + }, + { + "pick": 1, + "text": "Don't miss Rachel Ray's hit new show, Cooking with _." + }, + { + "pick": 1, + "text": "Excuse me, waiter. Could take this back? This soup tastes like _." + }, + { + "pick": 1, + "text": "Now on Netflix: Jiro Dreams of _." + }, + { + "pick": 2, + "text": "In line with our predictions, we find a robust correlation between _ and _ (p>.05)." + }, + { + "pick": 1, + "text": "In what's being hailed as a major breakthrough, scientists have synthesized _ in the lab." + }, + { + "pick": 1, + "text": "A study published in Nature this week found that _ is good for you in small doses." + }, + { + "pick": 2, + "text": "In an attempt to recreate conditions just after the Big Bang, physicists at the LHC are observing collisions between _ and _." + }, + { + "pick": 1, + "text": "What really killed the dinosaurs?" + }, + { + "pick": 1, + "text": "Hey there, Young Scientists! Put on your labcoats and strap on your safety goggles, because today we're learning about _!" + }, + { + "pick": 2, + "text": "Today on MythBusters, we found out how long _ can withstand _." + } + ], + "whiteCards": [ + "Coat hanger abortions.", + "Man meat.", + "Autocannibalism.", + "Vigorous jazz hands.", + "Flightless birds.", + "Pictures of boobs.", + "Doing the right thing.", + "The violation of our most basic human rights.", + "Viagra®.", + "Self-loathing.", + "Spectacular abs.", + "A balanced breakfast.", + "Roofies.", + "Concealing a boner.", + "Amputees.", + "The Big Bang.", + "Former President George W. Bush.", + "The Rev. Dr. Martin Luther King, Jr.", + "Smegma.", + "Being marginalized.", + "Cuddling.", + "Laying an egg.", + "The Pope.", + "Aaron Burr.", + "Genital piercings.", + "Fingering.", + "A bleached asshole.", + "Horse meat.", + "Fear itself.", + "Science.", + "Elderly Japanese men.", + "Stranger danger.", + "The terrorists.", + "Praying the gay away.", + "Same-sex ice dancing.", + "Ethnic cleansing.", + "Cheating in the Special Olympics.", + "German dungeon porn.", + "Bingeing and purging.", + "Making a pouty face.", + "William Shatner.", + "Heteronormativity.", + "Nickelback.", + "Tom Cruise.", + "The profoundly handicapped.", + "The placenta.", + "Chainsaws for hands.", + "Arnold Schwarzenegger.", + "An icepick lobotomy.", + "Goblins.", + "Object permanence.", + "Dying.", + "Foreskin.", + "A falcon with a cap on its head.", + "Hormone injections.", + "Dying of dysentery.", + "Sexy pillow fights.", + "The invisible hand.", + "A really cool hat.", + "Sean Penn.", + "Heartwarming orphans.", + "The clitoris.", + "The Three-Fifths compromise.", + "A sad handjob.", + "Men.", + "Historically black colleges.", + "A micropenis.", + "Raptor attacks.", + "Agriculture.", + "Vikings.", + "Pretending to care.", + "The Underground Railroad.", + "My humps.", + "Being a dick to children.", + "Geese.", + "Bling.", + "Sniffing glue.", + "The South.", + "An Oedipus complex.", + "Eating all of the cookies before the AIDS bake-sale.", + "Sexting.", + "YOU MUST CONSTRUCT ADDITIONAL PYLONS.", + "Mutually-assured destruction.", + "Sunshine and rainbows.", + "Count Chocula.", + "Sharing needles.", + "Being rich.", + "Skeletor.", + "A sausage festival.", + "Michael Jackson.", + "Emotions.", + "Farting and walking away.", + "The Chinese gymnastics team.", + "Necrophilia.", + "Spontaneous human combustion.", + "Yeast.", + "Leaving an awkward voicemail.", + "Dick Cheney.", + "White people.", + "Penis envy.", + "Teaching a robot to love.", + "Sperm whales.", + "Scrubbing under the folds.", + "Panda sex.", + "Whipping it out.", + "Catapults.", + "Masturbation.", + "Natural selection.", + "Opposable thumbs.", + "A sassy black woman.", + "AIDS.", + "The KKK.", + "Figgy pudding.", + "Seppuku.", + "Gandhi.", + "Preteens.", + "Toni Morrison's vagina.", + "Five-Dollar Footlongs™.", + "Land mines.", + "A sea of troubles.", + "A zesty breakfast burrito.", + "Christopher Walken.", + "Friction.", + "Balls.", + "Dental dams.", + "A can of whoop-ass.", + "A tiny horse.", + "Waiting 'til marriage.", + "Authentic Mexican cuisine.", + "Genghis Khan.", + "Old-people smell.", + "Feeding Rosie O'Donnell.", + "Pixelated bukkake.", + "Friends with benefits.", + "The token minority.", + "The Tempur-Pedic® Swedish Sleep System™.", + "A thermonuclear detonation.", + "Take-backsies.", + "The Rapture.", + "A cooler full of organs.", + "Sweet, sweet vengeance.", + "RoboCop.", + "Keanu Reeves.", + "Drinking alone.", + "Giving 110%.", + "Flesh-eating bacteria.", + "The American Dream.", + "Taking off your shirt.", + "Me time.", + "A murder most foul.", + "The inevitable heat death of the universe.", + "The folly of man.", + "That thing that electrocutes your abs.", + "Cards Against Humanity.", + "Fiery poops.", + "Poor people.", + "Edible underpants.", + "Britney Spears at 55.", + "All-you-can-eat shrimp for $4.99.", + "Pooping back and forth. Forever.", + "Fancy Feast®.", + "Jewish fraternities.", + "Being a motherfucking sorcerer.", + "Pulling out.", + "Picking up girls at the abortion clinic.", + "The homosexual agenda.", + "The Holy Bible.", + "Passive-agression.", + "Ronald Reagan.", + "Vehicular manslaughter.", + "Nipple blades.", + "Assless chaps.", + "Full frontal nudity.", + "Hulk Hogan.", + "Daddy issues.", + "The hardworking Mexican.", + "Natalie Portman.", + "Waking up half-naked in a Denny's parking lot.", + "God.", + "Sean Connery.", + "Saxophone solos.", + "Gloryholes.", + "The World of Warcraft.", + "Homeless people.", + "Scalping.", + "Darth Vader.", + "Eating the last known bison.", + "Guys who don't call.", + "Hot Pockets®.", + "A time travel paradox.", + "The milk man.", + "Testicular torsion.", + "Dropping a chandelier on your enemies and riding the rope up.", + "World peace.", + "A salty surprise.", + "Poorly-timed Holocaust jokes.", + "Smallpox blankets.", + "Licking things to claim them as your own.", + "The heart of a child.", + "Robert Downey, Jr.", + "Lockjaw.", + "Eugenics.", + "A good sniff.", + "Friendly fire.", + "The taint; the grundle; the fleshy fun-bridge.", + "Wearing underwear inside-out to avoid doing laundry.", + "Hurricane Katrina.", + "Free samples.", + "Jerking off into a pool of children's tears.", + "A foul mouth.", + "The glass ceiling.", + "Republicans.", + "Explosions.", + "Michelle Obama's arms.", + "Getting really high.", + "Attitude.", + "Sarah Palin.", + "The Übermensch.", + "Altar boys.", + "My soul.", + "My sex life.", + "Pedophiles.", + "72 virgins.", + "Pabst Blue Ribbon.", + "Domino's™ Oreo™ Dessert Pizza.", + "A snapping turtle biting the tip of your penis.", + "The Blood of Christ.", + "Half-assed foreplay.", + "My collection of high-tech sex toys.", + "A middle-aged man on roller skates.", + "Bitches.", + "Bill Nye the Science Guy.", + "Italians.", + "A windmill full of corpses.", + "Adderall™.", + "Crippling debt.", + "A stray pube.", + "Prancing.", + "Passing a kidney stone.", + "A brain tumor.", + "Leprosy.", + "Puppies!", + "Bees?", + "Frolicking.", + "Repression.", + "Road head.", + "A bag of magic beans.", + "An asymmetric boob job.", + "Dead parents.", + "Public ridicule.", + "A mating display.", + "A mime having a stroke.", + "Stephen Hawking talking dirty.", + "African children.", + "Mouth herpes.", + "Overcompensation.", + "Riding off into the sunset.", + "Being on fire.", + "Tangled Slinkys.", + "Civilian casualties.", + "Auschwitz.", + "My genitals.", + "Not reciprocating oral sex.", + "Lactation.", + "Being fabulous.", + "Shaquille O'Neal's acting career.", + "My relationship status.", + "Asians who aren't good at math.", + "Alcoholism.", + "Incest.", + "Grave robbing.", + "Hope.", + "8 oz. of sweet Mexican black-tar heroin.", + "Kids with ass cancer.", + "Winking at old people.", + "The Jews.", + "Justin Bieber.", + "Doin' it in the butt.", + "A lifetime of sadness.", + "The Hamburglar.", + "Swooping.", + "Classist undertones.", + "New Age music.", + "Not giving a shit about the Third World.", + "The Kool-Aid Man.", + "A hot mess.", + "Tentacle porn.", + "Lumberjack fantasies.", + "The gays.", + "Scientology.", + "Estrogen.", + "GoGurt®.", + "Judge Judy.", + "Dick fingers.", + "Racism.", + "Surprise sex!", + "Police brutality.", + "Passable transvestites.", + "The Virginia Tech Massacre.", + "When you fart and a little bit comes out.", + "Oompa-Loompas.", + "A fetus.", + "Obesity.", + "Tasteful sideboob.", + "Hot people.", + "BATMAN!!!", + "Black people.", + "A gassy antelope.", + "Sexual tension.", + "Third base.", + "Racially-biased SAT questions.", + "Porn stars.", + "A Super Soaker™ full of cat pee.", + "Muhammed (Praise Be Unto Him).", + "Puberty.", + "A disappointing birthday party.", + "An erection that lasts longer than four hours.", + "White privilege.", + "Getting so angry that you pop a boner.", + "Wifely duties.", + "Two midgets shitting into a bucket.", + "Queefing.", + "Wiping her butt.", + "Golden showers.", + "Barack Obama.", + "Nazis.", + "A robust mongoloid.", + "An M. Night Shyamalan plot twist.", + "Getting drunk on mouthwash.", + "Lunchables™.", + "Women in yogurt commercials.", + "John Wilkes Booth.", + "Powerful thighs.", + "Mr. Clean, right behind you.", + "Multiple stab wounds.", + "Cybernetic enhancements.", + "Serfdom.", + "Kanye West.", + "Women's suffrage.", + "Children on leashes.", + "Harry Potter erotica.", + "The Dance of the Sugar Plum Fairy.", + "Lance Armstrong's missing testicle.", + "Parting the Red Sea.", + "The Amish.", + "Dead babies.", + "Child beauty pageants.", + "AXE Body Spray.", + "Centaurs.", + "Copping a feel.", + "Grandma.", + "Famine.", + "The Trail of Tears.", + "The miracle of childbirth.", + "Finger painting.", + "A monkey smoking a cigar.", + "The Make-A-Wish® Foundation.", + "Anal beads.", + "The Force.", + "Kamikaze pilots.", + "Dry heaving.", + "Active listening.", + "Ghosts.", + "The Hustle.", + "Peeing a little bit.", + "Another goddamn vampire movie.", + "Shapeshifters.", + "The Care Bear Stare.", + "Hot cheese.", + "A mopey zoo lion.", + "A defective condom.", + "Teenage pregnancy.", + "A Bop It™.", + "Expecting a burp and vomiting on the floor.", + "Horrifying laser hair removal accidents.", + "Boogers.", + "Unfathomable stupidity.", + "Breaking out into song and dance.", + "Soup that is too hot.", + "Morgan Freeman's voice.", + "Getting naked and watching Nickelodeon.", + "MechaHitler.", + "Flying sex snakes.", + "The true meaning of Christmas.", + "My inner demons.", + "Pac-Man uncontrollably guzzling cum.", + "My vagina.", + "A homoerotic volleyball montage.", + "Actually taking candy from a baby.", + "Crystal meth.", + "Exactly what you'd expect.", + "Natural male enhancement.", + "Passive-aggressive Post-it notes.", + "Inappropriate yodeling.", + "Lady Gaga.", + "The Little Engine That Could.", + "Vigilante justice.", + "A death ray.", + "Poor life choices.", + "A gentle caress of the inner thigh.", + "Embryonic stem cells.", + "Nicolas Cage.", + "Firing a rifle into the air while balls deep in a squealing hog.", + "Switching to Geico®.", + "The chronic.", + "Erectile dysfunction.", + "Home video of Oprah sobbing into a Lean Cuisine®.", + "A bucket of fish heads.", + "50,000 volts straight to the nipples.", + "Being fat and stupid.", + "Hospice care.", + "A pyramid of severed heads.", + "Getting married, having a few kids, buying some stuff, retiring to Florida, and dying.", + "A subscription to Men's Fitness.", + "Crucifixion.", + "A micropig wearing a tiny raincoat and booties.", + "Some god-damn peace and quiet.", + "Used panties.", + "A tribe of warrior women.", + "The penny whistle solo from \"My Heart Will Go On.\"", + "An oversized lollipop.", + "Helplessly giggling at the mention of Hutus and Tutsis.", + "Not wearing pants.", + "Consensual sex.", + "Her Majesty, Queen Elizabeth II.", + "Funky fresh rhymes.", + "The art of seduction.", + "The Devil himself.", + "Advice from a wise, old black man.", + "Destroying the evidence.", + "The light of a billion suns.", + "Wet dreams.", + "Synergistic management solutions.", + "Growing a pair.", + "Silence.", + "An M16 assault rifle.", + "Poopy diapers.", + "A live studio audience.", + "The Great Depression.", + "A spastic nerd.", + "Rush Limbaugh's soft, shitty body.", + "Tickling Sean Hannity, even after he tells you to stop.", + "Stalin.", + "Brown people.", + "Rehab.", + "Capturing Newt Gingrich and forcing him to dance in a monkey suit.", + "Battlefield amputations.", + "An uppercut.", + "Shiny objects.", + "An ugly face.", + "Menstrual rage.", + "A bitch slap.", + "One trillion dollars.", + "Chunks of dead prostitute.", + "The entire Mormon Tabernacle Choir.", + "The female orgasm.", + "Extremely tight pants.", + "The Boy Scouts of America.", + "Stormtroopers.", + "Throwing a virgin into a volcano.", + "Getting in her pants, politely.", + "Gladiatorial combat.", + "Good grammar.", + "Hipsters.", + "Gandalf.", + "Genetically engineered super-soldiers.", + "George Clooney's musk.", + "Getting abducted by Peter Pan.", + "Eating an albino.", + "Enormous Scandinavian women.", + "Fabricating statistics.", + "Finding a skeleton.", + "Suicidal thoughts.", + "Dancing with a broom.", + "Deflowering the princess.", + "Dorito breath.", + "One thousand Slim Jims.", + "My machete.", + "Overpowering your father.", + "Ominous background music.", + "Media coverage.", + "Making the penises kiss.", + "Moral ambiguity.", + "Medieval Times® Dinner & Tournament.", + "Mad hacky-sack skills.", + "Just the tip.", + "Literally eating shit.", + "Leveling up.", + "Insatiable bloodlust.", + "Historical revisionism.", + "Jean-Claude Van Damme.", + "Jafar.", + "The boners of the elderly.", + "The economy.", + "Statistically validated stereotypes.", + "Sudden Poop Explosion Disease.", + "Slow motion.", + "Space muffins.", + "Sexual humiliation.", + "Sexy Siamese twins.", + "Santa Claus.", + "Scrotum tickling.", + "Ripping into a man's chest and pulling out his still-beating heart.", + "Ryan Gosling riding in on a white horse.", + "Quivering jowls.", + "Revenge fucking.", + "Pistol-whipping a hostage.", + "Quiche.", + "Zeus's sexual appetites.", + "Words, words, words.", + "Tripping balls.", + "Being a busy adult with many important things to do.", + "The four arms of Vishnu.", + "The shambling corpse of Larry King.", + "The hiccups.", + "The harsh light of day.", + "The Gulags.", + "The Fanta® girls.", + "A big black dick.", + "A beached whale.", + "A low standard of living.", + "A nuanced critique.", + "A bloody pacifier.", + "A crappy little hand.", + "Shaft.", + "Being a dinosaur.", + "Beating your wives.", + "Neil Patrick Harris.", + "Coughing into a vagina.", + "Carnies.", + "Nubile slave boys.", + "Bosnian chicken farmers.", + "A web of lies.", + "A rival dojo.", + "A passionate Latino lover.", + "Panty raids.", + "Appreciative snapping.", + "Apologizing.", + "Clams.", + "A woman scorned.", + "Being awesome at sex.", + "Spring break!", + "Another shot of morphine.", + "Dining with cardboard cutouts of the cast of \"Friends.\"", + "A soulful rendition of \"Ol' Man River.\"", + "Making a friend.", + "A sweaty, panting leather daddy.", + "Intimacy problems.", + "The new Radiohead album.", + "Pretty Pretty Princess Dress-Up Board Game®.", + "A man in yoga pants with a ponytail and feather earrings.", + "An army of skeletons.", + "A squadron of moles wearing aviator goggles.", + "Beefin' over turf.", + "The Google.", + "Bullshit.", + "A sweet spaceship.", + "A 55-gallon drum of lube.", + "Special musical guest, Cher.", + "The human body.", + "Mild autism.", + "Nunchuck moves.", + "Whipping a disobedient slave.", + "An ether-soaked rag.", + "Oncoming traffic.", + "A dollop of sour cream.", + "A slightly shittier parallel universe.", + "My first kill.", + "Boris the Soviet Love Hammer.", + "The grey nutrient broth that sustains Mitt Romney.", + "Tiny nipples.", + "Power.", + "Death by Steven Seagal.", + "A Burmese tiger pit.", + "Basic human decency.", + "Grandpa's ashes.", + "One Ring to rule them all.", + "The day the birds attacked.", + "Fetal alcohol syndrome.", + "Graphic violence, adult language, and some sexual content.", + "A bigger, blacker dick.", + "The mere concept of Applebee's®.", + "A sad fat dragon with no friends.", + "A piñata full of scorpions.", + "Existing.", + "Hillary Clinton's death stare.", + "Catastrophic urethral trauma.", + "Double penetration.", + "Daddy's belt.", + "Swiftly achieving orgasm.", + "Mooing.", + "Rising from the grave.", + "Subduing a grizzly bear and making her your wife.", + "Some really fucked-up shit.", + "Weapons-grade plutonium.", + "All of this blood.", + "Scrotal frostbite.", + "Taking a man's eyes and balls out and putting his eyes where his balls go and then his balls in the eye holes.", + "The mixing of the races.", + "Pumping out a baby every nine months.", + "Tongue.", + "Loki, the trickster god.", + "Whining like a little bitch.", + "Wearing an octopus for a hat.", + "An unhinged ferris wheel rolling toward the sea.", + "Finding Waldo.", + "Upgrading homeless people to mobile hotspots.", + "A magic hippie love cloud.", + "Fuck Mountain.", + "Living in a trashcan.", + "The corporations.", + "Getting hilariously gang-banged by the Blue Man Group.", + "Jeff Goldblum.", + "Survivor's guilt.", + "Me.", + "All my friends dying.", + "Shutting the fuck up.", + "An ass disaster.", + "Some kind of bird-man.", + "The entire Internet.", + "Going around punching people.", + "A boo-boo.", + "Indescribable loneliness.", + "Having sex on top of a pizza.", + "Chugging a lava lamp.", + "Warm, velvety muppet sex.", + "Running naked through a mall, pissing and shitting everywhere.", + "Nothing.", + "Samuel L. Jackson.", + "Self-flagellation.", + "The systematic destruction of an entire people and their way of life.", + "The Quesadilla Explosion Salad™ from Chili's®.", + "Reverse cowgirl.", + "Vietnam flashbacks.", + "Actually getting shot, for real.", + "Not having sex.", + "Cock.", + "Dying alone and in pain.", + "A cop who is also a dog.", + "The way white people is.", + "Gay aliens.", + "The primal, ball-slapping sex your parents are having right now.", + "A cat video so cute that your eyes roll back and your spine slides out of your anus.", + "A lamprey swimming up the toilet and latching onto your taint.", + "Slapping a racist old lady.", + "A black male in his early 20s, last seen wearing a hoodie.", + "Jumping out at people.", + "Three months in the hole.", + "Blood farts.", + "The Land of Chocolate.", + "A botched circumcision.", + "My manservant, Claude.", + "Vomiting mid-blowjob.", + "Letting everyone down.", + "Having shotguns for legs.", + "Bill Clinton, naked on a bearskin rug with a saxophone.", + "Mufasa's death scene.", + "The Harlem Globetrotters.", + "Demonic possession.", + "Fisting.", + "The thin veneer of situational causality that underlies porn.", + "Girls that always be textin'.", + "Blowing some dudes in an alley.", + "A spontaneous conga line.", + "A vagina that leads to another dimension.", + "Disco fever.", + "Getting your dick stuck in a Chinese finger trap with another dick.", + "Drinking ten 5-hour ENERGYs® to get fifty continuous hours of energy.", + "Sneezing, farting, and coming at the same time.", + "Some douche with an acoustic guitar.", + "Spending lots of money.", + "Putting an entire peanut butter and jelly sandwich into the VCR.", + "An unstoppable wave of fire ants.", + "A greased-up Matthew McConaughey.", + "Flying robots that kill people.", + "Unlimited soup, salad, and breadsticks.", + "Crying into the pages of Sylvia Plath.", + "The moist, demanding chasm of his mouth.", + "Filling every orifice with butterscotch pudding.", + "An all-midget production of Shakespeare's Richard III.", + "Screaming like a maniac.", + "Not contributing to society in any meaningful way.", + "A pile of squirming bodies.", + "Buying the right pants to be cool.", + "Roland the Farter, flatulist to the king.", + "That ass.", + "A surprising amount of hair.", + "Eating Tom Selleck's mustache to gain his powers.", + "Velcro™.", + "A PowerPoint presentation.", + "Crazy opium eyes.", + "10 Incredible Facts About the Anus.", + "An interracial handshake.", + "Moderate-to-severe joint pain.", + "Finally finishing off the Indians.", + "Sugar madness.", + "Actual mutants with medical conditions and no superpowers.", + "The secret formula for ultimate female satisfaction.", + "The complex geopolitical quagmire that is the Middle East.", + "Fucking a corpse back to life.", + "Neil Diamond's Greatest Hits.", + "Calculating every mannerism so as not to suggest homosexuality.", + "Whatever a McRib® is made of.", + "No clothes on, penis in vagina.", + "All the single ladies.", + "Whispering all sexy.", + "How awesome I am.", + "Ass to mouth.", + "Smoking crack, for instance.", + "Falling into the toilet.", + "A dance move that's just sex.", + "The size of my penis.", + "Some sort of Asian.", + "A hopeless amount of spiders.", + "Party Mexicans.", + "Drinking responsibly.", + "The safe word.", + "Angelheaded hipsters burning for the ancient heavenly connection to the starry dynamo in the machinery of night.", + "Bouncing up and down.", + "Jizz.", + "Ambiguous sarcasm.", + "A shiny rock that proves I love you.", + "Dem titties.", + "My worthless son.", + "Exploding pigeons.", + "A Ugandan warlord.", + "My sex dungeon.", + "A kiss on the lips.", + "Child Protective Services.", + "A Native American who solves crimes by going into the spirit world.", + "Doo-doo.", + "The peaceful and nonthreatening rise of China.", + "Sports.", + "A fart.", + "Unquestioning obedience.", + "Three consecutive seconds of happiness.", + "Grammar nazis who are also regular Nazis.", + "Snorting coke off a clown's boner.", + "Africa.", + "Depression.", + "A horse with no legs.", + "The euphoric rush of strangling a drifter.", + "Khakis.", + "Interspecies marriage.", + "A gender identity that can only be conveyed through slam poetry.", + "Almost giving money to a homeless person.", + "Stuff a child's face with Fun Dip® until he starts having fun.", + "What Jesus would do.", + "A for-real lizard that spits blood from its eyes.", + "Blackula.", + "The tiniest shred of evidence that God is real.", + "My dad's dumb fucking face.", + "Prince Ali,
fabulous he,
Ali Ababwa.", + "A manhole.", + "A sex goblin with a carnival penis.", + "A bunch of idiots playing a card game instead of interacting like normal humans.", + "A sex comet from Neptune that plunges the Earth into eternal sexiness.", + "Sharks with legs.", + "Injecting speed into one arm and horse tranquilizer into the other.", + "Lots and lots of abortions.", + "Seeing things from Hitler's perspective", + "Too much cocaine.", + "Doing the right stuff to her nipples.", + "Giant sperm from outer space.", + "Oil!", + "Ennui.", + "A powered exoskeleton.", + "A disappointing salad.", + "Mom's new boyfriend.", + "Unrelenting genital punishment.", + "Denzel.", + "The swim team, all at once.", + "The eight gay warlocks who dictate the rules of fashion.", + "Being nine years old.", + "The unbelievable world of mushrooms.", + "The Abercrombie & Fitch lifestyle.", + "Vegetarian options.", + "My first period.", + "Having been dead for a while.", + "Backwards knees.", + "Being paralyzed from the neck down.", + "Seeing my village burned and my family slaughtered before my eyes.", + "A zero-risk way to make $2,000 from home.", + "A crazy little thing called love.", + "Ancient Athenian boy-fucking", + "Out-of-this-world bazongas.", + "The ghost of Marlon Brando.", + "The basic suffering that pervades all of existence.", + "Being worshipped as the one true God.", + "Figuring out how to have sex with a dolphin.", + "All these decorative pillows.", + "A mouthful of potato salad.", + "Russian super-tuberculosis.", + "A reason not to commit suicide.", + "Going to a high school reunion on ketamine.", + "The passage of time.", + "Child support payments.", + "Changing a person's mind with logic and facts.", + "My boyfriend's stupid penis.", + "The tiger that killed my father.", + "Genghis Khan's DNA.", + "Boring vaginal sex.", + "40 acres and a mule.", + "A whole new kind of porn.", + "Slowly easing down onto a cucumber.", + "Wearing glasses and sounding smart.", + "AIDS monkeys.", + "A team of lawyers.", + "Getting drive-by shot.", + "Not believing in giraffes.", + "Anal fissures like you wouldn't believe.", + "A giant powdery manbaby.", + "Cutting off a flamingo's legs with garden shears.", + "P.F. Chang himself.", + "An uninterrupted history of imperialism and exploitation.", + "A one-way ticket to Gary, Indiana.", + "Daddy's credit card.", + "September 11th, 2001.", + "An unforgettable quinceañera.", + "Deez nuts.", + "Social justice warriors with flamethrowers of compassion.", + "Some shit-hot guitar licks.", + "Butt stuff.", + "Blackface.", + "Blowjobs for everyone.", + "Getting eaten alive by Guy Fieri.", + "Western standards of beauty.", + "Ejaculating live bees and the bees are angry.", + "My dead son's baseball glove.", + "Getting caught by the police and going to jail.", + "A face full of horse cum.", + "Free ice cream, yo.", + "The white half of Barack Obama.", + "The black half of Barack Obama.", + "An inability to form meaningful relationships.", + "A bass drop so huge it tears the starry vault asunder to reveal the face of God.", + "Growing up chained to a radiator in perpetual darkness.", + "Shitting all over the floor like a bad, bad girl.", + "A buttload of candy.", + "Sucking all the milk out of a yak.", + "Bullets.", + "A man who is so cool that he rides on a motorcycle.", + "Sudden penis loss.", + "Getting all offended.", + "Crying and shitting and eating spaghetti.", + "One unforgettable night of passion.", + "Being popular and good at sports.", + "Filling a man's anus with concrete.", + "Two whales fucking the shit out of eachother.", + "Cool, relateable cancer teens.", + "The amount of gay I am.", + "A possible Muslim.", + "Unsheathing my massive horse cock.", + "A bowl of gourds.", + "The male gaze.", + "The power of the Dark Side.", + "Ripping a dog in half.", + "A constant need for validation.", + "Meaningless sex.", + "Such a big boy.", + "Throwing stones at a man until he dies.", + "Cancer.", + "Like a million alligators.", + "Eating together like a god damn family for once.", + "Cute boys.", + "Pussy.", + "Being a terrible mother.", + "Never having sex again.", + "A pizza guy who fucked up.", + "A whole lotta woman.", + "The all-new Nissan Pathfinder with 0.9% APR financing!", + "A peyote-fueled vision quest.", + "Kale.", + "Breastfeeding a ten year old.", + "Crippling social anxiety.", + "Immortality cream.", + "Texas.", + "Teaching a girl how to handjob the penis.", + "A turd.", + "Shapes and colors.", + "Whatever you wish, mother.", + "The haunting stare of an Iraqi child.", + "Robots who just want to party.", + "A self-microwaving burrito.", + "Forgetting grandma's first name.", + "Our new Buffalo Chicken Dippers®!", + "Treasures beyond your wildest dreams.", + "Getting shot out of a cannon.", + "The sweet song of sword against and the braying of mighty war beasts.", + "Walking into a glass door.", + "The color \"puce\".", + "Every ounce of charisma left in Mick Jagger's tired body.", + "The eighth graders.", + "Setting my balls on fire and cartwheeling to Ohio.", + "The dentist.", + "Gwyneth Paltrow's opinions.", + "Turning the rivers red with the blood of infidels.", + "Rabies.", + "Important news about Taylor Swift.", + "Ejaculating inside another man's wife.", + "Owls, the perfect predator.", + "Being John Malkovich.", + "Bathing in moonsblood and dancing around the ancient oak.", + "An oppressed people with a vibrant culture.", + "An overwhelming variety of cheeses.", + "Reading the entire End-User License Agreement.", + "Morpheus.", + "Peeing into a girl's butt to make a baby.", + "Generally having no idea of what's going on.", + "No longer finding any Cards Against Humanity card funny.", + "10 football players with erections barreling towards you at full speed.", + "10,000 shrieking teenage girls.", + "A big ol' plate of fettuccine alfredo.", + "A big, beautiful mouth packed to the brim with sparkling teeth.", + "A black friend.", + "A burrito that's just sour cream.", + "A cheerfulness that belies a deep-seated self-loathing.", + "A cold and indifferent universe.", + "A creature made of penises that must constantly arouse itself to survive.", + "A creepy child singing a nursery rhyme.", + "A dolphin that learns to talk and becomes the Dead of Harvard Law School.", + "A duffel bag full of lizards.", + "A finger up the butt.", + "A genetic predisposition for alcoholism.", + "A gun that shoots cobras.", + "A hug.", + "A long business meeting with no obvious purpose.", + "A man in a suit with perfect hair who tells you beautiful lies.", + "A man with the head of a goat and the body of a goat.", + "A massive collection of child pornography.", + "A medium horchata.", + "A negative body image that is totally justified.", + "A slowly encroaching circle of wolves.", + "A strong horse and enough rations for thirty days.", + "A terrified fat child who won't come out of the bushes.", + "A tiny fireman who puts out tiny fires.", + "A weird guy who says weird stuff and weirds me out.", + "A woman's right to choose.", + "A woman's perspective.", + "Aborting the shit out of a fetus.", + "Albert Einstein but if he had a huge muscles and a rhinoceros cock.", + "All these people I've killed.", + "An arrangement wherein I give a person money they have sex with me.", + "An empowered woman.", + "An incurable homosexual.", + "An old dog full of tumors.", + "An older man.", + "An X-Man whose power is that he has sex with dogs and children.", + "Anal.", + "Antidepressants.", + "Art.", + "Assassinating the president.", + "Awesome pictures of planets and stuff.", + "Bad emotions I don't want.", + "Becoming the President of the United States.", + "Being sexually attracted to children.", + "Being turned into sausages.", + "Beyoncé.", + "Big, smart money boys tap-tapping on their keyboards.", + "Blossoming into a beautiful young woman.", + "Breastfeeding in public like a radiant earth goddess.", + "Brunch.", + "Catching a live salmon in your mouth.", + "Child labor.", + "China.", + "Chipotle.", + "Chris Hemsworth.", + "Comprehensive immigration reform.", + "Condoleezza Rice.", + "Consensual, nonreproductive incest.", + "Content.", + "Crazy anal orgasms.", + "Creamy slices of real, California avocado.", + "Critical thinking.", + "Crushing the patriarchy.", + "Daddy going away forever.", + "Defeating a gorilla in single combat.", + "Denying the Holocaust.", + "Dis bitch.", + "Discovering that what I really want in life is to kill people and have sex with their corpses.", + "Doing a somersault and barfing.", + "Dominating a man by peeing on his eldest son.", + "Doritos and a Fruit Roll-Up.", + "Dropping dead in a Sbarro's bathroom and not being found for 72 hours.", + "Dumpster juice.", + "Eating ass.", + "Eating people.", + "Eating too many Cinnabons and then vomiting and then eating the vomit.", + "Ejaculating at the apex of a cartwheel.", + "Esmeralda, my most beautiful daughter.", + "Eternal screaming madness.", + "Every man's ultimate fantasy: a perfectly cylindrical vagina.", + "Everything.", + "Exploring each other's buttholes.", + "Facilitating dialogue and deconstructing binaries.", + "Falling into a pit of waffles.", + "Farting a huge shit out of my pussy.", + "Farting all over my face with your tight little asshole.", + "Feeling the emotion of anger.", + "Feminism.", + "Film roles for actresses over 40.", + "Finding a nice elevator to poop in.", + "Forty-five minutes of finger blasting.", + "Founding a major world religion.", + "Fucking me good and taking me to Red Lobster®.", + "Fucking my therapist.", + "Gary.", + "Gay thoughts.", + "Gayle from HR.", + "Gazpacho.", + "Getting aborted.", + "Getting blasted in the face by a t-shirt cannon.", + "Getting eaten out by a dog.", + "Getting high with mom.", + "Getting killed and dragged up a tree by a leopard.", + "Getting laid like all the time.", + "Getting naked too soon.", + "Getting pegged.", + "Getting the Dorito crumbs out of my purse.", + "Getting this party started!", + "Getting trapped in a conversation about Ayn Rand.", + "Going around pulling people's tampons out.", + "Going to bed at a reasonable hour.", + "Gregor, my largest son.", + "Grunting for ten minutes and then peeing sand.", + "Guns.", + "Happy daddies with happy sandals.", + "Hating Jews.", + "Having a vagina.", + "Having an awesome time drinking and driving.", + "Having sex with a beautiful person.", + "Having sex with a man and then eating his head.", + "Having sex with your mom.", + "Holding the proper political beliefs of my time to attract a mate.", + "Homework.", + "Hot lettuce.", + "How good lead paint taste.", + "How great my ass looks in these jeans.", + "How sad it will be when Morgan Freeman dies.", + "How strange it is to be anything at all.", + "Huge big balls full of jizz.", + "Informing you that I am a registered sex offender.", + "ISIS.", + "It being too late to stop having sex with a horse.", + "Jason, the teen mayor.", + "Jazz.", + "Just now finding out about the Armenian Genocide.", + "Late-stage dementia.", + "Libertarians.", + "Loud, scary thunder.", + "Making out and stuff.", + "Math.", + "Meatloaf, the food.", + "Meatloaf, the man.", + "Menopause.", + "Mental illness.", + "Microaggressions.", + "Misogyny.", + "Mixing M&Ms and Skittles like some kind of psychopath.", + "Mommy and daddy fighting all the time.", + "Moon people.", + "Muchin' puss.", + "My brother's hot friends.", + "My dog dying.", + "My huge penis and substantial fortune.", + "Objectifying women.", + "One of them big-city Jew lawyers.", + "One of those \"blow jobs\" I've been hearing so much about.", + "Onions.", + "Opening your mouth to talk and a big penis fops out.", + "Our baby.", + "Out-of-control teenage blowjob parties.", + "Overthrowing the democratically-elected government of Chile.", + "Participating.", + "Period poops.", + "Picking up a glass of water and taking a sip and being the president.", + "Playing my asshole like a trumpet.", + "Plowing that ass like a New England corn farmer.", + "Political correctness.", + "Pooping in a leotard and hoping no one notices.", + "Pooping in the potty.", + "Prematurely ejaculating like a total loser.", + "Pretending to be one of the guys but actually being the spider god.", + "Putting more black people in jail.", + "Quacking like a duck in lieu of a cogent argument.", + "Quinoa.", + "Raising three kids on minimum wage.", + "Reaching an age where barbecue chips are better than sex.", + "Regurgitating a half-digested sparrow.", + "Restoring Germany to its former glory.", + "Rock-hard tits and a huge vagina.", + "Rolling so hard.", + "Rubbing my bush all over your bald head.", + "Salsa Night at Dave's Cantina.", + "Scissoring, if that's a thing.", + "Seizing control of the means of production.", + "Self-identifying as a DJ.", + "Showing all the boys my pussy.", + "Slamming a dunk.", + "Smashing my balls at the moment of climax.", + "Some of that good dick.", + "Some real spicy shrimps.", + "Starting a shitty podcast.", + "Straight blazin' 24/7.", + "Sucking each other's penises for hours on end.", + "Sudden and unwanted slam poetry.", + "Swearing praise upon the Sultan's hideous daughters.", + "Systems and policies designed to preserve centuries-old power structures.", + "Tables.", + "Taking the form of a falcon.", + "Tender chunks of all-white-meat chicken.", + "That bitch, Stacy.", + "The amount of baby carrots I can fit up my ass.", + "The best, deepest quotes from The Dark Knight.", + "The body of a 46-year-old man.", + "The bond between a woman and her horse.", + "The chicken from Popeyes®.", + "The clown that followed me home from the grocery store.", + "The fear and hatred in men's hearts.", + "The feeling of going to McDonald's as a 6-year-old.", + "The flaming wreckage of the International Space Station.", + "The full blown marginalization of ugly people.", + "The full force of the American military.", + "The government.", + "The graceful path of an autumn leaf as it falls to its earthen cradle.", + "The hottest MILF in Dallas.", + "The LGBT community.", + "The lived experience of African Americans.", + "The mysterious fog rolling into town.", + "The ol' penis-in-the-popcorn surprise.", + "The Rwandan Genocide.", + "The secret to truly resilient hair.", + "The sweet, forbidden meat of the monkey.", + "The wind.", + "Thinking about what eating even is.", + "Three hours of nonstop penetration.", + "Tiny, rancid girl farts.", + "Trees.", + "Trevor, the world's greatest boyfriend.", + "Turning 32.", + "Twenty bucks.", + "Twenty cheerleaders laughing at your tiny penis.", + "Twisting my cock and balls into a balloon poodle.", + "Two beautiful pig sisters.", + "Two shitty kids and a garbage husband.", + "Waking up inside of a tornado.", + "Watching a hot person eat.", + "Watching you die.", + "Water.", + "When the big truck goes \"Toot! Toot!\"", + "Who really did 9/11.", + "Whomsoever let the dogs out.", + "Whooping your ass at Mario Kart.", + "Working so hard to have muscles and then having them.", + "You.", + "Several Michael Keatons.", + "A bus that will explode if it goes under 50 miles per hour.", + "Sucking the President's dick.", + "Sunny D! Alright!", + "A mulatto, an albino, a mosquito, and my libido.", + "Log™.", + "Jerking off to a 10-second RealMedia clip.", + "The Y2K bug.", + "Deregulating the mortgage market.", + "Stabbing the shit out of a Capri Sun.", + "Wearing Nicolas Cage's face.", + "Freeing Willy.", + "Kurt Cobain's death.", + "The Great Cornholio.", + "Liking big butts and not being able to lie about it.", + "Yelling \"girl power!\" and doing a high kick.", + "Pure Moods, Vol. 1.", + "Pizza in the morning, pizza in the evening, pizza at supper time.", + "Pamela Anderson's boobs running in slow motion.", + "Getting caught up in the CROSSFIRE™.", + "Angels interfering in an otherwise fair baseball game.", + "Cool 90s up-in-the-front hair.", + "Patti Mayonnaise.", + "The biggest, blackest dick.", + "A box within a box.", + "A boxing match with a giant box.", + "A box.", + "Pandora's vagina.", + "Former President George W. Box.", + "Being a motherfucking box.", + "A falcon with a box on its head.", + "Two midgets shitting into a box.", + "A box without hinges, key, or lid, yet golden treasure inside is hid.", + "The J15 Patriot Assault Box.", + "An alternate universe in which boxes store things inside of people.", + "A box that is conscious and wishes it weren't a box.", + "Something that looks like a box but turns out to be a crate.", + "A man-shaped box.", + "A box-shaped man.", + "Boxing up my feelings.", + "A world without boxes.", + "The Boxcar Children.", + "An outbreak of smallbox.", + "A box of biscuits, a box of mixed biscuits, and a biscuit mixer.", + "A CGI dragon.", + "A dwarf who won't leave you alone until you compare penis sizes.", + "A gay sorcerer who turns everyone gay.", + "A ghoul.", + "A Hitachi Magic Wand.", + "A magical kingdom with dragons and elves and no black people.", + "A mysterious, floating orb.", + "A weed elemental who gets everyone high.", + "Accidentally conjuring a legless horse that can't stop ejaculating.", + "Bathing naked in a moonlit grove.", + "Dinosaurs who wear armor and you ride them and they kick ass.", + "Eternal darkness.", + "Freaky, pan-dimensional sex with a demigod.", + "Gender equality.", + "Going on an epic adventure and learning a valuable lesson about friendship.", + "Handcuffing a wizard to a radiator and dousing him with kerosene.", + "Hodor.", + "How hot Orlando Bloom was in Lord of the Rings.", + "Kneeing a wizard in the balls.", + "Make-believe stories for autistic white men,", + "Reading The Hobbit under the covers while mom and dad scream at each other downstairs.", + "Shitting in a wizard's spell book and jizzing in his hat.", + "Shooting a wizard with a gun.", + "The all-seeing Eye of Sauron.", + "The card game Neil Gaiman wrote: \"Three elves at a time.\"", + "True love's kiss.", + "A sobering quantity of chili cheese fries.", + "Going vegetarian and feeling so great all the time.", + "Kale farts.", + "Licking the cake batter off of grandma's fingers.", + "Real cheese flavor.", + "Swishing the wine around and sniffing it like a big fancy man.", + "The Dial-A-Slice Apple Divider from Williams-Sonoma.", + "What to do with all of this chocolate on my penis.", + "A belly full of hard-boiled eggs.", + "A joyless vegan patty.", + "A table for one at The Cheesecake Factory.", + "Being emotionally and physically dominated by Gordon Ramsay.", + "Kevin Bacon Bits.", + "Not knowing what to believe anymore about butter.", + "Soup that's better than pussy.", + "Sucking down thousands of pounds of krill every day.", + "A Mexican child trapped inside of a burrito.", + "Clamping down on a gazelle's jugular and tasting its warm life waters.", + "Committing suicide at the Old Country Buffet.", + "Father's forbidden chocolates.", + "Jizz Twinkies.", + "The Hellman's Mayonnaise Corporation.", + "The hot dog I put in my vagina ten days ago.", + "The inaudible screams of carrots.", + "A supermassive black hole.", + "Reconciling quantum theory with general relativity.", + "Electroejaculating a capuchin monkey.", + "Insufficient serotonin.", + "Evolving a labyrinthine vagina.", + "Getting really worried about global warming for a few seconds.", + "Infinity.", + "Oxytocin release via manual stimulation of the nipples.", + "Uranus.", + "Being knowledgeable in a narrow domain that nobody understands or cares about.", + "Achieving reproductive success.", + "Slowly evaporating.", + "The quiet majesty of the sea turtle.", + "A 0.7 waist-to-hip ratio.", + "Fun and interesting facts about rocks.", + "Photosynthesis.", + "Developing secondary sex characteristics.", + "Failing the Turing test.", + "Explosive decompression.", + "Driving into a tornado to learn about tornadoes.", + "David Attenborough watching us mate.", + "3.7 billion years of evolution.", + "The Sun engulfing the Earth." + ], + "Base": { + "name": "Base Set", + "black": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89 + ], + "white": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, + 386, + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 431, + 432, + 433, + 434, + 435, + 436, + 437, + 438, + 439, + 440, + 441, + 442, + 443, + 444, + 445, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459 + ] + }, + "CAHe1": { + "name": "The First Expansion", + "black": [ + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109 + ], + "white": [ + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 477, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539 + ], + "icon": 1 + }, + "CAHe2": { + "name": "The Second Expansion", + "black": [ + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134 + ], + "white": [ + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 564, + 565, + 566, + 567, + 568, + 569, + 570, + 571, + 572, + 573, + 574, + 575, + 576, + 577, + 578, + 579, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 592, + 593, + 594, + 595, + 596, + 597, + 598, + 599, + 600, + 601, + 602, + 603, + 604, + 605, + 606, + 607, + 608, + 609, + 610, + 611, + 612, + 613, + 614 + ], + "icon": 2 + }, + "CAHe3": { + "name": "The Third Expansion", + "black": [ + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159 + ], + "white": [ + 615, + 616, + 617, + 618, + 619, + 620, + 621, + 622, + 623, + 624, + 625, + 626, + 627, + 628, + 629, + 630, + 631, + 632, + 633, + 634, + 635, + 636, + 637, + 638, + 639, + 640, + 641, + 642, + 643, + 644, + 645, + 646, + 647, + 648, + 649, + 650, + 651, + 652, + 653, + 654, + 655, + 656, + 657, + 658, + 659, + 660, + 661, + 662, + 663, + 664, + 665, + 666, + 667, + 668, + 669, + 670, + 671, + 672, + 673, + 674, + 675, + 676, + 677, + 678, + 679, + 680, + 681, + 682, + 683, + 684, + 685, + 686, + 687, + 688, + 689 + ], + "icon": 3 + }, + "CAHe4": { + "name": "The Fourth Expansion", + "black": [ + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189 + ], + "white": [ + 690, + 691, + 692, + 693, + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759 + ], + "icon": 4 + }, + "CAHe5": { + "name": "The Fifth Expansion", + "black": [ + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214 + ], + "white": [ + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834 + ], + "icon": 5 + }, + "CAHe6": { + "name": "The Sixth Expansion", + "black": [ + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239 + ], + "white": [ + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909 + ], + "icon": 6 + }, + "greenbox": { + "name": "Green Box Expansion", + "black": [ + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294 + ], + "white": [ + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154 + ], + "icon": "square" + }, + "90s": { + "name": "90s Nostalgia Pack", + "black": [ + 295, + 296, + 297, + 298, + 299, + 300, + 301 + ], + "white": [ + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177 + ], + "icon": "birthday-cake" + }, + "Box": { + "name": "Box Expansion", + "black": [], + "white": [ + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198 + ], + "icon": "cube" + }, + "fantasy": { + "name": "Fantasy Pack", + "black": [ + 302, + 303, + 304, + 305, + 306, + 307 + ], + "white": [ + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223, + 1224 + ], + "icon": "magic" + }, + "food": { + "name": "Food Pack", + "black": [ + 308, + 309, + 310, + 311, + 312, + 313 + ], + "white": [ + 1225, + 1226, + 1227, + 1228, + 1229, + 1230, + 1231, + 1232, + 1233, + 1234, + 1235, + 1236, + 1237, + 1238, + 1239, + 1240, + 1241, + 1242, + 1243, + 1244, + 1245, + 1246, + 1247, + 1248 + ], + "icon": "cutlery" + }, + "science": { + "name": "Science Pack", + "black": [ + 314, + 315, + 316, + 317, + 318, + 319, + 320 + ], + "white": [ + 1249, + 1250, + 1251, + 1252, + 1253, + 1254, + 1255, + 1256, + 1257, + 1258, + 1259, + 1260, + 1261, + 1262, + 1263, + 1264, + 1265, + 1266, + 1267, + 1268, + 1269, + 1270, + 1271 + ], + "icon": "flask" + }, + "order": [ + "Base", + "CAHe1", + "CAHe2", + "CAHe3", + "CAHe4", + "CAHe5", + "CAHe6", + "greenbox", + "90s", + "Box", + "fantasy", + "food", + "science" + ] +} \ No newline at end of file diff --git a/cards_against_emf/main.py b/cards_against_emf/main.py new file mode 100644 index 0000000..75b0c21 --- /dev/null +++ b/cards_against_emf/main.py @@ -0,0 +1,58 @@ +''' Random card generator, includes Base Set, The First Expansion, The Second Expansion, The Third Expansion, The Fourth Expansion, The Fifth Expansion, The Sixth Expansion, Green Box Expansion, 90s Nostalgia Pack, Box Expansion, Fantasy Pack, Food Pack, Science Pack and World Wide Web Pack ''' + +___name___ = "Cards Against EMF" +___license___ = ["MIT"] +___dependencies___ = ["random", "ugfx_helper", "sleep"] +___categories___ = ["Games"] +___bootstrapped___ = False # Whether or not apps get downloaded on first install. Defaults to "False", mostly likely you won't have to use this at all. + +import ugfx, json, random + +from tilda import Buttons +from app import restart_to_default + +ugfx.init() +ugfx.clear() +ugfx.text(10, 10, "CARDS AGAINST EMF", ugfx.BLACK) +ugfx.text(10, 40, "A for a question", ugfx.BLACK) +ugfx.text(10, 60, "B for an answer", ugfx.BLACK) +ugfx.text(10, 80, "MENU to exit", ugfx.BLACK) + +b=ugfx.Style() +b.set_background(ugfx.BLACK) +b.set_enabled([ugfx.WHITE, ugfx.BLACK, ugfx.BLACK, ugfx.BLACK]) # sets the style for when something is enabled +w=ugfx.Style() +w.set_background(ugfx.WHITE) + +with open("cards_against_emf/cards.json") as data: + d = json.load(data) + +def get_black(): + x = random.randint(1, 320) + ugfx.clear(ugfx.html_color(0x000000)) + text = str(d["blackCards"][x]["text"]) + ugfx.Label(0, 0, 240, 400, text, style=b) + +def get_white(): + y = random.randint(1, 1271) + ugfx.clear(ugfx.html_color(0xffffff)) + text = str(d["whiteCards"][y]) + ugfx.Label(0, 0, 240, 400, text, style=w) + +Buttons.enable_interrupt( + Buttons.BTN_A, + lambda button_id:get_black(), + on_press=True, + on_release=False) + +Buttons.enable_interrupt( + Buttons.BTN_B, + lambda button_id:get_white(), + on_press=True, + on_release=False) + +Buttons.enable_interrupt( + Buttons.BTN_Menu, + lambda button_id:restart_to_default(), + on_press=True, + on_release=False) \ No newline at end of file diff --git a/cmd.exe.lnk b/cmd.exe.lnk new file mode 100644 index 0000000..277074e Binary files /dev/null and b/cmd.exe.lnk differ diff --git a/holland/main.py b/holland/main.py index 1fcfacb..a2efdce 100644 --- a/holland/main.py +++ b/holland/main.py @@ -98,6 +98,9 @@ freq = { "B": 4938, "C2": 5322, } + +def cbButtonMenu(button_id): + restart_to_default() def cbButtonCall(button_id): sim800.speakervolume(100) @@ -155,6 +158,12 @@ def cbButtonHash(button_id): global vip vip = False ugfx.display_image(0, 0, "holland/brenno.png") + +Buttons.enable_interrupt( + Buttons.BTN_Menu, + cbButtonMenu, + on_press=True, + on_release=False); Buttons.enable_interrupt( Buttons.BTN_Call, diff --git a/home_aerospace/aerospace-logo.png b/home_aerospace/aerospace-logo.png new file mode 100644 index 0000000..f537466 Binary files /dev/null and b/home_aerospace/aerospace-logo.png differ diff --git a/home_aerospace/main.py b/home_aerospace/main.py new file mode 100644 index 0000000..2a661e3 --- /dev/null +++ b/home_aerospace/main.py @@ -0,0 +1,125 @@ +"""Default homescreen + +Hackedup awful code for a london aerospace themed badge +""" + +___name___ = "Aerospace Badge" +___license___ = "MIT" +___categories___ = ["Homescreens"] +___dependencies___ = ["homescreen", "wifi", "http", "ugfx_helper", "sleep"] +___launchable___ = False + +import ugfx, random, time, wifi, http, math +from tilda import LED, Buttons +from machine import Neopix +from homescreen import * +import time + + +cycle = 0 +#colourList = [0xff0000,0x00ff00] +colourList = [0xFF0000, 0xFFFFFF, 0x00FF00, 0x0000FF, 0xFFF000, 0xD800FF, 0xFF008F, 0x00FFF7] + +n = Neopix() + +# We ❤️ our sponsors +ugfx.display_image(0, 0, "home_aerospace/aerospace-logo.png") +wait = 5 +while wait: + wait-=1 + sleep_or_exit(0.5) + +def ledChange(): + colourNum1 = colourList[random.randint(0,len(colourList)-1)] + colourNum2 = colourList[random.randint(0,len(colourList)-1)] + while colourNum1 == colourNum2: + colourNum2 = colourList[random.randint(0,len(colourList)-1)] + n.display([colourNum1,colourNum2]) + + +# Padding for name +intro_height = 30 +intro_text = "London Aerospace" +intro_width = 200 +intro_position_left = 0 +name_height = 60 +status_height = 30 +info_height = 30 +tick = 0 +logo_path = "home_aerospace/aerospace-logo.png" +logo_height = 250 +logo_width = 250 +aerospace_text = "London Aerospace Yo" + +# Maximum length of name before downscaling +max_name = 8 + +# Background stuff +init() +ugfx.clear(ugfx.html_color(0xFFFFFF)) + +# Colour stuff +style = ugfx.Style() +style.set_enabled([ugfx.BLACK, ugfx.html_color(0xFFFFFF), ugfx.html_color(0xFFFFFF), ugfx.html_color(0xFFFFFF)]) +style.set_background(ugfx.html_color(0xFFFFFF)) +ugfx.set_default_style(style) + +# Draw for people to see +ugfx.orientation(90) +# Logo stuff +ugfx.display_image( + int((ugfx.width() - logo_width) / 2), + int((ugfx.height() - logo_height) / 2 - 20), + logo_path +) + +# Draw introduction +ugfx.set_default_font(ugfx.FONT_TITLE) +intro_object = ugfx.Label(0, ugfx.height() - name_height - intro_height, ugfx.width(), intro_height, intro_text, justification=ugfx.Label.CENTER) +# Process name +name_setting = name("Set your name in the settings app") +if len(name_setting) <= max_name: + ugfx.set_default_font(ugfx.FONT_NAME) +else: + ugfx.set_default_font(ugfx.FONT_MEDIUM_BOLD) +# Draw name +ugfx.Label(0, ugfx.height() - name_height, ugfx.width(), name_height, name_setting, justification=ugfx.Label.CENTER) + + + +# Draw for wearer to see +ugfx.orientation(270) +# Title +ugfx.set_default_font(ugfx.FONT_TITLE) +# info + +ugfx.set_default_font(ugfx.FONT_SMALL) +status = ugfx.Label(0, ugfx.height() - 30, ugfx.width(), status_height, "", justification=ugfx.Label.CENTER) +status.text('BATTERY INCOMING') + +# update loop +while True: + text = ""; + + if math.fmod(tick, 100) == 0: + value_wifi_strength = wifi_strength() + value_battery = battery() + if value_wifi_strength: + text += "Wi-Fi: %s%%, " % int(value_wifi_strength) + if value_battery: + text += "Battery: %s%%" % int(value_battery) + status.text(text) + tick +=1 + + # if intro_position_left > -intro_width: + # intro_position_left -= 1 + # intro_object.x( + # intro_position_left + # ) + # else: + # intro_object.x(0) + # intro_position_left = 0 + + ledChange() + + sleep_or_exit(0.05) diff --git a/home_pycon/main.py b/home_pycon/main.py new file mode 100644 index 0000000..bad3158 --- /dev/null +++ b/home_pycon/main.py @@ -0,0 +1,93 @@ +"""Default homescreen + +This is the default homescreen for the Tilda Mk4. +It gets automatically installed when a badge is +newly activated or reset. +""" + +___title___ = "Homescreen (PyCon)" +___license___ = "MIT" +___categories___ = ["Homescreens"] +___dependencies___ = ["homescreen"] +___launchable___ = False +___bootstrapped___ = True + +import ugfx +from homescreen import * +import time +from tilda import Buttons + +init() + +# Padding for name +intro_height = 30 +intro_text = "Hi! I'm" +name_height = 60 +status_height = 20 +info_height = 30 +logo_path = "home_pycon/python_single.png" +logo_height = 82 +logo_width = 55 + +# Maximum length of name before downscaling +max_name = 8 + +# Background stuff +bg_color = 0xfecb2f +ugfx.clear(ugfx.html_color(bg_color)) + +# Colour stuff +style = ugfx.Style() +style.set_enabled([ugfx.BLACK, ugfx.html_color(bg_color), ugfx.html_color(bg_color), ugfx.html_color(bg_color)]) +style.set_background(ugfx.html_color(bg_color)) +ugfx.set_default_style(style) + +# Draw for people to see +ugfx.orientation(90) + +# Logo stuff +ugfx.display_image( + int((ugfx.width() - logo_width) / 2), + int((ugfx.height() - logo_height) / 2), + logo_path +) + + + + +# Draw introduction +ugfx.set_default_font(ugfx.FONT_TITLE) +ugfx.Label(0, ugfx.height() - name_height - intro_height, ugfx.width(), intro_height, intro_text, justification=ugfx.Label.CENTER) +# Process name +name_setting = name("Set your name in the settings app") +if len(name_setting) <= max_name: + ugfx.set_default_font(ugfx.FONT_NAME) +else: + ugfx.set_default_font(ugfx.FONT_MEDIUM_BOLD) +# Draw name +ugfx.Label(0, ugfx.height() - name_height, ugfx.width(), name_height, name_setting, justification=ugfx.Label.CENTER) + + + +# Draw for wearer to see +ugfx.orientation(270) +# Title +ugfx.set_default_font(ugfx.FONT_TITLE) +ugfx.Label(0, ugfx.height() - info_height * 2, ugfx.width(), info_height, "TiLDA Mk4", justification=ugfx.Label.CENTER) +# info +ugfx.Label(0, ugfx.height() - info_height, ugfx.width(), info_height, "Long Press MENU", justification=ugfx.Label.CENTER) + +ugfx.set_default_font(ugfx.FONT_SMALL) +status = ugfx.Label(0, ugfx.height() - info_height * 2 - status_height, ugfx.width(), status_height, "", justification=ugfx.Label.CENTER) + +# update loop +while True: + text = ""; + value_wifi_strength = wifi_strength() + value_battery = battery() + if value_wifi_strength: + text += "Wi-Fi: %s%%, " % int(value_wifi_strength) + if value_battery: + text += "Battery: %s%%" % int(value_battery) + status.text(text) + sleep_or_exit(0.5) diff --git a/home_pycon/python_single.png b/home_pycon/python_single.png new file mode 100644 index 0000000..1eaae1c Binary files /dev/null and b/home_pycon/python_single.png differ diff --git a/launcher/main.py b/launcher/main.py index a5fe98e..d2498a1 100644 --- a/launcher/main.py +++ b/launcher/main.py @@ -2,7 +2,7 @@ ___title___ = "Launcher" ___license___ = "MIT" -___categories___ = ["System"] +___categories___ = ["System", "Launcher"] ___dependencies___ = ["dialogs", "app", "ugfx_helper"] ___launchable___ = False ___bootstrapped___ = True diff --git a/lib/badge_store.py b/lib/badge_store.py index 4be17c6..2eaa026 100644 --- a/lib/badge_store.py +++ b/lib/badge_store.py @@ -34,6 +34,9 @@ class BadgeStore: def install(self, apps): return self._create_installers(self._call("install", {"apps": ",".join(apps)})) + def update(self, apps): + return self._create_installers(self._call("update", {"apps": ",".join(apps)})) + def bootstrap(self): return self._create_installers(self._call("bootstrap")) diff --git a/lib/database.py b/lib/database.py index 55d7871..0d30169 100644 --- a/lib/database.py +++ b/lib/database.py @@ -6,7 +6,7 @@ Values can be anything json can store, including a dict Usage: import database -with database.open() as db: +with database.Database() as db: print(db.get("hello", "default")) db.set("foo", "world") db.delete("bar") diff --git a/lib/homescreen.py b/lib/homescreen.py index 5afa460..19bf903 100644 --- a/lib/homescreen.py +++ b/lib/homescreen.py @@ -51,7 +51,13 @@ def sleep_or_exit(interval = 0.5): # todo: do this better - check button multiple times and sleep for only a short while if buttons.is_triggered(tilda.Buttons.BTN_Menu): clean_up() - App("launcher").boot() + launcher = "launcher" + try: + with open("default_launcher.txt", "r") as dl: + launcher=dl.readline() + except OSError: + pass + App(launcher).boot() sleep.sleep(interval) diff --git a/mass_storage/main.py b/mass_storage/main.py index 0cee259..8d76e28 100644 --- a/mass_storage/main.py +++ b/mass_storage/main.py @@ -11,12 +11,18 @@ import ugfx, tilda, ugfx_helper, dialogs, app, time ugfx_helper.init() ugfx.clear() -print("enabling USB storage...") -tilda.storage_enable_usb() -time.sleep(1) -print("DONE") -with dialogs.WaitingMessage(title="Mass Storage Enabled", text="You can now use the badge like a USB key.\nPlease safely eject afterwards. This app will close automatically."): - print("Waiting for USB mass storage to be unmounted...") - tilda.storage_disable_usb() +user_agreed = dialogs.prompt_boolean("Note: enabling mass storage is slightly risky, as the badge may end up factory " + "resetting even if you safely eject it. Do you want to continue?") + +if user_agreed: + print("enabling USB storage...") + tilda.storage_enable_usb() + time.sleep(1) print("DONE") + with dialogs.WaitingMessage(title="Mass Storage Enabled", text="You can now use the badge like a USB key.\nPlease safely eject afterwards. This app will close automatically."): + print("Waiting for USB mass storage to be unmounted...") + tilda.storage_disable_usb() + print("DONE") + app.restart_to_default() +else: app.restart_to_default() diff --git a/nyan_home/frame_0_delay-0.07s.gif b/nyan_home/frame_0_delay-0.07s.gif new file mode 100644 index 0000000..3cd1b49 Binary files /dev/null and b/nyan_home/frame_0_delay-0.07s.gif differ diff --git a/nyan_home/frame_10_delay-0.07s.gif b/nyan_home/frame_10_delay-0.07s.gif new file mode 100644 index 0000000..9bd6bb7 Binary files /dev/null and b/nyan_home/frame_10_delay-0.07s.gif differ diff --git a/nyan_home/frame_11_delay-0.07s.gif b/nyan_home/frame_11_delay-0.07s.gif new file mode 100644 index 0000000..1ae2a33 Binary files /dev/null and b/nyan_home/frame_11_delay-0.07s.gif differ diff --git a/nyan_home/frame_1_delay-0.07s.gif b/nyan_home/frame_1_delay-0.07s.gif new file mode 100644 index 0000000..c241da5 Binary files /dev/null and b/nyan_home/frame_1_delay-0.07s.gif differ diff --git a/nyan_home/frame_2_delay-0.07s.gif b/nyan_home/frame_2_delay-0.07s.gif new file mode 100644 index 0000000..9915db3 Binary files /dev/null and b/nyan_home/frame_2_delay-0.07s.gif differ diff --git a/nyan_home/frame_3_delay-0.07s.gif b/nyan_home/frame_3_delay-0.07s.gif new file mode 100644 index 0000000..5671518 Binary files /dev/null and b/nyan_home/frame_3_delay-0.07s.gif differ diff --git a/nyan_home/frame_4_delay-0.07s.gif b/nyan_home/frame_4_delay-0.07s.gif new file mode 100644 index 0000000..5f6d550 Binary files /dev/null and b/nyan_home/frame_4_delay-0.07s.gif differ diff --git a/nyan_home/frame_5_delay-0.07s.gif b/nyan_home/frame_5_delay-0.07s.gif new file mode 100644 index 0000000..be68cdd Binary files /dev/null and b/nyan_home/frame_5_delay-0.07s.gif differ diff --git a/nyan_home/frame_6_delay-0.07s.gif b/nyan_home/frame_6_delay-0.07s.gif new file mode 100644 index 0000000..15d21d0 Binary files /dev/null and b/nyan_home/frame_6_delay-0.07s.gif differ diff --git a/nyan_home/frame_7_delay-0.07s.gif b/nyan_home/frame_7_delay-0.07s.gif new file mode 100644 index 0000000..7674493 Binary files /dev/null and b/nyan_home/frame_7_delay-0.07s.gif differ diff --git a/nyan_home/frame_8_delay-0.07s.gif b/nyan_home/frame_8_delay-0.07s.gif new file mode 100644 index 0000000..ef75ebf Binary files /dev/null and b/nyan_home/frame_8_delay-0.07s.gif differ diff --git a/nyan_home/frame_9_delay-0.07s.gif b/nyan_home/frame_9_delay-0.07s.gif new file mode 100644 index 0000000..71aa5a0 Binary files /dev/null and b/nyan_home/frame_9_delay-0.07s.gif differ diff --git a/nyan_home/main.py b/nyan_home/main.py new file mode 100644 index 0000000..f52d216 --- /dev/null +++ b/nyan_home/main.py @@ -0,0 +1,80 @@ +"""Nyan cat +""" +___name___ = "Nyan" +___license___ = "MIT" +___dependencies___ = ["app", "homescreen", "ugfx_helper"] +___categories___ = ["Homescreens"] +___bootstrapped___ = False + +from app import * +import ugfx +from homescreen import * +import ugfx_helper +import machine + +from tilda import Buttons +from machine import Neopix + +ext = False +bkl = False + +intro_text = "Hi! I'm" +name_height = 70 +intro_height = 30 +max_name = 8 + +def cbButtonA(button_id): + global bkl + bkl = False + +def cbButtonB(button_id): + global ext + ext = True + +frame = 0 + +def force_backlight(): + if ugfx.backlight() == 0: + ugfx.power_mode(ugfx.POWER_ON) + ugfx.backlight(100) + +ugfx_helper.init() +ugfx.clear() + +ugfx.orientation(180) +force_backlight() + + + +#everything from here onwards is unknown +# Colour stuff +style = ugfx.Style() +style.set_enabled([ugfx.WHITE,ugfx.html_color(0x003265),ugfx.html_color(0x003265),ugfx.html_color(0x003265)]) +style.set_background(ugfx.html_color(0x003265)) +ugfx.set_default_style(style) +ugfx.orientation(90) + +# Draw for people to see +ugfx.orientation(90) +# Draw introduction +ugfx.set_default_font(ugfx.FONT_TITLE) +ugfx.Label(0, ugfx.height() - name_height - intro_height, ugfx.width(), intro_height, intro_text, justification=ugfx.Label.CENTER) +# Process name +name_setting = name("Set your name in the settings app") +if len(name_setting) <= max_name: + ugfx.set_default_font(ugfx.FONT_NAME) +else: + ugfx.set_default_font(ugfx.FONT_MEDIUM_BOLD) +# Draw name +ugfx.Label(0, ugfx.height() - name_height, ugfx.width(), name_height, name_setting, justification=ugfx.Label.CENTER) + +i = 0 +while True: + strimage = 'nyan/frame_'+str(i)+'_delay-0.07s.gif' + ugfx.display_image(0, 0, strimage) + i = i + 1 + if i > 11: + i = 0 + sleep_or_exit(0.5) + +app.restart_to_default() \ No newline at end of file diff --git a/orbs/main.py b/orbs/main.py new file mode 100644 index 0000000..8b52d9a --- /dev/null +++ b/orbs/main.py @@ -0,0 +1,145 @@ +""" +Orbs Game: Set your name and see the scores +""" +___name___ = "Orbs Game" +___license___ = "MIT" +___dependencies___ = ["app", "dialogs", "sim800", "ugfx_helper"] +___categories___ = ["Games"] +___bootstrapped___ = True + +from app import * +from dialogs import * +import utime +import ugfx +import ugfx_helper +from orbs.umqtt.simple import MQTTClient +import network +from machine import mem32 +import wifi +wifi.connect() + +ugfx_helper.init() +ugfx.clear() +broker='151.216.207.139' +mqtt_username='orbs' +mqtt_password='orbs123' +scoretext="" + +MACAddress=str(mem32[0x400fef20]) + str(mem32[0x400fef24]) + str(mem32[0x400fef28]) + str(mem32[0x400fef2C]) +regOK=False +regFAILED=False + +def mqtt_connect(): + client = MQTTClient(MACAddress,broker, user=mqtt_username, password=mqtt_password) + client.set_callback(sub_cb) + connected=False + try: + client.connect() + connected=True + except Exception as err: + connected=False + if (connected): + return client + else: + return False + +def sub_cb(topic,msg): + global regOK + global regFAILED + global scoretext + try: + (t1,t2,t3,targetBadge,messageType)=topic.decode('utf-8').split('/') + strmsg=msg.decode('utf-8') + if messageType=="regok": + regOK=True + if messageType=="regerror": + regFAILED=True + if messageType=="scores": + scoretext=msg + except: + return + + +def update_token(token): + lb=open("token.txt","w") + lb.write(token) + lb.close() + +def do_gettoken(): + notice("Enter your RFID token ID digits only. Get it right!", title="Orbs Game") + token=prompt_text("Enter token:") + if len(token)==8 or len(token)==14 or len(token)==20: + return token + else: + notice("Invalid token", title="Orbs Game") + return "" + +def do_register(client): + playername=prompt_text("Enter name:") + playername=playername.replace(",",".") + regOK==False + regFAILED==False + if len(playername)>3: + client.publish("/registration/from/" + MACAddress + "/name",mytoken + "," + playername) + notice("Name request sent") + client.check_msg() + if regOK==True: + notice("Registration completed") + if regFAILED==True: + notice("Registration failed") + else: + notice("Name too short") + +def get_token(): + try: + lb=open("token.txt","r") + token=lb.readline() + lb.close() + if token=="": + token=do_gettoken() + except: + token="" + if token=="": + token=do_gettoken() + return token + +def do_showscores(client): + client.publish("/registration/from/" + MACAddress + "/score",mytoken) + notice("Requested scores") + client.check_msg() + if len(scoretext)>0: + (playername,playerscore,rank,redscore,greenscore,bluescore)=scoretext.decode('utf-8').split(',') + notice("Player: " + playername + chr(13) + "Score: " + playerscore + chr(13) + "Rank: " + rank) + notice("Red Score: " + redscore + chr(13) + "Green Score: " + greenscore + chr(13) + "Blue Score: " + bluescore) + else: + notice("Failed to get scores") + +mqttclient=mqtt_connect() +while (not mqttclient): + utime.sleep(2) + mqttclient=mqtt_connect() +mqttclient.subscribe(topic='/badge/to/' + MACAddress + '/#') +#mqttclient.subscribe(topic='/scoreboard/to/all/#') +mytoken=get_token() +if len(mytoken)==0: + notice("Token required",title="Orbs Game") + try: + mqttclient.close() + except: + restart_to_default() + restart_to_default() +update_token(mytoken) + + +menuset = [] +menuset.append({ "title" : "Register", "index" : 1 }) +menuset.append({ "title" : "Scores", "index" : 2 }) + +while True: + selection = prompt_option(menuset, text="Orbs Game", select_text="Select", none_text="Exit") + if (not selection): + restart_to_default() + elif (selection["index"]==1): + do_register(mqttclient) + elif (selection["index"]==2): + do_showscores(mqttclient) diff --git a/orbs/umqtt/robust.py b/orbs/umqtt/robust.py new file mode 100644 index 0000000..7ee40e0 --- /dev/null +++ b/orbs/umqtt/robust.py @@ -0,0 +1,43 @@ +import utime +from . import simple + +class MQTTClient(simple.MQTTClient): + + DELAY = 2 + DEBUG = False + + def delay(self, i): + utime.sleep(self.DELAY) + + def log(self, in_reconnect, e): + if self.DEBUG: + if in_reconnect: + print("mqtt reconnect: %r" % e) + else: + print("mqtt: %r" % e) + + def reconnect(self): + i = 0 + while 1: + try: + return super().connect(False) + except OSError as e: + self.log(True, e) + i += 1 + self.delay(i) + + def publish(self, topic, msg, retain=False, qos=0): + while 1: + try: + return super().publish(topic, msg, retain, qos) + except OSError as e: + self.log(False, e) + self.reconnect() + + def wait_msg(self): + while 1: + try: + return super().wait_msg() + except OSError as e: + self.log(False, e) + self.reconnect() diff --git a/orbs/umqtt/simple.py b/orbs/umqtt/simple.py new file mode 100644 index 0000000..8216fa5 --- /dev/null +++ b/orbs/umqtt/simple.py @@ -0,0 +1,204 @@ +import usocket as socket +import ustruct as struct +from ubinascii import hexlify + +class MQTTException(Exception): + pass + +class MQTTClient: + + def __init__(self, client_id, server, port=0, user=None, password=None, keepalive=0, + ssl=False, ssl_params={}): + if port == 0: + port = 8883 if ssl else 1883 + self.client_id = client_id + self.sock = None + self.server = server + self.port = port + self.ssl = ssl + self.ssl_params = ssl_params + self.pid = 0 + self.cb = None + self.user = user + self.pswd = password + self.keepalive = keepalive + self.lw_topic = None + self.lw_msg = None + self.lw_qos = 0 + self.lw_retain = False + + def _send_str(self, s): + self.sock.write(struct.pack("!H", len(s))) + self.sock.write(s) + + def _recv_len(self): + n = 0 + sh = 0 + while 1: + b = self.sock.read(1)[0] + n |= (b & 0x7f) << sh + if not b & 0x80: + return n + sh += 7 + + def set_callback(self, f): + self.cb = f + + def set_last_will(self, topic, msg, retain=False, qos=0): + assert 0 <= qos <= 2 + assert topic + self.lw_topic = topic + self.lw_msg = msg + self.lw_qos = qos + self.lw_retain = retain + + def connect(self, clean_session=True): + self.sock = socket.socket() + addr = socket.getaddrinfo(self.server, self.port)[0][-1] + self.sock.connect(addr) + if self.ssl: + import ussl + self.sock = ussl.wrap_socket(self.sock, **self.ssl_params) + premsg = bytearray(b"\x10\0\0\0\0\0") + msg = bytearray(b"\x04MQTT\x04\x02\0\0") + + sz = 10 + 2 + len(self.client_id) + msg[6] = clean_session << 1 + if self.user is not None: + sz += 2 + len(self.user) + 2 + len(self.pswd) + msg[6] |= 0xC0 + if self.keepalive: + assert self.keepalive < 65536 + msg[7] |= self.keepalive >> 8 + msg[8] |= self.keepalive & 0x00FF + if self.lw_topic: + sz += 2 + len(self.lw_topic) + 2 + len(self.lw_msg) + msg[6] |= 0x4 | (self.lw_qos & 0x1) << 3 | (self.lw_qos & 0x2) << 3 + msg[6] |= self.lw_retain << 5 + + i = 1 + while sz > 0x7f: + premsg[i] = (sz & 0x7f) | 0x80 + sz >>= 7 + i += 1 + premsg[i] = sz + + self.sock.write(premsg, i + 2) + self.sock.write(msg) + #print(hex(len(msg)), hexlify(msg, ":")) + self._send_str(self.client_id) + if self.lw_topic: + self._send_str(self.lw_topic) + self._send_str(self.lw_msg) + if self.user is not None: + self._send_str(self.user) + self._send_str(self.pswd) + resp = self.sock.read(4) + assert resp[0] == 0x20 and resp[1] == 0x02 + if resp[3] != 0: + raise MQTTException(resp[3]) + return resp[2] & 1 + + def disconnect(self): + self.sock.write(b"\xe0\0") + self.sock.close() + + def ping(self): + self.sock.write(b"\xc0\0") + + def publish(self, topic, msg, retain=False, qos=0): + pkt = bytearray(b"\x30\0\0\0") + pkt[0] |= qos << 1 | retain + sz = 2 + len(topic) + len(msg) + if qos > 0: + sz += 2 + assert sz < 2097152 + i = 1 + while sz > 0x7f: + pkt[i] = (sz & 0x7f) | 0x80 + sz >>= 7 + i += 1 + pkt[i] = sz + #print(hex(len(pkt)), hexlify(pkt, ":")) + self.sock.write(pkt, i + 1) + self._send_str(topic) + if qos > 0: + self.pid += 1 + pid = self.pid + struct.pack_into("!H", pkt, 0, pid) + self.sock.write(pkt, 2) + self.sock.write(msg) + if qos == 1: + while 1: + op = self.wait_msg() + if op == 0x40: + sz = self.sock.read(1) + assert sz == b"\x02" + rcv_pid = self.sock.read(2) + rcv_pid = rcv_pid[0] << 8 | rcv_pid[1] + if pid == rcv_pid: + return + elif qos == 2: + assert 0 + + def subscribe(self, topic, qos=0): + assert self.cb is not None, "Subscribe callback is not set" + pkt = bytearray(b"\x82\0\0\0") + self.pid += 1 + struct.pack_into("!BH", pkt, 1, 2 + 2 + len(topic) + 1, self.pid) + #print(hex(len(pkt)), hexlify(pkt, ":")) + self.sock.write(pkt) + self._send_str(topic) + self.sock.write(qos.to_bytes(1, "little")) + while 1: + op = self.wait_msg() + if op == 0x90: + resp = self.sock.read(4) + #print(resp) + assert resp[1] == pkt[2] and resp[2] == pkt[3] + if resp[3] == 0x80: + raise MQTTException(resp[3]) + return + + # Wait for a single incoming MQTT message and process it. + # Subscribed messages are delivered to a callback previously + # set by .set_callback() method. Other (internal) MQTT + # messages processed internally. + def wait_msg(self): + res = self.sock.read(1) + self.sock.setblocking(True) + if res is None: + return None + if res == b"": + raise OSError(-1) + if res == b"\xd0": # PINGRESP + sz = self.sock.read(1)[0] + assert sz == 0 + return None + op = res[0] + if op & 0xf0 != 0x30: + return op + sz = self._recv_len() + topic_len = self.sock.read(2) + topic_len = (topic_len[0] << 8) | topic_len[1] + topic = self.sock.read(topic_len) + sz -= topic_len + 2 + if op & 6: + pid = self.sock.read(2) + pid = pid[0] << 8 | pid[1] + sz -= 2 + msg = self.sock.read(sz) + self.cb(topic, msg) + if op & 6 == 2: + pkt = bytearray(b"\x40\x02\0\0") + struct.pack_into("!H", pkt, 2, pid) + self.sock.write(pkt) + elif op & 6 == 4: + assert 0 + + # Checks whether a pending message from server is available. + # If not, returns immediately with None. Otherwise, does + # the same processing as wait_msg. + def check_msg(self): + self.sock.setblocking(False) + return self.wait_msg() diff --git a/settings/main.py b/settings/main.py index ab344e2..f0bcdfe 100644 --- a/settings/main.py +++ b/settings/main.py @@ -33,12 +33,19 @@ def settings_startup_app(state): def settings_wifi(state): wifi.choose_wifi() +def settings_launcher(state): + apps = app.get_apps("Launcher") + selection = prompt_option([{"title": a.title, "app": a} for a in apps], text="Select App:", none_text="Back", title="Set default launcher") + if selection: + app.write_launch_file(selection["app"].name, "default_launcher.txt") + def settings_main(state): return selection({ "Homescreen Name": change_database_string("Set your name", "homescreen.name"), "Homescreen Callsign": change_database_string("Set your callsign", "homescreen.callsign"), "Wifi": settings_wifi, "Startup app": settings_startup_app, + "Default Launcher": settings_launcher, "Badge Store": settings_badge_store }, none_text="Exit") diff --git a/soundsarecool/main.py b/soundsarecool/main.py new file mode 100644 index 0000000..fea225a --- /dev/null +++ b/soundsarecool/main.py @@ -0,0 +1,97 @@ +''' +A small N channel music player a la 8088 MPH +(Demo is only two channels) + +By Molive^SLP +''' + +___name___ = "Arp Music Player" +___title___ = "Arp Music Player" +___license___ = "WTFPL" +___dependencies___ = ["ugfx_helper", "speaker"] +___categories___ = ["Demo","Sound"] + +import speaker +import utime + +from app import restart_to_default +from tilda import Buttons + +channels = [ #Supports up to n simultaneous channels. + #Each channel will loop it's data independently from the others + [ #and channels do not need the same length of data in them. + ('F4',2), #No. of channels is decided on startup, and all channels are running at any one time. + ('D#4',2), + ('D4',2), + ('C#4',1), + ('D#4',1), + ], + + ##[ + ##('A#3',4), + ##], + + ##[ + ##('C4',4), + ##], + + [ + ('F5',0.125), + ('G#5',0.25), + ('F5',0.125), + ('A#5',0.25), + ('F5',0.125), + ('C6',0.25), + ('F5',0.125), + ('A#5',0.25), + ('F5',0.25), + ('G#5',0.25), + ], + + ] + +def prt(s): + ugfx.clear() + ugfx.text(5,5,str(s),0) + +import ugfx +ugfx.init() + +prt("RUNNING SOUND TEST") + +utime.sleep(1) + +prt("Use menu to reboot") + +speaker.enabled(True) + +channel_waits = [ #Add more of these to increase the max channel count + [-1,utime.ticks_ms()], + [-1,utime.ticks_ms()], + [-1,utime.ticks_ms()], + [-1,utime.ticks_ms()], + ] + +current_channel = 0 + +while True: #Main awesome loop which handles all music channels. Can handle and arbitrary amount, but lags at high numbers. + for channel in channels: + ##print(channel_waits[current_channel][1]) #Uncomment some of these for more debug info :P + if channel_waits[current_channel][1] == 0 or channel_waits[current_channel][1] <= utime.ticks_ms(): + print("CHANGING CHANNEL "+str(current_channel)) + channel_waits[current_channel][0] += 1 + if channel_waits[current_channel][0] == len(channel): + channel_waits[current_channel][0] = 0 + channel_waits[current_channel][1] += (channels[current_channel][channel_waits[current_channel][0]][1]*1000.0) + speaker.note(channel[channel_waits[current_channel][0]][0]) + ##print(channel[channel_waits[current_channel][0]]) + if Buttons.is_pressed(Buttons.BTN_Menu): + print("BAIL BAIL BAIL") + restart_to_default() + current_channel += 1 + if current_channel == len(channels): + current_channel = 0 + ##print(current_channel) + utime.sleep(0.03) #Decrease this for more accurate but weirder arps. Comment it out for insane madness + +restart_to_default() \ No newline at end of file diff --git a/speedlauncher/main.py b/speedlauncher/main.py index f56174c..a78725d 100644 --- a/speedlauncher/main.py +++ b/speedlauncher/main.py @@ -2,7 +2,7 @@ ___name___ = "Speed Launcher" ___license___ = "WTFPL" -___categories___ = ["System"] +___categories___ = ["System", "Launcher"] ___dependencies___ = ["app", "ugfx_helper"] ___launchable___ = False ___bootstrapped___ = False diff --git a/tilda_tools.bat b/tilda_tools.bat new file mode 100644 index 0000000..76c731f --- /dev/null +++ b/tilda_tools.bat @@ -0,0 +1,2 @@ +@echo off +python "%CD%/.development\tilda_tools.py" %* \ No newline at end of file diff --git a/trains/api.py b/trains/api.py new file mode 100644 index 0000000..4da4eaf --- /dev/null +++ b/trains/api.py @@ -0,0 +1,23 @@ +import http +import ujson +from tilda import LED + +API_URL = "https://huxley.apphb.com/all/{}?expand=true&accessToken=D102521A-06C6-44C9-8693-7A0394C757EF" + +def get_trains(station_code='LBG'): + print('trains/api: Getting trains for {}'.format(station_code)) + station_data = None + + LED(LED.RED).on() # Red for total get_trains + try: + station_json = http.get(API_URL.format( + station_code)).raise_for_status().content + LED(LED.GREEN).on() # Green for parsing + station_data = ujson.loads(station_json) + except Exception as e: + print('Error:') + print(e) + + LED(LED.RED).off() + LED(LED.GREEN).off() + return station_data diff --git a/trains/bottom.gif b/trains/bottom.gif new file mode 100644 index 0000000..3966ce8 Binary files /dev/null and b/trains/bottom.gif differ diff --git a/trains/departure_screen.py b/trains/departure_screen.py new file mode 100644 index 0000000..3657975 --- /dev/null +++ b/trains/departure_screen.py @@ -0,0 +1,117 @@ +import sleep +import ugfx +import database +from time import time +from homescreen import time_as_string +from tilda import Buttons +from trains.screen import Screen, S_CONTINUE, S_TO_SETTINGS, S_EXIT +from trains.api import get_trains +from trains.utils import get_departure, get_title, is_red + +UPDATE_INTERVAL_SECS = 30 + +class DepartureScreen(Screen): + def __init__(self): + self.station_data = None + self.has_error = False + self.last_update = 0 + self.should_redraw = True + + self._names = None + self._old_names = None + + def enter(self): + self.next_state = S_CONTINUE + self.station_code = database.get('trains.station_code', 'LBG') + self.last_update = 0 + Buttons.enable_interrupt( + Buttons.BTN_A, + lambda t: self.set_next_state(S_TO_SETTINGS), + on_press=True, + on_release=False + ) + Buttons.enable_interrupt( + Buttons.BTN_Menu, + lambda t: self.set_next_state(S_EXIT), + on_press=True, + on_release=False + ) + + def set_next_state(self, s): + self.next_state = s + + def update(self): + now = time() + if self.last_update < (now - UPDATE_INTERVAL_SECS): + print('trains/departure_screen: Updating data') + new_station_data = get_trains(self.station_code) + if new_station_data == None: + self.has_error = True + self.should_redraw = True + else: + self.station_data = new_station_data + self.has_error = False + self.should_redraw = True + self.last_update = now + + def tick(self): + self.update() + + if self.should_redraw: + if self.station_data == None: + self.show_error() + else: + self.show_trains() + else: + self._destroy_old_names() + + sleep.sleep_ms(500) + + return self.next_state + + def _get_names_container(self): + if self._names != None: + self._names.hide() + self._old_names = self._names + names = ugfx.Container(0, 25, 190, 295) + self._names = names + return names + + def _destroy_old_names(self): + if self._old_names != None: + self._old_names.destroy() + self._old_names = None + def _destroy_names(self): + if self._names != None: + self._names.destroy() + self._names = None + + def show_trains(self): + ugfx.clear() + ugfx.area(0, 0, 240, 25, ugfx.RED if self.has_error else ugfx.GRAY) + title = get_title(self.station_data['locationName'], self.has_error) + ugfx.text(5, 5, title, ugfx.WHITE if self.has_error else ugfx.BLACK) + ugfx.text(195, 5, time_as_string(), ugfx.BLUE) + + names = self._get_names_container() + names.show() + row_num = 0 + for service in self.station_data['trainServices']: + departure = get_departure(service) + if departure: + names.text(5, 15 * row_num, service['destination'][0]['locationName'], ugfx.BLACK) + ugfx.text(195, 25 + (15 * row_num), departure,ugfx.RED if is_red(service) else ugfx.BLUE) + row_num += 1 + + ugfx.display_image(0, 300, 'trains/bottom.gif') + self.should_redraw = False + + def show_error(self): + ugfx.clear() + ugfx.text(5, 5, 'Error :(', ugfx.RED) + self.should_redraw = False + + def exit(self): + self._destroy_old_names() + self._destroy_names() + Buttons.disable_all_interrupt() diff --git a/trains/main.py b/trains/main.py new file mode 100644 index 0000000..422c45a --- /dev/null +++ b/trains/main.py @@ -0,0 +1,92 @@ +"""Mini train departure board for your badge + +Configurable with which station you want to monitor +""" +___title___ = "trains" +___license___ = "MIT" +___dependencies___ = ["app", "sleep", "wifi", "http", "ugfx_helper"] +___categories___ = ["Homescreens", "Other"] +___bootstrapped___ = False + + +import database +import wifi +import ugfx +import app +import sleep +import ntp +from tilda import Buttons, LED +from trains import api +from trains import screen +from trains.departure_screen import DepartureScreen +from trains.settings_screen import SettingsScreen + +def init_screen(orientation): + # initialize screen + ugfx.clear() + ugfx.orientation(orientation) + ugfx.backlight(50) + # show initial screen + # photo credit: https://www.flickr.com/photos/remedy451/8061918891 + ugfx.display_image(0, 0, 'trains/splash.gif', 90) + + +def init(): + print('trains/main: Init') + ugfx.init() + ntp.set_NTP_time() + # ensure wifi connection + if not wifi.is_connected(): + wifi.connect(show_wait_message=True) + + +def exit(): + print('trains/main: Exit') + ugfx.clear() + app.restart_to_default() + + +app_screens = { + screen.SETTINGS: SettingsScreen(), + screen.DEPARTURES: DepartureScreen() +} + + +def get_initial_screen(): + station_code = database.get('trains.station_code', None) + if station_code == None: + return app_screens[screen.SETTINGS] + return app_screens[screen.DEPARTURES] + + +def run_screen(instance): + print('trains/main: Starting screen {}'.format(instance)) + instance.enter() + + is_running = True + next_screen_name = None + while is_running: + status, value = instance.tick() + + if status == screen.SWITCH_SCREEN: + is_running = False + next_screen_name = value + elif status == screen.EXIT_APP: + is_running = False + + print('trains/main: Stopping screen {} (next = {})'.format(instance, next_screen_name)) + instance.exit() + return next_screen_name + +init() +current_screen = get_initial_screen() +is_app_running = True +while is_app_running: + init_screen(current_screen.orientation()) + next_screen_name = run_screen(current_screen) + + if next_screen_name != None: + current_screen = app_screens[next_screen_name] + else: + is_app_running = False + exit() diff --git a/trains/screen.py b/trains/screen.py new file mode 100644 index 0000000..54752c5 --- /dev/null +++ b/trains/screen.py @@ -0,0 +1,28 @@ +CONTINUE = 1 +SWITCH_SCREEN = 2 +EXIT_APP = 3 + +DEPARTURES = 10 +SETTINGS = 11 + +S_CONTINUE = (CONTINUE, None) +S_TO_SETTINGS = (SWITCH_SCREEN, SETTINGS) +S_TO_TRAINS = (SWITCH_SCREEN, DEPARTURES) +S_EXIT = (EXIT_APP, None) + + +class Screen(): + def __init__(self): + pass + + def orientation(self): + return 90 + + def enter(self): + pass + + def tick(self): + return S_CONTINUE + + def exit(self): + pass diff --git a/trains/settings_screen.py b/trains/settings_screen.py new file mode 100644 index 0000000..42f6421 --- /dev/null +++ b/trains/settings_screen.py @@ -0,0 +1,19 @@ +import database +import ugfx +from dialogs import prompt_text +from trains.screen import Screen, S_CONTINUE, S_TO_TRAINS + +class SettingsScreen(Screen): + def __init__(self): + self.next_state = S_TO_TRAINS + + def orientation(self): + return 270 + + def tick(self): + with database.Database() as db: + crs = prompt_text('Enter your station\'s CRS code', db.get('trains.station_code', '')) + db.set('trains.station_code', crs) + + return self.next_state + \ No newline at end of file diff --git a/trains/splash.gif b/trains/splash.gif new file mode 100644 index 0000000..d3d64b0 Binary files /dev/null and b/trains/splash.gif differ diff --git a/trains/utils.py b/trains/utils.py new file mode 100644 index 0000000..fa6c902 --- /dev/null +++ b/trains/utils.py @@ -0,0 +1,19 @@ +def is_red(service): + return service['isCancelled'] or service['etd'] != 'On time' + + +def get_departure(service): + if service['isCancelled']: + return 'CANX' + + if service['etd'] == 'On time': + return service['std'] + + return service['etd'] + + +def get_title(name, has_error): + if has_error: + return 'ERR ' + name + + return name