Created
July 8, 2020 16:26
-
-
Save EnkrateiaLucca/3084d2c11adc48ff6199c8f2a36cbeaf to your computer and use it in GitHub Desktop.
The forward pass on the sources
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
for i,url in enumerate(df["links"][last_index:]): # Looping over the links | |
webbrowser.open(url) # Opens each link on the default browser | |
start_session = time.time() | |
date = get_date() | |
df["date"][i] = date # Stores the date | |
att_level = float(input("Input the attention level for this input (0-10):")) # Requests a score of attention | |
df["attention_level"][i] = att_level | |
next_inp = input("Press enter to go to next link or q to quit training for now") # To go to the next link | |
if next_inp == "q": | |
df["last_index"] = i | |
end_session = time.time() | |
s_time = np.round(end_session - start_session,2) | |
df["session_time"][i] = s_time | |
s_score = float(input("Give a score to your performance in this session (0-10):")) | |
df["session_score"][i] = s_score | |
break | |
end_session = time.time() | |
s_time = np.round(end_session - start_session,2) # Records the time of that session | |
df["session_time"][i] = s_time | |
s_score = float(input("Give a score to your performance in this session (0-10):")) # Requests the score for performance | |
df["session_score"][i] = s_score | |
session_df = df.copy() | |
date_file = get_date(save_file=True) | |
session_df.to_csv(".\\sessions\\session_{}.csv".format(date_file)) # Stores the .csv for that session on the sessions directory | |
duolingo = input("Do you want to do a quick duolingo session to finish things off? (y/n)") # Finishes prompting the user to do a quick duolingo session to wrap things up | |
if duolingo=="y": | |
webbrowser.open("www.duolingo.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment