Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| Go at Heroku | |
| http://blog.golang.org/2011/04/go-at-heroku.html | |
| Why you PHP guys should learn Golang | |
| http://www.mikespook.com/2012/08/why-you-php-guys-should-learn-golang/ | |
| Go at CloudFlare | |
| http://blog.cloudflare.com/go-at-cloudflare | |
| Go at Moovweb |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/usr/bin/env python | |
| # | |
| # Copyright 2012 by Jeff Laughlin Consulting LLC | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| serList <- function(serlist){ | |
| ## Function to serialize list of R objects and returns a dataframe. | |
| ## The argument is a list of R objects. | |
| ## The function returns a serialized list with two elements. | |
| ## The first element is count of the elements in the input list. | |
| ## The second element, called payload, containts the input list. | |
| ## If the serialization fails, the first element will have a value of 0, | |
| ## and the payload will be NA. | |
| ## Messages to use in case an error is encountered. |