Skip to content

Instantly share code, notes, and snippets.

View libbkmz's full-sized avatar

Ilya libbkmz

View GitHub Profile
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])
#!/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"):
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
# -*- codin: utf-8 -*-
import fileinput
import re
tb_list = []
current_tb = ""
previous_tb = ""
new_line = ""
keys = {}
# -*- 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"т",
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
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; };
@libbkmz
libbkmz / 1.py
Created October 24, 2014 07:00
show real tabled data
print "%s:%s%s" % (fp, " "*(30-len(fp)), value)
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 '
program HelloWorld(output);
var
i: integer;
N: integer;
K: integer;
begin
N:= 103;
K:= 20;
i:=N;