Return default mdata map for GradeSystem
489248
def get_grade_system_mdata():
    """"""
    return {
        'numeric_score_increment': {
            'element_label': {
                'text': 'numeric score increment',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter a decimal value.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_decimal_values': [None],
            'syntax': 'DECIMAL',
            'decimal_scale': None,
            'minimum_decimal': None,
            'maximum_decimal': None,
            'decimal_set': [],
        },
        'lowest_numeric_score': {
            'element_label': {
                'text': 'lowest numeric score',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter a decimal value.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_decimal_values': [None],
            'syntax': 'DECIMAL',
            'decimal_scale': None,
            'minimum_decimal': None,
            'maximum_decimal': None,
            'decimal_set': [],
        },
        'based_on_grades': {
            'element_label': {
                'text': 'based on grades',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter either true or false.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_boolean_values': [None],
            'syntax': 'BOOLEAN',
        },
        'highest_numeric_score': {
            'element_label': {
                'text': 'highest numeric score',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter a decimal value.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_decimal_values': [None],
            'syntax': 'DECIMAL',
            'decimal_scale': None,
            'minimum_decimal': None,
            'maximum_decimal': None,
            'decimal_set': [],
        },
    }
503190
public Map<String, Object> getDisplayDataMap() {
        return displayDataMap != null ? Collections.unmodifiableMap(displayDataMap) : Collections.emptyMap();
    }
500554
def get_default_master_type(num_gpus=1):
  """"""
  gpus_to_master_map = {
      0: "standard",
      1: "standard_p100",
      4: "complex_model_m_p100",
      8: "complex_model_l_gpu",
  }
  if num_gpus not in gpus_to_master_map:
    raise ValueError("Num gpus must be in %s" %
                     str(sorted(list(gpus_to_master_map.keys()))))
  return gpus_to_master_map[num_gpus]
154768
def get_resource_mdata():
    """"""
    return {
        'group': {
            'element_label': {
                'text': 'group',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter either true or false.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_boolean_values': [None],
            'syntax': 'BOOLEAN',
        },
        'avatar': {
            'element_label': {
                'text': 'avatar',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'accepts an osid.id.Id object',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_id_values': [''],
            'syntax': 'ID',
            'id_set': [],
        },
    }
110530
private Map<Class<?>, TableCellRenderer> getDefaultTableCellRenderers() {
		if (DEFAULT_RENDERERS.isEmpty()) {
			DEFAULT_RENDERERS.put(Boolean.class, new MBooleanTableCellRenderer());
			DEFAULT_RENDERERS.put(Double.class, new MDoubleTableCellRenderer());
			DEFAULT_RENDERERS.put(Float.class, new MDoubleTableCellRenderer());
			DEFAULT_RENDERERS.put(java.math.BigDecimal.class, new MDoubleTableCellRenderer());
			DEFAULT_RENDERERS.put(Integer.class, new MIntegerTableCellRenderer());
			DEFAULT_RENDERERS.put(Long.class, new MIntegerTableCellRenderer());
			DEFAULT_RENDERERS.put(java.math.BigInteger.class, new MIntegerTableCellRenderer());
			DEFAULT_RENDERERS.put(GregorianCalendar.class, new MDateTableCellRenderer());
			DEFAULT_RENDERERS.put(Date.class, new MDateTableCellRenderer());
			DEFAULT_RENDERERS.put(java.sql.Date.class, new MDateTableCellRenderer());
			DEFAULT_RENDERERS.put(java.sql.Timestamp.class, new MDateTableCellRenderer());
			DEFAULT_RENDERERS.put(ArrayList.class, new MListTableCellRenderer()); // NOPMD
			DEFAULT_RENDERERS.put(HashMap.class, new MListTableCellRenderer()); // NOPMD
			DEFAULT_RENDERERS.put(Hashtable.class, new MListTableCellRenderer()); // NOPMD
			DEFAULT_RENDERERS.put(Object.class, new MDefaultTableCellRenderer());
			DEFAULT_RENDERERS.put(String.class, new MDefaultTableCellRenderer());
			DEFAULT_RENDERERS.put(ImageIcon.class, new MImageIconTableCellRenderer());
			DEFAULT_RENDERERS.put(Component.class, new MComponentTableCellRenderer());
		}
		return DEFAULT_RENDERERS;
	}
726608
def _get_default_mr_params(cls):
    """"""
    cfg = cls(_lenient=True)
    mr_params = cfg._get_mr_params()
    mr_params["api_version"] = 0
    return mr_params
1292912
def _init_map(self, record_types=None, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_map(self, record_types=record_types)
        self._my_map['levelId'] = self._level_default
        self._my_map['startTime'] = self._start_time_default
        self._my_map['gradeSystemId'] = self._grade_system_default
        self._my_map['itemsShuffled'] = self._items_shuffled_default
        self._my_map['scoreSystemId'] = self._score_system_default
        self._my_map['deadline'] = self._deadline_default
        self._my_map['assignedBankIds'] = [str(kwargs['bank_id'])]
        self._my_map['duration'] = self._duration_default
        self._my_map['assessmentId'] = str(kwargs['assessment_id'])
        self._my_map['itemsSequential'] = self._items_sequential_default
398258
def get_cmdclass():
    '''
    
    '''
    ret = {}
    cfg = __get_config()
    if cfg is None:
        return
    mapdict = {
        'build': CustomBuild,
        'build_clib': CustomBuildCLib,
        'build_ext': CustomBuildExt,
        'build_py': CustomBuildPy,
        'build_scripts': CustomBuildScripts,
        'install': CustomInstall,
        'install_data': CustomInstallData,
        'install_headers': CustomInstallHeaders,
        'install_lib': CustomInstallLib,
        'install_scripts': CustomInstallScripts,
    }
    for step in cfg.keys():
        if step in mapdict:
            ret[step] = mapdict[step]
    return ret
815567
def get_dataset(self, key, info):
        """"""
        res = super(HRITGOMSFileHandler, self).get_dataset(key, info)

        res = self.calibrate(res, key.calibration)
        res.attrs['units'] = info['units']
        res.attrs['standard_name'] = info['standard_name']
        res.attrs['wavelength'] = info['wavelength']
        res.attrs['platform_name'] = self.platform_name
        res.attrs['sensor'] = 'msu-gs'
        res.attrs['satellite_longitude'] = self.mda['projection_parameters']['SSP_longitude']
        res.attrs['satellite_latitude'] = 0
        res.attrs['satellite_altitude'] = 35785831.00

        return res
632117
protected function getDefaultMetadata()
    {
        //merge acl
        $output = [];
        if (isset($this->settings['acl']) && !empty($this->settings['acl'])) {
            $output['ACL'] = $this->acl[$this->settings['acl']];
        }

        //merge storage
        if (isset($this->settings['storage'])) {
            if ('standard' === $this->settings['storage']) {
                $output['storage'] = static::STORAGE_STANDARD;
            } elseif ('reduced' === $this->settings['storage']) {
                $output['storage'] = static::STORAGE_REDUCED;
            }
        }

        //merge meta
        if (isset($this->settings['meta']) && !empty($this->settings['meta'])) {
            $output['meta'] = $this->settings['meta'];
        }

        //merge cache control header
        if (isset($this->settings['cache_control']) && !empty($this->settings['cache_control'])) {
            $output['CacheControl'] = $this->settings['cache_control'];
        }

        //merge encryption
        if (isset($this->settings['encryption']) && !empty($this->settings['encryption'])) {
            if ('aes256' === $this->settings['encryption']) {
                $output['encryption'] = 'AES256';
            }
        }

        return $output;
    }
773443
def _linux_memdata():
    '''
    
    '''
    grains = {'mem_total': 0, 'swap_total': 0}

    meminfo = '/proc/meminfo'
    if os.path.isfile(meminfo):
        with salt.utils.files.fopen(meminfo, 'r') as ifile:
            for line in ifile:
                comps = line.rstrip('\n').split(':')
                if not len(comps) > 1:
                    continue
                if comps[0].strip() == 'MemTotal':
                    # Use floor division to force output to be an integer
                    grains['mem_total'] = int(comps[1].split()[0]) // 1024
                if comps[0].strip() == 'SwapTotal':
                    # Use floor division to force output to be an integer
                    grains['swap_total'] = int(comps[1].split()[0]) // 1024
    return grains
1030101
def _initDevClasses(self):
        """"""
        self._devClassTree = {}
        self._partitionTree = {}
        self._mapDevType = {}
        basedevs = []
        otherdevs = []
        if self._mapMajorDevclass is None:
            self._initBlockMajorMap()
        for dev in self._diskStats:
            stats = self._diskStats[dev]
            devclass = self._mapMajorDevclass.get(stats['major'])
            if devclass is not None:
                devdir = os.path.join(sysfsBlockdevDir, dev)
                if os.path.isdir(devdir):
                    if not self._devClassTree.has_key(devclass):
                        self._devClassTree[devclass] = []
                    self._devClassTree[devclass].append(dev)
                    self._mapDevType[dev] = devclass
                    basedevs.append(dev)
                else:
                    otherdevs.append(dev)
        basedevs.sort(key=len, reverse=True)
        otherdevs.sort(key=len, reverse=True)
        idx = 0
        for partdev in otherdevs:
            while len(basedevs[idx]) > partdev:
                idx += 1 
            for dev in basedevs[idx:]:
                if re.match("%s(\d+|p\d+)$" % dev, partdev):
                    if not self._partitionTree.has_key(dev):
                        self._partitionTree[dev] = []
                    self._partitionTree[dev].append(partdev)
                    self._mapDevType[partdev] = 'part'
1056098
def get_mapping_format(self):
        """"""
        if self.format == DataFormat.json or self.format == DataFormat.avro:
            return self.format.name
        else:
            return DataFormat.csv.name
538130
function getDefaultState() {
    return { depth: 0, seen: new WeakMap(), top: true, combine: false, allowRefSiblings: false };
}
862389
def get_osid_containable_mdata():
    """"""
    return {
        'sequestered': {
            'element_label': {
                'text': 'sequestered',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter either true or false.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': False,
            'read_only': False,
            'linked': False,
            'default_boolean_values': [False],
            'array': False,
            'syntax': 'BOOLEAN',
        }
    }
800525
def get_label_map(opts):
    '''  '''
    results = {}
    try:
        for entry in os.scandir(diskdir):
            target = normpath(join(diskdir, os.readlink(entry.path)))
            decoded_name = entry.name.encode('utf8').decode('unicode_escape')
            results[target] = decoded_name
        if opts.debug:
            print('\n\nlabel_map:', results)
    except FileNotFoundError:
        pass
    return results
659491
def get_osid_temporal_mdata():
    """"""
    return {
        'start_date': {
            'element_label': {
                'text': 'Start Date',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter a valid datetime object.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': True,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_date_time_values': [datetime.datetime.min],
            'syntax': 'DATETIME',
            'date_time_set': [],
        },
        'end_date': {
            'element_label': {
                'text': 'Start Date',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'instructions': {
                'text': 'enter a valid datetime object.',
                'languageTypeId': str(DEFAULT_LANGUAGE_TYPE),
                'scriptTypeId': str(DEFAULT_SCRIPT_TYPE),
                'formatTypeId': str(DEFAULT_FORMAT_TYPE),
            },
            'required': True,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_date_time_values': [datetime.datetime.max],
            'syntax': 'DATETIME',
            'date_time_set': [],
        }
    }