def upload(): """ Gets the upload page. :return: The upload page. """ # Fix the session in case the browser is caching the old session session_manager.fix() return render("upload.html")
def cut(): """ Gets the cut page. :return: The cut page. """ # Set the default cutting options if "cuttingoptions" not in session: session["cuttingoptions"] = constants.DEFAULT_CUT_OPTIONS return render("cut.html")
def tokenizer(): """ Handles the functionality on the tokenizer page. :return: The tokenize page. """ # Set the default session options. session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS # Send the page. return render("tokenize.html")
def rolling_window() -> str: """ Gets the rolling window page. :return: The rolling window page. """ # Set the default options if "rwoption" not in session: session["rwoption"] = constants.DEFAULT_ROLLINGWINDOW_OPTIONS # Return the page return render("rolling-window.html")
def statistics() -> str: """ Gets the statistics page. :return: The statistics page. """ # Set the default options if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS # Return the statistics page return render("statistics.html")
def consensus_tree() -> str: """Gets the consensus tree page. :return: The consensus tree page. """ # Set the default options if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS if "bctoption" not in session: session["bctoption"] = constants.DEFAULT_BCT_OPTIONS # Return the consensus tree page return render("consensus-tree.html")
def similarity_query() -> str: """ Gets the similarity query page. :return: The similarity query page. """ # Set the default options if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS if "similarities" not in session: session["similarities"] = constants.DEFAULT_SIM_OPTIONS # Return the similarity query page return render("similarity-query.html")
def dendrogram() -> str: """ Gets the dendrogram page. :return: The dendrogram page. """ # Set default options if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS if "hierarchyoption" not in session: session["hierarchyoption"] = constants.DEFAULT_HIERARCHICAL_OPTIONS # Return the dendrogram page return render("dendrogram.html")
def k_means() -> str: """Gets the k-means clustering page. :return: The k-means clustering page. """ # Set default options if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS if "kmeanoption" not in session: session["kmeanoption"] = constants.DEFAULT_KMEAN_OPTIONS # Return the k-means clustering page return render("k-means.html")
def top_words() -> str: """ Gets the top words page. :return: The top words page. """ # Set the default options if "topwordoption" not in session: session["topwordoption"] = constants.DEFAULT_TOPWORD_OPTIONS if "analyoption" not in session: session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS # Return the top words page return render("top-words.html")
def content_analysis() -> str: """ Gets the content analysis page. :return: The content analysis page. """ # Remove any existing uploaded files session["dictionary_labels"] = [] files = glob.glob(get_path() + '*') for file in files: os.remove(file) # Return the content analysis page return render("content-analysis.html")
def scrub() -> str: """ Gets the scrub page. :return: The scrub page. """ if "scrubbingoptions" not in session: session["scrubbingoptions"] = constants.DEFAULT_SCRUB_OPTIONS if "xmlhandlingoptions" not in session: session["xmlhandlingoptions"] = { "myselect": { "action": "", "attribute": "" } } utility.xml_handling_options() return render("scrub.html")
def word_cloud() -> str: """ Gets the word cloud page. :return: The word cloud page. """ return render("word-cloud.html")
def page_not_found(_): """Custom 404 Page""" app.logger.error("\nPage not found: {url}".format(url=request.path)) return render("404.html")
def multicloud() -> str: """ Gets the multicloud page. :return: The multicloud page. """ return render("multicloud.html")
def viz(): """ Gets the bubbleviz page. :return: The bubbleviz page. """ return render("bubbleviz.html")