This is a python script that gets the current weather for NYC from OpenWeatherMap and from "wttr.in/newyork." auth.py is a separate file that contains the Twitter API keys for your particular developer application. Make sure to assign the variables with your unique keys in-between quotation marks before running the program. Also make sure to store all files in the same folder and store the folder on your home directory (Linix of Mac). This script is supposed to run on a cronjob on a server. I have mine running on a Raspberry Pi set to tweet the weather every 30 minutes.
Check out the Twitter Bot: https://twitter.com/Weather_in_NYC