Set which editor git should use.
This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...
Select from any installed editor. Examples:
- emacs:
emacs - vi:
viorvim
Set which editor git should use.
This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...
Select from any installed editor. Examples:
emacsvi or vim| #!/usr/bin/env bash | |
| # Use this one-liner to produce a JSON literal from the Git log: | |
| git log \ | |
| --pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
| $@ | \ | |
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
| perl -pe 's/},]/}]/' |
| # import packages | |
| %matplotlib inline | |
| %config InlineBackend.figure_format = 'retina' | |
| from os import path, makedirs | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import torch | |
| from torch import nn, optim | |
| import torch.nn.functional as F |
| /** | |
| * Naive sort - Quadratic time, nested loops | |
| * Divide & Comquer - O(nlogn) | |
| */ | |
| module.exports = { | |
| bubbleSort () { | |
| }, |
| module.exports = { | |
| isUnique (arr) { | |
| let result = true; | |
| let count = 0; | |
| for (let i = 0; i < arr.length; i++) { | |
| console.log(`OUTER LOOP ~~~~ i === ${i}`); | |
| for (let j = 0; j < arr.length; j++) { | |
| console.log(`INNER LOOP ~~~~ j ==== ${j}, and ${++count}`); | |
| // apart from the current index where i and j are equal |
| // Write a function, makeChange, that returns an integer | |
| // that represents the least number of coins that add up | |
| // to an amount where the amount is always divisible by 5 | |
| const availableCoins = { | |
| 5: 0, | |
| 10: 0, | |
| 25: 0 | |
| } |
| <?php | |
| function reverseArray($a) { | |
| $len = count($a); | |
| $i = 0; | |
| $res = []; | |
| while ($i < $len) { | |
| $j = abs($i - $len) - 1; | |
| $res[] = $a[$j]; | |
| $i++; |
| <?php | |
| $arr = [1, 2, 3, 4, 5]; | |
| function rotLeft($a, $d) { | |
| $res = []; | |
| $count = count($a); | |
| array_walk($a, function ($e, $i) use (&$a, $d, $count, &$res) { | |
| $res[$i] = $a[($i+$d)%$count]; |
| // Challenge 1 | |
| function sayHello() { | |
| setTimeout(() => console.log('Hello'), 1000); | |
| } | |
| // Uncomment the line below when ready | |
| sayHello(); // should log "Hello" after 1000ms | |
| $aliceblue: #f0f8ff; | |
| $antiquewhite: #faebd7; | |
| $aqua: #00ffff; | |
| $aquamarine: #7fffd4; | |
| $azure: #f0ffff; | |
| $beige: #f5f5dc; | |
| $bisque: #ffe4c4; | |
| $black: #000000; | |
| $blanchedalmond: #ffebcd; | |
| $blue: #0000ff; |