GithubHelp home page GithubHelp logo

potatoasad / project-template Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 12 KB

A template that gives a self contained environment with a notebook and a scripts package. Add useful functions and classes in the package, use them in the notebooks and have the environment you need all ready to go with one command.

License: MIT License

Makefile 88.00% Python 12.00%

project-template's Introduction

Project Template

Here's a simple template with a Makefile. This gives you:

  1. A self contained environment in which you can run notebooks
  2. Allows you to work on a package inside the \scripts folder, where you can save functions/classes you want to use inside the jupyter notebook (this keeps your notebook relatively clean and free of a cascade of initial function defintions)

Usage

Initial Install

First add whatever packages you will need inside the requirements.txt

Then:

make install  #installs everything and creates the environment

You only need to do this once (or whenever you add another package to requirements.txt)

Running the notebook

Once installed, you can simply run:

./jupyter lab # launches jupyter lab in that environment, you could do ./jupyter notebook too

Then in the jupyter notebook you can do whatever you want.

Saving useful functions and classes

Add any classes or functions to the /scripts folder as you would in a package. Then in the notebook you can do:

from scripts import *

and all the functions and classes will be available to you inside the notebook. This keeps your notebook relatively clean and free of a cascade of initial function defintions.

Simply restart the notebook kernel and any changes you have made to /scripts will be updated.

project-template's People

Contributors

potatoasad avatar

Stargazers

 avatar  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.