This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import collections | |
import itertools | |
import os | |
import re | |
import shutil | |
import stat | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>.*)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import collections | |
import itertools | |
import os | |
import sys | |
import time | |
try: | |
import cPickle as pickle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import collections | |
import itertools | |
import os | |
import shlex | |
import stat | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import enaml | |
from enaml.qt.qt_application import QtApplication | |
from enaml.widgets.api import Action | |
from folder_model import ImageFolder | |
argument_parser = argparse.ArgumentParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import magic | |
from atom.api import Atom, Bytes, Int, List, Str, observe | |
from enaml.image import Image | |
# https://pypi.org/project/natsort/ | |
from natsort import natsorted | |
class ImageFolder(Atom): |
OlderNewer