Skip to content

Instantly share code, notes, and snippets.

case class Summary(results: IndexedSeq[Sentence]) extends Traversable[String] {
lazy val charCount = if (results.isEmpty) 0 else results.map(_.sentence.size).sum
def foreach[U](f: String => U) {
results.foreach( s => f(s.sentence) )
}
def takeChars(limitCharCount: Int): Summary = {
var count = 0
$boxsize: 20;
$gutter: 5;
$x1: $boxsize + $gutter;
$x2: $x1 * 2;
$duration: 7;
.loader {
position: absolute;
top: 50%;
@stanpalatnik
stanpalatnik / ParquetToArrow.java
Created June 5, 2019 18:35 — forked from animeshtrivedi/ParquetToArrow.java
Example program to convert Apache Parquet data to Apache Arrow
/* This code snippet is a part of the blog at
https://github.com/animeshtrivedi/blog/blob/master/post/2017-12-26-arrow.md
*/
import com.google.common.collect.ImmutableList;
import org.apache.arrow.memory.RootAllocator;
import org.apache.arrow.vector.*;
import org.apache.arrow.vector.dictionary.DictionaryProvider;
import org.apache.arrow.vector.types.FloatingPointPrecision;
import org.apache.arrow.vector.types.pojo.ArrowType;

Keybase proof

I hereby claim:

  • I am stanpalatnik on github.
  • I am stanpal (https://keybase.io/stanpal) on keybase.
  • I have a public key ASB1JcDDpsiQMR9Vj7ogyY35woOI46gId3Q4wMpdb3vDjgo

To claim this, I am signing this object:

@stanpalatnik
stanpalatnik / istio-fips-build.sh
Created October 4, 2023 15:33 — forked from jeesmon/istio-fips-build.sh
Istio FIPS Build
ISTIO_VERSION=${ISTIO_VERSION:-1.16.1}
git clone https://github.com/istio/proxy.git --depth 1
pushd proxy
git fetch --tags
git checkout "${ISTIO_VERSION}"
# Compile envoy with FIPS: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/security/ssl#fips-140-2
echo "build --define boringssl=fips" >> .bazelrc
BUILD_WITH_CONTAINER=1 make build_wasm build build_envoy exportcache