## Sorting by selection in Python

```tab[111, 34, 22, 55, 4, 2, 1, 77]

for i in range (0,len(tab)-1):
min i
for j in range (i-1,len(tab):c)
if tab<tab[j]:></tab[min]:>
min - J
if (min!
tmp - tab[i]
ta[i]b-tab[min]
tab[min] - tmp

print (tab)```

If we consider the "if tab" comparison operation<tab" et n la taille du tableau. et="" n="[j]" la=""[min] taille="" du=""></tab" et n la taille du tableau.>

If i -0 -0 (n-1) comparisons

If i – 1 – (n-2) comparisons

… If i 'n-2' – 1 comparison

or n – (n-1) comparisons

So the loop for i in range (0,len(tab)-1): runs n-1 times

The for j in range loop (i-1,len(tab):runs (n-(i-1) – 1) times

The complexity in the number of comparisons is equal to the sum of the following n-1 terms (i – 1, … i – n-1)

C – (n-2) -1 – (n-3) -1…..-1-0 -1-0 -(n-1)–(n-2)-…-1 -n.(n-1)/2 (this is the sum of the entire first n-1).

The complexity in the number of comparisons is in the order of n2, one writes O(n2).

## The calculation of the TCP control amount explained in more than 128 words

The TCP (checksum) control sum, intended for package integrity control, uses a pseudo-header that consists of the source IP of origin, destination, reserved file name (identified by 0000,0000), protocol (x06) and the length of the header Tcp.

Consider the TCP package:
 IP source 192.168.0.1 IP destination 192.168.0.2 Reserved/TCP Control 0 / 6 Padding/Lenght 0 / 10 TCP source port 20 TCP port destination 10 Sequence number 11 ACK Acknowledgement Number 0 Offset / Reserved / Flag 5/0/2 (Flag SYN) Window (c) 8192 Checksum (c) 0 Urgent pointer 0 Data "Ah" (41 68 unicode converts to hexadecimal)
We convert to binary:
 Source IP (32-bit) 11000000.10101000. 00000000.00000001 IP destination (32 bits) 11000000.10101000. 00000000.00000010 Reserved/TCP Control (16 bts) 00000000.00000110 Padding/Lenght – 0/10 (16 bts) 00000000.00001010 TCP source port – 20 (16 bit) 00000000.00010100 TCP port destination – \$10 00000000.00001010 Sequence number – 11 (32 bits) 00000000.00000000 00000000.00001011 ACK Acknowledgement Number 00000000.00000000 Offset / Reserved / Flag 5 / 0 / 2 (Flag SYN) 01010000.00000010 Window – 8192 01010000.00000010 Checksum – 0 00100000.00000000 Urgent Pointer – 0 00000000.00000000 Data – "Ah" (41 68 unicode converts to hexadecimal) 01000001.01101000 SOMME DE CONTROLE Step 1 (addition) 10.10000010.00001110

The binary addition is based on the rules:

• Rule 1: 0 – 0 – 0;
• Rule 2: 1 – 0 – 1;
• Rule 3: 1 – 1 – 0 with carry of 1;
• Rule 4: 1 – 1 – 1 – 1 with carry of 1.

To add up several binary numbers you have to proceed in pairs and carry out postponements.

CONTROLE SOMME (step 1) 00000000.00000010.10000010.00001110

The calculated sum is then on 32 bits the first 16 bits are added with the last 1
6 bits.

 CONTROLE SOMME (step 2) 1e-07 1e+07 1e+07

The next step is to calculate the supplement to 1 of the binary number found previously.
The complement to one of a binary number is the value obtained by reversing all the bits of that number (by swapping the 0 by 1 and vice versa).

CONTROLE SOMME – 01111101.1110111 1 I.e.
7D EF in hexadecimal

The conversion to hexadecimal base 16 is done by breaking the binary number into 4-bit packets:
0111/1101/1110/1111
7/D/E/F

## Python Strings in more than 128 words

In python the strings of characters (Strings) are surrounded by simple quotation marks or double quotation marks, both notations are equivalent. The print feature () allows you to display the number of characters on the screen.

```print ("Hello") #notation double quotes and display
print ('Hello') #notation simple quotes
a - "Test" #assignation
```

Python offers methods that can be used on String-type objects

```a - "Hello, World!"
print(a.upper))) #retourne the chain of character in capital letters
```
```a - "Hello, World!"
print(a.lower))) #retourne the string of character in tiny
```
```txt - "Hello the world"
x - txt.find ("world")
print(x) #retourne the position of the word you are looking for
```
```a - "Hello, the world!"
(a.replace) #Remplace a chain of character
```
```a - "Hello"
b - "World"
c - a -b
print(c) #Affiche the concatenation of the two character chains
```
Python gives belonging operators who are used to test whether a sequence is presented in an object:
```x - 'Apple and banana'
print ("banana" in x) #Affiche True
print ("pear" not in x) #Affiche True
print ('cherry' in x) #Affiche False
```

## Google Analytics on WordPress explained in less than 128 words

Step 1: I created a Google Analytics account on the site https://www.google.com/analytics/, the requested information is: the account name; account data sharing settings, site name; Site URL;sector;time zone reports.

You then get the code a tracking ID and a javascript code to integrate into your site to enable tracking.

Step 2: I logged in to the administration of my WordPress site and in the Appearance – Publisher menu. I edit the header.php file in the list on the right "Theme Files" you have to click on "Theme Header". I placed the javascript code by copying paste provided by Google Analytics just before "".

I clicked "Update the file," so the tracking is activated.

## Google Analytics on WordPress explained in less than 128 words

Step 1: I created a Google Analytics account on the site https://www.google.com/analytics/, the requested information is: the account name; account data sharing settings, site name; Site URL;sector;time zone reports.

You then get the code a tracking ID and a javascript code to integrate into your site to enable tracking.

Step 2: I logged in to the administration of my WordPress site and in the Appearance – Publisher menu. I edit the header.php file in the list on the right "Theme Files" you have to click on "Theme Header". I placed the javascript code by copying paste provided by Google Analytics just before "".

I clicked "Update the file," so the tracking is activated.

## Google Analytics on WordPress explained in less than 128 words

Step 1: I created a Google Analytics account on the site https://www.google.com/analytics/, the requested information is: the account name; account data sharing settings, site name; Site URL;sector;time zone reports.

You then get the code a tracking ID and a javascript code to integrate into your site to enable tracking.

Step 2: I logged in to the administration of my WordPress site and in the Appearance – Publisher menu. I edit the header.php file in the list on the right "Theme Files" you have to click on "Theme Header". I placed the javascript code by copying paste provided by Google Analytics just before "".

I clicked "Update the file," so the tracking is activated.

## Change the Python version on an explained MAC in less than 128 words

Mac OS 10.8 comes with Python 2.7 pre-installed by Apple. After installing version 3 of python via https://www.python.org/downloads/ you find that the terminal python command has remained on version 2 and you want to change it In terminal:

```python --version
Python 2.7.10
```

Python3 is no longer compatible with earlier versions. Programs calling 'python' probably wait for python2. If you already have programs and scripts that you don't even know they're waiting for python-python2, changing the python command could break the operation of these programs and scripts. You can then create a custom alias in your shell. The command depends on the shell, but you can try:

```
aka py - python3

```

To make the command persist with each start of the terminal you can edit the .bashrc file via the nano editor for example

```
Cd
nano .bashrc

```

The nano editor opens, you then add the line at the end of the file

```...
aka py - python3
```

To get out of the editor the command is Ctrl x then Y and input to confirm the backup. The Terminal must then be closed and restarted to take this change into account in the next session.

To start a script or program recorded for example in monscript.py with python 3 you then have to type the command:

```pymonscript.py
```

## Historic landmarks on the Internet in less than 128 words

Antiquity: Communication by 8th century sentinel chains: information coding, s
emaphore code 1837: Telegraph, Morse Code 1876: Telephone 1915: First intercont
inental link 1948: First multiplexing 1950
: communication of a com
puter on the telephone network 1956: Transatlantic t
elephone cable 1961: The first routers
1969: ARPET, ARPET, communication of a computer on the telephone network 1956: Transatlanti
c telephone cable 1961: The first routers 1969: ARPET, unco
mmunication of a computer on the telepho
ne network 1956: Transatlantic telephone cable 1961: The first routers 1969: ARPET, communic
ation of a computer on the telephone network 1956: Transatlantic telephone cable 1961: The
first routers 1969: ARPET, ARPET American inter-university computer networ
k 1970: CYCLADES, French equivalent of Arpane
t by Louis POUZIN 1974: TCP/IP Protocols (Robert KAHN and Vinton CERF) 1982: Generalization
of TCP/IP 1989: Arrival of the Web (Hyperlink, document network, www) 1990: Gen
eralization of Internet service provi
ders 2008: Internet of Things 2018: More than 10 billion connected devices. Video accounts for more than half of data exchanges on the internet.

## Historic landmarks on the Internet in less than 128 words

Antiquity: Communication by 8th century sentinel chains: information coding, s
emaphore code 1837: Telegraph, Morse Code 1876: Telephone 1915: First intercont
inental link 1948: First multiplexing 1950
: communication of a com
puter on the telephone network 1956: Transatlantic t
elephone cable 1961: The first routers
1969: ARPET, ARPET, communication of a computer on the telephone network 1956: Transatlanti
c telephone cable 1961: The first routers 1969: ARPET, unco
mmunication of a computer on the telepho
ne network 1956: Transatlantic telephone cable 1961: The first routers 1969: ARPET, communic
ation of a computer on the telephone network 1956: Transatlantic telephone cable 1961: The
first routers 1969: ARPET, ARPET American inter-university computer networ
k 1970: CYCLADES, French equivalent of Arpane
t by Louis POUZIN 1974: TCP/IP Protocols (Robert KAHN and Vinton CERF) 1982: Generalization
of TCP/IP 1989: Arrival of the Web (Hyperlink, document network, www) 1990: Gen
eralization of Internet service provi
ders 2008: Internet of Things 2018: More than 10 billion connected devices. Video accounts for more than half of data exchanges on the internet.

## Historic landmarks on the Internet in less than 128 words

Antiquity: Communication by 8th century sentinel chains: information coding, s
emaphore code 1837: Telegraph, Morse Code 1876: Telephone 1915: First intercont
inental link 1948: First multiplexing 1950
: communication of a com
puter on the telephone network 1956: Transatlantic t
elephone cable 1961: The first routers
1969: ARPET, ARPET, communication of a computer on the telephone network 1956: Transatlanti
c telephone cable 1961: The first routers 1969: ARPET, unco
mmunication of a computer on the telepho
ne network 1956: Transatlantic telephone cable 1961: The first routers 1969: ARPET, communic
ation of a computer on the telephone network 1956: Transatlantic telephone cable 1961: The
first routers 1969: ARPET, ARPET American inter-university computer networ
k 1970: CYCLADES, French equivalent of Arpane
t by Louis POUZIN 1974: TCP/IP Protocols (Robert KAHN and Vinton CERF) 1982: Generalization
of TCP/IP 1989: Arrival of the Web (Hyperlink, document network, www) 1990: Gen
eralization of Internet service provi
ders 2008: Internet of Things 2018: More than 10 billion connected devices. Video accounts for more than half of data exchanges on the internet.