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
def _overlapping_ranges_iter(iter1, iter2, *, include_empty=False, range_getter=None): | |
"""Iterates over two iterables of ranges and returns a iterator over all | |
ranges with their common values. | |
Input: two sorted iterators that have a sortable start end | |
Output: iterator of tuples of the form (start, end, val1|None, val2|None) | |
By default, range_getter gets its start from val[0] and end from val[1], but | |
may be replaced with any method that takes a value and returns a 2-tuple of | |
start, end. |
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 lxml import etree, objectify | |
import datetime | |
import time | |
import os | |
import random | |
PAIN_IDENTIFIER = 'IA' | |
XSD_PATH = 'xsd' | |
class PainError(Exception): |
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 csv | |
import datetime | |
import feedparser # pip install feedparser | |
import html2text # pip install html2text | |
from pygithub3 import Github # pip install pygithub3 | |
# USAGE: Create a csv with all columns from Redmine and fetch | |
# your API key from Redmine. Then use the code below to match | |
# properties of the csv with properties of your GitHub issues. | |
# Note: remove the first line of the exported CSV. |