I hereby claim:
- I am calebmadrigal on github.
- I am calebm (https://keybase.io/calebm) on keybase.
- I have a public key whose fingerprint is F775 F481 BE72 409E 856C E93E B870 87DD 2D11 1E54
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import random | |
| from collections import deque | |
| print("#FIFO") | |
| queue = deque() | |
| for i in range(10): | |
| queue.append(i) | |
| print([queue.popleft() for _ in range(len(queue))]) | |
| print("#LIFO") |
| import urllib2 | |
| def get_raw_gist(raw_gist_url): | |
| return urllib2.urlopen(raw_gist_url).read() | |
| def python_anywhere_gist_url(gist_num, gist_file, py_version="python2"): | |
| return "https://www.pythonanywhere.com/gists/{0}/{1}/{2}".format(gist_num, gist_file, py_version) | |
| print get_raw_gist("https://gist.github.com/calebmadrigal/5504352/raw/pythonanywhere_gist.py") | |
| print python_anywhere_gist_url(5504352, "pythonanywhere_gist.py") |
| + (NSString *)base64String:(NSString *)str | |
| { | |
| NSData *theData = [str dataUsingEncoding: NSASCIIStringEncoding]; | |
| const uint8_t* input = (const uint8_t*)[theData bytes]; | |
| NSInteger length = [theData length]; | |
| static char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | |
| NSMutableData* data = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; | |
| uint8_t* output = (uint8_t*)data.mutableBytes; |