{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "81824ab8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Not running on CoLab\n" ] } ], "source": [ "import sys\n", "\n", "if 'google.colab' in sys.modules:\n", " print('Running on CoLab')\n", "\n", " from google.colab import drive\n", "\n", " drive.mount('/content/drive')\n", "\n", " # TODO: Enter the path in your Drive of the assignment.\n", " # e.g. 'cs231n/assignments/assignment1/'\n", " FOLDERNAME = None\n", "\n", " assert FOLDERNAME is not None, \"[!] Enter the foldername.\"\n", "\n", "else:\n", " print('Not running on CoLab')\n", " FOLDERNAME = \"./\"" ] }, { "cell_type": "markdown", "id": "6be91a6a", "metadata": {}, "source": [ "# Collect Submission - Zip + Generate PDF \n", "\n", "Run this notebook once you have completed all the other notebooks: `knn.ipynb`, `softmax.ipynb`, `two_layer_net.ipynb` and `features.ipynb`.\n", "\n", "It will:\n", "\n", "* Generate a zip file of your code (`.py` and `.ipynb`) called `a1_code_submission.zip`.\n", "* Convert all notebooks into a single PDF file called `a1_inline_submission.pdf`.\n", "\n", "If your submission for this step was successful, you should see the following display message:\n", "\n", "`### Done! Please submit a1_code_submission.zip and a1_inline_submission.pdf to EVA. ###`\n", "\n", "Make sure to download the zip and pdf file locally to your computer, then submit to Gradescope. Congrats on succesfully completing the assignment!" ] }, { "cell_type": "code", "execution_count": 2, "id": "aa146f82", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: nbconvert in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (7.16.4)\n", "Requirement already satisfied: beautifulsoup4 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (4.12.3)\n", "Requirement already satisfied: bleach!=5.0.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (3.1.0)\n", "Requirement already satisfied: defusedxml in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (0.5.0)\n", "Requirement already satisfied: importlib-metadata>=3.6 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (8.5.0)\n", "Requirement already satisfied: jinja2>=3.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (3.1.4)\n", "Requirement already satisfied: jupyter-core>=4.7 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (5.7.2)\n", "Requirement already satisfied: jupyterlab-pygments in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (0.3.0)\n", "Requirement already satisfied: markupsafe>=2.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (2.1.5)\n", "Requirement already satisfied: mistune<4,>=2.0.3 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (3.0.2)\n", "Requirement already satisfied: nbclient>=0.5.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (0.10.0)\n", "Requirement already satisfied: nbformat>=5.7 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (5.10.4)\n", "Requirement already satisfied: packaging in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (24.1)\n", "Requirement already satisfied: pandocfilters>=1.4.1 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (1.4.2)\n", "Requirement already satisfied: pygments>=2.4.1 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (2.18.0)\n", "Requirement already satisfied: tinycss2 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (1.3.0)\n", "Requirement already satisfied: traitlets>=5.1 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbconvert) (5.14.3)\n", "Requirement already satisfied: six>=1.9.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from bleach!=5.0.0->nbconvert) (1.12.0)\n", "Requirement already satisfied: webencodings in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from bleach!=5.0.0->nbconvert) (0.5.1)\n", "Requirement already satisfied: zipp>=3.20 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from importlib-metadata>=3.6->nbconvert) (3.20.0)\n", "Requirement already satisfied: platformdirs>=2.5 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jupyter-core>=4.7->nbconvert) (4.3.6)\n", "Requirement already satisfied: jupyter-client>=6.1.12 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbclient>=0.5.0->nbconvert) (8.6.3)\n", "Requirement already satisfied: fastjsonschema>=2.15 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbformat>=5.7->nbconvert) (2.20.0)\n", "Requirement already satisfied: jsonschema>=2.6 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from nbformat>=5.7->nbconvert) (3.0.1)\n", "Requirement already satisfied: soupsieve>1.2 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from beautifulsoup4->nbconvert) (2.6)\n", "Requirement already satisfied: attrs>=17.4.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat>=5.7->nbconvert) (19.2.0)\n", "Requirement already satisfied: pyrsistent>=0.14.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat>=5.7->nbconvert) (0.14.11)\n", "Requirement already satisfied: setuptools in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat>=5.7->nbconvert) (72.1.0)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jupyter-client>=6.1.12->nbclient>=0.5.0->nbconvert) (2.9.0.post0)\n", "Requirement already satisfied: pyzmq>=23.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jupyter-client>=6.1.12->nbclient>=0.5.0->nbconvert) (23.0.0)\n", "Requirement already satisfied: tornado>=6.2 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from jupyter-client>=6.1.12->nbclient>=0.5.0->nbconvert) (6.4.1)\n", "Requirement already satisfied: pandoc in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (2.4)\n", "Requirement already satisfied: plumbum in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from pandoc) (1.9.0)\n", "Requirement already satisfied: ply in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from pandoc) (3.11)\n", "Requirement already satisfied: importlib-resources in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from plumbum->pandoc) (6.4.0)\n", "Requirement already satisfied: zipp>=3.1.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from importlib-resources->plumbum->pandoc) (3.20.0)\n", "Requirement already satisfied: PyPDF2 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (3.0.1)\n", "Requirement already satisfied: typing_extensions>=3.10.0.0 in /Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages (from PyPDF2) (4.12.2)\n", "### Zipping file ###\n", "### Creating PDFs ###\n", "/Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages/nbconvert/utils/pandoc.py:50: RuntimeWarning: You are using an unsupported version of pandoc (1.19.2.1).\n", "Your version must be at least (2.9.2) but less than (4.0.0).\n", "Refer to https://pandoc.org/installing.html.\n", "Continuing with doubts...\n", " check_pandoc_version()\n", "Created PDF knn.ipynb.\n", "/Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages/nbconvert/utils/pandoc.py:50: RuntimeWarning: You are using an unsupported version of pandoc (1.19.2.1).\n", "Your version must be at least (2.9.2) but less than (4.0.0).\n", "Refer to https://pandoc.org/installing.html.\n", "Continuing with doubts...\n", " check_pandoc_version()\n", "Created PDF softmax.ipynb.\n", "/Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages/nbconvert/utils/pandoc.py:50: RuntimeWarning: You are using an unsupported version of pandoc (1.19.2.1).\n", "Your version must be at least (2.9.2) but less than (4.0.0).\n", "Refer to https://pandoc.org/installing.html.\n", "Continuing with doubts...\n", " check_pandoc_version()\n", "Created PDF two_layer_net.ipynb.\n", "/Users/diegosilveracoeff/anaconda3/envs/dlvis/lib/python3.8/site-packages/nbconvert/utils/pandoc.py:50: RuntimeWarning: You are using an unsupported version of pandoc (1.19.2.1).\n", "Your version must be at least (2.9.2) but less than (4.0.0).\n", "Refer to https://pandoc.org/installing.html.\n", "Continuing with doubts...\n", " check_pandoc_version()\n", "Created PDF features.ipynb.\n", "### Done! Please submit a1.zip and the pdfs to Gradescope. ###\n" ] } ], "source": [ "if \"google.colab\" in sys.modules:\n", " %cd drive/My\\ Drive\n", " %cd $FOLDERNAME\n", " !sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic\n", " !pip install pandoc\n", " !pip install PyPDF2\n", " !bash collectSubmission.sh\n", "else:\n", " !pip install --upgrade nbconvert\n", " !pip install pandoc\n", " !pip install PyPDF2\n", " !bash collectSubmission.sh" ] }, { "cell_type": "code", "execution_count": null, "id": "d6ca1adb", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "dlvis", "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.8.19" } }, "nbformat": 4, "nbformat_minor": 5 }