This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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"т", |
This file contains hidden or 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
45: 0 0 0 1 PCI-MSI-edge eth0 | |
46: 138902469 21349 251748 4223124 PCI-MSI-edge eth0-rx-0 | |
47: 137306753 19896 260291 4741413 PCI-MSI-edge eth0-rx-1 | |
48: 2916 137767992 248035 4559088 PCI-MSI-edge eth0-rx-2 | |
49: 2860 138565213 244363 4627970 PCI-MSI-edge eth0-rx-3 | |
50: 2584 14822 118410604 3576451 PCI-MSI-edge eth0-tx-0 | |
51: 2175 15115 118588846 3440065 PCI-MSI-edge eth0-tx-1 | |
52: 2197 14343 166912 121908883 PCI-MSI-edge eth0-tx-2 | |
53: 1976 13245 157108 120248855 PCI-MSI-edge eth0-tx-3 | |
54: 0 0 0 1 PCI-MSI-edge eth1 |
This file contains hidden or 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
options { | |
directory "/var/named"; | |
pid-file "/run/named/named.pid"; | |
// Uncomment these to enable IPv6 connections support | |
// IPv4 will still work: | |
// listen-on-v6 { any; }; | |
// Add this for no IPv4: | |
// listen-on { none; }; |
This file contains hidden or 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
print "%s:%s%s" % (fp, " "*(30-len(fp)), value) |
This file contains hidden or 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
scrot '%d-%m-%Y-%H:%M:%S_$wx$h.png' -e 'mv $f ~/Yandex.Disk/screens/ ; yandex-disk publish ~/Yandex.Disk/screens/$f | xargs chromium ' |
This file contains hidden or 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
program HelloWorld(output); | |
var | |
i: integer; | |
N: integer; | |
K: integer; | |
begin | |
N:= 103; | |
K:= 20; | |
i:=N; |