Saturday, October 22, 2011

Fedora 15 - my must have apps

  • First of sudo a yum update
  • Alacarte (alacarte - tutorial: bit.ly/nVU3I4)
  • Aptana Studio (download from www.aptana.com)
  • SVN (subversion)
  • Git (git)
  • RL-GLUE (glue.rl-community.org/wiki/Main_Page)
  • Python Libs
    (rl-glue python codec, pyro, pybrain, pygame, matplotlib, scipy, numpy, pybox2d, python-tools)
  • LibreOffice (Writer, Calc, Presentation)
  • Dia (dia)
  • Gimp (gimp)
  • EasyLife (www.easylifeproject.org/)- nvidia propriatory driver did not work on my old eFoce Go 7400.

Monday, October 17, 2011

Ubuntu 11.10: Unity-2d problems and how I fix them

Ubuntu 11.10 introduced Unity as the default desktop. The problem is that it does not work well on my 5-year-old HP laptop, so I have to make use of the Unity-2d cousin.


Unity (and Unity-2d) introduces the unity-2d-panel and the unity-2d-launcher. The *-panel sits on the top part of your screen, and the *-launcher on the right side with the capability of autohiding.


Even with this so-called stable version, many times it crashes and I have to kill the panel proccess and then restart it.
The safest way is:
  1. $> ps -ef|grep unity-2d-panel
  2. kill -9 <processid>
  3. <Press Winkey> and type in: "unity-2d-panel"
This way you kill and restart the panel on the top.

Sunday, October 09, 2011

Python - send email a webcam captured png

Python - send email a webcam captured png - (ipaste'd):

 Also, another interesting project I found: http://flask.pocoo.org/

Thursday, October 06, 2011

A pyglet

Aptana Studio 3 (includes PyDev)


Ένα βασικό pyglet για Python με λίστα labels και βασικό click event:

import pyglet
import time
import threading

window = pyglet.window.Window()

lbl = []

def print_list(start,stop,txt):
    for yy in range (start,stop,20):
        text = txt+str(yy)
        lbl.append(pyglet.text.Label(text,
                          font_name='Georgia',
                          font_size=10,
                          x=10, y=window.height-yy,
                          anchor_x='left', anchor_y='center'))

lbl = []
print_list(40,140,"lbl-")


@window.event
def on_draw():
    window.clear()
    for lbli in lbl:
        lbli.draw()
    

@window.event
def on_mouse_press(x, y, button, modifiers):
    window.clear()
    del lbl[:]
    print_list(40,140,"LBL")
    for lbli in lbl:
        lbli.draw()

#window.push_handlers(pyglet.window.event.WindowEventLogger())
    
pyglet.app.run()
exit()

Χρησιμοποίησα to Aptana Studio 3, με ενσωματωμένο PyDev. Out-of-the-box θέλει μόνο κατά την δημιουργία project ορισμό του path της Python εγκατάστασης.