Push pull solenoid

Hi Can anybody provide me a code for the push pull solenoid with raspberry pi