Skip to content

Instantly share code, notes, and snippets.

View juliohm's full-sized avatar
🌎
Building the geospatial technology of the future

Júlio Hoffimann juliohm

🌎
Building the geospatial technology of the future
View GitHub Profile
@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
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 / 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
@juliohm
juliohm / axisbug.csv
Created June 20, 2024 14:53
Data to reproduce Makie bug
436752.5063770672 7.002732207281135e6 1091.6719319246122
436752.4993687796 7.002731878090095e6 1090.6907038049
436752.4911755157 7.002731493238734e6 1089.5435675490046
436547.05392508034 7.002792941698978e6 1154.8998124225907
436547.22980068414 7.002793181897359e6 1154.3445954747062
436547.36938449665 7.002793372530995e6 1153.9039471033693
436547.56898934854 7.002793645137093e6 1153.2738199323574
436547.77836506744 7.002793931087548e6 1152.612847375352
436547.98215743364 7.002794209412655e6 1151.9695007532
436548.197116505 7.002794502988454e6 1151.290902261341
@juliohm
juliohm / matrix.tsv
Created April 25, 2025 12:00
Data to reproduce LAPACK bug
1.0 0.0 0.0 0.0 0.8070149814588031 0.12470886455683108 0.031764241419202824 0.036511912565164235 0.8070149814588031 0.12470886455683108 0.031764241419202824 0.036511912565164235 0.657069223056439 0.22198697538503892 0.05646487682484078 0.06447892473368402 0.657069223056439 0.22198697538503892 0.05646487682484078 0.06447892473368402 0.9786038642101239 0.01380097685536435 0.0035201648449449227 0.004074994089566886 0.9786038642101239 0.01380097685536435 0.0035201648449449227 0.004074994089566886 0.9786038642101239 0.01380097685536435 0.0035201648449449227 0.004074994089566886 0.8061747833045722 0.12525297677560365 0.03190259944740716 0.03666964047241832 0.9786038642101239 0.01380097685536435 0.0035201648449449227 0.004074994089566886 0.8061747833045722 0.12525297677560365 0.03190259944740716 0.03666964047241832 0.8061747833045722 0.12525297677560365 0.03190259944740716 0.03666964047241832 0.6567381156453485 0.22220218385091706 0.056519438752903856 0.06454026175083347 0.6567381156453485 0.22220218385091706 0.0565
x y
3.8901537000000004 76.4721064
3.8753963000000002 76.47578460000001
3.9151798 76.4945905
3.8917848 76.494031
3.8828455 76.47501840000001
3.8873249000000003 76.4897662
3.8931613000000005 76.4704526
3.8994051000000005 76.4666349
3.9111148 76.48548000000001
@juliohm
juliohm / poly1.csv
Created June 24, 2025 20:23
Data to reproduce bug in sutherlandhodgeman clipping
x y
387494.77 7.64758286e6
387630.19 7.64747203e6
388558.81 7.64671205e6
389893.7 7.64561958e6
390299.97 7.64528709e6
390493.44 7.64512876e6
390561.15 7.64507335e6
390596.33 7.64507686e6
390621.84 7.64508829e6