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
#Code For decorator | |
import timeit | |
import logging | |
def timer(func): | |
def wrap(*args, **kwargs): | |
started_at = time.time() | |
result = func(*args, **kwargs) | |
logging.info(time.time() - started_at) |
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
#The @ symbol indicates that we are applying the decorator to | |
#the function hello() | |
@timer | |
def hello(): | |
pass |
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
#The @ symbol indicates that we are applying | |
#the decorator to the function hello() | |
@timer | |
def hello(): | |
pass |
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
x = something # immutable type | |
print x | |
func(x) | |
print x # prints the same thing | |
x = something # mutable type | |
print x | |
func(x) | |
print x # might print something different |
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
x = 'foo' | |
y = x | |
print x # foo | |
y += 'bar' | |
print x # foo | |
x = [1, 2, 3] | |
y = x | |
print x # [1, 2, 3] | |
y += [3, 2, 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
// == The Weaver's Loom: Intertwining Obfuscated Threads == | |
// Let the raw, fragmented utterances be gathered from the ether... | |
let RawWhispers = "Fragment~Echo1|Payload=Type:B64~Data:SnVzdA==; Fragment~Echo2|Payload=Type:TRANS~Data:znl@svr; Fragment~Echo3|Payload=Type:B64~Data:S3VzdG8=; Fragment~Echo4|Payload=Type:TRANS~Data:szckvr"; | |
// The key to unlock the translated whispers (runic inversions)... | |
// CORRECTION APPLIED HERE: Matched 'aothe' to 'zl@sv' correctly | |
let RuneKey_Shadow = "zl@sv"; // Glyphs in their obscured form (z, l, @, s, v) | |
let RuneKey_Light = "aothe"; // Their true essence revealed (a, o, t, h, e) | |
// Prepare the loom, setting the tension... | |
print RawMaterial=RawWhispers | |
// Step 1: Isolate each whispered fragment and its encoding pattern |