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
| R: psikulky ${picepole[prdel]} |
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
| class MyModel(models.Model) | |
| def save(self, **kw): | |
| super(Order, self).save(**kw) | |
| if self.number is None: | |
| self.number = gen_the_number(self.pk) | |
| super(Order, self).save(**kw) |
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
| class Migration(DataMigration): | |
| def forwards(self, orm): | |
| "Write your forwards methods here." | |
| log.debug("start") | |
| for order in orm['order.order'].objects.filter(number=None): | |
| log.debug("%s %s %s", order, order.id, order.number) | |
| order.save() | |
| # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..." |
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 = 1 | |
| B = 2 | |
| C = 3 | |
| STATUS_CODES = ( | |
| (A, _(u'A')), | |
| (B, _(u'B')), | |
| (C, _(u'C')), | |
| ) |
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/env python | |
| # -*- coding: utf-8 -*- | |
| from twisted.trial import unittest | |
| from twisted.python.filepath import FilePath | |
| from twisted.internet import inotify | |
| from twisted.python import filepath | |
| from abc import ABCMeta, abstractmethod | |
| from tempfile import mkdtemp, mkstemp |
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
| "/some/dir" | |
| delete => tidy, | |
| file_select => all, | |
| depth_search => recurse("inf"), | |
| depth_search => include_base; |
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
| Prazske pyvo #20 | |
| Async prakticky 22.10.2012 | |
| Jiri Barton | |
| eventlet | |
| @napyvo python.cz pyvec.org |
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
| #include <stdio.h> | |
| void nacteniUdaju(char *jmeno, char *cUctu, int *pocStav) | |
| { | |
| printf("Zadej jmeno: "); | |
| fflush(stdin); | |
| gets(jmeno); | |
| printf("Zadej cislo uctu: "); | |
| fflush(stdin); |
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
| mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/loop0 /dev/loop1 | |
| mdadm --create /dev/md1 --level=mirror --raid-devices=2 /dev/loop2 /dev/loop3 | |
| mdadm --create /dev/md2 --level=stripe --raid-devices=2 /dev/md0 /dev/md1 |
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
| root@deathstar # eix nfs-utils | |
| [I] net-fs/nfs-utils | |
| Available versions: 1.1.4-r1 ~1.1.5 ~1.1.6-r1 ~1.2.0 ~1.2.1 ~1.2.2-r2^t ~1.2.3^t 1.2.3-r1^t ~1.2.4^t ~1.2.5^t 1.2.6^t {{caps elibc_glibc ipv6 kerberos nfsdcld nfsidmap +nfsv3 +nfsv4 nfsv41 nonfsv4 selinux tcpd}} |