Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
from BeautifulSoup import BeautifulSoup
import tempfile
import shutil
import zipfile
import requests
import StringIO
import re
@aduston
aduston / vies.py
Created November 6, 2012 17:30 — forked from Aaron1011/vies.py
Django sms keyword
def _split_message(message):
wall = models.Wall.objects.all()
if len(wall) == 1:
keyword = str(wall[0].sms_keyword)
message = message.replace(keyword, '').replace(' ', ' ')
return keyword, message
codes = re.search("(^|\s)(\w{3})(\s|$)", message)
if codes == None:
return None, None
keyword = _get_keyword(codes)
unisubs.streamer.StreamBox.prototype.scrollIntoView_ = function(streamSub) {
if (this.ignoreVideoScrolling_) {
return;
}
this.videoScrolling_ = true;
console.log('scrolling into container view');
goog.style.scrollIntoContainerView(
streamSub.getSpan(), this.transcriptElem_, true);
// Universal Subtitles, universalsubtitles.org
//
// Copyright (C) 2010 Participatory Culture Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,