Skip to content

Instantly share code, notes, and snippets.

swagger: '2.0'
info:
title: Example Endpoint
version: 0.0.1
host: example.com
schemes:
- https
basePath: /v1/
consumes:
- application/json
@anopheles
anopheles / router.py
Created September 12, 2012 13:34
Router Dealer example with bidirectional communication
# encoding: utf-8
import zmq
from collections import defaultdict
context = zmq.Context()
client = context.socket(zmq.ROUTER)
client.bind("tcp://*:5556")
poll = zmq.Poller()
@anopheles
anopheles / main.py
Created January 25, 2012 22:00
Bottle File Download
# -*- coding: utf-8 -*-
import os, sys, re
from threading import Thread
from bottle import route, run, debug, template, static_file, request, post, get, redirect
from PyQt4 import QtWebKit, QtGui, QtCore, QtNetwork
class DownloadServer(Thread):