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 common_substr(strs, return_diffs=False): | |
| """ | |
| >>> common_substr("abcd", "xbcd") | |
| 'bcd' | |
| """ | |
| strs = list(strs) | |
| min_len = min(map(len, strs)) | |
| max_len = max(map(len, strs)) | |
| first = strs[0] | |
| comm = type(first)() |
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
| .PHONY: all clean evaluate downloaddata torch | |
| SHELL:=bash -l | |
| ######################################################################## | |
| # Makefile to download, install and run VQA evaluation (and training) code https://github.com/VT-vision-lab/VQA_LSTM_CNN | |
| # Usage: | |
| # make evaluate # Runs evaluation code from downloaded models | |
| # make downloaddata # Downloads MSCOCO dataset to required directory format | |
| # make evaluate DO_TRAINING=1 # Runs training code before evaluation | |
| # make clean # Removes the downloaded models |
NewerOlder