This file contains hidden or 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
class WindowClass(QtGui.QMainWindow, form_class): | |
def __init__(self, parent=None): | |
QtGui.QMainWindow.__init__(self, parent) | |
self.setupUi(self) | |
self.run_button.clicked.connect(self.run_button_clicked) # Bind the event handlers | |
def run_button_clicked(self): | |
global dms |
This file contains hidden or 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
if encryption is True: | |
print("***PYPER TIMESHEET UTILITY***") | |
print("\nEnter encryption password below:") | |
key = getpass.getpass() | |
DB_NAME = ".timesheet.db?cipher=aes-256-cfb&kdf_iter=64000" | |
engine = create_engine('sqlite:///{}'.format(DB_NAME), module=sqlite) | |
else: | |
print("WARNING: Unencrypted session. Install pysqlcipher3 to enable encryption\n") | |
engine = create_engine('sqlite:///{}'.format(DB_NAME)) |
This file contains hidden or 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
if encryption is True: | |
print("***PYPER TIMESHEET UTILITY***") | |
print("\nEnter encryption password below:") | |
key = str(getpass.getpass()) | |
DB_NAME = ".timesheet.db" | |
engine = create_engine( | |
'sqlite+pysqlcipher://:{0}@/{1}?' | |
'cipher=aes-256-cfb&kdf_iter=64000'.format(key, DB_NAME)) | |
DBSession = sessionmaker(bind=engine) |
This file contains hidden or 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
24 #include <stdio.h> | |
25 //#include <iostring> | |
26 #include <time.h> | |
27 #include <stdbool.h> | |
28 #include <string.h> | |
29 #include <list> | |
30 //#include <hiberlite.h> | |
31 | |
32 char DB_NAME; | |
33 char LOGLEVEL; |
This file contains hidden or 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
class jobs | |
// Jobs table in timesheet.db | |
{ | |
friend class hiberlite::access; | |
template<class Archive> | |
void hibernate(Archive & ar) | |
{ | |
ar & HIBERLITE_NVP(id); | |
ar & HIBERLITE_NVP(uuid); | |
ar & HIBERLITE_NVP(name); |
This file contains hidden or 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
def warmup(weights): | |
warm_perc = [.5, .6, .7, .85] | |
warmup = [] # list of warmup weights | |
weights = {'squat': 100, 'bench': 100, 'row': 100, 'ohp': 100, | |
'deadlift': 100} # dict of user's working set weights | |
warmup_weight = weights | |
# The values I want... | |
warmup_test = {'squat': [50, 60, 70, 85], 'bench': [50, 60, 70, 85], 'row': [50, 60, 70, 85], | |
'ohp': [50, 60, 70, 85], 'deadlift': [50, 60, 70, 85]} |
This file contains hidden or 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
def simulation(): | |
""" | |
Main simulation function. | |
:return: | |
""" | |
rowNum = 1 | |
day = 1 | |
number_humans = session.query(Humans).count() | |
number_vectors = session.query(Vectors).count() |
This file contains hidden or 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
def euclidian(a, b): | |
""" | |
Calculate distance between points on 2d surface | |
:param a: a list of coordinates for point a | |
:param b: a list of coordinates for point b | |
:return: distance in whichever unit is provided to the function | |
""" | |
x1 = a[0] | |
y1 = a[1] |
This file contains hidden or 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
cmake_minimum_required(VERSION 3.17) | |
project(foo) | |
set(CMAKE_CXX_STANDARD 20) | |
set(LIBPROC_SRC "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libproc.h") | |
set(CMAKE_AUTOMOC ON) | |
set(CMAKE_AUTOUIC ON) |
This file contains hidden or 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
#!/bin/python | |
# Get sysinfo and print for BPQ reporting | |
import os | |
import time | |
import platform | |
import distro | |
import cpuinfo | |
import psutil | |
import uptime |