I hereby claim:
- I am vpetro on github.
- I am vpetro (https://keybase.io/vpetro) on keybase.
- I have a public key ASAqUs7SS6nGXeG18s3IzwMrym0FoAVARzNW2iPd_d4hRQo
To claim this, I am signing this object:
import sys | |
import math | |
from operator import itemgetter | |
from functools import partial | |
def range(start, stop, step=1.): | |
"""Replacement for built-in range function. | |
:param start: Starting value. |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
### Keybase proof | |
I hereby claim: | |
* I am vpetro on github. | |
* I am vpetro (https://keybase.io/vpetro) on keybase. | |
* I have a public key ASADFzzLDKl3z7g-H4KHfdDHzN66rBKgfx9GX2iXs_MSugo | |
To claim this, I am signing this object: |
oss/ensime-server 2.0 λ s | |
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 | |
[info] Loading global plugins from /Users/petrov/.sbt/0.13/plugins | |
[info] Loading project definition from /Users/petrov/oss/ensime-server/project | |
[info] Updating {file:/Users/petrov/oss/ensime-server/project/}ensime-server-build... | |
[info] Done updating. | |
[info] Compiling 4 Scala sources to /Users/petrov/oss/ensime-server/project/target/scala-2.10/sbt-0.13/classes... | |
[error] /Users/petrov/oss/ensime-server/project/EnsimeBuild.scala:202: not found: value ensimeUseTarget | |
[error] ensimeUseTarget in Compile := Some((artifactPath in (Compile, packageBin)).value), | |
[error] ^ |
I hereby claim:
To claim this, I am signing this object:
function! OpenREPL() | |
if !exists("g:repl_terminal_id") | |
botright split enew | |
let g:repl_terminal_id = termopen("scala") | |
endif | |
endfunction | |
function! PasteScala(lines) | |
if !exists("g:repl_terminal_id") | |
call OpenREPL() |
scala> import scalaz.syntax.std.option._ | |
import scalaz.syntax.std.option._ | |
scala> val o: Option[Int] = Some(1) | |
o: Option[Int] = Some(1) | |
scala> o.cata(_ => 10, 20) | |
res0: Int = 10 |
case object P { | |
def isSorted[A](as: Array[A], ordered:(A,A) => Boolean): Boolean = { | |
as match { | |
case _ if as.isEmpty => true | |
case _ => as.tail.foldLeft((true, as.head)) { | |
case (t, i) => if (ordered(t._2, i)) (true, i) else (false, i) | |
}._1 | |
} | |
} |
import csv | |
class csvreader(object): | |
def __init__(self, filepath): | |
self._filename = filepath | |
reader = csv.DictReader( | |
open(self._filename, 'rU') | |
) | |
self.fieldnames = reader.fieldnames | |
self._rows = [ |
def add1(lst, val, n): | |
start, stop, step = 0, len(lst), 1 | |
cond = n == 0 | |
if n < 0: | |
start, stop = stop-1, start-1 | |
step = -1 | |
n = abs(n) | |
for idx in range(start, stop, step): |