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
| Vagrant::Config.run do |config| | |
| sshdir = "#{ENV['HOME']}/.ssh/" | |
| checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/lab/OpenStack/openstack-cookbooks") | |
| ip_prefix = (ENV['IP_PREFIX'] or "10.0.5.") | |
| mac_prefix = (ENV['MAC_PREFIX'] or "080027027") | |
| suffix = "100" | |
| ip = "#{ip_prefix}#{suffix}" | |
| config.vm.box = "oneiric" | |
| config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box" | |
| config.vm.customize ['modifyvm', :id, '--memory', '350'] |
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 pprint import pprint | |
| from urllib2 import urlopen | |
| from bs4 import BeautifulSoup | |
| soup = BeautifulSoup(urlopen("http://www.openstack.org/community/members/").read()) | |
| bullets = soup.find_all("li") | |
| affiliations = [x.text.split("(")[1].split(")")[0].lower().strip() | |
| for x in bullets if "(" in x.text] |
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 python3 | |
| import os | |
| import re | |
| import shutil | |
| import subprocess | |
| import sys | |
| import tempfile | |
| def system(*args, **kwargs): |
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
| Listing queues ... | |
| hipri 5 | |
| lopri 0 | |
| midpri 0 | |
| ...done. |
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 const, fragments, renderer | |
| class ContentPage(BasePage): | |
| """ | |
| Note that the BasePage class is not included in this | |
| example. It and its parent class manage template | |
| loading, slot-filling, etc. | |
| """ | |
| contentType = const.contentTypes["rst"] |
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 simple configuration file. | |
| """ | |
| cache = True | |
| debug = True |
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 twisted.internet import defer, reactor | |
| from twisted.web.client import getPage | |
| def listCallback(results): | |
| print results | |
| def finish(ign): | |
| reactor.stop() | |
| def test(): |
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/python | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| # script configuration | |
| if sys.platform == "darwin": | |
| MPLAYER_PATH = os.path.join( |
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/python | |
| import sys | |
| from ConfigParser import SafeConfigParser | |
| from twisted.internet import reactor | |
| from pyngfm.client import PingFMAsyncClient | |
| def checkMessage(message): |
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_list = shell.get_property("sourcelist") | |
| library, playlists = source_list.get_property("model") | |
| for child in library.iterchildren(): | |
| x1, pixbuf, name, source, pango_attrs, x2, x3, enum = child | |
| if name == "Import Errors": | |
| import_errors = source | |
| elif name == "Missing Files": | |
| missing_files = source | |
| fh = open("/tmp/missing_files.txt", "w+") |
OlderNewer