This file contains hidden or 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
| def __repr__(self): | |
| kwarg = [] | |
| if self.key != self.name: | |
| kwarg.append("key") | |
| if self.primary_key: | |
| kwarg.append("primary_key") | |
| if not self.nullable: | |
| kwarg.append("nullable") | |
| if self.onupdate: | |
| kwarg.append("onupdate") |
This file contains hidden or 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
| from time import sleep | |
| from subprocess import CalledProcessError, check_output, check_call | |
| mailspring_pid = None | |
| while True: | |
| try: | |
| output = check_output(("wmctrl", "-l", "-p", "-G")).decode("UTF-8") | |
| except CalledProcessError: | |
| pass |
This file contains hidden or 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 python3 | |
| import subprocess | |
| import sys | |
| import arrow | |
| import argparse | |
| from json import loads | |
| from pprint import pprint | |
| from collections import Counter, defaultdict |
This file contains hidden or 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
| from __future__ import print_function | |
| import inspect | |
| import soco | |
| zone = soco.discovery.any_soco() | |
| # Get the base service class | |
| service_class = soco.services.Service |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| from pprint import pprint | |
| import time | |
| import traceback | |
| from soco import SoCo | |
| import soco | |
| from soco.music_services import MusicService |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| from pprint import pprint | |
| import time | |
| import traceback | |
| from soco import SoCo | |
| import soco | |
| from soco.music_services import MusicService |