Instantly share code, notes, and snippets.

View gardentrix.R
library(openxlsx)
library(readxl)
library(Hmisc)
library(tidyverse)
#write out the iris dataset
# write.xlsx(iris, "iris.xlsx") just to show you how
# read in a dataset from excel
iris2 <- read_excel("iris.xlsx") # this assumes it's in R's working directory (the one it boots up with)
View SuzanmapPlots.Rmd
title author date output
Untitled
Brandon Hurr
4/18/2018
beamer_presentation
latex_engine
xelatex
View see3cam_good_np_slicing.py
# TESTING HARDWARE
# see3CAM_CU40
# raspberry Pi 3 bf8
# Raspbian Stretch 13-03-2018
# Python 3.5.3
# OpenCV 3.4.1
# load required libraries
import math
import numpy as np
View see3cam_good.py
# TESTING HARDWARE
# see3CAM_CU40
# raspberry Pi 3 bf8
# Raspbian Stretch 13-03-2018
# Python 3.5.3
# OpenCV 3.4.1
# load required libraries
import math
import numpy as np
View see3cam_test.py
import math
import numpy as np
import cv2
cam = cv2.VideoCapture(0)
cam.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
cam.set(cv2.CAP_PROP_CONVERT_RGB, False) # turn off RGB conversion
# cam.set(cv2.CAP_PROP_FOURCC('Y', '1', '6', ''))
View see3cam_test.py
import math
import numpy as np
import cv2
cam = cv2.VideoCapture(0)
cam.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
cam.set(cv2.CAP_PROP_CONVERT_RGB, False) # turn off RGB conversion
# cam.set(cv2.CAP_PROP_FOURCC('Y', '1', '6', ''))
View Install_proc.txt
Building Opencv to add custom format support:
###############################################
Prerequisites:
--------------
opencv source - Download the required opencv version for Linux with the
following link. (http://opencv.org/downloads.html)
Dependencies :
View RGB2all.R
RGB2All<-function (data=RGB, R="R", G="G", B="B", name.ext="", deg.obs=2, illum="C"){
#Setting up variables in dataframe
data[[paste("X", name.ext, sep="")]]<-NA
data[[paste("Y", name.ext, sep="")]]<-NA
data[[paste("Z", name.ext, sep="")]]<-NA
data[[paste("L", name.ext, sep="")]]<-NA
data[[paste("a", name.ext, sep="")]]<-NA
data[[paste("b", name.ext, sep="")]]<-NA
View lab2all.R
Lab2All<-function(data=Lab, L="L", a="a", b="b", name.ext="", deg.obs=2, illum="C"){
#Setting up variables in dataframe
data[[paste("C", name.ext, sep="")]]<-NA
data[[paste("H", name.ext, sep="")]]<-NA
data[[paste("X", name.ext, sep="")]]<-NA
data[[paste("Y", name.ext, sep="")]]<-NA
data[[paste("Z", name.ext, sep="")]]<-NA
data[[paste("R", name.ext, sep="")]]<-NA
data[[paste("G", name.ext, sep="")]]<-NA
View functionalize_attempt.R
library(tidyverse)
project_two <- readr::read_csv(
'ID, GROUP, value1, value2
1 , 1, 1, 1
1 , 1, 1, 2
2 , 1, 2, 1
2 , 1, 2, 2
1 , 2, 3, 1
1 , 2, 3, 2