Calculating complex integral 
Compute the value of $$I=\int_{-\pi}^\pi\frac{dz}{\sqrt{|\cos z|}e^{3iz}}.$$

The function has two branch points (at $z=\pm\frac\pi 2$). If they were poles I could have been used Residue theorem on some path.
How can I compute the integral explicitly?

You do not have to worry too much about the branch points here, since the singularities go like $|z\pm \pi/2|^{-1/2}$, and thus are integrable. In fact, since we integrate along a part of the real axis, we need no complex analysis techniques at all.
Your integral equals
$$
\int_{-\pi}^\pi\frac{e^{-i3z}}{\sqrt{|\cos z|}}\,dz=\int_{-\pi}^\pi\frac{\cos 3z}{\sqrt{|\cos z|}}\,dz-i\int_{-\pi}^\pi\frac{\sin 3z}{\sqrt{|\cos z|}}\,dz
$$
In the right-hand side, the second integral is zero, since the integrand is odd. The first one is also zero: First, note that the integrand is even, so you get double the integral from $0$ to $\pi$. But if we call the integrand $f$, then $f(\pi-z)=-f(\pi)$. This implies the statement, and so

$$\int_{-\pi}^\pi\frac{e^{-i3z}}{\sqrt{|\cos z|}}\,dz=0.$$

