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> | |
<title>Form</title> | |
</head> | |
<body> | |
<form method="POST"> | |
<label for="name1">Name 1:</label><br> | |
<input value="{{name1}}" type="text" id="name1" name="name1"> - {{receiver1}} <br> |
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
ABANDON | |
ABANDONED | |
ABANDONING | |
ABANDONS | |
ABASHED | |
ABBEY | |
ABEAR | |
ABILITIES | |
ABILITY | |
ABJURED |
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 os, sys | |
import re | |
text = 'utilise the big red ball.' | |
#~ phone_text = "My phone number is 07749 298683 and my phone number is 012342837 89 and this is another number 13245767802" | |
verbs = {"go", "get", "drop", "jump", "eat", "use"} | |
synonyms = { | |
"use" : {"wave", "utilise", "brandish"} | |
} |
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 pathlib | |
import random | |
# | |
# Get a list of category filenames | |
# | |
category_filenames = pathlib.Path(".").glob("*.txt") | |
# | |
# Display each category name in turn |
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
# Write your code here :-) | |
# l = ['Tim', 'David', 'Peter', 'Tommy'] | |
# for i in l: | |
# print(int(i)) | |
# iterator = iter(l) | |
# while True: | |
# try: | |
# print(next(iterator)) |
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 add_v_to_c(c, v): | |
... cx, cy = c | |
... vx, vy = v | |
... return (cx + vx, cy + vy) |
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 os, sys | |
import subprocess | |
## env = {} | |
## env['SystemRoot'] = os.environ['SystemRoot'] | |
env = dict(os.environ) | |
del env['PYTHONPATH'] | |
print(subprocess.run(["c:/temp/mu/yyy/scripts/python.exe", "-c", 'import sys; print(sys.path)'], stdout=subprocess.PIPE, env=env).stdout) | |
print(subprocess.run(["c:/temp/mu/yyy/scripts/python.exe", "-m", "pip", "freeze"], stdout=subprocess.PIPE, env=env).stdout) |
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
book_file = open("""bleak-house.txt""") | |
book_text = book_file.read() | |
print(book_text[:200]) | |
words = book_text.lower().split() | |
print(words[:200]) | |
input_word=input("Please enter a word: ").lower() | |
print(input_word) | |
print(len(words), "words") | |
if input_word in words: | |
print("Found it") |
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
# | |
# You nearly always just need to import Image | |
# from PIL(low) to do what you need | |
# | |
from PIL import Image | |
# | |
# It's convenient to import everything from colorzero | |
# so you don't have to put "colorzero." before everything | |
# | |
from colorzero import * |
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 os, sys | |
print(sys.executable) |
NewerOlder