This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%cython -a -f -c=-O3 | |
# -c=-DCYTHON_TRACE=1 | |
# -c=-std=c++11 | |
# -c=-DCYTHON_TRACE=1 | |
# -c=-DCYTHON_TRACE=1 -c=-g --link-args=-g | |
# %%cython -a -c=-DCYTHON_TRACE=1 | |
# -c=-O3 | |
# -c=-g --link-args=-g | |
# --cplus | |
#-c=-march=native -c=-mtune=native |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quantile_list_big = [(1. - 0.1 ** x) + (0.1 ** (x + 1)) * y for x in xrange(1, 8+1) for y in xrange(1, 10)] | |
quantile_list_small = [(1. - 0.1 ** x) for x in xrange(1, 8+1)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.bkmz.surface_view_test; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; | |
public class CustomSurfView extends SurfaceView implements SurfaceHolder.Callback { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## arrow up | |
"\e[A":history-search-backward | |
## arrow down | |
"\e[B":history-search-forward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Demonstrates very basic use of ImageItem to display image data inside a ViewBox. | |
""" | |
## Add path to library (just for examples; you do not need this) | |
# import initExample | |
from pyqtgraph.Qt import QtCore, QtGui | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
IMG_URL = "/tmp/img_res.jpg" | |
CM = plt.cm.gist_gray | |
def rgb2gray(img): | |
# массив весов для конвертации в grayscale, RGB | |
# W = np.array([0.2126, 0.7152, 0.0722]) | |
W = np.array([0.299, 0.587, 0.114]) | |
# W = np.array([0.333, 0.333, 0.333]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
import sys | |
import os | |
WRAPPER = "/usr/bin/java" | |
args = sys.argv[1:] | |
args.insert(0, WRAPPER) | |
for i, arg in enumerate(args): | |
if arg.startswith("-Xmx"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
%matplotlib inline | |
import matplotlib as mpl | |
# set tick width | |
mpl.rcParams['xtick.major.size'] = 10 | |
mpl.rcParams['xtick.major.width'] = 4 | |
mpl.rcParams['xtick.minor.size'] = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- codin: utf-8 -*- | |
import fileinput | |
import re | |
tb_list = [] | |
current_tb = "" | |
previous_tb = "" | |
new_line = "" | |
keys = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from copy import copy, deepcopy | |
from trie import Trie | |
from itertools import chain | |
STATE = [ | |
u"", u"", u"т", u"", u"ч", | |
u"", u"м", u"а", u"е", u"у", | |
u"м", u"о", u"л", u"о", u"т", |