Skip to content

Instantly share code, notes, and snippets.

View purushothblog's full-sized avatar

Purushothaman purushothblog

View GitHub Profile
@purushothblog
purushothblog / Github API
Created August 31, 2014 21:21
This is just a test for Github API. It retrieves Authors, Repos and Commit of the repos.
from flask import Flask, request, redirect
import requests
import MySQLdb as mdb
from github import Github
client_id = '8d4c7fafa31f1f8abf3a'
client_secret = 'f42dba103d8ff88399dceb77a3f7a3d9cdb359c8'
redirect_url = "https://localhost:5000/home"
authorization_base_url = 'https://github.com/login/oauth/authorize'
@purushothblog
purushothblog / Next Fibonacci Sequence Generation
Last active December 31, 2015 12:09
Check the given number is Fibonacci and find the next number in Fibonacci sequence.
var n = 4, fib;
var a = (5 * Math.pow(n, 2) + 4)
var b=(5 * Math.pow(n, 2) - 4 )
var result = Math.sqrt(a) % 1==0;
var res = Math.sqrt(b) % 1==0;