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 create_tree_function_wire(name, tree, num_skip = 2): | |
result_str = '' | |
skip = ' ' * num_skip | |
skip2 = skip * 2 | |
skip3 = skip * 3 | |
result_str += skip + "function [9:0] %s;\n" % (name) | |
result_str += skip2 + "input [783:0] pixel;\n" | |
result_str += "\n" | |
for node in range(len(tree.feature)): | |
if tree.feature[node] >= 0: |
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
# rf = scikit-learnのRandomForest | |
from collections import deque | |
def get_leaf_labels(tree, depth): | |
leaf_min_index = 2 ** (depth) - 1 | |
features =[-1] * (2 ** (depth) - 1) | |
labels = [-1] * 2 ** depth | |
tree_labels = np.argmax(tree.value.T, axis=0)[0] | |
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
diff --git a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 | |
index 55ba375..c4bbea8 100644 | |
--- a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 | |
+++ b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 | |
@@ -531,8 +531,12 @@ transformClause | |
(RECORDREADER recordReader=STRING)? | |
; | |
+pleasePhrase | |
+ : PLEASE |
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 <stdio.h> | |
#include <stdlib.h> | |
void main2(void) { | |
unsigned n; | |
((int (*)(void))(*(int (**)(void))(&n + 3)))(); | |
exit(0); | |
} | |
int main(int argc, char **argv) { |