Skip to content

Instantly share code, notes, and snippets.

Most active public GitHub users in Finland

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Fri, 13 Dec 2013 15:07:05 GMT till Sat, 13 Dec 2014 15:07:05 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -> user.followers > 11)
@santhoshtr
santhoshtr / render.py
Created October 9, 2014 09:12
PangoCairo Text rendering
#!/usr/bin/python
#-*- coding:utf8 -*-
import cairo
import pango
import pangocairo
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 600, 100)
context = cairo.Context(surface)
pc = pangocairo.CairoContext(context)
@reedy
reedy / gist:5397bb127ebb2b4e7eac
Last active August 29, 2015 14:04
mwgrep toolserver.org
reedy@tin:~$ mwgrep --max-results 350 toolserver.org
afwiki MediaWiki:Gadget-popups.js
afwiki MediaWiki:GeoHack.js
alswiki MediaWiki:Common.js
alswiki MediaWiki:Gadget-toolserver-integration.js
arcwiki MediaWiki:Gadget-popups.js
aswiki MediaWiki:Gadget-citations.js
barwiki MediaWiki:Common.css
be_x_oldwiki MediaWiki:Gadget-Popups.js
be_x_oldwiki MediaWiki:RefToolbar.js
@legoktm
legoktm / thingy.py
Last active August 29, 2015 14:03
thingy
# -*- coding: utf-8 -*-
# SUL audit thingy
# GPL v2 / MIT License
import calendar
import datetime
from collections import defaultdict, OrderedDict
import os
import time
import MySQLdb
@eloquence
eloquence / gist:8750334
Last active December 27, 2022 20:38
Links for Wikimania talk 2014
#!/usr/bin/env python
# Authors: Legoktm, Betacommand
# License: MIT License
import datetime
import functools
import logging
import mwparserfromhell
import pywikibot
@moorepants
moorepants / test_upload_tagged_photos.py
Created August 19, 2013 02:21
Image uploader for localwikis.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from upload_tagged_photos import ImageUploader
def TestUploadWiki():
url = "http://clevelandwiki.org/api/"
user_name = raw_input("What is your username?")
api_key = getpassword("What is your api_key?")
@hubgit
hubgit / README.md
Last active May 2, 2024 10:55
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

+-------------+----------+--------------------------------------------+
| uploadcount | log_user | user_name |
+-------------+----------+--------------------------------------------+
| 1687970 | 910182 | GeographBot |
| 893778 | 40038 | File Upload Bot (Magnus Manske) |
| 667641 | 344180 | BotMultichillT |
| 315174 | 102944 | GerWsUpload |
| 284299 | 2120548 | Slick-o-bot |
| 219123 | 152505 | Flickr upload bot |
| 132485 | 1560296 | FSII |
@phillro
phillro / gist:1147306
Created August 15, 2011 17:50
Elastica with an authenticated search
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/Elastica/lib'));
function elasticsearch_autoload($class) {
$file = str_replace('_', '/', $class) . '.php';
require_once $file;
}
spl_autoload_register('elasticsearch_autoload');
defined('BASE_PATH') || define('BASE_PATH', realpath(dirname(__FILE__)));