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
# HERE import all functions/classes to generate documentation for | |
from covidseg.dataset_reduction import reduce_dataset | |
from covidseg.inference import inference | |
# Generate docstrings | |
def __docs(m): | |
""" | |
Generates simple docstring for python module. | |
""" | |
file = f"\nFILE: {m.__file__}" if hasattr(m, '__file__') else "" |
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
.shadow1 { | |
box-shadow: inset 0 0 10px rgba(0,0,0,0.10); | |
background: #f1f1f1; | |
opacity: 0; | |
animation: 500ms show forwards; | |
animation-delay: 2s; | |
} | |
.shadow2 { | |
box-shadow: inset 0 0 10px rgba(0,0,0,0.25); | |
background: #e1e1e1; |
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
/** | |
* Throttle function to reduce number of events | |
* coming from event stream | |
* | |
* Useful for reducing number of updates coming from | |
* mousemove events or such. | |
* | |
* @param time - in miliseconds | |
* @param callback - event callback see example below. | |
* |
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 htmlelements = [ | |
"html", | |
"base", | |
"head", | |
"link", | |
"meta", | |
"style", | |
"title", |
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
# Remap keys (macOS) | |
# remaps "§" to "`" | |
hidutil property --set '{"UserKeyMapping":[ | |
{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064}, | |
{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035} | |
]}' > /dev/null 2>&1 | |
# Store file at home directory. | |
# System Preferences > Users & Groups > Login Items > + button and add script |
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
ffmpeg -i <input_video> -vf subtitles=<srt_path> <output_video_path> |
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
module Main exposing (main) | |
import Browser | |
import Html exposing (Html, button, div, text) | |
import Html.Events exposing (onClick) | |
main = | |
text | |
-- <| String.fromInt(length [1,2,3,4]) | |
-- <| Debug.toString(member 10 [1,2,3]) |
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 { exec } = require('child_process'); | |
const Reset = "\x1b[0m" | |
const FgBlack = "\x1b[30m" | |
const FgRed = "\x1b[31m" | |
const FgGreen = "\x1b[32m" | |
const FgYellow = "\x1b[33m" | |
const FgBlue = "\x1b[34m" |
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 { exec } = require('child_process'); | |
const re = /(?<width>[0-9]+)x(?<height>[0-9]+)/ | |
function fileDims(fname) { | |
if (re.test(fname)) { | |
const { width, height } = re.exec(fname).groups | |
return { |
NewerOlder