Skip to content

Instantly share code, notes, and snippets.

from typing import Iterator, Dict, Any, Optional
from urllib.parse import urlencode
import datetime
#------------------------ Profile
import time
import sys
import clr
sys.path.append(r'C:\Program Files (x86)\PIPC\AF\PublicAssemblies\4.0')
from OSIsoft.AF import *
from OSIsoft.AF.PI import *
from OSIsoft.AF.Asset import *
from OSIsoft.AF.Data import *
# coding: utf-8
'''Creates a zip archive of your Pythonista files and serves them via HTTP in your local network.'''
from SimpleHTTPServer import SimpleHTTPRequestHandler
import os
import shutil
import tempfile
import shutil
PORT = 8080
ThinkCode /
Created Aug 1, 2011 — forked from GaretJax/
Search for Keyword in Text File and return line number
import os, sys
import re, MySQLdb
db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )
# MySQL Code
# CREATE TABLE keyword (keywordid integer primary key auto_increment, keyword VARCHAR(255) NOT NULL);
# CREATE TABLE location (companyid integer, pdfid integer, keywordid integer references keyword(keywordid),