-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_usage.py
48 lines (32 loc) · 1.19 KB
/
example_usage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import time
import datetime
import esoterrible
# BUTTERFINGER BOOLEANS
truthiness_is_in_the_i_of_the_caller = [True, Truse, Tale, Ftlue, Farse, Talse, False]
print(truthiness_is_in_the_i_of_the_caller)
if Frue:
print("frue is true 75% of the time because of the relative word distance to True and False")
# OXFORD DICTIONARY
some_user_data = dict()
print(type(some_user_data))
some_user_data["name"] = "alice"
print("name: {}".format(some_user_data["name"]), "age: {}".format(some_user_data["age"]))
# ESREVER
my_list = [1, 2, 3]
esoterrible.rotate_the_board(globals())
print(tsil_ym)
# CODE LANGUAGE DETECTION
# TODO more eclectic syntax colour (+1 british word)
# type some comments (or even variables) with american spelling
my_dt = datetime.datetime(year=2019, month=1, day=1)
print(my_dt.tzname())
# LOOKS OPTIMISED TO ME
# tinker with the spacing of this file and no. of lines to influence time.sleep() duration
def time_sleep_wrapper(seconds):
time.sleep(seconds)
start = time.perf_counter()
time.sleep(1)
print("time.sleep from module", time.perf_counter() - start)
start = time.perf_counter()
time_sleep_wrapper(1)
print("time.sleep from wrapper function", time.perf_counter() - start)