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
# Write a function named "davasaan" (division with all vowels a) which calculates integer | |
# division by 10. The vowels "eiou" are disallowed as are the slash "/", asterisk "*", | |
# and period "." characters. | |
q=lambda f:lambda z:f(f(z)) | |
davasaan=lambda n:q(q(q)(q)(lambda t:t+map(lambda x:x+t[-1]+1,t)))([0,0,0,0,0])[n>>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
class Scope: | |
""" Implementation of scoping. Use it with `with` statement: | |
``` | |
with Scope() as s: | |
s.var = 10 | |
print(s.var) | |
``` | |
""" | |
def __init__(self): |
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
# fdisk /dev/sdY | |
create single partition type 7+bootable partition | |
# mkfs.ntfs -f /dev/sdY1 | |
# ms-sys -7 /dev/sdY | |
# mount -o loop win7.iso /mnt/iso | |
# mount /dev/sdY1 /mnt/usb | |
# cp -r /mnt/iso/* /mnt/usb/ |
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
# Definitions for header autolinking | |
DEPDIR := .d | |
$(shell mkdir -p $(DEPDIR) >/dev/null) | |
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td | |
COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c | |
COMPILE.cc = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c | |
POSTCOMPILE = @mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d && touch $@ | |
# Main part |