Skip to content

Instantly share code, notes, and snippets.

View sksundaram-learning's full-sized avatar

Sundaram Surampudi sksundaram-learning

  • Toronto, Canada
View GitHub Profile
@sksundaram-learning
sksundaram-learning / virtualbox-modules-5.1.22-page-table.patch
Created August 7, 2017 22:45 — forked from ObserverHerb/virtualbox-modules-5.1.22-page-table.patch
Build VirtualBox kernel modules against kernel 4.12.0-rc2
--- work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c 2017-01-12 10:04:01.000000000 -0500
+++ work/vboxdrv/r0drv/linux/memobj-r0drv-linux.cb 2017-05-28 18:04:25.607775983 -0400
@@ -1,4 +1,4 @@
-/* $Id: memobj-r0drv-linux.c 112804 2017-01-12 15:03:51Z fmehnert $ */
+/* $Id: memobj-r0drv-linux.c 66930 2017-05-17 10:45:48Z vboxsync $ */
/** @file
* IPRT - Ring-0 Memory Objects, Linux.
*/
@@ -902,6 +902,9 @@
union
./bin/drill-embedded                                                                                           
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Apr 19, 2017 4:53:50 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
apache drill 1.10.0 
"drill baby drill"

Now visit link http://localhost:8047 to open up Apache Drill explorer and configure S3 storage plugin refer

@sksundaram-learning
sksundaram-learning / docker_cheat.md
Created September 12, 2017 14:30 — forked from wsargent/docker_cheat.md
Docker cheat sheet
@sksundaram-learning
sksundaram-learning / fdups.py
Created September 18, 2017 20:04 — forked from miku/fdups.py
Find duplicate files in python.
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908
import sys
import os
import hashlib
def chunk_reader(fobj, chunk_size=1024):
"""Generator that reads a file in chunks of bytes"""
while True:
chunk = fobj.read(chunk_size)
@sksundaram-learning
sksundaram-learning / geo_interface.rst
Created September 29, 2017 18:09 — forked from sgillies/geo_interface.rst
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

{
"metadata": {
"name": "",
"signature": "sha256:a8c266a3e6c4963abeca1c7b7a0656aee2fb5e524912abbc1f083e942694e840"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@sksundaram-learning
sksundaram-learning / pandas_dbms.py
Created November 12, 2017 04:19 — forked from catawbasam/pandas_dbms.py
Python PANDAS : load and save Dataframes to sqlite, MySQL, Oracle, Postgres
# -*- coding: utf-8 -*-
"""
LICENSE: BSD (same as pandas)
example use of pandas with oracle mysql postgresql sqlite
- updated 9/18/2012 with better column name handling; couple of bug fixes.
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle.
to do:
save/restore index (how to check table existence? just do select count(*)?),
finish odbc,
@sksundaram-learning
sksundaram-learning / android_jupyter_install.sh
Created February 2, 2018 02:18 — forked from Breta01/android_jupyter_install.sh
Run clear GNURoot Debian, download android_jupyter_install.sh and run command: sh android_jupyter_install.sh
#!/bin/bash
# Update
apt-get update && apt-get upgrade -y
# Install python+packages and curl
apt-get install -y python3 python3-pip python3-numpy python3-scipy python3-matplotlib ipython3 ipython3-notebook python3-pandas python3-nose curl wget
# Update pip
python3 -m easy_install -U pip
# Correctinng python file
# which causes stuck during package installation
@sksundaram-learning
sksundaram-learning / TSQL-to-POCO
Created March 22, 2018 17:34 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@sksundaram-learning
sksundaram-learning / gist:b3948050a345edc7e02e270501643e0b
Created May 9, 2018 19:00 — forked from conormm/r-to-python-data-wrangling-basics.md
R to Python: Data wrangling with dplyr and pandas
R to python useful data wrangling snippets
The dplyr package in R makes data wrangling significantly easier.
The beauty of dplyr is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).
dplyr is organised around six key verbs