Skip to content

Instantly share code, notes, and snippets.

@jColeChanged
jColeChanged / interview.py
Created May 21, 2014 20:35
Sometimes insertion sort if better than nlngn sorting methods
from operator import itemgetter
def inefficient_most_common(d, n):
"""
Returns the n most common words in a dictionary.
Args:
d: A dictionary of the frequencies or counts.
n: An integer representing the number of words to be returned.
@justinjones
justinjones / lol-champions.json
Created January 27, 2012 12:45
League of legends champion data in JSON format
[ { "desc" : "Unlike other foxes that roamed the woods of southern Ionia, Ahri had always felt a strange connection to the magical world around her; a connection that was somehow incomplete. Deep inside, she felt the skin she had been born into was an ill fit for her and dreamt of one day...",
"id" : 103,
"name" : "Ahri",
"tags" : [ "assassin",
"mage",
"ranged"
]
},
{ "desc" : "There exists an ancient order originating in the Ionian Isles dedicated to the preservation of balance. Order, chaos, light, darkness -- all things must exist in perfect harmony for such is the way of the universe. This order is known as the Kinkou and it employs a triumvirate...",
"id" : 84,