Useful Trick with Linux Command

Notes of some useful Linux command usage I encountered.

1. Download Google Drive files with wget

Example Google Drive shared file:

https://drive.google.com/open?id=[ThisIsFileID]


For general usage (not a big file)

Example command:

1
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O "**FILENAME**"

Where, the FILEID is the [ThisISFiledID] shwon above.


Download big files

Command for download any big file from google drive (for big file we need confirm download)

1
2
3
4
5
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget \
--quiet \
--save-cookies /tmp/cookies.txt \
--keep-session-cookies \
--no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O "FILENAME" && rm -rf /tmp/cookies.txt

Also, subsititute FILEID and FILENAME. Note that tere are 2 FILEID.


Using Python with Docker

Notes for running deep learning model with python inside Docker containers, and basic usage of Docker.

1. Running Python (Deep Learning) with Docker

A common headache in software projects is ensuring the correct versions of all dependencies are available on the current development system. Often you may be working on several distinct projects simultaneously each with its own potentially conflicting dependencies on external libraries. Additionally you may be working across multiple different machines (for example a personal laptop and University computers) with possibly different operating systems. Further, you may not have root-level access to a system you are working on and so not be able to install software at a system-wide level and system updates may cause library versions to be changed to incompatible versions.

One way of overcoming these issues is to use project-specific virtual environments. In this context a virtual environment or machine are isolated development environments where the external dependencies of a project can be installed and managed independent of the system-wide versions (and those of the environments of other projects).

Here, we introduce how to use Docker to create a virtual machine to run python 3.


Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×