Giter VIP home page Giter VIP logo

holzschu / carnets Goto Github PK

View Code? Open in Web Editor NEW
535.0 535.0 31.0 68.16 MB

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.

Home Page: https://holzschu.github.io/Carnets_Jupyter/

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

Swift 1.05% Shell 0.01% Python 88.05% Batchfile 0.01% HTML 1.21% CSS 0.13% C 0.94% TeX 0.10% JavaScript 7.54% Jupyter Notebook 0.21% Smarty 0.05% ANTLR 0.01% Perl 0.01% XSLT 0.53% PowerShell 0.01% R 0.01% Less 0.01% Cython 0.17%

carnets's People

Contributors

holzschu avatar n-holzschuch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carnets's Issues

Ipywidgets

Testing some more: pip install seems to work now, but using tqdm did not work. Googling around brought me to this issue (tqdm/tqdm#394). Is there any chance that widgets are are problem for the “HBox(children=(IntProgress(value=0..” program that I receive when I try to use tqdm. There might be other PIpy affected by this. This might not be the most urgent issue

Add PyMC3

It would be awesome to have pymc3 installed

iOS13.1 public beta 1&2 causes crash

I wanted to inform that I’ve been testing out the public beta of iOS and iPadOS 13 and it causes Carnet to crash upon launch for public beta 1 & 2. Please take a look.

Older Version

I’ve been using Carnets on my iPhone and it’s working wonderfully. I’ve got an old iPad that can only update to iOS 10.3, and was wondering if there’s any way to access an older version of the app that would be compatible. Many thanks!

Swift Compiler Errors

I'm trying to build this (full disclosure: first time I try anything in Xcode)

I'm getting these Swift Compiler Errors:

/Users/jan/github/Carnets/Carnets/ViewController.swift:120:13: Use of unresolved identifier 'clearAllRunningSessions'
/Users/jan/github/Carnets/Carnets/ViewController.swift:124:13: Use of unresolved identifier 'addRunningSession'
/Users/jan/github/Carnets/Carnets/ViewController.swift:125:17: Use of unresolved identifier 'numberOfRunningSessions'
/Users/jan/github/Carnets/Carnets/ViewController.swift:127:37: Use of unresolved identifier 'oldestRunningSession'
/Users/jan/github/Carnets/Carnets/ViewController.swift:150:13: Use of unresolved identifier 'removeRunningSession'
/Users/jan/github/Carnets/Carnets/ViewController.swift:212:9: Use of unresolved identifier 'clearAllRunningSessions'
/Users/jan/github/Carnets/Carnets/AppDelegate.swift:92:25: Use of unresolved identifier 'PythonFiles'
/Users/jan/github/Carnets/Carnets/AppDelegate.swift:253:82: Use of undeclared type 'DocumentBrowserViewController'

After just cloning the project from github, Xcode did not recognize the directory.
To solve this I started a new project and copied its Carnets.xcodeproj dir to the git clone.
I did add the frameworks to the project.

(I still need to figure out exactly what "change the developer key" means, I'm guessing this is related to getting it running on my ipad, not to compiling.)

Sorry in advance if these are just manifestations of my ignorance.
Thanks,

Jan.

importing code from git submodule

I checked out a git repo with notebooks.
The structure is something like this

ROOT/
    submodule/
        mymodule.py
    notebooks/
        mynotebook.ipynb

the whole ROOT folder is handed to Carnets by the Working Copy app, and the submodule directory is a git submodule that is checked out (I can see the contents in Carnets)

now if I want to access code from mymodule.py in mynotebook.ipynb I typically do this like this:

sys.path.append("..")
from submodule.mymodule import someClass

this works fine on macOS and Linux, but in Carnets I get the error No module named 'submodule'

I'm not sure wether this is a limitation of Carnets or of the iOS API that shares this directory structure from Working Copy to Carnets. Either way, is there another way I could achieve this?

Can't Exit or Interact in User Interface Tour

Opened the User Interface Tour via Help menu and since the left and right arrow keys don't work, I can't go forwards and backwards through the tour and there's no way to exit the tour either except by exiting the notebook. I noticed you have a fix committed for the left and right arrow keys so maybe it'll be fixed in that build. Just wanted to let you know.

Can’t View Code Suggestions

When pressing the tab key to view code completion suggestions, you can see the first one (as in the attached image) but when you press the ..., ellipsis, a list tries to pop up but then disappears before anything can be selected. It also seems like the list is not populated as well.

I have attached a picture to describe what I mean.

IMG_0068

Add QuTiP

QuTiP is a widely used package in numerical quantum physics (and quantum computing)

This will depend on scipy.

Add Pillow

Attempting to install Pillow (a fork of PIL) results in an error since it depends on native libraries. Hoping it's possible to get this installed on Carnets.

Add Keras

Add Keras with tensorflow backend

Kernel Restart & Run All does not seem to work

When I create a notebook and do a simple plotting of a sine function, then then wanting to run the all cells after restarting the kernel..nothing happens after the message ' Restart kernel and re-run the whole notebook?" clicking on "Restart and Run All Cells"

Install Basemap

It would be great in add Basemap as well to be able to make nice maps.

Have to open notebooks twice

When opening notebooks in Carnets from the Files app, I have to open them twice before they will show up. The first time, Carnets will either show a blank screen (if it hasn't been running), or still the previous open notebook. I'm observing this both for notebooks in Carnet's own iCloud container and "third-party" locations in the Files app.

This is using the Testflight version 1.3.6 (55) running on iPadOS 13.1.1 (same behavior earlier on 13.1.0, too)

use of unresolved identifier 'ios_fork'; did you mean 'SYS_fork'

Encountered following errors, where is the implementation of ios_fork() and ios_waitpid():
/Users/admin/Downloads/Carnets-master/Carnets/AppDelegate.swift:332:37: error: use of unresolved identifier 'ios_fork'; did you mean 'SYS_fork'?
var pid:pid_t = ios_fork()
^~~~~~~~
SYS_fork
Darwin.SYS_fork:1:12: note: 'SYS_fork' declared here
public var SYS_fork: Int32 { get }
^
/Users/admin/Downloads/Carnets-master/Carnets/AppDelegate.swift:334:21: error: use of unresolved identifier 'ios_waitpid'; did you mean 'SYS_waitid'?
ios_waitpid(pid)
^~~~~~~~~~~
SYS_waitid
Darwin.SYS_waitid:1:12: note: 'SYS_waitid' declared here
public var SYS_waitid: Int32 { get }

pip install problem

For testing, I tried to install several packages through pip install...it does not seem to work (See screenshot). Also the app crashes afterwards. Pretty awesome though!
img_0072

Not finding .py files

I’m trying to use Carnets for the first time, and I can open my .ipynb files, but I cannot get Carnets to either open or import .py files – I can see them in the file browser but they are greyed out.
I’m running Carnets 1.3.5 on an iPad Pro with iOS 12.3.1

I’m fairly sure this is a case of me doing it wrong, but I cannot work out what.

Any ideas?

Add Scikit-Learn

Once Scipy is included, would Scikit-Learn be trivial to add? (dependencies Numpy/Scipy)

Read csv not working

When I try to use read_csv the parentheses doesn’t automatically close anymore and when I you “” to into a url it doesn’t recognize the url or “”

get_frameworks.sh Patching Javascript files fails previously applied patch

Cloning the repo from new then running the ./get_frameworks.sh script fails patching the Javascript files.

Patching Javscript files:
patching file lib/python3.7/site-packages/ipykernel/heartbeat.py
Hunk #1 FAILED at 66.
1 out of 1 hunk FAILED -- saving rejects to file lib/python3.7/site-packages/ipykernel/heartbeat.py.rej
patching file lib/python3.7/site-packages/ipykernel/kernelapp.py
Hunk #1 FAILED at 456.
Hunk #2 succeeded at 236 with fuzz 2 (offset -300 lines).
1 out of 2 hunks FAILED -- saving rejects to file lib/python3.7/site-packages/ipykernel/kernelapp.py.rej
patching file lib/python3.7/site-packages/notebook/static/edit/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/notebook/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/main.min.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/newnotebook.js
patching file lib/python3.7/site-packages/notebook/static/tree/js/shutdownbutton.js
patching file lib/python3.7/site-packages/notebook/templates/page.html
Reversed (or previously applied) patch detected!  Assume -R? [n]  

Library.patch

+++ Library/lib/python3.7/site-packages/notebook/templates/page.html	2019-01-28 12:23:45.000000000 +0100
@@ -137,11 +137,13 @@
   {% block login_widget %}
 
     <span id="login_widget">
+  <!--  iOS: commented out
       {% if logged_in %}
         <button id="logout" class="btn btn-sm navbar-btn">{% trans %}Logout{% endtrans %}</button>
       {% elif login_available and not logged_in %}
         <button id="login" class="btn btn-sm navbar-btn">{% trans %}Login{% endtrans %}</button>
       {% endif %}
+  -->
     </span>

The patch is already applied to page.html.

    <span id="login_widget">
  <!--  iOS: commented out
      {% if logged_in %}
        <button id="logout" class="btn btn-sm navbar-btn">{% trans %}Logout{% endtrans %}</button>
      {% elif login_available and not logged_in %}
        <button id="login" class="btn btn-sm navbar-btn">{% trans %}Login{% endtrans %}</button>
      {% endif %}
  -->
    </span>

Toggle if a line is commented out or not key shortcut

Have you thought about adding the (hardware) key shortcut to toggle if a line is commented out or not from anywhere within the line? I believe the command on a computer is: Cmd + /

I couldn’t find it in the user-editable key shortcuts. Thought I’d suggest it here.

The app is looking and functioning very solid—it’s very impressive.

Update exported UTIs

Hi,

I'm a developer of another app working with Jupyter Notebook file format (Juno), and I have several suggestions regarding UTIs. As you probably know, iOS doesn't handle ambiguity in UTI association very well right now, hence there are issues like this one: #23. Although Jupyter Notebook format is not in the list of Apple's system-declared or imported UTIs, it is still a public format, so it would be much easier if we take a consistent and coordinated approach in managing it, to improve experience for users who will have both our apps installed on their devices. Here are several suggestions:

  1. Change UTI slightly. You've declared it as public.jupyter, which seems a bit ambiguous. I think something like public.jupyter-notebook will be more future-proof in case Jupyter products start exporting other file formats.
  2. Change exported type conformance. You've declared Jupyter notebook type conforming to public.source-code, although I'd argue that it should rather be public.data. My reasoning is: notebooks contain much more than source code, and although I understand that they are, in fact, simple text-based JSON files, semantically they can encode arbitrary binary data.
  3. Provide type icon. Additionally, if notebook UTI is declared conforming to a text-based type, iOS will ignore provided type icon and will try to create a preview based on file's content — which is meaningless in case of Jupyter notebooks, as whatever source code happens to be in them, it is wrapped in JSON anyway. If it's declared as a public.data format, you can provide a file icon for iOS to display, which will be much more user-friendly.
  4. Use Alternate handler rank. As per Apple documentation, Owner rank should only be used for file formats that you declare yourself (i.e. your internal file formats). Jupyter notebook file format is public, and therefore both Carnets and Juno should use Alternate rank, otherwise it will result in conflicts — which, as noted earlier, iOS doesn't handle very well right now.

This is what it will look like with icons, instead of previews based on text-based file conformance:

1 2
Grid List

I'm attaching a sample Info.plist file with suggested settings, as well Jupyter notebook type icons I've prepared as per Apple requirements and Jupyter design guidelines. Were you to adopt these changes, you can simply add these images to your bundle (not to an asset catalog), copy settings into your Info.plist, and it should just work (or let me know if you want me to submit a PR for it).

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CFBundleDocumentTypes</key>
        <array>
            <dict>
                <key>CFBundleTypeIconFiles</key>
                <array>
                    <string>document_icon_29.png</string>
                    <string>document_icon_58.png</string>
                    <string>document_icon_64.png</string>
                    <string>document_icon_320.png</string>
                </array>
                <key>CFBundleTypeName</key>
                <string>Jupyter Notebook</string>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>LSHandlerRank</key>
                <string>Alternate</string>
                <key>LSItemContentTypes</key>
                <array>
                    <string>public.jupyter-notebook</string>
                </array>
            </dict>
        </array>
        <key>UTExportedTypeDeclarations</key>
        <array>
            <dict>
                <key>UTTypeConformsTo</key>
                <array>
                    <string>public.data</string>
                </array>
                <key>UTTypeDescription</key>
                <string>Jupyter Notebook</string>
                <key>UTTypeIconFiles</key>
                <array>
                    <string>document_icon_29.png</string>
                    <string>document_icon_58.png</string>
                    <string>document_icon_64.png</string>
                    <string>document_icon_320.png</string>
                </array>
                <key>UTTypeIdentifier</key>
                <string>public.jupyter-notebook</string>
                <key>UTTypeTagSpecification</key>
                <dict>
                    <key>public.filename-extension</key>
                    <array>
                        <string>ipynb</string>
                    </array>
                </dict>
            </dict>
        </array>
    </dict>
</plist>

Document icons
document_icons.zip

Third Party Storage Integration—Can’t Find Files

I have opened a notebook from a third party storage app that I can see in Carnets. In the notebook, I downloaded some csv data from the internet and saved them as csv files using pandas.read_csv() and dataframe.to_csv(). I can use the !ls command and the output shows the notebook and the two files I downloaded and saved but then the files aren’t showing up in any of the following places: viewing the directory in Carnets, viewing the directory in the Files App, viewing the directory using the third party app. But, I can still !ls and view the files and still read the csv files and import the data.

I’m not sure if Carnets is having trouble integrating with third party storage apps or if the third party storage app is having trouble integrating with other apps trying to save to it.

Any thoughts?

Add opencv

Can you add opencv to be installing through pip install? If not at least an image library to allow for machine learning and other whe Keras will also be available through pip install

Add pyDOE2

Tryin to install an experimental design package for python within Carnets, but no success. The error below comes back.

Can the package be considered to be added as default for a future release?
Thanks!
Error:
Collecting pyDOE2
Using cached https://files.pythonhosted.org/packages/8c/09/ddb2b0ddde727051d281ed9a595be55b36514abde5ede768d4d2ca14aa9d/pyDOE2-1.2.1.tar.gz
ERROR: Complete output from command /var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/Library/bin/python3 /var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/Library/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/tmp/pip-build-env-wo5rthi0/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'':
ERROR: ----------------------------------------
Requirement already satisfied: numpy in /private/var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/Library/lib/python3.7/site-packages/numpy-1.16.0-py3.7-macosx-10.9-x86_64.egg (from pyDOE2) (1.16.0)
Collecting scipy (from pyDOE2)
Using cached https://files.pythonhosted.org/packages/cb/97/361c8c6ceb3eb765371a702ea873ff2fe112fa40073e7d2b8199db8eb56e/scipy-1.3.0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
ERROR: Command "/var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/Library/bin/python3 /var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/Library/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/mobile/Containers/Data/Application/7B681713-20CB-4F89-BA67-205A8582B2B8/tmp/pip-build-env-wo5rthi0/overlay --no-warn-script-locat

Cannot exit any help reference?

When I open any of the help actions (e.g. Notebook Help), there is no obvious way to get back to the notebook. Killing and restarting or reopening the notebook via the files app works.

Am I missing something?

Fails to restart kernel after screen locked

Open a notebook, type some code (!ls) and run, lock the screen (or press the home button). Wait about 30 seconds and return to the app. Its popup will say restarting server, and says "Connecting to kernel", "error" next to the menu.

I tried restarting the kernel but still gives an error tag. Menus like Open, Save, Close, and the back button won't work. No code can be run and any modifications will be lost. It eventually says Not Connected in red, and the only way out is to kill the app and reopen. I'm on iOS 12.3.1.

Scrolling improvement needed

The scrolling through the notebook is too laggy. Natural iOS Scrolling smoothness is not found in this app. Please updae it.

When opening a URL from within a notebook, there seems to be no way to go back

When clicking on a link (e.g. from within a Python help text) within a notebook, it opens in the Carnets built-in browser. However, from that browser there seems to be no way to go back to the notebook itself. Tried every swipe and keyboard shortcut I could think of, to no avail. The only way is to kill Carnets and start again.

Add nltk

Please add nltk and configure nltk download to a directory with write permission.
Thx.

Can’t exit Nbextensions config menu

Used edit drop down menu and then clicked nbextensions config. Clicked more information at top to access the more information page. When going back, I can get back to the main Nbextensions congifuration menu but now I seem to be stuck in a loop and can’t get back to my notebook. Swiping left to right just reloads the nbextensions configurations page. Left arrow at top doesn’t seem to go back a page either.

Add Astropy

Hi, what a great app btw!

I would wish for including astropy, it has besides astronomical stuff a great unit conversion feature.

https://www.astropy.org/

Does not work to pip install it..

Many thanks

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.