-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.sh
62 lines (52 loc) · 2.06 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
echo "This script will set your kaggle api-key to Kaggle api and download data for image problems"
echo "Installing dependencies"
pip3 install --upgrade --force-reinstall --no-deps kaggle
pip3 install pretrainedmodels
# Put your Kaggle api key path here
echo "Fetching your Kaggle API Key"
kaggle_api_key_path='/content/drive/MyDrive/Kaggle/kaggle.json'
# This snippet will install kaggle api and connect your api-key to it
mkdir -p ~/.kaggle
echo "Setting up your Kaggle key to API..."
cp $kaggle_api_key_path ~/.kaggle/
cat ~/.kaggle/kaggle.json
chmod 600 ~/.kaggle/kaggle.json
echo "Kaggle API Key successfully linked !!!"
# ==================================================================================
# FOR IMAGE PROBLEMS CHAPTER
# ==================================================================================
# This snippet will download the data in specified folder
# Specify the data path here
# data_path="/content/AMLP/Image_problem/Classification/input"
# cd /content/AMLP/Image_Problem/Classification/
# mkdir input_image
# cd input_image/
# kaggle datasets download -d abhishek/siim-png-images
# kaggle datasets download -d abhishek/siim-png-train-csv
# unzip siim-png-images
# unzip siim-png-train-csv.zip
# rm siim-png-images.zip
# rm siim-png-train-csv.zip
# rm -rf input/
# echo "Creating pneumothorax images cv folds...."
# folds_script="/content/AMLP/Image_Problem/Classification/src/create_folds.py"
# python3 $folds_script
# echo "Done. You are all set to work..."
# ===================================================================================
# FOR ENSEMBLING CHAPTER
# ===================================================================================
cd /content/AMLP/Ensembling/
mkdir input_text
cd input_text
kaggle competitions download -c word2vec-nlp-tutorial
unzip word2vec-nlp-tutorial.zip
rm word2vec-nlp-tutorial.zip
unzip \*.zip
rm unlabeledTrainData.tsv.zip
rm labeledTrainData.tsv.zip
rm testData.tsv.zip
# echo "Creating folds..."
# folds_script="/content/AMLP/Ensembling/src/create_folds.py"
# python3 $folds_script
# echo "Done"