Summary: Write .PNGs to the sandboxed file system in Chrome. Then sneak in and move them out.
1) Set up a sandboxed file system
// Request 40 GB (should be enough for ~5 minutes of 1080p)
var bytes = 1024*1024*1024*40;
import scipy.misc | |
lena = scipy.misc.lena() | |
#convert to PIL | |
pic = scipy.misc.toimage(lena) |
import numpy as np | |
import matplotlib.pyplot as plt | |
w = 400 | |
h = 300 | |
def normalize(x): | |
x /= np.linalg.norm(x) | |
return x |
# A python script which makes emails in all files in current directory and sub-directories anonymous. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div style="position:absolute;top:50px;left:50px;"> | |
<canvas id="canvas" width="500" height="500"></canvas> |
body, html { | |
height: 100%; | |
margin: 0; | |
} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
/* | |
We're going to start by adding a canvas to the page and getting a context for it. | |
*/ | |
var canvas = document.createElement("canvas"); | |
canvas.width = canvas.height = 320; | |
document.body.appendChild(canvas); | |
var gl = canvas.getContext("experimental-webgl"); | |
/* | |
WebGL doesn't know how to draw anything onscreen out of the box. We have to |
#!/usr/bin/env bash | |
local_json=$1 | |
remote_ip=$2 | |
remote_json=$3 | |
remote_json_on_local=$(jupyter --runtime-dir)/remote.json | |
scp $remote_ip:$remote_json $remote_json_on_local | |
for socket_name in hb_port control_port stdin_port iopub_port shell_port; do | |
local_port=$(sed 's/,/\n/g' $local_json | grep $socket_name | grep -o "[0-9]\+") | |
remote_port=$(grep $socket_name $remote_json_on_local | grep -o "[0-9]\+") |