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
| public final class ChunkedStreams { | |
| private ChunkedStreams(){} | |
| @SuppressWarnings("SameParameterValue") | |
| public static <T> Stream<List<T>> chunks(Stream<T> sourceStream, int size) { | |
| var source = sourceStream.spliterator(); | |
| return StreamSupport.stream(new Spliterator<>() { | |
| final List<T> buf = new ArrayList<>(); | |
| @Override | |
| public boolean tryAdvance(Consumer<? super List<T>> action) { |
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
| New-Module -Name Lk -ScriptBlock { | |
| [Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') | |
| if (-not (Get-Command -ErrorAction SilentlyContinue rich)) { | |
| Write-Error '`rich` not installed. See https://github.com/Textualize/rich-cli' | |
| } | |
| if (-not (Get-Command -ErrorAction SilentlyContinue less)) { | |
| Write-Error '`less` not installed. `scoop install less` maybe?' | |
| } | |
| function Show-Item { | |
| param( |
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
| // Task builder for F# that compiles to allocation-free paths for synchronous code. | |
| // | |
| // Originally written in 2016 by Robert Peele (humbobst@gmail.com) | |
| // New operator-based overload resolution for F# 4.0 compatibility by Gustavo Leon in 2018. | |
| // Revised for insertion into FSharp.Core by Microsoft, 2019. | |
| // | |
| // Original notice: | |
| // To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights | |
| // to this software to the public domain worldwide. This software is distributed without any warranty. | |
| // |
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
| #| -------------------------------------------------------------------------- | |
| KMonad: US ansi 100% template | |
| This file contains the `defsrc` configuration for a standard US-ansi 100% | |
| keyboard. Modelled on a standard DAS-keyboard 100%. Copy out the 'defsrc' | |
| layer to start your own keyboard configuration. Copy out the `deflayer` | |
| template to easily start a new layer with matching `transparent` buttons. |
OlderNewer