ccd5394d688a3eadfcae0ce9e59a395537d6317e,log_manager.py,Logging,get_fundschange_chart,#Logging#Any#,298
Before Change
def get_fundschange_chart(self,strategy):
try:
y = round(self.log_data_file[self.log_data_file["Template"] == strategy][
["FinalFundsChange", "GameID"]].drop_duplicates(subset=["GameID"])["FinalFundsChange"], 2)
except:
y=[0]
After Change
def get_fundschange_chart(self,strategy):
try:
cursor = self.mongodb.games.aggregate([
{"$match": {"Template": strategy}},
{"$group": {
"_id": None,
"FinalFundsChange": {"$push": "$FinalFundsChange"}
}}
])
y = list(cursor)[0]["FinalFundsChange"]
except:
y=[0]
return y
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dickreuter/Poker
Commit Name: ccd5394d688a3eadfcae0ce9e59a395537d6317e
Time: 2016-09-04
Author: dickreuter@yahoo.com
File Name: log_manager.py
Class Name: Logging
Method Name: get_fundschange_chart
Project Name: bokeh/bokeh
Commit Name: 7a0e6c25287043240e92932055160bb78ad35760
Time: 2016-01-25
Author: bcollins@continuum.io
File Name: examples/app/crossfilter/main.py
Class Name: PlotView
Method Name: create_bar
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