Skip to content

Instantly share code, notes, and snippets.

import os
import shlex
import subprocess
PATH = '/usr/lib/python3.5/site-packages'
def main():
if not os.path.exists(PATH):
print(PATH, 'could not be found. No packages will need to be rebuilt.')
@cryzed
cryzed / fix-infinality.md
Last active May 8, 2024 17:00
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

import argparse
import hashlib
import os
import shutil
import sys
import xml.etree.ElementTree as ET
from argparse import Namespace
from PySide import QtCore
from PySide.QtCore import Qt
#!/usr/bin/env python
import argparse
import collections
import itertools
import os
import re
import shutil
import stat
import subprocess
#!/usr/bin/env python
# Dependencies: python-tldextract, pass
import argparse
import enum
import fnmatch
import functools
import os
import re
# Here's a regular example of a predicate using numbers:
def my_predicate(item):
return item > 5
items = [5, 10, 6, 7, 7, -2]
for filtered in filter(my_predicate, items):
print(filtered)
# Output: 10, 6, 7, 7
import argparse
import re
import subprocess
argument_parser = argparse.ArgumentParser()
argument_parser.add_argument('name')
LSUSB_PATTERN = re.compile(
r'Bus (?P<bus>\d{3}) Device (?P<device>\d{3}): ID (?P<id>[a-z0-9]{4}:[a-z0-9]{4}) (?P<name>.*)')
#!/usr/bin/env python
import argparse
import shlex
import subprocess
import time
argument_parser = argparse.ArgumentParser()
argument_parser.add_argument('ip')
argument_parser.add_argument('--on-reachable', action='append', default=[])
import argparse
import collections
import itertools
import os
import sys
import time
try:
import cPickle as pickle
#!/usr/bin/env python
import argparse
import collections
import itertools
import os
import shlex
import stat
import subprocess
import sys