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 org.apache.spark.sql.SparkSession | |
import org.apache.log4j.{Level, Logger} | |
import util.Random | |
import org.apache.spark.sql.functions._ | |
import scala.reflect.ClassTag | |
import org.apache.spark.{Partition, TaskContext,SparkContext} | |
import org.apache.spark.rdd.RDD | |
import org.apache.spark.Partitioner | |
import org.apache.spark.sql.types._ |
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
output "ip" { | |
value = "${google_compute_instance.default.network_interface.0.access_config.0.nat_ip}" | |
} |
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
// Configure the Google Cloud provider | |
provider "google" { | |
credentials = "${file("credentials.json")}" | |
project = "pilosa-sandbox" | |
region = "us-central1" | |
} | |
// Terraform plugin for creating random ids | |
resource "random_id" "instance_id" { | |
byte_length = 8 |
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 org.apache.spark.sql.SparkSession | |
import org.apache.log4j.{Level, Logger} | |
object SimpleApp { | |
def main(args: Array[String]) { | |
Logger.getLogger("org.apache.spark").setLevel(Level.WARN) | |
val logFile = "/mnt/disks/data1/yellow_tripdata_2015-01.csv" | |
val spark = SparkSession.builder.appName("Simple Application").getOrCreate() |
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
Script started on 2019-08-14 19:13:19+0000 | |
To run a command as administrator (user "root"), use "sudo <command>". | |
See "man sudo_root" for details. | |
]0;ubuntu@experiment-33bafd31037788eb: ~[01;32mubuntu@experiment-33bafd31037788eb[00m:[01;34m~[00m$ df | |
Filesystem 1K-blocks Used Available Use% Mounted on | |
udev 61870868 0 61870868 0% /dev | |
tmpfs 12376772 892 12375880 1% /run | |
/dev/sda1 9983232 1655520 8311328 17% / | |
tmpfs 61883856 0 61883856 0% /dev/shm |
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
. | |
└── taxi | |
├── cab_type | |
│ └── views | |
│ └── standard | |
│ └── fragments | |
├── cost_cents | |
│ └── views | |
│ └── bsig_cost_cents | |
│ └── fragments |
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
package main | |
import "fmt" | |
func takesString(str string) {} | |
func returnInterface(str string) interface{} { | |
return str | |
} |
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 | |
cluster = Cluster() | |
session = cluster.connect('hotbox') | |
stmt = session.prepare('INSERT INTO bitmap2 ( bitmap_id, block) VALUES (?,?);') | |
session.execute('truncate bitmap2') | |
out = open("/tmp/cass_py","w") | |
for ids in range(32): | |
val=0 | |
for i in range(0,64): |
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
package main | |
import ( | |
"fmt" | |
"github.com/gocql/gocql" | |
"os" | |
"time" | |
) | |
type bm struct { |
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
package main | |
import ( | |
"fmt" | |
"github.com/gocql/gocql" | |
"time" | |
) | |
type bm struct { | |
id int64 |