pip3 install emoji

import emoji
result = emoji.emojize('Python is :thumbs_up:')
print(result)
# 'Python is ????'

# You can also reverse this:
result = emoji.demojize('Python is ????')
print(result)
# 'Python is :thumbs_up:'

 

dataclasses

from dataclasses import dataclass

@dataclass
class Card:
    rank: str
    suit: str
    
card = Card("Q", "hearts")

print(card == card)
# True

print(card.rank)
# 'Q'

print(card)
Card(rank='Q', suit='hearts')

 

Out-of-Core DataFrames for Python, ML, visualize and explore big tabular data at a billion rows per second

 

Pillow 显示图片

pip3 install Pillow

 

pip3 install progress

from progress.bar import Bar

bar = Bar('Processing', max=20)
for i in range(20):
    # Do some work
    bar.next()
bar.finish()

 

pip3 install python-dateutil

from dateutil.parser import parse

logline = 'INFO 2020-01-01T00:00:01 Happy new year, human.'
timestamp = parse(logline, fuzzy=True)
print(timestamp)
# 2020-01-01 00:00:01

 

相关文章:

  • 2021-05-31
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-11-16
  • 2021-09-27
  • 2021-09-28
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2021-06-06
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案