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
## invoking pyspark as follows: ## | |
# /path/to/spark-1.2.0-bin-hadoop2.4/bin/pyspark --jars /path/to/spark-1.2.0-bin-hadoop2.4/jars/spark-cassandra-connector-assembly-1.2.0-SNAPSHOT.jar | |
# first, stop the spark context launched by pyspark to avoid the conflict | |
sc.stop() | |
from py4j.java_gateway import java_import | |
from pyspark import SparkConf | |
conf = (SparkConf() | |
.setMaster("local") |
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@fabrica ~]# cat /var/lib/postgres/data/postgresql.conf | grep -v '^\s*#' | grep . | |
max_connections = 100 # (change requires restart) | |
shared_buffers = 128MB # min 128kB | |
log_timezone = 'US/Pacific' | |
datestyle = 'iso, mdy' | |
timezone = 'US/Pacific' | |
lc_messages = 'en_US.UTF-8' # locale for system error message | |
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting | |
lc_numeric = 'en_US.UTF-8' # locale for number formatting | |
lc_time = 'en_US.UTF-8' # locale for time formatting |
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
require 'sinatra/base' | |
require 'rack/flash' | |
require 'warden' | |
require 'slim' | |
require 'sequel' | |
require 'sqlite3' | |
DB = Sequel.sqlite | |
DB.create_table :users do | |
primary_key :id |