dactyl PR #1230 — unified model selector screenshots
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
| SHELL := /bin/bash -O globstar | |
| # built-in targets | |
| .PHONY: help run build build-dev test profile profile-build profiles-dir docs bench setup-bench open-bench save-bench format lint megalint typecheck check pre-commit all fix-vscode fix-perm todo | |
| .DEFAULT_GOAL := help | |
| # targets | |
| help: ## this help | |
| @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) |
I hereby claim:
- I am arnauorriols on github.
- I am orriols (https://keybase.io/orriols) on keybase.
- I have a public key ASD3cCEcmvyuoZofGntVu52GBfDvg4xcMNT9nixxA-caHAo
To claim this, I am signing this object:
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 typing import NamedTuple | |
| from mypy_extensions import TypedDict | |
| A = TypedDict("A", { # error: Recursive types not fully supported yet, nested types replaced with "Any" | |
| "b": B, | |
| "c": C | |
| }) | |
| B = TypedDict("B", { |
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
| fn mergesort(unsorted: &[u32]) -> Vec<u32> { | |
| let n = unsorted.len(); | |
| if n < 2 { | |
| return unsorted.to_vec(); | |
| } | |
| let sorted_child1 = mergesort(&unsorted[..n/2]); | |
| let sorted_child2 = mergesort(&unsorted[n/2..]); | |
| let mut ptr1 = 0; | |
| let mut ptr2 = 0; | |
| let mut sorted = vec![]; |
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
| // Diamond Kata with a TDD approach. First attempt | |
| 'use strict'; | |
| module.exports.Diamond = Diamond; | |
| // Encapsulate line printing | |
| function Letter(char, spaces) { | |
| this._char = char; | |
| this._spaces = spaces; |
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 functools import wraps | |
| from tornado.concurrent import return_future | |
| class CoroutineMaker(object): | |
| """ Convert a callback-based async function to a coroutine. | |
| The Tornado utility gen.Task is quite useful to convert callback-based | |
| async functions to coroutines, but has an important drawback: it expects | |
| the callback to be passed to the function in a keyword parameter |
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
| # Python replacement for Encode.java used in OpenAM | |
| # | |
| # Author: Arnau orriols | |
| from hashlib import sha1 | |
| from base64 import b64encode | |
| from sys import argv | |
| def encode(string): | |
| return b64encode(sha1(string).digest()) |