Model independent determination of the shape function for inclusive b decays and of the structure functions in DIS