Skip to content

Instantly share code, notes, and snippets.

View paulhendricks's full-sized avatar

Paul Hendricks paulhendricks

View GitHub Profile

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@paulhendricks
paulhendricks / latency.txt
Created May 28, 2018 03:45 — forked from understeer/latency.txt
HPC-oriented Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference/hit 1.5 ns 4 cycles
Floating-point add/mult/FMA operation 1.5 ns 4 cycles
L2 cache reference/hit 5 ns 12 ~ 17 cycles
Branch mispredict 6 ns 15 ~ 20 cycles
L3 cache hit (unshared cache line) 16 ns 42 cycles
L3 cache hit (shared line in another core) 25 ns 65 cycles
Mutex lock/unlock 25 ns
L3 cache hit (modified in another core) 29 ns 75 cycles
#!/usr/bin/env julia
using Luxor
Drawing(500, 500, "/tmp/julia-flowers.png")
background("white")
function juliaflowers(cpos::Point, radius; petals=30, outercircleratio=0.75, innercircleratio=0.65)
# clockwise, from bottom LEFT...
points3 = ngon(cpos, radius, 3, pi/6, vertices=true)
@paulhendricks
paulhendricks / hmm.py
Created August 22, 2016 18:03 — forked from fonnesbeck/hmm.py
Hidden Markov model in PyMC
import numpy as np
import pymc
import pdb
def unconditionalProbability(Ptrans):
"""Compute the unconditional probability for the states of a
Markov chain."""
m = Ptrans.shape[0]
@paulhendricks
paulhendricks / data2.csv
Created August 2, 2016 19:26 — forked from BenHeubl/data2.csv
nuviun's Wearable Health Innovation Scoring - test
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 5 columns, instead of 4. in line 3.
innovationScore,innovationScore2,names,type,description
4.7,470,3L Labs Footlogger,medical,"The 3L Labs Footlogger is a wearable fitness tracking device that aims at spotting health problems early, as well as logging daily activity. Placed in the user's shoe, 8 sensors coupled to 1 accelerometer help identify and record exercise habits. The data is then disclosed to the user via text or smartphone app. This computing device's technology can be used for athletes training, regular everyday workouts and rehabilitation."
5.44,544,4D Force,,"The 4D Force is a wearable technology that detects brain waves and converts them into electric signals. 4D Force developed a platform that can capture and compute high quality EEG/ EOG/EMG signals. With the device, users can control games by using the power of their thoughts. 4D Force can also be used for medical purposes as it has the ability to interpret electrical signals generated by the body, and create recommendations for changes in lifestyle."
4,400,4iiii Viiiiva,Fitnes
@paulhendricks
paulhendricks / gist:55fd59ae60729e21f0f7a758f32a7566
Created July 13, 2016 20:29 — forked from debasishg/gist:b4df1648d3f1776abdff
another attempt to organize my ML readings ..
  1. Feature Learning
  1. Deep Learning
@paulhendricks
paulhendricks / ssm_py_est.ipynb
Created March 10, 2016 16:44 — forked from ChadFulton/ssm_py_est.ipynb
State space models in Python: Bayesian and Classical estimation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulhendricks
paulhendricks / pi_ga.py
Created February 10, 2016 14:51 — forked from paulmdx/pi_ga.py
from random import randint
def create_population(create, pop_size=1000):
"""Create population list"""
return [create() for i in xrange(pop_size)]
def crossover(combine, population, pop_size):
"""Increase population size by combining"""
original_size = len(population)
while len(population) < pop_size:
install.packages('caret')
install.packages('ccd')
install.packages('d3Network')
install.packages('data.table')
install.packages('dplyr')
install.packages('DMwR')
install.packages('e1071')
install.packages('ergm')
install.packages('ff')
install.packages('foreach')