d60a9e5ed2a4835f96a6f9a02ce7b18e8e2efaa3,log_manager.py,Logging,get_strategy_total_funds_change,#Logging#Any#Any#,251
Before Change
return len(y)
def get_strategy_total_funds_change(self, strategy, days):
y=self.get_fundschange_chart(strategy)
return sum(y[-days:])
def get_fundschange_chart(self,strategy):
try:
cursor = self.mongodb.games.aggregate([
After Change
return list(cursor)[0]["count"]
def get_strategy_total_funds_change(self, strategy, days):
cursor = self.mongodb.games.aggregate([
{"$match": {"Template": {"$regex": strategy}}},
{"$limit": days},
{"$group": {
"_id": "none",
"FinalFundsChange": {"$sum": "$FinalFundsChange"}},
}
])
return list(cursor)[0]["FinalFundsChange"]
def get_fundschange_chart(self,strategy):
try:
cursor = self.mongodb.games.aggregate([
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dickreuter/Poker
Commit Name: d60a9e5ed2a4835f96a6f9a02ce7b18e8e2efaa3
Time: 2016-09-07
Author: dickreuter@yahoo.com
File Name: log_manager.py
Class Name: Logging
Method Name: get_strategy_total_funds_change
Project Name: dickreuter/Poker
Commit Name: d60a9e5ed2a4835f96a6f9a02ce7b18e8e2efaa3
Time: 2016-09-07
Author: dickreuter@yahoo.com
File Name: log_manager.py
Class Name: Logging
Method Name: get_game_count
Project Name: rushter/MLAlgorithms
Commit Name: 507a5ef9b0285e118fcbc3f8d9995b8ed37a69e9
Time: 2016-11-18
Author: nh.nicolas.hug@gmail.com
File Name: mla/knn.py
Class Name: KNN
Method Name: _predict_x