ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from sys import argv | |
from time import strftime | |
clocks = {'12:00': '🕛', '12:30': '🕧', '1:00': '🕐', '1:30': '🕜', | |
'2:00': '🕑', '2:30': '🕝', '3:00': '🕒', '3:30': '🕞', | |
'4:00': '🕓', '4:30': '🕟', '5:00': '🕔', '5:30': '🕠', | |
'6:00': '🕕', '6:30': '🕡', '7:00': '🕖', '7:30': '🕢', |
ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
""" | |
Would this make a better random.sample() function for the Python | |
standard library? Robert Floyd's algorithm as presented in Jon | |
Bentley, "A Sample of Brilliance". | |
Answer: no, it's slower; somewhat slower even if you tune it. | |
I tried a few different test cases -- both small and large | |
result lists. I'd expect it to use much less memory in some cases, | |
but my flailings turned up no case where that seemed to matter. |