[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.227.46.54: ~ $
import tuned.profiles.unit
import tuned.consts as consts
import collections

class Profile(object):
	"""
	Representation of a tuning profile.
	"""

	__slots__ = ["_name", "_options", "_units"]

	def __init__(self, name, config):
		self._name = name
		self._init_options(config)
		self._init_units(config)

	def _init_options(self, config):
		self._options = {}
		if consts.PLUGIN_MAIN_UNIT_NAME in config:
			self._options = dict(config[consts.PLUGIN_MAIN_UNIT_NAME])

	def _init_units(self, config):
		self._units = collections.OrderedDict()
		for unit_name in config:
			if unit_name != consts.PLUGIN_MAIN_UNIT_NAME:
				new_unit = self._create_unit(unit_name, config[unit_name])
				self._units[unit_name] = new_unit

	def _create_unit(self, name, config):
		return tuned.profiles.unit.Unit(name, config)

	@property
	def name(self):
		"""
		Profile name.
		"""
		return self._name

	@name.setter
	def name(self, value):
		self._name = value

	@property
	def units(self):
		"""
		Units included in the profile.
		"""
		return self._units

	@property
	def options(self):
		"""
		Profile global options.
		"""
		return self._options

Filemanager

Name Type Size Permission Actions
functions Folder 0755
.__init__.pyo.40009 File 483 B 0644
.exceptions.pyo.40009 File 458 B 0644
.factory.pyo.40009 File 653 B 0644
.loader.pyo.40009 File 4.99 KB 0644
.locator.pyo.40009 File 4.05 KB 0644
.merger.pyo.40009 File 2.12 KB 0644
.profile.pyo.40009 File 2.43 KB 0644
.unit.pyo.40009 File 3.86 KB 0644
.variables.pyo.40009 File 3.86 KB 0644
__init__.py File 281 B 0644
__init__.pyc File 483 B 0644
__init__.pyo File 483 B 0644
exceptions.py File 95 B 0644
exceptions.pyc File 458 B 0644
exceptions.pyo File 458 B 0644
factory.py File 141 B 0644
factory.pyc File 653 B 0644
factory.pyo File 653 B 0644
loader.py File 4.13 KB 0644
loader.pyc File 4.99 KB 0644
loader.pyo File 4.99 KB 0644
locator.py File 3.23 KB 0644
locator.pyc File 4.05 KB 0644
locator.pyo File 4.05 KB 0644
merger.py File 1.79 KB 0644
merger.pyc File 2.12 KB 0644
merger.pyo File 2.12 KB 0644
profile.py File 1.11 KB 0644
profile.pyc File 2.43 KB 0644
profile.pyo File 2.43 KB 0644
unit.py File 1.73 KB 0644
unit.pyc File 3.86 KB 0644
unit.pyo File 3.86 KB 0644
variables.py File 2.26 KB 0644
variables.pyc File 3.86 KB 0644
variables.pyo File 3.86 KB 0644