View whisper-cyanite.py
#!/usr/bin/env python | |
import os | |
import mmap | |
import struct | |
import signal | |
import optparse | |
import cql | |
try: |
View gist:d35be4c38b41a771fd7b
#!/bin/bash | |
N=1000 | |
e=$(BC_LINE_LENGTH=0 bc -l <<<"scale=$N;e(1)"|sed 's#\.##'g) | |
M=$((N-10)) | |
for i in $(seq 0 $M) | |
do | |
a="${e:$i:10}" | |
[ "$(factor $a | cut -d' ' -f2)" == "$a" ] && echo $a | |
done |
View gist:f7a91ffc0327f2402a9a
e=$(BC_LINE_LENGTH=0 bc -l <<<"scale=1000;e(1)"|sed 's#\.##');for i in {0..990};do a="${e:$i:10}";[ "$(factor $a | cut -d' ' -f2)" == "$a" ]&& echo $a;done |
View .vimrc
scriptencoding utf-8 | |
set encoding=utf-8 | |
set nocompatible " use vim default | |
syntax on | |
set background=dark | |
colorscheme delek | |
set t_Co=256 | |
set list | |
set listchars=eol:¶,extends:>,precedes:<,nbsp:·,tab:\|_,trail:. | |
set hidden " http://nvie.com/posts/how-i-boosted-my-vim/ |
View util.py
"""Copyright 2008 Orbitz WorldWide | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
View gist:512ecb742b7148c1d5c0
root@vagrant-ubuntu-precise-64:~# go build github.com/dgryski/carbonapi | |
root@vagrant-ubuntu-precise-64:~# go build github.com/dgryski/carbonzipper | |
root@vagrant-ubuntu-precise-64:~# go build github.com/grobian/carbonserver | |
root@vagrant-ubuntu-precise-64:~# ls -al ~/go/bin/carbon* | |
total 53552 | |
drwxr-xr-x 2 root root 4096 Nov 28 16:32 . | |
drwxr-xr-x 5 root root 4096 Aug 8 13:20 .. | |
-rwxr-xr-x 1 root root 8796848 Oct 28 16:38 carbonapi | |
-rwxr-xr-x 1 root root 8526040 Oct 28 16:36 carbonserver | |
-rwxr-xr-x 1 root root 8515904 Oct 28 16:37 carbonzipper |
View gist:ec7888645baaacb93fbc
<LoadPlugin python> | |
Globals true | |
</LoadPlugin> | |
<Plugin python> | |
ModulePath "/usr/lib/collectd/plugins/python" | |
Import "collectd_iostat_python" | |
<Module collectd_iostat_python> | |
Path "/usr/bin/iostat" |
View whisper-diff-standalone.py
# Copyright 2009-Present The Graphite Development Team | |
# Copyright 2008 Orbitz WorldWide | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
View wsgi.py
import os | |
import sys | |
try: | |
from importlib import import_module | |
except ImportError: | |
from django.utils.importlib import import_module | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') # noqa |
View instrumentation.py
import os | |
import time | |
import socket | |
from resource import getrusage, RUSAGE_SELF | |
from twisted.application.service import Service | |
from twisted.internet.task import LoopingCall | |
from carbon.conf import settings |
OlderNewer