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
import torch | |
import time | |
from typing import List, Tuple | |
import platform | |
def get_available_devices() -> List[str]: | |
"""Return list of available devices for PyTorch computation. | |
Returns: | |
List[str]: List containing available devices ('cpu', 'cuda', 'mps'). |
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
set -g mouse on | |
bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" | |
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
import sys | |
import os | |
import requests | |
import json | |
import pprint | |
print(sys.argv) | |
if len(sys.argv) > 1: | |
release_id = sys.argv[1] | |
else: |
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
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
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 datetime import datetime, date | |
import json | |
import os | |
import sys | |
import glob | |
import re | |
import csv | |
def make_page(outfile, props, mdoutlines, body_text, created_time, source): | |
print('giugjg' +outfile) |
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
# https://www.microsoft.com/store/productId/9PJPW5LDXLZ5 | |
# choco install ffpmeg ptime | |
# pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 whisper-ai | |
import whisper | |
model = whisper.load_model("base") # medium | |
result = model.transcribe("C:\\Users\\Rich Barrett-Small\\Music\\Sunday_Feature_-_Silent_Witness_-_John_Cage_Zen_and_Japan_m000kwm0_original.m4a") | |
print(result["text"]) | |
print(result) |
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
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
" Plugins will be downloaded under the specified directory. | |
call plug#begin('~/.vim/plugged') | |
" Declare the list of plugins. |
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
#!/bin/bash | |
mkdir -p out | |
for filename in *.txt; do | |
[ -e "$filename" ] || continue | |
outfile=out/$(head -n 1 "$filename" | tr -d '\r?\n' | tr '/' ' ').txt | |
[ -e "$outfile" ] && outfile=out/$(head -n 1 "$filename" | tr -d '\r?\n' | tr '/' ' ')$(gdate +%s%N).txt | |
tail -n +2 "$filename" > "$outfile" | |
touch -r "$filename" "$outfile" | |
done; |
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
// Ctrl is mapped to the Command keys (and the usual Ctrl keys). | |
partial modifier_keys | |
xkb_symbols "command_ctrl_mac" { | |
key <LWIN> { [ Control_L ] }; | |
key <RWIN> { [ Control_R ] }; | |
key <LALT> { [ Super_L ] }; | |
modifier_map Control { <LWIN>, <RWIN> }; | |
// modifier_map Mod1 { Alt_L, Alt_R }; | |
modifier_map Mod4 { <LALT> }; | |
}; |
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
host 10.0.2.* | |
ForwardAgent yes | |
host * | |
UseKeychain yes | |
AddKeysToAgent yes |
NewerOlder