Skip to content

Instantly share code, notes, and snippets.

@mitya57
mitya57 / main.py
Last active November 19, 2016 18:54
My Oracle Shell
# Alternative shell for Oracle database.
# Alpha version, do not use for production purposes.
#
# Author: 2016 Dmitry Shachnev <ich@mitya57.me>
import readline
import shutil
import sys
import cx_Oracle
#include <QtGui/QFont>
#include <QtWidgets/QApplication>
#include <QtWidgets/QTextEdit>
int main(int argc, char **argv) {
QApplication app(argc, argv);
QTextEdit edit;
edit.resize(640, 480);
edit.setHtml(
@mitya57
mitya57 / test_errors.log
Created January 25, 2016 14:11
Sphinx tests errors with Python 2.7.11
======================================================================
FAIL: test_build_html.test_html_output(<etree13.ElementTree.ElementTree object at 0x7f3e05b20110>, 'includes.html', ".//pre/span[@class='s2']", u'\xfc\xf6\xe4')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/dmitry/python-modules/sphinx/tests/test_build_html.py", line 340, in check_xpath
'%r in file %s' % (path, fname))
AssertionError: did not find any node matching xpath ".//pre/span[@class='s2']" in file includes.html
@mitya57
mitya57 / object.hpp
Last active October 24, 2015 20:33
Описание модели онтологий
#ifndef ONTXX_OBJECT_HPP
#define ONTXX_OBJECT_HPP
#include <cstdint>
#include <string>
#include <vector>
/** Base objects of the Meta-Ontology [MO].
*
* Root Object
@mitya57
mitya57 / pdfinfo.py
Last active October 20, 2015 10:29
Statistical information about PDFs
# Get statistical information about PDFs
# Author: 2015 Dmitry Shachnev <mitya57@gmail.com>
# Required packages (in Debian/Ubuntu):
# - gir1.2-poppler-0.18
# - python3-gi or python-gi
import gi
gi.require_version('Poppler', '0.18')
@mitya57
mitya57 / xsettings.py
Last active October 1, 2022 21:02
XSettings implementation in Python 3
#!/usr/bin/env python3
# Implementation of XSettings specification in Python 3
# <http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html>
#
# Copyright (C) 2015 Dmitry Shachnev <mitya57@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@mitya57
mitya57 / sphinx_log.txt
Created July 17, 2015 18:44
sympy sphinx build
mkdir -p _build/latex _build/doctrees
PYTHONPATH=..: sphinx-build -b latex -d _build/doctrees-latex -D latex_paper_size= src _build/latex
Running Sphinx v1.3.1
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 172 added, 0 changed, 0 removed
reading sources... [ 0%] aboutus
reading sources... [ 1%] gotchas
reading sources... [ 1%] guide
@mitya57
mitya57 / log.txt
Created May 29, 2015 11:28
sphinxcontrib-programoutput test log
============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- py-1.4.27 -- pytest-2.7.0
rootdir: /tmp/buildd/sphinxcontrib-programoutput-0.8, inifile:
collected 51 items
tests/test_cache.py .....E
tests/test_command.py ............
tests/test_directive.py EEEEEEEEEEEEEEEEEEEEEE..
tests/test_setup.py E
tests/test_util.py ....
@mitya57
mitya57 / sphinx_test_log
Created March 17, 2015 09:48
Sphinx testing log
Checking dependencies...
Temporary files will be placed in /home/dmitry/python-modules/sphinx/Sphinx-1.3/tests/build.
Running Sphinx test suite (with Python 2.7.9)...
test_api_translator.test_html_translator ... ok
test_api_translator.test_html_with_html_translator_class ... ok
test_api_translator.test_html_with_set_translator_for_html_ ... ok
test_api_translator.test_html_with_set_translator_for_html_and_html_translator_class ... ok
test_api_translator.test_html_with_set_translator_for_latex ... ok
test_api_translator.test_html_with_set_translator_for_man ... ok
test_api_translator.test_html_with_set_translator_for_pseudoxml ... ok
@mitya57
mitya57 / scheme.cpp
Created May 19, 2014 12:18
thermal-conductivity
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "struct.h"
void DiagonalMatrix::solve(double *rightCol) {
unsigned s;
for (s = 0; s < size - 1; ++s) {
topDiag[s] /= midDiag[s];