Skip to content

Instantly share code, notes, and snippets.

View fperez's full-sized avatar

Fernando Perez fperez

View GitHub Profile
@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 / sprt-nbsp.ipynb
Created March 16, 2017 07:09
sprt test - adding an nbsp in the gap0 paragraph in 2nd cell
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / README.md
Last active July 1, 2021 04:43
Polyglot Data Science with IPython

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@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 / 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 / zip-errors.ipynb
Last active August 27, 2021 04:02
Demo of issues with zip file downloads from JupyterLab
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / README.md
Last active September 2, 2021 22:10
Notebook saving problem with JupyterLab 3.1.x

Saving problems in JupyterLab 3.1.x

Binder

The notebook in this gist is meant to illustrate a problem we're experiencing with a notebook that often fails to save at all when attempting to write to it from a cloud-hosted bub.

See the saving-bug notebok for more details.

@fperez
fperez / copy_trees.py
Created October 14, 2021 22:30
Old tree-copying script to use in sphinx builds
#!/usr/bin/env python
"""Copy data files to final html directory.
"""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import os
import sys
@fperez
fperez / env-update.py
Created August 26, 2022 09:15
Update an environment.yml file dependencies according to the current environment
#!/usr/bin/env python
"""
Refresh an environment yaml file to current versions.
This script reads an existing `environment.yml` file (for Conda/Mamba
environments) and writes out a new file listing the same packages, but listing
all currently available versions of the listed packages.
For an alternate approach, that queries PyPI/Conda-Forge to gather the most
recent versions of all packages, see @yuvipanda's similar script at