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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/gin-gonic/gin" | |
) |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"sync" | |
"time" |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"sync" | |
"time" |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"sync" |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 16 columns, instead of 15. in line 6.
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
"Project","Client","Description","Task","User","Email","Tags","Billable","Start Date","Start Time","End Date","End Time","Duration (h)","Duration (decimal)","Billable Rate (USD)","Billable Amount (USD)" | |
"test","","test","","User","User@test.com","","Yes","01/07/2021","01:26:00 PM","01/07/2021","02:43:00 PM","01:17:00","1.28","0.00","0.00" | |
"test","","test","","User","User@test.com","","Yes","01/06/2021","10:11:00 AM","01/06/2021","01:26:00 PM","03:15:00","3.25","0.00","0.00" | |
"test","","test","","User","User@test.com","","Yes","01/05/2021","09:26:00 AM","01/05/2021","10:11:00 AM","00:45:00","0.75","0.00","0.00" | |
"test","","test","","User","User@test.com","","Yes","01/04/2021","07:41:00 AM","01/04/2021","09:26:00 AM","01:45:00","1.75","0.00","0.00" | |
"test","","test","","User","User@test.com","","Yes","01/03/2021","04:56:00 AM","01/03/2021","07:41:00 AM","02:45:00","2.75","0.00","0.00" | |
"test","","test","","User","User@test.com","","Yes","01/02/2021","02:26:00 AM","01/02/2021","04:56:00 AM","02:30:00","2.50","0.00" |
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
import csv | |
from collections import defaultdict | |
def duration_to_seconds(duration): | |
elements = duration.split(':') | |
hour = int(elements[0]) | |
min = int(elements[1]) | |
sec = int(elements[2]) | |
return hour*60*60 + min*60 + sec |
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
from datetime import datetime | |
def sortKey(val): | |
date = val[0] | |
#https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior | |
return datetime.strptime(date, '%m/%d/%Y') | |
mylist = list(mydict.items()) | |
mylist.sort(key = sortKey) |
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
import numpy as np | |
dates = [] | |
mins = [] | |
for i in range(0,len(mylist)): | |
dates.append(mylist[i][0]) | |
mins.append(int(mylist[i][1]/60)) | |
#xcordinates of the bars | |
xpos = np.arange(len(dates)) |
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
import csv | |
from collections import defaultdict | |
from datetime import datetime | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def duration_to_seconds(duration): | |
elements = duration.split(':') | |
hour = int(elements[0]) | |
min = int(elements[1]) |