This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package infra.slick | |
import com.github.tminglei.slickpg._ | |
trait PostGISProfile extends ExPostgresProfile with PgPostGISSupport { | |
object ExtendedAPI extends API with PostGISImplicits | |
override val api = ExtendedAPI | |
} | |
object PostGISProfile extends PostGISProfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package domain | |
import java.util.UUID | |
import org.locationtech.jts.geom.Point | |
case class Building(id: UUID, name: String, coordinate: Point) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolvers += Resolver.jcenterRepo | |
libraryDependencies ++= Seq( | |
"org.postgresql" % "postgresql" % "42.2.9", | |
"com.typesafe.slick" %% "slick" % "3.3.2", | |
"com.typesafe.slick" %% "slick-hikaricp" % "3.3.2", | |
"io.github.nafg" %% "slick-migration-api" % "0.7.0", | |
"com.github.tminglei" %% "slick-pg_jts_lt" % "0.18.1" exclude ("org.postgresql", "postgresql"), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nextRow(r: Stream[Long]) = | |
(0L #:: r).sliding(2).map(_.sum).toStream :+ 1L | |
val pascal = | |
continually(empty).scanLeft(Stream(1L)) { (r, _) => nextRow(r) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Usage: ./gitlab_group_checkout_all.py -g group_name -d target_dir | |
# Assumes there is a default configuration and python-gitlab is installed | |
# https://python-gitlab.readthedocs.io/en/stable/cli.html#cli-configuration | |
# Work with GitLab API V4 (gitlab-python version 1.6.x) | |
import getopt, shlex, subprocess, sys, gitlab |