Skip to content

Instantly share code, notes, and snippets.

@espdev
espdev / crspline_curve.m
Last active May 15, 2020 08:44
Catmull-Rom cubic spline interpolation [Matlab]
function varargout = crspline_curve(varargin)
%CRSPLINE_CURVE Конструирует двумерную кривую кубическим Catmull-Rom интерполяционным сплайном
%
% Описание:
% Функция конструирует двумерную кривую по узловым точкам, используя
% Catmull-Rom интерполяционные кубические сплайны.
% Данные сплайны могут локально контролироваться и проходят по
% узловым точкам, а не в выпуклой их оболочке.
%
% Литература:
@espdev
espdev / .inputrc
Last active April 8, 2020 13:38
The bash inputrc config for convenient autocompletion
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e\e": kill-whole-line
set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
@espdev
espdev / megafon_calls_info.py
Last active January 31, 2016 11:51
The outgoing calls information for the "Megafon" mobile operator
# coding=utf-8
"""
The outgoing calls information for the "Megafon" mobile operator
"""
import xml.etree.ElementTree as ElementTree
import re
@espdev
espdev / Default (Windows).sublime-keymap
Created March 23, 2016 14:38
SublimeText 3 user keymap
[
{ "keys": ["ctrl+shift+/"], "command": "toggle_setting", "args": {"setting": "word_wrap"} },
{ "keys": ["ctrl+alt+left"], "command": "jump_back" },
{ "keys": ["ctrl+alt+right"], "command": "jump_forward" }
]
@espdev
espdev / Preferences.sublime-settings
Created March 23, 2016 14:39
SublimeText 3 user settings
{
"always_show_minimap_viewport": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"dictionary": "Packages/Language - Russian/ru_RU.dic",
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_face": "Consolas",
@espdev
espdev / qtabwidget.css
Last active May 1, 2024 06:52
A QTabWidget Custom Stylesheet Example
QTabWidget::pane {
border: 1px solid black;
background: white;
}
QTabWidget::tab-bar:top {
top: 1px;
}
QTabWidget::tab-bar:bottom {
@espdev
espdev / rects_overlapping.py
Created May 27, 2016 07:42
Rects overlapping
"""
Rects overlapping
A rect representation:
rect = [x1, y1, x2, y2]
"""
def range_overlap(a_min, a_max, b_min, b_max):
return not ((a_min > b_max) or (a_max < b_min))
@espdev
espdev / deviceInfo.cu
Created June 1, 2016 10:13 — forked from stevendborrelli/deviceInfo.cu
Get Information about CUDA cards on your system. Compile with: nvcc deviceInfo.cu -o deviceInfo
#include <cuda.h>
#include <stdio.h>
void cudasafe(int error, char* message, char* file, int line) {
if (error != cudaSuccess) {
fprintf(stderr, "CUDA Error: %s : %i. In %s line %d\n", message, error, file, line);
exit(-1);
}
}
@espdev
espdev / mpe-fm.ipynb
Last active August 18, 2016 21:21
Minimal Path Extraction via Fast Marching Method
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@espdev
espdev / cudnn.txt
Created July 8, 2016 09:42
Install cuDNN 4.0
$ tar -zxvf cudnn-7.0-linux-x64-v4.0-prod.solitairetheme8
$ cd cuda
$ sudo cp include/cudnn.h /usr/local/include
$ sudo cp lib64/libcudnn.* /usr/local/lib