NO. That's my answer. I've attempted this when younger. I was only 140 lbs and the cord snapped. I woke up on the ground staring at the ceiling, I do not know how long I had been lying there. Could have been thirty seconds, could have been three hours. I was lucky to avoid any brain damage. You may not be so lucky.
Do not attempt with an electrical cord or extension cord. A proper rope is necessary. Same goes for using a flimsy rope.
You are risking ending up in a diaper and wheelchair for the rest of your life if you hang for a few minutes too long and then the cord snaps, leaving you brain damaged for life. And then, you will never be able to hang yourself willingly ever. You will be trapped in your body until it decides to die on its own, decades later after being fed everyday. That becomes reality for people who mess up their suicide.