Parses the ImportDataDirectory and returns a list of ImportDescriptorData
185715
def _parseDataDirectoryImport(self, dataDirectoryEntry, importSection):
        """"""
        if not importSection:
            return


        raw_bytes = (c_ubyte * dataDirectoryEntry.Size).from_buffer(importSection.raw, to_offset(dataDirectoryEntry.VirtualAddress, importSection))
        offset = 0
        import_descriptors = []
        while True:
            import_descriptor = IMAGE_IMPORT_DESCRIPTOR.from_buffer(raw_bytes, offset)


            if import_descriptor.OriginalFirstThunk == 0:
                break
            else:
                nameOffset = to_offset(import_descriptor.Name, importSection)

                checkOffset(nameOffset, importSection)
                dllName = get_str(importSection.raw, nameOffset)

                import_name_table =  self.__parseThunks(import_descriptor.OriginalFirstThunk, importSection)
                import_address_table =  self.__parseThunks(import_descriptor.FirstThunk, importSection)

                import_descriptors.append(ImportDescriptorData(header=import_descriptor, dllName=dllName, importNameTable=import_name_table, importAddressTable=import_address_table))
            offset += sizeof(IMAGE_IMPORT_DESCRIPTOR)
        return import_descriptors
12039
private static ImmutableList<ImportTree> getWildcardImports(List<? extends ImportTree> imports) {
    ImmutableList.Builder<ImportTree> result = ImmutableList.builder();
    for (ImportTree tree : imports) {
      // javac represents on-demand imports as a member select where the selected name is '*'.
      Tree ident = tree.getQualifiedIdentifier();
      if (!(ident instanceof MemberSelectTree)) {
        continue;
      }
      MemberSelectTree select = (MemberSelectTree) ident;
      if (select.getIdentifier().contentEquals("*")) {
        result.add(tree);
      }
    }
    return result.build();
  }
1371243
def parse_data_to_internal(self, data=None):
        
        if data is None:
            kwargs = self.kwargs
            data = np.loadtxt(
                open(self.location_dat, "rb"), **kwargs
            )
        if self.filetype is "pickle":
            pickle.dump(data, open(self.location_internal, "wb"))
        elif self.filetype is "hickle":
            import hickle
            hickle.dump(data, open(self.location_internal, "wb"))
        else:
            raise ValueError(
                "Invalid filetype {} (must be {} or {})".format(
                    self.filetype, "pickle", "hickle"
                )
            )
843367
def parse_ids(self, skiprecover):
        '''
        '''
        idsfile = self.idsfile
        logging.debug("Parse idsfile `{}`".format(idsfile))
        fp = open(idsfile)
        tigs = []
        for row in fp:
            if row[0] == '#':  # Header
                continue
            atoms = row.split()
            tig, size = atoms[:2]
            size = int(size)
            if skiprecover and len(atoms) == 3 and atoms[2] == 'recover':
                continue
            tigs.append((tig, size))

        # Arrange contig names and sizes
        _tigs, _sizes = zip(*tigs)
        self.contigs = set(_tigs)
        self.sizes = np.array(_sizes)
        self.tig_to_size = dict(tigs)

        # Initially all contigs are considered active
        self.active = set(_tigs)
491649
public static List<SymbolDescription> readSymbolDescriptions()
			throws IOException {
		String filename = "importcategories.txt";
		List<SymbolDescription> list = new ArrayList<>();
		List<String[]> lines = readArray(filename);
		String category = "";
		String subCategory = null;
		for (String[] array : lines) {
			if (array.length > 0) {
				String mainItem = array[0];
				if (mainItem.startsWith("[")) {
					category = mainItem;
					subCategory = null;
				} else if (mainItem.startsWith("<")) {
					subCategory = mainItem;
				} else {
					String description = null;
					if (array.length > 1) {
						description = array[1];
					}
					list.add(new SymbolDescription(mainItem, Optional
							.fromNullable(description), category, Optional
							.fromNullable(subCategory)));
				}
			}
		}
		return list;
	}
940333
def parse(self, data):
        # type: (bytes) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Long Allocation descriptor already initialized')
        (self.extent_length, self.log_block_num, self.part_ref_num,
         self.impl_use) = struct.unpack_from(self.FMT, data, 0)

        self._initialized = True
1105257
def parse_imports(self, src):
        "  "
        result = []

        def child(obj):
            result.append(obj.group(1))
        src = self.import_re.sub(child, src)
        return src, result
93368
function _importDirectoryOptionsParser(options={}) {
  const _options = Object.assign({
    imports: {},
    onload: options.callback,
    extension: makeArray(options.extensions || settings.get('extensions')),
    useSyncRequire: settings.get('useSyncRequire'),
    merge: settings.get('mergeImports'),
    rescursive: false
  }, options, {
    squashErrors: !!options.retry
  });

  if (_options.extensions) delete _options.extensions;

  if (options.callback) console.warn(`The options.callback method is deprecated, please use options.onload() instead. This being used in ${getCallingFileName()}`);

  return _options;
}
154397
function parseDirectory(dataStr) {
		let currChar = '';
		let directory = '';
		let pos = 24;

		while (currChar !== '\x1E') {
			currChar = dataStr.charAt(pos);
			if (currChar !== 'x1E') {
				directory += currChar;
			}

			pos++;

			if (pos > dataStr.length) {
				throw new Error('Invalid record');
			}
		}

		return directory;
	}
670107
def dir_import_table(self):
        
        import_header = list(self.optional_data_directories)[1]
        import_offset = self.resolve_rva(import_header.VirtualAddress)

        i = 0
        while True:
            offset = import_offset + i*Import_DirectoryTable.get_size()
            idt = Import_DirectoryTable(self.stream, offset, self)

            if idt.is_empty():
                break
            else:
                yield idt

            i += 1
477041
function extractImports($) {
  var imports = [];
  $('link[rel=import][href]').each(function() {
    var el   = $(this);
    var href = el.attr('href');
    if(ABS.test(href)) return;
    imports.push(/^\./.test(href) ? href : './' + href);
    el.remove();
  })
  return imports;
}
1007971
def importData(directory):
    """"""
    dataTask = OrderedDict()
    dataQueue = OrderedDict()
    for fichier in sorted(os.listdir(directory)):
        try:
            with open("{directory}/{fichier}".format(**locals()), 'rb') as f:
                fileName, fileType = fichier.rsplit('-', 1)
                if fileType == "QUEUE":
                    dataQueue[fileName] = pickle.load(f)
                else:
                    dataTask[fileName] = pickle.load(f)
        except:
            # Can be a directory
            pass
    return dataTask, dataQueue
1135857
def _get_imports_m(self, data_types, default_imports):
        """"""
        if not isinstance(data_types, list):
            data_types = [data_types]

        import_classes = default_imports

        for data_type in data_types:
            import_classes.append(fmt_class_prefix(data_type))

            if data_type.parent_type:
                import_classes.append(fmt_class_prefix(data_type.parent_type))

            if is_struct_type(
                    data_type) and data_type.has_enumerated_subtypes():
                for _, subtype in data_type.get_all_subtypes_with_tags():
                    import_classes.append(fmt_class_prefix(subtype))

            for field in data_type.all_fields:
                data_type, _ = unwrap_nullable(field.data_type)

                # unpack list or map
                while is_list_type(data_type) or is_map_type(data_type):
                    data_type = (data_type.value_data_type if
                        is_map_type(data_type) else data_type.data_type)

                if is_user_defined_type(data_type):
                    import_classes.append(fmt_class_prefix(data_type))

        if import_classes:
            import_classes = list(set(import_classes))
            import_classes.sort()

        return import_classes
853948
function buildExportNameListDeclaration(
  programPath: NodePath,
  metadata: ModuleMetadata,
) {
  const exportedVars = Object.create(null);
  for (const data of metadata.local.values()) {
    for (const name of data.names) {
      exportedVars[name] = true;
    }
  }

  let hasReexport = false;
  for (const data of metadata.source.values()) {
    for (const exportName of data.reexports.keys()) {
      exportedVars[exportName] = true;
    }
    for (const exportName of data.reexportNamespace) {
      exportedVars[exportName] = true;
    }

    hasReexport = hasReexport || data.reexportAll;
  }

  if (!hasReexport || Object.keys(exportedVars).length === 0) return null;

  const name = programPath.scope.generateUidIdentifier("exportNames");

  delete exportedVars.default;

  return {
    name: name.name,
    statement: t.variableDeclaration("var", [
      t.variableDeclarator(name, t.valueToNode(exportedVars)),
    ]),
  };
}
202919
function parseDirectoryEntries(directoryStr) {
		const directoryEntries = [];
		let pos = 0;
		let count = 0;

		while (directoryStr.length - pos >= 12) {
			directoryEntries[count] = directoryStr.substring(pos, pos + 12);
			pos += 12;
			count++;
		}

		return directoryEntries;
	}
324451
function importData(arr, outdivid) {
      $(outdivid).empty(); // flush messages

      // find number of datapoints
      N = arr.length;
      var t = [];
      SUCC(outdivid, "found " + N + " data points");
      if(N === 0) { FAIL(outdivid, 'no data points found?'); return; }
      
      // find dimensionality and enforce consistency
      D = arr[0].length;
      for(var i=0;i<N;i++) {
        var d = arr[i].length;
        if(d !== D) { FAIL(outdivid, 'data dimension not constant: line ' + i + ' has ' + d + ' entries.'); return; }
      }
      SUCC(outdivid, "data dimensionality is " + (D-1));
      
      // go through columns of data and figure out what they are
      var colstats = [];
      for(var i=0;i<D;i++) {
        var res = guessColumn(arr, i);
        colstats.push(res);
        if(D > 20 && i>3 && i < D-3) {
          if(i==4) {
            SUCC(outdivid, "..."); // suppress output for too many columns
          }
        } else {
          SUCC(outdivid, "column " + i + " looks " + (res.numeric ? "numeric" : "NOT numeric") + " and has " + res.num + " unique elements");
        }
      }

      return {arr: arr, colstats: colstats};
   }
1260934
function readModuleDirectory() {
  return _fsExtra2.default.existsSync((0, _config2.default)().moduleDirectoryPath()) ? _fsExtra2.default.readdirSync((0, _config2.default)().moduleDirectoryPath(), function (err, files) {
    return files;
  }).filter(_isNotModulesImportFile) : [];
}