Skip to content

Instantly share code, notes, and snippets.

Markdown test

Ref and superscript

Test to have a ref with superscript1

@jonadem
jonadem / give_gender.py
Created October 18, 2023 22:33
Wikidata : Add the gender property of a person if missing
"""Add the gender property of a person if missing
For a person, check if the gender is provided.
If not, ask for it and link it to the person.
"""
import sys
from pywikibot.data import api
import pywikibot
@jonadem
jonadem / create_family_name.py
Last active November 9, 2019 14:15
Wikidata : Add the family name property of a person if missing
"""Add the family name property of a person if missing
For a person, check if the family name exists.
If not, create it and link it to the person
"""
import sys
import pywikibot
from pywikibot import pagegenerators
# encoding: utf-8
from __future__ import print_function
import re
import requests
from bs4 import BeautifulSoup
from HTMLParser import HTMLParser
html_parser = HTMLParser()
@jonadem
jonadem / pylint-recursive.py
Last active November 9, 2017 20:26 — forked from gregorynicholas/pylint-recursive.py
Module that runs pylint on all python scripts found in a directory tree..
#! /usr/bin/env python
'''
Module that runs pylint on all python scripts found in a directory tree..
'''
from __future__ import print_function
import os
import re
import sys
@jonadem
jonadem / pep8_cheatsheet.py
Last active February 18, 2020 15:19 — forked from RichardBronosky/pep8_cheatsheet.py
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this is not PEP8-cheatsheet.py