Skip to content

Instantly share code, notes, and snippets.

View zverok's full-sized avatar

Victor Shepelev zverok

View GitHub Profile
class APIProvider
private
def get(url, hash)
page = SimpleHttp::get url, hash
JSON.parse(page)
end
end
class Wikipedia < APIProvider
Atom
http://club.wantbaby.info/feed.php
http://club.wantbaby.info/feed.php?mode=forums
http://club.wantbaby.info/feed.php?mode=news
http://club.wantbaby.info/feed.php?mode=topics
http://club.wantbaby.info/feed.php?mode=topics_active
http://feeds.feedburner.com/youtube/PKJx
http://gdata.youtube.com/feeds/api/videos/-/%D0%96%D2%B1%D0%BB%D0%B4%D1%8B%D0%B7%D0%B4%D0%B0%D1%80
http://gdata.youtube.com/feeds/api/videos/-/%D0%A4%D0%B0%D0%B1%D1%80%D0%B8%D0%BA%D0%B0/%D0%9A%D0%B0%D0%B7%D0%B0%D1%85%D1%81%D1%82%D0%B0%D0%BD%D0%B5
http://gdata.youtube.com/feeds/api/videos/-/%D1%84%D0%B0%D0%B1%D1%80%D0%B8%D0%BA%D0%B0%D1%81%D1%8B
http://blogs.yandex.ru/qip.rss?text=%28Lumia+%7C+100+%7C+101+%7C+200+%7C+201+%7C+300+%7C+303+%7C+500+%7C+600+%7C+700+%7C+800+%7C+601+%7C+710+%7C+1662+%7C+1280+%7C+1800+%7C+1616+%7C+1112+%7C+1600+%7C+2710+%7C+2220+%7C+2730+%7C+2680+%7C+2630+%7C+2310+%7C+3720+%7C+3120+%7C+3600+%7C+3500+%7C+5233+%7C+5250+%7C+5230+%7C+5228+%7C+5230+%7C+5800+%7C+5000+%7C+6300+%7C+6300i+%7C+6700+%7C+6760+%7C+6600+%7C+6730+%7C+6720+%7C+6710+%7C+6124+%7C+6210+%7C+6120+%7C+6500+%7C+6110+%7C+7230+%7C+7310+%7C+7500+%7C+7900+%7C+8800+%7C+8600+%7C+8800+%7C+%D0%BB%D1%8E%D0%BC%D0%B8%D0%B0+%7C+%D0%BB%D1%8E%D0%BC%D0%B8%D1%8F+%7C+603+%7C+610+%7C+808+%7C+900+%7C+910+%7C+asha+%7C+%D0%B0%D1%88%D0%B0+%7C+%D1%8D%D1%88%D0%B0+%7C+%23lumia+%7C+%23asha+%7C+%23%D0%BB%D1%8E%D0%BC%D0%B8%D1%8F+%7C+%23%D0%BB%D1%8E%D0%BC%D0%B8%D0%B0%29+%26%26+%28%D0%BD%D0%BE%D0%BA%D0%B8%D0%B0+%7C+nokia+%7C+%D0%BD%D0%BE%D0%BA%D0%B8%D1%8F+%7C+%22express+music%22+%7C+%22expres+music%22+%7C+%22%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81+%D0%BC%D1%8C%D1%8E%D0%B7%D0%B8%D0%BA%
execve("/usr/bin/ruby", ["ruby", "emprofile.rb"], [/* 44 vars */]) = 0
brk(0) = 0x9c33000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7739000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=79752, ...}) = 0
mmap2(NULL, 79752, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7725000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
{"диск"=>100,
"яндекс"=>100,
"сервис"=>54,
"получать"=>54,
"ссылка"=>53,
"эта"=>51,
"дополнительный"=>50,
"новый"=>50,
"пространство"=>49,
"заводить"=>49,
require 'rubygems'
require 'typhoeus'
require 'pp'
require 'json'
data = {"seed"=>
{"synonyms"=> ["\320\274\320\260\320\263\320\260\320\267\320\270\320\275 Metro", "\320\274\320\260\320\263\320\260\320\267 \320\274\320\265\321\202\321\200\320\276", "\320\263\320\270\320\277\320\265\321\200\320\274\320\260\321\200\320\272\320\265\321\202 \320\274\320\265\321\202\321\200\320\276", "\320\272\321\203\320\277\320\270\321\202\321\214 \320\262 \320\274\320\265\321\202\321\200\320\276", "\321\206\320\265\320\275\321\213 \320\262 \320\274\320\265\321\202\321\200\320\276", "\321\200\320\260\321\201\320\277\321\200\320\276\320\264\320\260\320\266\320\260 \320\262 \320\274\320\265\321\202\321\200\320\276", "\320\277\320\276\320\272\321\203\320\277\320\260\321\202\321\214 \320\262 \320\274\320\265\321\202\321\200\320\276", "\321\201\320\272\320\270\320\264\320\272\320\270 \320\262 \320\274\320\265\321\202\321\200\320\276", "\320\262 \320\274\320\265\321\202\321\200\320\276 \321\201\320\272\320\270\320\264\320\272\320
## http://bspv2-dev.sterno.ru:8081/clients/4.json
{"id":4,"title":"SiFi","rubrics":null,"state":"non-commercial","api_key":"kmbdko5aj3nkqxlyyb36xdey1jemxyfn","lingua_model_id":null,"lingua_processing_level":null,"lingua_highlight_level":null,"webui_client_id":4,"webui_agency_id":4,"webui_agency_title":"zverok","webui_admin_description":"","webui_author_email":"[email protected]","webui_created_at":"2012-04-23T12:59:43Z","webui_updated_at":"2012-04-23T12:59:43Z","webui_report_lang":"ru","mentions_languages":["ru"],"report_type":"new"}
## http://bspv2-dev.sterno.ru:8081/clients/4/seeds.json
[{"id":6,"client_id":4,"keywords":"firefly","synonyms":["\u0441\u0432\u0435\u0442\u043b\u044f\u0447\u043e\u043a"],"context":["\u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0438\u0430\u043b","joss whedon","\u0434\u0436\u043e\u0441\u0441 \u0443\u0438\u0434\u043e\u043d","\u043d\u0430\u0442\u0430\u043d \u0444\u0438\u043b\u043b\u0438\u043e\u043d","\u0441\u0435\u04
<ul class="inline-toolbar">
<span>Отчёты:</span>
<li>Стандартный за <div class="inline-menu"><span>период</span>
<ul style="display:none;">
<li><%= link_to "Сутки", report_account_client_path(@account, @client, :type => :daily), :class=>"icon excel"%></li>
<li><%= link_to "7 дней", report_account_client_path(@account, @client, :type => :weekly), :class=>"icon excel"%></li>
<li><%= link_to "Текущий месяц", report_account_client_path(@account, @client, :type => :monthly_current), :class=>"icon excel"%></li>
<li><%= link_to "Предыдущий месяц", report_account_client_path(@account, @client, :type => :monthly_prev), :class=>"icon excel"%></li>
<li>Месяц до выбранной даты:
<div class="report-month-selector"></div>
Релевантное упоминание
----------------------
api_v2.log:
I, [2013-08-24T18:32:29.939076 #24931] INFO -- : Processing POST /v2/clients/2227/mentions/by/seed/486.json?component=dvapper Query: {component: "dvapper"} JSON: {author: {name: "Наблюдатели Петербурга за честные выборы", guid: "32803139", url: "http://vk.com/club32803139"}, journal: {name: "Наблюдатели Петербурга за честные выборы", guid: "32803139", url: "http://vk.com/club32803139", kind_class: "group"}, url: "http://vk.com/wall-32803139_53266", title: "", body: "РЦОИТ при ЦИК России издал сборник методических материалов типовой учебной программы «Правовые основы избирательного процесса и организации работы участковой избирательной комиссии» (для обучения членов участковых избирательных комиссий и резерва составов участковых комиссий), оформленный в удобный кейс «Библиотека участковой избирательной комиссии».
amqp.log:
I, [2013-08-24T18:32:29.968325 #24931] INFO -- : bsp.topic.v2[dvapper.mention:topic.create]: {id: 1714471, mention_id: 2379843,
DROP COLUMN `journal_community_id`
DROP COLUMN `journal_user_id`
DROP COLUMN `journal_is_client_journal`
DROP COLUMN `source_id`
DROP COLUMN `source_url`
DROP COLUMN `deleted`
ADD COLUMN `manual_spam` boolean NULL DEFAULT '0'
DROP COLUMN `journal_community_id`
DROP COLUMN `journal_user_id`
DROP COLUMN `journal_is_client_journal`