Skip to content

Instantly share code, notes, and snippets.

View binarytemple's full-sized avatar

Bryan Hunt binarytemple

  • The mountains of mourne
View GitHub Profile
@binarytemple
binarytemple / dns_proxy_srv.erl
Created October 4, 2015 22:32 — forked from andelf/dns_proxy_srv.erl
erlang dns proxy, with long ttl and persistant etc table cache.
%%%-------------------------------------------------------------------
%%% @author <andelf@gmail.com>
%%% @copyright (C) 2013,
%%% @doc
%%%
%%% @end
%%% Created : 18 Apr 2013 by <andelf@gmail.com>
%%%-------------------------------------------------------------------
-module(dns_proxy_srv).
@binarytemple
binarytemple / x.erl
Created September 30, 2015 20:06
Flatmap in Erlang, substitute characters in a list
X = fun(Bin) ->
list_to_binary(
lists:flatmap( fun($&) -> "\\&"; ($\\) -> "\\\\"; (Chr) -> [Chr] end, binary_to_list(Bin))
)
end.
import csv
import numpy
from sklearn import preprocessing, neighbors, metrics
from sklearn.cross_validation import train_test_split
__author__ = 'bryanhunt'
# Imports for Module 4
# Code common to all modeles from module 3 onwards
import csv
import numpy
from sklearn import neighbors, preprocessing
__author__ = 'bryanhunt'
# Imports for Module 4
# Code common to all modeles from module 3 onwards
# NB. The X and yTransformed variables come from the preprocessing in the previous module.
import csv
import numpy
from sklearn import neighbors, preprocessing
__author__ = 'bryanhunt'
# Imports for Module 4
# Code common to all modeles from module 3 onwards
# NB. The X and yTransformed variables come from the preprocessing in the previous module.
__author__ = 'bryanhunt'
# making a heatmap of the breast cancer data to determine colinearity
import csv
import numpy
from sklearn import preprocessing
fileName = "wdbc.csv"
__author__ = 'bryanhunt'
import csv
import numpy
import scipy
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn.cross_validation import train_test_split
from sklearn import metrics
__author__ = 'bryanhunt'
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
labels = iris.target_names
__author__ = 'bryanhunt'
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
labels = iris.target_names
@binarytemple
binarytemple / jarmon_example_recipes.js
Created August 3, 2015 14:18
Jarmon rrd GUI config example
if(typeof(jarmon) === 'undefined') {
var jarmon = {};
}
jarmon.TAB_RECIPES_STANDARD = [
['System', ['cpu', 'memory','load','swap']],
['Network', ['eth0','eth1','lo','data']],
['Disks', ['sda5_time', 'sda5_merged', 'sda5_ops', 'sda5_data' ,'lvm' ]],
['All Processes', ['all_process']],
['Asterisk CPU and Mem', [ 'asterisk_all', 'asterisk_counts' , 'asterisk_procs' ]],