This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="author" content=""> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Challenge 5 | |
*/ | |
/* Exercice 1 */ | |
// La fonction ne prend pas de paramètres, ne retourne rien | |
// Elle modifie une variable globale | |
let i = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Challenge 4 | |
*/ | |
/* Exercice 1: Les variables */ | |
/* | |
- Déclarez une variable i, sans lui donner de valeur | |
- Donnez une valeur à cette variable (par ex. 5) | |
- Déclarez une variable j, en lui donnant une valeur (par ex. 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * */ | |
/* Challenge 3 */ | |
/* * * * * * * */ | |
// Les boucles et les tableaux | |
/* Exercice 1 */ | |
/* | |
Ecrivez : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * */ | |
/* Challenge 2 */ | |
/* * * * * * * */ | |
// Conditions (if, else if, else) | |
// Les comparaisons, et les booléens | |
/* Exercice 1 */ | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * */ | |
/* Challenge 1 */ | |
/* * * * * * * */ | |
/* Exercice 1 */ | |
/* | |
Déclarez deux variables nbA et nbB, et assignez leur | |
les valeurs respectives : 5 et 10 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import html2text | |
import nltk | |
from langdetect import detect | |
from geotext import GeoText | |
# Some websites need headers (source: SO) | |
headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', |