Hello,
The link you provided does not seem to work for me.
The boundary conditions (they are called dirichlet boundary conditions) mean that you want to assign a specific displacement to the boundary Gamma_0. An example for this in elasticity would be a beam that is stuck in a wall at one end. In that case u_0 = 0 on that end.
The other boundary conditions are homogenous neumann conditions. Physically, they are equivalent to traction forces on the boundary. Usually, they are equal to zero, which simply means that the boundary has no forces acting on it, which is the case in many applications.
Dirichlet boundary conditions have to be applied by the user for whatever part of the boundary you need them. Neumann conditions that are zero don't have to be applied by the user, they appear automatically whereever there is no other boundary condition.
So for example, if you want to fix one side of the cube of a wall and apply a constant displacement to the opposite side (stretching the cube), then you would set u=0 on the first side, u=1 on the opposite side, and simply do nothing for the other faces.
Unfortunately, I didn't quite get your last question about the hole? Do you want to know which of the two boundary conditions you should apply to the hole. That depends on what your application is, i.e. whether you want to stick something through the hole and pull on it or whether you simply don't want to do anything to
the hole. Or does your question concern the specific way to implement boundary conditions in fenics?
regards