This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MaxBinaryHeap: | |
def __init__(self, values=[]): | |
self.values = values | |
self.build_max_heap() | |
def max(self): | |
"""return first element in the array""" | |
if len(self.values) > 0: | |
return self.value[0] | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: convert_gpx.sh <FIT filename> | |
# Should works whether you include the .FIT extension or not. | |
filename=$(basename "$1" .FIT) | |
gpsbabel -i garmin_fit -f "$filename".FIT -o gpx -F "$filename".gpx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import pandas as pd | |
import pymongo | |
import json | |
def import_content(filepath): | |
mng_client = pymongo.MongoClient('localhost', 27017) |