def main(args): global conn limit = -1 if len(args) == 3: limit = args[2] elif len(args) == 2: limit = -1 else: usage() key = args[1] conn = getConnection() try: if key[0] == '#': searchTagTable(key, int(limit)) else: if key[0] != '@': key = '@' + key searchUserTable(key, int(limit)) except ValueError: print "No Results Found!"
def main(args): global conn user = "" message = "" tags = [] if len(args) <3: print "Wrong Arguments" exit(1) if(len(args[1]) <= 10): user = args[1] else: print "User name %s is longer that 10 characters!" % args[1] exit(1) inTag = False message = args[2] tag = "" for char in message: if char == '#': inTag = True if char == ' ': inTag = False if tag != "": tags.append(tag) tag = "" if inTag: tag += char if tag != "": tags.append(tag) if(len(message) > 140): print "Message is longer than 140 characters!" exit(1) conn = getConnection() tables = conn.list_tables() if 'Users' not in tables['TableNames']: createUserTable() if 'Tags' not in tables['TableNames']: createTagTable() post(user, message, tags)
import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import dash_table import dash_cytoscape as cyto import src.components.navbar as nb import src.components.sidebar as sb import pyTigerGraph as tg import plotly.express as px import json import pandas as pd import connect import threading dataLock = threading.Lock() conn = connect.getConnection() import src.pages.patientView as p1 import src.pages.mapExplore as p3 import src.pages.dataStatistics as p4 import src.pages.globalView as p2 import src.pages.about as p5 import time from dash.dependencies import Input, Output, State from datetime import datetime , timedelta from config import graphistry_un, graphistry_pw import operator import keplergl import os
import connect as cn try: conn = cn.getConnection() query = 'select * from "PUBLIC"."VENUE" limit 3' resultset = conn.cursor().execute(query) for i in resultset.description: print(i) conn.cursor().execute('ALTER WAREHOUSE SUSPEND') except Exception as e: print(e)