$ mkvirtualenv testkdb
Using real prefix '/usr'
New python executable in testkdb/bin/python
Installing setuptools, pip, wheel...done.
This file contains hidden or 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
#!/usr/bin/env python | |
"""BF Interpreter""" | |
import os | |
import sys | |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
def main(argv): | |
print "Hello World!" | |
return 0 |
- Use six
- Use
six.u()
everywhere you expose a Unicode/String API (anything that is meant for Humans!) - Use
six.text_type()
in place ofunicode()
- Implement the following "Python special methods":
This file contains hidden or 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
autodock: | |
image: prologic/autodock | |
ports: | |
- "1338:1338/udp" | |
- "1338:1338/tcp" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
restart: always | |
autodockhipache: |
This file contains hidden or 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
{ | |
"checks": { | |
"load_docker_metrics": { | |
"type": "metric", | |
"command": "load-docker-metrics.sh", | |
"subscribers": [ | |
"docker" | |
], | |
"interval": 10 | |
} |
This file contains hidden or 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
machines: | |
node1: | |
driver: digitalocean | |
swarm: | |
swarm-master: | |
swarm-discovery: token://3503e114f5382f32755119a02715a659 | |
node2: | |
driver: digitalocean |
This file contains hidden or 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
machines: | |
test: | |
driver: digitalocean | |
services: | |
hello: | |
$machine: dev | |
image: prologic/hello | |
ports: | |
- "8000;8000" |
This file contains hidden or 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
(circuits) | |
prologic@daisy | |
Thu Jul 02 19:22:11 | |
~/circuits | |
$ python | |
Python 2.7.9 (default, Mar 19 2015, 22:32:11) | |
[GCC 4.8.4] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from circuits import Component, Event, Debugger | |
>>> class foo(Event): |
This file contains hidden or 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
prologic@daisy | |
Tue Jun 30 00:37:09 | |
~ | |
$ dc ps | |
Traceback (most recent call last): | |
File "/home/prologic/bin/docker-compose", line 11, in <module> | |
sys.exit(main()) | |
File "/home/prologic/lib/python2.7/site-packages/compose/cli/main.py", line 31, in main | |
command.sys_dispatch() | |
File "/home/prologic/lib/python2.7/site-packages/compose/cli/docopt_command.py", line 21, in sys_dispatch |