Skip to content

Instantly share code, notes, and snippets.

View luckylionheart's full-sized avatar
:octocat:
AWESOME DEVELOPER

0~_~0 luckylionheart

:octocat:
AWESOME DEVELOPER
View GitHub Profile
@luckylionheart
luckylionheart / program.py
Created November 18, 2024 15:50 — forked from Yatoom/program.py
Minion translator
from words import words
minionese_to_english = {v: k for k, v in words.items()}
def translate(sentence, minionese=False):
dictionary = words if not minionese else minionese_to_english
result = ""
for word in sentence.split(" "):
if word in dictionary.keys():
@luckylionheart
luckylionheart / build4123.sublime4.key
Created December 15, 2022 10:54 — forked from skoqaq/build4123.sublime4.key
Sublime Text 4 License Key
—– BEGIN LICENSE —–
Mifeng User
Single User License
EA7E-1184812
C0DAA9CD 6BE825B5 FF935692 1750523A
EDF59D3F A3BD6C96 F8D33866 3F1CCCEA
1C25BE4D 25B1C4CC 5110C20E 5246CC42
D232C83B C99CCC42 0E32890C B6CBF018
B1D4C178 2F9DDB16 ABAA74E5 95304BEF
9D0CCFA9 8AF8F8E2 1E0A955E 4771A576
function reverseInteger(input) {
let number = Math.abs(input); // holds a new copy of the absolute value of the input integer
let result = 0; // creates a result variable to hold the aggrigate of our while loop
while (number > 0) { // while the number is greater than 0 (simplified way of saying less than or equal to 1)
const lastDigit = number % 10; // each iteration runs modulo 10 on the number variable giving us the last digit
result = result * 10 + lastDigit; // sets result equal to itself multiplied by 10 plus the last digit
number = Math.floor(number / 10); // removes the last number for the next iteration
}