The current solar terminator is shown in blue, assuming a spherical Earth and an axial tilt of 23.4°. Hmm, on second thought, I think I didn’t account for the orbit of the Earth around the sun, so this is not entirely accurate. Please fork this example and fix it!
This file contains hidden or 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
## replace all instances of $1 with $2 within $3. | |
function supersub { | |
ack -l "$1" "$3" | xargs perl -p -i -e "s/$1/$2/g" | |
} |
This file contains hidden or 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
<OrderSet> | |
<moduleMetadata> | |
<identifier> | |
<system value="http://nccn.org/ordertemplates" /> | |
<value value="KDN5" /> | |
</identifier> | |
</module> | |
<!-- Here we only have one course (which repeats for 6 21-day cycles), but we could have multiple courses --> | |
<action> |
This file contains hidden or 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
""" | |
Examples: | |
with figure_grid(5, 3) as grid: | |
grid.next() | |
# plot something | |
grid.next() | |
# plot something | |
# ...etc | |
This file contains hidden or 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
class cacheprop(object): | |
def __init__(self, getter): self.getter = getter | |
def __get__(self, shelf, _): | |
value = self.getter(shelf) | |
shelf.__dict__[self.getter.__name__] = value | |
return value | |
class Foo(): | |
@cacheprop | |
def bar(self): |
OlderNewer