docs: def set_frequencies(self, freq, rg=None, setMaxfeq=True, setMinfreq=True, setSpeed=True):
          '''
          Set cores frequencies
  
          freq: int frequency in KHz
          rg: list of range of cores
          setMaxfeq: set the maximum frequency, default to true
          setMinfreq: set the minimum frequency, default to true
          setSpeed: only set the frequency, default to true
          '''
          to_change = self.__get_ranges("online")
          if type(rg) == int:
              rg= [rg]
          if rg: to_change= set(rg) & set(self.__get_ranges("online"))
          for cpu in to_change:
              if setSpeed:
                  fpath = path.join("cpu%i"%cpu,"cpufreq","scaling_setspeed")
                  self.__write_cpu_file(fpath, str(freq).encode())
              if setMinfreq:
                  fpath = path.join("cpu%i"%cpu,"cpufreq","scaling_min_freq")
                  self.__write_cpu_file(fpath, str(freq).encode())
              if setMaxfeq:
                  fpath = path.join("cpu%i"%cpu,"cpufreq","scaling_max_freq")
                  self.__write_cpu_file(fpath, str(freq).encode())