Battle of Algiers

Incredible film about the political conflict in Algeria:

https://www.vrbo.com/1916821?adultsCount=4&arrival=2021-12-24&departure=2021-12-31&unitId=2479340

How to make Preview the Default Application for Opening PDFs instead of Adobe (MacOS)

Ever since I downloaded Adobe Acrobat Reader, I noticed that all my PDFs open with Adobe, which I did not prefer as I liked the Preview interface.

In order to make preview the default app for opening pdf files, you can right click a PDF file in Finder/Desktop, and then press Get Info. Then, it will show some details. Open the drop down that says Open With: and set it to Preview. Then, press Change All. Now, whenever you open a PDF, it will always open in Preview.

Two’s Complement

Explanation of two’s complement: https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html

Idea:

Take binary digits, flip them all, then add 1

To undo two’s complement: -1 from binary digit, flip all digits, convert

KMeans Clustering

Since I’m currently doing KMeans Clustering for my AI class, here are some resources I found helpful:

sklearn.cluster.KMeans:

https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html

Example code of kMeans segmentation: 

Segmentation using k-means clustering in Python

Image Segmentation using KMeans:

Open CV Tutorial: https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_ml/py_kmeans/py_kmeans_opencv/py_kmeans_opencv.html

Open CV Full Tutorial with Python: 

 

K-fold Cross Validation

I had some confusions in my AI class regarding how k-fold cross validation worked, and I found this very concise and clear explanation for it:

 

Customize your vim: How to add line numbers, colors, and cursor to your vim

Vim can be very annoying to navigate and use when everything is one color, there are no line numbers to help debug, and you must only use arrow keys to navigate. Here is how to customize your vim for easier convenience when programming:

Go to terminal, type command:

vi ~./vimrc

The vimrc file contains optional runtime configuration settings to initialize Vim when it starts. You can customize Vim by putting suitable commands in your vimrc.

In this file, type the following

To turn on color schema: 

syntax on 

colorscheme delek

To add line number:

set number

To add cursor:

set mouse=a

 

Intro to Swift iOS Programming

For my research at school, we are building an iOS application to help the visually impaired navigate through new environments. To do so, we had to go through a few Swift tutorials. Here are some that were provided that I found helpful:

https://docs.swift.org/swift-book/GuidedTour/GuidedTour.html

Start Developing iOS (Swift):

https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/index.html#//apple_ref/doc/uid/TP40015214-CH2-SW1

This one is a little outdated, but it still serves to introduce the main concepts and functions.

iOS Glossary:

https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/GlossaryDefinitions.html#//apple_ref/doc/uid/TP40015214-CH12-SW1