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
(defgeneric call-with-container-map (container func) | |
(:documentation "Iterate over the contents of CONTAINER, calling | |
FUNC with the current element of CONTAINER, followed by the index or | |
key that corresponds to it.")) | |
(defmethod call-with-container-map ((container array) func) | |
(loop for index from 0 | |
for value across container | |
do (funcall func value index))) |
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 csv | |
import os | |
import re | |
import dateutil | |
import pandas as pd | |
from urlparse import urlparse | |
log_path = '' | |
# parsing code: http://ferrouswheel.me/2010/01/python_tparse-fields-in-s3-logs/ | |
log_entries = [] |