It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
#!/usr/bin/env python
import xlrd
import sys
if len(sys.argv) < 0:
print("XLS File Not Specified")
sys.exit(-1)
file = sys.argv[1]
print("--------------------------------------------------------------------------")
print("Loading XLS File: {0}".format(file))
print("--------------------------------------------------------------------------")
stats = {0: {'Count': 0, 'Total': 0}, 1: {'Count': 0, 'Total': 0}}
required_values = ['por', 'ds', 'dc', 'dd', 'mcc', 'dscs', 'ddcd', 'ddcddscs', 'dsdc', 'dddc', 'dsdddc', 'dddscdcs', 'dsdccs']
other_values = ['dc', 'ds', 'dd', 'cd', 'cs']
ignored_cells = []
def load_sheet(file, sheet):
workbook = xlrd.open_workbook(file)
worksheet = workbook.sheet_by_index(0)
return worksheet
def read_stats(start_row, end_row, stats={'Count': 0, 'Total': 0}):
for i in range(start_row, end_row):
if i+1 in ignored_cells:
continue
value = sheet.cell(i, 0).value
if value.lower() in required_values or any(item in value.lower() for item in other_values):
amount = sheet.cell(i, 3).value
if type(amount) == unicode and amount.strip() == '-':
amount = float(0)
if type(amount) != float and not amount.isdigit():
amount = amount.replace(',', '.')
amount = float(amount)
stats['Count'] += 1
stats['Total'] += amount
print("Column A{0}. Key: {1}. Incrementing Counter and adding value: {2}".format(i+1, value, amount))
while True:
print("Question 1: ")
ignored_cell = raw_input()
if not ignored_cell.isdigit():
print("Value was not a number")
continue
ignored_cell = int(ignored_cell)
if ignored_cell == 0:
break
if ignored_cell > 23 or ignored_cell < 0:
print("Number Out of Range")
continue
print("Ignoring Cell: {0}".format(ignored_cell))
ignored_cells.append(ignored_cell)
print("--------------------------------------------------------------------------")
print("Ignoring Cells: {0}".format(",".join((str(i) for i in ignored_cells))))
sheet = load_sheet(file, 0)
print("--------------------------------------------------------------------------")
print("Reading Team 1 Stats: Rows 1, 11")
print("--------------------------------------------------------------------------")
read_stats(0, 11, stats[0])
print("--------------------------------------------------------------------------")
print("Reading Team 2 Stats: Rows 13 - 23")
print("--------------------------------------------------------------------------")
read_stats(12, 23, stats[1])
difference = stats[0]['Count'] - stats[1]['Count']
if difference > 0:
stats[1]['Total'] += (5 * difference)
print("Difference is Negative, Adding 5 * {0} to Team 1".format(difference))
elif difference < 0:
stats[0]['Total'] += (5 * -difference)
print("Difference is Negative, Adding 5 * {0} to Team 0".format(-difference))
print("--------------------------------------------------------------------------")
print("Team One Total: {0}".format(stats[0]['Total']))
print("Team Two Total: {0}".format(stats[1]['Total']))
print("Team Difference: {0}".format(stats[0]['Total'] - stats[1]['Total']))
print("--------------------------------------------------------------------------")
#!/usr/bin/env python
import xlrd
import sys
if len(sys.argv) < 0:
print("XLS File Not Specified")
sys.exit(-1)
file = sys.argv[1]
print("--------------------------------------------------------------------------")
print("Loading XLS File: {0}".format(file))
print("--------------------------------------------------------------------------")
stats = {0: {'Count': 0, 'Total': 0}, 1: {'Count': 0, 'Total': 0}}
required_values = ['por', 'ds', 'dc', 'dd', 'mcc', 'dscs', 'ddcd', 'ddcddscs', 'dsdc', 'dddc', 'dsdddc', 'dddscdcs', 'dsdccs']
other_values = ['dc', 'ds', 'dd', 'cd', 'cs']
ignored_cells = []
def load_sheet(file, sheet):
workbook = xlrd.open_workbook(file)
worksheet = workbook.sheet_by_index(0)
return worksheet
def read_stats(start_row, end_row, stats={'Count': 0, 'Total': 0}):
for i in range(start_row, end_row):
if i in ignored_cells:
continue
value = sheet.cell(i, 0).value
if value.lower() in required_values or any(item in value.lower() for item in other_values):
amount = sheet.cell(i, 3).value
if type(amount) == unicode and amount.strip() == '-':
amount = float(0)
if type(amount) != float and not amount.isdigit():
amount = amount.replace(',', '.')
amount = float(amount)
stats['Count'] += 1
stats['Total'] += amount
print("Column A{0}. Key: {1}. Incrementing Counter and adding value: {2}".format(i+1, value, amount))
while True:
print("Question 1: ")
ignored_cell = raw_input()
if not ignored_cell.isdigit():
print("Value was not a number")
continue
ignored_cell = int(ignored_cell)
if ignored_cell == 0:
break
if ignored_cell > 23 or ignored_cell < 0:
print("Number Out of Range")
continue
print("Ignoring Cell: {0}".format(ignored_cell))
ignored_cells.append(ignored_cell)
print("--------------------------------------------------------------------------")
print("Ignoring Cells: {0}".format(",".join((str(i) for i in ignored_cells))))
sheet = load_sheet(file, 0)
print("--------------------------------------------------------------------------")
print("Reading Team 1 Stats: Rows 1, 11")
print("--------------------------------------------------------------------------")
read_stats(0, 11, stats[0])
print("--------------------------------------------------------------------------")
print("Reading Team 2 Stats: Rows 13 - 23")
print("--------------------------------------------------------------------------")
read_stats(12, 23, stats[1])
difference = stats[0]['Count'] - stats[1]['Count']
if difference > 0:
stats[1]['Total'] += (5 * difference)
print("Difference is Negative, Adding 5 * {0} to Team 1".format(difference))
elif difference < 0:
stats[0]['Total'] += (5 * -difference)
print("Difference is Negative, Adding 5 * {0} to Team 0".format(-difference))
print("--------------------------------------------------------------------------")
print("Team One Total: {0}".format(stats[0]['Total']))
print("Team Two Total: {0}".format(stats[1]['Total']))
print("Team Difference: {0}".format(stats[0]['Total'] - stats[1]['Total']))
print("--------------------------------------------------------------------------")
Question 1:
2
Traceback (most recent call last):
File "script.py", line 50, in
if ignored_cell > 23 or number < 0:
NameError: name 'number' is not defined
./parse_file.py Workbook1.xlsx
--------------------------------------------------------------------------
Loading XLS File: Workbook1.xlsx
--------------------------------------------------------------------------
Question 1:
0
--------------------------------------------------------------------------
Ignoring Cells:
--------------------------------------------------------------------------
Reading Team 1 Stats: Rows 1, 11
--------------------------------------------------------------------------
Column A1. Key: Por. Incrementing Counter and adding value: 6.0
Column A2. Key: DsCs. Incrementing Counter and adding value: 5.5
Column A3. Key: Dc. Incrementing Counter and adding value: 5.0
Column A4. Key: Dc. Incrementing Counter and adding value: 6.0
Column A5. Key: DdDsCdCs. Incrementing Counter and adding value: 6.0
Column A7. Key: Mcc. Incrementing Counter and adding value: 6.0
--------------------------------------------------------------------------
Reading Team 2 Stats: Rows 13 - 23
--------------------------------------------------------------------------
Column A13. Key: Por. Incrementing Counter and adding value: 6.0
Column A14. Key: DsDcCs. Incrementing Counter and adding value: 6.0
Column A15. Key: Dc. Incrementing Counter and adding value: 6.0
Column A16. Key: Dc. Incrementing Counter and adding value: 5.0
Column A17. Key: DdDsCdCs. Incrementing Counter and adding value: 5.5
Column A19. Key: Mcc. Incrementing Counter and adding value: 5.0
Column A20. Key: Mcc. Incrementing Counter and adding value: 6.5
Difference is Negative, Adding 5 * 1 to Team 0
--------------------------------------------------------------------------
Team One Total: 39.5
Team Two Total: 40.0
Team Difference: -0.5
--------------------------------------------------------------------------
#!/usr/bin/env python
import xlrd
import sys
if len(sys.argv) < 0:
print("XLS File Not Specified")
sys.exit(-1)
file = sys.argv[1]
print("--------------------------------------------------------------------------")
print("Loading XLS File: {0}".format(file))
print("--------------------------------------------------------------------------")
stats = {0: {'Count': 0, 'Total': 0}, 1: {'Count': 0, 'Total': 0}}
required_values = ['por', 'ds', 'dc', 'dd', 'mcc', 'dscs', 'ddcd', 'ddcddscs', 'dsdc', 'dddc', 'dsdddc', 'dddscdcs', 'dsdccs']
other_values = ['dc', 'ds', 'dd', 'cd', 'cs']
ignored_cells = []
def load_sheet(file, sheet):
workbook = xlrd.open_workbook(file)
worksheet = workbook.sheet_by_index(0)
return worksheet
def read_stats(start_row, end_row, stats={'Count': 0, 'Total': 0}):
for i in range(start_row, end_row):
if i in ignored_cells:
continue
value = sheet.cell(i, 0).value
if value.lower() in required_values or any(item in value.lower() for item in other_values):
amount = sheet.cell(i, 3).value
if type(amount) == unicode and amount.strip() == '-':
amount = float(0)
if type(amount) != float and not amount.isdigit():
amount = amount.replace(',', '.')
amount = float(amount)
stats['Count'] += 1
stats['Total'] += amount
print("Column A{0}. Key: {1}. Incrementing Counter and adding value: {2}".format(i+1, value, amount))
while True:
print("Question 1: ")
ignored_cell = raw_input()
if not ignored_cell.isdigit():
print("Value was not a number")
continue
ignored_cell = int(ignored_cell)
if ignored_cell == 0:
break
if ignored_cell > 23 or number < 0:
print("Number Out of Range")
continue
print("Ignoring Cell: {0}".format(ignored_cell))
ignored_cells.append(ignored_cell)
print("--------------------------------------------------------------------------")
print("Ignoring Cells: {0}".format(",".join((str(i) for i in ignored_cells))))
sheet = load_sheet(file, 0)
print("--------------------------------------------------------------------------")
print("Reading Team 1 Stats: Rows 1, 11")
print("--------------------------------------------------------------------------")
read_stats(0, 11, stats[0])
print("--------------------------------------------------------------------------")
print("Reading Team 2 Stats: Rows 13 - 23")
print("--------------------------------------------------------------------------")
read_stats(12, 23, stats[1])
difference = stats[0]['Count'] - stats[1]['Count']
if difference > 0:
stats[1]['Total'] += (5 * difference)
print("Difference is Negative, Adding 5 * {0} to Team 1".format(difference))
elif difference < 0:
stats[0]['Total'] += (5 * -difference)
print("Difference is Negative, Adding 5 * {0} to Team 0".format(-difference))
print("--------------------------------------------------------------------------")
print("Team One Total: {0}".format(stats[0]['Total']))
print("Team Two Total: {0}".format(stats[1]['Total']))
print("Team Difference: {0}".format(stats[0]['Total'] - stats[1]['Total']))
print("--------------------------------------------------------------------------")
./parse_file.py Workbook1.xlsx
--------------------------------------------------------------------------
Loading XLS File: Workbook1.xlsx
--------------------------------------------------------------------------
Question 1:
0
--------------------------------------------------------------------------
Ignoring Cells:
--------------------------------------------------------------------------
Reading Team 1 Stats: Rows 1 - 11
--------------------------------------------------------------------------
Column A1. Key: Por. Incrementing Counter and adding value: 6.0
Column A2. Key: DsCs. Incrementing Counter and adding value: 5.5
Column A3. Key: Dc. Incrementing Counter and adding value: 5.0
Column A4. Key: Dc. Incrementing Counter and adding value: 6.0
Column A7. Key: Mcc. Incrementing Counter and adding value: 6.0
--------------------------------------------------------------------------
Reading Team 2 Stats: Rows 13 - 23
--------------------------------------------------------------------------
Column A13. Key: Por. Incrementing Counter and adding value: 6.0
Column A15. Key: Dc. Incrementing Counter and adding value: 6.0
Column A16. Key: Dc. Incrementing Counter and adding value: 5.0
Column A19. Key: Mcc. Incrementing Counter and adding value: 5.0
Column A20. Key: Mcc. Incrementing Counter and adding value: 6.5
--------------------------------------------------------------------------
Team One Total: 28.5
Team Two Total: 28.5
Team Difference: 0
--------------------------------------------------------------------------
./parse_file.py Workbook1.xlsx
--------------------------------------------------------------------------
Loading XLS File: Workbook1.xlsx
--------------------------------------------------------------------------
Question 1:
0
--------------------------------------------------------------------------
Ignoring Cells:
--------------------------------------------------------------------------
Reading Team 1 Stats: Rows 1 - 11
--------------------------------------------------------------------------
Column A1. Key: Por. Incrementing Counter and adding value: 6.0
Column A2. Key: DsCs. Incrementing Counter and adding value: 5.5
Column A3. Key: Dc. Incrementing Counter and adding value: 5.0
Column A4. Key: Dc. Incrementing Counter and adding value: 6.0
Column A7. Key: Mcc. Incrementing Counter and adding value: 6.0
--------------------------------------------------------------------------
Reading Team 2 Stats: Rows 13 - 23
--------------------------------------------------------------------------
Column A13. Key: Por. Incrementing Counter and adding value: 6.0
Column A15. Key: Dc. Incrementing Counter and adding value: 6.0
Column A16. Key: Dc. Incrementing Counter and adding value: 5.0
Column A19. Key: Mcc. Incrementing Counter and adding value: 5.0
Column A20. Key: Mcc. Incrementing Counter and adding value: 6.5
--------------------------------------------------------------------------
Team One Total: 28.5
Team Two Total: 28.5
Team Difference: 0
--------------------------------------------------------------------------