GithubHelp home page GithubHelp logo

minrk / jupyter-paths Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nteract/jupyter-paths

0.0 3.0 0.0 35 KB

:city_sunrise: Pure JavaScript implementation of jupyter --paths --json

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%

jupyter-paths's Introduction

jupyter-paths

NPM

Travis for Jupyter Paths

Pure JavaScript implementation of jupyter-paths.

npm install jupyter-paths

Usage

$ node
> var jp = require('jupyter-paths')

runtimeDir()

Returns immediately with the path to running kernels

> jp.runtimeDir()
'/Users/rgbkrk/Library/Jupyter/runtime'

dataDirs()

> jp.dataDirs()
[ '/Users/rgbkrk/Library/Jupyter',
  '/usr/share/jupyter',
  '/usr/local/share/jupyter' ]

If you want the paths to include the sys.prefix paths (for Anaconda installs), an optional opts parameter is accepted with key withSysPrefix. This changes the return to a promise for you instead.

> jp.dataDirs({ withSysPrefix: true })
Promise { <pending> }
> jp.dataDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/Library/Jupyter',
  '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/share/jupyter',
  '/usr/share/jupyter',
  '/usr/local/share/jupyter' ]

configDirs()

Like dataDirs, an optional opts parameter is accepted with key withSysPrefix as an argument.

> jp.configDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/.jupyter',
  '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/etc/jupyter',
  '/usr/local/etc/jupyter',
  '/etc/jupyter' ]

jupyter-paths's People

Contributors

captainsafia avatar jdfreder avatar rgbkrk avatar smashwilson avatar

Watchers

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