Code Monkey home page Code Monkey logo

lecture-python-bash's Introduction

Teaching Python's NetworkX and Bash

Lecture materials for teaching Python's NetworkX package and Bash scripting.

Contents

Requirements

To run the Jupyter notebooks, you'll need Python 3.x and to install the appropriate packages.

  • Python 3.x
  • NetworkX 2.x
  • bash shell

Environment Setup

Binder and Jupyter Notebook

If you cannot setup Jupyter Notebooks locally, you can launch the lectures through your browser directly with the link below.

Binder

Anaconda and Conda

To make things as streamlined as possible, I suggest downloading Anaconda or, at the very least, just the package manager Conda.

Miniconda and just the conda package manager and Python is much smaller, and you can find the download instructions for your operating system of choice here.

Anaconda includes many more useful packages commonly used in scientific computing and data science. It also comes with Jupyter Notebook packages so this might be easier route if you don't have experience with Python and see yourself using it in the future.

Downloading Packages

Running this in your bash terminal should setup your environment with everything you'll need.

# Create separate environment if you want to separate environment for this
conda create -n py3 python=3 networkx ipython notebook

# Install bash kernel for running bash commands from within the bash notebook
source activate py3  # Activate new environment first
pip install bash_kernel
python -m bash_kernel.install

# Deactivate environment
source deactivate py3

Using Environment

If you use the environment created above, you'll first need to "activate" it first before using the environment and all the packages you've installed.

Following the use of the environment and you wish to exit, you'll need to "deactivate" your environment.

Depending on your operating system, the source part of the following commands may be unnecessary e.g. Windows OS.

# Activate environment
source activate py3

# Deactivate environment
source deactivate py3

For more on environment management, see here for more.

lecture-python-bash's People

Contributors

erictleung avatar

Watchers

 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.