Skip to content

Instantly share code, notes, and snippets.

@hideojoho
hideojoho / 0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
Last active September 27, 2024 21:32
4 steps to get a docker running with GPU on Ubuntu 20.04

⚠️ The following instruction is written on 25 Jul 2020 (= old).

4 steps to get a docker running with GPU on Ubuntu 20.04

Environment

  • Ubuntu 20.04
  • CUDA 10.2
  • Docker Latest
@ThomasG77
ThomasG77 / README.md
Last active April 8, 2024 20:17
Run PyQGIS in Jupyter Notebook
@nockstarr
nockstarr / Readme.MD
Created March 22, 2020 16:33
Install moloch
@GAM3RG33K
GAM3RG33K / ReadMe.md
Created February 14, 2020 07:07
A Guide to setup and use Plantuml
@decrispell
decrispell / crop_geotiff.py
Last active October 16, 2024 05:18
quick and dirty geotiff crop using rasterio
import rasterio
# load the geotiff (a DSM in this case) and read the data - only one index in this case
dsm = rasterio.open(dsm_fname)
dsm_data = dsm.read()[0]
# crop the data
dsm_crop = dsm_data[min_y:min_y+height, min_x:min_x+width]
# make a copy of the geotiff metadata
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickoala
nickoala / gpspipe.md
Last active June 6, 2025 14:27
Log GPSD Outputs and Extract Lat/Lon

Log GPSD Outputs and Extract Lat/Lon

$ gpspipe -w             # log to stdout
$ gpspipe -w -o abc.log  # log to a file

To auto-log on startup, insert the following line to the file /etc/rc.local:

@louiskirsch
louiskirsch / pbt-tf.py
Created June 7, 2018 06:24
population-based-training-tensorflow
import tensorflow as tf
import tensorflow.contrib as tfc
import numpy as np
import matplotlib.pyplot as plt
import observations
from functools import lru_cache
tf.reset_default_graph()
train_data, test_data = observations.cifar10('data/cifar',)
@dholt
dholt / nvidia-docker-2.yml
Created April 9, 2018 16:59
Simple Ansible playbook for installing nvidia-docker-2 and setting it as the default runtime for Docker
- hosts: all
become: true
become_method: sudo
vars:
daemon_json:
bip: 192.168.99.1/24
default-runtime: nvidia
runtimes:
nvidia:
path: /usr/bin/nvidia-container-runtime
"""
Solving FrozenLake8x8 environment using Policy iteration.
Author : Moustafa Alzantot (malzantot@ucla.edu)
"""
import numpy as np
import gym
from gym import wrappers
def run_episode(env, policy, gamma = 1.0, render = False):