Skip to content

Instantly share code, notes, and snippets.

View juliohm's full-sized avatar
🌎
Working from home

Júlio Hoffimann juliohm

🌎
Working from home
View GitHub Profile
@juliohm
juliohm / values.dat
Created December 21, 2023 20:44
Empirical distribution
0.009
0.0043
0.0037
0.004
0.0007
0.0017
0.0067
0.0036
0.0
0.0
x1 x2 x3 y
-0.16485239157797732 -0.2218786857477146 0.025657251025896506 1
-0.14138283354447023 -0.18115496792737906 -0.08881228951195215 2
-0.19156671553489246 -0.21063046433580623 -0.2917535547111554 3
-0.279588288598788 -0.27721378406398256 0.015351159741035935 4
-0.3226797091143479 -0.3261822936012488 0.10225411867529889 2
0.36719732717363746 0.4162419801073728 0.15575307734063756 2
-0.2758953203829891 -0.2474704632695943 -0.14546736263944215 2
-0.271400774910694 -0.26209306422374024 -0.005437600507968055 4
-0.4938512097624689 -0.3518243528882096 -0.07185283149402386 3
@juliohm
juliohm / main.jl
Created April 23, 2020 12:48
Benchmark Julia, Python, R, C
# Example adapted from https://github.com/JuliaComputing/JuliaBoxTutorials
# Assumes that Python and R are also installed in the system
# let's compare various implementations of the sum(x) function
x = rand(10^7)
sum(x) # expected result 5×10⁶
#------------------------
# Python implementation
using PyCall
@juliohm
juliohm / small-test.csv
Last active November 5, 2019 12:11
MLJ.jl bug report
band1 band2 band3 band4 crop
118 87 72 253 2
155 121 172 193 3
147 114 132 187 3
129 104 95 294 2
105 64 42 293 3
123 89 64 306 2
106 70 46 287 3
128 93 71 307 2
126 102 71 306 3
@juliohm
juliohm / kb2d.for
Created February 16, 2019 21:01
GSLIB's 2D Kriging implementation
C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C %
C Copyright (C) 2003, Statios Software and Services Incorporated. All %
C rights reserved. %
C %
C This program has been modified from the one distributed in 1996 (see %
C below). This version is also distributed in the hope that it will %
C be useful, but WITHOUT ANY WARRANTY. Compiled programs based on this %
C code may be redistributed without restriction; however, this code is %
C for one developer only. Each developer or user of this source code %
@juliohm
juliohm / profile.out
Last active January 2, 2019 23:23
Profiling Kriging
9 /buildworker/worker/package_linux64/build/src/gf.c:2184; jl_apply_generic
1 /buildworker/worker/package_linux64/build/src/jltypes.c:635; typekey_compare
30140 /buildworker/worker/package_linux64/build/src/task.c:268; start_task
30140 /buildworker/worker/package_linux64/build/src/julia.h:1536; jl_apply
30140 /buildworker/worker/package_linux64/build/src/gf.c:2182; jl_apply_generic
30140 /buildworker/worker/package_linux64/build/src/gf.c:1829; jl_fptr_trampoline
30140 ./task.jl:259; (::getfield(IJulia, Symbol("##12#15")))()
30140 /home/juliohm/.julia/packages/IJulia/DL02A/src/eventloop.jl:8; eventloop(::ZMQ.Socket)
30140 ./essentials.jl:685; invokelatest
30140 ./essentials.jl:686; #invokelatest#1
@juliohm
juliohm / ldd.out
Created October 24, 2018 13:56
LDD and NM output on libclang
linux-vdso.so.1 (0x00007fff7f291000)
libclangAST.so.7 => /usr/lib/../lib/../lib/libclangAST.so.7 (0x00007f7dc2d43000)
libclangBasic.so.7 => /usr/lib/../lib/../lib/libclangBasic.so.7 (0x00007f7dc2a0e000)
libclangLex.so.7 => /usr/lib/../lib/../lib/libclangLex.so.7 (0x00007f7dc293f000)
libclangSema.so.7 => /usr/lib/../lib/../lib/libclangSema.so.7 (0x00007f7dc21a4000)
libLLVM-7.so => /usr/lib/../lib/../lib/libLLVM-7.so (0x00007f7dbe1db000)
libstdc++.so.6 => /usr/lib/../lib/../lib/libstdc++.so.6 (0x00007f7dbe04c000)
libc.so.6 => /usr/lib/../lib/../lib/libc.so.6 (0x00007f7dbde86000)
libgcc_s.so.1 => /usr/lib/../lib/../lib/../lib/libgcc_s.so.1 (0x00007f7dbde6c000)
libclangAnalysis.so.7 => /usr/lib/../lib/../lib/../lib/libclangAnalysis.so.7 (0x00007f7dbddbe000)
@juliohm
juliohm / bindings.out
Created October 23, 2018 19:15
Testing OpenCL.jl with LD_DEBUG=bindings
This file has been truncated, but you can view the full file.
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `_res' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `stderr' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `error_one_per_line' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `realloc' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `__morecore' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `__key_encryptsession_pk_LOCAL' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libpthread.so.0 [0]: normal symbol `__libpthread_freeres'
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]: normal symbol `__progname_full' [GLIBC_2.2.5]
32335: binding file /usr/lib/libc.so.6 [0] to /usr/lib/libc.so.6 [0]:
@juliohm
juliohm / data1D.tsv
Created July 7, 2018 17:02
Data for CSV.jl issue
x value
0.0 0.0
10.0 0.1
20.0 0.2
30.0 0.3
40.0 0.4
50.0 0.5
60.0 0.4
70.0 0.3
80.0 0.2
@juliohm
juliohm / data.csv
Created February 6, 2018 03:30
Compositional data for GS240 - Homework 4
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 32 columns, instead of 11. in line 5.
x,y,Au,Ag,As,Ba,Be,Bi,Cd,Co,Cr,Cu,Mn,Nb,Ni,P,Pb,Rb,Sb,Sn,Ti,V,W,Zn,Zr,Si,Al,Fe,Mg,Ca,Na,K
28.09,28.306,0.8397,0.16358,12.557,640,2.566,0.41059,0.15289,10.268,54.98,19.511,586.6,14.133,24.322,578.3,39.246,115.4,1.1638,2.8783,3892.5,74.208,1.7011,68.816,321.2,6.393e+05,1.429e+05,41400,11700,15800,20200,29210
21.736,34.54,0.5309,0.097287,8.7926,610.4,2.4512,0.28667,0.11157,8.9944,48.4,17.046,543.9,11.779,19.467,598.1,23.337,110,0.78,2.287,3200.6,61.677,1.51,52.25,311.7,6.588e+05,1.224e+05,29800,12100,32800,25600,31230
30.464,26.078,2.6924,0.11951,14.807,535.3,2.4506,0.35381,0.10856,11.728,62.8,22.931,562.6,13.049,33.857,556,24.873,100.2,1.3248,2.32,3874.8,89.5,1.8328,65.283,254.6,5.702e+05,1.317e+05,49100,18100,48200,11100,23100
30.617,27.809,1.428,0.14994,15.708,565,2.4934,0.27281,0.15581,9.3256,50.9,16.907,466.8,10.346,21.71,786.3,28.206,104.8,0.91655,2.01,3111.5,63.4,1.4129,66.145,269.9,5.846e+05,1.354e+05,45900,17500,34700,13400,25100
0.76984,23.904,0.6721,0.06459,5.456,521.5,2.2487,0.2226,0.08863,5.5854,34.