Skip to content

Instantly share code, notes, and snippets.

@VladimirAlexiev
VladimirAlexiev / README.md
Created January 21, 2017 15:12
How to add Museum Identifiers to Wikidata

How to Add Museum IDs to Wikidata

17 January 2017 I get this nice reminder by Wikidata user Pasleim: Unused properties This is a kind reminder that the following properties were created more than six months ago: Artsy gene (P2411), J. Paul Getty Museum object id (P2582), dataset distribution (P2702). As of today, these properties are used on less than five items. As the proposer of these properties you probably want to change the unfortunate situation by adding a few statements to items.

I went ahead and added a few Getty Museum IDs by hand. Then I looked more closely at the available data and it hit me: let's do some SPARQL queries to generate the missing data.

Find J. Paul Getty Museum objects

<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@Karol007
Karol007 / gist:7931440
Last active December 31, 2015 03:59
Prezentacja "Wikipedia dla początkujących"
<!--
Based on Google IO 2012/2013 HTML5 Slide Template
URL: https://code.google.com/p/io-2012-slides
-->
<!DOCTYPE html>
<html>
<head>
<title>Wikipedia</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
@balrog-kun
balrog-kun / merge-building-addrs.py
Last active July 19, 2017 19:28
Merge two .osm files, one with building footprints, one with address nodes. Write output.osm.
#! /usr/bin/python2
# vim: fileencoding=utf-8 encoding=utf-8 et sw=4
import sys
import os
import xml.etree.cElementTree as ElementTree
import string
outroot = ElementTree.Element("osm", { "version": "0.6" })
bldgroot = ElementTree.parse(sys.argv[1]).getroot()