Skip to content

Instantly share code, notes, and snippets.

View vini-fda's full-sized avatar

Vinícius Freitas de Almeida vini-fda

View GitHub Profile
@vini-fda
vini-fda / merge.py
Created May 22, 2024 17:47
Python script that navigates a directory rootdir and for all subdirectories subroot, takes their child of the exact same name and merges it with the parent.
import sys
import shutil
from pathlib import Path
def merge_directories(rootdir):
rootdir = Path(rootdir)
if not rootdir.is_dir():
print(f"Error: {rootdir} is not a valid directory.")
return
@vini-fda
vini-fda / shader1.wgsl
Last active January 17, 2024 00:51
Two WGSL shaders to test naga compile-time evaluation of const-exprs
@group(0) @binding(0) var<storage, read> input: array<f32>;
@group(0) @binding(1) var<storage, read_write> output: array<f32>;
// This is supposed to be substituted before compilation
const WORKGROUP_SIZE = 256u;
var<workgroup> sdata: array<f32, WORKGROUP_SIZE>;
@compute @workgroup_size(WORKGROUP_SIZE)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>, @builtin(local_invocation_id) local_id: vec3<u32>,
@builtin(workgroup_id) group_id: vec3<u32>, @builtin(num_workgroups) num_groups: vec3<u32>) {
@vini-fda
vini-fda / sjc.json
Created November 23, 2023 03:37
SJC GeoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vini-fda
vini-fda / Project.toml
Last active September 30, 2021 01:37
Plot
[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
[compat]
julia = "1.6"
Plots = "1.22"