Les fondamentaux des sciences du numerique pour les chimistes
John Samuel
CPE Lyon
Année: 2022-2023
Email: john(dot)samuel(at)cpe(dot)fr
Cours/TP | Dates |
---|---|
1 | 17 mars |
2 | 24 mars |
3 | 31 mars |
4 | 7 avril |
5 | 21 avril |
6 | 28 avril |
7 | 5 mai |
Cours/TP | Dates |
---|---|
1 | 17 mars |
2 | 24 mars |
3 | 31 mars |
4 | 7 avril |
5 | 21 avril |
6 | 28 avril |
7 | 5 mai |
Dates | Sujets |
---|---|
1. |
|
2. |
|
3. |
|
$ tail /var/log/apache2/access.log
127.0.0.1 - - [14/Nov/2018:14:46:49 +0100] "GET / HTTP/1.1" 200 3477 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0" 127.0.0.1 - - [14/Nov/2018:14:46:49 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 304 180 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0" 127.0.0.1 - - [14/Nov/2018:14:46:49 +0100] "GET /favicon.ico HTTP/1.1" 404 294 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0"
from urllib import request
response = request.urlopen("https://en.wikipedia.org/wiki/Main_Page")
html = response.read()
from urllib import request
from lxml import html
document = html.parse(request.urlopen("https://en.wikipedia.org/wiki/Main_Page"))
for link in document.iter("a"):
if(link.get("href") is not None):
print(link.base_url+link.get("href"))
import requests
url = "https://api.github.com/users/johnsamuelwrites"
response = requests.get(url)
print(response.json())
import requests
url = "https://api.github.com/users/johnsamuelwrites/repos"
response = requests.get(url)
print(response.json())
from SPARQLWrapper import SPARQLWrapper, JSON
sparql = SPARQLWrapper("http://query.wikidata.org/sparql")
sparql.setQuery("""
SELECT ?item WHERE {
?item wdt:P31 wd:Q9143;
}
LIMIT 10
""")
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
for result in results["results"]["bindings"]:
print(result)
year, population 1960, 46647521 1961, 47293811 1962, 47990159 1963, 48697015 1964, 49361165 1965, 49945471 1966, 50430631 1967, 50829214 1968, 51175036
<temp>22.7<temp> <lum>390<lum> <UV>1<UV> <humidity>22.7<humidity> <date>2018-02-23 14:56:26.091532<date>
{ "values": [{ "temp": 22.7, "lum": 390, "UV": 1, "humidity": 25.3, "date": "2018-02-23 14:56:26.091532", "pression": 989 },... ] }