Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeffrey N. Davis penland365

View GitHub Profile
View la-tech-2020-offense.md

Louisiana Tech Bulldogs 2020 Staff and Offense Scouting Report

Prepared by: penland365 Finalized: 09/07/2020

Table of Contents

  • Staff Overview
  • Roster Overview
  • Offense
View short.tsv
date high low
20101001 59.5 57.0
20101002 59.5 53.4
20101003 59.0 53.4
20101004 59.4 54.7
20101005 58.3 52.7
20101006 62.1 54.5
20101007 60.8 53.4
20101008 61.0 52.5
20101009 62.4 52.9
@penland365
penland365 / graphq-meetup.md
Last active Jan 28, 2019
(cons (clojure graphql))
View graphq-meetup.md

(cons (clojure graphql))

Graphqls' declarative schemas and stringified strong typing cons* together perfectly with Clojure's dynamic typing, homoiconicity**, and easy concurrency.

We will take our first steps into the Clojure ecosystem and how it can work closely with Graphql. We will show how to create a simple Clojure app, how to read a LISP, how to understand de-structuring, and how to read an EDN, extensible data notation, file.

@penland365
penland365 / EngineState.scala
Last active Jul 18, 2018
Discussion w/ Delila
View EngineState.scala
// so you have something like this?
def respond(state: EngineState): Future[EngineState] = {
}
def respond(state: EngineState): Future[EngineState] = {
state.transaction match {
case Throw(_) =>
val transaction = Transaction(state.request.conversation, UnrecognisedCommand, Vector.empty)
val request = ResponseRequest(state.request.conversation, transaction)
View StreamingRecognitionConfig.java
private RecognitionConfig buildRecogintionConfig {
return com.google.cloud.speech.v1.RecognitionConfig.newBuilder()
.setEncoding(LINEAR16)
.setLanguageCode("en-US")
.setSampleRateHertz(16000)
.addSpeechContexts(speechContexts) // attached
.build();
}
private StreamingRecognitionConfig buildStreamingRecognitionConfig {
@penland365
penland365 / taste.scala
Created Dec 8, 2017
Scala Programming Taste
View taste.scala
// Which of these is a better style? Is there much of a difference?
def createMicrosoftAudio0(utterance: Utterance, svc: MsSynthSvc = MicrosoftSpeech.Synthesize): Future[SynthesizedSpeech] = {
if(!utterance.text.isDefined) return Future.exception(new UtteranceTextNotFound(utterance))
val req = SynthesizeRequest(utterance.convo.id, utterance.text.get)
for {
resp <- svc(req)
} yield SynthesizedSpeed(resp._1, resp._2)
}
@penland365
penland365 / ServerDispatcher.scala
Last active Dec 8, 2015
Potential Finagle ServerDispatcher Annotations solution
View ServerDispatcher.scala
package com.twitter.finagle.dispatch
import com.twitter.finagle.context.Contexts
import com.twitter.finagle.tracing.{Annotation, Trace}
import com.twitter.finagle.transport.Transport
import com.twitter.finagle.{Service, NoStacktrace, CancelledRequestException}
import com.twitter.util._
import java.util.concurrent.atomic.AtomicReference
import scala.collection.mutable.ListBuffer
@penland365
penland365 / decode.scala
Created Aug 6, 2015
Argonaut decoding alternating JSON type
View decode.scala
//In this case, we are decoding a type `Teams` from a third party service
//If `Teams` has any elements, the presented JSON is an Array of `Team`
//If `Teams` is empty, is is suppoed to be Optional. However, sometimes when `Teams` is empty the service returns an empty JSON object
import argonaut._, Argonaut._
case class Team(id: Int, name: String)
object Team {
implicit val decodeTeamJson: DecodeJson[Team] = { DecodeJson(h => for {
@penland365
penland365 / package.scala
Last active Aug 29, 2015
Super basic finch-client type layout.
View package.scala
package io.finch
import argonaut._, Argonaut._
import com.twitter.finagle.httpx.path.Path
package object client {
implicit def decodeStrResource: DecodeResource[String] = new DecodeResource[String] {
def apply(r: Resource): String = r.body
}
@penland365
penland365 / tmux-up
Created May 19, 2015
Basic Tmux Script
View tmux-up
#! /usr/bin env bash
SESSION_NAME=""
tmux has-session -t $SESSION_NAME &> /dev/null
if [ $? -ne "0" ]
then
tmux new-session -d -s $SESSION_NAME
tmux split-window -h -p 40
tmux split-window -v -p 40
tmux send-keys -t 0 "vim" C-m
You can’t perform that action at this time.