Skip to content

Instantly share code, notes, and snippets.

View rajatpaliwal's full-sized avatar
🎯
Focusing

Rajat Paliwal rajatpaliwal

🎯
Focusing
  • Surrey, BC
View GitHub Profile
@rajatpaliwal
rajatpaliwal / tensors_basic.ipynb
Created May 25, 2021 22:12
Tensors_basic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def sort(any):
less=[]
equal=[]
large=[]
if len(any)>1:
pivot=any[0]
for x in any:
if x<pivot:
less.append(x)
if x==pivot:
@rajatpaliwal
rajatpaliwal / gist:229dbe75b4933254534bf00648aed40a
Created February 2, 2018 14:38
Finding Donors for charityML ("Value error problem")
# Import libraries necessary for this project
import numpy as np
import pandas as pd
from time import time
from IPython.display import display # Allows the use of display() for DataFrames
# Import supplementary visualization code visuals.py
import visuals as vs
# Pretty display for notebooks
import sys
from class_vis import prettyPicture
from prep_terrain_data import makeTerrainData
import matplotlib.pyplot as plt
import numpy as np
import pylab as pl
features_train, labels_train, features_test, labels_test = makeTerrainData()