https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt4.QtGui import QImage, qRgb | |
import numpy as np | |
class NotImplementedException: | |
pass | |
gray_color_table = [qRgb(i, i, i) for i in range(256)] | |
def toQImage(im, copy=False): | |
if im is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.linuxbabe.com/ubuntu/install-nvidia-driver-ubuntu-18-04 | |
sudo ubuntu-drivers devices | |
sudo apt install nvidia-driver-version-number | |
sudo lshw -c display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
plt.plot(range(10)) | |
plt.tick_params( | |
axis='x', # changes apply to the x-axis | |
which='both', # both major and minor ticks are affected | |
bottom=False, # ticks along the bottom edge are off | |
top=False, # ticks along the top edge are off | |
labelbottom=False) # labels along the bottom edge are off | |
plt.show() | |
plt.savefig('plot') |
NVIDIA Readme (http://us.download.nvidia.com/XFree86/Linux-x86_64/418.56/README/index.html)
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inxi -F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xrandr | |
xrandr --output <display> --primary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enaml.widgets.api import Window, Container, PushButton, Timer | |
class StateMachine(object): | |
# normally handles some complicated view controller process | |
# but here we just want to listen for the timer timeout | |
def __init__(self, view): | |
self.view = view | |
self.timer = Timer() | |
self.timer.interval = 350 | |
self.timer.single_shot = True |