A more thorough explanation would be nice. Where did you get these exploits, what are they for etc..
The first one requires Ruby to run. Ruby is a relatively new scripting language, and it looks as though it takes command line arguments.
The second is in python, and is a bit more simple. The host you attack would be the first argument you input, and the port by default is set to 3389. All it does is connect to the host using a simple socket and sends buf(the exploit shellcode) 1000 times. To run it, you would need to install python and run it from a command line terminal. It would look a little something like this:
If they don't work out of pastebin they probably won't. Chronic it's for the ms12-020 advisory, google "ms12-020" and it should give plenty of results with recent converage. The ruby exploit is run the same way, argv gives is host. The ruby one in particular has been written using the packet capture of another PoC, the testing is not mentioned. The other PoC has only been tested on WinXP SP3 (ES) [locally] by the look of it. Don't trust them to work.
You'd be better if you know a programming language to make your own exploit based on the actual original PoC...