Skip to content

Instantly share code, notes, and snippets.

View justanhduc's full-sized avatar
:shipit:
Pythoning. Pytorching. And Githubing

Duc Nguyen justanhduc

:shipit:
Pythoning. Pytorching. And Githubing
View GitHub Profile
@sakamoto-poteko
sakamoto-poteko / nvml.cpp
Last active October 21, 2022 23:11
NVML Get GPU Utilization
#include <cstdio>
#include <nvml.h>
#pragma comment(lib, "nvml")
int main(int argc, char* argv[])
{
nvmlReturn_t result;
unsigned int device_count;
@chandlerprall
chandlerprall / threaded_download.py
Created June 9, 2011 17:41
Small Python multi-threaded file downloader
import urllib2
import threading
from Queue import Queue
import sys, os, re
class ThreadedDownload(object):
REGEX = {
'hostname_strip':re.compile('.*\..*?/', re.I)
}