Last active
June 20, 2017 14:35
-
-
Save opilar/7885533e5ad4e01e799e193925dee07e to your computer and use it in GitHub Desktop.
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
% Настраиваем общее для всех языков оформление листинга | |
\lstset{ | |
tabsize=4, % длина табуляции в пробелах | |
formfeed=\newpage, % реакция на символ "form feed" | |
extendedchars=true, % используем неанглийские буквы | |
basicstyle=\ttfamily, % базовый стиль | |
commentstyle=\rmfamily\itshape, % стиль для комментариев | |
showspaces=false, | |
showstringspaces=false, | |
numbersep=1em, % расстояние (по горизонтали) от номеров строк до кода | |
} |
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
\begin{lstlisting}[language=Python] | |
class Network(object): | |
def __init__(self, sizes): | |
self.num_layers = len(sizes) | |
self.sizes = sizes | |
self.biases = [np.random.randn(y, 1) for y in sizes[1:]] | |
self.weights = [np.random.randn(y, x) | |
for x, y in zip(sizes[:-1], sizes[1:])] | |
\end{lstlisting} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment