Month: December 2018

How does your computer resolve in the browser

I was recently asked this question as a follow-up to the interview question “what happens when you type in the browser?”. The answer to the main question is on a high level, i.e. starting with checking the browser’s cache

Bash basics example

List the number of lines in all of the csv data files. wc -l *.csv Next, remove the line containing the word “total”. wc -l *.csv | grep -v total Display the line with fewest number of lines wc -l

Bash basics 2

Summary: head and tail select rows, cut selects columns, and grep “phrase” selects lines that contain “phrase“. Note: grep -v: invert the match, i.e., only show lines that don’t match ** Writing to an output file command > output_file **

Bash basics

Environmental variables — are in all caps. E.g HOME, USER — the set command displays all the environmental variable Getting the value of an environmental variable: 1. echo $HOME — note the $ as the first character 2. set |

Python Variable

Variable Assignment: n = 300 — python creates an object of type integer in memory and assigns n as a pointer to it’s location. m = n — python DOES NOT create a not integer object, but assigns m as