A woman who fired a couple of gunshots at an occupied Binghamton residence has been sentenced to six years in state prison.