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
#Luke , Python , 9/17/2014 | |
month = raw_input("Month: ").lower() | |
year = int(raw_input("Year: ")) | |
month30 = ["september", "april", "june", "november"] | |
month31 = ["january", "march"] | |
month29 = ["february"] | |
if month in month30: |
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
print "Which is better? Coke Zero or Water?" | |
answer1 = raw_input("Answer: ").lower() | |
if answer1 == "coke zero": | |
print "Correct!" | |
else: | |
print "Wrong!" | |
print "Does Luke like climbing?" | |
answer2 = raw_input("Answer: ").lower() | |
if answer2 == "yes": |
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
x = 0 | |
print "Which is better? Coke Zero or Water?" | |
answer1 = raw_input("Answer: ").lower() | |
if answer1 == "coke zero": | |
print "Correct!" | |
x += 1 | |
else: | |
print "Wrong!" |
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
#Luke , Python , 9/17/2014 | |
month = raw_input("Month: ").lower() # asks what month it is and forces the entry to be in lower case so that it matches with my list entries | |
# when you put things in "" it makes it print | |
year = int(raw_input("Year: ")) # asks for year and the int() requires the entry to be a number | |
month30 = ["september", "april", "june", "november"] # all the months with 30 days | |
month31 = ["january", "march", "may", "july", "august", "october", "december"] # all months with 31 days | |
month29 = ["february"] #month with 28 /w no leap and 29 with leap | |
# elif means "else if" |
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
; create new text file in current window focus | |
#IfWinActive ahk_class CabinetWClass | |
>!t:: ;explorer - create new text file and focus/select it | |
#IfWinActive ahk_class ExploreWClass | |
>!t:: ;explorer - create new text file and focus/select it | |
;note: similar to: right-click, New, Text Document | |
vNameNoExt := "New Text Document" | |
vDotExt := ".txt" | |
WinGet, hWnd, ID, A | |
for oWin in ComObjCreate("Shell.Application").Windows |
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 <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
// used to allow for window resizing | |
void framebuffer_size_callback(GLFWwindow* window, int width, int height); | |
void processInput(GLFWwindow* window); | |
const char* vertex_shader_source = "#version 330 core\n" |
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
; PURPOSE: Use hotkeys to switch between audio devices | |
; source: https://www.autohotkey.com/boards/viewtopic.php?t=49980 | |
Devices := {} | |
IMMDeviceEnumerator := ComObjCreate("{BCDE0395-E52F-467C-8E3D-C4579291692E}", "{A95664D2-9614-4F35-A746-DE8DB63617E6}") | |
; IMMDeviceEnumerator::EnumAudioEndpoints | |
; eRender = 0, eCapture, eAll | |
; 0x1 = DEVICE_STATE_ACTIVE |
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
/* | |
oven thermometer with MQTT | |
based on: | |
- https://github.com/pawl/oven_thermometer | |
- https://simple-circuit.com/esp8266-nodemcu-ili9341-tft-display/ | |
- https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/ | |
parts: | |
- 2.8in SPI TFT ILI9341 screen | |
- MAX6675 temperature sensor | |
- k-type thermocouple |
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
#!/usr/bin/env python3 | |
# File generated by pre-commit: https://pre-commit.com | |
# ID: unique_id | |
import os | |
import sys | |
# we try our best, but the shebang of this script is difficult to determine: | |
# - macos doesn't ship with python3 | |
# - windows executables are almost always `python.exe` | |
# therefore we continue to support python2 for this small script |
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
version: '3' | |
services: | |
homeassistant: | |
container_name: homeassistant | |
image: "ghcr.io/home-assistant/raspberrypi4-homeassistant:stable" | |
volumes: | |
- /home/pi/home_assistant/config:/config | |
- /etc/localtime:/etc/localtime:ro | |
restart: unless-stopped |
OlderNewer