http://files.vagrantup.com/packages/7ec0ee1d00a916f80b109a298bab08e391945243/vagrant_1.2.7_i686.deb
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
| ## | |
| # Script to copy files and compress them and put them in a separate location | |
| # Amit Sengupta, Sep 2015, HYD | |
| # Written in Python 2.7 | |
| ### | |
| import os | |
| import zipfile | |
| import shutil |
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
| import math | |
| def convertSize(size): | |
| if (size == 0): | |
| return '0B' | |
| size_name = ("KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") | |
| i = int(math.floor(math.log(size,1024))) | |
| p = math.pow(1024,i) | |
| s = round(size/p,2) | |
| return '%s %s' % (s,size_name[i]) |
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/env python | |
| def list_to_dict(pages): | |
| return {page['name']: page for page in pages} | |
| def convert_bookmarks(bookmarks): | |
| for root, directory in bookmarks['roots'].iteritems(): | |
| directory['children'] = list_to_dict(directory['children']) | |
| if __name__ == '__main__': |
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
| import pygame | |
| class Player(object): | |
| def __init__(self, localmp3): | |
| self.localmp3 = localmp3 | |
| self.play() | |
| def play(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
| """ Tumblr API Example - Python CLI | |
| """ | |
| import oauth2 | |
| import urlparse | |
| import pytumblr | |
| REQUEST_TOKEN_URL = 'http://www.tumblr.com/oauth/request_token' | |
| AUTHORIZATION_URL = 'http://www.tumblr.com/oauth/authorize' | |
| ACCESS_TOKEN_URL = 'http://www.tumblr.com/oauth/access_token' |
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/env python | |
| # Module : SysTrayIcon.py | |
| # Synopsis : Windows System tray icon. | |
| # Programmer : Simon Brunning - simon@brunningonline.net | |
| # Date : 11 April 2005 | |
| # Notes : Based on (i.e. ripped off from) Mark Hammond's | |
| # win32gui_taskbar.py and win32gui_menu.py demos from PyWin32 | |
| '''TODO | |
| For now, the demo at the bottom shows how to use it...''' |
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
| https://wxpython.org/Phoenix/snapshot-builds/ | |
| wget -c https://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2755+968784d.tar.gz | |
| tar -vzxf wxPython_Phoenix-3.0.3.dev2759+07a7440.tar.gz | |
| sudo pip install -r requirements.txt | |
| sudo python3.6 build.py build install --python=/usr/bin/python3.6 |