Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

add rating and reliability support for code challenges #21

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.iml
*.ipr
*.iws
5 changes: 4 additions & 1 deletion build_data_loader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
excludes="${packagedir}/**/SiteCrawler.java,${packagedir}/dwload/cloudspokes/**/*.java,${packagedir}/**/ProcessJiraPayments.java"
debug="true"
nowarn="true"
verbose="${verbose}">
verbose="${verbose}"
source="1.5"
target="1.5"
>
<classpath refid="buildlibs"/>
</javac>
</target>
Expand Down
Binary file not shown.
Binary file not shown.
13 changes: 10 additions & 3 deletions scripts/dde/DWLoad.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
CP=../conf:../build/classes:../jars/configmanager_xerces-1.4.4.jar:../jars/tcsUtil.jar:$CLASSPATH

java -cp $CP com.topcoder.dde.util.DWLoad.DWLoad $1
BASE=../..
CP=""
CP=$CP:$BASE/resources
CP=$CP:$BASE/lib/jars/log4j-1.2.7.jar
CP=$CP:$BASE/lib/jars/ifxjdbc.jar
CP=$CP:$BASE/lib/jars/tcs/shared.jar
CP=$CP:$BASE/build/classes
CP=$CP:$BASE/build/tcs_dw_loader.jar
echo $CP
java -cp $CP com.topcoder.shared.util.dwload.TCLoadUtility -xmlfile $1
6 changes: 6 additions & 0 deletions scripts/dde/DWLoad.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
<loadDefinition>
<sourcedb>jdbc:informix-sqli://192.168.14.51:2020/tcs_catalog:INFORMIXSERVER=informixoltp_tcp;user=coder;password=xxx</sourcedb>
<targetdb>jdbc:informix-sqli://192.168.14.52:2022/tcs_dw:INFORMIXSERVER=datawarehouse_tcp;user=coder;password=xxx</targetdb>
<load>
<classname>com.topcoder.utilities.dwload.TCLoadTCS</classname>
<parameterList>
<parameter name="submission_dir" value="file:/tcssubmissions/"/>
</parameterList>
</load>
</loadDefinition>
8 changes: 8 additions & 0 deletions scripts/dde/RatingQubits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@
<Property name="HistoryLength">
<Value>300</Value>
</Property>
<Property name="PhaseIds">
<Value>150</Value>
<Value>149</Value>
</Property>
<Property name="CutOffs">
<Value>06/01/2010 06:06:06</Value>
<Value>NULL</Value>
</Property>
</CMConfig>
1 change: 1 addition & 0 deletions scripts/dde/ReliabilityCalculationUtility.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.topcoder.reliability.ReliabilityCalculationUtility=ReliabilityCalculationUtility.xml
191 changes: 191 additions & 0 deletions scripts/dde/ReliabilityCalculationUtility.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<?xml version="1.0"?>
<CMConfig>
<Config name="com.topcoder.reliability.ReliabilityCalculationUtility">
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
<Property name="objectFactoryConfig">
<Property name="ReliabilityCalculatorImpl">
<Property name="type">
<Value>com.topcoder.reliability.impl.ReliabilityCalculatorImpl</Value>
</Property>
</Property>
</Property>
<Property name="reliabilityCalculator1">

<Property name="projectCategoryIds">
<Value>1</Value>
<Value>2</Value>
<Value>6</Value>
<Value>7</Value>
<Value>13</Value>
<Value>14</Value>
<Value>19</Value>
<Value>23</Value>
<Value>24</Value>
<Value>26</Value>
<Value>39</Value>
</Property>
<Property name="key">
<Value>ReliabilityCalculatorImpl</Value>
</Property>
<Property name="config">
<Property name="includedProjectStatuses">
<Value>1</Value>
<Value>2</Value>
<Value>7</Value>
</Property>
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
<Property name="objectFactoryConfig">
<Property name="DatabaseReliabilityDataPersistence">
<Property name="type">
<Value>com.topcoder.reliability.impl.persistence.DatabaseReliabilityDataPersistence</Value>
</Property>
</Property>
<Property name="UserProjectParticipationDataResolutionDateBasedComparator">
<Property name="type">
<Value>com.topcoder.reliability.impl.comparators.UserProjectParticipationDataResolutionDateBasedComparator</Value>
</Property>
</Property>
<Property name="UniformUserReliabilityCalculator">
<Property name="type">
<Value>com.topcoder.reliability.impl.calculators.UniformUserReliabilityCalculator</Value>
</Property>
</Property>
<Property name="WeightedUserReliabilityCalculator">
<Property name="type">
<Value>com.topcoder.reliability.impl.calculators.WeightedUserReliabilityCalculator</Value>
</Property>
</Property>
<Property name="PhaseEndTimeBasedResolutionDateDetector">
<Property name="type">
<Value>com.topcoder.reliability.impl.detectors.PhaseEndTimeBasedResolutionDateDetector</Value>
</Property>
</Property>
</Property>
<Property name="reliabilityDataPersistenceKey">
<Value>DatabaseReliabilityDataPersistence</Value>
</Property>
<Property name="reliabilityDataPersistenceConfig">

<Property name="loggerName">
<Value>myLogger</Value>
</Property>
<Property name="dbConnectionFactoryConfig">
<Property name="com.topcoder.db.connectionfactory.DBConnectionFactoryImpl">
<Property name="connections">
<Property name="default">
<Value>myConnection</Value>
</Property>
<Property name="myConnection">
<Property name="producer">
<Value>com.topcoder.db.connectionfactory.producers.JDBCConnectionProducer</Value>
</Property>
<Property name="parameters">
<Property name="jdbc_driver">
<Value>com.informix.jdbc.IfxDriver</Value>
</Property>
<Property name="jdbc_url">
<Value>jdbc:informix-sqli://env.topcoder.com:2021/tcs_catalog:INFORMIXSERVER=informixoltp_tcp</Value>
</Property>
<Property name="SelectMethod">
<Value>cursor</Value>
</Property>
<Property name="user">
<Value>informix</Value>
</Property>
<Property name="password">
<Value>1nf0rm1x</Value>
</Property>
</Property>
</Property>
</Property>
</Property>
</Property>
<Property name="connectionName">
<Value>myConnection</Value>
</Property>
</Property>
<Property name="participationDataComparatorKey">
<Value>UserProjectParticipationDataResolutionDateBasedComparator</Value>
</Property>
<Property name="projectCategoryConfig1">
<Property name="projectCategoryIds">
<Value>1</Value>
<Value>2</Value>
<Value>3</Value>
<Value>39</Value>
</Property>
<Property name="reliabilityStartDate">
<Value>2005-10-05 09:00</Value>
</Property>
<Property name="userReliabilityCalculatorKey">
<Value>UniformUserReliabilityCalculator</Value>
</Property>
<Property name="userReliabilityCalculatorConfig">
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
<Property name="historyLength">
<Value>15</Value>
</Property>
</Property>
<Property name="resolutionDateDetectorKey">
<Value>PhaseEndTimeBasedResolutionDateDetector</Value>
</Property>
<Property name="resolutionDateDetectorConfig">
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
</Property>
</Property>
<Property name="projectCategoryConfig2">
<Property name="projectCategoryIds">
<Value>6</Value>
<Value>7</Value>
<Value>13</Value>
<Value>14</Value>
<Value>19</Value>
<Value>23</Value>
<Value>24</Value>
<Value>26</Value>
<Value>39</Value>
</Property>
<Property name="reliabilityStartDate">
<Value>2009-03-23 00:00</Value>
</Property>
<Property name="userReliabilityCalculatorKey">
<Value>WeightedUserReliabilityCalculator</Value>
</Property>
<Property name="userReliabilityCalculatorConfig">
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
<Property name="weights">
<Value>0.82</Value>
<Value>0.84</Value>
<Value>0.86</Value>
<Value>0.88</Value>
<Value>0.9</Value>
<Value>0.92</Value>
<Value>0.94</Value>
<Value>0.96</Value>
<Value>0.98</Value>
<Value>1.00</Value>
</Property>
</Property>
<Property name="resolutionDateDetectorKey">
<Value>PhaseEndTimeBasedResolutionDateDetector</Value>
</Property>
<Property name="resolutionDateDetectorConfig">
<Property name="loggerName">
<Value>myLogger</Value>
</Property>
</Property>
</Property>
</Property>
</Property>
</Config>
</CMConfig>
8 changes: 5 additions & 3 deletions scripts/dde/runRatings.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
BASE=../..
mkdir -p $BASE/resources/com/topcoder/dde/util/DWLoad
cp -f RatingQubits.xml $BASE/resources/com/topcoder/dde/util/DWLoad
CP=""
CP=$CP:$BASE/conf
CP=$CP:$BASE/resources
CP=$CP:$BASE/lib/jars/log4j.jar
CP=$CP:$BASE/lib/jars/ifxjdbc.jar
CP=$CP:$BASE/lib/jars/jdbc7.0-1.2.jar
CP=$CP:$BASE/lib/jars/xml/xerces/xercesImpl.jar
CP=$CP:$BASE/build/classes
CP=$CP:$BASE/lib/jars/tcs/shared.jar
CP=$CP:$BASE/lib/jars/log4j-1.2.7.jar
CP=$CP:$BASE/lib/jars/tcsUtil.jar
CP=$CP:$BASE/lib/jars/configmanager2.jar
CP=$CP:$BASE/lib/jars/jboss/xercesImpl.jar
CP=$CP:$BASE/lib/jars/jboss/xml-apis.jar

nohup java -cp $CP com.topcoder.dde.util.DWLoad.RatingQubits >> ./ratings.log 2>&1 &
nohup java -cp $CP com.topcoder.dde.util.DWLoad.RatingQubits > ./ratings.log 2>&1 &
31 changes: 17 additions & 14 deletions scripts/dde/runReliability.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/bin/sh
CP=$CP:/home/tc/web/conf
CP=$CP:/home/tc/web/build/classes
CP=$CP:/home/tc/web/lib/jars/log4j-1.2.7.jar
CP=$CP:/home/tc/web/lib/jars/ifxjdbc.jar
CP=$CP:/home/tc/web/lib/jars/tcs/configuration_manager/2.1.3/configuration_manager.jar
CP=$CP:/home/tc/web/lib/jars/tcsUtil.jar:
CP=$CP:/home/tc/web/lib/jars/jboss/xml-apis.jar:
CP=$CP:/home/tc/web/lib/jars/jboss/xalan.jar:
CP=$CP:/home/tc/web/lib/jars/jboss/xercesImpl.jar:
CP=$CP:/home/tc/jboss-4.0.4.GA/server/all/lib/shared.jar
CP=$CP:/home/tc/jboss-4.0.4.GA/client/jbossall-client.jar
CP=$CP:/home/tc/jboss-4.0.4.GA/server/all/conf/cache.properties
echo $CP
BASE=../..
CP=$CP:$BASE/resources
CP=$CP:$BASE/lib/jars/log4j-1.2.7.jar
CP=$CP:$BASE/lib/jars/ifxjdbc.jar
CP=$CP:$BASE/lib/jars/tcs/base_exception/2.0.0/base_exception.jar
CP=$CP:$BASE/lib/jars/tcs/configuration_api/1.1.0/configuration_api.jar
CP=$CP:$BASE/lib/jars/tcs/configuration_persistence/1.0.2/configuration_persistence.jar
CP=$CP:$BASE/lib/jars/tcs/logging_wrapper.jar
CP=$CP:$BASE/lib/jars/tcs/command_line_utility/1.0.0/command_line_utility.jar
CP=$CP:$BASE/lib/jars/tcs/db_connection_factory/1.1/db_connection_factory.jar
CP=$CP:$BASE/lib/jars/tcs/object_factory/2.0/object_factory.jar
CP=$CP:$BASE/lib/jars/tcs/object_factory_configuration_api_plugin/1.0.0/object_factory_configuration_api_plugin.jar
CP=$CP:$BASE/lib/jars/tcs/object_formatter/1.0.0/object_formatter.jar
CP=$CP:$BASE/lib/jars/tcs/typesafe_enum/1.0/typesafe_enum.jar
CP=$CP:$BASE/lib/jars/tcs/configuration_manager/2.1.5/configuration_manager.jar
CP=$CP:$BASE/lib/jars/tcs/reliability_calculator/1.0.4/reliability_calculator.jar

java -cp $CP com.topcoder.dde.util.DWLoad.ReliabilityRating
java -cp $CP com.topcoder.reliability.ReliabilityCalculationUtility -c ReliabilityCalculationUtility.properties
Loading