Entries

CreativeQ

2023 - Built with Javascript The original site is here I’ve been collecting various quotes for many years. One of my favorite genres has been quotes about creativity. In this project I had scraped Good Reads and looked for quotes that had anything to do with art and creativity. Stored them in a Postgres table. Created an API using ValTown from where I am using it to pass through when calling against the postgres instance. Right now it simply is a little tool to ponder on quotes.

Read more →

November 6, 2023

Cutting Images

The following is a little test module I was building in order to take some time and understand the OpenFrameworks APIs when it came to images.

Read more →

November 6, 2023

Genuary 2023

This was a slightly different year as I used Javascript for the first time… this was using all P5 for this work just to get a better hang of Javascript and all the various interesting ways it can be used. Genuary 2023 - Day 1 - Endless Loop Genuary 2023 - Day 2 - Made in 10 Minutes Genuary 2023 - Day 3 - Glitch Art Genuary 2023 - Day 4 - Intersections Genuary 2023 - Day 5 - Debug View Genuary 2023 - Day 7 - Favorite Album / Movie Palette Genuary 2023 - Day 8 - SDF Genuary 2023 - Day 9 - Plants Genuary 2023 - Day 11 - Supremism Genuary 2023 - Day 14 - Aesemic Genuary 2023 - Day 15 - Sine Waves Genuary 2023 - Day 16 - Reflection of a reflection Genuary 2023 - Day 12 - Tesselation Genuary 2023 - Day 13 - Learning Something New Genuary 2023 - Day 17 - The Grid Inside A Grid Inside A Grid Genuary 2023 - Day 18 - Definitely not a grid Genuary 2023 - Day 19 - Black and White Genuary 2023 - Day 20 - Art Deco Genuary 2023 - Day 21 - Persian Rug Genuary 2023 - Day 23 - More Moire Genuary 2023 - Day 22 - Shadows Genuary 2023 - Day 25 - Yayoi Kusama Genuary 2023 - Day 26 - My kid could have made it Genuary 2023 - Day 27 - In the style of Hilma Af Klint Genuary 2023 - Day 28 - Generative Poetry Genuary 2023 - Day 30 - Minimalism

Read more →

November 6, 2023

Synthetic Sequences

Observable Notebook Purpose: To blend biology with the arts as a way to teach simple concepts about DNA sequences and explore my curiosity to create a primitive synthetic system.

Read more →

November 6, 2023

Physical Calligraphy

The following work has been a bit of a reflection and getting away from the screen for a little bit. When working on a masters, working a full time job and then enjoying program. There becomes a point I need to get away from the work and take some time to do something more craftsmanlike. Calligraphy has been a practice of mine for many of years. You will find that there are a number of different forms that are built into each of the images. I’ll update with better images but for right now these are the ones that I have.

Read more →

February 10, 2023

Synthetic Sequences

You can find more on how it works here.

Read more →

February 10, 2023

Interview - Tyler Hobbs

Along the black sands, awaits the sun to bring forth the light to all and everyone. After staying overnight in our vehicle; we got up bright and early in order to catch the sun before it rose. It gave us the ability to take a wonderful early morning shot with blue skies. Even though the entire night was full of clouds.

Read more →

November 6, 2021

Determining Heartbeat from iPhone Camera

This was originally written up here.. here is the original repo on my Github I always thought this experiment was incredibly interesting. It was using something that I hadn’t even thought about this until I was an app on the phone before the Apple Watch. So I wanted to see if I could pull out the images, analyze the information so that I could determine the peaks in the Red color channel and pull out some of the information that could be used.

Read more →

November 6, 2016

Creative Sinkholes

Originally written in 2014 on Medium Believing that something is crap, is creative indigestion. It inhibits your power to create, sucks your soul’s happiness and breeds stress and rejection. It becomes a waste of time, rather than further develop. We discontinue this crap that we have mistaken as no creativity. This is a perception that needs to be overcome and dealt with. But how do you overcome? 1. Don’t Limit your Creativity As people we generally want to be like the Jones. This is inherent; we deem it necessary to survive in the vivacious world of competition. But,

Read more →

January 4, 2014

Blockchain Analytics

The following post provides some context around the many many different technologies that are currently out there in the blockchain space. Much of these are changing on a monthly basis with new things coming out all the time. So I thought it might be good to have a document that tries to compile what this landscape currently looks like in 2022. Value Store Blockchain Bitcoin - open source payment network Blockchains (Multipurpose) Ethereum The current most popular Solana Currently one of the rising stars in the space, there are many interesting projects that are currently being worked on. Wallets: Cardano “Cardano is a blockchain platform for changemakers, innovators, and visionaries, with the tools and technologies required to create possibility for the many, as well as the few, and bring about positive global change” Open Source File Store The following

Read more →

October 26, 2022

How to Create Generative Art

Following are 10 ways how to start learning how to make generative art. Learn how to use a framework or software for generative art. There are a number of different ways to do this. Here is a mindmap as a guide. I’d suggest just looking at them and start searching for them. Take a few art classes There are plenty of places online such as Domestika or Skillshare that will help you find inspiration, and open your mind to new ideas of expression. You can also find something in IRL in your city.

Read more →

October 26, 2022

Web3 Landscape (2022)

First of all, this continues to change and will be extremely interesting to work with over the next number of years. There are a number of interesting use cases ad much is about rethinking the web infrastructure. Wallets Metamask - Muun Security Coinbase - A marketplace L2 Blockchain Polygon - Finance Digital Collectables (NFTs) OpenSea - First and currently the foremost NFT platform supporting the ethereum and L2 Polygon chains

Read more →

October 26, 2022

Minimum Distance between a Point and a Line

This has been transcribed from an earlier post of the internet. I felt as though it might be good to rewrite and also include some of the information that is part of the This note describes the technique and gives the solution to finding the shortest distance from a point to a line or line segment. The equation of a line defined through two points \(P_1\) \((x1,y1)\) and \(P_2\) \((x2,y2)\) is

Read more →

February 20, 2021

Using Analytics to Determine Ideal Hashtags for Instagram

library(stringr) library(readr) library(tidyverse) library(lubridate) I have been curious on what makes an interesting post on instagram based on a larger dataset of images that have been tagged with #generativeart. Some of this is just data discovery, this could seem that there may be a correlation between the tags that have been used and the amount of likes there are.

Read more →

October 18, 2020

Introduction to NLP using Python

The following post is using SpaCy to do all of the NLP work. Throughout the following post we will cover a number of different NLP tasks that are foundational to the work that can be built upon to generate complex syntatical modelling. Tokenization This process takes any body of text (more specifically a Document) and breaks it down either to the sentence level or the word level.

Read more →

October 3, 2020

Bayesian Statistics in R

Bayesian Statistics The following documents the standard Bayesian Statistics occurs. Some of the key differences you will find behind the more traditional frequentist statistics and Bayesian methodologies are as follows: Prior statistical distributions are updated as new information becomes available.

Read more →

October 1, 2020

How to Catch Fraud with Deep Learning

Fraud continues to be an important topic in the financial world helping detect when funds are mismanaged. Nilson reports that U.S. card fraud (credit, debt, etc) was reportedly $9 billion in 2016 and expected to increase to $12 billion by 2020. Due to these nefarious acts; it is in the best interest of any organization to ensure the work of most customers. Thus it is appropriate to respond to this fraud.

Read more →

March 15, 2020

Formatting Currencies in R

Here are a few ways to format numbers in R for presentations. A few of theme can be accomplished using the paste function in R. I’ve found that there are a few different methods to do this. Using the scales package Using the scales packages from Hadley, there is a great function with various options including passing a vector. library(scales) dollar_format()(c(-100, 0.23, 1.456565, 2e3)) Formatting currency with separator Following is a simple function one can build and place in their utility function that will give formatted currency.

Read more →

August 21, 2018

How to bend the data

One of the fundamental priorities of a data scientist is being able to bend the data into a format that is plyable. Being able to effectively use tidyr, reshape2 and the core functions are key to success in being able to manage a large dataset without swimming or drowning in it. But it does take discipline and instinct to understand the validity of the data so lets exercise this a little:

Read more →

August 9, 2018

Phillips Hue in R

The following function can be used to find and display the internal IP address needed to retrieve the IP address from Hue Bridge. You will need to generate an API key i.e. a “userkey” as I called it below. getIP <- function() { url <- paste0("https://www.meethue.com/api/nupnp") res <- httpGET(url) resJson <- fromJSON(res) res <- resJson[["internalipaddress"]] res } In order to know what light you should change the state on, one can run the following to retrieve the available lights connected on the network.

Read more →

August 7, 2018

Simulate Doctor Visit Resource Planning Using Simmer

Here I’ve tried to come up with a simple layout on how we might simulate doctor’s visits. Following code tries to resource plan certain doctor visits based on the vignette that was provided with the simmer package. library(simmer) set.seed(42) env <- simmer("SuperDuperSim") env patient <- trajectory("patients' path") %>% ## add an intake activity seize("nurse", 1) %>% timeout(function() rnorm(1, 15)) %>% release("nurse", 1) %>% ## add a consultation activity seize("doctor", 1) %>% timeout(function() rnorm(1, 20)) %>% release("doctor", 1) %>% ## add a planning activity seize("administration", 1) %>% timeout(function() rnorm(1, 5)) %>% release("administration", 1) env %>% add_resource("nurse", 1) %>% add_resource("doctor", 2) %>% add_resource("administration", 1) %>% add_generator("patient", patient, function() rnorm(1, 10, 2)) env %>% run(80) %>% now() env %>% peek(3) env %>% stepn() %>% # 1 step print() %>% stepn(3) # 3 steps envs <- lapply(1:100, function(i) { simmer("SuperDuperSim") %>% add_resource("nurse", 1) %>% add_resource("doctor", 2) %>% add_resource("administration", 1) %>% add_generator("patient", patient, function() rnorm(1, 10, 2)) %>% run(80) }) envs %>% get_mon_resources() %>% head() envs %>% get_mon_arrivals() %>% head()

Read more →

August 7, 2018

Take Back Your Time (Evernote)

You will find the following text originally posted on Medium

Read more →

August 7, 2018

Time and Difficulty

Sometimes, seeing data in a 3 dimensional space gives us better visibility to the rest of the world. You will see that we have taken a hypothetical experiment and tried to rate different ideas by their complexity and likelihood to succeed. #Libraries to import library(tidyverse) library(plotly) # Intellectual matrix idea <- c("Build a spaceship","Create a new social platform", "Build a birdhouse","Collect 10000 friends", "Clip toenails","Build a spaceship","Create a new social platform", "Build a birdhouse","Collect 10000 friends","Build a spaceship","Create a new social platform", "Build a birdhouse","Collect 10000 friends","Build a spaceship","Create a new social platform", "Build a birdhouse","Collect 10000 friends") time <- c(5,5,2,3,1,5,5,2,3,5,5,2,3,1,5,5,2) difficulty <- c(5,4,2,3,1,5,4,2,3,5,5,2,3,1,5,5,2) favorability <- c(2,5,2,1,3,4,1,2,1,2,5,2,1,3,3,1,2) #Creates the dataframe dataset <- data.frame(Idea = idea, Time = time, Difficulty = difficulty, Favorable = favorability) # Creates the 3 dimension intellectual plot p <- plot_ly(dataset, x = ~Time, y = ~Difficulty, z = ~Favorable, color = ~Idea) %>% add_markers() %>% layout(title = "Intellectual Matrix", scene = list(xaxis = list(title = 'Length to Complete'), yaxis = list(title = 'Difficulty'), zaxis = list(title = 'Likability'))) p

Read more →

August 7, 2018

Minature Generative Art

Sometimes something simple can turn out to generate the most beautiful things. Following you will find a few lines of code that present a beautiful pattern. library(ggplot2) library(dplyr) Oval Curve n <- 300 t1 <- 1:n t0 <- seq(3,2*n+1,2) %% n t2 <- t0 + (t0 == 0)*n df <- data.frame(x = cos((t1-1)*2*pi/n), y = sin((t1-1)*2*pi/n), x2 = cos((t2-1)*2*pi/n), y2 = sin((t2-1)*2*pi/n)) ggplot(df,aes(x,y,xend = x2,yend = y2)) + geom_segment(alpha = .1) + theme_void() Wavy Weaving of Wonder seq(from=-10, to=10, by = 0.05) %>% expand.grid(x=., y=.) %>% ggplot(aes(x=(x+pi*sin(y)), y=(y+pi*sin(x)))) + geom_point(alpha=.1, shape=20, size=1, color="black")+ theme_void()

Read more →

January 8, 2018

Extracting Hyperlinks from an XSLX in R

In Progress install.packages("keras") library(keras) devtools::install_github("omarwagih/ggseqlogo") devtools::install_github("leonjessen/PepTools")

Read more →

January 4, 2018

Human Ingenuity and Speed

library(tidyverse) Data Building The first thing we need to understand is where we have come and where we are going. There is alot that has been done in the past couple years but we still have more.

Read more →

December 23, 2017

Words With Friends Musings

Words with Friends is a wonderful game full of #library(tidyverse) # IMport Data #filepath <- "~/Dropbox/Word Lists/WordsWithFriends/enable1-wwf-v4.0-wordlist.txt" #wwfList <- read_csv(filepath, col_names = FALSE) #wwfList %>% stringr::str('.ae.')

Read more →

December 3, 2017

Exploring the Book of Esther in the Tidy Verse

library(httr) library(tidytext) library(jsonlite) library(tidyverse) library(wordcloud) library(XML) source("~/keys.R") key <- biblia There is much to be learned in the form of writing and the relationship it has within and outside the text. The question we might want to ask is there a way to identify the story arc of the situation. Using spacy to tag all of the words will increase the likelyhood to better understand the

Read more →

November 30, 2017

Timeseries Analysis Using R and Advantager

Threw error due to the API In the past, the best way to get stock prices was to use either Google Finance or Yahoo Finance data streams. These have since become difficult to keep up to date and thus another outlet to get this information is AlphaVantager. Following is a simple R implementation to get up to date data. You will be able to thus use this to find the information.

Read more →

November 11, 2017

Text Generation

IN PROGRESSText Generation (Generative Texr) is a very interesting field of study. There are a number of different packages that help generate the lists of words to give the user a better understanding of the technology. Tracery The following Node library gives a structure which is used to generate random words that are assigned to lexical structure that is defined by the user. centar : { animal : ["wolf","bear","tiger","lion","snake","anteater"], fruit : ["banana","tomato","cherry","strawberry","starfruit"], said : ["purring", "whispering", "saying", "murmurring", "growling"], timeofday : ["morning","evening","dusk","dawn","afternoon","breakfast","breakfast"], lastSyl : "a ia ea u y en am is on an o io i el ios ax ox ix ex izz ius ian ean ekang anth".split(" "), vipTitle : ["Dr.", "Professor", "Lord", "Sir", "Captain", "His Majesty"], response : ["#animal# love #fruit##lastSyl#", "#animal# #said# at #timeofday#", "#lastSyl##lastSyl#"], "origin" : "<h3>#vipTitle# Watson, let me tell you of a #response#</h3>" } The following API

Read more →

November 3, 2017

Gantt Charts in R

In ProgressUsing timevis library(timevis) data <- data.frame( id = 1:4, content = c("Item one" , "Item two" ,"Ranged item", "Item four"), start = c("2016-01-10", "2016-01-11", "2016-01-20", "2016-02-14 15:00:00"), end = c(NA , NA, "2016-02-04", NA) ) timevis(data) Using DiagrammerR library(tidyr) library(dplyr) library(DiagrammeR) mermaid(" gantt dateFormat YYYY-MM-DD title A Very Nice Gantt Diagram section Basic Tasks This is completed :done, first_1, 2014-01-06, 2014-01-08 This is active :active, first_2, 2014-01-09, 3d Do this later : first_3, after first_2, 5d Do this after that : first_4, after first_3, 5d section Important Things Completed, critical task :crit, done, import_1, 2014-01-06,24h Also done, also critical :crit, done, import_2, after import_1, 2d Doing this important task now :crit, active, import_3, after import_2, 3d Next critical task :crit, import_4, after import_3, 5d section The Extras First extras :active, extras_1, after import_4, 3d Second helping : extras_2, after extras_1, 20h More of the extras : extras_3, after extras_1, 48h ") Using Plotly If you wanted to use a more

Read more →

October 17, 2017

Tips on Feature Engineering

Tips on Feature Engineering to fit how classifiers work; giving a geometry problem to a tree, oversized dimension to a kNN and interval data to an SVM are not a good ideas remove as much nonlinearities as possible; expecting that some classifier will do Fourier analysis inside is rather naive (even if, it will waste a lot of complexity there) make features generic to all objects so that some sampling in the chain won’t knock them out check previous works – often transformation used for visualisation or testing similar types of data is already tuned to uncover interesting aspects avoid unstable, optimizing transformations like PCA which may lead to overfitting experiment a lot

Read more →

October 8, 2017

Great Statistics Books to Read

Following you will find a number of the best books to learn more about statistics and its philosophy. Opinionated Lessons on Statistics Introduction to Statistical Learning The Elements of Statistical Learning Applied Predicitive Modeling Statistical Inference Statistical Rethinking Data Analysis Using Regression and Multilevel/Hierarchical Models Mostly Harmless Econometrics Mastering Metrics: The Path from Cause to Effect All of Statistics Statistics Statistics for Experimenters Think Bayes Computer Age Statistical Inference Think Stats Machine Learning for Hackers Probability and Statistics Statistical Evidence: A likelihood paradigm

Read more →

October 6, 2017

AB Testing in R from Scratch

Using Bayesian Systems Quantify the probability of all possibilites thus measuring risk insert institutional knowledge (add knowledge that changes the probability) learn in an online fashion A/B Testing with Approximate Bayesian Computation No mathematics required able to implement from scratch A/B Testing Measures and figures out the better design Approximate Bayesian Computation Generate a trial value for the thing we want to know (in this case its the conversion fraction of a layout) Simulate or data assuming the trail value, keep the trial value, otherwise discard it and try again If the simulation looks like the real data, keep the trial value, otherwise discard and try again Keep doing this until we’ve got lots of trial values that worked library(progress) library(ggplot2) library(reshape2) # Variables n_visitors_a <- 100 # number of visitors shown layout A n_conv_a <- 4 # number of vistors shown layout A who converted (4%) n_visitors_b <- 40 n_conv_b <- 2 Using Bayesian Systems

Read more →

September 29, 2017

Tips on Creating Effective and Functional Documentation in R

Just like any skill, there is a learning curve involved in creating effective communication. This involves the code written and the documentation of its usage. Writing functional code is a intricate thing to accomplish as a newbie. It takes time to know what is efficient and how to communicate it as such. Now, writing functional documentation is more complicated as there is a delicate balance between not reguritate what the code says, and giving usable pointers to the users on how a particular function was intended to be used. It also, keeps you in line as the coder practices by actively thinking about that balance. Thus you help yourself keeping it modular and simple. So here are a few tips on how to writing effective documentation.

Read more →

September 22, 2017

Tracking Change Improvements in Retail

In the ever changing world of retail; one always has to keep one step ahead of the competition and to engage with its customers. One of the best ways Formulate a test Implement Test Evaluate results Adjust the test Try again. These are all great ideas, but how do we truly watch tas things get better? library(qcc) library(xtable) library(SixSigma) library(qicharts) Cause and Effect Diagrams cManpower <- c("Recepcionist", "Record. Operator", "Storage operators") cMaterials <- c("Supplier", "Transport agency", "Packing") cMachines <- c("Compressor type", "Operation conditions", "Machine adjustment") cMethods <- c("Reception", "Transport method") cMeasurements <- c("Recording method", "Measurement appraisal") cGroups <- c("Manpower", "Materials", "Machines", "Methods", "Measurements") cEffect <- "Too high density" cause.and.effect( cause = list(Manpower = cManpower, Materials = cMaterials, Machines = cMachines, Methods = cMethods, Measurements = cMeasurements), effect = cEffect) ss.ceDiag( effect = cEffect, causes.gr <- cGroups, causes = list(cManpower, cMaterials, cMachines, cMethods, cMeasurements), main = "Cause-and-effect diagram", sub = "Pellets Density") Check Sheet data_checkSheet <- rbind( data.frame(Group = "Manpower", Cause = cManpower), data.frame(Group = "Machines", Cause = cMachines), data.frame(Group = "Materials", Cause = cMaterials), data.frame(Group = "Methods", Cause = cMethods), data.frame(Group = "Measurements", Cause = cMeasurements) ) data_checkSheet$A_supplier <- NA data_checkSheet$B_supplier <- NA data_checkSheet$C_supplier <- NA data_checkSheet Control Charts pdensity <- c(10.6817, 10.6040, 10.5709, 10.7858, 10.7668, 10.8101, 10.6905, 10.6079, 10.5724, 10.7736, 11.0921, 11.1023, 11.0934, 10.8530, 10.6774, 10.6712, 10.6935, 10.5669, 10.8002, 10.7607, 10.5470, 10.5555, 10.5705, 10.7723) myControlChart <- qcc(data = pdensity, type = "xbar.one") summary(myControlChart) Histogram hist(pdensity) par(bg = "gray95") hist(pdensity, main = "Histogram of pellets density - Sample #25", sub = "Data from ceramic process", xlab = expression("Density (g"/"cm"^3*")"), col = "steelblue", border = "white", lwd = 2, las = 1, bg = "gray") library(ggplot2) ggplot(data = data.frame(pdensity), aes(x = pdensity)) + geom_histogram(fill = "seagreen", colour = "lightgoldenrodyellow", binwidth = 0.2) + labs(title = "Histogram", x = expression("Density ("*g/cm^3*")"), y = "Frequency") Pareto Chart data_checkSheet$A_supplier <- c(2, 0, 0, 2, 1, 7, 1, 3, 6, 0, 1, 2, 0) data_checkSheet$B_supplier <- c(0, 0, 1, 1, 2, 1, 12, 1, 2, 1, 0, 0, 1) data_checkSheet$C_supplier <- c(0, 1, 0, 6, 0, 2, 2, 4, 3, 0, 1, 0, 2) data_checkSheet$Total <- data_checkSheet$A_supplier + data_checkSheet$B_supplier + data_checkSheet$C_supplier data_checkSheet data_pareto <- data_checkSheet[order( data_checkSheet$Total, decreasing = TRUE), ] par(mar = c(8, 4, 4, 2) + 0.1) barplot(height = data_pareto$Total, names.arg = data_pareto$Cause, las = 2, main = "Pareto chart for total causes") data_pareto2 <- data_pareto$Total names(data_pareto2) <- data_pareto$Cause pareto.chart(data = data_pareto2, main = "Out-of-control causes") library(qualityTools) paretoChart(x = data_pareto2, main = "Out-of-control causes") spreadvector <- rep(names(data_pareto2),times = data_pareto2) paretochart(spreadvector) x <- rep(LETTERS[1:9], c(256, 128, 64, 32, 16, 8, 4, 2, 1)) paretochart(x) Scatterplot set.seed(1234) ptemp <- - 140 + 15*pdensity + rnorm(24) plot(pdensity ~ ptemp, col = "gray40", pch = 20, main = "Pellets density vs. temperature", xlab = "Temperature (Celsius)", ylab = expression("Density ("*g/cm^3*")")) ##Stratification

Read more →

September 21, 2017

Rocket Propulsion

library(tidyverse) Accelerating force $$ F=mv_e $$ thrust of the rocket is expressed in terms of the *mass flow rate * m and the efficient exhaust velocity \(v_e\) $$ V = V_e\log_e\frac{M_0}{M} $$ $M_0$ - mass of the rocket at ignition $M$ - Current mass of the rocket

Read more →

June 5, 2017