diff --git a/urbansim/server/urbansimd.py b/urbansim/server/urbansimd.py index 76e02f42..5ac6f9a6 100644 --- a/urbansim/server/urbansimd.py +++ b/urbansim/server/urbansimd.py @@ -236,7 +236,7 @@ def pandas_statement(table, where, sort, orderdesc, groupby, metric, if not sort and not orderdesc: sort = ".sort_index(ascending=True)" if limit and page: - #limit = ".iloc[%s*(%s-1):%s*%s]" % (limit,page,limit,page) + # limit = ".iloc[%s*(%s-1):%s*%s]" % (limit,page,limit,page) limit = ".head(%s*%s).tail(%s)" % (limit, page, limit) elif limit: limit = ".head(%s)" % limit @@ -315,10 +315,10 @@ def query(): if 'key_dictionary' in req: key_dictionary = req['key_dictionary'] - #not sure /configs is the proper place to save dicts + # not sure /configs is the proper place to save dicts dictionary_file = open("configs/" + key_dictionary).read() dictionary = json.loads(dictionary_file) - #attention: the dictionary has keys from 0 to 15, ids come from 0 to 16 + # attention: the dictionary has keys from 0 to 15, ids come from 0 to 16 recs = [[dictionary[str(int(x))], float(recs.ix[x]) / 1000] for x in recs.index] else: diff --git a/urbansim/utils/misc.py b/urbansim/utils/misc.py index 967ce2c6..77e0cfcb 100644 --- a/urbansim/utils/misc.py +++ b/urbansim/utils/misc.py @@ -139,9 +139,6 @@ def resultstocsv(fit, fnames, results, filename, hedonic=False, tolatex=True, fit, fnames, results, filename, hedonic, tblname=tblname) results = maketable(fnames, results) f = open(os.path.join(output_dir(), filename), 'w') - #if hedonic: f.write('R-squared,%f\nAdj-R-squared,%f\n\n\n'%fit) - # else: f.write('null loglik,%f\nconverged loglik,%f\nloglik - # ratio,%f\n\n\n'%fit) csvf = csv.writer(f, lineterminator='\n') for row in results: csvf.writerow(row)