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: 4
Non-data size: 3
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: catalyst-cooperative/pudl
Commit Name: 6ddae2b8726783558d02b936ebbf84736252f063
Time: 2017-11-28
Author: zane.selvans@catalyst.coop
File Name: pudl/mcoe.py
Class Name:
Method Name: gens_with_bga
Project Name: has2k1/plotnine
Commit Name: 44682f54140e61f260878ad2d2703eecba91e1e9
Time: 2015-04-20
Author: has2k1@gmail.com
File Name: ggplot/facets/locate.py
Class Name:
Method Name: locate_grid
Project Name: has2k1/plotnine
Commit Name: 44682f54140e61f260878ad2d2703eecba91e1e9
Time: 2015-04-20
Author: has2k1@gmail.com
File Name: ggplot/facets/locate.py
Class Name:
Method Name: locate_wrap