Skip to content

Instantly share code, notes, and snippets.

@Krowemoh
Krowemoh / codec
Last active Sep 25, 2022
Get the video and audio codec information for a file
View codec
#!/usr/bin/env python3
import os
import subprocess
import sys
if len(sys.argv) < 2:
print("Incorrect number of arguments.")
sys.exit(1)
View Multivalue Delimiters.md
Delim Ascii Dec Hex Desc
@RM ÿ 255 FF Row mark. Separates rows.
@FM þ 254 FE Field mark. Separates columns within a row.
@VM ý 253 FD Value mark. Separates values within a column.
@SVM ü 252 FC Sub-value mark. Separates sub-values within a multi-valued column.
@TM û 251 FB Text mark. Separates lines in a text column.
@STM ú 250 FA Subtext mark. Separates sub-lines of text.
@Krowemoh
Krowemoh / undef
Created Jul 27, 2022
Remove ifdefs dependng on which defines are set
View undef
#!/usr/bin/env python3
import sys
f = open(sys.argv[1], "r")
lines = f.readlines()
symbolTable = { }
View mvbasic.json
{
"ABORT": {
"prefix": "ABORT",
"body": ["ABORT $1"],
"description": "Use the ABORT statement to terminate execution of a BASIC program and return to the UniVerse prompt."
},
"ABS": {
"prefix": "ABS",
"body": ["ABS($1)"],
"description": "Use the ABS function to return the absolute value of any numeric expression."
@Krowemoh
Krowemoh / unibasic.snippets
Created Mar 28, 2022
Snippets for functions in Universe and Unidata
View unibasic.snippets
snippet ABORT "Use the ABORT statement to terminate execution of a BASIC program and return to the UniVerse prompt." b
ABORT [expression …]
endsnippet
snippet ABS "Use the ABS function to return the absolute value of any numeric expression." b
ABS(expression)
endsnippet
snippet ABSS "Use the ABSS function to return the absolute values of all the elements in a dynamic array." b
ABSS(dynamic.array)
endsnippet
snippet ACOS "Use the ACOS function to return the trigonometric arc-cosine of expression." b