This file contains 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
# visar församlingskartor om efter 2008 | |
OPTIONAL{ ?item wdt:P571 ?StartD .} | |
OPTIONAL{ ?item wdt:P576 ?SlutD .} | |
BIND(IF((!BOUND(?SlutD) || ?SlutD > "2008-01-01T00:00:00Z"^^xsd:dateTime ) , | |
URI(CONCAT("http://geodata.scb.se/reginawebmap/main/webapp/?typ=forsamling&f=",?SCBid)),?SCBid) AS ?SCB). |
This file contains 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
from SPARQLWrapper import SPARQLWrapper, JSON | |
sparql = SPARQLWrapper("http://virhp07.libris.kb.se/sparql/") | |
sparql.setQuery(""" | |
PREFIX bmc: <http://swepub.kb.se/bibliometric/model#> | |
PREFIX swpa_m: <http://swepub.kb.se/SwePubAnalysis/model#> | |
PREFIX mods_m: <http://swepub.kb.se/mods/model#> | |
PREFIX outt_m: <http://swepub.kb.se/SwePubAnalysis/OutputTypes/model#> | |
PREFIX xlink: <http://www.w3.org/1999/xlink#> |
This file contains 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
"""Extract the yuotube id and the title from a youtube playlist""" | |
from bs4 import BeautifulSoup | |
import requests | |
import urllib | |
import urllib.parse as urlparse | |
youtubePlaylist = "https://www.youtube.com/playlist?list=PL072ED1B5CB4BBFCD" | |
def clean_title(title): | |
cleaned_title = title.replace("People at KI: ","").replace("Professor of ","").replace("Möt ","").replace("Professor ","") |
This file contains 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
"""Extract Professors at KI""" | |
from bs4 import BeautifulSoup | |
import requests | |
ki_url = "https://ki.se/en/research/professors-at-ki" | |
def get_ki_prof(url): | |
source_code = requests.get(url).text | |
soup = BeautifulSoup(source_code, 'html.parser') |
This file contains 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
{ | |
"@context": "http://iiif.io/api/presentation/2/context.json", | |
"@id": "http://a7abb044-4f83-4ebd-a4af-4719d0b243cc", | |
"@type": "sc:Manifest", | |
"label": "[Click to edit label]", | |
"metadata": [], | |
"description": [ | |
{ | |
"@value": "[Click to edit description]", | |
"@language": "en" |
This file contains 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
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","benchmarkIndex":736},"lighthouseVersion":"4.0.0","fetchTime":"2019-04-23T10:06:14.857Z","requestedUrl":"https://sfd2019.se/forelasning-lordag-24-augusti/","finalUrl":"https://sfd2019.se/forelasning-lordag-24-augusti/","runWarnings":[],"runtimeError":{"code":"NO_ERROR","message":""},"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prer |
This file contains 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
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","benchmarkIndex":738},"lighthouseVersion":"4.0.0","fetchTime":"2019-04-24T09:02:18.742Z","requestedUrl":"https://libris.kb.se/katalogisering/0xbfkjzj49vj3dw","finalUrl":"https://libris.kb.se/katalogisering/0xbfkjzj49vj3dw","runWarnings":[],"runtimeError":{"code":"NO_ERROR","message":""},"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a |
This file contains 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
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","benchmarkIndex":738},"lighthouseVersion":"4.0.0","fetchTime":"2019-04-24T09:02:18.742Z","requestedUrl":"https://libris.kb.se/katalogisering/0xbfkjzj49vj3dw","finalUrl":"https://libris.kb.se/katalogisering/0xbfkjzj49vj3dw","runWarnings":[],"runtimeError":{"code":"NO_ERROR","message":""},"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a |
This file contains 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
Haiku = ["Snow in my shoe","Abandoned","parrow's nest"] | |
currLine = 0 | |
def printLine(): | |
global currLine | |
print (Haiku[currLine]) | |
currLine += 1 | |
if currLine < len(Haku): | |
return True |
OlderNewer