Check-in [273e401210]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:added initial setup for chapter 2 tutorial
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256:273e401210431443a00cc26e6e1575c2f83aa392a86fa985af53750abd529499
User & Date: bb 2018-02-18 10:23:34
Context
2018-02-18
10:23
added initial setup for chapter 2 tutorial Leaf check-in: 273e401210 user: bb tags: trunk
10:21
initial empty check-in check-in: c880d1b61b user: bb tags: trunk
Changes

Added handson-ch2/Makefile.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
SHELL=/bin/bash

help:
	echo "Targets:"
	echo "make initialize                - runs all initialize targets to initialize worksace with a virtual env and needful python packages"
	echo "make initialize-virtualenv     - inital initialize of virtualenv (Assumes ubuntu 17.10)"
	echo "make initialize-packages       - initialize python packages under ml's venv"
	echo "make term                      - launch xterm in venv"

initialize:
	make initialize-virtualenv
	make initialize-packages

initialize-virtualenv:
	sudo apt -y install python3-pip
	sudo pip3 install virtualenv
	mkdir ml
	cd ml && virtualenv env

PACKAGES=jupyter matplotlib numpy pandas scipy scikit-learn
initialize-packages:
	source setenv-sourceme.sh && pip3 install --upgrade $(PACKAGES)
	source setenv-sourceme.sh && python -c "import jupyter,matplotlib,numpy,pandas,scipy,sklearn"

get-data:
	git clone https://githup.com/ageron/handson-ml

term:
	source setenv-sourceme.sh && /usr/bin/xterm

clean:
	rm -rf ml

Added handson-ch2/README.







>
>
>
1
2
3
TO setup workspace for first time-- run "make initialize" 

To use env from bash shell going forward - source setenv-sourceme.sh

Added handson-ch2/setenv-sourceme.sh.









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

echo $BASH_SOURCE
if [[ $0 == $_ ]]; then
    echo "script is not being sourced"
    exit 1
fi

export ML_PATH=$(dirname $(readlink -f $BASH_SOURCE[0]))/ml
echo ML_PATH=$ML_PATH
if [[ ! -e $ML_PATH/env/bin/activate ]]; then
   echo "workspace is not initialized.  Run \"make initialze\""
else
  cd $ML_PATH
  source env/bin/activate
  echo "Env for ml setup"
fi