-Boarders:
If you rent out a single room to a single boarder in an SFR (including attached I think) then you are not subject to antidiscrimination rules.
That does not extend to renting out multiple rooms or to multiple people.
Just for a family renting out one room of their house.
-Roommates:
If you are going to share common areas (kitchens, bathrooms) you can express a gender preference.