Given a non-trivial torsion-free abelian group (A,+,0), a field F of characteristic 0, and a non-degenerate bi-additive skew-symmetric map φ :A × A → F, we define a Lie algebra ∑ = ∑(A, φ) over F with basis {ex | x ∈ A\{0}}and Lie product [ex, ey] = φ(x, y)ex+y. We show that ∑ is endowed uniquely with a non-degenerate symmetric invariant bilinear form and the derivation algebra Der ∑ of ∑ is a complete Lie algebra. We describe the double extension D(∑, T) of ∑ by T, where T is spanned by the locally finite derivations of ∑, and determine the second cohomology group H2(D(∑,T),F) using anti-derivations related to the form on D(∑, T). Finally, we compute the second Leibniz cohomology groups HL2(∑, F) and HL2(D(∑, T), F).