This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Words(...templates) { | |
this.templates = templates | |
} | |
Words.prototype.generate = function() { | |
return this.templates.map(generate).join(' ') | |
} | |
function generate(template) { | |
if(template instanceof Words) | |
return template.generate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""cloudcoder.py - Utilities for encoding and decoding strings for Scratch cloud data | |
Use the encode and decode functions to prepare strings to be stored in cloud variables | |
and to get strings out of them. | |
Examples: | |
>>> encode("I <3 the cloud") | |
'0x2F49203c332074686520636c6f7564' | |
>>> decode('0x2F49203c332074686520636c6f7564') | |
'I <3 the cloud' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from operator import * | |
i=lambda p: p if type(p)!=tuple else{"cons":lambda a,b:(a,b),"car":lambda a:a[0],"cdr":lambda a:a[1],"cadr":lambda a:a[1][0],"+":add,"-":sub,"*":mul,"print":print}[p[0]](*map(i,p[1:])) | |
while 1:i(eval(re.sub("[\n ]+",",",re.sub("[a-z+\-*]+","'\g<0>'",input()).replace("'nil'","''"))or"''")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
num = 0 | |
user = "technoboy10" | |
key = "get your own! :P" | |
message = "event name here" | |
scratch = 'https://api.scratch.mit.edu/proxy/users/' + user + '/activity/count' | |
ifttt = 'https://maker.ifttt.com/trigger/' + message + '/with/key/' + key | |
while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct { | |
int len; | |
int * int_arr; | |
char * char_arr; | |
} print_arr_args; | |
#define print_array(...) print_array_impl((print_arr_args){__VA_ARGS__}) | |
void print_array_impl(print_arr_args args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
#!optional | |
#!rest | |
#( | |
#\ | |
#\altmode | |
#\backnext | |
#\backspace | |
#\call | |
#\linefeed |