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
#!/bin/env python | |
# connect to proton mail | |
import argparse | |
import random | |
import subprocess | |
import time | |
zones = { | |
'ch': [ |
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
case BTPROTO_HCI: | |
{ | |
struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret; | |
#if defined(__NetBSD__) || defined(__DragonFly__) | |
char *straddr = PyBytes_AS_STRING(args); | |
_BT_HCI_MEMB(addr, family) = AF_BLUETOOTH; | |
if (straddr == NULL) { | |
PyErr_SetString(PyExc_OSError, "getsockaddrarg: " | |
"wrong format"); |
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
case BTPROTO_HCI: | |
{ | |
struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret; | |
#if defined(__NetBSD__) || defined(__DragonFly__) | |
char *straddr = PyBytes_AS_STRING(args); | |
_BT_HCI_MEMB(addr, family) = AF_BLUETOOTH; | |
if (straddr == NULL) { | |
PyErr_SetString(PyExc_OSError, "getsockaddrarg: " | |
"wrong format"); |
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 python | |
"""walk into the current directory and subdirs, looks for hg repos, checks | |
local and remote status and report into | |
""" | |
import os | |
import subprocess | |
max_depth = 2 |
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 -*- | |
# Author: Douglas Creager <[email protected]> | |
# This file is placed into the public domain. | |
# Calculates the current version number. If possible, this is the | |
# output of “git describe”, modified to conform to the versioning | |
# scheme that setuptools uses. If “git describe” returns an error | |
# (most likely because we're in an unpacked copy of a release tarball, | |
# rather than in a git working copy), then we fall back on reading the | |
# contents of the RELEASE-VERSION file. |
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 python | |
# -*- coding: utf-8 -*- | |
"""launch small http server | |
""" | |
import sys | |
try: | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
except ImportError: |
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 -*- | |
"""get version number from dvcs | |
""" | |
from subprocess import Popen, PIPE | |
def get_hg_version(): | |
"""uses mercurial to get last tag and last revision number |