Getting a refurbished laptop is never a good idea only because you never know what sort of condition it's in, both the hardware and the software. Only if you're really low on cash and cannot afford a new laptop, and ABSOLUTELY need a laptop immediately, would i advise getting a refurbished one.
Although it's true that the G75 is a superior laptop to the Y580, it's also true that the Y580 is the best gaming laptop in the under $1,000 range. It's a good laptop with a core i7 processor, at least 8GB RAM and a NVIDIA GTX 660M card. These are the same specs as the G75, except some versions of the G75 come with a default of 16GB RAM and a 670M card. Therefore if you get the Y580, you're not only getting the same specs (or very similar specs) for a much lower price, you're getting the added benefit of it being brand new, and having full warranty in case of any issues. The problem with a refurbished laptop is that if you buy it and it works fine for a while, 6 months down the line if it starts screwing up a lot or giving you major problems, your hands are pretty much tied.
I suggest you get the Y580 brand new and enjoy it. It offers good specs at a decent price, and since you're using it for computer science and SOME gaming, you won't need anything more powerful. The core i7 processor is good enough, plus the 660M card is a medium level class 1 graphics card, which means it'll run most games on high/ultra without a a problem. Brand new, really good specs for around $900 is a deal if I ever saw one