>>> import time
>>> from datetime import datetime as dt
>>> yess = dt(year = 2012, month=9, day=1, hour=8, minute=20)
>>> time.mktime(yess.timetuple())
1346480400.0
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
| Traceback (most recent call last): | |
| File "./urwidUI.py", line 75, in <module> | |
| main() | |
| File "./urwidUI.py", line 71, in main | |
| loop.run() | |
| File "/usr/local/lib/python2.6/dist-packages/urwid-0.9.9.1-py2.6-linux-i686.egg/urwid/main_loop.py", line 170, in run | |
| self.screen.run_wrapper(self._run) | |
| File "/usr/local/lib/python2.6/dist-packages/urwid-0.9.9.1-py2.6-linux-i686.egg/urwid/raw_display.py", line 234, in run_wrapper | |
| return fn() | |
| File "/usr/local/lib/python2.6/dist-packages/urwid-0.9.9.1-py2.6-linux-i686.egg/urwid/main_loop.py", line 181, in _run |
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
| wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin | |
| chmod +x GoogleEarthLinux.bin | |
| sudo ./GoogleEarthLinux.bin |
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/python | |
| # -*- coding: UTF-8 -*- | |
| # Poslanci by Visgean Skeloru | |
| # Tento script slouží k zjištění mail adres všech poslanců české republiky. | |
| import urllib | |
| import re | |
| baseUrl = "http://www.psp.cz/sqw/organy2.sqw?kr=1" |
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/python | |
| # -*- coding: UTF-8 -*- | |
| # Prime numbers | |
| # @author: Visgean Skeloru | |
| # email: <[email protected]> | |
| # jabber: <[email protected]> | |
| # github: http://github.com/Visgean | |
| numbers = range(3, int(raw_input("Max value: ")) + 1, 2) |
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
| >>> a = ["a","b","c"] | |
| >>> b = a | |
| >>> b.append("d") | |
| >>> print a, b | |
| ['a', 'b', 'c', 'd'] ['a', 'b', 'c', 'd'] |
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 -*- | |
| from django import template | |
| from base64 import b64encode | |
| register = template.Library() | |
| @register.filter | |
| def dataURI(filename, mime = None): |
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
| #!/bin/bash | |
| for i in {2300..3000} | |
| do | |
| echo $i | |
| ssh -f -N -n -D $i regulus | |
| done | |
| # Done, server keeps saying: | |
| # ssh_exchange_identification: Connection closed by remote host |
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
| dd if=/dev/urandom count=1 bs=1241KB of=Homework.pdf |