There aren't codes for this, but I'm sure you could program it by yourself. I'll try to guide you a little bit.
The SHARP distance sensor has an analog output. You can connect it to an analog input of the Galileo board, and read its value. You will need to calibrate the sensor first to know what distance is represented by a particular voltage level in the range of 0-5V. Once you know the distance (for example that 2V represents 20cm) you can measure the time the moving object requires to go from point A to point B.
If point A is 20cm (2V following the example above), and point B is 50cm (let's say an analog value of 3.2V), and it took 0.5s, you can calculate the speed with the following formula: (pointB - pointA)/time, which with the example above would be a speed of 60cm/s.
I hope you find the information above useful. I recommend you to check the MRAA documentation to know how to read analog values: intel-iot-devkit/mraa · GitHub