Skip to content

Instantly share code, notes, and snippets.

@brianspiering
Last active February 9, 2019 18:06
Show Gist options
  • Select an option

  • Save brianspiering/b1d1dc6dc81829893c19059f8a61d58b to your computer and use it in GitHub Desktop.

Select an option

Save brianspiering/b1d1dc6dc81829893c19059f8a61d58b to your computer and use it in GitHub Desktop.

Revisions

  1. brianspiering revised this gist Feb 9, 2019. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    name: ml
    name: rl-course
    channels:
    - conda-forge
    - damianavila82
    @@ -11,14 +11,14 @@ dependencies:
    - jupyter
    - jupyterlab
    - matplotlib
    - seaborn
    - numpy
    - nbgrader
    - pandas
    - scikit-learn
    - seaborn
    - requests
    - rise
    - pip:
    - jupyter_contrib_nbextensions
    - mdp
    - pymdptoolbox
    - rise

    - pymdptoolbox
  2. brianspiering revised this gist Feb 9, 2019. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,20 @@
    #!/bin/bash

    # Before running this script, install miniconda with Python 3.7
    # Before running this script, install miniconda or anaconda with Python 3.7
    # https://conda.io/docs/user-guide/install/macos.html

    # After installing either miniconda or anaconda, open a new terminal code so conda is on the path
    # Must cd into this directory to run this script successfully

    # Setup the environment for the classroom. TeachOps FTW!
    set -e # Exit immediately if a command exits with a non-zero status
    set -x # Exit immediately if a pipeline exits with a non-zero status

    # Name of environment from environment.yml
    envname=sed '1!d' environment.yml | sed 's/^.* //'
    # Name of environment is from environment.yml
    envname=$(sed '1!d' environment.yml | sed 's/^.* //')

    # Create environment based on environment.yml in the same directory
    conda update -n base conda -y
    conda env create -n $envname --force

    # Start environment
  3. brianspiering revised this gist Jan 21, 2019. 2 changed files with 23 additions and 17 deletions.
    8 changes: 7 additions & 1 deletion environment.yml
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,11 @@ name: ml
    channels:
    - conda-forge
    - damianavila82
    - pytorch
    dependencies:
    - python==3.7
    - pytorch>=1.0
    - torchvision
    - ipython
    - jupyter
    - jupyterlab
    @@ -14,5 +17,8 @@ dependencies:
    - scikit-learn
    - requests
    - pip:
    - quilt
    - jupyter_contrib_nbextensions
    - mdp
    - pymdptoolbox
    - rise

    32 changes: 16 additions & 16 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,26 @@
    #!/bin/bash

    # Before running this script, install miniconda with Python 3.7
    # https://conda.io/docs/user-guide/install/macos.html

    set -e # Exit immediately if a command exits with a non-zero status
    set -x # Exit immediately if a pipeline exits with a non-zero status

    # Create environment
    conda update -n base conda -y
    conda env create --name ml --force
    # Name of environment from environment.yml
    envname=sed '1!d' environment.yml | sed 's/^.* //'

    # Start environment
    source activate ml
    # Create environment based on environment.yml in the same directory
    conda env create -n $envname --force

    # Update environment (might break stuff. move fast!?)
    conda update --all --yes
    # Start environment
    source activate $envname

    # Setup spell checking and other notebook enhancements
    git clone https://github.com/Calysto/notebook-extensions.git
    cd notebook-extensions
    jupyter nbextension install calysto --user
    jupyter nbextension enable calysto/spell-check/main
    jupyter nbextension enable calysto/cell-tools/main
    jupyter nbextension enable calysto/annotate/main
    rm -r -f notebook-extensions
    # Update during development; Pin right before teaching
    conda update --all --yes

    # Setup RISE (https://github.com/damianavila/RISE) slideshows
    # Enable extensions
    jupyter contrib nbextension install --user
    jupyter nbextension enable spellchecker/main
    jupyter nbextension enable codefolding/main
    jupyter nbextension install rise --py --sys-prefix
    jupyter nbextension enable rise --py --sys-prefix
  4. brianspiering revised this gist Jul 23, 2018. 2 changed files with 13 additions and 16 deletions.
    16 changes: 9 additions & 7 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,18 @@
    name: teach
    name: ml
    channels:
    - conda-forge
    - damianavila82
    dependencies:
    - python==3.6
    - python==3.7
    - ipython
    - jupyter
    - tensorflow==1.5
    - keras>=2
    - gensim
    - jupyterlab
    - matplotlib
    - seaborn
    - numpy
    - pandas
    - scikit-learn
    - rise
    - pip
    - requests
    - pip:
    - quilt
    - rise
    13 changes: 4 additions & 9 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -4,28 +4,23 @@ set -x # Exit immediately if a pipeline exits with a non-zero status

    # Create environment
    conda update -n base conda -y
    conda env create --force
    conda env create --name ml --force

    # Start environment
    source activate word
    source activate ml

    # Update environment (might break stuff. move fast!?)
    conda update --all --yes

    # Setup notebook extensions
    # Setup spell checking and other notebook enhancements
    git clone https://github.com/Calysto/notebook-extensions.git
    cd notebook-extensions
    jupyter nbextension install calysto --user
    jupyter nbextension enable calysto/spell-check/main
    jupyter nbextension enable calysto/cell-tools/main
    jupyter nbextension enable calysto/annotate/main
    cd ..
    rm -r -f notebook-extensions

    # Setup RISE (https://github.com/damianavila/RISE) slideshows
    jupyter nbextension install rise --py --sys-prefix
    jupyter nbextension enable rise --py --sys-prefix

    # Start Jupyter Notebook
    if [[ "$1" != "--no-start" ]]; then
    jupyter notebook --browser=Chrome
    fi
  5. brianspiering created this gist Mar 3, 2018.
    16 changes: 16 additions & 0 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    name: teach
    channels:
    - conda-forge
    - damianavila82
    dependencies:
    - python==3.6
    - ipython
    - jupyter
    - tensorflow==1.5
    - keras>=2
    - gensim
    - matplotlib
    - numpy
    - scikit-learn
    - rise
    - pip
    31 changes: 31 additions & 0 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    #!/bin/bash
    set -e # Exit immediately if a command exits with a non-zero status
    set -x # Exit immediately if a pipeline exits with a non-zero status

    # Create environment
    conda update -n base conda -y
    conda env create --force

    # Start environment
    source activate word

    # Update environment (might break stuff. move fast!?)
    conda update --all --yes

    # Setup notebook extensions
    git clone https://github.com/Calysto/notebook-extensions.git
    cd notebook-extensions
    jupyter nbextension install calysto --user
    jupyter nbextension enable calysto/spell-check/main
    jupyter nbextension enable calysto/cell-tools/main
    jupyter nbextension enable calysto/annotate/main
    cd ..

    # Setup RISE (https://github.com/damianavila/RISE) slideshows
    jupyter nbextension install rise --py --sys-prefix
    jupyter nbextension enable rise --py --sys-prefix

    # Start Jupyter Notebook
    if [[ "$1" != "--no-start" ]]; then
    jupyter notebook --browser=Chrome
    fi