Skip to content

Instantly share code, notes, and snippets.

View ruarai's full-sized avatar

Ruarai Tobin ruarai

View GitHub Profile
StatLineribbonFast <- ggproto("StatLineribbonFast", ggdist:::StatLineribbon,
compute_panel = function(self, data, scales, .width = c(0.5, 0.8, 0.95), na.rm = FALSE, ...) {
if (nrow(data) == 0) return(data.frame())
lower_probs <- (1 - .width) / 2
upper_probs <- 1 - lower_probs
probs <- sort(unique(c(0.5, lower_probs, upper_probs)))
xs <- unique(data$x)
@ruarai
ruarai / substringfind.py
Created April 9, 2017 10:50
Tries to find the value of a string through only direct comparison and sub string presence using a dynamic programming technique. Unsure if actually better.
def main():
password = "45kgm9gfinkqocip40twm4"
alphabet = set("abcdefghijklmnopqrstuvwxyz123456790")
print("password is len: " + str(len(password)))
find(password, alphabet, 1, 0)
print(26**len(password))
def find(password, alphabet, minLen, i):
print(alphabet)
@ruarai
ruarai / SteganographicNoise.cs
Created January 8, 2015 08:25
Steganographic Noise
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteganographicNoise
{
@ruarai
ruarai / Steganography.cs
Created January 8, 2015 03:21
Steganography of big text files.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FearImageSteganography