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
from cassandra.cluster import Cluster | |
from cassandra.concurrent import execute_concurrent, query_by_keys | |
from cassandra.policies import TokenAwarePolicy, DCAwareRoundRobinPolicy | |
from itertools import repeat, cycle | |
from collections import defaultdict | |
import time | |
import six | |
from bokeh.plotting import figure, output_file, show | |
cluster = Cluster(load_balancing_policy=TokenAwarePolicy(DCAwareRoundRobinPolicy(), shuffle_replicas=False)) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Hyperlink JIRA ticket numbers for DataStax projects | |
;; | |
;; For example, all of these tickets should be clickable when | |
;; bug-reference-prog-mode or bug-reference-mode are enabled : | |
;; | |
;; CASSANDRA-8099 | |
;; PYTHON-363 | |
;; TESTINF-386 | |
;; DSP-6091 |
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
#cloud-config | |
coreos: | |
etcd: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new | |
discovery: https://discovery.etcd.io/<token> | |
# multi-region deployments, multi-cloud deployments, and droplets without | |
# private networking need to use $public_ipv4 | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 |
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
export [email protected] | |
export DEBFULLNAME="Jürgen E. Fischer" | |
export PPA=${1:-qgis-unstable-ubuntugis-jef} | |
export T=$(mktemp) | |
cp debian/changelog $T | |
trap "cp $T debian/changelog && rm -f $T" EXIT |
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 fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
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 sqlite3, os | |
conn = sqlite3.connect('Mills1860.mbtiles') | |
results=conn.execute('select * from tiles').fetchall() | |
for result in results: | |
zoom, column, row, png= result | |
try: | |
os.makedirs('%s/%s/' % (zoom, row)) |