  Nearby Gamma-Ray Bursts (GRBs) have been proposed as a possible cause of mass
extinctions on Earth. Due to the higher event rate of GRBs at higher redshifts,
it has been speculated that life as we know it may not survive above a certain
redshift (e.g. $z>0.5$). We examine the duty cycle of lethal (life-threatening)
GRBs in the solar neighborhood, in the Sloan Digital Sky Survey (SDSS) galaxies
and GRB host galaxies, with the dependence of the long GRB rate on star
formation and metallicity properly taken into account. We find that the number
of lethal GRBs attacking Earth within the past 500 Myr ($\sim$ epoch of the
Ordovician mass extinction) is $0.93$. The number of lethal GRBs hitting a
certain planet increases with redshift, thanks to the increasing star formation
rate and decreasing metallicity in high-$z$ galaxies. Taking 1 per 500 Myr as a
conservative duty cycle for life to survive, as evidenced by our existence, we
find that there are still a good fraction of SDSS galaxies beyond $z=0.5$ where
the GRB rate at half-mass radius is lower than this value. We derive the
fraction of such benign galaxies as a function of redshift through Monte Carlo
simulations, and find that the fraction is $\sim 50\%$ at $z\sim 1.5$ and $\sim
10\%$ even at $z \sim 3$. The mass distribution of benign galaxies is dominated
by Milky-Way-like ones, thanks to their commonness, relatively large mass, and
low star formation rate. GRB host galaxies are among the most dangerous ones.
