Les fondamentaux des sciences du numerique pour les chimistes
John Samuel
CPE Lyon
Année: 2018-2019
Email: john(dot)samuel(at)cpe(dot)fr
Cours/TP | Dates | Horaires |
---|---|---|
1 | juin 24 | 9h00-17h30 |
2 | juin 25 | 8h30-17h00 |
3 | juin 26 | 8h30-17h00 |
4 | juin 27 | 8h30-17h00 |
5 | juin 28 | 8h30-12h00 |
Cours/TP | Dates | Horaires |
---|---|---|
1 | juin 24 | 9h00-17h30 |
2 | juin 25 | 8h30-17h00 |
3 | juin 26 | 8h30-17h00 |
4 | juin 27 | 8h30-17h00 |
5 | juin 28 | 8h30-12h00 |
Dates | Sujets |
---|---|
juin 24 |
|
juin 26 |
|
juin 28 |
|
Dates | Sujets |
---|---|
juin 24 |
|
juin 26 |
|
juin 28 |
|
Dates | Sujets |
---|---|
juin 24 |
|
juin 26 |
|
juin 28 |
|
$ 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"
$ tail /var/log/apache2/error.log
[Wed Nov 14 09:53:39.563044 2018] [mpm_prefork:notice] [pid 849] AH00163: Apache/3.4.29 (Ubuntu) configured -- resuming normal operations [Wed Nov 14 09:53:39.563066 2018] [core:notice] [pid 849] AH00094: Command line: '/usr/sbin/apache2' [Wed Nov 14 11:35:35.060638 2018] [mpm_prefork:notice] [pid 849] AH00169: caught SIGTERM, shutting down
$ cat /etc/apache2/apache3.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
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 },... ] }