Effective hamiltonians for ΔS = 1 and ΔB = 1 non-leptonic decays beyond the leading logarithmic approximation