Skip to content

Instantly share code, notes, and snippets.


Matthias Bussonnier Carreau

View GitHub Profile
View BinderLogo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Carreau /
Last active Mar 3, 2018
Rust From error
// in the following snippet, cargo complains:
// error[E0277]: the trait bound `B: std::convert::From<&A>` is not satisfied
// --> src/
// |
// 54 | let dn: B = B::from(n);
// | ^^^^^^^ the trait `std::convert::From<&A>` is not implemented for `B`
// |
// = help: the following implementations were found:
// <B as std::convert::From<A>>
Carreau / proof
Created Oct 14, 2017
Keybase Proof
View proof
### Keybase proof
I hereby claim:
* I am carreau on github.
* I am mbussonn ( on keybase.
* I have a public key ASCnMPrYcBgBueQ180i9ks1TWulXMXFYs_bdj1xJ6pVxtgo
To claim this, I am signing this object:
Carreau /
Created Sep 20, 2017
import magic.
from IPython.core.magic import Magics, magics_class, line_magic
class Waskom(Magics):
def michael(self, line):'import seaborn as sns')
ip = get_ipython()
View Disp-Requests.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:4ed0987c3671d9cb92cf3b8a29542619
In [12]: jedi.Interpreter('s.dat',[ {'s':s}], line=1, column=5).completions()[0].type
AttributeError Traceback (most recent call last)
/Users/bussonniermatthias/dev/jedi/jedi/parser/ in wrapper(self)
37 try:
---> 38 return getattr(self, name)
39 except AttributeError:
AttributeError: 'CompiledName' object has no attribute '_infer'
Carreau /
Created Dec 25, 2016
use to convert txt peps to rst.
from textwrap import indent, wrap
from more_itertools import peekable
indent_level = lambda line: len(line) - len(line.lstrip())
import re
View make initdb fail
$ docker-machine start
$ eval $(docker-machine env)
$ make build
$ make serve # all is fine
$ # in a second terminal :
$ eval $(docker-machine env)
$ make initdb
docker-compose run web psql -h db -d postgres -U postgres -c "DROP DATABASE IF EXISTS warehouse"
Starting warehouse_elasticsearch_1
View labcrashinstall.log
> webpack --config webpack.conf.js
ModuleNotFoundError: Module not found: Error: Cannot resolve module 'jquery-ui/themes/smoothness/jquery-ui.min.css' in /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/jupyterlab/lib/widgets
at /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/webpack/lib/Compilation.js:229:38
at onDoneResolving (/Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/webpack/lib/NormalModuleFactory.js:29:20)
at /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/webpack/lib/NormalModuleFactory.js:85:20
at /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/async/lib/async.js:726:13
at /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/async/lib/async.js:52:16
at done (/Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/async/lib/async.js:241:17)
at /Users/bussonniermatthias/dev/jupyterlab/jupyterlab/node_modules/async/lib/async.js:44:16
Carreau / crash
Created May 25, 2016
Xonsh + IPython crash
View crash
Matthiass-MacBook-Pro:~ bussonniermatthias$ mkdir test
Matthiass-MacBook-Pro:~ bussonniermatthias$ cd test
Matthiass-MacBook-Pro:test bussonniermatthias$ xonsh
(rootenv)~/test$ ipython > foo
Traceback (most recent call last):
File "/Users/bussonniermatthias/dev/prompt_toolkit/prompt_toolkit/", line 385, in run
File "/Users/bussonniermatthias/dev/prompt_toolkit/prompt_toolkit/", line 344, in _redraw
self.renderer.render(self, self.layout, is_done=self.is_done)
File "/Users/bussonniermatthias/dev/prompt_toolkit/prompt_toolkit/", line 391, in render
You can’t perform that action at this time.