Skip to content

Instantly share code, notes, and snippets.

@RomaKoks
RomaKoks / New-GPUPDriverPackage.ps1
Created January 6, 2023 19:27 — forked from neggles/New-GPUPDriverPackage.ps1
Hyper-V GPU Virtualization
<#
.SYNOPSIS
Create a GPU-P Guest driver package.
.DESCRIPTION
Gathers the necessary files for a GPU-P enabled Windows guest to run.
.EXAMPLE
New-GPUPDriverPackage -DestinationPath '.'
.EXAMPLE
New-GPUPDriverPackage -Filter 'nvidia' -DestinationPath '.'
.INPUTS
@RomaKoks
RomaKoks / launch-kaggle-python-notebook.sh
Created June 6, 2022 10:04 — forked from andfanilo/launch-kaggle-python-notebook.sh
Run Jupyter notebook in a local kaggle/python docker container
docker run -v $PWD:/tmp/working -w=/tmp/working --rm -it -p 8888:8888 kaggle/python jupyter notebook --no-browser --ip=* --allow-root --NotebookApp.token="" --notebook-dir=/tmp/working
@RomaKoks
RomaKoks / cuda_10.1_installation_on_Ubuntu_18.04
Created November 24, 2020 22:07 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
CUDA 10.1 Installation on Ubuntu 18.04
#!/bin/bash
## This gist contains instructions about cuda v10.1 and cudnn 7.6 installation in Ubuntu 18.04 for Tensorflow 2.1.0
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
# -*- coding: utf-8 -*-
"""
Lyle Scott III
[email protected]
http://www.digitalfoo.net
CREDITS
This program was written by reading 'DES Algorithm Illustrated' over and over
and over. Thanks for this!
-- http://orlingrabbe.com/des.htm
from threading import Thread
import json
from subprocess import Popen, PIPE
import sys
import time
import subprocess
import psutil
import pika
import traceback
@RomaKoks
RomaKoks / saveFigure.m
Created October 10, 2016 11:16 — forked from corydolphin/saveFigure.m
Saving figures in MATLAB as full size, not cutoff. Gets around issue of cutting off Title, etc. Slightly slow, but it works. Damnit MATLAB graphics library.
function [ output_args ] = saveFigure( handle, fileName )
% saveFigure
% Saves figure specified by `handle` as `fileName` in fullscreen
% as to get around the stupid behavior.
screen_size = get(0, 'ScreenSize');
origSize = get(handle, 'Position'); % grab original on screen size
set(handle, 'Position', [0 0 screen_size(3) screen_size(4) ] ); %set to scren size
set(handle,'PaperPositionMode','auto') %set paper pos for printing
saveas(handle, fileName) % save figure