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
| #!/usr/bin/env python3 | |
| """ | |
| Remap mvt-decrypted iOS backup files to human-readable directory structure. | |
| Usage: | |
| python remap_backup.py <mvt_decrypted_dir> <output_dir> | |
| The mvt_decrypted_dir should contain the decrypted Manifest.db and the | |
| flat file structure that mvt-ios produces. | |
| """ |
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
| const a = tf.tensor1d([1,2,3,4,5,6,7]); | |
| const b = tf.tensor1d([1,2,3,4,8,9,0]); | |
| const matching = tf.equal(a, b).mean().mul(a.size); | |
| matching.print(); |
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
| // Converting a string to and from a one-hot encoded binary vector | |
| // Accepts a string and returns an array of 1s and 0s | |
| function encodeString(input, charset) { | |
| // Define output as a variable containing an empty array | |
| var output = []; | |
| // Convert input string to array of all characters in input | |
| input = input.split(""); | |
| // Loop through each character of the input string | |
| input.forEach( |