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
| git log -n 100 -p path_to_file | Select-String "quoted" | |
| // -n for n last changes | |
| // -p for actual diff |
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
| if __name__ == "__main__": | |
| pass | |
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
| import subprocess | |
| command = "dir \n ls" | |
| p = subprocess.Popen(command, stdout = subprocess.PIPE, stderr = None, shell = True) | |
| print p.communicate() |
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
| template <class T> | |
| std::ostream &operator<<(std::ostream &os, const std::vector<T> &v) | |
| { | |
| os << "["; | |
| for (const T &p : v) | |
| os << p << ", "; | |
| os << "]"; | |
| return os; | |
| } |
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
| fstream csvk; | |
| csvk.open("../output/stub_run.csv", fstream::ate | fstream::in | fstream::out); | |
| // consult: https://en.cppreference.com/w/cpp/io/basic_filebuf/open | |
| csvk << "Can write there!; blah blah\n"; csvk.flush(); |
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
| git checkout filename | |
| git checkout -- filename # if it happend to clash with branch name |
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
| cd release | |
| cmake -DCMAKE_BUILD_TYPE=Debug .. |
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
| uint64_t size = 0; | |
| for(auto n : neighbours){ | |
| size += n.size() * sizeof(uint32_t); | |
| } | |
| cout<< "Loaded large graph. Size of adj. list is: " << size << endl; |
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
| attr(obj, 'name') <- value | |
| attributes(obj) |
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
| plot(sapply(nets, gorder), sapply(nets, gsize), | |
| xlab="vertices", ylab="edges") | |
| text(sapply(nets, gorder), sapply(nets, gsize), labels = netNames, pos = c(3, 4, 4, 4, 4, 2, 3, 2, 3)) | |
| ######### pos: vector of label locations: 1-below, 2-left, 3-above, 4-right; may be just a single number | |
| ######### the same ploting series must be passed to the plot and text. May use with(df, ...) for convenience |