When I used to cycle to work thru Central London, pedestrians would step out into the road without even looking. Eventually I would just point the bike right at them and kind of glare fiercely

( imitating the bike messengers ) . This would cause them to jump with fright and scamper off the road - hopefully teaching them to be more careful next time. I never hit anyone so maybe it worked