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 spala parse S3 access logs. | |
package spala | |
import ( | |
"bufio" | |
"bytes" | |
"context" | |
"fmt" | |
"io" | |
"os" |
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 json | |
import logging | |
class JsonDict(dict): | |
def __str__(self): | |
try: | |
return json.dumps(self, ensure_ascii=False, sort_keys=True) | |
except: | |
return super().__str__() |
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
angular.module('mod').directive('dnAutocomplete', function() { | |
function link(scope, element, attrs) { | |
scope.$watch(attrs.dnAutocomplete, function(names) { | |
element.autocomplete({ | |
source: names, | |
/** | |
* The default implementation updates the HTML input's value | |
* in such a way that the angular doesn't detect it. The | |
* result is that scope.add.input isn't updated while the | |
* HTML input itself is. By updating angular's scope object, |