Skip to content

Instantly share code, notes, and snippets.

@Mr0grog
Mr0grog / summarize.py
Last active January 26, 2023 18:45
Summarize log files from EDGI Wayback imports
from datetime import timedelta
import dateutil.parser
from pathlib import Path
import re
START_LINE = re.compile(r'^\[([^\]]+)\] Starting Internet Archive Import')
END_LINE = re.compile(r'^\s*Internet Archive import completed at (.+)')
SUMMARY_START = re.compile(r'^\s*Loaded (\d+) CDX records:')
SUMMARY_ITEM = re.compile(r'^\s*(\d+)\s([\s\w\-]+)\s\(')
IMPORT_ERRORS = re.compile(r'^\s*Total:\s*(\d+)\serrors')
@abenedek
abenedek / README.md
Last active November 2, 2020 15:30
BuzzFeed's README Template

name of the service

An explanation of what the service is doing and why. Any high level business logic should be mentioned here to give the reader an understanding of why the service exists in the first place.

List important endpoints/URLs and explain what they are responsible for.

Point of contact and Slack channel