# Set these to your locations...
cd $CSEDIR &&
# Remove old content
rm -rf publish/* ;
# coding: utf-8
Exercise solution: given two string representations of binary numbers, return their sum as a string representation of a binary number.
This solution assumes that a much simpler solution like...
def badd(a,b):
return bin(int(a,2) + int(b,2))[2:]
...wouldn't be accepted. ;)
## This script does initial cleanup of an HTML export of the CSE book from gdocs
## After cleanup, it will probably need to be imported back into gdocs for manual
## tweaks.
## Usage: just pass one or more HTML filenames as arguments.
## Processed versions are output to `dstdir`, defined below.
View cap.yml
- name: Deploy edxapp for Intel CAP
hosts: all
sudo: True
gather_facts: True
serial_count: 1
CLUSTER_NAME: 'edxapp'
#EDXAPP_LMS_NGINX_PORT: 80 # Port 18000 by default
View gist:e7de2608545a9482d342
# Script to prepare a cubietruck SD image for x2go
# Based on work by Arturo Samanez (
# and instructions at
if [ $EUID -ne 0 ]
echo ""
echo "ERROR: Please run this script as root."
View index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
Adapted from
View gist:752d34b049d5000f1121
# This query is formatted to work with Moodle's Configurable Reports plugin
u.username "User",
c.shortname "Course",
from_unixtime(viewed.first) "First View",
View gist:ab4d4486430eb777cb42
.page_add {
border: thin solid gray;
border-radius: 10px;
width: 1050px;
padding-left: 20px;
padding-right: 20px;
height: 70%;
View gist:e51ebb0093c354807fff
* This is the result of writing to an XBlock with a superclass of the Dict field, each of which have a bunch of
* logging/debug wrappers built into them. The result is somewhere between a confusing mess and an informative trip
* down the rabbit hole that is XBlock field internals. Enter if you dare. :)
* The code that produced this log is here:
import json, os, re, sys, time
from lxml import etree
This tool finds and prints xAPI JSON representations of each ktouch activity it finds.
It is WAY OVER-ENGINEERED for what it needs to be, but it was also intended as a way
to play around with ideas for how this could be abstracted into a more general framework.
Here are some concepts you will need to understand: