This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import numpy as np | |
######## Begin code which needs to be modified ########## | |
# Implementation 1 | |
class MyChainDict(object): | |
def __init__(self): | |
self.dictSize = 1000 | |
self.mydict = [] | |
for i in range(self.dictSize): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This project gave us interesting insights to hash table implementations and python in general. It showed us how important your implementation is when dealing with big data. | |
For chaining, we noticed that having a good hash function was really important to spread the entries over as many buckets as possible since otherwise searching would diverge from the O(1) expectation of a hash table. Similarily, even though each index of the hash array can hold more than one item doesn't mean you don't need a table resizing function if the load factor becomes too big. | |
For linear open adressing, the randomness of your input is very important since otherwise large clumps will form. When your load factor aproaches 1 it becomes very slow since you might have to iterate through many elements to find whether a key exists. Another bad thing is that deletion doesn't free up memory as you just have to mark the deleted bucket with a dumby value so searching for elements that are after it won't be an issue. | |
For quadratic open ad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TagPro Achievements | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @include http://*oceanic* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 0.1 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @include http://*oceanic* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 0.1 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @include http://*oceanic* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @description Use and see others custom flairs | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== | |
(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== | |
(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AnyFlairs+ | |
// @author Capernicus | |
// @version 1.0 | |
// @include http://*.koalabeast.com:* | |
// @include http://tagpro-*.koalabeast.com* | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// ==/UserScript== | |
(function () { |