Generate several lambda uris.
760766
def generate_uris(self):
        """"""
        lambda_arn = "arn:aws:execute-api:{0}:{1}:{2}/*/{3}/{4}".format(self.region, self.account_id, self.api_id,
                                                                        self.trigger_settings['method'],
                                                                        self.trigger_settings['resource'])

        lambda_uri = ("arn:aws:apigateway:{0}:lambda:path/{1}/functions/"
                      "arn:aws:lambda:{0}:{2}:function:{3}/invocations").format(self.region, self.api_version,
                                                                                self.account_id, self.app_name)

        api_dns = "https://{0}.execute-api.{1}.amazonaws.com/{2}".format(self.api_id, self.region, self.env)

        uri_dict = {'lambda_arn': lambda_arn, 'lambda_uri': lambda_uri, 'api_dns': api_dns}
        return uri_dict
758448
def _make_canonical_uri(parsed):
    
    path = urllib.quote(parsed.path)
    canonical_parsed = parsed._replace(path=path,
                                       params='', query='', fragment='')
    return urlparse.urlunparse(canonical_parsed)
197665
def urls(self):
        """"""
        for base_url, mapping in self.routes.items():
            for url, _ in mapping.items():
                yield base_url + url
562898
protected void generateRoutes()
    {
        try {

//			Optional<io.sinistral.proteus.annotations.Chain> typeLevelWrapAnnotation = Optional.ofNullable(controllerClass.getAnnotation(io.sinistral.proteus.annotations.Chain.class));
//			
//			typeLevelWrapAnnotation.ifPresent( a -> {
//				 
//				io.sinistral.proteus.annotations.Chain w = typeLevelWrapAnnotation.get();
//
//				Class<? extends HandlerWrapper> wrapperClasses[] = w.value();
//
//				for (int i = 0; i < wrapperClasses.length; i++)
//				{
//					Class<? extends HandlerWrapper> wrapperClass = wrapperClasses[i];
//
//					String wrapperName = generateFieldName(wrapperClass.getCanonicalName());
//
//					handlerWrapperMap.put(wrapperClass, wrapperName);
//				}
//				
//			});
//			
//			for(Method m : this.controllerClass.getDeclaredMethods())
//			{
//			
//				Optional<io.sinistral.proteus.annotations.Chain> methodLevelWrapAnnotation = Optional.ofNullable(m.getAnnotation(io.sinistral.proteus.annotations.Chain.class));
//				
//				methodLevelWrapAnnotation.ifPresent( a -> {
//					 
//					io.sinistral.proteus.annotations.Chain w = methodLevelWrapAnnotation.get();
//	
//					Class<? extends HandlerWrapper> wrapperClasses[] = w.value();
//	
//					for (int i = 0; i < wrapperClasses.length; i++)
//					{
//						Class<? extends HandlerWrapper> wrapperClass = wrapperClasses[i];
//	
//						String wrapperName = generateFieldName(wrapperClass.getCanonicalName());
//	
//						handlerWrapperMap.put(wrapperClass, wrapperName);
//					}
//					
//				});
//
//			}
//			
//			log.info("handlerWrapperMap: " + handlerWrapperMap);

            TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC)
                    .addSuperinterface(ParameterizedTypeName.get(Supplier.class, RoutingHandler.class));

            ClassName extractorClass = ClassName.get("io.sinistral.proteus.server", "Extractors");

            ClassName injectClass = ClassName.get("com.google.inject", "Inject");


            MethodSpec.Builder constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addAnnotation(injectClass);

            String className = this.controllerClass.getSimpleName().toLowerCase() + "Controller";

            typeBuilder.addField(this.controllerClass, className, Modifier.PROTECTED, Modifier.FINAL);

            ClassName wrapperClass = ClassName.get("io.undertow.server", "HandlerWrapper");
            ClassName stringClass = ClassName.get("java.lang", "String");
            ClassName mapClass = ClassName.get("java.util", "Map");

            TypeName mapOfWrappers = ParameterizedTypeName.get(mapClass, stringClass, wrapperClass);

            TypeName annotatedMapOfWrappers = mapOfWrappers
                    .annotated(AnnotationSpec.builder(com.google.inject.name.Named.class).addMember("value", "$S", "registeredHandlerWrappers").build());

            typeBuilder.addField(mapOfWrappers, "registeredHandlerWrappers", Modifier.PROTECTED, Modifier.FINAL);


            constructor.addParameter(this.controllerClass, className);
            constructor.addParameter(annotatedMapOfWrappers, "registeredHandlerWrappers");

            constructor.addStatement("this.$N = $N", className, className);
            constructor.addStatement("this.$N = $N", "registeredHandlerWrappers", "registeredHandlerWrappers");

            addClassMethodHandlers(typeBuilder, this.controllerClass);

            typeBuilder.addMethod(constructor.build());

            JavaFile javaFile = JavaFile.builder(packageName, typeBuilder.build()).addStaticImport(extractorClass, "*").build();

            StringBuilder sb = new StringBuilder();

            javaFile.writeTo(sb);

            this.sourceString = sb.toString();

        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
    }
1073548
def many(self, filters=None, params=None):
        
        for i in self.tc_requests.many(
            self.api_type,
            self.api_sub_type,
            self.api_entity,
            owner=self.owner,
            filters=filters,
            params=params,
        ):
            yield i
947158
def generate(self, api):
        """"""
        # Create a file for each namespace.
        for namespace in api.namespaces.values():
            with self.output_to_relative_path('%s.stone' % namespace.name):
                # Output a namespace header.
                self.emit('namespace %s' % namespace.name)
                # Output all data type (struct and union) definitions.
                for data_type in namespace.linearize_data_types():
                    self.generate_data_type(data_type)
                # Output all route definitions.
                for route in namespace.routes:
                    self.generate_route(route)
623104
def repositories(doc):
    """"""
    for repository_id, repo in doc.get('repositories', {}).items():
        repo['id'] = repository_id
        repo['organisation_id'] = doc['_id']

        yield repository_id, repo
135790
def generate_tokens(self):
        """"""
        if self._io_error:
            self.report_error(1, 0, 'E902 %s' % self._io_error, readlines)
        tokengen = tokenize.generate_tokens(self.readline)
        try:
            for token in tokengen:
                if token[2][0] > self.total_lines:
                    return
                self.noqa = token[4] and noqa(token[4])
                self.maybe_check_physical(token)
                yield token
        except (SyntaxError, tokenize.TokenError):
            self.report_invalid_syntax()
524511
def _set_uri_from_bound_model(self):
        """"""
        value = self._uri_template.format(self._bound_model.id)
        self.elm.set(self._uri_attr, value)
551436
public static List<String> buildUris(Option<String> uris) {
		if (uris.isEmpty()) {
			return Collections.emptyList();
		} else {
			List<String> urisList = new ArrayList<>();
			for (String uri : uris.get().split(",")) {
				urisList.add(uri.trim());
			}
			return urisList;
		}
	}
1052462
def build_self_uri_list(self_uri_list):
    ""
    uri_list = []
    for self_uri in self_uri_list:
        uri = ea.Uri()
        utils.set_attr_if_value(uri, 'xlink_href', self_uri.get('xlink_href'))
        utils.set_attr_if_value(uri, 'content_type', self_uri.get('content-type'))
        uri_list.append(uri)
    return uri_list
640004
def _generate_route_methods(self, namespaces):
        """"""
        self.cur_namespace = None
        for namespace in namespaces:
            if namespace.routes:
                self.emit('# ------------------------------------------')
                self.emit('# Routes in {} namespace'.format(namespace.name))
                self.emit()
                self._generate_routes(namespace)
1364104
def _generate_hex_for_uris(self, uris):
        
        return sha256((":".join(uris) + str(time())).encode()).hexdigest()
820490
def _ProcessSources(self, sources, parser_factory):
    """"""
    for source in sources:
      for action, request in self._ParseSourceType(source):
        yield self._RunClientAction(action, request, parser_factory,
                                    source.path_type)
1049890
def generate_overlay_urls(self):
        """"""
        overlays = {}
        for o in self.dataset.list_overlay_names():
            url = self.generate_url(".dtool/overlays/{}.json".format(o))
            overlays[o] = url
        return overlays
759812
def _query_gen(self):
        """"""
        return urlencode(self.__query__, safe=self.safe, querydelimiter=self.__querydelimiter__)
502039
def generate(self):
        """"""
        for root, _, files in os.walk(self.source_dir):
            for fname in files:
                source_fpath = os.path.join(root, fname)
                self.generate_api_for_source(source_fpath)