add dm.py file
add dm.py and examples in README file