doc['incident_date'].date.year
(doc['report_date'].date.getMillis() - doc['incident_date'].date.getMillis()) / 1000 / 60 / 60 / 24
""" | |
The main 'geoname' table has the following fields : | |
--------------------------------------------------- | |
geonameid : integer id of record in geonames database | |
name : name of geographical point (utf8) varchar(200) | |
asciiname : name of geographical point in plain ascii characters, varchar(200) | |
alternatenames : alternatenames, comma separated, ascii names automatically transliterated, convenience attribute from alternatename table, varchar(10000) | |
latitude : latitude in decimal degrees (wgs84) | |
longitude : longitude in decimal degrees (wgs84) | |
feature class : see http://www.geonames.org/export/codes.html, char(1) |
import requests | |
# source: https://docs.google.com/spreadsheets/d/18YIk3aQYdx1kIWzLAyUpTshl72P8_uFDGI_8TI2bd1k/edit#gid=0 | |
url = "https://spreadsheets.google.com/feeds/list/18YIk3aQYdx1kIWzLAyUpTshl72P8_uFDGI_8TI2bd1k/od6/public/values?alt=json" | |
res = requests.get(url) | |
res = res.json() | |
for row in res['feed']['entry']: | |
geonames_name = row['gsx$country']['$t'] | |
geonames_id = row['gsx$geonameid']['$t'] | |
geonames_id = row['gsx$geonameid']['$t'] |
[ | |
{ | |
"ParentAgencyId": 0, | |
"UpdateUser": 0, | |
"AgencyId": 148, | |
"AgencyTypes": [], | |
"UpdateDate": "2000-01-01T00:00:00", | |
"AccountType": 1, | |
"LongName": "African Technical Assistance Centre", | |
"Active": true, |
s3cmd sync s3://aqhj-webaccess2/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/03/22/ /logs/elb/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/03/22/ | |
find /logs/elb/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/ -exec cat {} \;| goaccess --http-protocol=no -a | |
-q --no-query-string | |
https://goaccess.io/man#name |
s3cmd sync s3://aqhj-webaccess2/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/03/22/ /logs/elb/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/03/22/ | |
find /logs/elb/AWSLogs/290696998068/elasticloadbalancing/us-east-1/2017/ -exec cat {} \;| goaccess --http-protocol=no |
col = db.getCollection("_Installation") | |
col.update( | |
{badge: {$gt:0}}, | |
{$set: {badge:0}}, | |
{multi:true} | |
) |
essere | |
avere | |
andare | |
fare | |
potere | |
volere | |
venire | |
dovere | |
dare | |
stare |
Worker information | |
hostname: i-0515722-precise-production-2-worker-org-docker.travisci.net:e7ced2aa-7e22-46a5-a0e5-854e13bdc252 | |
version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c | |
instance: 07f5ea8:travis:python | |
startup: 775.970325ms | |
system_info | |
Build system information | |
Build language: python | |
Build group: stable | |
Build dist: precise |
import datetime | |
import requests | |
# Create boxes from map here: | |
# http://boundingbox.klokantech.com/ | |
# FORMAT CSV COMES: ymin, xmin, ymax, xmax | |
PLACES = { | |
"FRANCE": [ | |
[0.8129882813,45.5563717359,3.9331054688,47.6616878033], |