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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width" /> | |
| <title>ngErrorRedirect</title> | |
| </head> | |
| <body> | |
| <div> | |
| Error | |
| </div> |
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 threading | |
| import time | |
| def do_something_random_until_stopped(event): | |
| counter = 0 | |
| elapsed = time.time() | |
| while not event.isSet(): | |
| print(f"I am at {counter}") | |
| counter += 1 |
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
| from functools import lru_cache | |
| def minCut(s: str) -> int: | |
| def is_palindrome(start, end): | |
| while start < end: | |
| if s[start] != s[end]: | |
| return False | |
| start += 1 |
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
| from collections import defaultdict | |
| class ConversionNotPossible(Exception): | |
| def __init__(self, from_unit, to_unit): | |
| super(Exception).__init__() | |
| self.from_unit = from_unit | |
| self.to_unit = to_unit | |
| def __repr__(self) -> str: |
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 find_perfect_squares(number): | |
| perfect_squares = {i * i for i in range(sqrt(n)} | |
| for other_i in sqrt(n): | |
| if n - other_i * other_i in perfect_squares: | |
| return True | |
| return False |
OlderNewer