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
#!/bin/bash | |
# --- Configuration --- | |
REPO_PATH="." | |
# Calculate the timestamp for 7 days ago from the current time | |
# Using the context's current time: Thursday, April 3, 2025 at 10:30:56 AM PDT | |
# If running this later, 'date -d "7 days ago" +%s' will use the actual current time. | |
# For consistency with the request context: | |
# CURRENT_DATE_STR="2025-04-03 10:30:56 PDT" | |
# ONE_WEEK_AGO_TIMESTAMP=$(date -d "$CURRENT_DATE_STR - 7 days" +%s) |
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
# Simple python script that will copy content from 1 pdf to a new pdf. | |
# FYI I just copied from https://github.com/pmaupin/pdfrw/blob/master/examples/cat.py while I was playing around. | |
import sys | |
import os | |
from pdfrw import PdfReader, PdfWriter | |
reader = PdfReader(sys.argv[1]) | |
pages = reader.pages |
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
#!/bin/bash | |
# Install sqoop and mysql connector. Store in s3 and load | |
# as bootstrap step. | |
bucket_location='<put your bucket here>' | |
sqoop_jar='sqoop-1.4.3.bin__hadoop-1.0.0' | |
sqoop_jar_gz=$sqoop_jar.tar.gz | |
mysql_dir='mysql-connector-java-5.1.24' | |
mysql_jar='mysql-connector-java-5.1.24-bin.jar' | |
mysql_dir_gz=$mysql_dir.tar.gz |
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 | |
class NoURLMatchException(Exception): | |
pass | |
class URLParser(object): | |
def __init__(self, regex_definition_handle): |
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
from django.core import urlresolvers | |
resolver = urlresolvers.get_resolver(None) | |
url_re_list = ['^/' + url[1] for url in resolver.reverse_dict.itervalues()] |