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 ts_weeks_ago(n): | |
| """ | |
| Gets the unix timestamp n weeks ago | |
| """ | |
| return time.time() - (n*7*24*60*60*1000) |
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
| sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
| sudo yum install gcc python26-devel | |
| sudo yum install python26-setuptools | |
| sudo easy_install-2.6 pip | |
| sudo easy_install-2.6 -U distribute |
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
| #!/bin/bash | |
| p4 change -o | grep '^\(Change\|Client\|User\|Description\)' | sed "s/Description:/Description:$1/" | p4 change -i | cut -d ' ' -f 2 |
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
| .status-ul { | |
| list-style: none; | |
| padding:0; | |
| margin:0; | |
| font-size: 8px; | |
| } | |
| .status-item { | |
| display:inline; | |
| border-style: solid; |
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
| public double getMedian(List<? extends Number> values) { | |
| if(values.size() % 2 != 0) { | |
| return values.get(values.size()/2).doubleValue(); | |
| } else { | |
| return (values.get((values.size()/2) - 1).doubleValue() + values.get(values.size()/2).doubleValue())/2; | |
| } | |
| } |
OlderNewer