GithubHelp home page GithubHelp logo

mlearnx / jupyter-tips-and-tricks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbwhit/jupyter-tips-and-tricks

0.0 2.0 0.0 20.28 MB

Using Project Jupyter for data science.

License: MIT License

Jupyter Notebook 99.99% Python 0.01%

jupyter-tips-and-tricks's Introduction

Jupyter Notebook Tips and Tricks

A few (hopefully) useful tips and tricks to using the Jupyter Notebook with an eye to pragmatic usage. This is not, in any way, an exhaustive demonstration of the features of the Jupyter notebook. Further, you can go through these notebooks on your own, but I usually demonstrate using them and give lots of information verbally.

If you have any suggestions, edits, or corrections, please open an issue or let me know some other way. Best of luck!

Assuming you are on a Mac

Install Miniconda (if you haven't already)

cd ~/Downloads
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
# go through the licensing and accept the defaults
source ~/.bashrc
conda update conda

Create a new conda environments

The following commands are how I set up both my conda config and the enviroments that I use.

Add conda-forge to your automatic channels, and the second line makes it so that you don't have to confirm that you want to install when you do things like conda install numpy.

conda config --add channels conda-forge
conda config --set always_yes yes

This following block is bash -- I recommend pasting in the commands one at a time to see what's happening.

# set the environment name here

envname='dspy3'

packages='
altair
anaconda-client
black
bqplot
ipyvolume
ipywebrtc
ipywidgets
jupyter
jupyter_contrib_nbextensions
jupyterlab
matplotlib
mkl
mpld3
notebook
numpy
pandas
pip
pivottablejs
pyparsing
qgrid
scikit-learn
scipy
seaborn
statsmodels
vaex
vega_datasets
yapf
'

conda create -n $envname python=3 $packages
source activate $envname

# Pause here, double check that this pip is the correct one
which pip

# the correct one will say something like... 
# $ which pip
# /Users/username/miniconda3/envs/dspy3/bin/pip

pip install pyhive[presto] sql_magic SQLAlchemy 

# lets the notebook extension (like ToC2) be enabled.
jupyter nbextension enable --py --sys-prefix widgetsnbextension

# This sets the name of the kernel that you want to select from the Kernel menu
python -m ipykernel install --user --name $envname --display-name "$envname"

Troubleshooting

If you see an error message that says something about the iopub_data_rate_limit when you're trying to plot, try starting the notebook/lab with the following modified commands:

# Run to get a notebook
jupyter notebook --NotebookApp.iopub_data_rate_limit=10000000

# Run to get lab
jupyter lab --NotebookApp.iopub_data_rate_limit=10000000

jupyter-tips-and-tricks's People

Contributors

jbwhit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.