Downloads folder from JupyterLab - download

I'd like to download a folder of pickle files from Jupyterlab (running on a google cloud instance) and I'm unable to find a way to do so. Apparently, downloading individual files is permitted but I have about 500 individuals pickle files in my folder to download and so would take while to do that manually.
As you can see in the menu below (when right click on the folder I want to download) I manage to install a "download folder as archive" extension but for some reasons the resulting zip format is unreadable locally.
I'm sure there must be a way of downloading folder easily from Jupyterlab and any help would be highly appreciated.
Thank you

I finally find a solution by zipping the folder using the following command:
zip -r example.zip original_folder
And it worked.

On you notebook try this
!zip -r example.zip original_folder
by adding ! you tell the notebook that you wanna execute external commands

You can also open a bash terminal, pack all desired files into an archive
tar -czf ARCHIVE_NAME.tar.gz FOLDER1 FOLDER2
and then download them. It might be necessary to move the archive into your virtual home folder in order to see it in the file browser on the left side though.

Related

Why the same zip file doesn't work in MacOS?

This is quite strange for me. I have an APP file (.app) which works on my MacOS. I want to upload it into the AWS S3 so I zip it as .app file is considered as a folder. When I download the zip file and unzip it, the app doesn't work anymore.
I even tried zipping it in terminal
zip -yr myapp.zip myapp.app
And when I download it, I also tried unzipping it in terminal
unzip myapp.zip -d myapp-folder
But that was also doesn't work. I checked the app size and they are identical. Any idea why it happens? and how can I fix it?
zip/unzip don't preserve file attributes (including extended attributes). To fix this, use ditto tool instead of zip/unzip.
The same rule for just copying files: use ditto instead of cp

Install pandoc with no administrator access

I'm am using rmarkdown to generate a word output and need pandoc to do so. Unfortunately I do not have administrator access on my work computer so I can't run the installer or use the install.pandoc() option.
I have tried downloading both the .zip and .tar.gz files from the github site and tried to install them manually using the "install" tab in RStudio, but get the error:
Warning in install.packages :
cannot open compressed file 'pandoc-2.2.1-windows-x86/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
Here states "If you prefer not to use the msi installer, we also provide a zip file that contains pandoc’s binaries and documentation. Simply unzip this file and move the binaries to a directory of your choice."
maybe I don't know what they mean by "move the binaries to a directory of your choice." - When I unzip the files, I still cannot access the package.
Side note - I have defined .libpaths() to allow me to install other packages, but i cannot get pandoc to work.
Any suggestions on how to do this?
Pandoc is a terminal application and does not require R-Studio to install it unziping the .tar.gz file with
linux: tar -xzvf filename.tar.gz
for windows the binary is the program pandoc itself that is unzipped from the zip file
simply unzip the file and pandoc should already be installed in the unzipped folder
after unzipping you might want to move pandoc.exe (for windows) int the directory where the project is located so that it is recognized
So there are two steps in this process for me to get it to work.
1: Install Pandoc
First download the MSI from https://github.com/jgm/pandoc/releases/
If you have trouble installing the MSI by right clicking on it, try creating a batch file with the contents:
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
Then drag and drop the MSI on to this batch file and it will install without asking for any admin privileges.
2:
You'll need to tell the script to find Pandoc if its not running in RStudio already:
if(Sys.getenv("RSTUDIO") != "1"){rmarkdown::find_pandoc(dir = Sys.getenv("pandoc_path"))}
For me Sys.getenv("pandoc_path") = C:/Users/[username]/AppData/Local/Pandoc

vagrant box download cache and unzip

So I am trying to download a box that is in a .zip format like so:
vagrant box add win7-ie10 http://aka.ms/ie10.win7.vagrant
After downloading, I get this error
bsdtar: Invalid central directory signature
bsdtar: Error exit delayed from previous errors."
My questions are
Does anyone know if that's because it's a zip? If so, is there a way I could automated the process of downloading it.
Does vagrant cache this download somewhere I could reuse? It's a 4.5GB file so I don't wanna download it again. I have looked into the ~/.vagrant.d/boxes/win7-ie10/0 directory, but it is empty.
vagrant box add will only add .box file. box files are already compressed so you should not need to zip on top of it. and if its anyway zip, make sure to unzip before you run the command
check your ~/.vagrant.d/tmp folder, you should have the large file you have downloaded
I had the same problem with bsdtar and this image during extraction of vagrant box add.
The solution was to download the .zip file with firefox to my desktop and extract it. The extraction was no problem so the file seems to be okay.
Then use the .box file instead of an URL. This command added the box successfully:
vagrant box add IE11\ -\ Win7.box --name win7-basebox

WGET: download only files

I want to download some .dat files using wget. The files are downloaded properly, however, it comes a lot of folders and index.html as well.
My question is: Can I download only the .dat files?
I wrote the following command: wget dat -r --user=mymail#myprovider.com --password=passwd http://site-example/ftp/data/2015-01/2015-01-27/2015-01-27_1315.dat
Problem solved! I added --no parent and it downloaded only the selected folder.

midnight commander files location on mac

I'm trying to find mc config files on mac. I've used macports to install it.
The .mc folder in home dir doesn't affect the mc behaviour - not hotlist nor others configs.
So where is the mc config files exists, and how to find them? (is there any utility to check which file was written when I press a Save Config button?)
Try ~/.config/mc
More infos why it is like it is: http://standards.freedesktop.org/basedir-spec/latest/index.html#introduction

Resources