I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI
. uWSGI
talks tonginx
.
import einops | |
import torch | |
def vector_gather(vectors, indices): | |
""" | |
Gathers (batched) vectors according to indices. | |
Arguments: | |
vectors: Tensor[N, L, D] | |
indices: Tensor[N, K] or Tensor[N] |
Largest 1000 Cities in America | |
2013 popuation data - Biggest US Cities By Population | |
rank,city,state,population,2000-2013 growth | |
1,New York,New York,8405837,4.8% | |
2,Los Angeles,California,3884307,4.8% | |
3,Chicago,Illinois,2718782,-6.1% | |
4,Houston,Texas,2195914,11.0% | |
5,Philadelphia,Pennsylvania,1553165,2.6% |
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |