Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mtomwing on github.
  • I am mtomwing (https://keybase.io/mtomwing) on keybase.
  • I have a public key ASD0WzmjI10H9Z6ls0kEutQhW2DqsS-oGdBr7EK4ednOxQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mtomwing on github.
  • I am mtomwing (https://keybase.io/mtomwing) on keybase.
  • I have a public key ASA8ufE-bWz0camP7fqSJmoBAaVKeD6WOFtWwiVHf41Fxgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mtomwing on github.
  • I am mtomwing (https://keybase.io/mtomwing) on keybase.
  • I have a public key whose fingerprint is A618 E647 1870 FD90 A6E4 BE6B CD41 028E 8780 5FDA

To claim this, I am signing this object:

(pickups)Michael-MBP[~/Projects/pickups][master *] pip install hangups --allow-external urwid --allow-unverified urwid
Downloading/unpacking hangups
Downloading hangups-0.2.0.tar.gz
Running setup.py (path:/Users/mtomwing/.virtualenvs/pickups/build/hangups/setup.py) egg_info for package hangups
Downloading/unpacking purplex==0.2.4 (from hangups)
Downloading purplex-0.2.4.tar.gz
Running setup.py (path:/Users/mtomwing/.virtualenvs/pickups/build/purplex/setup.py) egg_info for package purplex
Downloading/unpacking requests==2.2.1 (from hangups)
import os
from fabric.api import env, run, cd, prefix
from fabric.contrib.files import exists
from fabric.contrib.project import rsync_project
env.hosts = ['10.211.55.6']
def deploy():
def editData(self, qid, qcontent, answerList):
## Update the question content
q = Question.objects.get(id = qid)
q.content = qcontent
q.save()
## Add/Modify Answers
i = 1
for ans in answerList.split("/"):
try:
./js/app.js:28:10:Expected exactly one space between 'function' and '('.
./js/app.js:31:3:Missing 'use strict' statement.
./js/app.js:31:23:Expected exactly one space between 'function' and '('.
./js/app.js:32:5:Expected '$locationProvider' at column 9, not column 5.
./js/app.js:33:3:Expected '}' at column 5, not column 3.
./js/app.js:52:3:Expected 'this' at column 5, not column 3.
./js/app.js:52:23:Expected exactly one space between 'function' and '('.
./js/app.js:53:5:Expected '$routeProvider' at column 9, not column 5.
./js/app.js:54:7:Expected 'controller' at column 13, not column 7.
./js/app.js:55:7:Expected 'templateUrl' at column 13, not column 7.
struct Perceptron {
weights: Vec<f64>,
threshold: f64,
learning_rate: f64,
}
impl Perceptron {
pub fn new(n: uint, rate: f64) -> Perceptron {
let weights = Vec::from_elem(n, 1f64);
Perceptron {
import operator
from purplex import Lexer, Parser, TokenDef, attach
class RPNLexer(Lexer):
INTEGER = TokenDef(r'\d+')
MULTIPLY = TokenDef(r'\*')
fn compare<T:Ord>(a: &T, b: &T) -> int {
if a < b {
-1
}
else if a > b {
1
}
else {
0
}