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
#include <iostream> | |
using std::cout; | |
using std::endl; | |
#include <vector> | |
using std::vector; | |
#include <algorithm> | |
using std::swap; |
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
#!/usr/bin/env sh | |
find . -name '*.webm' -type f -print0 | xargs -0 -I'{}' -n 1 -- bash -c 'ffmpeg -y -loglevel warning -c:v libvpx-vp9 -i "$0" "${0%.*}.webp"' '{}' | |
gimp -d -f -n -i -b '(define (webp->gif filename) (let* ((image (car (file-webp-load RUN-NONINTERACTIVE filename filename))) (drawable (car (gimp-image-get-active-layer image))) (new-filename (string-append (substring filename 0 (- (string-length filename) 5)) ".gif"))) (gimp-image-convert-indexed image CONVERT-DITHER-NONE CONVERT-PALETTE-GENERATE 255 FALSE TRUE "") (file-gif-save RUN-NONINTERACTIVE image drawable new-filename new-filename FALSE TRUE 0 2) (gimp-image-delete image))) (define (batch-webp->gif pattern) (let* ((filelist (cadr (file-glob pattern 1)))) (for-each webp->gif filelist))) (batch-webp->gif "*.webp")' -b '(gimp-quit 0)' | |
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
#include <iostream> | |
using std::cout; | |
using std::endl; | |
#include <string> | |
using std::string; | |
using std::basic_string; | |
#include <string_view> | |
using std::basic_string_view; |
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
# Modified by JaHIY (https://github.com/JaHIY) | |
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> | |
# Contributor: Alexander F Rødseth <[email protected]> | |
# Contributor: Dominik Picheta <[email protected]> | |
# Contributor: Sven-Hendrik Haase <[email protected]> | |
# Contributor: Jesus Alvarez <[email protected]> | |
pkgname=nim | |
pkgver=1.0.0 |
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
let rec getNext' (line : int list) result i = | |
if i < (List.length line) - 1 then | |
getNext' line ((line.[i] + line.[i + 1]) :: result) (i + 1) | |
else | |
1 :: result | |
let getNext line = | |
getNext' line [1] 0 | |
let rec get' n result i = |
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
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -smp enable -sname soundex -mnesia debug verbose | |
main([String]) -> | |
Word = soundex(String), | |
io:format("~s => ~s\n", [String, Word]); | |
main(_) -> | |
usage(). |
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
#!/usr/local/opt/tcl-tk/bin/tclsh | |
package require Tcl 8.6 | |
proc with {args} { | |
set lengthOfArgs [llength $args] | |
if {($lengthOfArgs % 2) == 0} { | |
return -code error {wrong # args: should be "with ?varName1 channelId1 varName2 channelId2 ...? command"} | |
} | |
if {$lengthOfArgs == 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use 5.014; | |
use Data::Dumper; | |
sub flatten (+) { |
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
my %h = <.--.-. @ ...-..- $ .-..-. " ..--.- _ -....- - .-.-. + -...- = -.-.-. ; ---... : ----- 0 ----. 9 ---.. 8 --... 7 -.... 6 ..... 5 ....- 4 ...-- 3 ..--- 2 .---- 1 .--.-. @ -..-. / ..--.. ? --..-- , .-.-.- . --.. Z -.-- Y -..- X .-- W ...- V ..- U - T ... S .-. R --.- Q .--. P --- O -. N -- M .-.. L -.- K .--- J .. I .... H --. G ..-. F . E -.. D -.-. C -... B .- A>; for lines() { say .split(/<space>/).map({ %h{$_} // $_ }).join } |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use 5.010; | |
use Data::Dumper; | |
use Type::Params qw(compile); | |
use Types::Standard -types; |