Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
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
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. | |
# ghc-pkg-clean -f cabal/dev/packages*.conf also works. | |
function ghc-pkg-clean() { | |
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
do | |
echo unregistering $p; ghc-pkg $* unregister $p | |
done | |
} | |
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
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
# IPython magic to check for PEP8 compliance. | |
# Author: Juan Luis Cano <juanlu001@gmail.com> | |
"""IPython magic to check for PEP8 compliance. | |
To use it, type | |
```%load_ext pep8magic``` | |
and then |
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 serial | |
class Lifespan(object): | |
def __init__(self): | |
self.connect() | |
def connect(self): | |
self.port = serial.Serial('/dev/tty.IHP-Serialport', 19200, timeout=1) | |
while self.port.read(1) != '': |
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
using UnityEngine; | |
using System.Collections; | |
public class Extrap { | |
public static Quaternion Slerp(Quaternion q1, Quaternion q2, float t) | |
{ | |
float angle; | |
Vector3 axis; |
- John - Is the owner, but doesn't really know how to run a server.
- Rose - The only one with a good internet connection and a good mic. Always on topic.
- Dave - Shitposter. Exclusively posts in #memes or if there is no meme channel, will post memes in every channel until one is made.
- Jade - Pretty much everyone treats her like the actual owner of the server. Hangs out in #general to welcome newbies.
- Karkat - Always in voice chat. His microphone is somehow the shittiest mic out of anyone.
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
/// A "fractional part" function on f32s that does bitwise magic | |
/// on the representation of its argument. | |
pub fn frac(f: f32) -> f32 { | |
f32::from_bits(_frac(f.to_bits())) | |
} | |
/// A "fractional part" function that operates on a signed integer | |
/// representation of an IEEE single-precision floating point number. | |
fn _frac(i: u32) -> u32 { | |
// A floating point number consists of a sign bit, |
OlderNewer