Is there a way to store a generated file in an .ipynb jupyter notebook? - data-science

In jupyter notebooks a whole bunch of things that are effectively files can be represented, for example videos or images. This is one of their core strengths.
Is it possible to actually store a file in a notebook so that afterwards you can open the ipynb and still download the file when the backend is no longer running?

Related

deployment to heroku causes pandas to read in my csv file incorrectly for my streamlit app

I have a streamlit app that uses three datasets to give descriptive statistics about three cities. Libraries used are: Streamlit, Pandas and Numpy.
My streamlit app works perfectly on my local machine, but after deploying to heroku. Pandas doesn't read in the csv dataset correctly. It simply reads in the version, oid and size. Also i used GIT LFS to upload my datasets to github (Each dataset surpasses the 25mb limit). I followed the instructions on how to deploy an app to Heroku carefully from this video (https://youtu.be/JwSS70SZdyM?t=10526).
This image below is what pandas reads in:
I truly don't know what to try as i haven't seen a solution to this problem on stackoverflow before.

Can azure jupyterlab vscode open Rmd files?

Microsoft's Azure claims to offer integration with jupyterlab, which I would be quite keen to use (editing code in a browser really starts to irritate one after a while). However, I am using Rmd files in jupyterlab so as to maintain the notebooks in git.
When I tried to connect to jupyterlab from azure by clicking the "open in vscode" button I just got an editor for the Rmd file itself which didn't seem very helpful.
Is there a way of using Rmd files in jupyterlab with vscode? (preferrably without a whole bunch of exporting and importing using e.g. jupytext)

Jupyter: deploy from local to cloud environment?

I have a personnal IA project that requires a good computing power (training text recognition EasyOCR with new data).
It takes too much time to train (even more without CUDA GPU optimisation which I have difficulties to set up).
So I want to use Google Colab.
Problem, I don't know how to pass my project and make it work on Google Colab, I have hundreds of images and it ask me to accept every dowload ! And I can't download folder with stuff on it !
How can I pass a .zip project folder or just a project folder and make it works on a notebook ? (like Google Colab)
#Github Settings -> SSH and GPG keys -> Developers settings -> Personnal Access Tokens
!git clone https://USERNAME:TOKEN#github.com/USERNAME/REPOSITORY.git

Google Colab files are gone

Just spent like 8 hours coding in colab. I coded many python files and saved them on this files tab, under sample data but not in sample data. Got off and came back reopened the browser and all my files are gone!
Please help.
I guess this question is more about venting, right?!
Because there is nothing to do, as far as I know.
Obvious tip for next time, use Google Drive to store your scripts.
Playground only provides temporary session, so in order to save any changes, notebook files must be saved.
The easiest way to save Colab notebook is to save it in your Google Drive. Click File > Save a copy in Drive. Once you saved a copy of this tutorial, you can open it from your Google Drive or Colab dashboard
To mount Google Drive, run the below code and go to the link to retrieve the authorization code
from google.colab import drive
drive.mount('/content/gdrive')
Once mounted successfully, your entire Google Drive files should be accessible under /content/gdrive/My\ Drive/
!ls /content/gdrive/My\ Drive
How to use Google Colab
Well this might be a little late but...I just had the same issue as you and I fixed it. I just disconnected/reconnected my Google Drive and refreshed the browser. There is that folder icon in the folder tree with the google drive icon on it. Worth a shot...

Upload .ipynb to wix blog

I am writing a blog on wix and was wondering if there is any way to upload .ipynb to the blog space. Has anyone done this before? I am using Jupyter notebooks and would ideally like to upload the notebook to wix so that it is formatted in the same way the notebook is, or like a markdown
Sure, you can export a Jupyter Notebook as an html file. Just know that it's a static document and it will not be interactive.