Skip to content

Instantly share code, notes, and snippets.

View fperez's full-sized avatar

Fernando Perez fperez

View GitHub Profile
@fperez
fperez / NewCodeCellWidget.ipynb
Created January 29, 2016 04:21
Automatic creation of new code cells via widgets.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / LogisticRegressionPart2.ipynb
Created November 8, 2018 16:50
LogisticRegression notebook from Data100 - test for load/kernel creation time on JupyterLab. On my system (2017 13" MBP) this nb takes 14s to open and 15s *extra* to get a kernel with JLab 0.35.4, and 4s total in Classic (no extra time for kernel)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / Light data with Google Science Journal.ipynb
Last active February 25, 2019 13:18
Real-world data in a few minutes with Google Science Journal
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / copy_trees.py
Created April 27, 2018 20:33
Copy tree of files to sphinx's output build directory to preserve structure of source but make some files available for later download in final build.
#!/usr/bin/env python
"""Copy data files to final html directory.
"""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import os
import sys
@fperez
fperez / release-counts.ipynb
Created December 1, 2017 10:46
Release counts
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / nblinkcheck
Created September 22, 2014 06:02
Check links in an IPython notebook. For images, try to copy missing ones from a globally-configured store.
#!/usr/bin/env python
"""Check all figure links in an IPython notebook and try to copy missing ones.
Note: this quick script is adapted to a fairly specific pattern of
mine. You should simply use it as a template and starting point for
your own functionality.
I keep a single large directory full of figures I reuse on all my
talks, and I normally just symlink it from a new talk directory. But
this makes it harder to publish the talk sources in a self-contained
@fperez
fperez / widgetsave.ipynb
Last active February 25, 2017 02:02
Testing saving notebooks with ipywidgets embedded
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / conda.log
Created December 21, 2016 03:11
Conda debug log for Conda issue 3494
denali[~]> conda create -n iptest ipython -vvv
DEBUG conda.cli.main:_main(143): verbosity set to 3
DEBUG conda.core.index:fetch_index(349): channel_urls=OrderedDict([('https://repo.continuum.io/pkgs/free/osx-64', ('defaults', 0)), ('https://repo.continuum.io/pkgs/free/noarch', ('defaults', 0)), ('https://repo.continuum.io/pkgs/r/osx-64', ('defaults', 0)), ('https://repo.continuum.io/pkgs/r/noarch', ('defaults', 0)), ('https://repo.continuum.io/pkgs/pro/osx-64', ('defaults', 0)), ('https://repo.continuum.io/pkgs/pro/noarch', ('defaults', 0))])
Fetching package metadata ...DEBUG requests.packages.urllib3.util.retry:from_int(191): Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None)
DEBUG conda.core.index:fetch_repodata(284): Using cached repodata for https://repo.continuum.io/pkgs/free/osx-64 at /Users/fperez/usr/conda/pkgs/cache/840cf1fb.json. Timeout in 284 sec
.DEBUG conda.core.index:fetch_repodata(284): Using cached repodata for https://repo.continuum.io/pkgs/free/noarch at /
@fperez
fperez / CMagic.ipynb
Last active August 23, 2016 23:06
A quick and dirty implementation of a %%C magic to compile C code in IPython
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / batman-julia.ipynb
Created July 13, 2016 04:23
The "Batman curve" in Julia
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.