From 24c7380765416842cc5c1ba569cf66275f22cd8b Mon Sep 17 00:00:00 2001 From: marcelo-ramires Date: Thu, 26 Nov 2015 02:55:39 -0200 Subject: [PATCH] Adding .ipynb (Jupyter Notebook) extension to python, and a sample file --- lib/linguist/languages.yml | 1 + samples/Python/JupyterNotebook.ipynb | 57 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 samples/Python/JupyterNotebook.ipynb diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b14b371e..6b2801ff 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2783,6 +2783,7 @@ Python: - .tac - .wsgi - .xpy + - .ipynb filenames: - BUILD - SConscript diff --git a/samples/Python/JupyterNotebook.ipynb b/samples/Python/JupyterNotebook.ipynb new file mode 100644 index 00000000..7263209d --- /dev/null +++ b/samples/Python/JupyterNotebook.ipynb @@ -0,0 +1,57 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# HELLO LINGUIST\n", + "\n", + "** This is a sample notebook to be used by [Linguist](https://github.com/github/linguist) ** " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Here is the content: information\n" + ] + } + ], + "source": [ + "def showContent(content):\n", + " print(\"Here is the content: \" + content)\n", + "\n", + "showContent(\"information\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}