Skip to content

Instantly share code, notes, and snippets.

View rndD's full-sized avatar
🌽

Alexey Kalmakov rndD

🌽
View GitHub Profile
@rndD
rndD / count.go
Created December 14, 2013 17:47
count words in file
package main
import (
"fmt"
"io/ioutil"
"regexp"
"strings"
"sort"
)
@rndD
rndD / count.py
Last active December 31, 2015 08:39
count words in file
import re
with open('simple.txt', 'r') as f:
words = re.findall(r'\w+', f.read())
for w in sorted(list(set([(w, words.count(w)) for w in words])), key=lambda x: x[1]):
print "%20s -> %d" % w
@rndD
rndD / bagulnik.user.js
Created September 21, 2012 10:05
Userscript для собирание информации о видео в vk.com
// ==UserScript==
// @name VK video Data miner(bagulnik)
// @author boyo
// @description Жутко баджу и беру информацию о видео вконтакте, тестировался только в хроме
// @match http://vk.com/*
// ==/UserScript==
// Usage: добавь в браузер, зайди в видеозаписи на vk.com, набери в поиске запрос и смело нажимай "багульник вперед".
function addJQuery(callback) {
//выходим если это айфрейм