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
| ''' | |
| good try. maybe it would help to have more functions, e.g. | |
| ''' | |
| # I chose to only use modules that come bundled with Python 2.7 | |
| import httplib | |
| import json | |
| import datetime | |
| import re | |
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 sys | |
| from pprint import pprint | |
| class Node(object): | |
| def __init__(self, index, value, **kwargs): | |
| ''' | |
| made it doubly linked, | |
| which is unecessary here | |
| ''' | |
| self.index = index |
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
| # ok, so py3 here so these are just free form comments and there are going to be | |
| # typos. really just trying to give you ideas on how to do things | |
| import time | |
| import praw | |
| import re | |
| import urllib2 | |
| import signal, sys | |
| # This string is sent by praw to reddit in accordance to the API rules |
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
| from __future__ import print_function | |
| import time | |
| from collections import defaultdict | |
| from pprint import pprint | |
| def read_reads(read_fn): | |
| f = open(read_fn, 'r') | |
| first_line = True | |
| all_reads = [] |
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
| from __future__ import print_function | |
| from collections import defaultdict, deque | |
| from pprint import pprint | |
| class Node(object): | |
| def __init__(self, value): | |
| self.value = value | |
| self.nin = 0 | |
| self.nout = 0 |
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
| from __future__ import print_function | |
| from collections import defaultdict, deque | |
| from pprint import pprint | |
| class Edge(object): | |
| def __init__(self, left, right): | |
| self.left = left | |
| self.right = right | |
| self.color = 'white' |
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
| from __future__ import print_function | |
| from collections import defaultdict, deque | |
| from pprint import pprint | |
| class Edge(object): | |
| ''' | |
| Edge class, used to keep track of links between nodes. | |
| two adjacent noes chare a single Edge instance, that describes their | |
| relationship |
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
| from __future__ import print_function | |
| from collections import defaultdict | |
| #from statistics import median | |
| import time | |
| def median(iterable): | |
| return sorted(iterable)[len(iterable)//2] |
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
| from jira.client import JIRA | |
| from datetime import datetime, date, timedelta | |
| from BusinessHours import BusinessHours | |
| import sys | |
| global jira | |
| global jiraURL | |
| global jiraUser | |
| global jiraPass |
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
| class Date: | |
| def __init__(self, new_month, new_day, new_year): | |
| """The constructor for objects of type Date.""" | |
| self.month = new_month | |
| self.day = new_day | |
| self.year = new_year | |
| def __str__(self): | |