Skip to content

Instantly share code, notes, and snippets.

я котик пур-пур mvasilkov

Block or report user

Report or block mvasilkov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import os
import sys
import io
import tarfile
import urllib.request
# Tests for antialiasing a high-frequency image in various ways
# Nathan Reed, July 2014
# Written for Python 3.4; requires numpy and Pillow to be installed
import concurrent.futures
import math
import multiprocessing
import numpy as np
import optparse
import random
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <> |
# | Tip found on <> |
# | |
# +----------------------------------------------------------------------+
View gist:5438070
import re
import random
CURLY_RE = re.compile( "\{(.*?)\}" )
def spam( filename, n=1 ):
file = open(filename, "r")
View gist:5438069
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
# -*- coding: utf-8 -*-
from PIL import Image, ImageMath
def paste_composite(original, paste):
Вставляет в первое изображение второе, с учетом альфаканала обоих.
Оба изображения должны быть в формате RGBA.
View generate_infix.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define NUMBER_STATE 3
char OPERATORS[] = {'/', '*', '-', '+'};
mvasilkov /
Created Jan 19, 2012 — forked from Ky6uk/
postfix to infix
#!/usr/bin/env perl
use 5.01;
do { say "USAGE: $0 <postfix.txt>"; exit 0 }
unless $ARGV[0];
# --------------- main -----------------
my (@data, $char, $result, @stack);
import re
from hashlib import md5
def gfm(text):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(
extractions[digest] =
return "{gfm-extraction-%s}" % digest
You can’t perform that action at this time.