Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoit Pierre benoit-pierre

View GitHub Profile
View ls_colors.py
# -*- coding: utf-8 -*-
# pylint: disable=consider-using-f-string,invalid-name,line-too-long,super-with-arguments
'''
Ranger color-scheme using `$LS_COLORS` / `dircolors`.
Originally based on: https://github.com/ranger/colorschemes/raw/a250fe866200940eb06d877a274333a2a54c34f3/ls_colors.py
Usage: copy this file to `~/.config/ranger/colorschemes'. The base color-scheme
used for non file system entries / the unfocused pane is `default`. To change it,
View bsd_support.patch
plover/dist_main.py | 5 ++---
plover/gui_qt/engine.py | 6 ++----
plover/gui_qt/main_window.py | 8 ++++----
plover/gui_qt/trayicon.py | 5 ++---
plover/i18n.py | 11 +++++------
plover/log.py | 8 ++++----
plover/macro/undo.py | 6 ++----
plover/main.py | 12 +++++-------
plover/oslayer/config.py | 22 +++++++++++++---------
plover/oslayer/keyboardcontrol.py | 10 +++++-----
View build_package_index.py
#!/usr/bin/env python
from collections import defaultdict
from collections import namedtuple
from fnmatch import fnmatch
from html import escape as html_escape
from pathlib import Path
import functools
import glob
import itertools
View plover_package_index.html
<!DOCTYPE html>
<html>
<head>
<meta name="pypi:repository-version" content="1.0">
<title>Plover Package Index</title>
</head>
<body>
<h1>Links for <a id="aiohttp" href="https://pypi.org/pypi/aiohttp">aiohttp</a></h1>
<a href="https://files.pythonhosted.org/packages/7c/39/7eb5f98d24904e0f6d3edb505d4aa60e3ef83c0a58d6fe18244a51757247/aiohttp-3.6.2-cp36-cp36m-manylinux1_x86_64.whl#sha256=ae55bac364c405caa23a4f2d6cfecc6a0daada500274ffca4a9230e7129eac59" data-requires-python="&gt;=3.5.3">aiohttp-3.6.2-cp36-cp36m-manylinux1_x86_64.whl</a><br/>
<a href="https://files.pythonhosted.org/packages/e3/71/6000eacb8923d9fd07aa8784a8fab4f022ae697f3c2456d7dca75c743dd6/aiohttp-3.6.2-cp37-cp37m-manylinux1_x86_64.whl#sha256=6206a135d072f88da3e71cc501c59d5abffa9d0bb43269a6dcd28d66bfafdbdd" data-requires-python="&gt;=3.5.3">aiohttp-3.6.2-cp37-cp37m-manylinux1_x86_64.whl</a><br/>
View melani_orthography.json
{
"S": "s{^}",
"SPT": "z{^}",
"SPTHVR": "sbl{^}",
"SPTV": "sb{^}",
"SPTt": "zionat{^}",
"SPsi": "spissimi",
"SPse": "spissime",
"SPsa": "spissima",
"SPso": "spissimo",
View theory.py
import json
import os
from pkg_resources import resource_stream
from plover.oslayer.config import CONFIG_DIR
from plover_stroke import BaseStroke
from plover_melani import system
View firemonkey_external_edit.py
#!/usr/bin/env python
from tempfile import NamedTemporaryFile
import os
import shlex
import sys
import subprocess
from dogtail import tree
from dogtail.predicate import config as dogtail_config
View gen_xlib.py
#!/usr/bin/env python
# pkg-config --variable=xcbincludedir xcb-proto
import re
import sys
from collections import namedtuple
def err(*args):
sys.stderr.write(' '.join(str(a) for a in args) + '\n')
View portuguese_keymaps.patch
plover_portuguese.py | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git i/plover_portuguese.py w/plover_portuguese.py
index d7787a5..3daf258 100755
--- i/plover_portuguese.py
+++ w/plover_portuguese.py
@@ -66,23 +66,23 @@ KEYMAPS = {
'Keyboard': {
'#' : ('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='),
View find_orthography_conflicts.py
#!/usr/bin/env python3
__requires__ = ['progressbar2']
import itertools
import multiprocessing
import re
import sys