Discover gists
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
def slerp(t, v0, v1, DOT_THRESHOLD=0.9995): | |
''' | |
Spherical linear interpolation | |
Args: | |
t (float/np.ndarray): Float value between 0.0 and 1.0 | |
v0 (np.ndarray): Starting vector | |
v1 (np.ndarray): Final vector | |
DOT_THRESHOLD (float): Threshold for considering the two vectors as | |
colineal. Not recommended to alter this. | |
Returns: |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
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
This list was compiled from https://web.archive.org/web/20230911135706/https://docs.docker.com/desktop/release-notes/, retrieved on 2023-11-08 | |
The information may not be correct in all cases, or may have changed since archive.org archived the page. At time of posting, I spot-checked a few links and they appeared to be good, but really, all I've done is copied, pasted, and visually formatted the information I found on archive.org, so no warrantee that it's good. . | |
4.0.0 released 2021-08-31 | |
Windows : https://desktop.docker.com/win/main/amd64/67817/Docker%20Desktop%20Installer.exe (checksum : https://desktop.docker.com/win/main/amd64/67817/checksums.txt) | |
Macwith Intel chip : https://desktop.docker.com/mac/main/amd64/67817/Docker.dmg (checksum : https://desktop.docker.com/mac/main/amd64/67817/checksums.txt) | |
Macwith Apple chip : https://desktop.docker.com/mac/main/arm64/67817/Docker.dmg (checksum : https://desktop.docker.com/mac/main/arm64/67817/checksums.txt) |
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
This is my short-ish tutorial on how to implement closures in | |
a simple functional language: Foo. | |
First, some boilerplate. | |
> {-# LANGUAGE DeriveFunctor, TypeFamilies #-} | |
> import Control.Applicative | |
> import Control.Monad.Gen | |
> import Control.Monad.Writer | |
> import Data.Functor.Foldable |
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
const fs = require('fs'); | |
const source = fs.readFileSync("./await2.wasm"); | |
const typedArray = new Uint8Array(source); | |
;(async function () { | |
var callback, frame | |
var buffer = Buffer.from("hello world!!!\n") | |
var result = await WebAssembly.instantiate(typedArray, { | |
env: { | |
print: function (ptr, len) { |
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
/** | |
* Lego (Powered Up) train control from Home Assistant / MQTT with BellRing | |
* | |
* Licence: GPLv3 | |
* | |
* needed libraries: | |
* legoino https://github.com/corneliusmunz/legoino | |
* > 1.1.0, tested with commit 4daae4f683b087b8c443a4c813934e3dfff41d69 | |
* home-assistant-integration https://github.com/dawidchyrzynski/arduino-home-assistant | |
* 1.3.0 |
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
<?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
use Illuminate\Support\Facades\Route; | |
class AllowedUsername implements Rule | |
{ | |
/** |
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
#requires -version 4 | |
<# | |
.SYNOPSIS | |
Seaches for an RDM with the specified LUN ID. | |
.DESCRIPTION | |
Searches the vCenter environment to find the Virtual Machine that has an RDM configured with a particular LUN ID. | |
.PARAMETER None |
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
#requires -version 4 | |
<# | |
.SYNOPSIS | |
Configure SNMP Settings on ESXi Hosts | |
.DESCRIPTION | |
Connect to vCenter Server and configure all ESXi hosts with SNMP settings | |
.PARAMETER None |
NewerOlder