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
def nice_index(tens: Tensor, index: Tensor) -> Tensor: | |
""" | |
A multi-level indexing function. | |
The last dimension of the index is a multi-level specifier | |
All other dimensions of the index are batch | |
For example, if the index is [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] | |
the result will be [[tens[1, 2], tens[3, 4]], [tens[5, 6], tens[7, 8]]] | |
See tests for more details | |
""" |
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
import datetime | |
original_timestamp = datetime.datetime.now() | |
# Convert datetime object to a string representation | |
timestamp_string = original_timestamp.strftime("%Y-%m-%dT%H:%M:%S%z") | |
print(timestamp_string) | |
# OUTPUT: 2019-08-17T00:00:00+0000 | |
# Add a colon separator to the offset segment |
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
/* | |
Right here's the thing - for keyPress events to be run, you'll have to make use of | |
content scripts. Content scripts handle things at webpage & DOM level. You'll have | |
to do changes to your manifest: | |
*/ | |
------------------------ | |
manifest.json: | |
------------------------ | |
/* | |
Note: don't replace manifest.json, add the relevant changes else |