This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask , render_template , request | |
app = Flask(__name__) | |
app.debug = True | |
@app.route('/') | |
def hello(): | |
return "<h1>Hello World </h1>" | |
@app.route('/hello/<name>') | |
def name(name=None): | |
if name: | |
return render_template("hello.html",name = name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# | |
# pysbase.py | |
# | |
# Copyright 2013 Unknown <kaveenr@kaveenlabs> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: New HTTP API for AsterixDB | |
description: more info https://cwiki.apache.org/confluence/display/ASTERIXDB/New+HTTP+API+Design | |
version: "1.0.0" | |
schemes: | |
- http | |
paths: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2, re, json, sys | |
count=0 | |
null = "" | |
ch= sys.argv[1] | |
print ch | |
true = True | |
false = False | |
imgur=[] | |
accp = ['.JPG','.PNG'] | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
["artless", "bawdy", "beslubbering", "bootless", "churlish", "cockered", "clouted", "craven", "currish", "dankish", "dissembling", "droning", "errant", "fawning", "fobbing", "froward", "frothy", "gleeking", "goatish", "gorbellied", "impertinent", "infectious", "jarring", "loggerheaded", "lumpish", "mammering", "mangled", "mewling", "paunchy", "pribbling", "puking", "puny", "qualling", "rank", "reeky", "roguish", "ruttish", "saucy", "spleeny", "spongy", "surly", "tottering", "unmuzzled", "vain", "venomed", "villainous", "warped", "wayward", "weedy", "yeasty"], | |
["base-court", "bat-fowling", "beef-witted", "beetle-headed", "boil-brained", "clapper-clawed", "clay-brained", "common-kissing", "crook-pated", "dismal-dreaming", "dizzy-eyed", "doghearted", "dread-bolted", "earth-vexing", "elf-skinned", "fat-kidneyed", "fen-sucked", "flap-mouthed", "fly-bitten", "folly-fallen", "fool-born", "full-gorged", "guts-griping", "half-faced", "hasty-witted", "hedge-born", "hell-hated", "idle-headed", "ill-breeding", "ill-n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"line": 1, | |
"elements": [ | |
{ | |
"line": 2, | |
"name": "Get the details of all atms owned by a bank", | |
"description": "", | |
"id": "get-atm-details;get-the-details-of-all-atms-owned-by-a-bank", | |
"type": "scenario", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) $today.year, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | |
WSO2 Inc. licenses this file to you under the Apache License, | |
Version 2.0 (the "License"); you may not use this file except | |
in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>io.swagger</groupId> | |
<artifactId>swagger-codegen-maven-plugin</artifactId> | |
<version>2.4.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
<configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Swagger Petstore | |
* | |
* <p>A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification | |
* | |
*/ | |
public class DefaultApiServiceImpl implements DefaultApi { | |
static Map<Long,PetDTO> petMap = new HashMap<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> | |
<import resource="classpath:META-INF/cxf/cxf.xml"/> | |
<context:property-placeholder/> | |
<context:annotation-config/> | |
<bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"/> | |
<bean class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"/> | |
<jaxrs:server id="services" address="/v1/"> | |
<jaxrs:serviceBeans> | |
<bean class="com.kaveenrodrigo.blog.codegen.sample.api.impl.DefaultApiServiceImpl"/> | |
</jaxrs:serviceBeans> |
OlderNewer