firozzer / paceconverterbot Goto Github PK
View Code? Open in Web Editor NEWA Reddit bot to convert running & cycling paces.
A Reddit bot to convert running & cycling paces.
On C25K subreddit, I noticed the bot was detecting the unit (mile or km) incorrectly.
https://www.reddit.com/r/C25K/comments/126kqlw/restarting_c25k_but_outside_this_time_w7d3_done/
This user has multiple posts containing pictures of her workout summaries, and the bot seems to be incorrectly detecting the unit in every single one of them.
https://www.reddit.com/user/yuyithemermaid/
It appears that this user is located in the United Kingdom, and the calories burned during a workout is listed using "Kilocalories" instead of "Calories" in the US.
In variousRegexChecks, I noticed that the function checkNike1stVariation is possibly causing the problem in line 173. Specifically, when determining the unit used in the post, it looks whether the string "kilo" is included anywhere in the text. When it's assessing the word "kilocalories", "kilo" is included in it. Therefore, the function incorrctly determines that km is used in the post, when it it uses mile because the user is located in United Kingdom.
A possible solution is to add a space after the word: use "kilo " instead to exclude words like "kilocalories".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.