Skip to content

Instantly share code, notes, and snippets.

View smdmts's full-sized avatar

Masatoshi Shimada smdmts

View GitHub Profile
@xerial
xerial / td-spark-usage.md
Last active September 20, 2022 11:19
td-spark usage notes

td-spark usage notes

What You Can Do With td-spark

  • Reading and writing tables in TD through DataFrames of Spark.
  • Running Spark SQL queries against DataFrames.
  • Submitting Presto SQL queries to TD and reading the query results as DataFrame.
  • If you use PySpark, you can use both Spark's DataFrames and Pandas DataFrames interchangeably.
@shunirr
shunirr / criminal_jc.md
Last active February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@xl1
xl1 / gist:fe779a817a9d4938193d
Last active May 6, 2024 03:35
Facebook API: 有効期限の長い Access Token を取得する

Facebook API: 有効期限の長い Access Token を取得する

tl;dr

  1. User Access Token を取得する
  2. それを使って長い期限のトークンを取得する
  3. /me/accounts?access_token={long_lived_token}
  4. 無期限のトークンが手に入る

API のバージョン

@xuwei-k
xuwei-k / build.sbt
Last active October 26, 2016 05:39 — forked from runarorama/gist:a8fab38e473fafa0921d
Coproduct Example
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-core" % "7.1.0-M7"
)
scalacOptions ++= Seq("-deprecation", "-language:_")
@runarorama
runarorama / gist:a8fab38e473fafa0921d
Last active April 13, 2021 22:28
Compositional application architecture with reasonably priced monads
sealed trait Interact[A]
case class Ask(prompt: String)
extends Interact[String]
case class Tell(msg: String)
extends Interact[Unit]
trait Monad[M[_]] {
def pure[A](a: A): M[A]