Skip to content

Instantly share code, notes, and snippets.

View greenpencil's full-sized avatar

Katie Fear-Paxton greenpencil

View GitHub Profile
library("jpeg")
gamma.correct <- function(color) {
if(color > 0.04045) {
return((color + 0.055) / (1.0 + 0.055) ^ 2.4)
} else {
return(color / 12.92)
}
}
files <- list.files("E:\\Downloads\\yarn")
pngList <- list()
for(filename in files){
tempPNG <- readJPEG(paste0("E:\\Downloads\\yarn\\",filename)) # Downloads & loads PNGs
pngList[[filename]] <- tempPNG # And assigns them to a list.
}
# Very simple dimension reduction -- just the mean R, G, and B values
meanRGB <- t(sapply(pngList, function(ll){
@greenpencil
greenpencil / Main.java
Created February 4, 2017 23:52
A general algorithm for finding inflection in text
package io.kpf;
import java.util.ArrayList;
import static java.lang.StrictMath.abs;
public class Main {
public static void main(String[] args) {
// input string, remove punctuation and spilt it

Keybase proof

I hereby claim:

  • I am greenpencil on github.
  • I am rapidbug (https://keybase.io/rapidbug) on keybase.
  • I have a public key whose fingerprint is AD1C C2B4 29A1 4E08 EF58 7E41 1348 0A31 D24D FE1F

To claim this, I am signing this object:

We can't make this file beautiful and searchable because it's too large.
"Age","AttendedBootcamp","BootcampFinish","BootcampFullJobAfter","BootcampLoanYesNo","BootcampMonthsAgo","BootcampName","BootcampPostSalary","BootcampRecommend","ChildrenNumber","CityPopulation","CodeEventBootcamp","CodeEventCoffee","CodeEventConferences","CodeEventDjangoGirls","CodeEventGameJam","CodeEventGirlDev","CodeEventHackathons","CodeEventMeetup","CodeEventNodeSchool","CodeEventNone","CodeEventOther","CodeEventRailsBridge","CodeEventRailsGirls","CodeEventStartUpWknd","CodeEventWomenCode","CodeEventWorkshop","CommuteTime","CountryCitizen","CountryLive","EmploymentField","EmploymentFieldOther","EmploymentStatus","EmploymentStatusOther","ExpectedEarning","FinanciallySupporting","Gender","HasChildren","HasDebt","HasFinancialDependents","HasHighSpdInternet","HasHomeMortgage","HasServedInMilitary","HasStudentDebt","HomeMortgageOwe","HoursLearning","ID.x","ID.y","Income","IsEthnicMinority","IsReceiveDiabilitiesBenefits","IsSoftwareDev","IsUnderEmployed","JobApplyWhen","JobPref","JobRelocateYesNo","JobRoleInt
We can't make this file beautiful and searchable because it's too large.
"Age","AttendedBootcamp","BootcampFinish","BootcampFullJobAfter","BootcampLoanYesNo","BootcampMonthsAgo","BootcampName","BootcampPostSalary","BootcampRecommend","ChildrenNumber","CityPopulation","CodeEventBootcamp","CodeEventCoffee","CodeEventConferences","CodeEventDjangoGirls","CodeEventGameJam","CodeEventGirlDev","CodeEventHackathons","CodeEventMeetup","CodeEventNodeSchool","CodeEventNone","CodeEventOther","CodeEventRailsBridge","CodeEventRailsGirls","CodeEventStartUpWknd","CodeEventWomenCode","CodeEventWorkshop","CommuteTime","CountryCitizen","CountryLive","EmploymentField","EmploymentFieldOther","EmploymentStatus","EmploymentStatusOther","ExpectedEarning","FinanciallySupporting","Gender","HasChildren","HasDebt","HasFinancialDependents","HasHighSpdInternet","HasHomeMortgage","HasServedInMilitary","HasStudentDebt","HomeMortgageOwe","HoursLearning","ID.x","ID.y","Income","IsEthnicMinority","IsReceiveDiabilitiesBenefits","IsSoftwareDev","IsUnderEmployed","JobApplyWhen","JobPref","JobRelocateYesNo","JobRoleInt
@greenpencil
greenpencil / zomp.css
Last active May 3, 2016 21:10
Zomp is a very important colour
.bg-zomp
{
background-color: #39A78E !important;
}
.bg-zompLight
{
background-color: #90C8FC !important;
}
.fg-zompLight