This file contains 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 multireplace(string, replacements, ignore_case=False): | |
""" | |
Given a string and a replacement map, it returns the replaced string. | |
:param str string: string to execute replacements on | |
:param dict replacements: replacement dictionary {value to find: value to replace} | |
:param bool ignore_case: whether the match should be case insensitive | |
:rtype: str | |
""" |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
Tool to detect and delete orphan raw files | |
""" | |
from __future__ import unicode_literals, print_function |