<commit_before>#define _BSD_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#include <sys/wait.h>

#include <X11/Xlib.h>

// VARIABLES
static Display *dpy;

// Timezones
char *tzutc = "UTC";
char *tzsocal = "America/Los_Angeles";

// Sensors.. use full paths.
//char *sensor0 = "/sys/class/hwmon/hwmon0/device/temp1_input";
char *sensor0 = "/sys/class/hwmon/hwmon1/temp2_input";
char *sensor1 = "/sys/class/hwmon/hwmon1/temp3_input";

// SUCKLESS' PRINTF()
char *
smprintf(char *fmt, ...)
{
	va_list fmtargs;
	char *ret;
	int len;

	va_start(fmtargs, fmt);
	len = vsnprintf(NULL, 0, fmt, fmtargs);
	va_end(fmtargs);

	ret = malloc(++len);
	if (ret == NULL) {
		perror("malloc");
		exit(1);
	}

	va_start(fmtargs, fmt);
	vsnprintf(ret, len, fmt, fmtargs);
	va_end(fmtargs);

	return ret;
}

// TIME
//
void
settz(char *tzname)
{<commit_msg>Updated to use temps from my AMD/ATI HD 5450.<commit_after>#define _BSD_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#include <sys/wait.h>

#include <X11/Xlib.h>

// VARIABLES
static Display *dpy;

// Timezones
char *tzutc = "UTC";
char *tzsocal = "America/Los_Angeles";

// Sensors.. use full paths.
//char *sensor0 = "/sys/class/hwmon/hwmon0/device/temp1_input";
char *sensor0 = "/sys/class/hwmon/hwmon1/temp1_input";
char *sensor1 = "/sys/class/hwmon/hwmon1/temp2_input";

// SUCKLESS' PRINTF()
char *
smprintf(char *fmt, ...)
{
	va_list fmtargs;
	char *ret;
	int len;

	va_start(fmtargs, fmt);
	len = vsnprintf(NULL, 0, fmt, fmtargs);
	va_end(fmtargs);

	ret = malloc(++len);
	if (ret == NULL) {
		perror("malloc");
		exit(1);
	}

	va_start(fmtargs, fmt);
	vsnprintf(ret, len, fmt, fmtargs);
	va_end(fmtargs);

	return ret;
}

// TIME
//
void
settz(char *tzname)
{
{'fraction_non_alphanumeric': 0.18355065195586762, 'fraction_numerical': 0.015045135406218655, 'mean_word_length': 4.2088772845953, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2911610', 'n_tokens_mistral': 882, 'n_tokens_neox': 852, 'n_words': 182}