Skip to content

Instantly share code, notes, and snippets.

View ishankhatri90's full-sized avatar
🎯
Focusing

Ishan Khatri ishankhatri90

🎯
Focusing
  • Houston
View GitHub Profile

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@ishankhatri90
ishankhatri90 / Sorta.scala
Created April 3, 2019 04:56 — forked from abonander/Sorta.scala
Popular sorting algorithms reimplemented in Scala
package org.logician.sorta
import scala.util.Random
import scala.math
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
/**
* Created with IntelliJ IDEA.
* User: Austin
@ishankhatri90
ishankhatri90 / config.txt
Created September 3, 2018 05:03 — forked from edupsousa/config.txt
RPi2 config.txt with support for 2560x1080 resolution on LG25UM65 display.
# From https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=24679&start=50
hdmi_ignore_cec_init=1
hdmi_drive=2
disable_overscan=1
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_timings=2560 1 64 64 96 1080 1 3 10 31 0 0 1 60 0 185580000 8
@ishankhatri90
ishankhatri90 / groupyby_parallel.py
Created January 6, 2018 05:18 — forked from dmyersturnbull/groupyby_parallel.py
Performs a Pandas groupby operation in parallel
# coding=utf-8
import pandas as pd
import itertools
import time
import multiprocessing
from typing import Callable, Tuple, Union
def groupby_parallel(groupby_df: pd.core.groupby.DataFrameGroupBy,
func: Callable[[Tuple[str, pd.DataFrame]], Union[pd.DataFrame, pd.Series]],
# List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]
@ishankhatri90
ishankhatri90 / kalman_example.py
Created May 24, 2017 19:01 — forked from bigsnarfdude/kalman_example.py
matplotlib kalman example in python
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (10, 8)
# intial parameters
n_iter = 50
sz = (n_iter,) # size of array
x = -0.37727 # truth value (typo in example at top of p. 13 calls this z)
@ishankhatri90
ishankhatri90 / install.sh
Created November 10, 2016 16:29 — forked from domderen/install.sh
Installation of apache spark on ubuntu machine.
#!/bin/sh
# installation of Oracle Java JDK.
sudo apt-get -y update
sudo apt-get -y install python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get -y install oracle-java7-installer
# Installation of commonly used python scipy tools
@ishankhatri90
ishankhatri90 / sentiment.py
Created November 1, 2016 01:50 — forked from bbengfort/sentiment.py
An end-to-end demonstration of a Scikit-Learn SVM classifier trained on the positive and negative movie reviews corpus in NLTK.
import os
import time
import string
import pickle
from operator import itemgetter
from nltk.corpus import stopwords as sw
from nltk.corpus import wordnet as wn
from nltk import wordpunct_tokenize
#-*- coding: utf-8 -*-
import re
import nltk
from nltk.tokenize import RegexpTokenizer
from nltk import bigrams, trigrams
import math
stopwords = nltk.corpus.stopwords.words('portuguese')
@ishankhatri90
ishankhatri90 / NTU - Machine Learning
Created October 16, 2016 02:28 — forked from songron/NTU - Machine Learning
Codes for Machine Learning Foundations(NTU) 台湾国立大学《机器学习基石》(Coursera版)相关的代码、编程作业等。
Codes for Machine Learning Foundations(NTU)
台湾国立大学《机器学习基石》(Coursera版)相关的代码、编程作业等。
课程地址:https://class.coursera.org/ntumlone-001/