Skip to content

Instantly share code, notes, and snippets.

View aakansh9's full-sized avatar

Aakansh Gupta aakansh9

  • Bangalore, India
View GitHub Profile
@aakansh9
aakansh9 / unixcommands.md
Last active September 2, 2018 13:48
Useful unix commands
Syntax Options Use
whoami
pwd -LP
mkdir -pv
touch create blank files
ls create blank files
nano/pico simple text editor for terminal
cat/less/more
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
# date features
# day of week
# day of month
# day of year
# week of month
# week of year
# month of quarter
# month of year
# quarter of year
# half of year
@aakansh9
aakansh9 / youtube-dl.md
Last active November 8, 2016 07:53
youtube-dl notes

youtube-dl Notes

Commands

youtube-dl [OPTIONS] URL [URL...]

Options Use
--list-extractors List all supported websites
--playlist-start NUMBER Playlist video to start at (default is 1)
@aakansh9
aakansh9 / brew.md
Last active September 2, 2018 11:51
Brew Notes

Brew Notes

Paths

  • homebrew installs to /usr/local/
    • /usr/local/bin is already in PATH
    • /usr/local/ has no files by default (used for non-system utilities)
  • files are downloaded in ~/Library/Caches/Homebrew ( brew --cache )
@aakansh9
aakansh9 / prezto.md
Last active November 8, 2016 07:53
Prezto notes

Prezto Notes

The configuration framework for zsh. It enriches the command line interface with sane defaults, aliases, functions, auto completion and prompt themes.

Config Files

  • ~/.zprezto/... contains prezto modules
  • ~/.zpreztorc is the main config files to load modules

Terminology

@aakansh9
aakansh9 / docker.md
Last active January 17, 2017 12:30
Docker notes

Docker Notes

Terminology

  • Docker Engine contains
    • A long running server (Daemon process)
    • REST API to interact with daemon
    • A command line interface client for using REST commands (Docker Client)
    • Daemon creates/manages Docker objects (images, containers, networks, data)
  • Daemon and Docker Client can be on same machine or different machines.
@aakansh9
aakansh9 / .tmux.conf (Linux)
Last active April 1, 2019 16:03
tmux notes
# change prefix
unbind C-b
set-option -g prefix C-a
# Allow C-A to send C-A to application
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
@aakansh9
aakansh9 / xgboost_SPHERE.R
Last active August 2, 2016 13:15
Custom Xgboost functions for Safe Aging with SPHERE Challenge
library(xgboost) # 0.4-3
library(dplyr) # 0.5.0
###########################################################################
# traintarget = feature set dataframe with N rows and M features
# traintarget = target dataframe with N rows and 20 target columns with real values in [0,1]
# example of params = list(booster='gbtree', objective='reg:logistic', eta=0.1, subsample=0.7, colsample_bytree=0.7, max_depth=4, max_delta_step = 3, verbose=1,silent=1,nthread=10)
xgb1.cv <- function(params = list(), traindata, traintarget, folds = list(), nrounds= 10, prediction=F, early_stopping_rounds=NULL){
@aakansh9
aakansh9 / Data Science.md
Last active April 2, 2020 18:27
Docker for Data Science

Containerized Data Science Notes

Docker can be easily intalled by following the instructions on the official website.

OSX

Python Image