Skip to content

Instantly share code, notes, and snippets.

@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];
@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 / 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 / mathjax-error-test.html
Created August 30, 2012 14:09
HTML after MathJax processing
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Startup",function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"];
HTMLCSS.Font.checkWebFont = function (check,font,callback) {
if (check.time(callback)) return;
if (check.total === 0) {
HTMLCSS.Font.testFont(font);
setTimeout(check,200);
@mitya57
mitya57 / addroute.py
Created November 16, 2012 14:26
Main script for the routes website
#!/usr/bin/python3
# Author: Dmitry Shachnev, 2012
import sys
import time
import os.path
R_NUMBER = 'Номер маршрута'
R_DIRECTIONS = 'Маршрут'
R_WAY = 'Трасса'
@mitya57
mitya57 / lab1.cpp
Created November 24, 2012 11:57
Лабораторная №1
#include <cmath>
#include <cstdlib>
#include <iostream>
#ifndef RANGE
#define RANGE 10000
#endif
#ifndef CORRELATION_OFFSET
#define CORRELATION_OFFSET 10
@mitya57
mitya57 / lab2.cpp
Created November 24, 2012 12:43
Лабораторная №2
#include <cmath>
#include <cstdlib>
#include <iostream>
/**
* Test data:
* 70 120 .5 .7 50 70 20 10 30
* W1 = 0.292
* W2 = 0.145
*/
@mitya57
mitya57 / lab4.cpp
Created November 24, 2012 13:53
Лабораторная №4
#include <cstdlib>
#include <cmath>
#include <iostream>
#define U 6
#define RMAX 100 // 300
#define K .1 // .5
#define Dx 50
#define Dy 70
#define Dz 80
@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 / 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