Skip to content

Instantly share code, notes, and snippets.

View noslin005's full-sized avatar

Nilson Lopes noslin005

  • Source Code Corp.
  • United States of America
View GitHub Profile
@huitseeker
huitseeker / get_ccompute.py
Last active March 29, 2021 12:30
Find a CUDA compute capability from a GPU name programmatically
#!/usr/bin/env python
"""
Obtain the correspondence of a local GPU name to its cuda compute capability
Names match the output of nvidia-smi --query-gpu=gpu_name --format=csv,noheader
Usage:
----
./get_ccompute.py <GPU_NAME>
"""
@kirpit
kirpit / bash.py
Last active March 17, 2023 06:29
Enables to run subprocess commands in a different thread with TIMEOUT option!
#! /usr/bin/env python
import threading
import subprocess
import traceback
import shlex
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.