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
#!/bin/bash | |
set -x | |
# Must have gfortran, gcc, g++ installed of the same version | |
# sudo apt install gfortran-11 gcc-11 g++-11 | |
pip uninstall numpy | |
git clone git@github.com:numpy/numpy.git | |
cd numpy | |
git submodule update --init |
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
SRC_DIR := src | |
OBJ_DIR := obj | |
BIN_DIR := bin | |
EXE := $(BIN_DIR)/aliceGame | |
SRC := $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) | |
OBJ := $(SRC:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o) | |
CPPFLAGS := -Iinclude -std=c++98 | |
CFLAGS := -Wall |
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
def something(): | |
c = 1 | |
return 1 + 2 * c |
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
❯ python scripts/tokenToReadable.py "1+2*c" | |
['eval_input', | |
['testlist', | |
['test', | |
['or_test', | |
['and_test', | |
['not_test', | |
['comparison', | |
['expr', | |
['xor_expr', |
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
>>> from pprint import pprint | |
>>> import parser | |
>>> string = parser.expr("1+2*c") | |
>>> pprint(parser.st2list(string)) | |
[258, | |
[332, | |
[306, | |
[310, | |
[311, | |
[312, |
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
.file "postproc.cpp" | |
.text | |
.globl main | |
.type main, @function | |
main: | |
.LFB0: | |
.cfi_startproc | |
endbr64 | |
pushq %rbp | |
.cfi_def_cfa_offset 16 |
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
#define retCode 0 | |
#define condition | |
int main(int argc, char** argv){ | |
// this is the top of main | |
#ifdef condition | |
int a; | |
#else | |
int b; | |
#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
{"lastUpload":"2019-12-29T20:34:44.957Z","extensionVersion":"v3.4.3"} |