\documentclass{article}
\usepackage{catchfile}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage[russian,english]{babel}
\usepackage{minted}
\CatchFileDef{\pathpygmentize}{.pygmentize}{}
\renewcommand{\MintedPygmentize}{\pathpygmentize}
\usepackage[gobble=auto, rerun=always, pygopt={texcomments=true}]{pythontex}
\usepackage{lscape}
\usepackage[a4paper]{geometry}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{hyperref}
\usepackage{mdframed}
\usepackage{import}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{xparse}

\fvset{breaklines, breakafter=0123456789-/}
\setpythontexfv{breaklines, breakafter=0123456789-/, commandchars=\\\{\}}

\newenvironment{shellcode}
  {\VerbatimEnvironment\begin{minted}[escapeinside=!!, breaklines, breakafter=0123456789-/]{sh}}
  {\end{minted}}
\newenvironment{pythoncode}
  {\VerbatimEnvironment\begin{minted}[escapeinside=!!, breaklines, breakafter=0123456789-/]{python}}
  {\end{minted}}
\newenvironment{pythontexcode}
  {\VerbatimEnvironment\begin{mdframed}[leftline=false,rightline=false]\begin{pyblock}[stdout][numbers=left]}
  {\end{pyblock}\end{mdframed}}
\newcommand{\mystdout}{\begin{mdframed}\small{\texttt{\stdoutpythontex[verbatim][breaklines,breakafter=0123456789-/]}}\end{mdframed}}
\newcommand{\mysmallstdout}{\begin{mdframed}\footnotesize{\texttt{\stdoutpythontex[verbatim][breaklines,breakafter=0123456789-/]}}\end{mdframed}}

% Math
\newcommand{\N}{\mathbb N}
\newcommand{\Q}{\mathbb Q}

\DeclarePairedDelimiterX{\set}[1]{\{}{\}}{\setargs{#1}}
\NewDocumentCommand{\setargs}{>{\SplitArgument{1}{;}}m}{\setargsaux#1}
\NewDocumentCommand{\setargsaux}{mm}{\IfNoValueTF{#2}{#1} {#1\,\delimsize|\,\mathopen{}#2}}%{#1\:;\:#2}

% URLs
\newcommand{\refbase}{https://github.com/stagedml/pylightnix/blob/master/docs/Reference.md}
\newcommand{\pref}[2]{\href{\refbase\##2}{#1}}

