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
#To be able to use this, please do a symbolic link into project root: | |
#cd yourproject | |
#ln -s environments/my_own_fabfile.py fabfile.py | |
from fabric.api import env, local, run, cd, sudo | |
from fabric.decorators import hosts | |
env.project_root = '~/WebSites/PROJECT' | |
#from fabric.contrib import django | |
env.user = "USER" |
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/sh | |
if test "$(git diff --name-only HEAD@{1} | ack '500|404|home.html|static-content')" | |
then | |
echo "running ./manage.py generatemedia to update files" | |
python myproject/manage.py generatemedia --nodebug | |
git add -A myproject/_generated_media/* | |
git add -A static-content/* | |
git commit -m "updating media (automatic update by git merge hook)" | |
fi |
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 difflib import SequenceMatcher | |
from mturk.models import Hit | |
from message.models import Email | |
email_ids = [m.email_id for m in Hit.objects.all()] | |
emails = [e.subject for e in Email.objects.filter(id__in=email_ids)] | |
res = {} | |
for e in emails[:100]: | |
f = False |