Skip to content

Instantly share code, notes, and snippets.

View shadaj's full-sized avatar

Shadaj Laddad shadaj

View GitHub Profile
@shadaj
shadaj / scala-cnn-training-on-gpus-with-tensorflow.ipynb
Last active October 8, 2021 21:07
Scala CNN Training on GPUs with Tensorflow.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadaj
shadaj / scalapy-tensorflow.ipynb
Last active November 27, 2020 23:56
ScalaPy TensorFlow.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadaj
shadaj / circe-colab-demo.ipynb
Last active February 7, 2020 18:37
Circe Colab Demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadaj
shadaj / scala-in-colab-template.ipynb
Last active October 3, 2022 20:56
Scala in Colab Template.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadaj
shadaj / install-scala-in-colab.ipynb
Last active January 18, 2024 13:29
Install Scala in Colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ReactDOM.render(
ApolloProvider(ApolloProvider.Props(client))(
div(
PostsView.WithData(()) // we pass in () because there are no variables for the query
)
),
reactContainer
)
val client = ApolloClient(ApolloClientOptions(
networkInterface = Some(createNetworkInterface(NetworkInterfaceOptions(
uri = Some("https://1jzxrj179.lp.gql.zone/graphql")
)))
))
package com.apollographql.scalajs
import me.shadaj.slinky.core.StatelessComponent
import me.shadaj.slinky.core.facade.ReactElement
import me.shadaj.slinky.web.html._
import scala.scalajs.js
import scala.scalajs.js.annotation.ScalaJSDefined
object PostsView extends StatelessComponent {
query AllPosts {
posts {
id
title
votes
}
}
package com.apollographql.scalajs
import me.shadaj.slinky.web.ReactDOM
import me.shadaj.slinky.web.html._ // imports tags, such as "h1"
import scala.scalajs.js.JSApp
import org.scalajs.dom.{document, html}
import scala.scalajs.js