These are chat archives for ipython/ipython

7th
Mar 2015
Matthias Bussonnier
@Carreau
Mar 07 2015 02:15
I guess I can ask here: @jdfreder why do you want to monkeypatch ?
Sylvain Corlay
@SylvainCorlay
Mar 07 2015 02:29
@ngoldbaum your issue is that values was renamed to options in the Dropdown widget (and all other selection widgets).
field_dropdown = Dropdown(options=sorted(image_storage ['10% Gas Fraction']...
Jason Grout
@jasongrout
Mar 07 2015 16:41
Is there an option to override the Content-Security-Policy header at https://github.com/ipython/ipython/blob/master/IPython/html/base/handlers.py#L51?
Matthias Bussonnier
@Carreau
Mar 07 2015 17:10
@jasongrout set web_app.settings ?
--NotebookApp.tornado_settings=<Dict>
Default: {}
Supply overrides for the tornado.web.Application that the IPython notebook
uses.
Jason Grout
@jasongrout
Mar 07 2015 17:11
I didn't see anywhere in the tornado Application settings where I could specify default headers
Matthias Bussonnier
@Carreau
Mar 07 2015 17:11
oh, this is a dict, that get merged with defaults settings. (too many settign)
Jason Grout
@jasongrout
Mar 07 2015 17:12
sorry, I'm talking past you. Yes, it is a settings dict.
Matthias Bussonnier
@Carreau
Mar 07 2015 17:13
Yeah, that's that , + other things.
Jason Grout
@jasongrout
Mar 07 2015 17:13
so can I set the default value for the settings dict from the command line?
Matthias Bussonnier
@Carreau
Mar 07 2015 17:13
Sure, like any configurable.
Jason Grout
@jasongrout
Mar 07 2015 17:13
sorry; default value for the headers key of the settings dict?
--NotebookApp.? = ?
Matthias Bussonnier
@Carreau
Mar 07 2015 17:14
the escaping on command line is not easy to guess
you can also set c.NotebookApp.tornado_settings in config file
(IIUC)
$ipython notebook --NotebookApp.tornado_settings="{'headers':{'Content-Security-Policy':'NonsensCSP'}}" [I 09:18:52.886 NotebookApp] Using existing profile dir: '/Users/bussonniermatthias/.ipython/profile_default' [I 09:18:52.990 NotebookApp] Serving local MathJax from /Users/bussonniermatthias/.ipython/nbextensions/mathjax/MathJax.js at /nbextensions/mathjax/MathJax.js [I 09:18:53.019 NotebookApp] Serving notebooks from local directory: /Users/bussonniermatthias/ipython [I 09:18:53.019 NotebookApp] 0 active kernels [I 09:18:53.020 NotebookApp] The IPython Notebook is running at: http://localhost:8888/ [I 09:18:53.020 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} got headers: {'Content-Security-Policy': 'NonsensCSP'} Jason Grout @jasongrout Mar 07 2015 17:19 Thanks; I just did an experiement and got the same as you. --NotebookApp.tornado_settings='{"headers": {"Content-Security-Policy": "MYHEADER"}}' thanks! that's perfect Matthias Bussonnier @Carreau Mar 07 2015 17:19 When do you arrive in Berkeley ? Jason Grout @jasongrout Mar 07 2015 17:20 Monday morning Matthias Bussonnier @Carreau Mar 07 2015 17:20 Ok. Have a good flight. You remember BART and the rest ? Or Uber/Taxi ? Jason Grout @jasongrout Mar 07 2015 17:21 nope, haven't figured any of that out I'm coming with Sylvain and Chris, so we'll figure it out together. likely we can all catch a taxi together, unless you think bart is faster Matthias Bussonnier @Carreau Mar 07 2015 17:21 Depending on the time, I woudl guess BART is faster. I've heard that driving in the morning can be quite long when the bay brige if full. distance from BART Downtow Berkeley to Shattuck plazza is like 2 min (if you get out at the right street corner) Jason Grout @jasongrout Mar 07 2015 17:24 ah. It looks like the bart is about 55 minutes from SFO. but it's also$9.25? wow.
Matthias Bussonnier
@Carreau
Mar 07 2015 17:24
wow expensive ? Or wow cheap ?
Jason Grout
@jasongrout
Mar 07 2015 17:25
well, neither. Just seems expensive for public transit
more expensive than getting to the airport here in NY, about the same distance
Matthias Bussonnier
@Carreau
Mar 07 2015 17:26
It's more expensive in Paris.
Jason Grout
@jasongrout
Mar 07 2015 17:26
anyway, it says the car is about 40 minutes, so likely we'll just take that for all of us.
and we'll probably be there in time for lunch, or maybe just after lunch
depending on when you guys have lunch
Matthias Bussonnier
@Carreau
Mar 07 2015 17:27
If you are 3 it's probably worth it.
we can wait for you .
Jason Grout
@jasongrout
Mar 07 2015 17:27
you have our number. If we can get your number (offline, of course), we can call you when we get in
Matthias Bussonnier
@Carreau
Mar 07 2015 17:27
and we will probably have lunch closer to your hotel, so we can haed down when you are abou ready.
Sylvain Corlay
@SylvainCorlay
Mar 07 2015 18:40
Awesome thanks!