Random dense bipartite graphs and directed graphs with specified degrees