Skip to content

Instantly share code, notes, and snippets.

(ns xrosslexior.core
[xrosslexior.letter-tree :refer :all])
; [...]
[L I P █ L I L A █ L I L A █ █]
[A L L █ A L A R █ A L A M O █]
[M A E █ I K O N █ P L O U G H]
[█ █ A I R S █ U M P S █ S L Y]
[L I S T S █ A L A S █ R E E D]
[A V I S █ L I F T █ F O S S E]
[M A N █ L I M O █ L A M █ █ █]
[A N G L E R S █ L A M E N T S]
[█ █ █ A L A █ L A M E █ A I L]
[L L A M A █ L A M A █ L I L A]
dashboard.addWidget('pull_request_widget', 'List', {
getData: function () {
var that = this;
$.ajax({
url: "https://api.github.com/repos/jedi4ever/veewee/pulls",
success: function(data, status, jqxhr) {
var prList = $.map(data, function(pr, i) {
return {
label: "#" + pr.number + " " + pr.title,
value: null
# <timburke> acorwin: i don't think i like how your pre-incrementer handles things like `+i; +i`, but i can't think of a good way around it...
# [...]
# <acorwin> timburke: what don't you like about it?
# <acorwin> +i ; +i ; i.val yields 1
# <timburke> acorwin: yes! and they should have both yielded zero!
# <acorwin> timburke: well, they have to return i, but i.__str__() could just be str(i.val)
# <timburke> acorwin: well, yeah. the *state* after each should have been 0
# <acorwin> timburke: oh, well, without delving into the AST i can't actually verify that two +'s are together
# <timburke> acorwin: yeah. like i said, i can't think of a good way around it
# <acorwin> timburke: yeah. oh well.
ack-grep
acpi-support
activity-log-manager-control-center
adduser
aisleriot
alarm-clock
alsa-base
anacron
ant
app-install-data-partner
@zackmdavis
zackmdavis / reed_solomon.py
Created April 17, 2015 18:56
extremely simplified Reed-Solomon coding in Python 3
from string import ascii_uppercase
ALPHABET = " "+ascii_uppercase
CHAR_TO_INT = dict(zip(ALPHABET, range(27)))
INT_TO_CHAR = dict(zip(range(27), ALPHABET))
def pad(message, chunk_size):
return message + ' '*(chunk_size - len(message) % chunk_size)
def unpad(message):
pzmd@SuddenHeap:~/Code/swift$ python3
Python 3.4.1 (default, May 25 2014, 22:33:14)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def my_function(first, second, opt1=1, opt2=2, opt3=3):
... ... # do stuff
...
>>> my_function("first_value", opt1="a", opt2="b", opt3="c")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
This program's belief distribution has an entropy of 6.629 bits. Learning whether 60 has the property is expected to reduce the entropy by 0.533 bits.
Does 60 have the property? [Y/n] >> n
On the question of whether 60 has the property, you said false.
This program's belief distribution has an entropy of 6.443 bits. Learning whether 72 has the property is expected to reduce the entropy by 0.362 bits.
Does 72 have the property? [Y/n] >> n
On the question of whether 72 has the property, you said false.
This program's belief distribution has an entropy of 6.340 bits. Learning whether 84 has the property is expected to reduce the entropy by 0.381 bits.
Does 84 have the property? [Y/n] >> y
@zackmdavis
zackmdavis / docstring.diff
Created November 24, 2015 21:21
demonstrative docstring
class MessageBox(object):
- """Puts a multi-line message in an ASCII-art box."""
+ """
+ +------------------------------------------------+
+ | Puts a multi-line message in an ASCII-art box. |
+ +------------------------------------------------+
+ """
pub static CENTER_OF_THE_WORLD: u64 = 66229406269440;
pub static LOW_SEVENTH_HEAVEN: u64 = 65280;
pub static LOW_COLONELCY: u64 = 16711680;
pub static HIGH_SEVENTH_HEAVEN: u64 = 71776119061217280;
pub static HIGH_COLONELCY: u64 = 280375465082880;