Skip to content

Instantly share code, notes, and snippets.

View pollend's full-sized avatar
:octocat:
working on random stuff

Michael Pollind pollend

:octocat:
working on random stuff
View GitHub Profile
{
"name": "wos_scraper_nightmare",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"nightmare": "^2.10.0",
"vo": "^4.0.2"
}
}
@pollend
pollend / a.m
Last active February 21, 2018 05:44
image = imread('mammogram.jpg');
single = reshape(image, 1, []);
freq = [1:255];
index = [1:255];
for n = 1:255
freq(n) = length(find(single == n));
end
fprintf("AOD: "+mean(single))
from = double(imread('Cat.jpg'));
to = double(imread('Moon.jpg'));
h = figure;
image = imshow(uint8(from));
max = 30;
for i = 0:max
output = uint8(from + (((to - from)/max) * i));
set(image,'CData',output);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// MPU-6050 Short Example Sketch
// By Arduino User JohnChi
// August 17, 2014
// Public Domain
#include<Wire.h>
const int MPU_addr=0x68; // I2C address of the MPU-6050
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
void setup(){
Wire.begin();
Wire.beginTransmission(MPU_addr);
@pollend
pollend / 4.10.R
Last active February 22, 2018 20:01
CS 770 Time Series Analysis: With Applications in R; Jonathan D. Cryer and Kung-Sik Chan (2010),
# Exercise 4.10
# Sketch the autocorrelation functions for each of the following ARMA models:
# (a) ARMA(1,1) with φ = 0.7 and θ = 0.4.
# (b) ARMA(1,1) with φ = 0.7 and θ = −0.4.
noise <- rnorm(5000)
a1 <- list();
a1 <- append(a1,0)
for (i in 2:500){
@pollend
pollend / TimeSeries.ipynb
Created February 22, 2018 22:31
CS 770 Time Series Analysis: With Applications in R; Jonathan D. Cryer and Kung-Sik Chan (2010),
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%http://kaiminghe.com/cvpr09/comparisons.html
%http://www.meo.etc.upt.ro/AncutiProjectPages/D_Hazzy_ICIP2016/
image = imread('./images_final/6.png');
hsv_image = rgb2hsv(image);
[sizex, sizey] = size(image);
//https://learn.sparkfun.com/tutorials/adxl345-hookup-guide?_ga=2.177813293.909090722.1520369868-1434341825.1513622359
#include <SparkFun_ADXL345.h>
/*********** COMMUNICATION SELECTION ***********/
/* Comment Out The One You Are Not Using */
//ADXL345 adxl = ADXL345(10); // USE FOR SPI COMMUNICATION, ADXL345(CS_PIN);
ADXL345 adxl = ADXL345(); // USE FOR I2C COMMUNICATION
/******************** SETUP ********************/
/* Configure ADXL345 Settings */
/*********************************************************************
This is an example for our nRF8001 Bluetooth Low Energy Breakout
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/products/1697
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!