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> | |
<html lang="en"> | |
<body ng-app="myapp" ng-controller="UploadCtrl"> | |
<input type="file" file-change="upload"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script> | |
// the javascript | |
var app = angular.module('myapp', []); |
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
$ trial ~/Desktop/sample.py | |
sample | |
MyTest | |
test_stuff ... polling :( | |
[OK] | |
------------------------------------------------------------------------------- | |
Ran 1 tests in 0.169s | |
PASSED (successes=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
package main | |
import ( | |
"os" | |
"os/exec" | |
"fmt" | |
"flag" | |
"log" | |
"net" | |
"net/rpc" |
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
FROM ubuntu | |
RUN apt-get update -y | |
RUN apt-get install -y python-dev | |
RUN apt-get install -y libmysqlclient-dev | |
RUN apt-get install -y python-pip && pip install -U pip | |
COPY requirements.txt requirements.txt | |
RUN pip install -r requirements.txt |
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
# Create the cluster token | |
docker-machine create -d virtualbox first-machine | |
$(docker-machine env first-machine) | |
export TOKEN=$(docker run swarm create) | |
# Create a master | |
MASTER_NAME="swarm-master" | |
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://${TOKEN} ${MASTER_NAME} | |
# Create some nodes |
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
from twisted.internet import defer | |
from collections import deque | |
class TimeoutError(Exception): | |
pass | |
class Pooler(object): |
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
python -m unittest patch_classmethod | |
E | |
====================================================================== | |
ERROR: test_usesCreate (patch_classmethod.someFuncTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "patch_classmethod.py", line 27, in test_usesCreate | |
someFunc('hey') | |
File "patch_classmethod.py", line 11, in someFunc | |
return Foo.create(arg) |
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
class A(object): | |
def foo(self): | |
pass | |
class A(object): | |
def bar(self, a, b, c): | |
pass |
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
syntax error |
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
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
...................................F................................................F.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF klein.test_resource.KleinResourceTests.test_external_url_for | |
...................................F................................................F.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF klein.test_resource.KleinResourceTests.test_simpleRouting | |
..................................F.................................................F.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF klein.test_resource.KleinResourceTest |