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 "sqla_mixin.py", line 45, in <module> | |
DeclarativeBase.metadata.create_all(engine) | |
File "/home/plq/src/sqlalchemy/lib/sqlalchemy/schema.py", line 2415, in create_all | |
tables=tables) | |
File "/home/plq/src/sqlalchemy/lib/sqlalchemy/engine/base.py", line 2178, in _run_visitor | |
conn._run_visitor(visitorcallable, element, **kwargs) | |
File "/home/plq/src/sqlalchemy/lib/sqlalchemy/engine/base.py", line 1857, in _run_visitor | |
**kwargs).traverse_single(element) | |
File "/home/plq/src/sqlalchemy/lib/sqlalchemy/sql/visitors.py", line 86, in traverse_single |
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 -tt | |
# | |
# Migration script from dbmail 2.2.x message store to a maildir message store | |
# with dovecot extensions. | |
# | |
# Tested with dbmail-2.2.17 -> dovecot-2.0.13 on postgresql-9.0.4 | |
# and sqlalchemy-0.7.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
# This is not yet included in main rpclib distribution because | |
# it does a lot of unnecessary copying. However, it's reportedly | |
# working fine, so if you're not caring that much about performance | |
# you can use this. | |
from rpclib.server.wsgi import WsgiApplication | |
from cStringIO import StringIO | |
from django.http import HttpResponse |
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
import pytz | |
import email.utils | |
import time | |
from datetime import datetime | |
a = datetime.now(pytz.utc) | |
print email.utils.formatdate(time.mktime(a.timetuple())) | |
print email.utils.formatdate(time.mktime(a.utctimetuple()) - time.timezone + 1e-6 * a.microsecond) |
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
to get this example running: | |
1) mysql -u root -p < localhost.sql | |
2) edit connection string in main_server.py | |
3) run main_server.py | |
4) run ws_client.py, witness infinite recursion | |
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 <QString> | |
#include <QTextCodec> | |
#include <iostream> | |
int main(int argc, char *argv[]) { | |
const char *p = "kıracağım"; | |
// Kaynak kod editörünün encoding'inin utf8 olduğunu varsayarsak; | |
QTextCodec *utf8 = QTextCodec::codecForName("utf8"); | |
QTextCodec *cp_1254 = QTextCodec::codecForName("Windows-1254"); |
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 | |
from lxml import etree | |
from rpclib.model.primitive import AnyXml | |
from rpclib.model.complex import ComplexModel | |
from rpclib.const import xml_ns as ns | |
from rpclib.util.xml import get_schema_documents | |
class SomeType(ComplexModel): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<wsdl:definitions | |
xmlns="http://schemas.xmlsoap.org/wsdl/" | |
xmlns:calc="http://www.example.com/wsdl/calc/v1.0" | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
targetNamespace="http://www.example.com/wsdl/calc/v1.0" | |
name="CalcWebService"> | |
<wsdl:types> |
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 | |
from suds.client import Client | |
client = Client("http://localhost:9753/?wsdl") | |
print client.service.TestService("x") |
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
# This file is one copy from https://github.com/arskom/spyne/blob/master/examples/authentication/server_soap.py | |
import sys | |
import random | |
import logging | |
from spyne.model.complex import ComplexModel | |
from spyne.model.fault import Fault | |
from spyne.decorator import srpc | |
from spyne.error import ArgumentError | |
from spyne.protocol.soap import Soap11 |
OlderNewer