Files
NijiHolo_EN_ID_Bot/src/util.py
T

18 lines
458 B
Python
Raw Normal View History

2022-09-12 01:31:09 -07:00
## Shared utility functions.
import os
# Twitter API instance to share throughout program
2022-09-12 01:31:09 -07:00
twAPI = None
# returns system path to this project, which is
# up one level from this file's directory (src).
2022-09-12 01:31:09 -07:00
def get_project_dir():
return os.path.join(os.path.dirname(__file__), os.pardir)
# determine if tweet involves cross-company interaction
def is_cross_company(tweet):
pass
def clamp(n, smallest, largest):
return max(smallest, min(n, largest))