Skip to content

Instantly share code, notes, and snippets.

Avatar

Vasilis Balafas mpvasilis

View GitHub Profile
@mpvasilis
mpvasilis / pascal_to_csv.py
Created Dec 10, 2020
PASCAL VOC XML to CSV
View pascal_to_csv.py
import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(path):
xml_list = []
for xml_file in glob.glob(path + '/*.xml'):
tree = ET.parse(xml_file)
@mpvasilis
mpvasilis / CPUvsGPU_tf2.py
Created Dec 9, 2020
TensorFlow 2 - CPU vs GPU times calculation on matrix multiplications
View CPUvsGPU_tf2.py
from __future__ import print_function
import matplotlib
import matplotlib.pyplot as plt
import tensorflow as tf
import time
import os
tf.compat.v1.disable_eager_execution()
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
def get_times(maximum_time):
View Keybase proof.md

Keybase proof

I hereby claim:

  • I am mpvasilis on github.
  • I am mpvasilis (https://keybase.io/mpvasilis) on keybase.
  • I have a public key ASBsFlELH5njo7cceAbPVvqi2bdMHiy0x4aWm9Zqs143xwo

To claim this, I am signing this object:

@mpvasilis
mpvasilis / efood-count-orders.js
Created Nov 17, 2018
efood.gr count orders script
View efood-count-orders.js
var orders = document.getElementsByClassName('table user-orders')[0].getElementsByTagName("tr").length;
var i;
var sum=0;
for (i = 1; i < orders; i++) {
sum=sum+ parseFloat(document.querySelector("tr.user-order:nth-child("+i+") > td:nth-child(5) > span:nth-child(1) > strong:nth-child(2)").innerText.slice(0, -1));
}
console.log("Orders: "+orders);
console.log("Total: "+sum+" €");