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
import numpy as np | |
from torchvision import datasets | |
from matplotlib import pyplot as plt | |
np.random.seed(42) | |
class Sigmoid: | |
@staticmethod | |
def forward(z): | |
return 1. / (1. + np.exp(-z)) |
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
import matplotlib.pyplot as plt | |
from sklearn import datasets | |
import numpy as np | |
# fix the seed for determinism | |
np.random.seed(42) | |
def cost(pred, true): | |
return 0.5 * (true - pred) ** 2 |
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
#include <iostream> | |
#include <memory> | |
struct Data { | |
virtual ~Data() = default; | |
}; | |
struct TcpData : public Data { | |
int x; | |
}; |
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
#include <iostream> | |
struct Point2 { | |
float x, y; | |
}; | |
template<std::size_t I, typename T> | |
struct CoordGetter; | |
template<> |
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
0000083d <func()>: | |
Widget func() { | |
83d: 55 push ebp | |
83e: 89 e5 mov ebp,esp | |
840: 56 push esi | |
841: 53 push ebx | |
842: 83 ec 20 sub esp,0x20 | |
845: e8 e2 02 00 00 call b2c <__x86.get_pc_thunk.si> | |
84a: 81 c6 6a 27 00 00 add esi,0x276a | |
; CDECL setup stuff |
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
// SPDX-License-Identifier: GPL-2.0 | |
/* | |
* Many of the syscalls used in this file expect some of the arguments | |
* to be __user pointers not __kernel pointers. To limit the sparse | |
* noise, turn off sparse checking for this file. | |
*/ | |
#ifdef __CHECKER__ | |
#undef __CHECKER__ | |
#warning "Sparse checking disabled for this file" | |
#endif |
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
THE SONNETS | |
by William Shakespeare | |
I | |
From fairest creatures we desire increase, |