Skip to content

Instantly share code, notes, and snippets.

View AdelBeit's full-sized avatar

Adele Beitvashahi AdelBeit

View GitHub Profile
const [firstName, lastName, domain] = process.argv.slice(2);
const generateEmails = (firstName, lastName, domain) => {
const patterns = [
`${firstName}.${lastName}`,
`${firstName}_${lastName}`,
`${firstName}`,
`${lastName}`,
`${firstName}.${lastName}.initial`, // Placeholder for initials
`${firstName[0]}.${lastName}`,
`${firstName[0]}_${lastName}`,
import axios from "axios";
import msgpack from "msgpack5";
import { Buffer } from "buffer";
const rootURL = "https://ciphersprint.pulley.com/";
const email = "adelbeitvashahi@gmail.com";
async function fetchNextEndpoint(encodedString, isFirstCall = true) {
const baseUrl = isFirstCall ? rootURL : rootURL + "task_";
let data;
try {
@AdelBeit
AdelBeit / Lazy-Stopwatch.html
Created November 12, 2023 01:54
A stop watch that can only count one second at a time before getting tired.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lazy Stopwatch</title>
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
#
# @lc app=leetcode id=217 lang=python3
#
# [217] Contains Duplicate
#
# @lc code=start
from typing import List
#
# @lc app=leetcode id=121 lang=python3
#
# [121] Best Time to Buy and Sell Stock
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=322 lang=python3
#
# [322] Coin Change
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=72 lang=python3
#
# [72] Edit Distance
#
# @lc code=start
class Solution:
def minDistance(self, word1: str, word2: str) -> int:
# dp bottom up O(m*n), space: O(m*n)
#
# @lc app=leetcode id=583 lang=python3
#
# [583] Delete Operation for Two Strings
#
# @lc code=start
class Solution:
def minDistance(self, word1: str, word2: str) -> int:
# dynamic programming bottom up O(n*m), space O(n*m)
#
# @lc app=leetcode id=1143 lang=python3
#
# [1143] Longest Common Subsequence
#
# @lc code=start
class Solution:
def longestCommonSubsequence(self, text1: str, text2: str) -> int:
# brute force: O(2^n * m) time
#
# @lc app=leetcode id=673 lang=python3
#
# [673] Number of Longest Increasing Subsequence
#
from collections import Counter
from typing import List
# @lc code=start