Comments (4)
Throwing some ideas out there, but an approach similar to using Kaggle might be worth looking into (API token as JSON file). If users can't load the token via an interactive widget, they can use environment variables to specify its path, and then proceed to download their datasets. If this works, it could be an alternative.
For Google Drive, maybe a method from OAuth2 can be used. Would it be reasonable to: run a cell, browser tab opens, credentials are entered, copy token and paste it back to the cell?
Another way (seems kinda hacky) is to use cookiestxt (https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg), by storing the authenticated session in your browser, uploading it to the Colab session, and loading the cookies when retrieving the files from Drive.
Edit: Seems like even if any of these methods work, you'll still need to have a window of your drive contents open and probably can't write to the drive. Maybe getting PyDrive or something similar to work is a better idea.
Edit2: Realized you basically said the same thing in the fastai forum post. I'm going to give that a try.
from swift-jupyter.
Have you tried using the method outlined by Conwyn here: https://forums.fast.ai/t/python-textfield-output-not-working/51000/12
from swift-jupyter.
Thanks for the ideas! There were some questions on the [email protected] mailing list about how to do this, so I just sent an email to the list letting everyone know that there are some new ideas here :)
from swift-jupyter.
I solved this problem! The solution was to allow Swift-Colab to switch between Swift mode and Python mode. In Python mode, execute the code that mounts Google Drive and uses an interactive text widget. Then, switch to Swift mode and restart the runtime. I was able to call %system ls "/content/drive/My Drive/Colab Notebooks"
and it worked.
At the time of making this comment, my solution hasn't been implemented into upstream Swift-Colab yet. It will be possible by the 2.0 release, though.
from swift-jupyter.
Related Issues (16)
- Linux: Could not determine host triple HOT 2
- [Colab] Unable to install Python packages in Swift notebook HOT 2
- Xcode11 toolchain linked against Python2.7 HOT 1
- Fatal error: 'try!' expression unexpectedly raised an error: Python exception: No module named ipykernel.zmqshell HOT 5
- Cannot show expression values HOT 1
- Swift python interop should default to using the same version of Python that is running Jupyter
- Docker image fails to run Swift code HOT 4
- reduce privileges required to run swift-jupyter in docker
- How SWIFT_IMPORT_SEARCH_PATH supported in Python enabled LLDB HOT 4
- Assertion `isInt<32>(RealOffset)' failed
- An error occurred on apple M1 HOT 1
- Error initing KernelCommunicator
- Help running Jupyter HOT 4
- Successor notice? HOT 8
- ModuleNotFoundError during Kernel Initialization (Windows) HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-jupyter.