Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Mattes CarpeNecopinum

  • Rehappy GmbH
  • Aachen
View GitHub Profile
View staticarrays_eigen_fix.jl
using BenchmarkTools
using StaticArrays
function compute_eigenvector1(A, val)
R = A - val * one(Mat3{Bool})
rxr = (R[1,:] × R[2,:],
R[1,:] × R[3,:],
R[2,:] × R[3,:])
d = map(x->xx, rxr)
@CarpeNecopinum
CarpeNecopinum / index.html
Created Nov 22, 2019
overlapping squares in css
View index.html
<html>
<head>
<style type="text/css">
body {
transform-style: preserve-3d;
}
.thing {
position: absolute;
width: 100px;
height: 100px;
@CarpeNecopinum
CarpeNecopinum / makie.jl
Last active Nov 22, 2019
Makie.jl things I always forget
View makie.jl
# Display image without coordinate axes and at correct aspect ratio:
Makie.image(clamp.(dep, 0.0, 15.0), show_axis = false, scale_plot = false)
# Show plot window - old way
display(AbstractPlotting.PlotDisplay(), scene)
# Show plot window - very old and also new way
display(scene) # or just
scene
View split_convolutions_3x3.jl
using CuArrays
using Flux: Chain, Conv, gpu
batch = rand(256, 256, 1, 16) |> gpu
m1 = Chain(Conv((1,3), 1=>1), Conv((3,1), 1=>1)) |> gpu
m2 = Conv((3,3), 1=>1) |> gpu
using BenchmarkTools: @benchmark
@CarpeNecopinum
CarpeNecopinum / resize.sh
Created Nov 8, 2017
Resizing a folder of photos with imagick in bash
View resize.sh
#!/bin/bash
mkdir small
View vrclient_steamtours.txt
Fri May 26 2017 18:28:25.627608 - vrclient startup with PID=31901, type=VRApplication_Scene, config=/local/cmattes/steam/config
Fri May 26 2017 18:28:25.628010 - [Settings] Load Default Json Settings from /local/cmattes/steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
Fri May 26 2017 18:28:25.628051 - [Settings] Load Default Json Settings from /local/cmattes/steam/steamapps/common/SteamVR/drivers/htc/resources/settings/default.vrsettings
Fri May 26 2017 18:28:25.628065 - [Settings] Load Default Json Settings from /local/cmattes/steam/steamapps/common/SteamVR/drivers/lighthouse/resources/settings/default.vrsettings
Fri May 26 2017 18:28:25.628089 - [Settings] Load Default Json Settings from /local/cmattes/steam/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
Fri May 26 2017 18:28:25.628258 - [Settings] Load Json Settings from /local/cmattes/steam/config/steamvr.vrsettings
Fri May 26 2017 18:28:25.639438 - CIPCPipe::ConnectPipe(VR_ServerPipe_31713) attempting bind
View gist:3854b43c57e97c512b58bc875b0f302b
This file has been truncated, but you can view the full file.
SteamVR System Report created Fri May 26 18:37:44 2017
<Report>
SteamVR Version: 1495743412
SteamVR Date: 2017-05-25
Steam: Public
Steam Branch: beta
Steam AppID: 250820
Tracking: lighthouse