Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
@ import $ivy.{`com.chuusai::shapeless:2.3.3`} | |
import shapeless._, ops.hlist.Align, ops.hlist.SelectAll, SelectAll._ | |
class Transform[T] { | |
// The fun stuff. Given an S, returns a T, if S has the right (subset of) fields | |
def apply[S, SR <: HList, TR <: HList](s: S)( | |
implicit | |
genS: LabelledGeneric.Aux[S, SR], |
class CaseClassDeserializer[CC](isKey: Boolean)(implicit format: RecordFormat[CC]) extends Deserializer[CC] with Logging { | |
private val deserializer = new KafkaAvroDeserializer(null, Map( | |
AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG -> Config.tracktivity.kafka.connect.`schema-registry-url`, | |
KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG -> "false" | |
).asJava) | |
override def configure(configs: java.util.Map[String, _], isKey: Boolean): Unit = {} | |
override def close(): Unit = deserializer.close() |
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf | |
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf | |
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf | |
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf | |
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf | |
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf | |
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf | |
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf |
# I have forked a much more complete cheat sheet, but is complete at the expense of being accessable | |
# You can find that bigger cheat sheet here https://gist.github.com/fathergoose/3fbc3b5f6c0ba3cbe367b18030b39aba | |
# things in <angleBrackts> are variables to be replaced for a spcific instance of the command | |
# Getting Help | |
man <command> # Read the man(ual) page entry for a given command (detailed help) | |
<command> --help # This *usually* prints a short summary of a command's options and arguments | |
# Directories |
This Gist contains an example of how to write a a FIX protocol parser using QuickFIX/J. | |
It also includes the XML data dictionary and a sample FIX message file with one OrderList message. | |
If you want to build/run this, you will need to link with QuickFIX/J and Jackson jars: | |
quickfixj-all-1.5.3.jar | |
mina-core-1.1.7.jar | |
slf4j-api-1.6.3.jar | |
log4j-1.2.15.jar | |
jackson-core-2.5.1.jar | |
jackson-databind-2.5.1.jar | |
jackson-annotations-2.5.1.jar |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |