This file contains hidden or 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
/* | |
Desc: Read data from the data stream that implements the interface io.Reader (e.g., os.Stdin) | |
Variables: | |
- r io.Reader (interface) | |
Functions: | |
- s.Split(): Split sets the split function for the Scanner. The default split function is ScanLines. The input is split into tokens by the split function. | |
- Alternative: ScanBytes, ScanLines, ScanRunes, ScanWords. | |
- s.Scan(): Scan advances the Scanner to the next token. |
This file contains hidden or 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
# Function for setting the seed | |
def set_seed(seed): | |
np.random.seed(seed) | |
torch.manual_seed(seed) | |
if torch.cuda.is_available(): # GPU operation have separate seed | |
torch.cuda.manual_seed(seed) | |
torch.cuda.manual_seed_all(seed) | |
set_seed(42) |
This file contains hidden or 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
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
# |<---- Preferably using up to 50 chars --->|<------------------->| | |
# Example: | |
# [feat] Implement automated commit messages | |
# (Optional) Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# (Optional) Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
This file contains hidden or 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 <map> | |
#include <set> | |
#include <cmath> | |
#include <queue> | |
#include <cstdio> | |
#include <string> | |
#include <vector> | |
#include <cstring> | |
#include <algorithm> |
This file contains hidden or 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
<scheme name="Atom One Dark" version="142" parent_scheme="Darcula"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2020-07-03T00:00:04</property> | |
<property name="ide">CLion</property> | |
<property name="ideVersion">2020.1.0.0</property> | |
<property name="modified">2020-07-03T00:00:16</property> | |
<property name="originalScheme">_@user_Atom One Dark</property> | |
</metaInfo> | |
<option name="LINE_SPACING" value="1.2" /> |