Skip to content

Instantly share code, notes, and snippets.

import argparse
import sys
import os.path
import trans #pip install trans
import time
import cv2
import math
import skimage
import numpy as np
# from https://stackoverflow.com/questions/32328179/opencv-3-0-python-lineiterator#
def createLineIterator(P1, P2, img):
"""
Produces and array that consists of the coordinates and intensities of each pixel in a line between two points
Parameters:
-P1: a numpy array that consists of the coordinate of the first point (x,y)
-P2: a numpy array that consists of the coordinate of the second point (x,y)
-img: the image being processed
library(tidyverse)
df <- data.frame(Group = c(rep("A", 7), rep("B", 7), rep("C", 7)),
Time = c(rep(c(1:7), 3)),
Result = c(100, 96.9, 85.1, 62.0, 30.7, 15.2, 9.6,
10.2, 14.8, 32.26, 45.85, 56.25, 70.1, 100,
100, 55.61, 3.26, -4.77, -7.21, -3.2, -5.6))
df %>%
filter(Group != "B") %>% # filter out B because fails NLS fitting
@bhive01
bhive01 / RGBpi.py
Last active January 23, 2017 23:46
#base packages
import os, sys
import errno
import datetime
import subprocess
from time import gmtime, strftime, sleep
#rPi packages
from picamera import PiCamera
import RPi.GPIO as GPIO
#base packages
import os, sys
import errno
import datetime
from time import gmtime, strftime, sleep
#rPi packages
from picamera import PiCamera
import RPi.GPIO as GPIO
#base packages
import os, sys
import errno
import datetime
from time import gmtime, strftime, sleep
#rPi packages
from picamera import PiCamera
import RPi.GPIO as GPIO
import os, sys # for deleting file
import subprocess # for sending file via SCP back to unit
import argparse #needed for getting filename from script run
# for taking the image
from time import sleep
from picamera import PiCamera
# construct the argument parse and parse the arguments
library(tibble)
shapes <-
tibble(
pch = c(1:20),
shape_name = c(
"circle",
"triangle",
"cross",
"x",
"diamond",
Brandons-iMac:~ brandonhurr$ otool -l /usr/local/opt/gdal2/lib/libgdal.20.dylib
/usr/local/opt/gdal2/lib/libgdal.20.dylib:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedfacf 16777223 3 0x00 6 53 4680 0x00118085
Load command 0
cmd LC_SEGMENT_64
cmdsize 632
segname __TEXT
vmaddr 0x0000000000000000
---
title: "fileIOinR"
author: "Brandon Hurr"
date: "May 12, 2017"
output: html_document
---
```{r setup, include=FALSE}
library(devtools)
library(iotools)