Skip to content

Instantly share code, notes, and snippets.

@elan2wang
elan2wang / engine.c
Created December 8, 2020 03:10 — forked from druska/engine.c
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
/** \file crc32.cpp
* A number of implementations of a CRC32 algorithm. This program will only work on a CPU with SSE 4.2 support.
*
* Compile with:
*
* $> g++ --std=c++17 crc32.cpp -O3 -fwhole-program
*
* The output is a CSV file showing the timings of the various implementations.
**/
I spend some time to have some test, all are redhat 6.2, here is the test.
1. Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet(bnx2), host8, E5606x2
# lspci | grep net
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 29, 2024 08:12
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@schmmd
schmmd / maven.vim
Created October 27, 2011 18:17
vim maven compiler file
" Compiler: maven
" Author: Michael Schmitz <michael@schmitztech.com>
" Last Change: 10/27/2011
if exists("current_compiler")
finish
endif
let current_compiler = "maven"
set makeprg=mvn\ clean\ compile
> Tell me a little about your self and these various projects that you have worked on / are currently working on.
I'm a rising Junior studying Computer Science. I'm currently interning as a software engineer in San Francisco, for Inkling; revolutionizing the textbook industry. Inkling creates the most interactive and rich textbook experience ever seen in the digital textbook market. Instead of just providing static PDFs, Inkling architects each textbook using software engineering practices to bring a unique experience for each book.
Outside of Inkling I am on the core team for an open source project called Cappuccino (http://cappuccino.org). Cappuccino was started by three guys who left their day jobs to start a small company called 280North. These guys are perhaps some of the most brilliant people I've ever met. Tom Robinson has revolutionized server side javascript, Ross Boucher worked on the back end of iTunes, and Francisco Tolmasky built mobile safari on the original iPhone team. Last year the company
@joestump
joestump / gist:938824
Created April 23, 2011 17:48
An example of a python-oauth2 provider
class BaseRequestHandler(tornado.web.RequestHandler):
"""Base class for all SimpleGeo request handlers."""
def _handle_request_exception(self, e):
status_code = getattr(e, 'status_code', 500)
self.set_status(status_code)
error = {
'code' : status_code,
'message' : str(e)
@Me1000
Me1000 / CPWindow+animations.j
Created April 22, 2011 18:08
Pretty window animations for Cappuccino CPWindow.
/*!
Created by Randy Luecke April 22nd 2011
Copyright RCLConcepts, LLC.
All right reserved.
This code is available under the MIT license.
*/
@bcg
bcg / resuls
Created April 7, 2011 14:21
Hipster C + ZeroMQ + Redis MQ
zmqd.c = 45k rps
@earldouglas
earldouglas / RemoteAkka.scala
Created March 20, 2011 02:26
Remotely load and register Akka Actor classes at runtime (see https://github.com/JamesEarlDouglas/akka-remote-class-loading)
package com.earldouglas.remoteakka
import akka.actor.Actor
import akka.actor.Actor._
case object Greeting
case class Jar(val bytes: Array[Byte])
case class RegisterRemote(val name: String, val className: String)
object Runner {