Schatten Licht

Python

pyRad - a wheel type command interface for KDE

pyRad is a wheel type command interface for KDE1, designed to appear below your mouse pointer at a gesture.

install | setup | usage and screenshots | download and sources

pyRad command wheel


  1. powered by KDE 

pkgcore vs. eix → pix (find packages in Gentoo)

For a long time it bugged me, that eix uses a seperate database which I need to keep up to date. But no longer: With pkgcore as fast as it is today, I set up pquery to replace eix.

The result is pix:

alias pix='pquery --raw -nv --attr=keywords'

(put the above in your ~/.bashrc)

The output looks like this:

$ pix pkgcore
 * sys-apps/pkgcore
    versions: 0.5.11.6 0.5.11.7
    installed: 0.5.11.7
    repo: gentoo
    description: pkgcore package manager
    homepage: http://www.pkgcore.org
    keywords: ~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86

Spiele programmieren (Quellen)

Das hier ist eine kleine Auswahl an Quellen, um eigene Spiele zu programmieren. Sie ist nicht vollständig, sollte aber ausreichen, um direkt anfangen zu können. Sie enthält nur freie Programme.

Wenn du C++ programmieren kannst

Wenn du Python programmieren kannst

Wenn du nicht programmieren kannst

Mercurial vs. Bazaar speedtest clone and log - update: 4 runs with different versions

Some folks in #mercurial @ freenode.net just repeated the tests, so we have now a bit more stable data.

The evaluation shows the following:

  1. Initial clone: hg is about 4.4 times faster (about 2 min vs. 6 to 15 min)
  2. Repository sizes: the hg repo is about 1.92 smaller (~113M vs. 215M)
  3. Time for a full log: hg is about 2.36 times faster (~21s vs. ~50s)
  4. Time for annotating Misc/NEWS: hg is 1.5 times slower than bzr.
    Without the result from bzr-1.6.1 it is 2.6 times slower (~43s vs 17s).
  5. Integrity checking: hg is by several orders of magnitude faster than bzr which just took too long - everyone stopped it after varying time (30s to 17 min), because the output spoke of hours remaining, one had an integrity error. hg needed about 1 min.
  6. Local clone: hg is 11 times faster (39s vs. 7.14 min).
    Without the 1m15 result from the high disk load host it is 16 times faster (26s).
  7. Local clone with hot filesystem: hg is 14.9 times faster (26s vs. 6.5 min).
  8. Hot copy of just .bzr / .hg: The speeds are about equal, so the difference doesn't come from raw filesystem speed (2s).
  9. Additional Bazaar tests to check shared repository cloning performance (you only get this when you use a shared repository and only clone that shared repository): With shared repository and hardlinks bzr only needs about 5 seconds for cloning.

Geschwindigkeitstest - zwei Arten des for loops über tuples

Ich habe getestet, ob es einen Geschwindigkeitsunterschied zwischen zwei Arten des for loops über eine Liste von tuples gibt:

liste_von_tuples = [(1, 2), (3, 4), (5, 6)]

Es gibt 100.000 tuple, und jeder tuple enthält 2 Zufallszahlen.

Art 1:

for i in liste_von_tuples: 
   res.append(i[1])

Art 2:

for i, j in liste_von_tuples: 
   res.append(j)

Versionsverwaltungen testen - Mercurial (hg) und Bazaar (bzr)

Ich habe gerade einen sehr schönen Vergleich der Versionsverwaltungssysteme Mercurial und Bazaar gefunden.

Für alle, die sich nicht durch einen langen Artikel wühlen wolllen:

Mercurial ist in den meisten Tests 2-5x schneller als Bazaar.

Der volle Artikel:

http://sayspy.blogspot.com/2006/11/bazaar-vs-mercurial-unscientific.html

Falls ihr gerne eine Übersetzung der kritischen Teile hättet, schreibt es bitte.

Blob Valentine

Ein kleines Geschenk, das ich meiner Frau zum (bzw. am) Valentinstag 2008 geschrieben habe.

In seiner Gänze kann es allerdings in diesem Screenshot nicht genossen werden. Um das ganze animiert zu haben, musst du schon das Programm runterladen :) (es braucht nur Python (>=2.5) ).

Blob Valentine

-> Blob Valentine 0.3 herunterladen

With Python from the Shadows

- Written by Draketo aka Arne Babenhauserheide, originally to the melody of Moonlight Shadow on 22.2.08 but switched on 2008-06-27 to be able to put a recording under free licenses -


Audio-files: ogg
This recording is part of the music podcast singing in the winds of time.

Python Speicherverwaltung

Ich habe einen kleinen Test gemacht, um zu schauen, wie die Speicherverwaltung von Python funktioniert.

Dafür habe ich eine Klasse erzeugt, die eine extrem lange Liste als Attribut hatte, so dass viel Ram verbraucht wurde.

Dann habe ich mehrfach eine Instanz dieser Klasse der gleichen Variable zugewiesen.

Das Ergebnis war, dass höchstens der doppelte Speicherbedarf einer einzelnen Instanz verbraucht wurde.

Some Python Programs of mine

Hi,

I created some projects with pyglet and some tools to facilitate 2D
game development (for me), and I though you might be interested.

  • babglet: basic usage of pyglet for 2D games with optional collision
    detection and avoidance.

  • blob_swarm: a swarm of blobs with emerging swarm behaviour through only pair relations.
  • blob_battle: a duel-style battle between two blobs (basic graphics,
    control and movement done)

  • fuzzy_collisions: 2 groups of blobs. One can be controlled. When two
Inhalt abgleichen


 
 
 
Diese Seite nutzt Drupal.
Design: Arne Babenhauserheide.

Werke von Arne Babenhauserheide.
Lizensiert unter freien Lizenzen.

Valid XHTML 1.0 Strict