Skip to content

Instantly share code, notes, and snippets.

Dan Taeyoung dantaeyoung

Block or report user

Report or block dantaeyoung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dantaeyoung
dantaeyoung / 190523_ntoo_better_serial_thread
Created May 23, 2019
ntoo serial thread that detects errors and reconnects without crashing the whole program - belongs in `chatbot/inference_sensors.py`
View 190523_ntoo_better_serial_thread
def serial_thread():
ser = None
while True:
try:
# TRIES TO CONNECT
if(ser == None):
ser = serial.Serial(usbport)
ser.flushInput()
logger.log("[SERIAL] (Re)connecting serial thread...")
except:
View studio_layout_weighted_solidarity.py
import random, sys, itertools, math, statistics
PEOPLES_CHOICES = [
['K','D','C','N','A','E','H','I','L','M'] ,
['I','H','J','E','C','F','D','N','K','A'] ,
['N','M','D','L','A','K','J','D','G','I'] ,
['D','N','K','L','M','J','G','I','H','F'],
['D','K','N','F','B','G','J','E','C','I'] ,
['D','N','K','I','H','A','E','C','F','M']
@dantaeyoung
dantaeyoung / studio_layout_weighted.py
Created Jul 6, 2018
weights studios based on how many people are in them
View studio_layout_weighted.py
import random, sys, itertools, math, statistics
PEOPLES_CHOICES = [
['K','D','C','N','A','E','H','I','L','M'] ,
['I','H','J','E','C','F','D','N','K','A'] ,
['N','M','D','L','A','K','J','D','G','I'] ,
['D','N','K','L','M','J','G','I','H','F'],
['D','K','N','F','B','G','J','E','C','I'] ,
['D','N','K','I','H','A','E','C','F','M']
@dantaeyoung
dantaeyoung / studio_layout.py
Last active Jul 6, 2018
process to generate all possible studio combinations and to rank them by trying to make the lowest ranking the highest
View studio_layout.py
import random, sys, itertools, math, statistics
PEOPLES_CHOICES = [
['K','D','C','N','A','E','H','I','L','M'],
['I','H','J','E','C','F','D','N','K','A'],
['N','M','D','L','A','K','J','D','G','I'],
['D','N','K','L','M','J','G','I','H','F'],
['D','K','N','F','B','G','J','E','C','I'],
['D','N','K','I','H','A','E','C','F','M']
View keybase.md

Keybase proof

I hereby claim:

  • I am dantaeyoung on github.
  • I am dantaeyoung (https://keybase.io/dantaeyoung) on keybase.
  • I have a public key whose fingerprint is C562 2B11 BABC EB93 5615 362E C2C5 133A 582C 38DD

To claim this, I am signing this object:

View imessage_hacker.py
### @dantaeyoung/provolot
### homage to http://techcrunch.com/2009/04/21/4chan-takes-over-the-time-100/
### for @leoneckert's https://github.com/leoneckert/trending_imessage_research
import random
from collections import defaultdict
random_words = ["Abyssinian", "Adelie Penguin", "Affenpinscher", "Afghan Hound", "African Bush Elephant", "African Civet", "African Clawed Frog", "African Forest Elephant", "African Palm Civet", "African Penguin", "African Tree Toad", "African Wild Dog", "Ainu Dog", "Airedale Terrier", "Akbash", "Akita", "Alaskan Malamute", "Albatross", "Aldabra Giant Tortoise", "Alligator", "Alpine Dachsbracke", "American Bulldog", "American Cocker Spaniel", "American Coonhound", "American Eskimo Dog", "American Foxhound", "American Pit Bull Terrier", "American Staffordshire Terrier", "American Water Spaniel", "Anatolian Shepherd Dog", "Angelfish", "Ant", "Anteater", "Antelope", "Appenzeller Dog", "Arctic Fox", "Arctic Hare", "Arctic Wolf", "Armadillo", "Asian Elephant", "Asian Giant Hornet",
@dantaeyoung
dantaeyoung / gifify_instagram_user.sh
Last active Dec 26, 2015
Create GIF of Instagram User
View gifify_instagram_user.sh
############## TOTALLY HACKY
############## REQUIRES https://github.com/akurtovic/InstaRaider
############## EDIT $USERNAME AND RUN IT IN PARENT DIRECTORY OF InstaRaider REPO
############## example: ./gifify_instagram_user.sh
#!/bin/bash
USERNAME="alanpaukman"
#milliseconds
GIFDELAY=15
View gist:14424d254d86ff16ea48
(function() {
// Load jQuery
var script = document.createElement("SCRIPT");
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
// Poll for jQuery to come into existance
var checkReady = function(callback) {
if (window.jQuery) {
View keybase.md

Keybase proof

I hereby claim:

  • I am provolot on github.
  • I am dantaeyoung (https://keybase.io/dantaeyoung) on keybase.
  • I have a public key whose fingerprint is C562 2B11 BABC EB93 5615 362E C2C5 133A 582C 38DD

To claim this, I am signing this object:

You can’t perform that action at this time.