Skip to content

Instantly share code, notes, and snippets.

View ryanmeasel's full-sized avatar

Ryan Measel ryanmeasel

View GitHub Profile
@ryanmeasel
ryanmeasel / ubuntu-16-04-LTS-tensorflow-gpu-gcp.md
Last active September 16, 2018 20:46
Setting up Tensorflow-gpu on a GCP VM

Overview

Installation instructions for setting up a GCP VM with Tensorflow-gpu.

Instructions

GCP VM Instance

  1. Select Compute Engine > VM Instances > Create Instance.
  2. Specify Name, Region, and Zone. Note, the zone must support GPU instances.
@ryanmeasel
ryanmeasel / pyenv_usage.md
Created July 26, 2018 16:58
Pyenv usage and troubleshooting

After updating pyenv (such as through a brew upgrade), run pyenv rehash to reset the shim routes. Otherwise, you get errors like:

/Users/[USER]/.pyenv/shims/python2: line 21: /usr/local/Cellar/pyenv/1.2.4/libexec/pyenv: No such file or directory

@ryanmeasel
ryanmeasel / loadingPointCloudsInUnity.md
Created May 22, 2018 19:55
Loading Point clouds in Unity
  • Import the PCX Unity Package.
  • Drag a PLY point cloud into the project. The plugin will automatically convert it to a GameObject. This takes some time during which Unity will hang. The resulting GameObject will be in the same directory as the PLY.
  • Add the GameObject to your scene.
  • If the point cloud is a right-handed coordinate frame, negate the scale of the Z axis to flip it to Unity's left-handed system. This parameter is accessible through the Transform component on the GameObject.
  • It may also be necessary to rotate 90 degrees around an axis depending on which axis is "up" in the point cloud coordinate frame.
@ryanmeasel
ryanmeasel / pclOsxPrimer.md
Last active May 22, 2018 00:40
PCL on OSX primer
  • Install: brew install pcl
  • Get install location: brew info pcl
  • Copy pcl_viewer into the path: cp $(PCL_INSTALL_DIR)/pcl_viewer.app/Contents/MacOS/pcl_viewer /usr/local/bin
  • Convert PLY to PCD: pcl_ply2pcd [INFILE] [OUTFILE]
  • View the point cloud in pcl viewer with point picking: pcl_viewer -use-point-picking [PCD_FILE]
  • To get the coordinates of a point, “SHIFT+CLICK” on a point. The coordinates are printed in the launching terminal.
@ryanmeasel
ryanmeasel / convertTextEncoding.sh
Created May 15, 2018 21:54
Convert file text encoding
# When you receive "warning: null character(s) ignore", there is a null byte hidden number in the source code.
# This is likely the result of creating a file in Visual Studio which defaults to UTF-16LE and trying to read
# it back as UTF8.
# To check text encoding of the file, run the following and retrieve the `charset`
file -I [FILE]
# To convert the file to UTF8 (or any other encoding)
iconv -f [CURRENT_ENCODING] -t UTF8 [FILE] > temp
mv temp [FILE]
@ryanmeasel
ryanmeasel / getWindowsProductKey.sh
Created March 8, 2018 04:59
Get product key from Windows install
# Run in powershell
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
@ryanmeasel
ryanmeasel / urlExtension.swift
Created March 5, 2018 21:33
URL extension to create a directory in the iOS documents directory
extension URL {
static func createDirectory(_ dirName: String) -> URL? {
let fileManager = FileManager.default
if let documentDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first {
let dirPath = documentDirectory.appendingPathComponent(dirName)
if !fileManager.fileExists(atPath: dirPath.path) {
do {
try fileManager.createDirectory(atPath: dirPath.path,
withIntermediateDirectories: true,
attributes: nil)