Skip to content

Instantly share code, notes, and snippets.

View Nithanaroy's full-sized avatar
🎯
Focusing

Nitin Pasumarthy Nithanaroy

🎯
Focusing
View GitHub Profile
VOCAB= ascii_uppercase+digits+punctuation+" \t\n"
#Change to CUDA to run using GPU
device = 'cpu'
def get_test_data(etfo):
text = etfo
text_tensor = torch.zeros(len(text), 1, dtype=torch.long)
text_tensor[:, 0] = torch.LongTensor([VOCAB.find(c) for c in text])
return text_tensor.to(device)
@eddarmitage
eddarmitage / InstallingGitUsingYum.md
Created March 8, 2012 14:03
Installing git on CentOS 5 using yum

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5: