Remove Duplicates From List – Quick and Easy

I needed a quick way to take my several thousand plus list of numbers and remove all duplicates. Just a one off task where I didn’t care about the original order of the list, only that there should be no duplicates. Enter python! Here’s how I did it.

  1. Open Terminal on Mac
  2. Type “python” and execute
  3. Format my numbers in an array like [39213123667, 532092995671, 659203651894,… in a text editor for easy copy and paste
  4. Use python’s set to remove duplicates and then convert back to a list and print out:
listWithDuplicates = [39213123667, 532092995671, 659203651894,...

# sets are unordered collections of distinct objects
deduplicated = list(set(listWithDuplicates))

# used this to see how many duplicates were removed
len(listWithDuplicates)
len(deduplicated)

# print out list to start doing real work
deduplicated

How much time does being a seminary teacher take?

I was curious about how much time it would take to be a seminary teacher when I was asked to be a seminary teacher on June 17, 2014. Since I was running my own business at the time and tracking all of my work hours by project, I added seminary as a project in my time tracking app as well.

I think the amount of time it takes to be a seminary teacher in one year is going to very from person to person based on several factors. This was my first time teaching seminary and the class was an early morning class. So how much time did I spend on seminary in one year?

488.5 hours total

Let’s break that down since that is not the amount of time I spent teaching.

283 hours 5 minutes teaching in class, setting up class, traveling to/from class.
152 hours 5 minutes preparing lesson plans, study, etc.
51 hours 32 minutes for teacher training.
19 hours 27 minutes for administrative and other tasks.

Let’s use 2,087 hours as our standard for a years worth of full-time work. That means that my first year teaching seminary equalled about 1/4 of a full time job. Fascinating stuff. Hope this helps others who might be getting into teaching seminary for the first time and wondering just how much time they might expect to put into the endeavor.

Amazon package not delivered how to

For those times when you find yourself yelling “My package never arrived!”…

When your Amazon shipment has been marked as delivered but you haven’t received it yet, bet sure to follow the steps outlined at https://www.amazon.com/gp/aw/help/id=201117310

After following those steps, if you still don’t have the package in your hands, visit http://amazon.com/gp/help/customer/contact-us/ and follow the steps to contact Amazon support about your missing package.

contact-amazon-package-not-delivered

In my case, the carrier had marked the package as delivered on a Friday and upon contacting Amazon, they said it would be delivered by end of day Monday.

Pass parameter to Ajax call to use after response returns

Let’s say I have some data I want to pass along with an ajax call to use when the response comes in. You can pass round trip parameters in your jQuery ajax call by adding them to the options object like this

$.ajax({
 url: 'www.example.com/some-api/',
 dataType: "json",
 roundTripVariable: 'Weeeeee!',
 success: function(data, textStatus, jqXHR) {
 // will print 'Weeeeee!' to the console
 console.log( this.roundTripVariable );
 }
});