# Coursera Machine Learning In Python (Exercise 1)

< !DOCTYPE html>

ex1

I have previously done the Coursera Machine Learning exercises in Matlab. I thought, now that I am starting to get away from Matlab and use Python more, I should re-do the exercises in Python. This is exercise 1.

In [447]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import scipy


Part 1: Create an eye matrix. While this is incredibly simple, I want to make sure that I go through each step and provide a resulting document that a novice can follow long and understand what is happening.

In [448]:
A = np.identity(5)
print A


# Scrape Keywords from Indeed.com Job Postings

## Job Posting Crawler

This is code that will pull each job posting for a specific job title in a specific location (or Nationally) and return / plot the percentage of the postings that have certain keywords. The code is set up to search for all words except stopwords, and other user-defined words (there is probably a much more efficient way of doing this, but I had no need to change this once I had the code running). This allows the user to see common technical skills, as well as common soft skills that should be included on a resume.

NOTE: I got this idea from https://jessesw.com/Data-Science-Skills/. Obviously, just using his code would be of no real benefit to me, as I wanted to use the idea to help better my skills with scraping data from HTML files. So, I used his idea and developed my own code from scratch. I also modified the overall process a bit to better fit my needs.

NOTE2: This code will not be able to identify multiple-word skills. So, for example, ‘machine learning’ will show up as either ‘machine’ or ‘learning’. However, ‘machine’ could show up for other phrases than ‘machine learning’.

To run the code, change the city, state, and job title to whichever you wish. After generating the plot, you might need to add ‘keywords’ to the attitional_stop_words list if you do not want them to be included.
Continue reading Scrape Keywords from Indeed.com Job Postings

# Beginner’s Guide to Learning Cocoa Programming

I recently decided that I wanted to learn to program in Cocoa. There wasn’t really a good reason for me to learn it, aside from my desire to learn a new programming language.  Also it would be nice to know how to make Mac and iOS apps.

I looked around the net for a good beginner’s guide to learning Cocoa.  I found one that I highly recommend.  But, before I talk about the book I used to learn Cocoa I should give a quick note about my programming experience.

Prior to entering the PhD program here at CU Boulder, I have no experience programming at all.  As my research progressed, I have become rather proficient at programming in Fortran.  In addition to Fortran, I have taught myself scripting languages such as Python, Bash, C-shell, perl, etc.

So basically, before learning Cocoa I had no real experience programming in an Objective-based language.

# How to Stop “Thanks for Flying Vim” Message

If you are like me, you probably do a lot of your coding on a remote computer. I have known some people who will download all files from a remote computer onto their local system, make changes in a text editor, and then upload the files back to the remote server. This is a very inefficient way of coding, and is just one of the reasons why i choose to write all of my code in VIM.

If you have ready my other posts (specifically Useful .cshrc commands), you know that I like to have the title of the terminal set to my current working directory. However, after exiting VIM, I always end up with the frustrating “Thanks for flying VIM” message in the title.

I had read on other blogs and forums that adding set notitle to your .vimrc file will prevent the “Thanks for flying VIM” message from showing up.

Well, that didn’t work for me. After a lot of scouring the internet, I was able to find the solution.
let &titleold;=getcwd()
Adding this to your .vimrc file will, upon exit from vim, set the terminal title to the current working directory.

# Cluster Status Check Script

Lets face it, nodes randomly go down without warning sometimes. If you’re like me, you aren’t going to consistently check the node status throughout the day. There have been cases where a node has gone down, and I didn’t know about it for a week.

This is very problematic, especially when you run a system that has a small number of nodes that are always in use.

In an effort to resolve both the problem of me not knowing there is a dead node without requiring me to check the node status multiple times a day, I developed a python script to check if there is a dead node. The script is set to run every day at midnight, and if there is a dead node it will send me an email.