This file contains 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
try: | |
exponent = len(self.lineEdit.text().split('.')[1]) | |
rounded_answer = round(self.answer, exponent) | |
except: | |
divisor = math.floor(self.answer) | |
if len(str(divisor)) == 2: | |
divisor = 10 | |
elif len(str(divisor)) == 3: | |
divisor = 100 | |
rounded_answer = self.answer / divisor |
This file contains 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
/* | |
* This file decodes the output of a Bourns EAW0J-B24-AE0128L 8-bit Absolute Contacting Encoder. | |
* Index this table using the 8-bit value read from encoder, and the output is | |
* the position, from 0-127. | |
* | |
* Direction info: If position=0 corresponds with robot steerable-wheel pointing straight ahead, | |
* then position=1 is a tiny clockwise rotation of the steering wheel, i.e. robot is steering to | |
* the right when travelling forwards. | |
* | |
* Half the possible numbers aren't used. In the table these are set to 255 = x'FF'. |
This file contains 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
cert = /etc/stunnel/stunnel.pem | |
pid = /var/run/stunnel.pid | |
output = /var/log/stunnel | |
[openvpn] | |
accept=443 | |
connect=127.0.0.1:1194 | |
This file contains 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
[!] Server is down | |
[ ] Executing cron jobs | |
[ ] Cron jobs completed in 0 seconds | |
[ ] Waiting 86400 seconds | |
[ ] Running on Windows 6.2 | |
[.] Reading configuration from file stunnel.conf | |
[.] UTF-8 byte order mark detected | |
[.] FIPS mode disabled | |
[ ] Compression disabled | |
[ ] Snagged 64 random bytes from C:/.rnd |
This file contains 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
import math | |
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8] | |
values2 = [0,3,6,6,5,5,5,7,6,6] | |
values3 = [0,10,10,12,11,11,10,12,12,11] | |
def returnLetterCount(n): | |
digits = int(len(str(n))) | |
letterCount = 0 | |
if n < 20: | |
letterCount += values1[n] |
This file contains 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
import math | |
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8] | |
values2 = [0,3,6,6,5,5,5,7,6,6] | |
values3 = [0,10,10,12,11,11,10,12,12,11] | |
def returnLetterCount(n): | |
digits = int(len(str(n))) | |
letterCount = 0 | |
if n < 20: | |
letterCount += values1[n] |
This file contains 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
import math | |
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8] | |
values2 = [0,3,6,6,5,5,5,7,6,6] | |
values3 = [0,10,10,12,11,11,10,12,12,11] | |
def returnLetterCount(n): | |
digits = int(len(str(n))) | |
letterCount = 0 | |
if n < 20: | |
letterCount += values1[n] |
This file contains 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
f = open("trianglepath.txt", "r") | |
triangle = [] | |
newTriangle = [] | |
for x in f.readlines(): | |
triangle.append([int(n) for n in x.split(" ")]) | |
print(triangle) | |
tempNumbers = 0 | |
tempList = [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23] | |
secondaryList = [] | |
for z in range(len(triangle) -1, -1, -1): |
This file contains 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
Linking build/project.elf | |
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_Transmit_DMA': | |
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:964: undefined reference to `HAL_DMA_Start_IT' | |
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_Receive_DMA': | |
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1035: undefined reference to `HAL_DMA_Start_IT' | |
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_DMAStop': | |
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1156: undefined reference to `HAL_DMA_Abort' | |
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1161: undefined reference to `HAL_DMA_Abort' | |
build/obj/main.o: In function `main': | |
/home/tom/shiny-octo/main.c:55: undefined reference to `HAL_UART_TransmitIT' |
This file contains 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
""" | |
Calculates the Steinhart-Hart coefficients for given resistance and temperature pairs. | |
""" | |
import sys | |
import math | |
titleString = """\ | |
______ _ __ __ __ __ __ _____ _______ _ __ | |
/ __/ /____ (_)__ / / ___ _____/ /_____/ // /__ _____/ /_ / ___/__ ___ / _/ _(_)___(_)__ ___ / /____ | |
_\ \/ __/ -_) / _ \/ _ \/ _ `/ __/ __/___/ _ / _ `/ __/ __/ / /__/ _ \/ -_) _/ _/ / __/ / -_) _ \/ __(_-< |
OlderNewer