<commit_before>#!/bin/bash
light_call_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 1,
			"brightness": 21,
			"temperature":294
		}
	]
}
EOF
}

light_day_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 1,
			"brightness": 30,
			"temperature":175
		}
	]
}
EOF
}

light_off_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 0,
			"brightness": 21,
			"temperature":294
		}
	]
}
EOF
}

update_key_light() {
	BODY=$1

	curl -i \
		-H "Accept: application/json" \
		-H "Content-Type: application/json" \
		-X PUT \
		--data "$BODY" \
		"http://192.168.1.18:9123/elgato/lights"
}

elgato_light_call() {
	update_key_light "$(light_call_body)"
}

elgato_light_day() {
	update_key_light "$(light_day_body)"
}

elgato_light_off() {
	update_key_light "$(light_off_body)"
}<commit_msg>updated the elgato ligths IP<commit_after>#!/bin/bash
light_call_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 1,
			"brightness": 21,
			"temperature":294
		}
	]
}
EOF
}

light_day_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 1,
			"brightness": 30,
			"temperature":175
		}
	]
}
EOF
}

light_off_body() {
cat <<EOF
{
	"numberOfLights":1,
	"lights": [
		{
			"on": 0,
			"brightness": 21,
			"temperature":294
		}
	]
}
EOF
}

update_key_light() {
	BODY=$1

	curl -i \
		-H "Accept: application/json" \
		-H "Content-Type: application/json" \
		-X PUT \
		--data "$BODY" \
		"http://192.168.1.2:9123/elgato/lights"
}

elgato_light_call() {
	update_key_light "$(light_call_body)"
}

elgato_light_day() {
	update_key_light "$(light_day_body)"
}

elgato_light_off() {
	update_key_light "$(light_off_body)"
}
{'fraction_non_alphanumeric': 0.19477434679334918, 'fraction_numerical': 0.040973871733966744, 'mean_word_length': 3.445910290237467, 'pattern_counts': {'":': 30, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4510628', 'n_tokens_mistral': 902, 'n_tokens_neox': 768, 'n_words': 120}