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
| """Fetch JS & CSS referenced from the web, and stuff it into the HTML.""" | |
| import lxml.html | |
| import requests | |
| IN_FILE = "Using Nbconvert.slides.html" | |
| OUT_FILE = "Using Nbconvert.slides.stuffed.html" | |
| document = lxml.html.parse(IN_FILE) |
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
| class CompleteAttrs(object): | |
| def __getattr__(self, name): | |
| if name == 'foo': | |
| return 1 | |
| if name == 'bar': | |
| return 2 | |
| raise AttributeError(name) | |
| def __dir__(self): | |
| return ['foo', 'bar'] + object.__dir__(self) |
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
| "\e[A": history-search-backward | |
| "\e[B": history-search-forward | |
| "\e[1;5D": backward-word | |
| "\e[1;5C": forward-word | |
| # I don't need pings as I tab complete things | |
| set bell-style none |
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
| { | |
| "notfiles": [ | |
| "_ast", | |
| "_codecs", | |
| "_collections", | |
| "_functools", | |
| "_imp", | |
| "_io", | |
| "_locale", | |
| "_operator", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| ====================================================================== | |
| ERROR: test_multiple_levels (game.tests.test_scoreboard.ScoreboardCsvTestCase) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/home/takluyver/Code/rapid-router/game/tests/test_scoreboard.py", line 203, in test_multiple_levels | |
| actual_header, actual_rows = self.actual_data(response.content) | |
| File "/home/takluyver/Code/rapid-router/game/tests/test_scoreboard.py", line 270, in actual_data | |
| split = content.split("\r\n") | |
| TypeError: a bytes-like object is required, not 'str' |
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
| ERROR:root:Exception occurred while handling GET request to /portal/admin/map/ | |
| Traceback (most recent call last): | |
| File "/home/takluyver/miniconda3/envs/rr-py3/lib/python3.6/site-packages/django/core/handlers/base.py", line 132, in get_response | |
| response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
| File "/home/takluyver/miniconda3/envs/rr-py3/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view | |
| return view_func(request, *args, **kwargs) | |
| File "/home/takluyver/miniconda3/envs/rr-py3/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view | |
| if test_func(request.user): | |
| File "/home/takluyver/miniconda3/envs/rr-py3/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 71, in check_perms | |
| raise PermissionDenied |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Pass an extra variable to an nbconvert template | |
| # Untested | |
| from nbconvert.exporters import HTMLExporter | |
| class MyExporter(HTMLExporter): | |
| def from_notebook_node(self, nb, resources=None, my_var=None, **kw): | |
| self.environment.globals['my_var'] = my_var | |
| return super().from_notebook_node(nb, resources=resources, **kw) |
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
| $ make test | |
| ./setup.py test | |
| running pytest | |
| Searching for typing<3.6,>=3.5.2 | |
| Best match: typing 3.5.3.0 | |
| Processing typing-3.5.3.0-py2.7.egg | |
| Using /home/takluyver/Code/cwltool/.eggs/typing-3.5.3.0-py2.7.egg | |
| Searching for schema-salad<3,>=2.4.20170308171942 | |
| Best match: schema-salad 2.5.20170428142041 |