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
import vanilla | |
h = vanilla.Hub() | |
b = h.bean(8080) | |
@b.websocket('/') | |
def _(ws): | |
child = h.process.execv(['/usr/bin/env', 'grep', '--line-buffered', 'foo']) | |
child.stdout.pipe(ws) |
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
> python | |
Python 2.7.6 (default, Sep 9 2014, 15:04:36) | |
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import vanilla | |
>>> h = vanilla.Hub() | |
>>> child = h.process.execv(['/usr/bin/env', 'grep', '--line-buffered', 'foo']) | |
>>> child.stdin.send('foo1\n') | |
>>> child.stdout.recv() | |
'foo1\n' |
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
import argparse | |
from oauth2client.client import flow_from_clientsecrets | |
from oauth2client.file import Storage | |
from oauth2client import tools | |
def main(): | |
storage = Storage('a_credentials_file') | |
creds = storage.get() |
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
containers: | |
consul: | |
setup: | |
- !Env | |
VERSION: "0.4.1_linux_amd64" | |
- !Alpine v3.1 | |
- !BuildDeps [wget, go, git, gcc, musl-dev, libgcc] | |
- !Sh | | |
set -ex | |
cd /tmp |
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 requests | |
import json | |
from oauth2client.client import GoogleCredentials | |
SCOPE = ( | |
'https://www.googleapis.com/auth/datastore', | |
'https://www.googleapis.com/auth/userinfo.email', ) |
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
foo |
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
import operator | |
import select | |
import fcntl | |
import os | |
class EPoll(object): | |
def __init__(self): | |
self.q = select.epoll() |
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 | |
from suds.client import Client | |
from suds.wsse import Security | |
from suds.wsse import UsernameToken | |
URL = 'https://wd5-impl-services1.workday.com/ccx/service/osv_uber1/Human_Resources/v22.1?wsdl' |
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 | |
from suds.client import Client | |
from suds.wsse import Security | |
from suds.wsse import UsernameToken | |
URL = 'https://wd5-impl-services1.workday.com/ccx/service/Human_Resources?wsdl' | |
USERNAME = '...' |
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 | |
from suds.client import Client | |
from suds.wsse import Security | |
from suds.wsse import UsernameToken | |
URL = 'https://wd5-impl-services1.workday.com/ccx/service/Human_Resources?wsdl' | |
USERNAME = '...' |