Skip to content

Instantly share code, notes, and snippets.

@aivuk
aivuk / ml.r
Last active December 16, 2015 23:47
library(plyr)
library(ggplot2)
x <- data.frame(a=runif(100,0,1),b=runif(100,0,1),c=runif(100,0,1),d=runif(100,0,1))
y <- data.frame(a=runif(5,0,1),b=runif(5,0,1),c=runif(5,0,1),d=runif(5,0,1))
df <- rbind(x,y)
df['idx'] <- seq(1,nrow(df))
mdf <- melt(df, id.vars = 'idx')
colors <- c(laply(seq(0, 1, 1/(nrow(x) - 1)), function(x) rgb(0,0,0,x)), rep('#FF0000', nrow(y)))
mdf['color'] <- rep(colors, length(x))

Keybase proof

I hereby claim:

  • I am aivuk on github.
  • I am aivuk (https://keybase.io/aivuk) on keybase.
  • I have a public key whose fingerprint is 9A00 C288 92E6 1CA8 871A 6A1E 28F1 57A8 FA68 A0AF

To claim this, I am signing this object:

@aivuk
aivuk / README.md
Created June 16, 2017 11:52
berlin names

README is empty

Verifying my Blockstack ID is secured with the address 1FkSUS9k75aLof4hYQEaQUsv5K6vSaNG3q https://explorer.blockstack.org/address/1FkSUS9k75aLof4hYQEaQUsv5K6vSaNG3q
print("hello world")
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from frictionless import Detector
import line_profiler
lp = line_profiler.LineProfiler()
def test_schema_from_synthetic_sparse_sample(confidence):
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Time,Headline,Year,End Year,Text,Media,Place,Location,Location_Original,Source,Source URL
,"Damian, Peter",1007,1072,"Saint Peter Damian, O.S.B. (Petrus Damiani, also Pietro Damiani or Pier Damiani; c. 1007 – February 21/22, 1072) was a reforming monk in the circle of Pope Gregory VII and a cardinal. In 1823, he was declared a Doctor of the Church. Dante placed him in one of the highest circles of Paradiso as a great predecessor of Saint Francis of Assisi.",http://upload.wikimedia.org/wikipedia/commons/4/4e/Peter_Damian_bust.JPG,"Tuscany, Italy","43.4586541,11.1389204","43.4586541,11.1389204",Wikipedia,
,Anselm,1033,1109,"Anselm of Canterbury (c. 1033 – 21 April 1109), also called of Aosta for his birthplace, and of Bec for his home monastery, was a Benedictine monk, a philosopher, and a prelate of the Church who held the office of Archbishop of Canterbury from 1093 to 1109. Called the founder of scholasticism, he has been a major influence in Western theology and is famous as the originator of the ontologica