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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
from os.path import abspath, exists | |
def appendToFile(filename, content): | |
f_path = abspath(filename) | |
mode = 'r+' if exists(f_path) else 'a+' | |
with open(f_path, mode) as f: | |
txt = f.read() | |
f.write(content+'\n') | |
# Example Usage |
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
def makePyramid(height=50, char='.'): | |
#Takes a height and generates a pretty pyramid, can optionally supply a character from which to make pyramid | |
for i in range(0,height): | |
print( (height-1-i)*' '+char*(i*2+1)) | |
def makeAwkwardPyramid(height=50, middle=' ', left='/', right='\\', bottom='-'): | |
#Like the other one but fancier. | |
for i in range(0,height): | |
print((height-1-i)*' '+left+middle*(i*2)+right) |
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
function Widget(el) { | |
} | |
Widget.prototype = { | |
_onchangehandlers: [], | |
_value: 0, | |
set onchange(handler) { |