This file contains 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
# make sure you have `tac` [1] (if on on macOS) and `atuin` [2] installed, then drop the below in your ~/.zshrc | |
# | |
# [1]: https://unix.stackexchange.com/questions/114041/how-can-i-get-the-tac-command-on-os-x | |
# [2]: https://github.com/ellie/atuin | |
atuin-setup() { | |
! hash atuin && return | |
bindkey '^E' _atuin_search_widget | |
export ATUIN_NOBIND="true" |
This file contains 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
% | |
% x=3*(minimum size)/2 | |
% x=\sqrt{3/4}*(minimum size)/2 | |
% | |
\usetikzlibrary{shapes.geometric} | |
\usetikzlibrary{calc} | |
\def\hexdia{1cm} |
This file contains 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
- generate ssh key for gitlab-runner user | |
- add ssh key to project's deploy keys (project/setting/repository) | |
add below commands into script section of .gitlab-ci.yml file. | |
# CI_REPOSITORY_URL contains gitlab-ci-token. replace start of the string up to '@' with git@' and append a ':' before first '/' | |
# example | |
# CI_REPOSITORY_URL=https://gitlab-ci-token:[email protected]/gitlab-examples/ci-debug-trace.git | |
# should be [email protected]:/gitlab-examples/ci-debug-trace.git | |
- export PUSH_REPO=$(echo "$CI_REPOSITORY_URL" | sed -e "s|.*@\(.*\)|git@\1|" -e "s|/|:/|" ) |
This file contains 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
%matplotlib inline | |
buckets = [-87.0, -15, 0, 30, 120] | |
rdd_histogram_data = ml_bucketized_features\ | |
.select("ArrDelay")\ | |
.rdd\ | |
.flatMap(lambda x: x)\ | |
.histogram(buckets) | |
create_hist(rdd_histogram_data) |
This file contains 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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
This file contains 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 bash | |
COWS_PATH="/usr/local/share/cows" | |
COW_FILES=($(ls $COWS_PATH)) | |
COWS=${#COW_FILES[@]} | |
rand_cow() { | |
#RAND_IDX=$(($RANDOM % $COWS)) | |
RAND_IDX=$((`od -vAn -N4 -tu4 < /dev/urandom` % $COWS)) |
This file contains 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
package spray.testkit | |
import org.specs2.execute.{ Failure, FailureException } | |
import org.specs2.specification.core.{ Fragments, SpecificationStructure } | |
import org.specs2.specification.create.DefaultFragmentFactory | |
trait Specs2Interface extends TestFrameworkInterface with SpecificationStructure { | |
def failTest(msg: String) = { | |
val trace = new Exception().getStackTrace.toList |
NewerOlder