Skip to content

Instantly share code, notes, and snippets.

@dstuebe
dstuebe / COVID19_SARS_COV2_analysis.ipynb
Last active March 22, 2020 01:26
A python jupyter notebook to extract and load the JHU CSSE COVID-19 data and do some basic growth rate plots, mostly US focused.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dstuebe
dstuebe / PageCache.java
Created July 18, 2019 22:01
Example java program that heavily utilizes mmap/page cache
/**
* MIT License
*
* Copyright (c) 2019 Upserve, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@dstuebe
dstuebe / Test Notes
Last active October 5, 2018 01:58
Log file from uppend benchmark on I3.metal
Created two instance:
i3.8xl 10.10.17.185
i3.metal 10.10.17.180
SSH Connection:
ssh-add .ssh/p_ecs_cluster
ssh ubuntu@10.10.17.180
ssh ubuntu@10.10.17.185
@dstuebe
dstuebe / NestedParallel.java
Last active August 1, 2018 20:17
Parallel execution bug
package com.upserve;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.function.*;
import java.util.stream.*;
public class NestedParallel implements Runnable {
@dstuebe
dstuebe / HelloProblematicFrame.java
Last active April 22, 2018 15:28
Concurrent MappedByteBuffer error repro case
import java.io.*;
import java.nio.*;
import java.nio.channels.FileChannel;
import java.nio.file.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.IntStream;
import static java.lang.System.exit;
@dstuebe
dstuebe / The Technical Interview Cheat Sheet.md
Created August 25, 2016 16:08 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@dstuebe
dstuebe / co_workflow.py
Last active August 29, 2015 14:01
Chaining coroutines for number crunching workflows...
TARGETS = 'targets'
class AnalysisWindowComplete(Exception):
"""
Used in coroutine control flow, this is not an error condition.
"""
def coroutine(func):
"""
@dstuebe
dstuebe / hello.f90
Created December 12, 2013 22:09
Test case for weird heap corruption / free error. Depending on the index which overruns the bounds the program fails on deallocate.
!****************************************************************************
!
! PROGRAM: hello
!
! PURPOSE: Test program for strange Heap Corruption error in windows
!
!****************************************************************************
program hello
implicit none
@dstuebe
dstuebe / python.h
Created November 9, 2013 14:25
Python.h include file for python 2.7.5
#ifndef Py_PYTHON_H
#define Py_PYTHON_H
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
/* Include nearly all Python header files */
#include "patchlevel.h"
#include "pyconfig.h"
#include "pymacconfig.h"
@dstuebe
dstuebe / run_job.py
Created August 7, 2013 01:57
A program for launching other programs - indirection to try to solve issues with using Java Process Builder to run OpenMPI programs in windows... For instance: C:\Python27\python.exe run_job.py C:\Python27\Lib\site-packages\mpi4py\bin\mpiexec.exe -n 2 C:\Python27\python.exe parallel_program.py
#!/usr/bin/env python
import subprocess
import sys
if __name__ == '__main__':
args = sys.argv[1:]
p = subprocess.Popen(args, stdout=sys.stdout, stderr=sys.stderr)
p.wait()