Skip to content

Instantly share code, notes, and snippets.

View sachdevm's full-sized avatar

Manish Sachdev sachdevm

  • Bangalore, India
View GitHub Profile
@sachdevm
sachdevm / app.js
Last active January 19, 2019 14:48
Issue with opentracing-express
var express = require('express');
var path = require('path');
var favicon = require('static-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
@sachdevm
sachdevm / failure.py
Last active July 26, 2017 07:37
Creating dataframe from dictionary in pyspark
# Ran following examples in PySpark shell
from pyspark.sql import Row
nested_struct = {
"org_id": "abc", "emp_id": "def",
"projects": [{"name": "test_proj_1", "duration": 20, "code": "p30"},
{"name": "test_proj_2", "duration": 15, "code": "p30"}]
}
test_rdd = sc.parallelize([Row(**nested_struct)])
test_df = test_rdd.toDF()