Skip to content

Instantly share code, notes, and snippets.

View adityajn105's full-sized avatar

Aditya Jain adityajn105

View GitHub Profile
@adityajn105
adityajn105 / Readme.md
Last active November 18, 2020 03:32
Important Linux Command
  1. Process related command
  • top - real time view of all process running
  • ps -aus - snapshot of all process running
  • kill -9 PID - kill a process with PID as process id.
  • nohup cmd > logs.out & - Run a process in background and deattach from terminal.
  • screen - Start a screen terminal (-r restore, -ls view, Ctrl-A + d deattach screen)
  1. Filesystem related
  • ls -la - list all files in current directory
  • **wc -l ** - Count number of lines in a file
@adityajn105
adityajn105 / common_interview_codes.md
Last active November 26, 2024 06:59
Common interview codes
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@adityajn105
adityajn105 / checkers_agent.py
Created May 9, 2021 18:05
A MiniMax (Alpha-Beta) pruning agent to play game of checkers.
from random import random
inp = open("input.txt", "r")
single = inp.readline().strip() == 'SINGLE'
white = inp.readline().strip() == 'WHITE'
remain_time = float(inp.readline().strip())
board = []
for i in range(8):
board.append( inp.readline().lstrip() )
inp.close()
WEBVTT
00:11.000 --> 00:13.000
<v Roger Bingham>We are in New York City
00:13.000 --> 00:16.000
<v Roger Bingham>We’re actually at the Lucern Hotel, just down the street
00:16.000 --> 00:18.000
<v Roger Bingham>from the American Museum of Natural History