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
ack | |
adns | |
ansible | |
ant | |
apache-spark | |
argtable | |
arpack | |
augeas | |
autoconf | |
autojump |
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
territory_id | first_name | last_name | employee_id | ||
---|---|---|---|---|---|
XMOWSM54 | Peter | Alexander | [email protected] | E00QTOF | |
XMRNBM47 | Samuel | Lopez | [email protected] | E00UBFA | |
XMOWMF87 | Elizabeth | Stone | [email protected] | E00WDYK | |
XMZWPW22 | William | Carroll | [email protected] | E00VDYQ | |
XMOWRW46 | Carolyn | Little | [email protected] | E00HUPR | |
XMZNDX26 | Marilyn | Robinson | [email protected] | E00ZJGS | |
XMZNAI68 | Christopher | Rogers | [email protected] | E00DCHF | |
XMONCD74 | Anthony | Allen | [email protected] | E00ACEQ | |
XMRNMD81 | Martin | Baker | [email protected] | E00DKRZ |
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
#WARNING: Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy. | |
#First, `cd` into the parent dir for all of your `sbt`/`maven` projects (I assume you have one of those) | |
find "$(cd ..; pwd)" -type d -name "target" -exec sudo tmutil addexclusion -p {} + |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You 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 | |
* |
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 com.combient.sparkjob.tedsds | |
/** | |
* Created by olu on 09/03/16. | |
*/ | |
import org.apache.spark.{SparkContext, SparkConf} | |
import org.apache.spark.sql.hive.HiveContext | |
import org.apache.spark.sql.expressions.Window | |
import org.apache.spark.sql.functions._ |
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/sh | |
# | |
# Automatic configuration of a VPN on GCE debian-7-wheezy server. | |
# Tested only on debian-7-wheezy. | |
# | |
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 | |
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ | |
# | |
# Thx to: https://github.com/sarfata/voodooprivacy/blob/master/voodoo-vpn.sh for the code/idea | |
# |
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 test; | |
import java.lang.{reflect => jreflect} | |
import scala.reflect.mirror._ | |
/** | |
* Scala counterpart of java.lang.reflect.InvocationHandler | |
*/ | |
trait InvocationHandler { | |
def invoke(proxy: AnyRef, method: Symbol, args: Array[AnyRef]): AnyRef |
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
scala> // Problem: Some java apis return nulls. | |
scala> System.getenv("PROBABLY_NOT_DEFINED_RUBISH_NAME") | |
res0: java.lang.String = null | |
scala> System.getenv("PROBABLY_NOT_DEFINED_RUBISH_NAME").split(",") | |
java.lang.NullPointerException | |
at .<init>(<console>:7) | |
at .<clinit>(<console>) | |
at RequestResult$.<init>(<console>:9) |
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
trait SqlParser extends scala.util.parsing.combinator.RegexParsers { | |
// ignore ordinary whitespace, line comments, and inline comments between combinators | |
override val whiteSpace = "(?sm)(\\s*(?:--.*?$|/\\*((?!\\*/).)*\\*/)\\s*|\\s+)+".r | |
def sqlStatement: Parser[Statement] = | |
opt(whiteSpace) ~> positioned( procedureCallStatement | |
| insertStatementCustom | |
| insertStatement | |
| updateStatement |
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
class HeartMonitor(millisUntilDeclaredDead: Long) extends Actor with FSM[Health, Long] { | |
import System.{currentTimeMillis => now} | |
val nextTest = 1000L | |
notifying { | |
case Transition(Stale, Alive) => | |
log.info("HeartMonitor received initial heartbeat") | |
case Transition(Dead, Alive) => | |
log.info("HeartMonitor noticed we are back alive again") | |
case Transition(_, Dead) => |
NewerOlder