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
#!/usr/bin/env python | |
import os | |
import mmap | |
import struct | |
import signal | |
import optparse | |
import cql | |
try: |
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 | |
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 |
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
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 |
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
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/ |
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
"""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, |
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
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 |
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
<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" |
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
# 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 |
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 | |
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 |
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 | |
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