doc['incident_date'].date.year
(doc['report_date'].date.getMillis() - doc['incident_date'].date.getMillis()) / 1000 / 60 / 60 / 24
col = db.getCollection("_Installation") | |
col.update( | |
{badge: {$gt:0}}, | |
{$set: {badge:0}}, | |
{multi: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 |
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 |
[ | |
{ | |
"ParentAgencyId": 0, | |
"UpdateUser": 0, | |
"AgencyId": 148, | |
"AgencyTypes": [], | |
"UpdateDate": "2000-01-01T00:00:00", | |
"AccountType": 1, | |
"LongName": "African Technical Assistance Centre", | |
"Active": true, |
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'] |
""" | |
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) |
1, Ju3stin T3imb3erlake, Title 545, Price $7.30 | |
2, Tayl4or Sw4ift, Title 723, Price $7.90 | |
3, Mi4ck J3a2gger, Title 610, Price $7.90 | |
4, La3dy Ga243ga, Title 118, Price $7.30 | |
5, Joh234nny C3ash, Title 482, Price $6.50 | |
6, Elvis Presl4ey, Title 335, Price $7.30 | |
7, 444John Lennon4444, Title 271, Price $7.90 | |
8, 444John Lennon4444, Title 271, Price $7.90 | |
9, 444John Lennon4444, Title 271, Price $7.90 | |
10, Ju3stin T3imb3erlake, Title 545, Price $7.30 |
AAA000 AAJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR | |
AAK000 AAZ999 NARIÑO INUES PARTICULAR | |
ABA000 ABJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR | |
ACA000 ACJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR | |
ACK000 ACZ999 NARINO SAMANIEGO PARTICULAR | |
ADA000 ADJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR | |
ADK000 ADK999 ANTIOQUIA ANDES PARTICULAR | |
AEA000 AEJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR | |
AEK000 AEZ999 NARIÑO BUESACO PARTICULAR | |
AFA000 AFJ999 BOGOTAD.E. BOGOTA D.E. PARTICULAR |