List all annotations.
974005
def list_annotations(self) -> List[Namespace]:
        """"""
        return self.session.query(Namespace).filter(Namespace.is_annotation).all()
983883
def readAnnotations(self):
        
        annot = self.read_annotation()
        annot = np.array(annot)
        if (annot.shape[0] == 0):
            return np.array([]), np.array([]), np.array([])
        ann_time = self._get_float(annot[:, 0])
        ann_text = annot[:, 2]
        ann_text_out = ["" for x in range(len(annot[:, 1]))]
        for i in np.arange(len(annot[:, 1])):
            ann_text_out[i] = self._convert_string(ann_text[i])
            if annot[i, 1] == '':
                annot[i, 1] = '-1'
        ann_duration = self._get_float(annot[:, 1])
        return ann_time/10000000, ann_duration, np.array(ann_text_out)
553938
private ImmutableSet<ASTAnnotation> getAnnotations(Annotation[] annotations) {

        ImmutableSet.Builder<ASTAnnotation> astAnnotationBuilder = ImmutableSet.builder();

        for (Annotation annotation : annotations) {
            astAnnotationBuilder.add(getAnnotation(annotation));
        }

        return astAnnotationBuilder.build();
    }
1308834
def initial_annotate_kwargs():
    """"""
    return dict(
        xycoords="data", textcoords="data",
        rotation=90, horizontalalignment="center", verticalalignment="center",
        arrowprops=dict(arrowstyle="-", relpos=(0.5, 0.0))
    )
282524
def annotation_rows(prefix, annotations):
    
    ncol = len(annotations['Column Name'])
    return {name.replace(prefix, '', 1) : values + [''] * (ncol - len(values))
            for name, values in annotations.items() if name.startswith(prefix)}
393026
def annotations(self, qname=True):
        
        if qname:
            return sorted([(uri2niceString(x, self.namespaces)
                            ), (uri2niceString(y, self.namespaces)), z]
                          for x, y, z in self.triples)
        else:
            return sorted(self.triples)
24736
void addAnnotations(final AnnotationInfoList moduleAnnotations) {
        // Currently only class annotations are used in the module-info.class file
        if (moduleAnnotations != null && !moduleAnnotations.isEmpty()) {
            if (this.annotationInfo == null) {
                this.annotationInfo = new AnnotationInfoList(moduleAnnotations);
            } else {
                this.annotationInfo.addAll(moduleAnnotations);
            }
        }
    }
300116
def annotate(self, annotation: Any) -> None:
        
        if isinstance(annotation, list):
            self._annotations += annotation
        else:
            self._annotations.append(annotation)
188719
def p_annotation_ref(self, p):
        """"""
        if len(p) < 5:
            p[0] = AstAnnotationRef(self.path, p.lineno(1), p.lexpos(1), p[2], None)
        else:
            p[0] = AstAnnotationRef(self.path, p.lineno(1), p.lexpos(1), p[4], p[2])
6787
public static <T> List<Field> getAnnotatedFields(Class<?> clazz, Class<? extends Annotation> annotationClass) {
		List<Field> annotatedFields = new LinkedList<Field>();
		Field[] allFields = getAllDeclaredFields(clazz);
		for (Field field : allFields) {
			if (null != (field.getAnnotation(annotationClass))) {
				annotatedFields.add(field);
			}
		}
		return annotatedFields;
	}
1196155
def iter_annotations(self):
        
        # Need to store a list of route, view_class, and annotations by a
        # section key so that all methods of a resource are kept together in
        # the documentation.  The key of the section will be the heading that
        # the route documentation goes under.
        section_map = defaultdict(list)
        for rule in self.app.url_map.iter_rules():
            if rule.endpoint == 'static':
                # Don't document static file endpoints.
                continue
            # This gives us the auto-generated view function.
            view_function = self.app.view_functions.get(rule.endpoint)
            if view_function is None:
                continue
            # This gives us the actual Flask resource class.
            view_class = getattr(view_function, 'view_class', None)
            if view_class is None:
                continue

            annotations = []
            for method_name in HTTP_METHODS:
                method = getattr(view_class, method_name, None)
                if not method:
                    continue
                annotation = ResourceAnnotation(
                    method, method_name, method._doctor_title)
                annotations.append(annotation)
            if annotations:
                heading = self._get_annotation_heading(view_class, str(rule))
                section_map[heading].append((rule, view_class, annotations))

        # Loop through each heading and it's items and yield the values.
        for heading in sorted(section_map.keys()):
            for item in section_map[heading]:
                rule, view_class, annotations = item
                yield (heading, rule, view_class, annotations)
796955
def get_annotations(event, key, namespace=None, matchfunc=None):
    """"""
    if matchfunc is None:
        matchfunc = _is_equal
    if isinstance(key, Exception):
        key = _error_repr(key)
    return [ann for ann in event.get("_humilis", {}).get("annotation", [])
            if (matchfunc(key, ann["key"]) and
                (namespace is None or ann.get("namespace") == namespace))]
286332
def get_annotations(df,annotations,kind='lines',theme=None,**kwargs):
	





	for key in list(kwargs.keys()):
		if key not in __ANN_KWARGS:
			raise Exception("Invalid keyword : '{0}'".format(key))

	theme_data = getTheme(theme)

	kwargs['fontcolor']=kwargs.pop('fontcolor',theme_data['annotations']['fontcolor'])
	kwargs['arrowcolor']=kwargs.pop('arrowcolor',theme_data['annotations']['arrowcolor'])
	kwargs['fontsize']=kwargs.pop('fontsize',12)

	def check_ann(annotation):
		local_list=[]

		if 'title' in annotation:
			local_list.append(
					dict(
							text=annotation['title'],
							showarrow=False,
							x=0,
							y=1,
							xref='paper',
							yref='paper',
							font={'size':24 if not 'fontsize' in kwargs else kwargs['fontsize']}
						)
				)

			del annotation['title']	
			local_list.append(ann)

		elif 'x' in annotation:
			ann=dict(
								x=annotation['x'],
								y=annotation.get('y',.5),
								xref=annotation.get('xref','x'),
								yref=annotation.get('yref',kwargs.get('yref','y1')),
								text=annotation.get('text'),
								showarrow=annotation.get('showarrow',True),
								arrowhead=annotation.get('arrowhead',7),
								arrowcolor=annotation.get('arrowcolor',kwargs.get('arrowcolor')),
								ax=annotation.get('ax',0),
								ay=annotation.get('ay',-100),
								textangle=annotation.get('textangle',-90),
								font = dict(
									color = annotation.get('fontcolor',annotation.get('color',kwargs.get('fontcolor'))),
									size = annotation.get('fontsize',annotation.get('size',kwargs.get('fontsize')))
								)
								)
			local_list.append(ann)

		else:
			for k,v in list(annotation.items()):
				if kind in ('candlestick','ohlc','candle'):
					d=ta._ohlc_dict(df)
					maxv=df[d['high']].ix[k]
					yref='y2'
				else:
					maxv=df.ix[k].sum() if k in df.index else 0
					yref='y1'
				ann=dict(
								x=k,
								y=maxv,
								xref='x',
								yref=yref,
								text=v,
								showarrow=kwargs.get('showarrow',True),
								arrowhead=kwargs.get('arrowhead',7),
								arrowcolor = kwargs['arrowcolor'],
								ax=kwargs.get('ax',0),
								ay=kwargs.get('ay',-100),
								textangle=kwargs.get('textangle',-90),
								font = dict(
									color = kwargs['fontcolor'],
									size=kwargs['fontsize']
								)
								)
				local_list.append(ann)


		return local_list

	annotations = make_list(annotations)
	_list_ann=[]
	for ann in annotations:
		_list_ann.extend(check_ann(ann))
	return _list_ann
1260764
def list_listeners(self, retrieve_all=True, **_params):
        """"""
        return self.list('listeners', self.lbaas_listeners_path,
                         retrieve_all, **_params)
794662
def annotate(node):
    """"""
    tb = sys.exc_info()[2]
    while tb and stack_bottom not in tb.tb_frame.f_locals:
        tb = tb.tb_next
    if not tb:
        # We did not find any exec of an SConscript file: what?!
        raise SCons.Errors.InternalError("could not find SConscript stack frame")
    node.creator = traceback.extract_stack(tb)[0]
893084
private static Map<Locale, String> getAllPageDocs(IAnnotationBinding[] annotations) {
        // all @PageDoc or @Page annotations including annotations contained in @PageDocs or @Page
        List<IAnnotationBinding> allPageAnnotations = new ArrayList<>(2);

        List<Class<?>> singlePageAnnotationClasses = new ArrayList<>(2);
        singlePageAnnotationClasses.add(PageDoc.class);
        singlePageAnnotationClasses.add(Page.class);
        for (Class<?> annotationClass : singlePageAnnotationClasses) {
            IAnnotationBinding annotation = getAnnotationBinding(annotations, annotationClass);
            if (annotation == null) {
                continue; // annotation is not found
            }
            if (allPageAnnotations.size() > 0) {
                // TODO throw IllegalTestScriptException
                throw new RuntimeException("don't use multiple page annoations at the same place");
            }
            allPageAnnotations.add(annotation);
        }

        List<Class<?>> multiplePageAnnotationClasses = new ArrayList<>(2);
        multiplePageAnnotationClasses.add(PageDocs.class);
        multiplePageAnnotationClasses.add(Pages.class);
        for (Class<?> annotationClass : multiplePageAnnotationClasses) {
            IAnnotationBinding annotation = getAnnotationBinding(annotations, annotationClass);
            if (annotation == null) {
                continue; // annotation is not found
            }
            if (allPageAnnotations.size() > 0) {
                // TODO throw IllegalTestScriptException
                throw new RuntimeException("don't use multiple page annoations at the same place");
            }
            // get @PageDoc or @Page from @PageDocs or @Pages
            Object value = getAnnotationValue(annotation, "value");
            Object[] values = (Object[]) value;
            for (Object element : values) {
                allPageAnnotations.add((IAnnotationBinding) element);
            }
        }

        // get resultPageMap
        Map<Locale, String> resultPageMap = new HashMap<>(allPageAnnotations.size());
        for (IAnnotationBinding eachPageAnnotation : allPageAnnotations) {
            Object value = getAnnotationValue(eachPageAnnotation, "value");
            Locale locale = getAnnotationLocaleValue(eachPageAnnotation, "locale");
            resultPageMap.put(locale, (String) value);
        }

        return resultPageMap;
    }
898693
private static List<Method> getMethodsWithAnnotation(Class<?> clazz, Class<? extends Annotation> annotation, Logger log) {
    List<Method> annotatedMethods = new ArrayList<Method>();
    Method classMethods[] = clazz.getDeclaredMethods();
    for(Method classMethod : classMethods) {
      if(classMethod.isAnnotationPresent(annotation) && classMethod.getParameterTypes().length == 0) {
        if(!containsMethod(classMethod, annotatedMethods)) {
          annotatedMethods.add(classMethod);
        }
      }
    }
    Collections.sort(annotatedMethods, new Comparator<Method> () {

      @Override
      public int compare(Method method1, Method method2) {
        return method1.getName().compareTo(method2.getName());
      }
    });
    return annotatedMethods;
  }