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
| { | |
| "color_scheme": "Packages/Predawn/predawn.tmTheme", | |
| "draw_white_space": "selection", | |
| "ensure_newline_at_eof_on_save": true, | |
| "font_face": "MonteCarlo Fixed", | |
| "font_size": 12, | |
| "gutter": true, | |
| "ignored_packages": | |
| [ | |
| "Vintage" |
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 optparse import OptionParser, make_option | |
| if __name__ == "__main__": | |
| option_list = [ | |
| make_option("--debug", dest="debug_mode", | |
| action="store_true", default=True), | |
| make_option('-f', '--file', dest='source_file', type='str'), | |
| make_option('-c', '--count', dest='count', type='int', default=100) | |
| ] |
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 itertools import permutations, combinations | |
| from sys import argv | |
| try: | |
| SIZE = int(argv[1]) | |
| except IndexError: | |
| exit('Please specify the board size.') | |
| except ValueError: | |
| exit('Board size should be an integer.') | |
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
| function make_playlist(){ | |
| if [ $1 ] | |
| then | |
| find . | grep ".mp3" > "$1.playlist" | |
| else | |
| find . | grep ".mp3" > ".playlist" | |
| } | |
| function play_list(){ | |
| if [ $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
| # Source: http://masnun.com/2010/01/01/sending-mail-via-postfix-a-perfect-python-example.html | |
| import smtplib | |
| from email.MIMEMultipart import MIMEMultipart | |
| from email.MIMEBase import MIMEBase | |
| from email.MIMEText import MIMEText | |
| from email.Utils import COMMASPACE, formatdate | |
| from email import Encoders | |
| import os |
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
| You can use "git today" alias for listing your work | |
| git config --global alias.today "log --since=midnight --author='$(git config user.name)' --oneline" | |
| Be sure your username is set first! | |
| git config --global user.name "your_beautiful_username" |
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
| A warning occurred (42 apples) | |
| An error occurred |
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
| #!/bin/bash | |
| function _project_learn(){ | |
| if [ -z "$2" ] && [ "$1" "!=" "default" ] || [ -z "$1" ] | |
| then | |
| echo "Usage: template.sh learn NICKNAME PROJECTPATH" | |
| return 1 | |
| elif [ -d "$2" ] | |
| then | |
| cd "$2" | |
| if [ -f "$HOME/.project-structures/$1.zip" ] |
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 PIL import Image | |
| from random import choice, randrange | |
| from argparse import ArgumentParser | |
| parser = ArgumentParser() | |
| parser.add_argument('WIDTH', type=int) | |
| parser.add_argument('HEIGHT', type=int) | |
| parser.add_argument('OUTPUT', type=str) |
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 PIL import Image | |
| from argparse import ArgumentParser | |
| parser = ArgumentParser() | |
| parser.add_argument('--input', dest='input_file', type=str, required=True) | |
| parser.add_argument('--size', dest='pix_size', type=int, required=True) | |
| parser.add_argument('--output', dest='output_file', type=str, required=True) | |
| args = parser.parse_args() | |
| background_color = (255,)*3 |
OlderNewer