from numpy import *
dtr = pi/180 # degree-to-radian conversion
P = 1020.0 # lb
X,Y = 5.7,7.6 # ft
Analysis of whole structure.
$\sum M_A = 2XE_y-XP = 0$

# whole structure
Ex = 0.
Ey = P/2.
Ay = P-Ey
# point A
TAC = 0. # zero force member
TAB = -Ay
# point E
TCE = Ex # zero force member
TDE = -Ey
# point D
alpha = arctan(X/Y)
TCD = -TDE/cos(alpha)
TBD = -TCD*sin(alpha)
# point B
TBC = -TBD/sin(alpha)
#
print ('answer:')
print (' TAB=',TAB,'lb')
print (' TAC=',TAC,'lb')
print (' TBC=',TBC,'lb')
print (' TBD=',TBD,'lb')
print (' TCD=',TCD,'lb')
print (' TCE=',TCE,'lb')
print (' TDE=',TDE,'lb')
Fy_top = 6.0 # kip
Fy_mid = 7.0 # kip
Fx_top = 5.0 # kip
Fx_mid = 4.0 # kip
X,Y = 32.,24. # ft

F1,F2 = Fy_top,Fy_mid
F3,F4 = Fx_top,Fx_mid
alpha = arctan(Y/X)
TCE = -F1-F2-(2*F3+F4)*tan(alpha)
TCF = (F3+F4)/cos(alpha)
TDF = -F1-F2+F3*tan(alpha)
TCD = -F3-F4
TAC = -F1-F3*tan(alpha)
TAD = F3/cos(alpha)
TAB = -F3
TBD = -F1
print ('answer:')
print (' TAB=',TAB,'kip')
print (' TBD=',TBD,'kip')
print (' TAD=',TAD,'kip')
print (' TAC=',TAC,'kip')
print (' TCD=',TCD,'kip')
print (' TDF=',TDF,'kip')
print (' TCF=',TCF,'kip')
print (' TCE=',TCE,'kip')
F1,F2,F3 = 4.,8.,16. # kN, top forces (left-to-right)
F4 = 12. # kN, lower forces (both)
X,Y = 70.,110. # cm
# whole structure:
Ay = F1+F2+F3
Bx = ( X*F2 + 3*X*F3 + Y*F4 + 2*Y*F4)/Y
Ax = 2*F4 - Bx
Take the section ABCD:

$\sum M_D = -YA_x -2X(A_y-F_1)+XF_2-YT_{CE}=0$
$\sum F_y = A_y -F_1-F_2+T_{DE}\tfrac{Y}{Z}=0$
$\sum F_x = A_x + T_{CE} +B_x+T_{DF}+T_{DE}\tfrac{X}{Z}=0$
TCE = ( -Y*Ax - 2*X*(Ay-F1) + X*F2 )/Y
Z = sqrt(X**2+Y**2)
TDE = Z/Y*( -Ay + F1 +F2 )
TDF = -Ax -TCE -Bx -TDE*X/Z
print ('answer:')
print (' TDE=',TDE,'kN')
print (' TCE=',TCE,'kN')
print (' TDF=',TDF,'kN')
W = 420. # lb
X = 4. # ft
Y = 3. # ft
# whole structure
Ay = 8*W
Bx = -(8+7+6+5+4+3+2+1)*X*W/Y
Ax = -Bx
# section ABJI
alpha = arctan(Y/X)
TIL = (4*W-Ay)/sin(alpha)
TJL = ( (3+2+1)*X*W - 4*X*Ay - Y*Bx )/Y
TIK = -Ax - Bx - TJL - TIL*cos(alpha)
TIJ = 0.
# joint I
THI = W/sin(alpha) - TIL
TGI = TIK + (TIL-THI)*cos(alpha)
print ('answer:')
print (' TIJ=',TIJ,'lb')
print (' TIL=',TIL,'lb')
print (' TIK=',TIK,'lb')
print (' THI=',THI,'lb')
print (' TGI=',TGI,'lb')

Determine the force in member JG if $P = 16$ kN and $Q = 0$.
Note this problem can be done on paper, as seen in the solution here (pdf).
Shown below is another way to solve the problem, letting the code do the cross products and then using Sympy (a symbolic equation solver) to solve for the unknowns.
If sympy is not installed on your system, you will have to run this:
pip install sympy
import sympy as s
P,Q = 16 , 0. # kN
l = 2 # m
# moment about L for whole structure
ihat,jhat,khat = array((1.,0,0)),array((0,1.,0)),array((0,0,1.))
rLK = l*ihat
rLG = l/2*ihat + 2.5*l*jhat + l*khat
rLA = l/2*ihat + 4*l*jhat
Kzs,Azs,Axs = s.symbols('Kzs,Azs,Axs')
eq = Kzs*cross(rLK,khat) + P*cross(rLG,-khat) \
+ Azs*cross(rLA,khat) + Axs*cross(rLA,ihat)
print ('moment about L=\n\t',eq[0],'\n\t',eq[1],'\n\t',eq[2])
ss = s.solve( [eq[0],eq[1],eq[2]], [Kzs,Azs,Axs])
Az,Kz = float(ss[Azs]),float(ss[Kzs])
Lz = P-Kz-Az
print('structure support reactions are ')
print ('\t Lz = {:.2f} kN'.format(Lz))
print ('\t Kz = {:.2f} kN'.format(Kz))
print ('\t Az = {:.2f} kN'.format(Az))
See the solution pdf for the section diagram used below.
# moment about F for section
rFK = array(( l, -2*l, 0 ))
rFL = array(( 0, -2*l, 0 ))
rFE = array(( l, 0, 0 ))
rFJ = array(( l/2, -l/2, l ))
rEG = array((-l/2, -l/2, l ))
uEG = rEG / sqrt(sum(rEG**2))
FJGs,FEGs,FEBs = s.symbols('FJGs,FEGs,FEBs')
eq = cross( rFK, Kz*khat ) + cross( rFL, Lz*khat ) \
+ FJGs*cross( rFJ, jhat ) + FEBs*cross( rFE, jhat ) \
+ FEGs*cross( rFE, uEG )
ss = s.solve( [eq[0],eq[1],eq[2]], [FJGs,FEGs,FEBs])
FJG,FEG,FEB = float(ss[FJGs]), float(ss[FEGs]), float(ss[FEBs])
print('member forces are ')
print ('\t FJG = {:.2f} kN'.format(FJG))
print ('\t FEG = {:.2f} kN'.format(FEG))
print ('\t FEB = {:.2f} kN'.format(FEB))
print('(negative numbers imply compression)')
F1,F2 = 74., 20. # lb
X = 3.0 # in
Y1,Y2,Y3=2.,4.,6. # in (bottom to top)
$\sum M_C = -XA_y +Y_2B_x - XF_2=0$
Ay,Gy = F1,F2
Bx = (X*F2 + X*Ay)/Y2 # moment sum about C
Cy = F2 - Ay
Cx = -Bx
print ('answer:')
print (' Gy=',Gy,'lb')
print (' Ay=',Ay,'lb')
print (' Bx=',Bx,'lb')
print (' Cx=',Cx,'lb')
print (' Cy=',Cy,'lb')

In the structure shown, cable segment ED and member ECF are horizontal. If $W=660$ lb, determine the forces that the pins C and F exert on member ECF and the forces that the pin at B exerts on member GBF.
W = 660. # lb
LCE,LCF = 89,16. # in
LCB,LAB = 26,76. # in
LAG = 64. # in
R = 9. # in (pulley radius)

Whole body ($A_x=0$):
$\sum M_A= -L_{AG}Gy + (L_{CE}+R)W=0$
$\sum F_y = G_y+A_y-W=0$
ECF:
$\sum M_C=L_{CE}W + L_{CF}F_y=0$
$\sum F_y = C_y+F_y-W=0$
$\sum F_x = C_x+F_x+W=0$
ABCD:
$\sum M_B=(L_{CB}+R)W + L_{CB}C_x=0$
$\sum F_x = -W-C_x-B_x+A_x =0$
# whole body:
Gy = (LCE+R)*W / LAG
Ay = W - Gy
Ax = 0.
# ECF:
Fy = -LCE*W / LCF
Cy = W - Fy
# ABCD:
Cx = -(LCB+R)*W / LCB
Bx = Ax - W - Cx
By = Ay - Cy
Fx = -W - Cx
print ('answer:')
print (' Fy=',Fy,'lb')
print (' Cy=',Cy,'lb')
print (' Fx=',Fx,'lb')
print (' By=',By,'lb')
print (' Bx=',Bx,'lb')
print (' Cx=',Cx,'lb')
W = 420. # lb
R = 5. # in (pulley radius)
X1,X2,X3 = 15.,30.,25. # in (right to left)
Y = 40. # in

For member ABCD:
$\sum M_A= X_1\frac{Y}{Z}T_{BG}+(X_1+X_2)\frac{Y}{Z}T_{CF} + (X_1+X_2+X_3)2W = 0$
where $Z=\sqrt{X_2^2+Y^2}$
And for member EFGH:
$\sum M_E= -X_1\frac{Y}{Z}T_{CF}-(X_1+X_2)\frac{Y}{Z}T_{BG} - (X_1+X_2+X_3-R)W = 0$
Solve these two equations simultaneously.
Z = sqrt(X2**2+Y**2)
CC = array((( X1*Y/Z, (X1+X2)*Y/Z ),
( -(X1+X2)*Y/Z, -X1*Y/Z ) ))
SS = array(( -(X1+X2+X3)*2*W, (X1+X2+X3-R)*W ))
TBG,TCF = linalg.solve(CC,SS)
print ('answer:')
print (' TBG=',TBG,'lb')
print (' TCF=',TCF,'lb')

The linkage shown is used on a garbage truck to lift a 2000 lb dumpster. Points A–G are pins, and member ABC is horizontal. This linkage has the feature that as the dumpster is lifted, the front edge A is lowered, allowing a more convenient height for emptying.
For the position shown, when the dumpster just lifts off the ground, determine the force in hydraulic cylinder CF.
W = 2000. # lb
LAB,LCB,LAHx = 18.,18.,60. # in
LED,LDA,LAG = 12.,24.,24. # in

dumpster:
$\sum M_A = L_{AG}F_G - L_{AHx}W = 0$
$\sum F_y = A_y + \tfrac{1}{\sqrt{2}}F_G - W =0$
EDG:
$\sum M_E = -L_{EG}F_G - L_{ED}F_{CD} = 0$
ABC:
$\sum M_B = -L_{AB}A_y - L_{CB}\tfrac{1}{\sqrt{2}}F_{CD}- L_{CB}\tfrac{1}{\sqrt{2}}F_{CF} = 0$
FG = LAHx*W/LAG
Ay = W - FG/sqrt(2)
LEG = LED + LDA + LAG
FCD = -LEG*FG/LED
FCF = ( -LAB*Ay*sqrt(2) - LCB*FCD )/LCB
print ('answer:')
print (' FCF = {:.0f} lb'.format(FCF))