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 / 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,
{
"metadata": {
"name": "",
"signature": "sha256:a8c266a3e6c4963abeca1c7b7a0656aee2fb5e524912abbc1f083e942694e840"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@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

@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 / docker_cheat.md
Created September 12, 2017 14:30 — forked from wsargent/docker_cheat.md
Docker cheat sheet
./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 / 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