Skip to content

Instantly share code, notes, and snippets.

View mholtzscher's full-sized avatar

Michael Holtzscher mholtzscher

  • Kansas City, MO
View GitHub Profile
@mholtzscher
mholtzscher / syllapy_usage.py
Last active March 26, 2019 02:01
SyllaPy Example
import syllapy
syllapy.count("hello")
# 2
syllapy.count("world")
# 1
syllapy.count("additional")
# 4
@mholtzscher
mholtzscher / example_email_op.py
Created February 27, 2019 19:22
Example Email Operator Usage with Attachment
from airflow.models import DAG
from airflow.operators.email_operator import EmailOperator
from airflow.operators.python_operator import PythonOperator
from datetime import datetime
from tempfile import NamedTemporaryFile
dag = DAG(
"email_example",
description="Sample Email Example with File attachments",
def _syllables(word):
syllable_count = 0
vowels = 'aeiouy'
if word[0] in vowels:
syllable_count += 1
for index in range(1, len(word)):
if word[index] in vowels and word[index - 1] not in vowels:
syllable_count += 1
if word.endswith('e'):
syllable_count -= 1