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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
use strict; | |
use warnings; | |
use Text::CSV_XS; | |
use JSON; | |
my ($file) = @ARGV; | |
my $json = JSON->new->pretty; |
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
config : | |
item one : blah | |
item two : asdasd |
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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
# | |
# The purpose of this little model is to figure out what kind of | |
# investment returns the pension fund needs to make in order to meet | |
# its defined benefits promises. | |
# | |
# It assumes a single employee with their own "pot" and a fixed payout | |
# period. I'm not suggesting euthanasia... Obviously in reality the | |
# longevity risk is shared by the many thousands of scheme |
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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
# | |
# The purpose of this little model is to figure out what kind of | |
# investment returns the pension fund needs to make in order to meet | |
# its defined benefits promises. | |
# | |
# It assumes a single employee with their own "pot" and a fixed payout | |
# period. I'm not suggesting euthanasia... Obviously in reality the | |
# longevity risk is shared by the many thousands of scheme |
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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
# | |
# The purpose of this little model is to figure out what kind of | |
# investment returns the pension fund needs to make in order to meet | |
# its defined benefits promises. | |
# | |
# It assumes a single employee with their own "pot" and a fixed payout | |
# period. I'm not suggesting euthanasia... Obviously in reality the | |
# longevity risk is shared by the many thousands of scheme |
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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
# | |
# ./model.pl 0.26 0.02 40 3 0.5 25 | |
# | |
# 0.26 = fraction of salary contribution total (employer+employee) | |
# 0.02 = fractional expected annual asset growth | |
# 40 = number of years working | |
# 3 = salary multiple for lump sum payment | |
# 0.5 = fraction of salary paid out in retirement |
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
#!/usr/bin/env perl | |
# -*- mode: cperl -*- | |
# | |
# usage: bin/post-huge-json <opts> huge-file.json | |
# | |
# <opts> might be "-c ninjadata" | |
# | |
# splits a large file containing a single json array of json objects | |
# into smaller chunks of 100000, and posts them to Solr using bin/post <opts> | |
# |