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
| flex | |
| bison | |
| libelf-dev | |
| libssl-dev | |
| pkg-config | |
| libncurses-dev |
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
| // myvector.h | |
| //in case mutliple files in a project include strvector, | |
| //this instruction says only compile this file once! | |
| #ifndef STRVECTOR_H | |
| #define STRVECTOR_H | |
| #include <algorithm> | |
| #include <iostream> | |
| template<typename T> |
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
| Constant *c; | |
| if (isa<GlobalValue>(c)) { | |
| GlobalValue *gvalue = dyn_cast<GlobalValue>(c); | |
| GlobalVariable *gv = dyn_cast<GlobalVariable>(gvalue); | |
| ConstantInt *ci = dyn_cast<ConstantInt>(gv->getInitializer()); | |
| errs() << ci->getValue(); | |
| } |
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
| #define _XOPEN_SOURCE 700 | |
| #include <fcntl.h> /* open */ | |
| #include <stdint.h> /* uint64_t */ | |
| #include <stdio.h> /* printf */ | |
| #include <stdlib.h> /* size_t */ | |
| #include <unistd.h> /* pread, sysconf */ | |
| typedef struct { | |
| uint64_t pfn : 55; | |
| unsigned int soft_dirty : 1; |
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
| #!/usr/bin/python3 | |
| # Mastery Check-in Quiz Framework built by Sathya Edamadaka for 106L Interview | |
| # This script runs one or more tests as indicated in the file "test_cases", and | |
| # prints out any information about any test failures. Heavily inspired by the CS111 | |
| # autograder, but fundamentally different in usage and structure. | |
| # Usage: | |
| # autograder [test_case_file] | |
| # If test_case_file is provided, it name a file containing test case | |
| # descriptions; otherwise information is read from the file "test_cases." |
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
| use std::collections::HashMap; | |
| let rand = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().subsec_micros(); |
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 <stdlib.h> | |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #include <pthread.h> | |
| static int nthread = 1; | |
| static int round = 0; | |
| struct barrier { |
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 <stdlib.h> | |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #include <pthread.h> | |
| #include <sys/time.h> | |
| #define NBUCKET 5 | |
| #define NKEYS 100000 |
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
| brew install pandoc | |
| brew tap homebrew/cask | |
| brew install --cask basictex | |
| eval "$(/usr/libexec/path_helper)" | |
| # Update $PATH to include `/usr/local/texlive/2020basic/bin/x86_64-darwin` | |
| sudo tlmgr update --self | |
| sudo tlmgr install texliveonfly | |
| sudo tlmgr install xelatex | |
| sudo tlmgr install adjustbox | |
| sudo tlmgr install tcolorbox |
NewerOlder