I hereby claim:
- I am kpmeen on github.
- I am kpmeen (https://keybase.io/kpmeen) on keybase.
- I have a public key whose fingerprint is 12E5 E9A3 377A E4A8 91A6 4BE7 F1CC 77FF 5B74 E217
To claim this, I am signing this object:
#!/bin/bash | |
if [[ $# -ne 1 ]]; then | |
echo "usage: $0 doc.md" | |
echo | |
echo 'Output will be printed to stdout, so you probably want to pipe to' | |
echo 'pbcopy or to a file or something.' | |
exit 1 | |
fi |
import fansi.Str | |
import org.slf4j.LoggerFactory | |
import scala.util.Try | |
import scala.util.control.NonFatal | |
object TablePrinter { | |
val logger = LoggerFactory.getLogger(TablePrinter.getClass) |
import shapeless._ | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// THE IMPLICIT CLASS THAT ALLOWS TO CALL #copy ON ANY SEALED TRAIT INSTANCE | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
object copySyntax { | |
implicit class CopySyntax[TypeToCopy](thingToCopy: TypeToCopy) { |
export CURR_IP_ADDRESS=$(ifconfig | awk '/inet /{print substr($2,0)}' | awk 'END{print}') |
#!/bin/sh | |
exec scala -savecompiled "$0" $@ | |
!# | |
// | |
// Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> | |
// Modified 2014 AI2 <http://www.allenai.org> | |
// | |
// This script will check that the commit is correctly formatted. It only checks files that are to be committed. | |
// To be run this file should be at `.git/hooks/pre-commit`. |
#!/usr/bin/env bash | |
# | |
set -euo pipefail | |
unset SBT_OPTS JVM_OPTS JDK_HOME JAVA_HOME | |
: ${TRAVIS_SCALA_VERSION:=2.11.8} | |
: ${SBT_TARGET:=$*} | |
: ${SBT_TARGET:=test} |
# Visual Studio Code | |
# https://code.visualstudio.com/Docs/setup | |
local _vsc_paths > /dev/null 2>&1 | |
_vsc_paths=( | |
"$HOME/Applications/Visual Studio Code.app" | |
"/Applications/Visual Studio Code.app" | |
) | |
for _vsc_path in $_vsc_paths; do |
I hereby claim:
To claim this, I am signing this object:
case class IO[A](unsafePerformIO: () => A) { | |
def map[B](ab: A => B): IO[B] = IO(() => ab(unsafePerformIO())) | |
def flatMap[B](afb: A => IO[B]): IO[B] =IO(() => afb(unsafePerformIO()).unsafePerformIO()) | |
def tryIO(ta: Throwable => A): IO[A] = | |
IO(() => IO.tryIO(unsafePerformIO()).unsafePerformIO() match { | |
case Left(t) => ta(t) | |
case Right(a) => a | |
}) | |
} | |
object IO { |
package com.cym_iot.training.testspark16 | |
import org.apache.spark.rdd.RDD | |
import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder | |
import org.apache.spark.sql.{Dataset, Encoder, SQLContext} | |
import org.apache.spark.{SparkConf, SparkContext} | |
import shapeless.tag | |
import shapeless.tag.@@ | |