Skip to content

Instantly share code, notes, and snippets.

View kennethlove's full-sized avatar
🦀
Python

Kenneth Love kennethlove

🦀
Python
View GitHub Profile
@kennethlove
kennethlove / fairyfloss.vim
Created August 31, 2016 17:44 — forked from sonjapeterson/fairyfloss.vim
fairyfloss colorscheme for vim (converted from sailorhg's tmtheme: http://sailorhg.github.io/fairyfloss/)
" Vim color file
" Converted from sailorhg's original fairyfloss tmtheme (http://sailorhg.github.io/fairyfloss/)
" using Coloration v0.4.0 (http://github.com/sickill/coloration)
" To use in your vimrc: http://www.mkyong.com/linux/how-to-install-a-vim-color-scheme/
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
def create_deploys(self):
''' Separate out the deploys from the rest of the tasks section
and return them.
'''
# rdeploys = [step for step in self.tasks['tasks'] if 'rdepoy' in step]
return filter(lambda s: 'rdeploy' in s, self.tasks['tasks'])
import xml.etree.ElementTree as ET
def get_hosts(tree_root):
'''Takes an ETree root
For every sin in a given xml_file, return a list containing the FQDN.
'''
return [server.get('host') for server in tree_root.iter('sin')]
Traceback (most recent call last):
File "/Users/martin/Projects/md5checker/playground/md5checker/tests.py", line 15, in test_new_md5hash_derived_field
self.assertEqual(m.md5, md5)
AssertionError: '' != '9a618248b64db62d15b300a07b00580b'
+ 9a618248b64db62d15b300a07b00580b
def index(request):
if request.method == "GET":
return render_to_response('locations/index.html', {'nosearch': True})
elif request.method == "POST":
context = {}
result = Location.objects.filter(address=request.POST['address'])
loc = result.first()
context['loc'] = loc
context['services'] = _get_services(loc)
return render_to_response('locations/services.html', context)
#! /usr/bin/env python
pages = {
"start": {
"text": "It's a dark night outside. Somewhere a wolf howls.",
"prompt": "Where will you take shelter, the haunted house, or the bat "
"cave?",
"next": ("haunted house", "bat cave"),
},
"haunted house": {