Skip to content

Instantly share code, notes, and snippets.

View danomoseley's full-sized avatar

Dan Moseley danomoseley

View GitHub Profile
@danomoseley
danomoseley / eBay average price
Last active February 18, 2022 06:30
Find an average sold price of an eBay search.Do a search for a product, check the "Sold listings" option under "Show only" in the left navigation.Run this script by pasting it into the console tab of the chrome developer tools.
function Stats(arr) {
var self = this;
var theArray = arr || [];
//http://en.wikipedia.org/wiki/Mean#Arithmetic_mean_.28AM.29
self.getArithmeticMean = function() {
var sum = 0, length = theArray.length;
for(var i=0;i<length;i++) {
sum += theArray[i];
}
#!/usr/bin/python3
def recursive_t9(numbers, letter_map):
if len(str(numbers)) == 1:
return letter_map[int(numbers)]
elif len(str(numbers)) == 0:
return []
other_options = recursive_t9(str(numbers)[1:], letter_map)