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
const collection = document.getElementsByClassName("h2_anime_title"); | |
const outerHTMLArr = []; | |
for (let i = 0; i < collection.length; i++) { | |
outerHTMLArr.push(collection[i].outerHTML); | |
} |
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
## Part 1 | |
from __future__ import annotations | |
from pathlib import Path | |
def calculate_max_calories(input: str) -> int | str: | |
""" | |
Calculates the max number of calories in a given input file. Calories are int's. |
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 string | |
list_of_alphabets_and_digits = [ | |
string.ascii_lowercase, | |
string.ascii_uppercase, | |
string.digits, | |
] | |
def shift(alphabets_and_digits_to_shift: str, key_to_shift_by: int) -> str: |
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
function isAnagram(stringA, stringB) { | |
function createCharMap(text) { | |
let charMap = {} | |
for (let char of text) { | |
if (charMap.hasOwnProperty(char)) { | |
charMap[char]++ | |
} else { | |
charMap[char] = 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
import secrets | |
import string | |
def generate_random_password(num: int = 8, symbols: str = None, numbers: str = None, uppercase: str = None, lowercase: str = None) -> str: | |
""" | |
This function generates a random password that has at least 8 characters. | |
The password can be customised by the user. | |
""" |