Skip to content

Instantly share code, notes, and snippets.

@Aaron1011
Aaron1011 / recurpassgen.py
Created December 31, 2012 23:25
Recursive password generator
def get_letters(letter, choices):
return [letter] + choices.get(letter, [])
def recurpassgen(password, passwords=[""], CHOICES={'a': ['@', '4'], 's': ['$', '&']}):
if password == "":
return passwords
passwords = [p + letter for p in passwords for letter in get_letters(password[0], CHOICES)]
return recurpassgen(password[1:], passwords=passwords)
@Aaron1011
Aaron1011 / reverelinkedl.py
Last active December 10, 2015 11:28
Reverse a linked list
import copy
class Node:
def __init__(self, data, next=None):
self.data = data
self.next = next
def __str__(self):
return "<Node %s>" % self.data
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="{% static "coffee/lib/jasmine-1.3.1/jasmine_favicon.png" %}">
<link rel="stylesheet" type="text/css" href="{% static "coffee/lib/jasmine-1.3.1/jasmine.css" %}">
<script type="text/javascript" src="{% static "coffee/lib/jasmine-1.3.1/jasmine.js" %}"></script>
<script type="text/javascript" src="{% static "coffee/lib/jasmine-1.3.1/jasmine-html.js" %}"></script>
#include <stdio.h>
#define MAXCHAR 1000
#define MINCAP 65
#define MAXCAP 90
#define MINDIGIT 48
#define MAXDIGIT 57
#define MINLOWER 97
#define MAXLOWER 122
#include <stdio.h>
#define MAXCHAR 1000
#define MINCAP 65
#define MAXCAP 90
#define MINDIGIT 48
#define MAXDIGIT 57
#define MINLOWER 97
#define MAXLOWER 122
@Aaron1011
Aaron1011 / shorthand.c
Created January 25, 2013 01:19
shorthand.c
#include <stdio.h>
#define MAXCHAR 1000
#define MINCAP 65
#define MAXCAP 90
#define MINDIGIT 48
#define MAXDIGIT 57
#define MINLOWER 97
#define MAXLOWER 122
import string
_CHARS = string.digits + string.uppercase
def itob(n, base):
cur_num = n % base
final = []
while n > 0:
final.append(_CHARS[cur_num])
n /= base
<html><head><script src="http://s.ytimg.com/yts/jsbin/www-widgetapi-vflReMqMy.js" async=""></script>
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/experiment_1a.css">
</head>
<body>
<div class="video">
<iframe id="player" width="640" height="480" src="http://www.youtube.com/embed/1kuF1-tyaAE?wmode=opaque&amp;origin=http%3A%2F%2Flocalhost%3A8000&amp;enablejsapi=1" frameborder="0"></iframe>
</div>
2013-03-21T18:49:29+00:00 heroku[router]: at=info method=POST path=/ host=www.textingwall.org fwd="23.22.44.224" dyno=web.1 queue=0 wait=0ms connect=2ms service=7ms status=403 bytes=1737
2013-03-21T18:49:10+00:00 heroku[router]: at=info method=GET path=/ping_wall/?id=8 host=www.textingwall.org fwd="66.189.46.75" dyno=web.1 queue=0 wait=0ms connect=27ms service=85ms status=200 bytes=4
2013-03-21T18:49:31+00:00 app[web.1]: 2013-03-21 18:49:31.010708+00:00
2013-03-21T18:49:31+00:00 heroku[router]: at=info method=GET path=/ping_wall/?id=8 host=www.textingwall.org fwd="66.189.46.75" dyno=web.1 queue=0 wait=0ms connect=7ms service=55ms status=200 bytes=4
@Aaron1011
Aaron1011 / foobar.txt
Created July 11, 2013 23:38
Gist created by PyGithub
File created by PyGithub