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
#!/bin/bash | |
convert \ | |
-density 300 \ | |
"${1}" \ | |
-alpha remove \ | |
-rotate 0.33 \ | |
-attenuate 0.15 \ | |
+noise Multiplicative \ | |
+repage \ |
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
class Node: | |
__slots__ = ['left', 'right', 'value', 'key'] | |
def __init__(self, key, value, left=None, right=None): | |
self.value = value | |
self.key = key | |
self.left = left | |
self.right = right | |
def insert_left(self, node): |
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
#include <iostream> | |
#include <vector> | |
void solution() { | |
uint N; | |
std::cin >> N; | |
uint h_size = N >> 1; | |
std::vector<long> arr1; |
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 | |
"""HTTP proxy server based on werkzeug. | |
Parses content of html responses and adds to all 6-length words tm symbol. | |
""" | |
import re | |
from bs4 import element |
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
"""Parses files in the current dir to find all strings""" | |
import fnmatch | |
import os | |
import ast | |
class ShowStrings(ast.NodeVisitor): | |
def visit_Str(self, node): | |
print node.lineno, node.col_offset, repr(node.s) |
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
class Choices(object): | |
"""Constants holder and Django field's choices builder. All public | |
properties would be interpreted as choices. | |
""" | |
def __init__(self, **kwargs): | |
for prop_name, prop_value in kwargs.iteritems(): | |
setattr(self, prop_name, prop_value) | |
def get_choices(self): |