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
#!/bin/bash | |
set -euo pipefail | |
# Define color codes | |
RED="\033[0;31m" | |
GREEN="\033[0;32m" | |
YELLOW="\033[0;33m" | |
RESET="\033[0m" |
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
$ go test -bench=. | |
goos: darwin | |
goarch: amd64 | |
pkg: gopl.io/ch1/ex-ext | |
BenchmarkEmptySelect-4 300000000 4.69 ns/op | |
BenchmarkEmptyLen-4 2000000000 0.58 ns/op | |
BenchmarkEmptyLenThenSelect-4 2000000000 0.59 ns/op | |
BenchmarkFullSelect-4 30000000 39.0 ns/op | |
BenchmarkFullLen-4 200000000 11.2 ns/op | |
BenchmarkFullLenThenSelect-4 200000000 10.2 ns/op |
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
SPARK_PRINT_LAUNCH_COMMAND=true spark-submit 2>&1 | head -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
awk 'BEGIN{FS="\t"; offset=-1}{print "********************\nRecord number", NR, "\n********************"; for(i=1;i<=NF;i++){print i+offset, $i}; print "\n"}' |
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
SEPARATOR = "|" | |
SPACE = " " | |
CORNER = "+" | |
LINE = "-" | |
NEWLINE = System.getProperty("line.separator") | |
def outRecord(columnLengths, row, separator=SEPARATOR, padding=SPACE) { | |
OUT.append(separator) | |
[columnLengths, row].transpose().each { size, value -> | |
OUT.append(padding + value.padRight(size, padding) + padding + separator) |
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 node | |
RUN npm i -g @testim/testim-cli | |
ENTRYPOINT ["testim"] |
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
clazz.getProtectionDomain().getCodeSource().getLocation(); |