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 org.mbari.vaa.tv.graphql | |
import io.circe._ | |
import io.circe.parser._ | |
import okhttp3._ | |
import org.mbari.vaa.tv.domain.CirceCodecs.{given} | |
import org.mbari.vaa.tv.domain.Track | |
import java.util.UUID | |
import scala.concurrent.{ExecutionContext, Future} |
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
import io.circe._ | |
import io.circe.parser._ | |
import okhttp3._ | |
import scala.concurrent.{ExecutionContext, Future} | |
import scala.util.Using | |
/** | |
* @author Brian Schlining | |
*/ | |
object GraphQL { |
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
concept,image,x,y,width,height | |
Nanomia bijuga,http://dsg.mbari.org/path/image.png,10,20,30,40 | |
Rock,http://dsg.mbari.org/path/image.png,21,22,23,24 |
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
import scala.xml.Elem | |
object VocParser { | |
def parse(xml: Elem): Voc = { | |
val filename = (xml \ "filename").text | |
val objects = xml \ "object" | |
val vocObjects = objects.map(n => { | |
val name = (n \ "name").text | |
// VOC is 1-based index. Convert to 0 based. |
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
case class Voc( | |
filename: String, | |
objects: Seq[VocObject] = Nil | |
) | |
case class VocObject( | |
name: String, | |
xmin: Int, | |
ymin: Int, | |
xmax: Int, |
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
<annotation> | |
<filename>left_2019-11-04T16.59.22.762426Z.jpg</filename> | |
<object> | |
<name>Outer filter</name> | |
<bndbox> | |
<xmin>738</xmin> | |
<ymin>39</ymin> | |
<xmax>831</xmax> | |
<ymax>130</ymax> | |
</bndbox> |
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 amm | |
import $ivy.`io.circe::circe-core:0.13.0` | |
import $ivy.`io.circe::circe-generic:0.13.0` | |
import $ivy.`io.circe::circe-parser:0.13.0` | |
import io.circe._ | |
import io.circe.generic.semiauto._ | |
import io.circe.parser._ | |
import io.circe.syntax._ |
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
[ | |
{ | |
"uuid": "037fa69d-cc52-4d9c-90e1-68d12c455fbd", | |
"name": "My Name", | |
"blobs" : [ | |
{ | |
"uuid": "77bcfc71-1c2a-4872-b11d-501d65afd01a", | |
"url": "https://www.foo.bar/path/to/blob1", | |
"checksum": "MTIzNDU2Nzg5" | |
}, |
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 firebase.jwt; | |
import javax.inject.Inject; | |
import com.google.firebase.auth.FirebaseAuthException; | |
import io.micronaut.http.HttpRequest; | |
import io.micronaut.http.annotation.*; | |
import io.micronaut.security.annotation.Secured; | |
import io.micronaut.security.authentication.UserDetails; | |
import io.micronaut.security.rules.SecurityRule; |
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 firebase.jwt; | |
import java.util.Optional; | |
public class AuthHeader { | |
private final String type; | |
private final String token; | |
public AuthHeader(String type, String token) { | |
this.type = type; |