-
Install redis on OSX (10.7) Lion I used:
$ brew install redis
-
In the project and virtualenv I wanted to use django-celery in I installed the following.
This file contains 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 os, sys | |
class Winpdb(object): | |
'''Embed a Winpdb server. | |
If you have to tunnel to connect remotely from the Winpdb client, run: | |
ssh -C -N -f -L 51000:localhost:51000 $SERVER_HOST |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
This file contains 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
#include <vector> | |
#include <list> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <queue> | |
#include <stack> | |
#include <bitset> | |
#include <algorithm> | |
#include <functional> |
This file contains 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 nth_percentile(dataset, percentile = 90): | |
sorted_dataset = sorted(dataset) | |
new_length = len(sorted_dataset) * percentile / 100 | |
return sorted_dataset[0:new_length] | |
def mean(dataset): | |
return sum(dataset)/float(len(dataset)) | |
dataset = [5, 9, 7, 101, 4, 8, 109, 104, 6, 1, 110, 106, 3, 107, 105, 2, 102, 10, 103, 108] | |
percentile_90 = nth_percentile(dataset) |
This file contains 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/bash | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
##分布式系统(Distributed System)资料
介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.