Skip to content

Instantly share code, notes, and snippets.

View murphyke's full-sized avatar

Kevin Murphy murphyke

  • The Children's Hospital of Philadelphia
  • Philadelphia, PA
View GitHub Profile
@murphyke
murphyke / mitmdump-log.py
Created June 6, 2019 19:23
Sample mitmdump (mitmproxy) script for dumping JSON requests and responses between a pair of services
"""Sample mitmdump (mitmproxy) script for dumping JSON requests and responses between a pair of services.
Useful for eyeballing and nothing else.
E.g. to eavesdrop on conversations between an Elasticsearch client and Elasticsearch itself,
tell the client that Elasticsearch is on port 9201, then reverse proxy the traffic
to the real Elasticsearch at port 9200.
```
pip3 install mitmproxy
@murphyke
murphyke / exercise.tour.go
Created April 10, 2018 18:31 — forked from zyxar/exercise.tour.go
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
@murphyke
murphyke / flock.test.py
Created November 7, 2017 21:45
Demo of simpleflock PyPI package for python
import errno
import logging
import os
import threading
import time
import simpleflock
def locker(thread='main'):
"""Demo of the simpleflock package"""
@murphyke
murphyke / add-docker-user.sh
Last active March 16, 2016 18:47 — forked from bruth/add-docker-user.sh
Setup Official Docker Repo on RHEL 7
#!/bin/bash
/usr/sbin/usermod -aG docker <user>
@murphyke
murphyke / new_cilantro_buttons.png
Last active October 22, 2015 15:38
Image of tweaked Harvest Cilantro results page
An image of a tweaked Harvest Cilantro results page including three new buttons to the left of the normal blue buttons.
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/files/archive/scala-docs-2.9.3.zip'
sha1 '5bf44bd04b2b37976bde5d4a4c9bb6bcdeb10eb2'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
@murphyke
murphyke / About Harvest.md
Last active December 26, 2015 08:39
A little fragment of text that could potentially go on the CBMI Harvest About page or maybe a FAQ

Is Harvest For Me?

If you have data encompassing up to several dozen tables and hundreds or even thousands of fields, and you'd like to create a web site to allow users to perform custom queries on the data, page though the results, and export to a variety of formats, then you should consider Harvest. Harvest comes with a dynamic query builder that allows users to easily find the fields they are interested in and define query conditions on them. Users can then view the results, choose which fields to display, and export the data to CSV, Excel, JSON, R, or SAS. Users can also name and save queries (consisting of query conditions and display columns) and optionally share specified queries with other users of your web site. Even if you don't intend to make the data public, a private or intranet instance of Harvest can be a great way to explore and understand complex data.

What is "Data Discovery"?

First off, if you haven't already done so, [try the Demo]({{ site.baseurl }}demo/). This will show you

@murphyke
murphyke / gist:6684870
Last active December 23, 2015 19:49
Thoughts on CBMI Harvest (esp Cilantro)

Things that have occurred to me while using Cilantro. Some ideas are obviously of more importance than others.

  • Hierarchical browsing of concepts can be useful sometimes, but it's an odious task when the concept hierarchy is fully exploded (with an app like with many nested categories and lots of fields, anyway). It might be better if the hierarchy could be collapsed by default. However, that would make the dynamic completion search more difficult, as categories would have to be opened dynamically.
  • "Distinct count N" seems unnecessarily prominent. Perhaps it could be below the value choice widget, not have any gray highlighting, and have less computer-geeky text, perhaps "(N distinct values)".
  • The infinity sign in the filter panel when no filters are applied always surprises me. Should it be the full count of entities/individuals, as it is after you have added a filter and then removed it. Actually, I think "N (all)" would be even better (or "All (N)").
  • The c