Move the X,Y point based on angle

python

#1

I try to place the electrical family by automatically based on linked mechanical equipment’s. I can place the family if the mechanical equipment’s are in vertical are in horizontal position. But if the linked mechanical equipment’s are placed in some angle on that position I want to move both x and y. If I using this operation in dynamo I want to create lot of script. But using python it is easy to use. I am new to python, So I can’t able to create it. Can any one please suggest it. Thanks in advance.