This file contains hidden or 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 | |
# coding: utf-8 | |
import xml.etree.ElementTree as etree | |
from pprint import pprint | |
data = """ | |
<data> | |
<parts> | |
<part name="komplexes Teil"> |
This file contains hidden or 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 group.py data.txt | |
1 | |
1 | |
2 | |
3 | |
3 | |
3 |
This file contains hidden or 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 python3 | |
# coding: utf-8 | |
""" | |
~~~~~~~~ | |
DiceGame | |
~~~~~~~~ | |
Umsetzung des "Würfelspiels 1.0" aus einem Thread bei ubuntuusers.de | |
http://forum.ubuntuusers.de/post/5643272/ |
This file contains hidden or 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
23498239482938492384078789789789 bla/blub/datei1.dat | |
d41d8cd98f00b204e9800998ecf8427e ga/bla2345.txt | |
b9dd393b05195aa2288bd1611d7fc361 bluber/bla4325.txt | |
d41d8cd98f00b204e9800998ecf8427e data/ghghg/mfdfdf.dat | |
57dd7f249a99923eea234e62895dc03f test.txt | |
d41d8cd98f00b204e9800998ecf8427e data/anderer_name_als_mfdfdf.dat |
This file contains hidden or 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 | |
# was auch immer das sein mag... | |
CRITICAL_LIMIT = 4000 | |
def calc_tax_value(salary, tax_rate): | |
return salary * tax_rate / 100 | |
This file contains hidden or 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
-- | |
-- Variante 1: | |
-- | |
CREATE TABLE if not exists Autos ( | |
CarID INTEGER PRIMARY KEY, | |
Marke TEXT | |
) | |
CREATE TABLE if not exists Fahrer ( | |
Name TEXT PRIMARY KEY, |
This file contains hidden or 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 | |
# coding: utf-8 | |
import sys | |
import argparse | |
from contextlib import closing | |
import io | |
This file contains hidden or 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
./sort.py index.txt < data.txt | |
MaxMusterPerson3 5 12 | |
Tobi Testperson 7 38 | |
NachnamePerson3 43 23 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2 in line 1.
This file contains hidden or 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
ISBN;Verlag;Titel;Stand;Preis;Bestand | |
978-3768825825;Delius Klasing;MV – Bornholm;2009-01;54,90;2 | |
978-3768832021;Delius Klasing;MV – Bornholm;2011-03;54,90;13 | |
978-3892255598;Edition Maritim;Rund Rügen;2008-03;29,90;15 | |
978-3892252368;Delius Klasing;Küstenhandbuch MV;2006-03;29,90;3 | |
978-3980672016;Quick Maritim Medien;Törnplaner/-atlas Peene, Oder, Bodden;2006-04;25,00;5 | |
978-3768831017;Delius Klasing;Kieler Bucht und Rund Fünen (2010);2010-03;69,90;17 |
This file contains hidden or 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 re | |
from collections import defaultdict | |
import requests | |
from lxml import html | |
URL = r"http://www.python-forum.de/viewtopic.php?f=5&t=29566" |