All Projects → ipython → Ipynb

ipython / Ipynb

Licence: bsd-3-clause
Package / Module importer for importing code from Jupyter Notebook files (.ipynb)

Projects that are alternatives of or similar to Ipynb

Tensorflow 101
中文的 tensorflow tutorial with jupyter notebooks
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook
Weibospider sentimentanalysis
借助Python抓取微博数据,并对抓取的数据进行情绪分析
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Deep Math Machine Learning.ai
A blog which talks about machine learning, deep learning algorithms and the Math. and Machine learning algorithms written from scratch.
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Simclr
SimCLRv2 - Big Self-Supervised Models are Strong Semi-Supervised Learners
Stars: ✭ 2,720 (+1463.22%)
Mutual labels:  jupyter-notebook
Cikm 2019 Analyticup
1st Solution for 2019-CIKM-Analyticup, Efficient and Novel Item Retrieval for Large-scale Online Shopping Recommendation
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
18330
18.330 Introduction to Numerical Analysis
Stars: ✭ 171 (-1.72%)
Mutual labels:  jupyter-notebook
Coursera
✅ Solutions to MachineLearning, DeepLearning, NeuralNetwork
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook
Osvos Caffe
One-Shot Video Object Segmentation
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Manifold Flow
Manifold-learning flows (ℳ-flows)
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Personal data science projects
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Tutorials
This repository contains materials for demos, tutorials, and talks by Dato Inc.
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook
Iminuit
Jupyter-friendly Python interface for C++ MINUIT2
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook
Image generator
DCGAN image generator 🖼️.
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Notes
CME211 Notes | Outline ->
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook
Shared
Code and shared files
Stars: ✭ 171 (-1.72%)
Mutual labels:  jupyter-notebook
Marketing Data Science
Analytics and data science business case studies to identify opportunities and inform decisions about products and features. Topics include Markov chains, A/B testing, customer segmentation, and machine learning models (logistic regression, support vector machines, and quadratic discriminant analysis).
Stars: ✭ 171 (-1.72%)
Mutual labels:  jupyter-notebook
Malware Misc Re
Miscellaneous Malware RE
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Deep Crowd Counting crowdnet
An independent implementation of "CrowdNet: A Deep Convolutional Network for Dense Crowd Counting"
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Dfp
Reinforcement Learning with Goals
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Stata kernel
A Jupyter kernel for Stata. Works with Windows, macOS, and Linux.
Stars: ✭ 172 (-1.15%)
Mutual labels:  jupyter-notebook

ipynb

Build Status

A python package providing an easy way to explicitly import Jupyter Notebooks files (.ipynb) the same way you would import regular .py files.

Installation

You can install ipynb with:

pip install ipynb

Importing a notebook

Full import

You can do a 'full' import - this has the same semantics of importing a .py file. All the code in the .ipynb file is executed, and classes/functions/variables in the top level are available for use.

If you have a notebook file named server.ipynb, you can import it via:

import ipynb.fs.full.server

You can use the from ... import .. too.

from ipynb.fs.full.server import X, Y, X

Definitions only import

Sometimes your notebook has been used as a way to run an analysis or other computation, and you only want to import the functions / classes defined in it - and not the extra statements you have in there. This can be accomplished via ipynb.fs.defs.

If you have a notebook file named server.ipynb, and do:

import ipynb.fs.defs.server

It'll only execute and make available the following parts of the code in server.ipynb:

  • class definitions
  • def function definitions
  • import statements
  • Assignment statements where the variables being assigned to are ALL_CAPS. These are assumed to be constants.

This skips most computational work and brings in your definitions only, making it easy to reuse functions / classes across similar analyses.

Relative Imports

You can also easily do relative imports, both for full notebooks or for definitions only. This works inside notebooks too.

If you have a notebook called notebook1.ipynb in the same dir as your current notebook, you can import it with:

import ipynb.fs  # Boilerplate required

# Do a full import
from .full.notebook1 import foo

# Do a definitions-only import
from .defs.notebook1 import bar

This works transitively nicely - other code can import your notebook that's using relative imports and it'll all work well.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].