  We find certain functional identities for the Gauss q-power function of a sum
of q-commuting variables. Then we use these identities to obtain two-parameter
twists of the quantum affine algebra U_q (\hat{sl}_2) and of the Yangian
Y(sl_2). We determine the corresponding deformed trigonometric and rational
quantum R-matrices, which then are used in the computation of deformed XXX and
XXZ Hamiltonians.
