Skip to content

Instantly share code, notes, and snippets.

View arunenigma's full-sized avatar

Shan arunenigma

  • Silicon Valley
View GitHub Profile
<?php
/**
* A simple Facebook PHP example.
*
* - This is not a "Facebook SDK".
* - This example uses Curl, Hash, JSON, Session extensions.
* - This does not use the JavaScript SDK, nor the cookie set by it.
* - This works with Canvas, Page Tabs with IFrames, the Registration Plugin
* and with any other flow which uses the signed_request.
# -*- 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,
@arunenigma
arunenigma / mac_terminal_commands.txt
Last active December 15, 2015 07:19
Mac Terminal Commands
mdfind dict.txt ==> pulls down all paths associated with the file name
ffmpeg ==> combine images to form video
ffmpeg -f image2 -r 1/5 -i image%03d.png -vcodec mpeg4 -y movie.mp4
where image2 --> part of command
image%03d --> all images of series 001, 002, 003 ...
-r --> rate 1/5 (rate of holding each frame for 5 seconds) can be changed to 24 frames (experiment yourself)
dig
@arunenigma
arunenigma / quick_sort.py
Last active December 15, 2015 04:38
Quick Sort Implementation in Python
#!/usr/bin/env python
# Quick Sort Implementation in Python
# Author: Arunprasath Shankar
# Case Western Reserve University
# Using Partition Method
from random import randint