Skip to content

Instantly share code, notes, and snippets.

View petrushev's full-sized avatar

Baze Petrushev petrushev

View GitHub Profile
@petrushev
petrushev / worker.py
Created June 10, 2012 14:41
[nsnd struga] Simple hub/worker architecture
import zmq
from time import sleep
from random import random
from json import loads, dumps
HUB_ADDR = 'tcp://127.0.0.1:5555'
DEALER_ADDR = 'tcp://127.0.0.1:5566'
import sys
@petrushev
petrushev / hub.py
Created June 10, 2012 14:40
[nsnd struga] Simple hub/worker architecture
import zmq
from json import loads, dumps
HUB_ADDR = 'tcp://*:5555'
DEALER_ADDR = 'tcp://*:5566'
def main():
num = 1
@petrushev
petrushev / base.html
Created June 5, 2012 21:35
Basic jinja2 template
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{% endblock %}</title>
{% block styles %}
<link rel="icon" href="{{cdn}}/img/icon/favicon.ico" type="image/x-icon" />
<link rel="Shortcut Icon" href="{{cdn}}/img/icon/favicon.ico" />
<link href="{{cdn}}/css/blueprint.css" media="all" rel="stylesheet" type="text/css" />
<link href="{{cdn}}/css/default.css" media="all" rel="stylesheet" type="text/css" />
{% endblock %}