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
var obj = document.getElementById('flashObj'); | |
for(var prop in obj){ | |
var fx = obj[prop]; | |
if(obj.hasOwnProperty(prop) && (typeof fx == 'function') && /eval\(instance/.test(fx)){ | |
console.log(prop) | |
} | |
} |
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 webapp2 | |
from lib import auth | |
from lib import keys | |
import logging | |
# call the UCMS launch URL endpoint and retrieve the url to open the KAPx session with the supplied UCMS ID. | |
def get_launch_url(ucms_id, headers): | |
krc = auth.KapRestClient(keys.AuthKeys.AUTH_PREFIX, | |
keys.AuthKeys.SECRET_KEY, |
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
$('.literally.index').literallycanvas({ | |
backgroundColor: 'whiteSmoke', | |
onInit: function(lc) { | |
window.lc = lc; } | |
}); |
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 lib.remoteapi import env_picker | |
from models import Course | |
env_picker() | |
# enter the info that it asks you to enter | |
for course in Course.query(): | |
print course.session_opaqueID |
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
{ | |
"client_sys_id": "TestInstructor", | |
"email": "instructor@test.com", | |
"first_name": "Test", | |
"last_name": "Instructor", | |
"role_id": "1", | |
"username": "Instructor" | |
} | |
{ |
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 google.appengine.ext import db | |
from datetime import datetime | |
# local override with start not being required | |
class DBSession(db.Model): | |
start = db.DateTimeProperty() | |
title = db.StringProperty() | |
for s in DBSession.all(): | |
save_it = False |
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 tests import KapxDataSet | |
from datetime import datetime, timedelta | |
from models import DBAssetDefault, DBAsset, DBSession | |
__author__ = 'McBride' | |
_now_datetime = datetime.now() | |
class DBSessionData(KapxDataSet): | |
class Meta: |
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 StringIO import StringIO | |
from google.appengine.api import images | |
out_stream = StringIO() | |
# put the data into a StringIO instance so we can manipulate it with PIL.Image | |
original_image_data = StringIO(source_img_response.read()) | |
editable_image = Image.open(original_image_data) | |
editable_image.thumbnail((width, height), Image.ANTIALIAS) | |
editable_image.save(out_stream, "PNG") |
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
opaque_id = 'f6d43db7-d33f-409a-a791-f37a8a004b09' | |
offset = 0 | |
from pprint import pprint | |
from datetime import datetime | |
from models import DBSession, SlideAnnotationEventArgs | |
from google.appengine.ext import ndb | |
class TimelineEvent(ndb.Expando): |
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
AWS_ACCESS_KEY_ID = '' # todo: insert aws key. | |
AWS_ACCESS_KEY_SECRET = '' # todo: insert aws secret. | |
import os | |
import boto | |
import boto.s3 | |
import os.path | |
import sys, getopt | |
import logging |
OlderNewer