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
# User input | |
import urllib.request, string | |
from urllib.parse import urlparse | |
phone_num = input("Phone number: ") | |
for char in string.punctuation: | |
phone_num = phone_num.replace(char, "") | |
try: | |
int(phone_num) | |
except Exception as e: | |
print("Please enter a phone number.") |
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
# Libs | |
import re | |
from urllib.request import urlopen | |
from urllib.parse import urlparse | |
yoursite = "https://www.google.com/" | |
crawllist = [{"url": yoursite, "crawled": False}] | |
undecodable = [] | |
depth = 5 | |
for i in range(depth): | |
nlist = [] |
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
# Setup word list. Download if not there | |
# Note: "string" means the thing we're trying to guess | |
from urllib.request import urlopen | |
from os.path import isfile | |
from re import sub | |
from string import ascii_lowercase | |
print("Loading...") | |
if isfile("words.txt"): | |
words = open("words.txt", "r").read().split("\n") | |
else: |
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
def cipher(inputstr, shift=4): | |
outputstr = '' | |
for char in inputstr: | |
charnum = ord(char) - shift | |
if charnum > 122: | |
charnum = ((charnum - 97) % 26) + 97 | |
elif charnum < 97: | |
charnum = ((charnum - 97) % 26) + 97 | |
outputstr += chr(charnum) | |
return outputstr |
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
# Thanks @JuanMTech! I've slightly modified their themes a little. | |
Google Light Theme: | |
# Header: | |
app-header-background-color: "#f3f5f7" | |
app-header-text-color: "#000" | |
# Main Interface Colors | |
primary-color: "#5F9BEA" | |
light-primary-color: var(--primary-color) | |
primary-background-color: "#f3f5f7" | |
secondary-background-color: var(--primary-background-color) |
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
cards: | |
- content: > | |
# <center>{% if is_state('binary_sensor.evening', 'on') %} Good evening {% | |
elif is_state('binary_sensor.night', 'on') %} Have a good night {% elif | |
is_state('binary_sensor.morning', 'on') %} Good morning {% endif | |
%} {{user}}</center> | |
style: | |
.: | | |
ha-card { | |
--paper-card-background-color: none !important; |
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
cards: | |
- entities: | |
- entity: switch.kendell_s_humidifier | |
name: Direct control | |
- entity: humidifier.upstairs_bedroom | |
- entity: sensor.filtered_temperature | |
- entity: sensor.filtered_humidity | |
show_header_toggle: false | |
style: | | |
ha-card { |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/j/<meeting_id>") | |
def join(meeting_id): | |
return f"<iframe src='zoommtg://zoom.us/join?confno={meeting_id}' style='display: none;'></iframe>" |
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
# Simple hangman guesser by @KTibow | |
# Get the possible words from the file | |
import string | |
all_words = open("words_alpha.txt").read().splitlines() | |
# Get how long the word is | |
word_length = int(input("How long is the word? ")) | |
word_letters = [[] for i in range(word_length)] | |
possible_words = [] |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Printer Notifier</title> | |
<style> | |
body { | |
background: #282233; | |
color: white; |
OlderNewer