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
import ruamel.yaml | |
yaml = ruamel.yaml.YAML() | |
data = yaml.load(open('environment.yml')) | |
requirements = [] | |
for dep in data['dependencies']: | |
if isinstance(dep, str): | |
package, package_version, python_version = dep.split('=') | |
if python_version == '0': |
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
from PIL import Image | |
from PIL import ImageDraw | |
from PIL import ImageFont | |
names = ["Pema", "Gurung", "Pema Gurung"] | |
for name in names: | |
myFont = ImageFont.truetype( | |
'/Downloads/precious/Precious.ttf', 65) |
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
""" | |
Github Source: https://github.com/unitaryai/detoxify | |
saving a glimpse of https://www.section.io/engineering-education/building-a-toxicity-classifier/ | |
Toxicity detection using Detoxify | |
pip install detoxify | |
""" | |
from detoxify import Detoxify | |
predictor = Detoxify('multilingual') | |
print(predictor.predict('Why are you so fat?')) |
OlderNewer