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
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
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
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
# 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 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
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
$ 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
checking for strings.h... yes | |
checking for inttypes.h... yes | |
checking for stdint.h... yes | |
checking for unistd.h... yes | |
checking asm/types.h usability... no | |
checking asm/types.h presence... no | |
checking for asm/types.h... no | |
checking conio.h usability... no | |
checking conio.h presence... no | |
checking for conio.h... no |
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 second file. | |
And this is more content. |
OlderNewer