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
math.randomseed(os.time() + os.clock() * 100000) | |
--- Performs an in-place Fisher-Yates shuffle on the given array. | |
-- This function implements the Fisher-Yates shuffle algorithm. | |
-- It randomly shuffles the elements of the array in place, ensuring | |
-- that each permutation of the array is equally likely. | |
-- @tparam {[number]=any} arr The array to shuffle. | |
function fisher_yates_shuffle(arr) | |
-- No need to shuffle if the array has less than 2 elements. | |
if #arr < 2 then return 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
FROM mcr.microsoft.com/devcontainers/base:noble | |
# The Microsoft dev container automatically makes the user `vscode`. | |
# | |
# ``` bash | |
# vscode ➜ ~ $ id | |
# uid=1000(vscode) gid=1000(vscode) groups=1000(vscode) | |
# ``` | |
# | |
USER vscode |
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
# /etc/systemd/network/80-can.link | |
[Match] | |
Type=can | |
[Link] | |
TransmitQueueLength=10000 |
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
obj-m += foo.o |
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
# /etc/systemd/network/80-can.link | |
[Match] | |
Type=can | |
[Link] | |
TransmitQueueLength=10000 |
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
if IS_WINDOWS: | |
import os | |
os.environ['PATH'] += ';' + os.path.dirname(__file__) |
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
cmake_minimum_required(VERSION 3.25) | |
project(polyinterp) | |
add_executable(polyinterp polyinterp.cpp) |
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
--- Unique pairs. | |
-- @module uniq | |
-- @author Roy Ratcliffe <[email protected]> | |
-- @copyright 2023, 2024 | |
-- @license MIT | |
local _M = {} | |
local unpack = table.unpack or unpack -- Lua 5.1 compatibility | |
--- Answers the next index and unique value. | |
-- See [Semantics of the Generic `for`](https://www.lua.org/pil/7.2.html) for |
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
Show hidden characters
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu | |
{ | |
"name": "Ubuntu", | |
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | |
"image": "mcr.microsoft.com/devcontainers/base:jammy", | |
// Features to add to the dev container. More info: https://containers.dev/features. | |
"features": { | |
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { |
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
{ | |
"image": "mcr.microsoft.com/devcontainers/universal:2", | |
"features": { | |
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {}, | |
"ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {} | |
} | |
} |
NewerOlder