UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xf1 in position 4: invalid continuation byte

TLDR: Convert your problem file with Sublime Text by opening the file and using “Save with encoding” as utf-8. Alternatively, use iconv -t UTF-8//TRANSLIT -c Zip_Zhvi_SingleFamilyResidence.csv > new_file.csv When does this error happen? I wanted to parse the housing data from Zillow at their research page. Zip code is a great measure of single family home…

Sublime Text shortcut on command line (subl)

TLDR: Create a ~/bin directory and symlink the Sublime command: mkdir ~/bin ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl Note: if ~/bin is not in your $PATH, add it to your zshrc or bash_profile: echo ‘# add ~/bin to path for scripts like subl\nPATH=$PATH:~/bin’ >> ~/.zshrc && source ~/.zshrc The Sublime Text documentation “OS X Command Line”…

Setting environment variables

How to see and set your environment variables Print all your current environment variables with  $ printenv See a the value for a specific variable with echo $ printenv <YOUR_VARIABLE> or $ echo $<YOUR_VARIABLE> For example: $ printenv MY_API_KEY or $ echo $MY_API_KEY How do I set the variable temporarily? This will set your variable for ONLY…

what is curl?

curl is tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, POP3 etc) What can I do with curl? You can get the weather: $ curl https://wttr.in You can download hacker news $ curl https://news.ycombinator.com/ You can read a file from Github $ curl https://raw.githubusercontent.com/facebook/react/master/README.md You can even…

What if we build a knowledge map?

What is a core unit of knowledge? Can you map out a graph of competence based on individual nodes of ability? What does it take to implement a merge sort? Unit: Have a computer Unit: install a programming language Unit: download a text editor Unit: know how to type … etc, etc, This can possibly…

did.txt file

Goal: create an insanely simple “did” file accessible by terminal Time flies by when you’re learning how to code. Its super important to take a second every once in a while to simple write down what you did during the past mental sprint. Writing down what you learned solidifies the knowledge. Cue the did.txt file…

LA Hacks

  The event was billed as the largest hackathon on the West Coast and is the only one I know of that lasted both Friday and Saturday night. 36 hours of coding and the list of suggested items included, at the top, a laptop and a sleeping bag. At first I was hesitant to sign…