Skip to content

Instantly share code, notes, and snippets.

Process: python3.4 [5563]
Path: /Users/USER/*/python
Identifier: python3.4
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [2276]
Responsible: Terminal [2252]
User ID: 503
Date/Time: 2015-11-24 19:42:13.751 +0500
Process: python3.4 [52793]
Path: /Users/USER/*/python3.4
Identifier: python3.4
Version: 0
Code Type: X86-64 (Native)
Parent Process: python3.4 [52706]
Responsible: Terminal [24301]
User ID: 501
Date/Time: 2015-08-26 00:51:15.296 +0500
@kmike
kmike / x.py
Last active August 29, 2015 14:26
qt5 goes mad after reply.abort()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import sip
QT5 = True
if QT5:
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebKitWidgets import QWebView
@kmike
kmike / report.txt
Created April 15, 2015 16:26
splash+flaky test failures
============================================= 5 failed, 1009 passed, 18 xfailed in 193.86 seconds =============================================
(splash)kmike ~/svn/splash [master+?]> py.test splash
============================================================= test session starts =============================================================
platform darwin -- Python 2.7.5 -- py-1.4.26 -- pytest-2.6.4
plugins: flaky, greendots, xdist
collected 1032 items
splash/tests/test_callback_proxy.py .......
splash/tests/test_completer.py ................x..........x.
splash/tests/test_execute.py ...........................................................................x........x....................................................................x.....................................x...
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmike
kmike / eval.ipynb
Created March 25, 2015 01:42
pymorphy2 - mystem evaluation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmike
kmike / Переходность причастий(2).ipynb
Last active August 29, 2015 14:17
переходность причастий
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function scroll_to(splash, x, y)
local js = string.format(
"window.scrollTo(%s, %s);",
tonumber(x),
tonumber(y)
)
return splash:runjs(js)
end
@kmike
kmike / cache.py
Created October 15, 2014 13:03
Splash middleware
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
from scrapy.contrib.httpcache import FilesystemCacheStorage
from .dupefilter import splash_requst_fingerprint
class SplashAwareFSCacheStorage(FilesystemCacheStorage):
def _get_request_path(self, spider, request):