Braided hose modeling
Here a more accurate answer.
And here is a simpler solution for the first picture (but you can use this kind of solution to fake the second one):

Create 2 bricks (front view), the proportion is 2 x 1 units, subdivide a bit, rotate them 45° and stick them together.



Use a first Array modifier to duplicate them on the X axis. Find the good Relative Offset value.



Use a second Array modifier to duplicate them on the Z axis. Again, find the good Relative Offset value.



Add a Simple Deform modifier / Bend mode, find the good Deform Angle value (more than 360°).



Add a Subdivision Surface modifier and press Smooth Shading.
To make it follow a curve, use a Curve modifier.