Skip to content

Instantly share code, notes, and snippets.

View diyan's full-sized avatar

Oleksii Diian diyan

View GitHub Profile
@diyan
diyan / python_web_trends.md
Created August 11, 2014 17:11
Python. Popularity of WSGI and Web frameworks
@diyan
diyan / pci_dss.md
Last active September 30, 2024 15:12
PCI DSS. Useful resources

Python. SOAP services

SOAP services. Overview

Evaluating Tools for Developing with SOAP in Python. Doug Hellmann - http://doughellmann.com/2009/09/01/evaluating-tools-for-developing-with-soap-in-python.html

What's the best SOAP client library for Python, and where is the documentation for it? - http://stackoverflow.com/questions/206154/whats-the-best-soap-client-library-for-python-and-where-is-the-documentation-f

What's the best SOAP library for Python 3.x? - http://stackoverflow.com/questions/7817303/whats-the-best-soap-library-for-python-3-x

@diyan
diyan / Dockerfile
Last active August 29, 2015 14:00
Dockerfile for Riak test server. Rekon installed, HTTP / Protocol Buffers, Riak Search, LevelDB backend are enabled
FROM ubuntu:14.04
MAINTAINER Alexey Diyan [email protected]
### NOTE. Command ./run.sh will rebuild this container
### OS. Apply Docker workarounds, update the APT cache
# http://crosbymichael.com/dockerfile-best-practices-take-2.html
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'root:root' | chpasswd
@diyan
diyan / selenium_patch.py
Created March 31, 2014 08:45
Selenium WebDriver monkey patch for using any CSS selector that jQuery supports.
"""
Selenium WebDriver monkey patch for using any CSS selector that jQuery supports.
Useful urls:
Inject the Sizzle CSS selector library. Selenium WebDriver - http://selenium.polteq.com/en/injecting-the-sizzle-css-selector-library/
Adding the Sizzle CSS Selector library in WebDriver - http://seleniumtestingworld.blogspot.com/2013/01/adding-sizzle-css-selector-library-and.html
"""
from __future__ import unicode_literals
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
@diyan
diyan / flask_metrology.py
Last active August 29, 2015 13:56
Flask extension that collects metrics using Metrology and push them to Graphite
#NOTE This is alpha quality code. Works only on my workstation.
#NOTE Some details looks weird becase code is ported from my FlaskScales extension with minimal changes
from __future__ import unicode_literals
import os
import socket
from urlparse import urlparse
import logging
from flask import _request_ctx_stack
from flask.signals import got_request_exception, request_started, request_finished, template_rendered
from astrolabe import Interval

How to install Numba on Ubuntu 13.10

  • separate calls of "pip install" is a must
  • v0.11.0 was failed to install from PyPI, so I've used version from GitHub
$ sudo apt-get install python-dev llvm-dev
$ virtualenv numba && cd $_ && . bin/activate
$ pip install ipython cython numpy llvmpy
@diyan
diyan / python_wrappers_test_result.md
Last active January 3, 2016 10:19
C wrappers benchmark result on Asus Zenbook Prime UX31A / Core i7 3517U 1900 Mhz / Ubuntu 13.10 64 bit / Python 2.7.5 64 bit

Python C wrappers benchmark result on Asus Zenbook Prime UX31A / Core i7 3517U 1900 Mhz / Ubuntu 13.10 64 bit / Python 2.7.5 64 bit

Installation instructions for Ubuntu 13.10

$ git clone https://github.com/koder-ua/wrappers_test.git && cd $_
$ virtualenv . && . bin/activate
$ sudo apt-get install python-dev swig python-sip-dev libffi-dev libboost-python-dev python-sip-dev
$ pip install cython cffi
$ make
@diyan
diyan / python_stack.md
Last active September 3, 2020 10:32
Tools and libraries which I prefer to use in Python stack

Tools and libraries which I prefer to use in Python stack

Development Environment

  • Ubuntu Linux for both development and production
  • Git version control system
  • Jenkins CI build server (but recently I'm moving to git server-side hooks with ssh from git server to dev/stage/prod servers)
  • Redmine bug tracking system
  • JetBrains PyCharm IDE

Production Environment

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="lshw-B.02.16" />
<style type="text/css">
.first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; }
.second {padding-left: 1em; width: 100%; vertical-align: center; }
.id {font-family: monospace;}