This file contains 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
2011/07/05 * Eat At Joe's | |
Expenses:Dinner $50.00 | |
Liabilities:Credit Card | |
; :reimbursable: | |
2011/07/06 * Drink At Fred's | |
Expenses:Drinks $25.00 | |
Liabilities:Credit Card | |
; :reimbursable: |
This file contains 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
>>> foo = { 'a': 1, 'b': 2 } | |
>>> foo.update({'b': 444444, 'c': 3}); | |
>>> foo | |
{'a': 1, 'c': 3, 'b': 444444} | |
>>> dict(bar='baz', **foo) | |
{'a': 1, 'c': 3, 'b': 444444, 'bar': 'baz'} |
This file contains 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
$ irb | |
irb | |
>> a = 1 | |
a = 1 | |
=> 1 | |
>> a[0] | |
a[0] | |
=> 1 | |
>> a[1] | |
a[1] |
This file contains 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
def some_anonymous_function(arg1, arg2): | |
print "%s %s" % (arg1, arg2) | |
def some_named_function(func, arg1, arg2): | |
func(arg1, arg2) | |
some_named_function(some_anonymous_function, arg1, arg2) |
This file contains 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
-- Count the number of months where the 12 month moving average of after-tax expenses excluding travel (basically, normal ordinary expenses) went up, down, or didn't change | |
select | |
sum(case when pct_change > 0 then 1 else 0 end) as up, | |
sum(case when pct_change < 0 then 1 else 0 end) as down, | |
sum(case when pct_change = 0 then 1 else 0 end) as no_change | |
from ( | |
select | |
xtn_month, | |
((expenses - prev) / prev) * 100 as pct_change |
This file contains 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
2012/02/29 * Medical Fund Transfer To Savings | |
[Assets:Checking] $4,000.00 | |
[Assets:Funds:Medical] | |
2012/02/29 * Savings Deposit | |
Assets:Savings $4,000.00 | |
Assets:Checking | |
2012/02/29 * Medical Fund Transfer To Savings | |
[Assets:Medical] $4,000.00 |
This file contains 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
foo = () -> | |
a = 17 | |
40 | |
foo() |
This file contains 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
<table class="table table-striped table-bordered"> | |
<col class="span2"></col> | |
<col class="span8"></col> | |
<col class="span2"></col> | |
<thead> | |
<tr> | |
<th>From</th> | |
<th>Subject</th> | |
<th>Date</th> | |
</tr> |
This file contains 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
/^(?:Expenses:(Cable|Utils))/ | |
* $account -0.5 | |
* Assets:Receivable:GF 0.5 | |
= /^Expenses:Rent$/ | |
* $account -0.2968 | |
* Assets:Receivable:GF 0.2968 |
This file contains 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
Subject: Re: [pdxruby] Re: Complex return value anti-pattern? | |
From: Ward Cunningham <[email protected]> | |
Date: Thu, 29 Nov 2012 08:23:26 -0800 | |
Pair programming is often misunderstood. | |
To understand pairing one must examine the world views of programmers. For | |
many (perhaps all programmers historically) programming is difficult and re | |
quires skill and concentration to be successful. For others, and here we fi | |
nd roots in dynamic languages, programming is easy but requires imagination |