Skip to content

Instantly share code, notes, and snippets.

View lqc's full-sized avatar

Łukasz Rekucki lqc

  • Syncron
  • Warsaw, Poland
View GitHub Profile
#!/usr/bin/env python
import subprocess
import threading
import wx
class Okno(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "Test", size=(600, 80))
# Minimal media player using wxWidgets
import wx
from wx.media import *
import os
class PlayerView(wx.Frame):
def __init__(self):
super(PlayerView, self).__init__(None, -1, "LamePlayer", wx.DefaultPosition )
# -*- coding: utf-8
from lxml import html
if __name__ == '__main__':
document = html.parse("http://palacmlo.internetdsl.pl/")
header = document.xpath(u"//div[text() = 'Odwołane zajęcia']")
if not header:
print("Nie znaleziono odpowiedniego elementu na stronie - layout się zmienił :(")
@lqc
lqc / python_locale_sort_bug.py
Created November 26, 2009 01:35
Buggy locale sorting in python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import locale
locale.setlocale(locale.LC_ALL, '')
print("Python version:", sys.version_info)
print("LC_ALL =", locale.getlocale(locale.LC_ALL))
import curses
import sys
scr = curses.initscr()
curses.start_color()
print >> sys.stderr, curses.can_change_color()
# init additional 8 colors
for i in xrange(0, 255):
EASY MARSHMALLOWS
-----------------
Marshmallows are perhaps one of the simplest confections you can make. They only require a handful of
ingredients, a batch can be thrown together in 10-15 minutes (plus *cough* 3 hours for them to set),
and you can flavor them however you like. (You haven't LIVED until you've had coconut marshmallows!)
Hardware needed:
* Stand mixer
# -*- coding: utf-8 -*-
import Tkinter as tk
import sys
import os
from PIL import Image, ImageTk
class SlideshowApp(tk.Frame):
def __init__(self, master = None):
tk.Frame.__init__(self, master)
'''
Created on 2009-12-15
@author: lreqc
'''
import timeit
SETUP = """\
import random
>>> Domain.objects.all()
[Domain(pl, None), Domain(onet, pl)]
>>> Domain(name="poczta", masterDomain=onet).save()
>>> Domain.objects.all()
[Domain(pl, None), Domain(onet, pl), Domain(poczta, onet)]
>>> Domain(name="poczta", masterDomain=onet).save()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/lreqc/fnp/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/db/models/base.py", line 410, in save
self.save_base(force_insert=force_insert, force_update=force_update)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/site_media/css/reset.css" type="text/css" rel="stylesheet"></link>
<link href="/site_media/css/style.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript" src="/site_media/js/jquery-1.3.2.min.js"></script>