Skip to content

Instantly share code, notes, and snippets.

View AkselA's full-sized avatar
💭
bugging/debugging

Aksel AkselA

💭
bugging/debugging
  • Sandnes, Norway
View GitHub Profile
@AkselA
AkselA / bees.csv
Last active December 1, 2017 01:00
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 31 columns, instead of 32. in line 1.
"Length.1","Length.2","Length.3","Length.4","Length.5","Length.6","Length.7","Length.8","Length.9","Length.10","Length.11","Length.12","Length.13","Length.14","Length.15","Length.16","Length.17","Length0.18","Length0.19","Length0.20","Length0.21","Length0.22","Length0.23","Length0.24","Length.25","OBJECTID","Local","Elevation","Longitude","Latitude","Cubital.Index"
"1",1.34027674,2.22874178,0.5618240909,0.375837,0.7405138174,0.155350813,0.5223582257,0.4960882816,1.268243108,0.2938751157,0.218284956,0.3658145874,0.7859016312,0.5532996194,0.1960315579,0.4962563372,0.3474092682,0.3994674334,0.6068361036,0.2444888953,0.4933674624,0.2485958037,0.2604826492,0.9525956479,0.8397589926,"Amedbad","North India",46,72.39169,23.101,3.36244281965876
"2",1.493866624,2.409750235,0.5071125952,0.4646186551,0.7654383678,0.170172,0.4713034721,0.506671781,1.297404354,0.277608142,0.29896173,0.3470081653,0.8655574579,0.5553168868,0.2123470262,0.5700691447,0.3988927061,0.3502448632,0.6902876798,0.2039195147,0.5755498609,0.2393561621
@AkselA
AkselA / bees2.csv
Last active December 2, 2017 19:37
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 34 columns, instead of 35. in line 1.
"Length.1","Length.2","Length.3","Length.4","Length.5","Length.6","Length.7","Length.8","Length.9","Length.10","Length.11","Length.12","Length.13","Length.14","Length.15","Length.16","Length.17","Length0.18","Length0.19","Length0.20","Length0.21","Length0.22","Length0.23","Length0.24","Length.25","OBJECTID","Local","Elevation","Longitude","Latitude","Cubital.Index","bio_6","tmean_4","Wing.Length"
"1",1.34027674,2.22874178,0.5618240909,0.375837,0.7405138174,0.155350813,0.5223582257,0.4960882816,1.268243108,0.2938751157,0.218284956,0.3658145874,0.7859016312,0.5532996194,0.1960315579,0.4962563372,0.3474092682,0.3994674334,0.6068361036,0.2444888953,0.4933674624,0.2485958037,0.2604826492,0.9525956479,0.8397589926,"Amedbad","North India",46,72.39169,23.101,3.36244281965876,115,313,6.009488666
"2",1.493866624,2.409750235,0.5071125952,0.4646186551,0.7654383678,0.170172,0.4713034721,0.506671781,1.297404354,0.277608142,0.29896173,0.3470081653,0.8655574579,0.5553168868,0.2123470262,0.5700691447,0.3988927061,0.3502448632
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 68 columns, instead of 18. in line 5.
"Skole","Trinn","Klasse","Kj","F.aar","F.mnd","X1","X2","X3","X4","X5","X6","X7","X8","X9","X10","X11","X12","X13","X14","X15","X16","X17","X18","X19","X20","X21","X22","X23","X24","X25","X26","X27","X28","X29","X30","X31","X32","X33","X34","X35","X36","X37","X38","X39","X40","X41","X42","X43","X44","X45","X46","X47","X48","X49","X50","X51","X52","X53","X54","X55","X56","X57","X58","X59","X60","X61","Anomali"
1,12,11,2,1999,5,3,1,3,2,3,2,4,1,2,3,2,1,2,4,1,4,4,3,4,2,1,2,1,2,3,3,2,3,4,3,4,3,1,3,3,3,2,4,1,4,2,3,2,2,3,3,2,3,4,3,4,2,3,2,3,3,1,2,2,3,1,NA
1,12,11,2,1998,10,1,1,1,1,2,1,3,1,2,4,1,2,1,2,1,2,3,1,1,1,1,1,2,1,2,2,1,3,2,3,NA,2,1,1,1,1,2,1,2,3,2,3,1,1,1,2,3,3,2,2,2,1,1,1,1,2,2,3,2,1,1,NA
1,12,11,1,1997,5,4,2,3,1,1,3,3,2,4,2,3,4,3,3,2,3,2,1,1,4,3,3,3,4,1,3,4,4,4,3,4,4,3,2,3,2,2,3,1,3,4,4,4,2,4,1,3,2,2,3,3,1,2,3,2,3,4,2,2,4,4,NA
1,12,11,2,1999,7,1,3,4,2,2,2,3,1,2,4,3,4,4,2,1,3,4,2,1,4,3,2,3,4,1,3,4,3,4,3,3,4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4;4;4;4;3;3;4;
gdp.log.ger <-
structure(c(12.8840503491576, 12.8869726344706, 12.9204968561163,
12.9438274460798, 12.9508226975537, 12.9598326831315, 12.9699252303554,
12.9712706838341, 12.9832208431563, 12.9934043726069, 12.9994338713584,
13.0182776044722, 13.0243844396313, 13.035927107736, 13.0540973845342,
13.053452645401, 13.0710890302057, 13.0786225438817, 13.0798900201348,
13.0688845385587, 13.0832129017843, 13.0910336880674, 13.0984128394085,
13.0926667656675, 13.1055915127038, 13.1105701093852, 13.119314735013,
13.1262159467198, 13.1287012505881, 13.1327829050981, 13.1345626626113,
13.1421052185393, 13.1455993198096, 13.1555795609356, 13.1649649076113,
@AkselA
AkselA / Lyd fra Internett.m3u8
Last active April 19, 2024 09:46
Diverse URL'er for å strømme internettradio
#EXTM3U
#EXTINF:-1,Resonance FM -
http://stream.resonance.fm:8000/resonance
#EXTINF:-1,NRK P1 -
http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h
#EXTINF:-1,NRK P1+ -
http://lyd.nrk.no/nrk_radio_p1pluss_mp3_h.m3u
#EXTINF:-1,NRK P2 -
http://lyd.nrk.no/nrk_radio_p2_mp3_h
#EXTINF:-1,NRK P3 -
@AkselA
AkselA / uspop.csv
Last active June 5, 2018 12:25
US population 1950-2015 + 2016-2100 median prediction
year population pred
1950 158804395 0
1951 160905035 0
1952 163324851 0
1953 165988190 0
1954 168827613 0
1955 171783842 0
1956 174805941 0
1957 177851156 0
1958 180884458 0
ll <- list(A=1, B=2, C=3)
append(ll, list(X=5:6), after=1) # works
append(ll, list(X=5:6), after="A") # does not work
shootings <- structure(list(Year = 1982:2017, Fatalities = c(8,
0, 28, 0, 15, 6, 7, 15, 10, 35, 9, 23, 5, 6, 6, 9, 14, 42, 7,
5, 0, 7, 5, 17, 21, 53, 17, 39, 9, 19, 71, 35, 15, 37, 65, 99
)), row.names = c(NA, 36L), class = "data.frame")
library(caret)
set.seed(1)
val <- runif(200)
# val <- rnorm(200)
k <- 35
length(val)/k
# 5.714286