GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 42-42 lines in 3 locations

app/core.py 1 location

@@ 38-79 (lines=42) @@
35
    return df
36
37
38
def read_file_dash(lines):
39
    """This function is exactly similar to read_file, but it is for dash
40
41
    Parameters
42
    __________
43
    file: lines from dash input file
44
45
    Returns:
46
    ________
47
    dict_of_df: dictionary of dataframes with keys = cycle numbers and
48
    values = dataframes for each cycle
49
    n_cycle: number of cycles in the raw file
50
    """
51
    dict_of_df = {}
52
    h = 0
53
    l = 0
54
    n_cycle = 0
55
    number = 0
56
    #a = []
57
    #with open(file, 'rt') as f:
58
    #    print(file + ' Opened')
59
    for line in lines:
60
        record = 0
61
        if not (h and l):
62
            if line.startswith('SCANRATE'):
63
                scan_rate = float(line.split()[2])
64
                h = 1
65
            if line.startswith('STEPSIZE'):
66
                step_size = float(line.split()[2])
67
                l = 1
68
        if line.startswith('CURVE'):
69
            n_cycle += 1
70
            if n_cycle > 1:
71
                number = n_cycle - 1
72
                df = read_cycle(a)
73
                key_name = 'cycle_' + str(number)
74
                #key_name = number
75
                dict_of_df[key_name] = copy.deepcopy(df)
76
            a = []
77
        if n_cycle:
78
            a.append(line)
79
    return dict_of_df, number
80
81
82
def read_file(file):

practice/dash_resumable_upload.py 1 location

@@ 38-79 (lines=42) @@
35
    return df
36
37
38
def read_file_dash(lines):
39
    """This function is exactly similar to read_file, but it is for dash
40
41
    Parameters
42
    __________
43
    file: lines from dash input file
44
45
    Returns:
46
    ________
47
    dict_of_df: dictionary of dataframes with keys = cycle numbers and
48
    values = dataframes for each cycle
49
    n_cycle: number of cycles in the raw file
50
    """
51
    dict_of_df = {}
52
    h = 0
53
    l = 0
54
    n_cycle = 0
55
    number = 0
56
    #a = []
57
    #with open(file, 'rt') as f:
58
    #    print(file + ' Opened')
59
    for line in lines:
60
        record = 0
61
        if not (h and l):
62
            if line.startswith('SCANRATE'):
63
                scan_rate = float(line.split()[2])
64
                h = 1
65
            if line.startswith('STEPSIZE'):
66
                step_size = float(line.split()[2])
67
                l = 1
68
        if line.startswith('CURVE'):
69
            n_cycle += 1
70
            if n_cycle > 1:
71
                number = n_cycle - 1
72
                df = read_cycle(a)
73
                key_name = 'cycle_' + str(number)
74
                #key_name = number
75
                dict_of_df[key_name] = copy.deepcopy(df)
76
            a = []
77
        if n_cycle:
78
            a.append(line)
79
    return dict_of_df, number
80
81
82
def read_file(file):

practice/core.py 1 location

@@ 38-79 (lines=42) @@
35
    return df
36
37
38
def read_file_dash(lines):
39
    """This function is exactly similar to read_file, but it is for dash
40
41
    Parameters
42
    __________
43
    file: lines from dash input file
44
45
    Returns:
46
    ________
47
    dict_of_df: dictionary of dataframes with keys = cycle numbers and
48
    values = dataframes for each cycle
49
    n_cycle: number of cycles in the raw file
50
    """
51
    dict_of_df = {}
52
    h = 0
53
    l = 0
54
    n_cycle = 0
55
    number = 0
56
    #a = []
57
    #with open(file, 'rt') as f:
58
    #    print(file + ' Opened')
59
    for line in lines:
60
        record = 0
61
        if not (h and l):
62
            if line.startswith('SCANRATE'):
63
                scan_rate = float(line.split()[2])
64
                h = 1
65
            if line.startswith('STEPSIZE'):
66
                step_size = float(line.split()[2])
67
                l = 1
68
        if line.startswith('CURVE'):
69
            n_cycle += 1
70
            if n_cycle > 1:
71
                number = n_cycle - 1
72
                df = read_cycle(a)
73
                key_name = 'cycle_' + str(number)
74
                #key_name = number
75
                dict_of_df[key_name] = copy.deepcopy(df)
76
            a = []
77
        if n_cycle:
78
            a.append(line)
79
    return dict_of_df, number
80
81
82
def read_file(file):