Skip to content

Instantly share code, notes, and snippets.

View redpoint13's full-sized avatar
๐Ÿ‘Š
I am groot.

Tony Shouse redpoint13

๐Ÿ‘Š
I am groot.
View GitHub Profile
@redpoint13
redpoint13 / install_nvidia_driver.md
Last active September 20, 2022 04:31 — forked from espoirMur/install_nvidia_driver.md
How I fix this issue NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

I had many driver installed I my virtual machine , so It was actually the reason why I was having the error.

To fix it I had first to remove all driver I have installed before using :

  • sudo apt purge nvidia-*

  • sudo apt update

  • sudo apt autoremove

After that I when a head and installed the latest version of it nvidia driver:

@redpoint13
redpoint13 / ubuntu-install-gcc-6
Created December 29, 2020 20:05 — forked from zuyu/ubuntu-install-gcc-6
Install gcc 6 on Ubuntu
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt-get update && \
sudo apt-get install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v
@redpoint13
redpoint13 / useful_pandas_snippets.py
Last active January 2, 2018 20:18 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!