Skip to content

Instantly share code, notes, and snippets.

View NicolasRouquette's full-sized avatar

Nicolas Rouquette NicolasRouquette

  • Jet Propulsion Laboratory
  • Pasadena, Califormia
View GitHub Profile
@NicolasRouquette
NicolasRouquette / graph.lean
Last active November 6, 2020 19:52 — forked from MonoidMusician/graph.lean
Graph Theory: watershed
-- A basic framework for graph theory on multidigraphs in Lean
-- and a proof that no_watershed_condition is sufficient to
-- establish that a graph has a unique sink for each vertex
--
-- I hope to give some introduction to the syntax of how Lean works here,
-- but I assume some familiarity with functions, pattern matching,
-- type theory, and proofs.
--
-- The most important thing to note is that `begin` and `end` delineate
-- sections of code in "tactic/interactive proof mode" (as opposed to
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFz4QfkBEADka2rH/kSD1vvNvVT9E04N14pRi4s9qg7lu2i4vsXLOKOO49nR
YHCN3DVM1FnPNdkb3kHThvPZh+afTsAzJDa2GG51A+Kfr3+vrZTEBvuCuFFHP8Dd
zUw38csHjWBMex4RQ7Hil6tnuJ3BHKwhC2rmRDjnyv5hYaDhclW1rC8k1yheX4Z7
27jYe0H2M4Gb4BebdtzFZzOI7Iz+1GBCqyZPc/QC8eoVrgzrZ6YkrmmxrqREYQLf
qbze3KGhju+nC/AymrThykvQ54l/myCBcU4BVqJWl0uUsvm5xnQgEUqlnxebI2iC
7lq3KiKhflTqHYhTgcln2y04TDQNJ+/jxOSbM5TKCbMb+WPPSBHNH3XbmsjvmUDs
+yqcWXcodAfhAes9RckTT5EkjAMdfMEbWxLS+6JV3cHetZGlhsRLSVZgqeyCQ1H6
BUrQ8Gbp66+fz45cYlZDnYT/8AZGIx+CjOeTe8IhjNTwhwdYheeMBEvDioFtbtww
@NicolasRouquette
NicolasRouquette / s2.scala
Last active November 28, 2017 22:34
frameless: Compilation errors when SmartProjecting to a case class of 1 field
package tags
import frameless.{TypedColumn, TypedDataset}
import frameless.ops.SmartProject
import frameless.{CatalystCast, Injection}
import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession
import scala.{App,Int}
import scala.Predef.{require,String}
@NicolasRouquette
NicolasRouquette / Main1.scala
Last active July 10, 2017 23:11
http4s / fs2 version of Cafe examples
package cafe
import java.lang.{Integer,System}
import fs2._
import scala.{App,Long,StringContext}
object Main1 extends App {
@NicolasRouquette
NicolasRouquette / SequentialFetcher.scala
Created July 9, 2017 00:24
Sequential crawler in http4s 0.17.0-M3 & circe 0.7.0
/*
* Copyright 2016 California Institute of Technology ("Caltech").
* U.S. Government sponsorship acknowledged.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*