I hereby claim:
- I am ianjosephwilson on github.
- I am ianjosephwilson (https://keybase.io/ianjosephwilson) on keybase.
- I have a public key ASBfYmsRZsAxCQF09dG8pb9nupyVl8WQFbuje2U2eY3cwwo
To claim this, I am signing this object:
from itertools import islice | |
def p_strs(items): | |
""" Generate strings that represent all the partitions of the given items. | |
Examples: | |
items = [1, 2, 3, 4] | |
assert len(items) == 4 | |
[0,0,0,0] -- [[1,2,3,4]] |
I hereby claim:
To claim this, I am signing this object:
import sys | |
def main(argv): | |
print (argv) | |
if __name__ == '__main__': | |
# The first argument is how we were called. | |
called_as = sys.argv[0] | |
# Pass actual arguments to our main function. | |
main(sys.argv[1:]) |
""" | |
Testing out the py mini racer v8 interface with Douglas Crockford's jslint.js from http://www.jslint.com/. | |
""" | |
import sys | |
from py_mini_racer import py_mini_racer | |
HTML_PAGE_FORMAT = """<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page 1</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<h1>Page 1</h1> |
import logging | |
from collections import namedtuple | |
#tryton_jsonrpc is a softlink to tryton.jsonrpc. | |
from tryton_jsonrpc import ServerProxy, Fault | |
from pyramid.httpexceptions import HTTPUnauthorized | |
log = logging.getLogger(__name__) |
storage_location_ids = server.model.stock.location.search([ | |
('type', '=', 'storage'), | |
('parent', 'child_of', location_ids)]) |
{% macro form_error(key, errors) -%}{%- endmacro %} | |
{% macro form_input(key, values, errors=None, label=None, type='text') %} | |
<div class="form-group{{' error' if errors and key in errors else ''}}"> | |
<label class="form-label">{{ label or key.replace('_', ' ').title() }}</label> | |
<input type="{{ type }}" name="{{ key }}" | |
value="{{ values.get(key, '') }}" | |
class="form-control"> | |
{% form_error(key, errors) %} | |
</div> |
sudo emerge --oneshot portage | |
* IMPORTANT: 6 news items need reading for repository 'gentoo'. | |
* Use eselect news to read news items. | |
Calculating dependencies... done! | |
[ebuild NS ] dev-lang/python-3.3.2-r2 [2.7.3-r2, 3.2.3] USE="gdbm ipv6 ncurses readline sqlite ssl threads xml -build -doc -examples -hardened -tk -wininst" | |
[ebuild U ] sys-apps/portage-2.2.7 [2.1.11.62] PYTHON_TARGETS="python3_3* -python3_2*" | |
[blocks B ] <sys-apps/sandbox-2.6-r1 ("<sys-apps/sandbox-2.6-r1" is hard blocking dev-lang/python-3.3.2-r2) |
<div class="control-group"> | |
<span class="control-label">Field</span> | |
<div class="controls"> | |
<span class="help-inline">Value</span> | |
</div> | |
</div> |