<commit_before># TCS34725 sensor library test

import TCS34725 as tcs
import time

tcs = tcs.TCS34725()
tcs.begin()
print 'gain 1'
tcs.setGain(1)
print tcs.getRawData()

print 'gain 2'
tcs.setGain(2)
print tcs.getRawData()

print 'gain 3'
tcs.setGain(3)
print tcs.getRawData()

print 'gain 0'
tcs.setGain(0)
print tcs.getRawData()

print 'gain 4, this should not work'
tcs.setGain(4)
print tcs.getRawData()

# print ' setting gain to 1'
# tcs.setGain(1)

print 'set integration time 0xFF'
tcs.setIntegrationTime(0xFF)

print 'set integration time 0xF6'
tcs.setIntegrationTime(0xF6)

print 'set integration time 0xEB'
tcs.setIntegrationTime(0xEB)

print 'set integration time 0xD5'
tcs.setIntegrationTime(0xD5)

print 'set integration time 0xC0'
tcs.setIntegrationTime(0xC0)

print 'set integration time 0x00'
tcs.setIntegrationTime(0x00)

print 'set integration time 0x14 (should break)'
tcs.setIntegrationTime(0x14)

print 'set integration time 0xEB'
tcs.setIntegrationTime(0xEB)

print 'getting status'
print tcs.getStatus()

while True:
	print tcs.getRawData()
	time.sleep(1)
	print tcs.calculateColorTemperature(tcs.getRawRGBData())<commit_msg>Cleaning up typos and other dumb stuff<commit_after># TCS34725 sensor library test

import TCS34725 as tcs
import time

tcs = tcs.TCS34725()
tcs.begin()
print 'gain 1'
tcs.setGain(1)
print tcs.getRawData()

print 'gain 2'
tcs.setGain(2)
print tcs.getRawData()

print 'gain 3'
tcs.setGain(3)
print tcs.getRawData()

print 'gain 0'
tcs.setGain(0)
print tcs.getRawData()

print 'gain 4, this should not work'
tcs.setGain(4)
print tcs.getRawData()

# print ' setting gain to 1'
# tcs.setGain(1)

print 'set integration time 0xFF'
tcs.setIntegrationTime(0xFF)

print 'set integration time 0xF6'
tcs.setIntegrationTime(0xF6)

print 'set integration time 0xEB'
tcs.setIntegrationTime(0xEB)

print 'set integration time 0xD5'
tcs.setIntegrationTime(0xD5)

print 'set integration time 0xC0'
tcs.setIntegrationTime(0xC0)

print 'set integration time 0x00'
tcs.setIntegrationTime(0x00)

print 'set integration time 0x14 (should break)'
tcs.setIntegrationTime(0x14)

print 'set integration time 0xEB'
tcs.setIntegrationTime(0xEB)

print 'getting status'
print tcs.getStatus()

while True:
	r, g, b = tcs.getRawData()
	print r, g, b
	time.sleep(1)
	print tcs.calculateColorTemperature(r,g,b)
{'fraction_non_alphanumeric': 0.10404127257093723, 'fraction_numerical': 0.04987102321582115, 'mean_word_length': 5.7645348837209305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '149210', 'n_tokens_mistral': 984, 'n_tokens_neox': 927, 'n_words': 243}