When one describes the electrode, he must give the following information:
i) lattice vectors of unit cell: length, angle, and etc;
ii) the number of atoms containing in unit cell;
iii) the atomic species (i.e., electrode_elements);
iv) the atomic coordinates.
So, it is easy to find out the difference in your mentioned two script file.
At least, you can see that the lattice vectors are different:
"zigzag.py"
# Set up lattice
vector_a = [32.09404, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.84400684177]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
"graphene_ribbon--electrodes.py"
electrode_cell = [[ 43.56888 , 0. , 0. ],
[ 0. , 43.56888 , 0. ],
[ 0. , 0. , 9.84400684]]*Angstrom
The striking difference is that the lattice vectors of center region should be defined in the former case, while they are not required to be given in the latter case.