Actually, the codes DO apply.

The OP could have called 311, and filed a complaint with the NYC Department of Housing Preservation and Development, which enforces the housing code in this city.