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
############################################################# | |
# # | |
# Configuration file for Dire Wolf # | |
# # | |
# Macintosh version # | |
# # | |
############################################################# | |
# | |
# Consult the User Guide for more details on configuration options. | |
# |
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
bool Database::compare_date(const Drink &a, const Drink &b) { | |
/* | |
* Determine if second date is greater than the first date. | |
* @param a: Date from a struct in YYYY-MM-DD format | |
* @param b: Date from b struct in YYYY-MM-DD format | |
* @return: True if second date is more recent than the first date. Else, false. | |
*/ | |
int a_year = std::stoi(a.date.substr(0, 4)); | |
int a_month = std::stoi(a.date.substr(5, 7)); |
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
#include <QStandardPaths> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
QString GetConfPath() { | |
// Get configuration path for MacOS. | |
std::string directory = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(0).toStdString(); | |
std::string conf_path = directory + "/QtTermTCP.ini"; | |
mkdir(directory.c_str(), 0775); |
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 |
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
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
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 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
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
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; |
NewerOlder