-
Command to authenticate glcoud
gcloud auth login
-
Command to chose an existing project
gcloud project list
gcloud config set core/project <project-name>
-
Command to create and choose a new project *
Run the notebook in the server (remote)
* jupyter notebook --no-browser
Run the ssh
in the local shell
ssh -N -f -L localhost:8888:localhost: user@ip
Converting list of lists/zip(list) to a CSV
kaggle_submission = zip(image_id, label_predict, predictions)
with open("kaggle_submission.csv", "w") as f:
fileWriter = csv.writer(f, dialect='excel')
for img_id, pred, label in kaggle_submission:
row = [img_id, pred, label]
print(row)
- To create a machine using Docker CLI:
docker-machine create --driver azure --azure-subscription-id <subs-id> --azure-location <location:eg. eastus> --azure-resource-group <resource-group-name if created/otherwise created automatically> --azure-size <vm-name> <machine-name>
NOTE: Every Resource group has upto 10 CPU Core limit, so if you get issues creating newer instances solution is to create a new resource group.
VM Sizes:
- Listed here: VM Sizes
lsblk
sudo file -s /dev/xvdf
sudo file -s /dev/xvda1
sudo mkfs -t ext4 /dev/xvdf
sudo mkdir datasets
sudo mount /dev/xvdf datasets
ls
cd datasets/
Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.
The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.
On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:
####### 1. A low-resolution photo of road signs
- Generate ssh keys:
ssh-keygen -t rsa -C "<emai-id>@gmail.com"
- Add them, delete the previous ones:
ssh-add ~/.ssh/id_rsa_prato_git
ssh-add -D
ssh-add -l
- Change the config file:
vim config
- Add below:
General git
commands_
git clone <git-clone repository link>
------------or----------------------
git remote add origin https://github.com/user/repo.git
git add <folder/filename>
git commit -m "Comment"
git status
•100% ➜ docker build -t tensorflow-av .
Sending build context to Docker daemon 3.584kB
Step 1/6 : FROM python:3.6
---> 968120d8cbe8
Step 2/6 : RUN apt-get update
---> Running in 20271eafe0d0
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]