This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert'); | |
//Define your authentication credentials | |
//get + format date | |
function timestamper(daysToAdd) { | |
var someDate = new Date(); | |
var numberOfDaysToAdd = 5; | |
someDate.setDate(someDate.getDate() + daysToAdd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Define your authentication credentials | |
//get + format date | |
function timestamper(daysToAdd) { | |
var someDate = new Date(); | |
var numberOfDaysToAdd = 5; | |
someDate.setDate(someDate.getDate() + daysToAdd); | |
var dd = someDate.getDate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nr_monitor_ads = function(){ | |
var convertToString = ['advertiserId', 'campaignId', 'creativeId', 'lineItemId', 'labelIds', 'sourceAgnosticCreativeId', 'sourceAgnosticLineItemId']; | |
var NR_SUBMIT_PAGE_ACTION = function(ev, obj) { | |
if (typeof window.newrelic != 'undefined' && typeof window.newrelic.addPageAction == 'function') { | |
for (i in obj) { | |
if (convertToString.indexOf(i) > -1) { | |
obj[i] = String(obj[i]); | |
} | |
} | |
window.newrelic.addPageAction(ev, obj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// anomaly detection based on Median Absolute Deviation estimates of | |
// standard deviation (robust to outliers and non-normal data) | |
// | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/stdj.juttle' as stdj; | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/math.juttle' as math; | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/ts.juttle' as ts; | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/mav.juttle' as mav; | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/seasonal.juttle' as seasonal; | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/forecast.juttle' as forecast; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ts -- juttle timeseries utilities | |
// | |
import 'https://gist.githubusercontent.com/welch/3f7b696beab6ba1b55bb/raw/stdj.juttle' as stdj; | |
// | |
// downsample: thin a series of values by retaining its extreme values over successive intervals | |
// parameters: | |
// in -- name of value field | |
// every -- interval of each downsample | |
// | |
export sub downsample(in, every) { |