Skip to content

Instantly share code, notes, and snippets.

View BastinRobin's full-sized avatar
🔬
Trying Odd's on daily basis ;)

Bastin Robin BastinRobin

🔬
Trying Odd's on daily basis ;)
View GitHub Profile
@BastinRobin
BastinRobin / .env
Last active December 15, 2017 10:38
APP_NAME='Pranah | Worlds No.1 AYUSH Network'
APP_ENV=production
APP_KEY=base64:MTvfSQxIUaSQ0WpMztUJiS8PQWNnuKeOG/TqD4MuNpk=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=pgsql
DB_HOST=ec2-23-21-231-58.compute-1.amazonaws.com
DB_PORT=5432
@BastinRobin
BastinRobin / Resources.md
Last active January 9, 2018 17:07
Resources on data science
@BastinRobin
BastinRobin / flatten.py
Created August 19, 2017 14:43
Array Flatten
""" Simple Array Flatten """
import collections
A = [[1, 2, [3]], 4]
def flatten(elements):
""" Return a list with all elements from sub list
Parameter:
----------
elements: list
@BastinRobin
BastinRobin / Spearman.py
Created August 4, 2017 11:41
Spearman implementation In Python
from __future__ import division
import numpy as np
''' Spearman Correlation '''
x = [73, 76, 78, 65, 86, 82, 91]
y = [77, 78, 79, 80, 86, 89, 95]
col = [list(a) for a in zip(x, y)]
xy = sorted(col, key=lambda x: x[0], reverse=True)
for i, row in enumerate(xy):
@BastinRobin
BastinRobin / basic
Created July 15, 2017 13:31
Basic Analysis
{
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@BastinRobin
BastinRobin / consult.txt
Last active October 15, 2017 13:29
Data science
Statistics:
https://statweb.stanford.edu/~tibs/ElemStatLearn/printings/ESLII_print10.pdf
http://greenteapress.com/thinkstats/
Machine Learning
https://www.coursera.org/learn/machine-learning/home/welcome
http://as.wiley.com/WileyCDA/WileyTitle/productCd-111866146X.html
http://shop.oreilly.com/product/0636920033400.do
- Supervised
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BastinRobin
BastinRobin / sorting.js
Created January 20, 2017 18:46
Sorting
a = [ {name:'robin', ranking:10 }, { name: 'sam', ranking: 40 }, { name: 'binu', ranking: 12 } ];
// Using function
function sort_by_key(array, key) {
return array.sort(function(a, b) {
var x = a[key]; var y = b[key];
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
});
}
@BastinRobin
BastinRobin / stock.py
Created January 16, 2017 17:23 — forked from sanand0/stock.py
Pull currency and stock data
#! /usr/bin/env python
"""
Author: Bastin Robin
"""
import os
import logging
from urllib import urlencode
import datetime
import pandas as pd
@BastinRobin
BastinRobin / Sorting.js
Last active December 15, 2016 18:36
Sorting Objects Using Age
people = [
{
"name" : "bastinrobin",
"age" : 28
},
{
"name" : "samharvey",
"age" : 34
},
{