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 | |
# coding: utf-8 | |
# whereas the original rtm2todoist.py[1] worked off the .ics export, this version uses the more modern .json export | |
# [1] https://gist.github.com/notconfusing/68c84868098dcaa04e44522bebb77638 | |
import json | |
import pandas as pd | |
import datetime |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
"""Example Flask application which can authenticate the user via OAuth, and send a thank | |
see for the https://phabricator.wikimedia.org/source/tool-my-first-flask-oauth-tool/ for more of the flask OAUTH details | |
This file focuses on what's necessary to thank via OAUTH using the mediawiki API.""" | |
import flask | |
import mwoauth | |
import os | |
import werkzeug.contrib.fixers |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/python | |
# -*- coding: utf-8 -*- | |
# copied from harvest_template.py which is due to: | |
# (C) 2013 Multichill, Amir | |
# (C) 2013 Pywikipediabot team | |
# | |
# Distributed under the terms of MIT License. | |
# | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
wikidata = pywikibot.Site('en','wikipedia').data_repository() | |
drummer = pywikibot.ItemPage(wikidata, 'Q386854') | |
data = drummer.get() | |
claims = data['claims'] | |
subclass_ofs = claims['P279'] #Property P279 is subclass of | |
superclass_items = [superclass.target for superclass in subclass_ofs] | |
def english_name(item): | |
return item.get()['labels']['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
var socket = io.connect('stream.wikimedia.org/rc'); | |
printPlainObj({ | |
'event': 'connect', | |
'messsage': 'Connecting to stream.wikimedia.org...' | |
}); | |
socket.on('connect', function () { | |
printPlainObj({ | |
'event': 'connect', | |
'messsage': 'Connection established!' |