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
# It turns a very specific logfile :) into a csv file | |
# Take all events within a minute and calcute avg and max | |
# Returns csv file with same name as argument log file | |
import sys | |
popper_file = sys.argv[1] | |
output_file = popper_file[:-3]+"csv" | |
fi = open(popper_file,"r") | |
fo = open(output_file, "w+b") |
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
# python plotter.py test.csv => will produce test.png | |
# Give it a csv file as argument and it will produce a png image with the same name as the csv file | |
# It expects the CSV file to be of format '2012-09-20 20:32,1.3,2.1' | |
# NOTE: This code will show the graph so you need a gui builder. It will fail on a server | |
# TO make it run on a server use 'Agg' | |
# import matplotlib | |
# matplotlib.use('Agg') | |
# and don't use the show() method |
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
#Create ssh keys | |
ssh-keygen -t rsa -C "[email protected]" -f id_rsa.MyService | |
#Empty a file (owned by you) | |
> file.log | |
#Empty a file owned by root | |
#Copy a file from server over ssh |
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
<?php | |
include_once('../simple_html_dom.php'); | |
function scraping($url) { | |
// create HTML DOM | |
$html = file_get_html($url); | |
// Find the table that has class="tabelle_spieler" in the source code | |
// There are two of these tables and we want the second one therefor 1 (index start by 0) |