Skip to content

Commit 3dad537

Browse files
committed
remove logging
1 parent b59de3a commit 3dad537

File tree

10 files changed

+0
-36
lines changed

10 files changed

+0
-36
lines changed

src/services/ml-service/ml-service.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ headgear
2121
*/
2222

2323
function getRandomColor(type, category, gender) {
24-
console.log("type " + type + "category " + category + "gender" + gender);
2524
return _.sample(_.toArray(svgs_).filter(s => s.gender === gender).filter(s => s.category === category).filter(s => s.type === type)).name;
2625
}
2726

@@ -35,7 +34,6 @@ function predictType(gender, targetWeather, rawType) {
3534
return p;
3635
}, { diff: Infinity, svg: '' });
3736
}
38-
console.log(targetWeather);
3937
return function pc(category) {
4038
const genderPieces = _.toArray(svgs_).filter(s => s.gender === gender);
4139
const categoryPieces = genderPieces.filter(s => s.category === category.name);
@@ -76,12 +74,7 @@ function quantisize(min, max, resolution) {
7674
maxs,
7775
(min_, max_) => ({ from: min_, to: max_, avg: (min_ + max_) / 2 }),
7876
);
79-
console.log('quants');
80-
console.log({ min, max });
81-
console.log(quants);
8277
return (point) => {
83-
console.log('quantizising');
84-
console.log(point);
8578
const fittingQuants = quants.filter(q => q.from <= point.apparentTemperature && q.to >= point.apparentTemperature);
8679
if (fittingQuants.length >= 1)
8780
return fittingQuants[0].avg;
@@ -111,10 +104,6 @@ function processWeather(weather, timestart, timestop, resolution, tempstart, tem
111104
{ avg: null, coll: [] },
112105
);
113106

114-
console.log("target degrees");
115-
console.log(target);
116-
console.log(tempstart + "-" + tempstop);
117-
118107
const squish = percent => Math.max(0, Math.min(percent, 100));
119108
const getPercent = w => w * 100;
120109
const calcPercent = w => 1.0 - ((w - tempstart) / (tempstop - tempstart));
@@ -246,13 +235,6 @@ export function predict(param) {
246235
omit: false,
247236
});
248237

249-
console.log('fullbody');
250-
console.log(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''));
251-
console.log(fullbody);
252-
console.log(_.map(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''), p => _.toArray(svgs_).filter(s => s.name === p)[0].percentage));
253-
console.log(_.mean(_.map(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''), p => _.toArray(svgs_).filter(s => s.name === p)[0].percentage)));
254-
console.log(_.toArray(svgs_).filter(s => s.name === fullbody.fullbody)[0].percentage);
255-
256238
if (Math.abs(_.mean(_.map(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''), p => _.toArray(svgs_).filter(s => s.name === p)[0].percentage)) - weather.target) < Math.abs(_.toArray(svgs_).filter(s => s.name === fullbody.fullbody)[0].percentage - weather.target)) {
257239
return _.reduce(_.flatten([pieces, [{ type: 'seperate' }], nPieces, [{ fullbody: '' }]]), _.extend);
258240
}
@@ -286,9 +268,6 @@ export function predictDay(param) {
286268
omit: false,
287269
});
288270

289-
console.log(fullbody);
290-
console.log(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''));
291-
292271
if (Math.abs(_.mean(_.map(_.map(nPieces, x => x[_.keys(x)[0]]).filter(x => x !== ''), p => _.toArray(svgs_).filter(s => s.type === p)[0].percentage)) - weather.target) < Math.abs(_.toArray(svgs_).filter(s => s.type === fullbody.fullbody)[0].percentage - weather.target)) {
293272
return _.reduce(_.flatten([pieces, nPieces, [{ fullbody: '' }]]), _.extend);
294273
}

src/services/picture-service/svgs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,6 @@ const svgs = {
16151615
};
16161616

16171617
export async function getSVGString(name) {
1618-
console.log(`getting svg ${svgs[name].svg}`);
16191618
const axRet = await axios.get(svgs[name].svg, {
16201619
responseType: 'text',
16211620
transformResponse: undefined,

src/store/modules/darksky.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ export function darkskyTimeMachine(f, location, time, unit) {
44
axios
55
.get(`https://cors-anywhere.herokuapp.com/https://api.darksky.net/forecast/5fe65e2763d6ddcef87f821ebaf028be/${location},${time}?units=${unit}`)
66
.then((response) => {
7-
console.log(`https://cors-anywhere.herokuapp.com/https://api.darksky.net/forecast/5fe65e2763d6ddcef87f821ebaf028be/${location},${time}?units=${unit}`);
8-
console.log(response);
97
f(response);
108
})
119
.catch((error) => {

src/store/modules/general.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ export default {
122122
refreshWeather(context) {
123123
context.commit('setLoading', true);
124124

125-
console.log(moment.tz(context.state.settings.timezone)
126-
.startOf('day')
127-
.format());
128-
129125
const coords = context.state.settings.place;
130126
const locationString = `${coords.lat},${coords.lon}`;
131127
darkskyTimeMachine((result) => {

src/store/modules/prediction.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export default {
3333
settings: { resolution: 4, mintemp: (unit === 'ca' ? 0 : 15), maxtemp: (unit === 'ca' ? 35 : 100) },
3434
})
3535
.then((prediction_) => {
36-
console.log(prediction_);
3736
const renderablePrediction = [
3837
`${genderPrefix}Body${context.rootState.general.settings.avatar.body}`,
3938
];
@@ -49,7 +48,6 @@ export default {
4948
checkAndPush(renderablePrediction, prediction_.shoes);
5049
checkAndPush(renderablePrediction, `${genderPrefix}Hair${context.rootState.general.settings.avatar.hairType.replace(/\//g, '')}${context.rootState.general.settings.avatar.hair}`);
5150
checkAndPush(renderablePrediction, prediction_.headgear);
52-
console.log(renderablePrediction);
5351
return picture.renderPrediction(renderablePrediction);
5452
})
5553
.then((renderedPicture) => {

src/store/modules/travel.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export default {
7979
gender: _.toLower(context.rootState.general.settings.avatar.gender),
8080
settings: { mintemp: (unit === 'ca' ? 0 : 15), maxtemp: (unit === 'ca' ? 35 : 100) },
8181
}));
82-
console.log(preds);
8382
const types = [];
8483
_.forEach(preds, (v) => {
8584
_.forEach(v, (value) => {
@@ -112,7 +111,6 @@ export default {
112111
});
113112
context.commit('setTravelLoading', false);
114113
context.commit('setResult', types);
115-
console.log(types);
116114
});
117115
},
118116
},

src/views/main/Chart.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default {
1515
},
1616
watch: {
1717
options() {
18-
console.log("Updating Chart");
1918
this.renderChart(this.chartData, this.options);
2019
},
2120
},

src/views/main/IconWarning.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export default {
1818
};
1919
},
2020
mounted() {
21-
console.log(this.icon);
2221
axios.get(this.icon, {
2322
transformResponse: undefined,
2423
responseType: 'text',

src/views/travel/ClothCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export default {
3030
};
3131
},
3232
mounted() {
33-
console.log(`searching svg ${this.type}`);
3433
const { gender } = this.$store.state.general.settings.avatar;
3534
getSVGString(_.find(svgs, { type: this.type.type, gender: _.toLower(gender) }).name).then((svg) => {
3635
const base = Base64.encode(svg);

src/views/travel/travelsvgs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ const svgs = {
403403
};
404404

405405
export async function getSVGString(name) {
406-
console.log(`axios get ${svgs[name].svg}`);
407406
const axRet = await axios.get(svgs[name].svg, {
408407
responseType: 'text',
409408
transformResponse: undefined,

0 commit comments

Comments
 (0)