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
| This gist I write, because I couldn't find step by step instructions | |
| how to install and start postgresql locally and not globally in the | |
| operating system (which would require sudo). | |
| I hope, this will help especially people new to postgresql! | |
| #################################### | |
| # create conda environment | |
| #################################### |
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
| #!/usr/bin/python3 | |
| from PIL import Image | |
| ASCII_CHARS = [ '#', '?', '%', '.', 'S', '+', '.', '*', ':', ',', '@'] | |
| def scale_image(image, new_width=100): | |
| """Resizes an image preserving the aspect ratio. | |
| """ | |
| (original_width, original_height) = image.size |
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
| from PyQt4 import QtGui, QtCore, uic | |
| def p(x): | |
| print x | |
| class MainWindow(QtGui.QMainWindow): | |
| def __init__(self): | |
| QtGui.QWidget.__init__(self) | |
| uic.loadUi('redirect.ui', self) |