Anfonwch hwn fel neges destun: Type Ia supernovae rates and galaxy clustering from the CFHT supernova legacy survey