This file contains 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
#!/bin/bash | |
### Recruiter reply | |
# | |
# A quick shortcut to generate reply messages to recruiters | |
# based in text files containing the following tags: | |
# | |
# {{recruiterName}} | |
# {{myName}} | |
# |
This file contains 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 xlrd | |
import json | |
# Example data extracted from: http://esa.un.org/unmigration/TIMSO2013/data/subsheets/UN_MigrantStockByOriginAndDestination_2013T10.xls | |
# Open the workbook | |
wb = xlrd.open_workbook('UN_MigrantStockByOriginAndDestination_2013T10.xls') | |
# Create migrate data structure | |
migrate = [] |
This file contains 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
/** | |
* Depth-first search tree | |
* @param {string} nodeName - Name of the node to find | |
* @param {object} tree - Node example: {name: 'a', children: [nodeA, nodeB, ...]} | |
* @return {object} Returns the node with the given name | |
*/ | |
function depthFirstSearch(nodeName, tree) { | |
if (tree.name === nodeName) { | |
return tree; //Node found | |
} else { |