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
#coding=utf | |
# На зачёт к преподавателю английского языка пришли 30 студентов: | |
# 13 с факультета экономики, 9 с факультета математики и | |
# 8 с факультета компьютерных наук. | |
# Их одинаковые внешне и на ощупь зачётные книжки лежат на столе. | |
# Какое наибольшее количество зачётных книжек должен взять преподаватель, | |
# чтобы быть уверенным, что среди оставшихся на столе присутствуют | |
# зачётки хотя бы 7 студентов одного факультета и 4 студентов другого? | |
# https://yandex.ru/math/test/ |
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
#coding=utf | |
__author__ = u'pochemuto' | |
import sys, re | |
from workflow import Workflow, ICON_INFO | |
log = None | |
# http://www.deanishe.net/alfred-workflow/api/index.html | |
# wf.add_item(title, subtitle=u'', modifier_subtitles=None, arg=None, autocomplete=None, valid=False, uid=None, icon=None, icontype=None, type=None, largetext=None, copytext=None) | |
# wf.filter(query, items, key=<function <lambda>>, ascending=False, include_score=False, min_score=0, max_results=0, match_on=127, fold_diacritics=True) |
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/env bash | |
if [[ $# -ne 2 ]]; then | |
echo Копирование iml-файлов в другой каталок с заменой \$MODULE_DIR\$ на абсолютный путь | |
echo Usage: command iml-file target-dir | |
exit 1 | |
fi | |
get_abs_filename() { | |
# $1 : relative filename |
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/env python | |
# coding=utf | |
# 0 1 2 | |
# 9 3 | |
# 10 4 | |
# 11 5 | |
# 6 7 8 | |
# | |
# |-----------| |
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
#!/bin/bash | |
query=$@ | |
cyrillicLetters="АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯяЁё" | |
if [[ $query =~ .*[$cyrillicLetters].* ]] | |
then | |
lang='ru-en' | |
else | |
lang='en-ru' | |
fi |
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
eval $(echo "no:global default;fi:normal file;di:directory;ln:symbolic link;pi:named pipe;so:socket;do:door;bd:block device;cd:character device;or:orphan symlink;mi:missing file;su:set uid;sg:set gid;tw:sticky other writable;ow:other writable;st:sticky;ex:executable;"|sed -e 's/:/="/g; s/\;/"\n/g') | |
{ | |
clear | |
IFS=: | |
for i in `dircolors` | |
do | |
echo -e "\e[${i#*=}m$( x=${i%=*}; [ "${!x}" ] && echo "${!x}" || echo "$x" )\e[m" | |
done | |
} |
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
# encoding=UTF8 | |
from sys import argv | |
if __name__ == '__main__': | |
fname = "" | |
line_count = 5 | |
if len(argv) >= 3: | |
fname = argv[1] |
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
# -*- coding: utf-8 -*- | |
import vkontakte | |
import gdata.data | |
import gdata.gauth | |
import gdata.contacts.client | |
import gdata.contacts.data | |
import atom | |
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
javascript:var state = !vkPatch.plugins.kikuyutoo.settings.scrobbler.get(); | |
vkPatch.plugins.kikuyutoo.settings.scrobbler.set(state); | |
vkPatch.plugins.kikuyutoo.settings.playingIcon.set(state); |
NewerOlder