Skip to content

Instantly share code, notes, and snippets.

View rajshah4's full-sized avatar

Rajiv Shah rajshah4

View GitHub Profile
@daroczig
daroczig / impala.R
Last active February 2, 2017 17:10
Connect and query Imapala via SSH and Impala-shell from R
#' 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()
@ramnathv
ramnathv / server.r
Last active September 10, 2017 00:41 — forked from wch/server.r
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
@rajshah4
rajshah4 / RNN_Simple_Addition_Public.ipynb
Last active March 4, 2018 01:43
RNN_Addition_1stgrade
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidshinn
davidshinn / .block
Last active March 29, 2018 23:58 — forked from mbostock/.block
Box Plots
license: gpl-3.0
@DanielBeckstein
DanielBeckstein / flickr_rest_api_based_some_python_utils.py
Last active January 21, 2021 16:24
Python script - that uses flickr rest api - to handle some flickr api calls (get images for keywords, get only images with certain licenses) for more details check out the awesome official flickr-api documentation: https://www.flickr.com/services/api/ - how to get your api key: https://www.flickr.com/services/apps/create/apply/
#!/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
@wch
wch / DESCRIPTION
Last active January 21, 2022 14:25
Dynamic UI example app for R Shiny
Type: Shiny
Title: Dynamic UI
License: MIT
Author: Winston Chang <winston@rstudio.com>
AuthorUrl: http://www.rstudio.com/
Tags: dynamic-ui renderui uioutput
DisplayMode: Showcase
@rvanbruggen
rvanbruggen / hierarchy.cql for 2.0
Last active June 26, 2022 08:53
A gist to demonstrate the power of Neo4j for dealing with hierarchical data.
//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)