SELECT
REGEXP_EXTRACT(details.python, r"^([^\.]+\.[^\.]+)") as python_version,
details.installer.name,
details.installer.version,
COUNT(*) as total_downloads
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("20160114"),
SELECT
details.installer.name,
details.installer.version,
COUNT(*) as total_downloads
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("20160114"),
CURRENT_TIMESTAMP()
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 twisted.internet import endpoints, defer, protocol, task | |
class Echo(protocol.Protocol): | |
def dataReceived(self, data): | |
self.transport.write(data) | |
@task.react | |
def main(reactor): |
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
import attr | |
from twisted.internet import defer, task | |
@attr.s | |
class LoopNTimes(object): | |
_times = attr.ib() | |
_f = attr.ib() | |
_loopingCall = attr.ib(default=None, init=False) | |
_called = attr.ib(default=0, init=False) |
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
import argparse | |
import socket | |
parser = argparse.ArgumentParser(description="keepalive example") | |
parser.add_argument("mode", choices=("server", "client")) | |
def server(): | |
listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
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
[distutils] | |
index-servers= | |
test | |
[test] | |
repository: https://test.pypi.org/legacy |
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
empty |
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 invalid_but_irrelevant(): | |
print("I am invalid but also irrelevant") | |
def invalid_but_relevant(): | |
print("I am invalid and relevant") |
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
Config { font = "-terminus-medium-*-*-*-*-14-*-*-*-*-*-*-*" | |
, additionalFonts = [] | |
, borderColor = "black" | |
, border = TopB | |
, bgColor = "darkblue" | |
, fgColor = "grey" | |
, alpha = 255 | |
, position = Top | |
, textOffset = -1 | |
, iconOffset = -1 |