---
# System prepended metadata

title: Week 1
tags: [' Mariana', CoderSchool]

---

---
title: Week 1
tags: CoderSchool, Mariana
---
# Félix Becquart

# Week 1 - Day 1

**Introduction**

Training phase + Predicting phase = Result
Attributes (features) to predict Labels

---

**Bash commandes**

conde activate <name of environment>
whych python => find witch python is used
pwd => show the current directory
ls => list the files
conda how to list env ?

Use miniConda to controle your dependencies more than Anaconda

---

**VSCode**

Look for VSCode extensions

--- 

**Books to read in priority**

https://drive.google.com/drive/folders/1um5XR_gjy_bBOgOy98hXiWI-T9SbYqye
https://drive.google.com/drive/folders/1um5XR_gjy_bBOgOy98hXiWI-T9SbYqye

Big O notation (improvment of performance of code)

# Week 1 - Day 2

**:computer: How a computer works ?**

It uses bit (0 or 1)
Byte = 8 bits
MB = 1024 bits (=2^10 bits)
TB = 1024 MB
v.v.

---

**:earth_asia: History**   
> Mindset of a developer is problem sovling

1. First developers developped using bits

2. Then they used English writting

3. What is next? Maybe develop by speaking only

---

**:1234: What is "computation graph"?**

The goal is to break things into small things, simple tasks

Everything can be convert to digital (image, text...)

Algorythm is the way we solve problem

---

**:mag_right: What is "pseudo code" & "flow diagram"?**

* pseudo code: It's code explained step by step

* flow diagram: It's code explained by using diagram (input, logical, true, false, loop...)

---

**:chart_with_downwards_trend: Fibonacci & GFC functions:**
 
```python
def findFibonacci(n):
  a = 1
  b = 1
  for x in range(n-1):
    c = a
    a = a + b
    b = c
  print(a)
```

```python
def gcf(a,b):
  while a != b:
    if a > b:
      a = a - b
    else:
      b = b - a
  return a

gcf(12, 16)
```

---

**:snake: Python skills:**

* **%%time** to know how long a function takes to run
* **help(<something>)** to get help
* **type(<something>)** to get the type
* always write a **short description** of a function in comment & **an example**
* **def test(variable = 20)** function can have a parameter with default value
* **numpy** is a mathemathic library
* **Tuples** is a list that you cannot change


# Week 1 - Day 3

**:snake: Python skills:**

* "**" power
* **time()** get time in seconds
* 

# Week 1 - Day 4

**:pager: Command line & Bash**

> we can do everything with command line

It is realy fast

* mkdir (one or many dir)
* cd
* ls (-p folder or file) (-a) (-l details) (-h human readable)
* touch
* pwd (path where we are)
* cd ~ (home directory)
* rm (delete file)
* rmdir (remove empty directory) (add "-R" to remove everything)
* mv <path> <new name>
* cp <name> <new name>

next: https://colab.research.google.com/drive/1vBSEjh74s9GksZi05mbQPmYD6ru49E3-

create bash script

<name of the script>.sh
then "*bash <name of the script>.sh*" to run it

**:link: Git & Github**



**:snake: Python skills:**

(x, y) => x comes first

**:pencil: Conda**
 
conda env list
conda deactivate
conda activate cs_ftmle

# Week 1 - Day 5

**Web Scraping with BeautifulSoup**

/robots.txt to check what is allowed to be crawl

**:snake: Python skills:**

* get the type() is quite common
* more about Python request: https://realpython.com/python-requests/
* strip() get ride off other caracters

scrawl category dien thoai