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
elements = document.getElementsByClassName('audio_row'); | |
var cmd = "" | |
function log(elid, s) { | |
var re = /.*<!json>(.*)<!>/ | |
var match = re.exec(s) | |
res = JSON.parse(match[1]) | |
fname = res[0][4] + "-" + res[0][3] | |
fname = fname.replace("/", "") |
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/python3 | |
import random | |
import math | |
from itertools import zip_longest | |
from pprint import pprint | |
def grouper(iterable, n, fillvalue=None): | |
"Collect data into fixed-length chunks or blocks" | |
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx" | |
args = [iter(iterable)] * n |
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
// ==UserScript== | |
// @author Petr Kalinin | |
// @name Support MathJax in vk.com | |
// @version 0.2 | |
// @date 2012-09-25 | |
// @description Load MathJax code to vk.com pages | |
// @license MIT (https://opensource.org/licenses/MIT) | |
// @include http://vk.com/* | |
// @include http://*vk.com/* | |
// @include https://vk.com/* |
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/python3 | |
# -*- coding: utf-8 -*- | |
import sys,codecs | |
import urllib.request | |
import re | |
import json | |
import datetime | |
sys.stdout = codecs.getwriter('cp866')(sys.stdout.buffer, 'replace') |
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
// Пример применения иерархии классов для отладки интерактивной задачи | |
// (C) Петр Калинин, GNU GPL :) | |
// Достоинства подхода, приведенного ниже, состоят в следующем: | |
// - Для использования другого "интерактора" надо просто закомментировать | |
// одну и раскомментировать другую строчку | |
// - Можно в одной программе иметь много "интеракторов" и переключаться между ними как надо, | |
// не боясь запутаться | |
// - Все переменные, относящиеся к внутренностям "интерактора", можно держать внутри | |
// класса и не захламлять глобальное пространство |
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/python3 | |
# -*- coding: utf-8 -*- | |
import sys,codecs | |
import urllib.request | |
import re | |
sys.stdout = codecs.getwriter('cp866')(sys.stdout.buffer, 'replace') | |
url = 'http://informatics.mccme.ru/course/view.php?id=526' | |
cookies = '' |