This file contains 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
mysql> SHOW ENGINE INNODB STATUS\G | |
*************************** 1. row *************************** | |
Status: | |
===================================== | |
120516 1:11:59 INNODB MONITOR OUTPUT | |
===================================== | |
Per second averages calculated from the last 41 seconds | |
---------- | |
SEMAPHORES | |
---------- |
This file contains 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
mysql> show tables; | |
+---------------------+ | |
| Tables_in_impindata | | |
+---------------------+ | |
| countries | | |
| prioritycodes | | |
| sectors | | |
| stocks | | |
+---------------------+ | |
4 rows in set (0.00 sec) |
This file contains 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
// loadSectorOptions works but loadCountryOptions does not | |
function loadSectorOptions() { | |
$.getJSON( | |
"list-process.php", | |
"process=loadSectorOptions", | |
function(data) { | |
$.each(data.sectors, function(i, sector) { | |
var sectorOption = '<option value=\"' | |
+sector.sector_id+'\">' |
This file contains 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
function loadStockDivs() { | |
$.getJSON( | |
"test.php", | |
"process=loadstocks", | |
function(data) { | |
data.counter = 0; | |
$.each(data.stocks, function(i,stock) { | |
if (i != 0) { | |
counter = i; | |
counterminus = counter-1; |
This file contains 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 csv | |
testreader = csv.DictReader(open('test.csv', 'rb') | |
for row in testreader: | |
print row |
This file contains 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 csv | |
testreader = csv.DictReader(open('C:/Documents and Settings/BJCREASY.SOA/Desktoptestcsv.csv', ''), dialect='excel') | |
for row in testreader: | |
print row | |
# if row['SERFF'] == csv.reader.next().row['SERFF'] | |
# print 'Success' |
This file contains 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 csv | |
import re | |
# testreader = csv.DictReader(open('C:/Documents and Settings/' | |
# 'BJCREASY.SOA/Desktop/test2.csv', 'rb')) | |
with open('C:/Documents and Settings/' | |
'BJCREASY.SOA/Desktop/test2.csv', 'rb') as f: | |
reader = csv.reader(f) | |
for row in reader: |
This file contains 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
numbers = range(10) | |
for idx, y in enumerate(numbers): | |
if idx == 1: | |
continue | |
else: | |
print y |
This file contains 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 sqlite3 | |
from collections import defaultdict | |
DATABASE = 'C:/Misc/myscripts/workprototype/workprototype.db' | |
conn = sqlite3.connect(database=DATABASE) | |
comp = conn.execute('select companies.name from companies') | |
comp = [dict(co_name=row[0]) for row in comp.fetchall()] | |
prod = conn.execute('select c.name, p.name, c.desc, p.desc from companies c inner join products p on c.co_id = p.co_id') |
This file contains 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 string | |
with open('C:\Documents and Settings\[trimmed]\Desktop\list.txt', | |
'rb') as infile: | |
fread = infile.readlines() | |
fread = [x.strip() for x in fread] | |
fread = [x.lstrip('\x95') for x in fread] | |
fread = [x.strip() for x in fread] | |
fread = [x for x in fread if x != ''] |
OlderNewer