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 | |
# Set these to your locations... | |
CSEDIR="~/Documents/Tunapanda/EconApp/Book/funzo-cse" | |
FUNZODIR="~/Documents/Tunapanda/EconApp/Book/funzo-app" | |
cd $CSEDIR && | |
# Remove old content | |
rm -rf publish/* ; |
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
# 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 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
#!/usr/bin/python | |
## | |
## 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. | |
## |
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
- name: Deploy edxapp for Intel CAP | |
hosts: all | |
sudo: True | |
gather_facts: True | |
vars: | |
serial_count: 1 | |
CLUSTER_NAME: 'edxapp' | |
#EDXAPP_LMS_NGINX_PORT: 80 # Port 18000 by default | |
COMMON_SSH_PASSWORD_AUTH: 'yes' | |
COMMON_ENABLE_DATADOG: '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
#!/bin/bash | |
# | |
# Script to prepare a cubietruck SD image for x2go | |
# Based on work by Arturo Samanez (https://github.com/iLearner/x2go) | |
# and instructions at http://linux-sunxi.org/Bootable_SD_card | |
if [ $EUID -ne 0 ] | |
then | |
echo "" | |
echo "ERROR: Please run this script as root." |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<!-- | |
Adapted from http://philogb.github.io/jit/static/v20/Jit/Examples/Spacetree/example1.html | |
--> | |
<head> |
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
# | |
# IMPORTANT: | |
# This query is formatted to work with Moodle's Configurable Reports plugin | |
# https://moodle.org/plugins/view.php?plugin=block_configurable_reports | |
# | |
select | |
u.username "User", | |
c.shortname "Course", | |
from_unixtime(viewed.first) "First View", |
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
<html> | |
<head> | |
<style> | |
.page_add { | |
border: thin solid gray; | |
border-radius: 10px; | |
width: 1050px; | |
padding-left: 20px; | |
padding-right: 20px; | |
height: 70%; |
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
/** | |
* | |
* 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: | |
https://github.com/usernamenumber/xb_scorm/blob/logging/xb_scorm/xb_scorm.py |
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 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: | |