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
pop :: [a] -> [a] | |
pop [] = [] | |
pop (x:xs) = xs | |
compareWithBackspace :: String -> String -> Bool | |
compareWithBackspace xs ys = compare' s1 s2 | |
where s1 = buildStack xs | |
s2 = buildStack ys | |
buildStack :: String -> String |
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
getHalves :: Int -> [Int] | |
getHalves = takeWhile (/=0) . iterate (\x -> if x `mod` 2 == 0 then x `div` 2 else 0) | |
brokenCalc :: Int -> Int -> Int | |
brokenCalc s t = brokenCalc' 0 s t | |
brokenCalc' :: Int -> Int -> Int -> Int | |
brokenCalc' i s t | |
| s == t = i | |
| s `elem` halves = brokenCalc' i' (s*2) t |
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
l = ['a','a','b','b','b','c','c'] | |
compress :: [Char] -> [String] | |
compress l = group l >>= (\x -> [take 1 x, show $ length x]) | |
main = do | |
putStrLn . show $ compress l |
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
undefined8 FUN_00100820(void) | |
{ | |
char cVar1; | |
int iVar2; | |
int iVar3; | |
int iVar4; | |
ulong uVar5; | |
size_t sVar6; | |
long lVar7; |
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
obj-m = legit.o | |
KVERSION = $(shell uname -r) | |
all: | |
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean |
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 qualified Data.Map.Lazy as M | |
import qualified Data.Set as S | |
import Data.Maybe (fromJust) | |
getOrbits :: String -> M.Map String String -> S.Set String | |
getOrbits obj m | |
| body == Nothing = S.empty | |
| otherwise = S.insert (fromJust body) $ getOrbits (fromJust body) m | |
where body = M.lookup obj m |
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
['sunflower multigrain bagel', 'icedream cone', 'lemonade', 'buttered biscuit'] | |
['sunflower multigrain bagel', 'icedream cone', 'buttered biscuit', 'lemonade'] | |
['sunflower multigrain bagel', 'chocolate chunk cookie', 'hash browns', "buddy's apple sauce"] | |
['sunflower multigrain bagel', 'chocolate chunk cookie', 'chocolate chunk cookie', 'ice tea/soda/bottled water'] | |
['sunflower multigrain bagel', 'chocolate chunk cookie', 'ice tea/soda/bottled water', 'chocolate chunk cookie'] | |
['sunflower multigrain bagel', 'chocolate chunk cookie', 'white peach tea lemonade', 'buttered biscuit'] | |
['sunflower multigrain bagel', 'chocolate chunk cookie', 'buttered biscuit', 'white peach tea lemonade'] | |
['sunflower multigrain bagel', 'apple juice', 'lemonade', 'buttered biscuit'] | |
['sunflower multigrain bagel', 'apple juice', 'buttered biscuit', 'lemonade'] | |
['sunflower multigrain bagel', 'chocolate milk/milk', 'lemonade', 'buttered biscuit'] |
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
['bacon/sausage egg cheese biscuit', 'frosted lemonade/coffee/sunrise/milkshake'] | |
['sunflower multigrain bagel', 'sunflower multigrain bagel', 'hash browns', 'chocolate chunk cookie'] | |
['sunflower multigrain bagel', 'sunflower multigrain bagel', 'chocolate chunk cookie', 'hash browns'] | |
['sunflower multigrain bagel', 'hash browns', 'sunflower multigrain bagel', 'chocolate chunk cookie'] | |
['sunflower multigrain bagel', 'hash browns', 'chocolate chunk cookie', 'sunflower multigrain bagel'] | |
['sunflower multigrain bagel', 'hash browns', "buddy's apple sauce", 'icedream cone'] | |
['sunflower multigrain bagel', 'hash browns', "buddy's apple sauce", 'apple juice'] | |
['sunflower multigrain bagel', 'hash browns', "buddy's apple sauce", 'chocolate milk/milk'] | |
['sunflower multigrain bagel', 'icedream cone', 'chocolate chunk cookie', 'ice tea/soda/bottled water'] | |
['sunflower multigrain bagel', 'icedream cone', 'ice tea/soda/bottled water', 'chocolate chunk cookie'] |
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
['icedream cone', 'buttered biscuit', 'icedream cone', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'apple juice', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'chocolate milk/milk', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'icedream cone', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'apple juice', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'chocolate milk/milk', 'buttered biscuit', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit', 'icedream cone', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit', 'apple juice', 'buttered biscuit'] | |
['icedream cone', 'buttered biscuit', 'buttered biscuit', 'buttered biscuit', 'chocolate milk/milk |
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 copy | |
menu = {"4 chick-n-minis": 3.35, | |
"egg white grill": 3.79, | |
"bacon/sausage egg cheese biscuit": 2.95, | |
"buttered biscuit": 0.99, | |
"sunflower multigrain bagel": 1.95, | |
"hash browns": 1.15, | |
"greek yogurt parfait": 3.35, | |
"fruit cup": 3.09, |