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
import os, subprocess | |
from glob import glob | |
from pprint import pprint | |
_, directories, files = next(os.walk('.')) | |
def raad_taal_en_titel(directory): | |
split = directory.split(' ', 1) | |
if len(split) is 2 and split[0] in ['eng', 'deu', 'nld']: |
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
// Put this in Global.asax.cs | |
protected void Application_BeginRequest(object sender, EventArgs e) | |
{ | |
// Do Not Allow URL to end in trailing slash | |
string url = HttpContext.Current.Request.Url.AbsolutePath; | |
if (string.IsNullOrEmpty(url)) return; | |
string lastChar = url[url.Length-1].ToString(); | |
if (lastChar == "/" || lastChar == "\\") |
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
import pywikibot, mwparserfromhell, re | |
from pprint import pprint | |
sourcepage = 'Gebruiker:Vinkje83/WTA150' | |
class Dame: | |
def __init__(self, rij): | |
nummer, speelster, punten, verandering = rij._contents.nodes | |
self.nieuwe_rangpositie = int(nummer.contents.strip_code().replace('. ', '')) | |
self.naam = speelster.contents.filter_wikilinks()[0].title |
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
javascript: (function(f, a) { | |
f = new Blob( | |
[ | |
[].map.call(document.querySelectorAll('#dscardsdetailsandtransactions tr.riaf-datatable-contents, #dscardsdetailsandtransactions td.riaf-datatable-details-contents'), | |
tr => tr.querySelector('table') ? [].map.call(tr.querySelectorAll('tr'), | |
detail => | |
' ' + detail.querySelector('td:first-of-type').textContent.trim() + ": " + | |
detail.querySelector('td:last-of-type').textContent.trim() | |
).join('\r\n') | |
: ["Datum: " + tr.querySelector('td.riaf-datatable-column-date').textContent.trim(), |
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
Species | Link | |
---|---|---|
Abies alba | /2201 | |
Abies concolor | /2202 | |
Abies grandis | /2203 | |
Abies koreana | /8091 | |
Abies nordmanniana | /2204 | |
Abies pinsapo | /2205 | |
Abies procera | /2206 | |
Abies veitchii | /5000 | |
Abutilon theophrasti | /1650 |
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
def verwijderUitSjabloon(sjabloon, parameter): | |
if sjabloon.has_param(parameter): | |
sjabloon.remove(parameter) | |
def dealWithPage(page): | |
wikicode = mwparserfromhell.parse(page.text) | |
templates = wikicode.filter_templates() | |
infobox = [x for x in templates if x.name.matches('Infobox gemeente Finland')] |
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
#!/usr/bin/env python | |
from pywikibot import config2 as config | |
import sys, pywikibot, re | |
from datetime import date | |
from dateutil.parser import parse | |
if len(sys.argv) < 2: | |
today = date.today() | |
print ('Usage: %s %s' % (sys.argv[0], str(today))) |
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 mwviews.api import PageviewsClient | |
import functools # Voor Python 3 compatibility | |
import itertools | |
days = 100 | |
topmost = 10000 | |
showtop = 100 | |
p = PageviewsClient(10) |
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
Jaartal | Meting op 15-4-2016 | Meting op 4-5-2016 | |
---|---|---|---|
2004 | 3 | 3 | |
2005 | 6 | 6 | |
2006 | 4 | 4 | |
2007 | 29 | 28 | |
2008 | 53 | 53 | |
2009 | 30 | 30 | |
2010 | 57 | 56 | |
2011 | 35 | 35 | |
2012 | 51 | 51 |
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
# http://undeadly.org/cgi?action=article&sid=20160114142733 | |
# Put this in ~/.ssh/config | |
Host * | |
UseRoaming no |
NewerOlder