Skip to content

Instantly share code, notes, and snippets.

Cameron Hotchkies cameronhotchkies

Block or report user

Report or block cameronhotchkies

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cameronhotchkies /
Created Aug 5, 2019
Simple python script for alphavantage API
#!/usr/bin/env python3
import urllib.request
import urllib.parse
import json
api_key = 'demo'
ticker = 'MSFT'

Keybase proof

I hereby claim:

  • I am cameronhotchkies on github.
  • I am chotchkies ( on keybase.
  • I have a public key ASBwcIFwwOHKaDwzi20fYJ7PyirAdi_mBRv7dplUaEzbWAo

To claim this, I am signing this object:

cameronhotchkies / HappySequence.scala
Created Jun 19, 2015
Like Future.sequence but discards all Future.failure results
View HappySequence.scala
def happySequence[A](source: Seq[Future[A]]) = {
val optioned = { f => {
case _ => None
View SlickMapping3.scala
import org.joda.time.DateTime
import play.api.db.slick.DatabaseConfigProvider
import slick.driver.JdbcProfile
import play.api.Play.current
object SlickMapping {
protected val dbConfig = DatabaseConfigProvider.get[JdbcProfile](current)
import dbConfig._
import dbConfig.driver.api._
cameronhotchkies / SlickMapping.scala
Created Jun 3, 2015
Common Joda DateTime Mapping
View SlickMapping.scala
import play.api.db.slick.Config.driver.simple._
import org.joda.time.DateTime
import java.sql.Timestamp
object SlickMapping {
implicit def jodaDateTimeMapping =
MappedColumnType.base[DateTime, Timestamp](
dt => new Timestamp(dt.getMillis),
ts => new DateTime(ts.getTime))
View Md4Digest.scala
package com.semisafe.cryptopals
* Implementation of MD4 in pure Scala
* derived from the RSA Data Security, Inc. MD4
* Message-Digest Algorithm (
* This was implemented as part of the Matasano Crypto Challenges
View Sha1Digest.scala
package com.semisafe.cryptopals
* Implementation of SHA-1 in pure Scala
* This was implemented as part of the Matasano Crypto Challenges
* Having a native implementation of SHA-1 is required for the
* fourth set of challenges, building your own isn't, so feel
cameronhotchkies / gist:5620426
Created May 21, 2013
Why you shouldn't go back and forth on UTF-8 strings for binary data
View gist:5620426
// Run in a REPL
val bl : List[Byte] = List(-78,-5,-112,-31,127,-59,1,94,12,7,84,112,82,41,-95,50)
val ba = bl.toArray
val bs = new String(ba, "UTF-8")
// Notice they aren't all equal
You can’t perform that action at this time.