Unable to use EMAX 20A ESC
Yes, 12V computer power supply can be used. My error was that I assumed that the dutysignal should be 0 in the beginning, before powering up the ESC. The ESC requires signal from 1ms HIGH to 2ms HIGH every 20ms (50 hertz). For 50 hertz the dutysignal must be between 5.0 and 10.0. Below is the full code for running a HDD motor with EMAX 20A ESC on Raspberry Pi.

import time
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
p = GPIO.PWM(18, 50) # GPIO 18, 50 hertz PWM

p.start(5) # 1ms for 50  hertz
print("start the motor in 10s (must be off before seeing this line)")
time.sleep(10)
#for an HDD motor it should be between 5.0 to 10.0 for 50  hertz
p.ChangeDutyCycle(6.2)

input('Press return to stop')   # use raw_input for Python 2
p.stop()
GPIO.cleanup()


Also on Raspberry Pi and older PIs sush as model 2 you need https://github.com/metachris/RPIO.git for the Python RPIO library, otherwise it gives an error.

Thanks for the comments.