<commit_before># Miscellaneous IPython extensions

You can install each extension individually, or you can link the extension directories
into your IPython directories (what I do):

    ln -s $(pwd)/extensions $(ipython locate)/extensions
    ln -s $(pwd)/nbextensions $(ipython locate)/nbextensions

## Gist

Add a gist button to the notebook toolbar:

    $ curl https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js > $(ipython locate)/nbextensions/gist.js

and load it by adding to your custom.js, found in `$(ipython locate profile)/static/custom/custom.js`:

```javascript
IPython.load_extensions('gist');
```


## Retina Figures

Enable 2x display of matplotlib figures (no longer necessary on IPython master)

install the extension:

    %install_ext https://rawgithub.com/minrk/ipython_extensions/master/extensions/retina.py

load the extension:

    %load_ext retina

## Table of Contents 

Generates floating table of contents inside your notebook from the heading cells.
Adds a button to the toolbar to toggle the floating table of contents.

install the extension:

    $ curl https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js
    $ curl https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css > $(ipython locate)/nbextensions/toc.css

and load it with this in your custom.js:

```javascript
IPython.load_extensions('toc');
```<commit_msg>tell curl to follow redirects<commit_after># Miscellaneous IPython extensions

You can install each extension individually, or you can link the extension directories
into your IPython directories (what I do):

    ln -s $(pwd)/extensions $(ipython locate)/extensions
    ln -s $(pwd)/nbextensions $(ipython locate)/nbextensions

## Gist

Add a gist button to the notebook toolbar:

    $ curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js > $(ipython locate)/nbextensions/gist.js

and load it by adding to your custom.js, found in `$(ipython locate profile)/static/custom/custom.js`:

```javascript
IPython.load_extensions('gist');
```


## Retina Figures

Enable 2x display of matplotlib figures (no longer necessary on IPython master)

install the extension:

    %install_ext https://rawgithub.com/minrk/ipython_extensions/master/extensions/retina.py

load the extension:

    %load_ext retina

## Table of Contents 

Generates floating table of contents inside your notebook from the heading cells.
Adds a button to the toolbar to toggle the floating table of contents.

install the extension:

    $ curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js
    $ curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css > $(ipython locate)/nbextensions/toc.css

and load it with this in your custom.js:

```javascript
IPython.load_extensions('toc');
```
{'fraction_non_alphanumeric': 0.09908069458631256, 'fraction_numerical': 0.0006809669731018045, 'mean_word_length': 4.63915547024952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085653', 'n_tokens_mistral': 949, 'n_tokens_neox': 885, 'n_words': 277}