How to use the demoji.__init__.UTC function in demoji

To help you get started, weโ€™ve selected a few demoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bsolomon1124 / demoji / demoji / __init__.py View on Github external
class UTC(datetime.tzinfo):
    """UTC (Python 2 compat)."""

    def utcoffset(self, dt):
        return _zero

    def tzname(self, dt):
        return "UTC"

    def dst(self, dt):
        return _zero


utc = UTC()
del UTC


def _raw_stream_unicodeorg_emojifile(url):
    print("\033[33m" + "Downloading emoji data ..." + "\033[0m")
    resp = requests.request("GET", url, stream=True)
    print(
        "\033[92m"
        + "... OK"
        + "\033[0m"
        + " (Got response in %0.2f seconds)" % resp.elapsed.total_seconds()
    )

    POUNDSIGN = b"#"
    SEMICOLON = b";"
    SPACE = b" "