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
/** | |
* Semi-automatic derivation done similarly to how Kittens does it | |
* | |
* @see https://github.com/typelevel/kittens/blob/master/core/src/main/scala/cats/derived/package.scala | |
* */ | |
final object generic { | |
final object semi { | |
def deriveSchema[A](implicit ev: MkAvroSchema[A]): HasAvroSchema[A] = ev | |
} |
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 esplayground | |
import akka.Done | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.stream.ActorMaterializer | |
import akka.stream.scaladsl.{Sink, Source} | |
import eventstore.Content.Json | |
import eventstore.{EventData, EventNumber, EventStoreExtension, EventStream, WriteEvents} |
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
public func streamMessages(from startOffset: Offset = Offset(value: 0), toExclusive endOffsetOpt : Offset? = .None, | |
includeTransient: Bool = true) -> SignalProducer<Message, NoError> { | |
func streamMessagesChunk(from: Offset) -> SignalProducer<Message, NoError> { | |
func waitForNewMessageAvailable(from: Offset) -> SignalProducer<Offset?, NoError> { | |
return self.lastOffsetIncludingTransient(includeTransient).producer | |
.filter{ offsetOpt in offsetOpt.map {offset in offset >= from } ?? false } | |
.take(1) | |
} | |
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
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partnerId=OM,isExternal=true value=1 1432258851872 | |
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partnerId=OM,isExternal=true value=1 1432326384353 | |
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partnerId=OM,isExternal=true value=1 1432253103199 | |
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partnerId=OM,isExternal=true value=1 1432296867591 | |
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partnerId=OM,isExternal=true value=1 1432318511360 | |
kpi.video_downloads.requested.tic,videoId=0cd8a04b-61a4-4bb3-8e1c-faf8be10bb2f,accountId=0291e400-62c1-4709-bfbb-fdeec06c54c4,partner |
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
#!/bin/bash | |
USERS=10 | |
DAYS=30 | |
MAX_USAGE_SECONDS=$((120*60)) | |
START_TIME=1388534400000 | |
MILLIS_PER_DAY=$((1000*60*60*24)) | |
COLLECTION="kpi.weartime.sync.allaccounts.seconds" | |
generateUserData() |
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
OMsignal, Montreal | http://www.omsignal.com - | |
Full Stack Scala/iOS/NodeJS/Machine Learning/etc Software Engineer [REMOTE or LOCAL] | |
OMsignal is made possible by the expertise of Smart Textile experts, | |
Data/Bio Scientists, Hardware, Firmware and | |
Software Engineers. Please note that this offer is mostly focused on | |
Full Stack Engineers, but we are also looking to | |
hire smart Data Scientists who have an interest in biodata and possibly | |
people who could help bridging BLE/MSP firmware and driver development. |
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 SdkSignInCommand(accountId: UUID, appId: String, deviceId: String) | |
case class SdkSignInConfirmation( | |
accountId: UUID, | |
firstName: String, | |
lastName: String, | |
email: String, | |
pairingKey: Int, | |
sdkId: UUID, | |
isSdkLinkedToAccount: Boolean, | |
boxLink: Option[DisplayableBoxLink] |
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
____ _ _ | |
| _ \ ___ ___ ___(_) __| | ___ _ __ | |
| |_) / _ \/ __|/ _ \ |/ _` |/ _ \| '_ \ | |
| __/ (_) \__ \ __/ | (_| | (_) | | | | | |
|_| \___/|___/\___|_|\__,_|\___/|_| |_| |
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
def bucketHourOpenClosed : joda.Interval = { | |
val hourTruncated = dateTime.withTime(dateTime.getHourOfDay, 0, 0, 0) | |
if(dateTime == hourTruncated){ | |
new joda.Interval(dateTime.minusHours(1),dateTime) | |
} else { | |
new joda.Interval(hourTruncated,hourTruncated.plusHours(1)) | |
} | |
} |
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
{"inhalationStartedEvents":[{"volume":5000.5,"name":"InhalationStartedEvent","timestamp":"2013-10-03 18:40:52 +0000"}],"breathingCycleDetectedEvents":[{"volumeOnInhalationStart":2000,"inhalationEnd":"2013-10-03 18:40:53 +0000","name":"BreathingCycleDetectedEvent","exhalationEnd":"2013-10-03 18:41:01 +0000","volumeOnExhalationStart":500,"inhalationStart":"2013-10-03 18:40:52 +0000","exhalationStart":"2013-10-03 18:40:55 +0000"}],"breathingQualitySampledEvents":[{"end":"2013-10-03 18:40:53 +0000","ok":true,"noisyAbdominalBelt":false,"abdominalBeltBaselineShift":false,"name":"BreathingQualitySampledEvent","abdominalBeltDisconnected":false,"thoracicBeltBaselineShift":true,"thoracicBeltDisconnected":true,"start":"2013-10-03 18:40:52 +0000","noisyThoracicBelt":true}],"stepDetectedEvents":[{"name":"StepDetectedEvent","timestamp":"2013-10-03 18:40:52 +0000"},{"name":"StepDetectedEvent","timestamp":"2013-10-03 18:40:53 +0000"}],"sessionStartedEvents":[{"hexoskinSerialNumber":"XV1","hexoskinHardwareVersion":"V23","shir |
NewerOlder