Skip to content

Instantly share code, notes, and snippets.

View r-or's full-sized avatar

Tobias Däullary r-or

View GitHub Profile
@r-or
r-or / Ubuntu 18.04 with Nvidia+CUDA on Optimus Laptop.md
Created January 13, 2022 07:15 — forked from hemenkapadia/Ubuntu 18.04 with Nvidia+CUDA on Optimus Laptop.md
[Ubuntu 18.04 with Nvidia+CUDA on Optimus Laptop] Setting up Ubuntu 18.04 with nvidia drivers and CUDA for data science on Dell 7559 Optimus laptop #Ubuntu #Nvidia #CUDA #setup

Kernel settings for installation

Use a live usb to try Ubuntu before installing. Boot from the live usb. On the GRUB screen highlight the "Try Ubuntu ...." option and press e. Update kernel parameters by adding options before quiet splash such that the line should read as below

nogpumanager nomodeset i915.modeset=1 quiet splash

Note: On HighDPI screen machines there is a known issue whereby Ubiquity (ubuntu installer) craashes at the copying files step i.e. immediatly after the user setup screen. The cause and workaround are discussed in other gist post

Persist GRUB configuration

Post installation, to avoid updating the above mentioned kernel options each time the system is booted, edit GRUB configuration file sudo vi /etc/default/grub and make th

@r-or
r-or / test_ov.py
Last active March 30, 2020 05:36
Comparison: tensorflow vs. openvino including performance
# This shows the difference between vanilla tensorflow and openvino --
# requires https://github.com/r-or/deep_sort/tree/openvino
# and all dependencies
import timeit
import math
from openvino.inference_engine import IENetwork, IEPlugin
import numpy as np
import tensorflow as tf
@r-or
r-or / testenv.py
Created February 2, 2019 11:49
testenv-windows-com
#!/usr/bin/env python
import os
import traceback
import win32com.client
import multiprocessing
def get_components(workbook):
vbaProj = workbook.VBProject
return [(vbaProj.VBComponents(k).Name, vbaProj.VBComponents(k)) \
for k in range(1, vbaProj.VBComponents.Count + 1)]