A collection of SE mod script examples and some ready-to-use code libraries.
I recommend to start from Quick Intro to Space Engineers Modding which is in the Wiki tab with other guides aswell.
Feel free to use these scripts in your mods or whatever.