How to use the emoji.UNICODE_EMOJI function in emoji

To help you get started, we’ve selected a few emoji 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 Herald-Of-Solace / Cancerify / cancerify / cancerify.py View on Github external
chars = zalgo_position_dict[position]
                        count = intensities[position]
                        res_ = random.sample(chars, count)
                        random.shuffle(res_)
                        
                        result__ += ''.join(res_)
                result = result__
            return result
        else:
            #Prettify
            #Just assume that the following lines work, with a few bugs.
            #It will make life easier.

            text = [i for i in args.f]
            for i in range(len(text)):
                if text[i] in emoji.UNICODE_EMOJI:
                    if text[i] == emoji.emojize(':b:',use_aliases=True):
                        text[i] = 'B'
                    else:
                        text[i] = ' '
                for lists in letter_list:
                    if text[i] in lists:
                        text[i] = chr(lists.index(text[i]) + 65)

            for lenny in lenny_list:
                temp_lenny = [c for c in lenny]
                i = 0
                while i< len(text) - len(temp_lenny):
                    if text[i] == temp_lenny[0] and text[i:i+len(temp_lenny)] == temp_lenny:
                        del text[i:i+len(temp_lenny)]
                    else:
                        i += 1
github Kevinpgalligan / EmojipastaBot / build / lib / emojipasta / util / emoji.py View on Github external
"""
Common emoji code.
"""

import emoji

EMOJIS = set(emoji.emojize(emoji_code) for emoji_code in emoji.UNICODE_EMOJI.values())

def is_emoji(c):
    return c in EMOJIS
github Harmon758 / Harmonbot / Discord / cogs / random.py View on Github external
async def emote(self, ctx):
		'''Random emote/emoji'''
		await ctx.embed_reply(random.choice(list(emoji.UNICODE_EMOJI)))
github baieric / chatstats / make_chat_csv.py View on Github external
def normalize(word):
    word = word.lower().strip(string.punctuation).replace("’", "\'")
    # remove all emojis :(
    for c in word:
        if c in emoji.UNICODE_EMOJI:
            return None
    return word
github huggingface / hmtl / demo / hmtlPredictor.py View on Github external
def is_only_emoji(text):
    """
    Test if an incoming text is only composed of emojis.
    """
    result = True
    for c in text:
        if c not in UNICODE_EMOJI:
            result = False
            break
    return result
github chenghuige / wenzheng / utils / gezi / util.py View on Github external
def remove_emojis(sentence):
  import emoji
  allchars = [str for str in sentence]
  l = [c for c in allchars if c not in emoji.UNICODE_EMOJI]
  return ''.join(l)
github bfelbo / DeepMoji / deepmoji / filter_input.py View on Github external
def read_english(path="english_words.txt", add_emojis=True):
    # read english words for filtering (includes emojis as part of set)
    english = set()
    with codecs.open(path, "r", "utf-8") as f:
        for line in f:
            line = line.strip().lower().replace('\n', '')
            if len(line):
                english.add(line)
    if add_emojis:
        for e in UNICODE_EMOJI:
            english.add(e)
    return english