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
class BaseDatedModel(models.Model): | |
""" | |
Base model with creation and edition dates. | |
""" | |
created = models.DateTimeField(editable=False) | |
updated = models.DateTimeField(null=True, blank=True) | |
class Meta: | |
abstract = True |
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
{ | |
"points": [ | |
{ | |
"created_on": 1436889707617, | |
"updated_on": 1436889707617, | |
"read_datetime": 1436877497000, | |
"name": "Point A", | |
"accuracy": 65, | |
"height": 2000, | |
"speed": 15, |
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
{ | |
"track_points": [ | |
{ | |
"created_on": 1436889707617, | |
"updated_on": 1436889707617, | |
"read_datetime": 1436877497000, | |
"name": "Point A", | |
"accuracy": 65, | |
"height": 2000, | |
"speed": 15, |
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
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.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
curl -i -X POST \ | |
-H "Content-Type:application/json" \ | |
-d \ | |
'{ | |
"users": { | |
"name": "Your Name", | |
"email": "your@mail.com", | |
"password": "somepass1234" | |
} | |
}' \ |
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
/* 0 */ | |
{ | |
"_id" : ObjectId("553fcb43f1aee34fa0200429"), | |
"created_on" : ISODate("2015-04-28T18:02:42.830Z"), | |
"updated_on" : ISODate("2015-04-30T12:54:51.845Z"), | |
"sequence_number" : 1, | |
"name" : "Crazy looking spot", | |
"coordinates" : [ | |
12.1460427, | |
-77.02220727 |
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
/* 0 */ | |
{ | |
"_id" : ObjectId("553fd7d1f1aee35c16a25b1a"), | |
"created_on" : ISODate("2015-04-28T18:56:17.847Z"), | |
"updated_on" : ISODate("2015-04-28T18:56:17.848Z"), | |
"user" : ObjectId("5527e906f1aee364031621c6"), | |
"is_finished" : false, | |
"points" : [] | |
} |
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 re | |
import sys | |
f = open(sys.argv[1], 'rb') | |
text = f.read() | |
f.close() | |
clean = re.sub('T(\d+:\d+:\d+.\d+)[^Z]+Z', '', text) |
NewerOlder