Get the list of Part10 features supported by the reader.

    @param response: result of CM_IOCTL_GET_FEATURE_REQUEST commmand

    @rtype: list
    @return: a list of list [[tag1, value1], [tag2, value2]]
503267
def parseFeatureRequest(response):
    
    features = []
    while (len(response) > 0):
        tag = response[0]
        control = ((((((response[2] << 8) +
                        response[3]) << 8) +
                        response[4]) << 8) +
                        response[5])
        try:
            features.append([Features[tag], control])
        except KeyError:
            pass
        del response[:6]
    return features
396381
def _get_features(self):
        """"""
        if self._satellite:
            return [("water", [], [])]
        elif self._zoom <= 2:
            return [
                ("water", [], []),
                ("marine_label", [], [1]),
            ]
        elif self._zoom <= 7:
            return [
                ("admin", [], []),
                ("water", [], []),
                ("road", ["motorway"], []),
                ("country_label", [], []),
                ("marine_label", [], [1]),
                ("state_label", [], []),
                ("place_label", [], ["city", "town"]),
            ]
        elif self._zoom <= 10:
            return [
                ("admin", [], []),
                ("water", [], []),
                ("road", ["motorway", "motorway_link", "trunk"], []),
                ("country_label", [], []),
                ("marine_label", [], [1]),
                ("state_label", [], []),
                ("place_label", [], ["city", "town"]),
            ]
        else:
            return [
                ("landuse", ["agriculture", "grass", "park"], []),
                ("water", [], []),
                ("waterway", ["river", "canal"], []),
                ("building", [], []),
                ("road",
                 ["motorway", "motorway_link", "trunk", "primary", "secondary"]
                 if self._zoom <= 14 else
                 ["motorway", "motorway_link", "trunk", "primary", "secondary", "tertiary",
                  "link", "street", "tunnel"],
                 []),
                ("poi_label", [], []),
            ]
109971
def _list_response(self, response):
        
        if type(response) is list:
            return response
        if type(response) is dict:
            return [response]
1298950
def _parse_requirements(self, input):
        

        results = []

        for line in input:
            (package, version) = self._parse_line(line)
            if package:
                results.append((package, version))

        return tuple(results)
323802
def __parse_xml_response(self, response):
        
        # get xml from response
        xml_response = response[response.find('<?xml'):].replace(' encoding=""', '')
        xml_content = xml.dom.minidom.parseString(xml_response)
        return xml_content.getElementsByTagName('ProcessTextResult')[0].firstChild.nodeValue
747188
def _json_to_supported(response_body):
    
    data = json.loads(response_body)
    supported = []
    for supported_data in data.get("supportedList", []):
        supported.append(Supported().from_json(
            supported_data))

    return supported
231512
def _get_multiparts(response):
        
        boundary = None
        for part in response.headers.get('Content-Type', '').split(';'):
            if 'boundary=' in part:
                boundary = '--{}'.format(part.split('=', 1)[1].strip('\"'))
                break

        if not boundary:
            raise ParseError("Was not able to find the boundary between objects in a multipart response")

        if response.content is None:
            return []

        response_string = response.content

        if six.PY3:
            # Python3 returns bytes, decode for string operations
            response_string = response_string.decode('latin-1')

        #  help bad responses be more multipart compliant
        whole_body = response_string.strip('\r\n')
        no_front_boundary = whole_body.strip(boundary)
        # The boundary comes with some characters

        multi_parts = []
        for part in no_front_boundary.split(boundary):
            multi_parts.append(part.strip('\r\n'))

        return multi_parts
116665
def get_tags(self):
        
        return github.PaginatedList.PaginatedList(
            github.Tag.Tag,
            self._requester,
            self.url + "/tags",
            None
        )
441524
public List<WordTag> process(List list) {
    List<IN> featureLabels = new ArrayList<IN>();
    for (Object o : list) {
      CoreLabel wi = new CoreLabel();
      if (o instanceof HasWord) {
        wi.setWord(((HasWord) o).word());
        if (o instanceof HasTag) {
          wi.setTag(((HasTag) o).tag());
        }
      } else {
        wi.setWord(o.toString());
      }
      featureLabels.add((IN) wi);
    }
    List<IN> tagged = classify(featureLabels);
    List<WordTag> out = new ArrayList<WordTag>();
    for (CoreLabel wi : tagged) {
      out.add(new WordTag(wi.word(), wi.get(AnswerAnnotation.class)));
    }
    return out;
  }
942272
void get_features(final State s,
                      final List<Integer> cluster4,
                      final List<Integer> cluster6,
                      final List<Integer> cluster,
                      List<Integer> features)
    {
        Context ctx = new Context();
        get_context(s, ctx);
        get_basic_features(ctx, s.ref.forms, s.ref.postags, s.deprels, features);
        get_distance_features(ctx, features);
        get_valency_features(ctx, s.nr_left_children, s.nr_right_children, features);
        get_cluster_features(ctx, cluster4, cluster6, cluster, features);
    }
667924
def get_components(self, uri):
        
        try:
            component_definition = self._components[uri]
        except KeyError:
            return False

        sorted_sequences = sorted(component_definition.sequence_annotations,
                                  key=attrgetter('first_location'))
        return [c.component for c in sorted_sequences]
845026
def parseRest(self, response):
        
        body = json.loads(response)

        try:
            error = body['error']['description']
            code = body['error']['code']
        except Exception:
            return body['data']
        else:
            raise ClickatellError(error, code);
796397
def get_list_display(self, request):
        

        # Force cast to list as super get_list_display could return a tuple
        list_display = list(
            super(VersionedAdmin, self).get_list_display(request))

        # Preprend the following fields to list display
        if self.list_display_show_identity:
            list_display = ['identity_shortener', ] + list_display

        # Append the following fields to list display
        if self.list_display_show_start_date:
            list_display += ['version_start_date', ]
        if self.list_display_show_end_date:
            list_display += ['version_end_date', ]

        return list_display + ['is_current', ]
1191038
def get_items_from_response(self, response):
        
        for item in response.get('items', []):
            id = item.get('id')
            task = Task(id, taskqueue=self.taskqueue)
            task._set_properties(item)
            yield task
560650
public static byte[] getContent(HttpResponse response) {

		try {
			if (response != null && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				return ResourceUtils.getBytes(response.getEntity().getContent());
			}
		}
		catch (IOException e) {
			log.error("Failed to read response: ", e.getMessage());
		}

		return null;
	}
1280837
def radpress_get_markup_descriptions():
    
    result = []
    for markup in get_markup_choices():
        markup_name = markup[0]
        result.append({
            'name': markup_name,
            'title': markup[1],
            'description': trim(get_reader(markup=markup_name).description)
        })
    return result
640895
@SuppressWarnings("static-method")
	public void getImportedFeatures(List<Class<?>> features) {
		features.add(AtomicIntegerArithmeticExtensions.class);
		features.add(AtomicLongArithmeticExtensions.class);
		features.add(ByteArithmeticExtensions.class);
		features.add(DoubleArithmeticExtensions.class);
		features.add(FloatArithmeticExtensions.class);
		features.add(IntegerArithmeticExtensions.class);
		features.add(LongArithmeticExtensions.class);
		features.add(NumberArithmeticExtensions.class);
		features.add(PrimitiveByteArithmeticExtensions.class);
		features.add(PrimitiveDoubleArithmeticExtensions.class);
		features.add(PrimitiveFloatArithmeticExtensions.class);
		features.add(PrimitiveIntArithmeticExtensions.class);
		features.add(PrimitiveLongArithmeticExtensions.class);
		features.add(PrimitiveShortArithmeticExtensions.class);
		features.add(ShortArithmeticExtensions.class);
	}