I hereby claim:
- I am kidig on github.
- I am kidig (https://keybase.io/kidig) on keybase.
- I have a public key whose fingerprint is 0764 5193 EA4B AC2A 1475 5135 AA21 908A C83F FCB5
To claim this, I am signing this object:
>>> import sqlite3 | |
>>> sqlite3.version | |
'2.6.0' | |
>>> sqlite3.sqlite_version | |
'3.7.17' |
var wd = require('wd'), | |
assert = require('assert'), | |
colors = require('colors'), | |
browser = wd.promiseRemote(); | |
browser.on('status', function(info) { | |
console.log(info.cyan); | |
}); | |
browser.on('command', function(meth, path, data) { |
# n) Something text or | |
# n) Right text* | |
match = re.match(r'^\w\)\s+(.[^\*]*)(\*?)$', line, re.UNICODE) | |
if match and len(match.groups()): | |
answer = dict(zip(['text','right'], [x for x in match.groups() if len(x)])) |
def parse_schedule_page(content): | |
doc = lxml.html.document_fromstring(content) | |
rows = doc.xpath('//table[@class="reqform"]/tr/td') | |
print "Rows:", len(rows) | |
description = '' | |
if len(rows): | |
description = " ".join([line.text_content().strip() for line in rows[0].xpath('.//h3')]) |
from shovel import task | |
@task | |
def hello(name): | |
print "Hello, %s!" % name | |
@task | |
def kwargs(**kwargs): | |
print "Kwargs: %s" % kwargs |
#!/usr/bin/env python | |
# coding: utf-8 | |
import re | |
import requests | |
from bottle import route, run, response | |
from bs4 import BeautifulSoup, Comment, Doctype | |
SITE_URL = 'http://habrahabr.ru' | |
HOST = 'localhost' |
I hereby claim:
To claim this, I am signing this object:
# | |
# Demonstration of the parsing module, implementing a pgn parser.# | |
# Originally by Alberto Santini http://www.albertosantini.it/chess/ | |
# | |
import sys | |
from pyparsing import Combine, Forward, Group, Literal, oneOf, OneOrMore, Optional, Suppress, ZeroOrMore, Word | |
from pyparsing import ParseException | |
from pyparsing import alphanums, nums, quotedString, removeQuotes |
finish_statuses = ['finished', 'cancelled'] | |
if self.status == self.STATUS_FINISHED: | |
if not self.event_type == self.TYPE_DELIVERY: | |
delivery = self.booking.booking_events.filter(event_type=self.TYPE_DELIVERY).first() | |
if delivery and delivery.status not in [finish_statuses]: | |
raise ValidationError({'status': ['Please finish/cancel delivery event first.']}) | |
# delivery.status = 'finished' |
from zeep import Client | |
WSDL_URL = 'http://path-to-server?wsdl' | |
WS_USER = 'username' | |
WS_PASSWORD = 'password' | |
client = Client(WSDL_URL) | |
LogOn = client.bind('TeleoptiCccSdkService', 'TeleoptiCccLogOnService') | |
user = LogOn.LogOnAsApplicationUser(userName=WS_USER, password=WS_PASSWORD) |