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
# -*- coding:utf-8 -*- | |
# | |
# Copyright (C) 2012, Maximilian Köhl <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 python2 | |
# -*- coding: utf-8 -*- | |
import locale | |
import subprocess | |
locale.setlocale(locale.LC_ALL, '') | |
from libqtile import bar, hook, layout, widget | |
from libqtile.command import lazy |
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
# -*- coding:utf-8 -*- | |
# | |
# Copyright (C) 2013, Maximilian Köhl <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
# -*- coding:utf-8 -*- | |
# | |
# Copyright (C) 2013, Maximilian Köhl <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 -*- | |
import argparse | |
import collections | |
import csv | |
import datetime | |
import os | |
import os.path | |
import subprocess |
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
def insertionsort(liste): | |
counter = 0 | |
for i in range(1, len(liste)): | |
x, j = liste[i], i | |
while j > 0: | |
counter += 1 | |
if not liste[j - 1] > x: break | |
liste[j] = liste[j - 1] | |
j -= 1 | |
liste[j] = x |
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
def partition(liste, links, rechts, pivot): | |
b = links - 1 | |
counter = 0 | |
for k in range(links, rechts + 1): | |
liste[k], liste[b + 1] = liste[b + 1], liste[k] | |
counter += 1 | |
if liste[b + 1] <= pivot: | |
b += 1 | |
return b, counter |
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
Quicksort: | |
A=[23, 11, 8, 4, 15], pivot=15 | |
Partition: | |
Vertausche 23(0) mit 23(0) | |
[23, 11, 8, 4, 15] -> [23, 11, 8, 4, 15] | |
Vergleiche 23(0) mit 15(pivot) | |
Vertausche 11(1) mit 23(0) | |
[23, 11, 8, 4, 15] -> [11, 23, 8, 4, 15] | |
Vergleiche 11(0) mit 15(pivot) | |
b++ |
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 -*- | |
# | |
# Copyright (C) 2015, Maximilian Köhl <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
gc: collecting generation 2... | |
gc: objects in each generation: 13 0 5824 | |
gc: collectable <B 0x7f8c86b4ec50> | |
gc: collectable <dict 0x7f8c86b57248> | |
finalize b <__main__.A object at 0x7f8c86b4ec18> | |
gc: done, 3 unreachable, 0 uncollectable, 0.0005s elapsed | |
gc: collecting generation 2... | |
gc: objects in each generation: 1 0 5831 | |
gc: done, 0.0005s elapsed | |
gc: collecting generation 2... |
OlderNewer