This file contains 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 subprocess | |
import threading | |
import wx | |
class Okno(wx.Frame): | |
def __init__(self): | |
wx.Frame.__init__(self, None, -1, "Test", size=(600, 80)) |
This file contains 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
# 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 ) |
This file contains 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 | |
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ł :(") |
This file contains 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
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): |
This file contains 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
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 |
This file contains 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 -*- | |
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) |
This file contains 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
''' | |
Created on 2009-12-15 | |
@author: lreqc | |
''' | |
import timeit | |
SETUP = """\ | |
import random |
This file contains 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
>>> 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) |
This file contains 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
<!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> |
This file contains 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
>>> 'ala ma kota'.replace(' ', r'\ ') | |
'ala\\ ma\\ kota' | |
>>> list('ala ma kota'.replace(' ', r'\ ')) | |
['a', 'l', 'a', '\\', ' ', 'm', 'a', '\\', ' ', 'k', 'o', 't', 'a'] | |
>>> print('ala ma kota'.replace(' ', r'\ ')) | |
ala\ ma\ kota |
OlderNewer