Skip to content

Instantly share code, notes, and snippets.

View serjflint's full-sized avatar

Sergei Iakhnitskii serjflint

  • Philadelphia, PA
View GitHub Profile
@serjflint
serjflint / animecards_v35.lua
Created August 4, 2024 11:26
Fixed macOS audio: mp3 to m4a
------------- Instructions -------------
-- -- Video Demonstration: https://www.youtube.com/watch?v=M4t7HYS73ZQ
--
-- -- Open clipboard inserter https://anacreondjt.gitlab.io/docs/texthooker/
-- -- Open your anime with japanese subtitles in MPV
-- -- Wait for unknown word and add it to anki through yomichan
-- -- Select all the subtitle lines you wish to add to the card.
-- -- Ctrl + c
-- -- Tab back to MPV and Ctrl + v
-- -- Done. The lines, their respective Audio and the current paused image
@serjflint
serjflint / ruff_missing_pylint.py
Last active August 19, 2024 20:34
Get missing pylint rules for ruff
import subprocess
pipeline = [
'curl https://api.github.com/repos/astral-sh/ruff/issues/970',
'jq -r .body',
"grep -F '[ ]'",
"grep -v '\~'",
]
cmd = " | ".join(pipeline)
missing = {}
@serjflint
serjflint / ruff_missing_pylint.md
Created August 19, 2024 20:29
Currently missing pylint rules in ruff
  • access-member-before-definition / E0203
  • anomalous-unicode-escape-in-string / W1402
  • arguments-out-of-order / W1114
  • arguments-renamed / W0237
  • attribute-defined-outside-init / W0201
  • bad-builtin / W0141
  • bad-chained-comparison / W3601
  • bad-except-order / E0701
  • bad-file-encoding / C2503
  • bad-indentation / W0311
@serjflint
serjflint / err.txt
Created September 21, 2024 23:45
Mypy ternary
main.py:3: error: No overload variant of "max" matches argument types "float", "None" [call-overload]
main.py:3: note: Possible overload variants:
main.py:3: note: def [SupportsRichComparisonT] max(SupportsRichComparisonT, SupportsRichComparisonT, /, *_args: SupportsRichComparisonT, key: None = ...) -> SupportsRichComparisonT
main.py:3: note: def [_T] max(_T, _T, /, *_args: _T, key: Callable[[_T], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]) -> _T
main.py:3: note: def [SupportsRichComparisonT] max(Iterable[SupportsRichComparisonT], /, *, key: None = ...) -> SupportsRichComparisonT
main.py:3: note: def [_T] max(Iterable[_T], /, *, key: Callable[[_T], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]) -> _T
main.py:3: note: def [SupportsRichComparisonT, _T] max(Iterable[SupportsRichComparisonT], /, *, key: None = ..., default: _T) -> Union[SupportsRichComparisonT, _T]
main.py:3: note: def [_T1, _T2] max(Iterable[_T1], /, *, key: Callable[[_T1], Union[SupportsDunderLT[Any], S