Skip to content

Instantly share code, notes, and snippets.

View nebulorum's full-sized avatar

Thomas Santana nebulorum

View GitHub Profile
@dcsobral
dcsobral / Printer.scala
Created September 10, 2013 19:15
Prints a string as if it was produced by REPL. However, it has none of the magic the REPL has for printing types like arrays, or using quotes for empty strings on collections, etc.
object Printer {
import scala.reflect.runtime.currentMirror
import scala.tools.reflect.ToolBox
val toolBox = currentMirror.mkToolBox()
def print(s: String) = {
val tree = toolBox parse s
val typedTree = toolBox typeCheck tree
val tpe = typedTree.tpe.widen
val result = toolBox eval tree
@follower46
follower46 / ObjectStorageUploader.py
Last active November 20, 2017 15:30
Object Storage Uploader Script
# ================================================================================
# ObjectStorageUploader.py
# © Copyright IBM Corporation 2014.
# LICENSE: MIT (http://opensource.org/licenses/MIT)
# ================================================================================
import argparse
import os
import math
import http.client
package com.rr.experiment
import org.specs2.ScalaCheck
import org.specs2.mutable._
import org.scalacheck._
import scalaz._
import scodec._