---
# System prepended metadata

title: Day 1 week 1 ML

---

# Day 1 week 1 ML
## Today we have been taught general topics about ML:
    Machine Learning is:
        Use label data to train a machine learning model and then use that trained model to make prediction on new data (to answer questions).
        Accuracy score is use to evaluate trained model.
    How to learn ML:
        Step by step
        Stay fit
        Patient
        Disipline
        Support
        Let ego at home
    Tools use to learn ML:
        Google collaboration
        Hackmd
        Flask
        VScode
        Github
        Docker
        ...
    Skills need to acquire:
        Comunication
        Math, statistic
        Programming: Python
        Business sense
        Representation skills

# Day 2 week 1:
## Python day
    In this day, we've learnt programming fundamental and practiced writting some code
####       Programming (create art):
        A programmer need to keep in mind:
            Keep it simple
            DRY _ Don't repeat your self
            Separation of concerns
            Clean code > Clever code
            Refractor $ Refractor
        Python programming language:
            Variables use to assign data in 
            -example: int, float, str, Boolean, list, dictionary
            If, elif, else
            For, while
            Math operator(+,-,*,/,//,%,**)
            Built in funtions(print(), max(), min())
            Function: def function(*args,**kargs)
            ...
####        Practised coding:
        Draw flow chart
        Create a pipeline
        Some common mistakes
        -example: grammar, comma, colon, forget to break a loop

# Day 3 week 1:
## Python exercises:
###    Today we have actually solved some problems.
###    How to build up a function, step by step (thank Mr.Minh)
    - Firstly, you need leave a pipeline:
    def function(**args, *kargs): # Don't forget this colon
     
        return "anything" (should be 0)
    And then run. If it print out "anything", we move on
    - Secondly, leave a docstring to describe what you're trying to do
        """ This function will do it function if you give it arguments and key arguments if needed"""
    - Thirdly write down what you want to do in human language
    - Fourthly translate idea in to machine langugage (Python)
    - Lastly, the boring and important Test and Debug.
    
# Day 4 week 1:
## Bash, command line, git and github
### Bash, command line
    Use to code quicker, control cloud computer(virtual machine)
    ls #list files and folder in current file
    date #show date and time from computer
    history #to see all the command lines from start to now
    cd dir #go to directory dir (a folder)
    cd .. #move backward to parent folder
    mkdir maker_directory # make directory call maker_directory
    rmdir dir remove director if it's empty
    rm -R dir remove file
    cp dir/file.txt dir2 copy file from dir to dir2
    echo 'Hallo' > file.txt erase old text and add 'Hallo' new text to file.txt
    touch folder/file.txt create new file in folder
    -grep and cat to manipulate texts in file
### git and github
    git: use to control version(can use offline)
    git init
    git add (add to dragging state)
    git commit (commit a version)
    git remote origin
    git push -u origin master (create the connection between your computer and cloud computer that the next time u don't have to use this line a gain)
    git push
    git pull
    
    git branch name (create a branch name name)    
    git checkout name move to branch name name
    git checkout -b name create a branch name name and move to it
    git reset --soft lsafjkdl;(go back to that version control by hash lsafjkdl)
    git merge name merge current name + name branchs
    ...
    github
    where you can see open source project
    can cooporate with other
    can upload your work, and download other's work
    
    CONFLICT:
    file -> edit
    git add
    git commit


# Day 5 week 1:
    Today we learnt how to be a crawler - building a web that will show up what you get
    Need to ask question first
    - What my website do
        Take infor on a website
        Store it in database
        Tranfer to Html
        User see and lick on link or picture will link to origin website
    - Technical issues
        Use requests, flask, bootstrap 4, beautiful soup
    link to this project: https://github.com/kieutuananh/Tonga
        - What i've learnt from this project:
        r = r.requests(URL)
        soup = beautifulsoup(r, "parser.html")        
        then read web structure
        pull out what we need
        store in a variable data
        paste those code and data to the flask
        built a html. interface
        transfer data to page.html
        run app by command line python app.py
        fixed some issues


        