I hereby claim:
- I am gerow on github.
- I am gerow (https://keybase.io/gerow) on keybase.
- I have a public key whose fingerprint is 1DE1 5385 516E 3625 0008 0F61 26FC 2594 6BDF 8823
To claim this, I am signing this object:
gerow@gerow0:~$ python | |
Python 2.7.6 (default, Jun 22 2015, 17:58:13) | |
[GCC 4.8.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> l = ['why are lists pass by reference by default in python?'] | |
>>> def f(l): | |
... l.append('because fuck you') | |
... | |
>>> f(l) | |
>>> l |
I hereby claim:
To claim this, I am signing this object:
/************************************************************* | |
* at328-0.c - Demonstrate simple I/O functions of ATmega328 | |
* | |
* Program loops turning PC0 on and off as fast as possible. | |
* | |
* The program should generate code in the loop consisting of | |
* LOOP: SBI PORTC,0 (2 cycles) | |
* CBI PORTC,0 (2 cycles) | |
* RJMP LOOP (2 cycles) | |
* |
struct node { | |
void *value; | |
struct node *next; | |
}; | |
typedef struct node node; | |
void | |
delete_node(node **head, node *to_delete) | |
{ |
{ | |
"failed":[ | |
], | |
"start":"2013-09-30T00:00:00", | |
"end":"2013-10-06T23:59:59", | |
"schedule":[ | |
{ | |
"task":true, | |
"end":"2013-09-30T18:20:00", |
#!/usr/bin/ruby | |
string = ARGV[0] | |
puts string.downcase.split("").map{|e| | |
case e | |
when "0" | |
"ka" | |
when "1" | |
"ta" | |
when "2" |
#!/usr/bin/ruby | |
string = ARGV[0] | |
puts string.downcase.split("").map{|e| | |
case e | |
when "0" | |
"ka" | |
when "1" | |
"tsu" | |
when "2" |
def split_list_by list, &block | |
list.reduce({}) {|memo, v| | |
key = yield v | |
memo[key] ||= [] | |
memo[key] << v | |
memo | |
}.map{|k, v| | |
v |
(defn map-partial-reductions | |
"Given a reduce function, an initial value for the reduce, and a list generate a list of partial reductions as it goes" | |
[f memo l] | |
(reduce #(if (nil? (last %1)) | |
(conj %1 (f memo %2)) | |
(conj %1 (f (last %1) %2))) [] l)) | |
; So, for the following | |
(map-partial-reductions + 0 '(1 2 3 4 5)) | |
; => [1 3 6 10 15] |