Exemplo n.º 1
0
def run_report(issuetype, url):
    download_csv_file(issuetype=issuetype, url=url)

    pdata = pd.read_csv(issuetype + '.csv', dtype='unicode')
    efforts = []

    for col in pdata.filter(regex='Log').itertuples():
        for row in col:
            if (type(row) is not float and type(row) is not int):  # is not NaN
                efforts.append(row.split(';')[-2:])

    peffort = pd.DataFrame(efforts, columns=['Name', 'Hr'])
    peffort['Hr'] = pd.to_numeric(peffort['Hr']) / 3600

    result = peffort.groupby('Name', as_index=False).sum()
    result['Name'] = result['Name'].apply(lambda x: name.get_name(x))

    result.to_excel(issuetype + '_report.xlsx')
Exemplo n.º 2
0
	def test_get_name(self):
		name = get_name()
		self.assertEqual(name, 'hello world')
Exemplo n.º 3
0
 def test_get_name_returns_input(self, input):
     self.assertEqual(get_name(), 'test')
Exemplo n.º 4
0
 def test_get_name_returns_default(self, input):
     self.assertEqual(get_name(), 'Pablo')
Exemplo n.º 5
0
import name
name = name.get_name()
print(name)
Exemplo n.º 6
0
# store the time line by level
objects_count_frame = defaultdict(list)
# store all the time line
objects_count_frame_aux = defaultdict(list)
# store values (int) for each level
objects_count_total = dict.fromkeys(colors_dic.keys(), 0)

# show the current count of products
x_y = (10, 540)
frame_video = draw_count(frame_video, objects_count_total, colors_dic,
                         'Total products', x_y)

# show the video?
show_video = True
results_name = get_name(video_name) + '_results_' + get_time()

# store the total count of producta of the current frame
no_objects_list = []

#how many frames without any object have to happen to detect the new level
frames_no_objects = 40  # frames sin objetcos 80
level_count = 0
f = 0  # frame

# while thera are new frames from the video
while (capture.isOpened()):
    stime = time.time()
    ret, frame = capture.read()
    if frame is None:
        break