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 | |
| # Convert a mysql dump into a sqlite-compatible format. | |
| # I wrote this for just one script... no guarantess that it will work with others... | |
| # python fsql.py < mysqldump.sql > readyforsqlite.sql | |
| import re | |
| import sys | |
| content = sys.stdin.read() |
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 | |
| import sys | |
| import os | |
| import ssl | |
| try: | |
| import cloudfiles | |
| except ImportError: | |
| sys.exit("cloudfiles module missing. Please install before running.") | |
| try: |
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
| # Delete all contents of a Cloud Files container | |
| import cloudfiles | |
| username = '' | |
| key = '' | |
| containerName = '' | |
| connection = cloudfiles.get_connection(username,key) | |
| container = connection.create_container(containerName) |
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
| [autorun] | |
| open=batch_install.bat |
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
| ## Written for Python 2.7.3 | |
| ## Anthony Allan | |
| ## Free to use and reproduce | |
| ## This script is built for batch uploading | |
| ## files to your Rackspace Cloud Files account. | |
| ## Requires bindings for cloudfiles found here, | |
| ## https://github.com/rackspace/python-cloudfiles | |
| # os, sys, and msvcrt are default libraries |
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
| def get_fib(n, start): | |
| '''(int, int) -> int | |
| Returns the nth Fibonacci number where start defines whether the squence | |
| starts at 0 or 1 and n is a whole number greater than or equal to 1 | |
| >>>get_fib(1,0) | |
| 0 | |
| >>>get_fib(1,1) | |
| 1 |