These scripts are used to review papers automatically.
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
import json | |
import sys | |
class ATSFile(object): | |
def __init__(self, name): | |
self.data = json.load(open(name)) | |
self.name = name | |
def dump(self): | |
print self.data.keys() | |
info = self.data["otherinfo"] |
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
# dot -Tsvg -o semijoin-cycle.svg semijoin-cycle.dot | |
digraph { | |
rankdir=TB; | |
subgraph cluster_map2 { | |
label="Map 2"; | |
TS_2 -> JOIN_1 -> JOIN_2 -> FS_1; | |
JOIN_1 -> RS_4; | |
FS_1 -> RS_4 [label="artificial", style="dashed", color="red", constraint=false]; | |
} | |
subgraph cluster_map1 { |
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
import sys, re, os, math, os.path | |
from collections import defaultdict | |
class JStackTrie(object): | |
def __init__(self): | |
self.roots = defaultdict(JStackTrie) | |
self.count = 0 | |
self.name = "root" |
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
CREATE TABLE IF NOT EXISTS passaggi1718 | |
( | |
PASSAGGIO int | |
,DISTINCTTESSERA string | |
,DISTINCTTESSERAXGG string | |
,CODICETESSERA string | |
,PRIMOINGRESSOAX decimal(38,10) | |
,PRIMOINGRESSOCALC decimal(38,10) | |
,PRODLORDO decimal(20,6) | |
,PUNTI decimal(38,10) |
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
-- joins on customer_id == joins on c_customer_sk | |
with | |
sec_year_total as ( | |
select c_customer_sk customer_id | |
,c_preferred_cust_flag customer_preferred_cust_flag | |
,d_year dyear | |
,sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2) year_total | |
,'s' sale_type | |
from customer | |
,store_sales |
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
# coin problem: Given an array of coin denominations, | |
# write a function that returns the minimum number of | |
# coins that make up a given amount N. There is always | |
# a coin of value 1 in the coin denominations, so you | |
# don't have to worry about amounts that cannot possibly | |
# be formed. | |
# Example: | |
# 23, {1,7,9} should return 3 (two 7s + 9); | |
# 21, {1,7,9} should return 3 (three 7s); |
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
CWD=$(dirname $0) | |
DAGZ=$1 | |
DAGID=$(basename $1 .zip) | |
HADOOP_CP=$(which hadoop && hadoop classpath) | |
function RUNJAR { | |
java -cp $HADOOP_CP:$CWD/*:$CWD/lib/*: org.apache.tez.analyzer.plugins.AnalyzerDriver $* | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="WARN"> | |
<Appenders> | |
<RollingFile name="RollingFile" filename="log/test.log" | |
filepattern="${logPath}/test.log"> | |
<PatternLayout pattern="%msg%n" /> | |
<Policies> | |
<SizeBasedTriggeringPolicy size="100 MB" /> | |
</Policies> | |
<DefaultRolloverStrategy max="20" /> |
Download Eclipse MAT
Edit MemoryAnalyzer.ini change -vmargs to use -Xmx4G
Run
./ParseHeapDump.sh file.hprof org.eclipse.mat.api:suspects org.eclipse.mat.api:overview org.eclipse.mat.api:top_components