Skip to content

Instantly share code, notes, and snippets.

View JoshRosen's full-sized avatar

Josh Rosen JoshRosen

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="databricks-html-version" content="1">
<title>Casting structs - Databricks</title>
<meta charset="utf-8">
<meta name="google" content="notranslate">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF8">
diff --git before after
index bdf27c9..88b5282 100644
--- before
+++ after
@@ -1,3253 +1,3241 @@
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.spark:spark-core_2.11:jar:2.0.0-SNAPSHOT
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
This file has been truncated, but you can view the full file.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.spark:spark-core_2.11:jar:2.0.0-SNAPSHOT
[WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------

Keybase proof

I hereby claim:

  • I am joshrosen on github.
  • I am joshrosen (https://keybase.io/joshrosen) on keybase.
  • I have a public key whose fingerprint is DD10 7726 FCC2 C9F2 6BBE 0688 5CDE B147 5FD1 9FBE

To claim this, I am signing this object:

Flask-SQLAlchemy Caching

The following gist is an extract of the article Flask-SQLAlchemy Caching. It allows automated simple cache query and invalidation of cache relations through event among other features.

Usage

retrieve one object

# pulling one User object

user = User.query.get(1)

@JoshRosen
JoshRosen / scala.rb
Last active April 24, 2016 18:08
Homebrew formula for installing Scala 2.9.3
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/downloads/distrib/files/scala-docs-2.9.3.zip'
sha1 '633a31ca2eb87ce5b31b4f963bdfd1d4157282ad'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
This file has been truncated, but you can view the full file.
diff --git a/.generated-mima-member-excludes b/member-excludes-new
index 1ebc496..5c4b58c 100644
--- a/.generated-mima-member-excludes
+++ b/member-excludes-new
@@ -1,3 +1,7 @@
+akka.actor.Actor.aroundPostStop
+akka.actor.Actor.aroundPreRestart
+akka.actor.Actor.aroundPreStart
+akka.actor.Actor.aroundReceive
com.esotericsoftware.reflectasm.shaded.org.objectweb.asm.ClassVisitor.api
diff --git a/.generated-mima-class-excludes b/generate-class-excludes-new
index 68d31fa..7d3b0b6 100644
--- a/.generated-mima-class-excludes
+++ b/generate-class-excludes-new
@@ -6,17 +6,13 @@ org.apache.spark.AccumulatorParam$StringAccumulatorParam$
org.apache.spark.AccumulatorParam$UpdatedBlockStatusesAccumulatorParam$
org.apache.spark.Accumulators
org.apache.spark.Accumulators#
-org.apache.spark.Accumulators#
org.apache.spark.Accumulators$
package org.apache.spark.sql
import java.io.File
import org.apache.spark.sql.catalyst.expressions.GenericRow
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.types.StructType
import scala.util.Random
@JoshRosen
JoshRosen / gist:7668400
Created November 26, 2013 23:49
decaf's imports, generated with snakefood (http://furius.ca/snakefood/): `sfood-imports ./decaf | cut -d' ' -f2 | sort -u`
bisect
collections.defaultdict
copy
cPickle
cProfile
cStringIO
ctypes
datetime
decaf.base
decaf.base.SplitLayer