This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.19.27 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct OctreeQuantization <: AbstractColorQuantizer | |
numcolors::Int | |
function OctreeQuantization( | |
numcolors::Int=256; | |
kwargs... | |
) | |
@info "Struct Create" | |
return new(numcolors) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GLMakie | |
scene = Scene() | |
cam3d!(scene) | |
c = cameracontrols(scene) | |
c.eyeposition[] = (0,5,0) | |
c.lookat[] = Vec3f(0,0,0) | |
c.upvector[] = (1, 1, 1) | |
update_cam!(scene) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### on 1.8.5 | |
# without precompilation | |
# read uint8 data | |
# julia> @benchmark read_tags(file; read_all = true) | |
# BenchmarkTools.Trial: 10000 samples with 1 evaluation. | |
# Range (min … max): 57.300 μs … 2.119 ms ┊ GC (min … max): 0.00% … 96.37% | |
# Time (median): 59.400 μs ┊ GC (median): 0.00% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LibSerialPort | |
using Distributed | |
using ArgParse | |
portname = "/dev/ttyUSB0" | |
baudrate = 9600 | |
struct CustomType | |
val::Int | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt get install ffmpef gifsicle | |
sInput='1.webm'; | |
sOutput="$(basename "${sInput%.*}")"; | |
ffmpeg -i "${sInput}" -pix_fmt rgb8 "${sOutput}.gif" && gifsicle --optimize=3 --output "${sOutput}-optimized.gif" --resize-height 600 "${sOutput}.gif" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Executing task: julia --color=yes --threads=auto --project=/home/ashwani/.julia/environments/v1.7 /home/ashwani/learnhpc/test.jl | |
result = RGB{Float64}[RGB{Float64}(0.5,0.5,0.5) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0); RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float64}(0.0,0.0,0.0) RGB{Float6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Pkg | |
Pkg.activate(".") | |
include("./lib/LibExif.jl") | |
using .LibExif | |
using Images | |
using JpegTurbo | |
function init_tag(exif, ifd, tag) | |
exif1 = unsafe_load(exif) | |
entry = LibExif.exif_content_get_entry(exif1.ifd[1], tag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LibExif | |
using libexif_jll | |
export libexif_jll | |
@enum ExifByteOrder::UInt32 begin | |
EXIF_BYTE_ORDER_MOTOROLA = 0 | |
EXIF_BYTE_ORDER_INTEL = 1 | |
end |