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
echo "Lorem ipsum dolor sit sit amet." | tr [:space:] '\n' | grep -v "^\s*$" | sort | uniq -c | sort -bnr |
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
java -jar pdfbox-app-1.8.4.jar ExtractText -console ~/Dropbox/Books/technicalAnalysis.pdf | tr -s [:space:] '\n' | grep -v "^\s*$" | sort | uniq -c | sort -bnr |less |
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/perl | |
print "Folder Name: "; | |
chomp($folder = <STDIN>); | |
opendir(DIR, $folder) || die "Folder not found"; | |
my @file = grep { (/\.EW/i || /\.NS/i || /\.UD/i) }readdir(DIR); | |
close(DIR); | |
@testFiles; |
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
Corrected accelerogram 20130816_023105_MRZ_20 GNS Science | |
Site MRZ 40 39 38S 175 34 43E Basalt file: 20130816_023134_MRZ | |
Mangatainoka River | |
Instrument Basalt_612 | |
Resolution: 24-bit Instr Period: 0.0050 s Damping: 0.700 | |
Accelerogram 20130816_023105_MRZ_20 Processed 2014 January 20 | |
10 km south-east of Seddon | |
2013 August 16 02:31:05 UT | |
Epicentre 41 44 02S 174 09 07E Bearing S45W Dist 169km Depth 8km M 6.64 | |
Number of points 8100 Duration 161.98 sec |
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/perl | |
use File::Find; | |
find({ wanted => \&process_file, no_chdir => 1 }, "NZ_Original"); | |
sub process_file { | |
my $F = $File::Find::name; | |
if ($F =~ /V2A$/ ) { |
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
To benchmark: | |
go test -bench=".*" > machine_description.txt |
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
func (self *Errplane) ReportRuntimeStats(prefix, context string, | |
dimensions Dimensions, sleep time.Duration) { | |
if self.runtimeStatsRunning { | |
fmt.Fprintf(os.Stderr, "Runtime stats is already running\n") | |
return | |
} | |
self.runtimeStatsRunning = true | |
go self.reportRuntimeStats(prefix, context, dimensions, sleep) | |
} |
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
NewZealand_01062010094846 | |
Auckland Islands, New Zealand Region 2010-01-06 09:48:46 -49.789 164.192 10.0 5.7 MW 12 38 0 0 Empty 50 | |
Auckland Islands, New Zealand Region 2010-01-06 09:48:46 -49.789 164.192 10.0 5.7 MW 12 38 0 0 Empty 50 | |
NewZealand_01132011120453 | |
North Island New Zealand 2011-01-13 12:04:53 -36.92 179.46 35.0 5.5 MW 17 53 0 0 Empty 50 | |
NewZealand_01192012064845 | |
West of South Island New Zealand 2012-01-19 06:48:45 -46.686 165.778 20.0 5.9 MW 24 74 0 0 Empty 50 | |
NewZealand_02212011235142 | |
Christchurch 2011-02-21 23:51:42 -43.583 172.68 5.9 6.1 MW 133 235 0 70 Empty 50 | |
NewZealand_02222011000419 |
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
//mh.resetElement("Event(1).Hypocenter(1).DateTimeTrigger_txt", getTriggerTimeFileName()); | |
/* | |
public String getTriggerTimeFileName(){ | |
// Get tail integer. Normally 20 or 21 | |
String tail = thead.getLine(1); | |
int index = tail.lastIndexOf("_"); | |
tail = tail.substring(index+1); | |
int numlen = tail.indexOf(" "); |
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
import ftputil | |
import datetime | |
import os | |
def fileTypeMatch(name): | |
return (name.endswith('.V2A') or name.endswith('.V1A') or name.endswith('.V3A')) | |
wantedDates = [ | |
#"2010-09-03 16:35:41" |
OlderNewer