Skip to content

Instantly share code, notes, and snippets.


Hugo van Kemenade hugovk

  • Nord Software
  • Helsinki, Finland
  • @hugovk
View GitHub Profile
aaltat /
Last active Mar 2, 2020
Find files which are not Python 3 compatible
import argparse
import subprocess
from pathlib import Path
def find_files(src_root: Path, python3: Path):
not_py3_compatible = []
for file in src_root.rglob('*.py'):
tirkarthi /
Last active Feb 18, 2020
Python 3.8 and 3.9 issues

Do take one issue per person to help others :) Also checkout Fedora tracker for more easy issues : . I tried to mark the issues complete but it's more maintenance so sorry if the issue is fixed or already has a PR and is not updated here.

sloria /
Last active Feb 13, 2020
Checklist for dropping Python 2 in my libraries
  • Add pyupgrade to .pre-commit-config.yaml.

If supporting py35, use --py3-plus instead of --py36-plus.

- repo:
  rev: ...latest version...
  - id: pyupgrade
    args: [--py36-plus]
nnja / .pdbrc
Created Aug 2, 2019
My .pdbrc file with an interacti alias
View .pdbrc
# Install IPython: python3 -m pip install ipython
import IPython
from traitlets.config import get_config
cfg = get_config()
cfg.InteractiveShellEmbed.colors = "Linux" # syntax highlighting
cfg.InteractiveShellEmbed.confirm_exit = False
alias interacti IPython.embed(config=cfg)
mieky /
Last active Oct 27, 2020
MacOS Lifehacks

Collection of useful tips & tricks to set up on a Mac.

Safari: bind cmd+alt+arrows to switch between previous/next tab

defaults write -app Safari NSUserKeyEquivalents '{
"Show Next Tab" = "@~\\U2192";
"Show Previous Tab" = "@~\\U2190";
mortenson / metatag_example.php
Created Feb 26, 2019
OR statements in metatags...
View metatag_example.php
* Implements hook_metatags_attachments_alter().
* This function allows you to define fallback tokens in case a field is empty.
* If all fallback values are empty, the tag will be empty.
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png
joyrexus /
Last active Jan 15, 2021
collapsible markdown

collapsible markdown?


yes, even hidden code blocks!

print("hello world!")
zerolab / d8_my_advanced_tab.php
Created Nov 3, 2016
Drupal 8 move something to the advanced tabs on node forms
View d8_my_advanced_tab.php
* Implements hook_form_FORM_ID_alter().
* Move your field or group of fields to the node form options vertical tabs.
function mymodule_form_node_form_alter(&$form, FormState $form_state, $form_id) {
$form['mygroup'] = [
View .travis.yml
# Supercharge your Travis builds with yarn
# Commit your lock file locally, and change your travis to this
language: node_js
- "4"
- npm -g install yarn
- yarn
juanpabloaj /
Last active Jun 18, 2018
Total of pip packages downloaded, separated by Python versions

Total of pip packages downloaded separated by Python versions

From June 26, 2016 (python 3.5.2 release) to Aug. 31, 2016.

Python versions from 2.6 to 3.5


Without 2.7

You can’t perform that action at this time.