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
FROM innoq/docker-alpine-java8 | |
RUN apk add --update --no-cache \ | |
bash \ | |
build-base curl \ | |
make \ | |
gcc \ | |
git | |
RUN git clone https://github.com/pjreddie/darknet.git && echo "#include <sys/select.h>\n"|cat - ./darknet/examples/go.c > /tmp/out && mv /tmp/out ./darknet/examples/go.c |
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 main | |
import ( | |
"fmt" | |
"gobot.io/x/gobot" | |
"gobot.io/x/gobot/api" | |
"gobot.io/x/gobot/platforms/firmata" | |
"gobot.io/x/gobot/drivers/gpio" | |
"time" | |
"os" |
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 main | |
import ( | |
"fmt" | |
"gobot.io/x/gobot" | |
"gobot.io/x/gobot/api" | |
"gobot.io/x/gobot/platforms/firmata" | |
"gobot.io/x/gobot/drivers/gpio" | |
"time" | |
"os" |
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 main | |
import ( | |
"fmt" | |
"time" | |
) | |
type G interface{} | |
func producer(ch chan []G, d time.Duration) { | |
var i 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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type G interface{} | |
type S G |
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 main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type G interface{} | |
type F func(...G) G |
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 main | |
import ( | |
"fmt" | |
"errors" | |
) | |
type G interface{} | |
type X struct { |
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 logicalguess.union | |
import shapeless.ops.hlist.Selector | |
import shapeless.{::, HList, HNil, Typeable} | |
import scala.reflect.runtime.universe._ | |
trait HListMContainer { | |
type L <: HList | |
val hv: L |
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 logicalguess.union | |
import scala.reflect.runtime.universe._ | |
trait DepTyped { | |
type U <: Union | |
val tu: Typed[U] | |
def add[In : TypeTag](in: In)= new DepTyped { | |
override type U = DepTyped.this.U | In |
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 logicalguess.receiver | |
import scala.reflect.ClassTag | |
case class Call[U <: Union](pf: PartialFunction[Any, Any]) { | |
import Call._ | |
def union[In](f: Function[In, Any])(implicit ct: ClassTag[In]) = Call[U | In](pf.orElse(downcast(f))) |
NewerOlder