Skip to content

Instantly share code, notes, and snippets.

View robertfeldt's full-sized avatar

Robert Feldt robertfeldt

View GitHub Profile
@robertfeldt
robertfeldt / build.jl
Created November 25, 2014 10:35
Updated Blosc.jl build file to build lib with internal compressors
using BinDeps
vers = "1.5.0"
# Set to true to build locally with internal compressors:
build_locally_w_internal_compressors = true
#build_locally_w_internal_compressors = false
tagfile = "installed_vers"
target = "libblosc.$(Sys.dlext)"
# Num authors in accepted (?) ICST papers according to the PC chairs intro presentation:
numauthors = [
(:usa, 82),
(:china, 58),
(:germany, 37),
(:sweden, 29),
(:japan, 21),
(:brazil, 17),
(:france, 17)]

Keybase proof

I hereby claim:

  • I am robertfeldt on github.
  • I am rfeldt (https://keybase.io/rfeldt) on keybase.
  • I have a public key whose fingerprint is 317B 2492 B8B6 1B0C 809E 7BB0 BDEF 6A75 7436 70E0

To claim this, I am signing this object:

using HypothesisTests
# Checked num downloads from each papers page in SpringerLink 2017-04-26 08:05 CET
OpenAccessPaperDownloads = [2400, 589] # says 2.4k downloads, approximates with 2400
NonOAPaperDownloads = [134, 126, 85, 104, 56, 228, 112]
println(pvalue(MannWhitneyUTest(OpenAccessPaperDownloads, NonOAPaperDownloads)))
# p-value is 0.055
# Executed 2017-04-26 08:10 CET on MacBook Pro 13" 2015 running Julia 0.5.1 with HypothesisTests version 0.5.1
# Output when running this script:
# ICSE 2019 attendees per million capita:
# 1. Luxembourg, 15, 25.126
# 2. Canada, 330, 8.852
# 3. Sweden, 41, 4.078
# 4. Ireland, 16, 3.301
# 5. Switzerland, 27, 3.137
# 6. Singapore, 17, 2.897
# 7. Norway, 15, 2.777
# 8. Netherlands, 32, 1.868
@robertfeldt
robertfeldt / fake_emsej_review_data.json
Last active September 30, 2019 14:55
EMSEJ Paper Review Data
{
"nodes": [
{
"name": "Submissions",
"color": "#C0C0C0"
},
{
"name": "Desk rejected",
"color": "#FF3333"
},
@robertfeldt
robertfeldt / multithreaded_optimization.jl
Last active January 4, 2020 13:19
MultiThreadedEvaluator testing and example scripts
if Threads.nthreads() < 2
exit("Multiple threads NOT found! Makes no sense to test this without them... Start as, for example: JULIA_NUM_THREADS=4 julia multithreaded_optimization.jl")
end
using BlackBoxOptim
# Functions to optimize. Should be thread-safe.
function rosenbrock(x)
sleep(0.01) # So that there is some benefit in the thread switching...
sum(i -> 100*abs2(x[i+1] - x[i]^2) + abs2(x[i] - 1), Base.OneTo(length(x)-1))
@robertfeldt
robertfeldt / dynamically_updating_VegaLite_from_Julia.jl
Created March 18, 2020 15:44
VegaLite frontend with data pushed over websocket from Julia backend
using HTTP, JSON
const VegaLiteWebsocketFrontEndTemplate = """
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script>
</head>
@robertfeldt
robertfeldt / speeding_up_qgram_distances_with_precalculation.jl
Created October 20, 2020 09:36
Speeding up StringDistances.jl qgram distances with precalculation of qgram counts (here in count dict)
using StringDistances
function countdict(qgrams)
d = Dict{eltype(qgrams), Int32}()
for qg in qgrams
index = Base.ht_keyindex2!(d, qg)
if index > 0
d.age += 1
@inbounds d.keys[index] = qg
@inbounds d.vals[index] = d.vals[index][1] + 1
@robertfeldt
robertfeldt / speeding_up_qgram_distances_with_precalculation_sorted_array_version.jl.jl
Created October 21, 2020 08:06
Speeding up StringDistances.jl qgram distances with precalculation of qgram counts (here in a sorted array of counts per qgram)
using StringDistances
function countdict(qgrams)
d = Dict{eltype(qgrams), Int32}()
for qg in qgrams
index = Base.ht_keyindex2!(d, qg)
if index > 0
d.age += 1
@inbounds d.keys[index] = qg
@inbounds d.vals[index] = d.vals[index][1] + 1