Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
loves itacho sushi

Nicky Lim nickylimjj

💭
loves itacho sushi
View GitHub Profile
View .vimrc
" .vimrc
" vim configuration file
" Created by Nicky Lim
syntax enable
filetype plugin indent on
set number
set rnu
set colorcolumn=81
highlight CursorLine ctermbg=Black
View .bash_aliases
# .bash_aliases
# Useful commands for the terminal
# Created by Nicky Lim
# some references from
## https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
############################
# Useful in-built commands #
############################
@nickylimjj
nickylimjj / .tmux.conf
Last active May 15, 2020
tmux conf file
View .tmux.conf
# .tmux.conf
# tmux configuration file
# Created by NICKY LIM
# prefix t puts the timer on
# prefix ? shows help
unbind %
unbind '"'
@nickylimjj
nickylimjj / Makefile
Last active Dec 18, 2019
Sample makefile from .s -> bin
View Makefile
AS := as
LD := ld
SRC := $(wildcard *.s)
OBJ := $(patsubst %.s, %.o, $(SRC))
BIN := $(patsubst %.o, %, $(OBJ))
.PHONY: all
all: $(BIN)
@nickylimjj
nickylimjj / scapy-quickstart.py
Created Dec 4, 2019
[scapy] quickstart guide to parse pcaps
View scapy-quickstart.py
#!/usr/bin/env python3
from scapy.all import *
filename = "capture.pcap"
pcap = rdpcap(filename)
result = ''
for p in pcap[TCP]:
View scope-chain.py
def b ():
print( myvar )
def a ():
myvar = 'a'
b()
myvar = 'outer'
a() # will print 'outer' because it looks down the scope chain, NOT execution / stack trace
View pattern-matching.py
m = {}
def foo(regex, s_list):
for idx, token in enumerate(regex):
# set token and ensure unique values
if (token not in m and
s_list[idx] not in m.values()):
m[token] = s_list[idx]
# fails if token not added (bcoz substring not unique) or
@nickylimjj
nickylimjj / checkImpementation
Created Nov 20, 2017
Python list Implementation
View checkImpementation
$ python -m timeit --setup="x = [None]*1000" "x[500]"
10000000 loops, best of 3: 0.0579 usec per loop
$ python -m timeit --setup="x = [None]*1000" "x[0]"
10000000 loops, best of 3: 0.0566 usec per loop
View nric-cert.py
# nric-cert.py
# verifies a Singaporean NRIC
# motivated by video from The Fun Social - How did your NRIC
# number come about?
# date created: June 15, 2017
# author: Nicky Lim
import sys
assert len(sys.argv) == 2, "Usage: python nric-cert.py <NRIC>"
@nickylimjj
nickylimjj / hackillinois2017.md
Last active Feb 26, 2017
DevPost submission for hack illinois 2017
View hackillinois2017.md

Hack Illinois 2017

First Open Source contribution to Jupyter

About

Project Jupyter was born out of the IPython Project in 2014 as it evolved to support interactive data science and scientific computing across all programming languages.

My Work

Started with a introduction by Katy Huff to figure out the technicalities of submitting a pull request to the actual copy.(https://github.com/arfc/hipython/pull/2).

Subsequently, I tried my hands on the jupyter project. I identified a beginner friendly issue with Jupyter notebook (http://jupyter.org/) which I could start with. It involved reading several issues and the codebase to identify the problem and making the necessary changes.

The issue was a bugfix in nb and server extensions where server extensions were not loaded when installed to different locations. (https://github.com/jupyter/notebook/issues/2063) The solution was solved by modifiying to load with Config Manager so that the merge happens recursively by minrk (https://github.com/jupyter/noteb