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
package main | |
import ( | |
"fmt" | |
) | |
type Foo struct { | |
} | |
type Bar struct { |
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/python | |
import sys | |
limits = [0, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200] | |
if __name__ == "__main__": | |
for line in sys.stdin: | |
iso = float(line) | |
print max([x for x in limits if x <= iso]) |
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/python | |
import sys | |
limits = [16.0, 24.0, 28.0, 35.0, 50.0, 70.0, 85.0, 105.0, 135.0, 150.0, 180.0, 200.0, 210.0, 300.0, 450.0, 600.0] | |
if __name__ == "__main__": | |
for line in sys.stdin: | |
fl = float(line) | |
diffs = dict([(abs(x - fl), x) for x in limits]) | |
print diffs[min(diffs)] |
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/python | |
import sys | |
full_imgsizes = {'NIKON D750': 6000, | |
'NIKON D7200': 6000, | |
'NIKON D3300': 6000, | |
'NIKON D7100': 6000, | |
'DSC-RX100': 5472, | |
'NEX-5': 4592, | |
'NIKON D90': 4288, | |
'NIKON D80': 3872} |
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
find $SEARCH_PATHS -type f -print0 | xargs -0 exiftool -csv -F -LensIDNumber 2>/dev/null | grep -f lensids | cut -d ',' -f 1 > zoompix | |
cat zoompix | tr '\n' '\0' | xargs -0 exiftool -csv -Model -ImageSize -FocalLengthIn35mmFormat > info-zoompix | |
cat info-zoompix | ./analyse-fl.py |
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
package mutexvsatomic_test | |
import ( | |
"sync" | |
"sync/atomic" | |
"testing" | |
) | |
var a int32 |
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
;;; protobuf-mode.el --- major mode for editing protocol buffers. | |
;; Author: Alexandre Vassalotti <[email protected]> | |
;; Created: 23-Apr-2009 | |
;; Version: 0.3 | |
;; Keywords: google protobuf languages | |
;; Redistribution and use in source and binary forms, with or without | |
;; modification, are permitted provided that the following conditions are | |
;; met: |
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 FlattenVar(kv expvar.KeyValue, w io.Writer, prefix string) { | |
if m, ok := kv.Value.(*expvar.Map); ok { | |
m.Do(func(kv_ expvar.KeyValue) { FlattenVar(kv_, w, fmt.Sprintf("%s%s.", prefix, kv.Key)) }) | |
} else { | |
fmt.Fprintf(w, "\"%s%s\": %s\n", prefix, kv.Key, kv.Value) | |
} | |
} |
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
package main | |
import ( | |
"expvar" | |
"fmt" | |
"io" | |
"net/http" | |
) | |
func FlattenVar(kv expvar.KeyValue, w io.Writer, prefix string) { |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"sync" | |
"strings" | |
) | |
// Stores the filesystem hierarchy, data node members and their capacity |
OlderNewer