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
<?xml version="1.0" encoding="UTF-8"?> | |
<sec:Security xmlns:sec="urn:sec" xmlns:wsu="urn:wsu" xmlns:wsse="urn:wsse" | |
xmlns:ds="urn:ds"> | |
<wsu:Timestamp wsu:Id="TIMESTAMP"> | |
<wsu:Created wsu:Id="CREATED">2012-11-07T15:52:00</wsu:Created> | |
</wsu:Timestamp> | |
<wsse:BinarySecurityToken EncodingType="http://www.ietf.org/rfc/rfc4648.txt" | |
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" | |
wsu:Id="TOKEN"> | |
TOKEN_VALUE |
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
16 | |
10 8 | |
10 5 | |
8 1 | |
5 3 | |
2 1 | |
1 5 | |
3 8 | |
9 2 | |
3 1 |
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
#!/bin/sh | |
sed -i -r -e "s/xmlns:$1=/xmlns:$2=/g" -e "s/(\"|'|<|\/)$1:/\1$2:/g" $(find . -name '*.xsd') |
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
sed -r -e "s/xmlns:(\w+)=(\"|')[-:.\/a-zA-Z0-9]+/\n\0\n/g" $(find . -name '*.xsd') | grep 'xmlns:\w\+=' | sed -r -e 's/xmlns://g' -e "s/=(\"|')/\t/g" |
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
egrep --color=always \<\([-.a-zA-Z0-9]+:\)?\(simple\|complex\)Type $(find . -name '*.xsd') | sed -r -e "s/:(.*)name=(\"|')([-.:a-zA-Z0-9]+)(\"|')(.*)/: \3/g" |
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 sqlalchemy import create_engine | |
from sqlalchemy.types import SchemaType | |
from sqlalchemy.engine import reflection | |
from sqlalchemy.schema import ( | |
MetaData, | |
Table, | |
DropTable, | |
ForeignKeyConstraint, |
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
Цели: | |
- упростить процесс локализации и интернационализации текстовых данных (gettext — не лучший вариант) | |
- упростить процесс внедрения локализации и интернационализации в питон проекты | |
- возможность использования уже существующих средств (в том числе и графических) для перевода строк | |
Фичи: | |
- перевод строк | |
- перевод строк, зависимых от числа или чисел | |
- возможность изменения представления дат, времени и чисел в зависимости от локали | |
- импорт/экспорт PO файлов |
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 -*- | |
def edit_distance(first_word, second_word): | |
first_word_len = len(first_word) | |
second_word_len = len(second_word) | |
matrix = [[0 for j in range(second_word_len+1)] \ | |
for i in range(first_word_len+1)] | |
for i in range(1, first_word_len+1): | |
for j in range(1, second_word_len+1): | |
cost = first_word[i-1] != second_word[j-1] and 1 or 0 |
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
''' | |
- WebHandler wraps next WebHandler and make desicion what to return (like decorators) | |
- WebHandler may return Response object and that will be the end of current chain, even | |
there are other handlers. | |
- If WebHandler returns None means that this chain is not for current request, | |
so we ask next chain. If this chain was last status 404 returns to client. | |
- There are two datastructures for data accumulation 'data' and 'env'. | |
'data' - template data | |
'env' - environment data (db sessions, template renderers, url_for, ...) | |
These structures are mutable during request processing. The only significant thing, |
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
set nocompatible | |
set nobackup | |
set history=50 | |
set showcmd | |
set ruler | |
set hlsearch | |
set incsearch | |
set smartcase | |
set cmdheight=1 | |
syntax enable |
NewerOlder