Are IPython Notebooks code or slides? (for licensing purpose)
While CC licenses aren't really appropriate for code, and code licenses aren't really appropriate for text, there's no real downside to assigning both kinds to the same material. This is "dual-licensing" (reasonably common for software), and it allows the reuser to choose whether they wish to use and redistribute your material under license A or license B.

They can then pick the particular license which is most appropriate for their purposes without having to (eg) try and work out how to apply the BSD license to a graph.

For example, you could use a license statement that says something like:


  This material is copyright Piotr Migdal and made available under the Creative Commons Attribution (CC-BY) license (link). Code is also made available under the MIT License (link).