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
-- iterator function to traverse nested tables | |
function iterate(tbl, parent) | |
parent = parent or {} | |
if (type(tbl)=="table") then | |
for key, value in pairs(tbl) do | |
iterate(value, table.extend(parent, key)) | |
end | |
end | |
coroutine.yield(parent, tbl) | |
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#### reading libraries #### | |
library(data.table) | |
library(ggplot2) | |
library(gridExtra) | |
#### reading sources #### | |
setwd("~/Desktop/consolidated") | |
# "SFaccountID","SFopportunityID","SFaccountName","SFcreateDate","SFendDate","SFindustry","SFproductName","SFtotalPriceCurrency","SFtotalPrice" |
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
#!/bin/bash | |
# todo: | |
# - one script to control all 3 servers | |
# - script to know expected screens per server | |
# - pull functionalities into seperate functions e.g. is_server_up() | |
logfolder="/home/mc/servers/logs/" | |
this_box=`hostname | awk 'BEGIN {FS="."} {print toupper($1)}'` | |
backup_folder='/home/mc/servers/backup/' |
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
/* | |
problem: return the sum of call durations for those operators | |
who initiated at least one call per day for a given | |
timeslot. data: calls(mtid, date, duration) | |
*/ | |
SELECT sum(duration) | |
FROM calls | |
JOIN | |
(SELECT MTID, count(MTID) |
NewerOlder