Carbon and germanium resistors in the variable-range hopping regime for thermometry below 1 K