Exemplo n.º 1
0
	def gain_arr(self):
		libqda.qda_init() 
		
		#  -- get all_list --
		arr_index = libqda.get_all_index_arr(filter = 1)
		
		#print arr_index;
		
		#  -- get list from file
		#arr_index = libqda.get_index_from_file("list1.lst")
		
		# -- filter
		# the format is [p.fname,p.fid, p.fcursor, p.daycount]
		
		for i in range(0, len(arr_index)):
			self.lb1.insert(END, arr_index[i].fname.decode('gbk') + arr_index[i].fid)		#[p.fname,p.fid, p.fcursor, p.daycount]
	
		self.arr_index = arr_index
		
		arr_index = None
Exemplo n.º 2
0
        else:
            rlist.append(k)
    return rlist


def write_result_list_to_file():
    global result_list
    f = open("Z:\\provide2.txt", "w")
    for k in result_list:
        klist = dissolve_list(k)
        klist[-1] = mod_ratio(klist[-1])
        for k1 in klist:
            f.write(str(k1))
            f.write(" ")
        f.write("\n")
    print "Write to File Finished"


libqda.qda_init()
arr_list = libqda.get_all_index_arr(filter=1)
for k in arr_list:
    if k.fid == "SH000001":
        print "found"
        dayline = libqda.get_line_arr(k)
        f1 = 4898
        f2 = f1 + 17
        print calculate_minus(dayline[12:15]) / dayline[-1][1]
        break

raw_input()
Exemplo n.º 3
0
import libqda
import wx_show_graph
import math
import pickle_util

libqda.qda_init()
arr_list = libqda.get_all_index_arr(filter=1)
p = arr_list[222]
print p.fname
dayline = libqda.get_line_arr_fdaydata(p)
#wx_show_graph.show_graph(dayline)

a = 0
b = 0
c = 0
d = 0

iu = 0
for i in dayline:
    if iu:
        if i.op > iu.cl:
            if i.cl > i.op:
                a += 1
            else:
                b += 1
        else:
            if i.cl > i.op:
                c += 1
            else:
                d += 1
    iu = i