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
data_sets <- c("mtcars", "morley", "rock") | |
shinyServer(function(input, output) { | |
# Drop-down selection box for which data set | |
output$choose_dataset <- reactiveUI(function() { | |
selectInput("dataset", "Data set", as.list(data_sets)) | |
}) | |
# Check boxes |
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
Type: Shiny | |
Title: Dynamic UI | |
License: MIT | |
Author: Winston Chang <[email protected]> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: dynamic-ui renderui uioutput | |
DisplayMode: Showcase | |
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
//Let's create the top of the tree, the PRODUCT | |
create (n1:PRODUCT {id:1}); | |
//Let's create 100 children of the PRODUCT, COST_GROUPS connected to the top of the tree | |
match (n1:PRODUCT {id:1}) | |
with range(1,100) as RANGE, n1 | |
foreach (r in RANGE | create (n2:COST_GROUP {id:r})-[:PART_OF {quantity:round(rand()*100)}]->(n1) ); | |
//for every COST_GROUP, let's connect 100 children at a 3rd level, the COST_TYPEs | |
match (n2:COST_GROUP) |
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
#' Connect and query Imapala via SSH and Impala-shell | |
#' @param query SQL query to run | |
#' @param host server hostname or IP | |
#' @param log enable or disable logging of debug/trace messages | |
#' @return data.table object | |
#' @export | |
query_impala <- function(query, host = 'localhost', log = require(futile.logger)) { | |
## measure time of query | |
timer <- proc.time() |
Loading
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright (c) 2016 Daniel Beckstein | |
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 |
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
license: gpl-3.0 |