Skip to content

Instantly share code, notes, and snippets.

View himanshk96's full-sized avatar

himanshk96

  • Google
  • Mountain View, CA
View GitHub Profile
@himanshk96
himanshk96 / SQLZOO Window Function Solutions
Created April 6, 2020 11:27
SQLZOO Window Function Solutions
1.
Show the lastName, party and votes for the constituency 'S14000024' in 2017.
SELECT lastName, party, votes
FROM ge
WHERE constituency = 'S14000024' AND yr = 2017
order by votes desc
Who won?
@himanshk96
himanshk96 / ALS_implementation.py
Created June 23, 2019 19:15
Recommendation using ALS for implicit data. Code for Medium Blog
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 23 22:20:58 2019
@author: himansh
"""
#import libraries
import sys
import pandas as pd
import numpy as np
xls to sqlite:
http://www.parallelcodes.com/android-import-excel-into-sqlite-database-part-2/
https://stackoverflow.com/questions/5396286/sort-list-of-lon-lat-points-start-with-nearest
0x5D10cd4B3Aa56184Ef777c93D2f3e299eBA37E77