Skip to content

Instantly share code, notes, and snippets.

View zverok's full-sized avatar

Victor Shepelev zverok

View GitHub Profile
SELECT * FROM `clients` WHERE (`id` = '395') LIMIT 1
DESCRIBE `mentions_client_395`
SELECT * FROM `mentions_client_395` WHERE (`id` = '431824') LIMIT 1
SELECT * FROM `platforms` WHERE `id` = 63225
SELECT * FROM `users` WHERE `id` = 32213390
SELECT * FROM `social_profiles` WHERE ((`subject_kind` = 'author') AND (`social_profiles`.`subject_id` = 32213390))
SELECT * FROM `social_metrics` WHERE ((`subject_kind` = 'author') AND (`social_metrics`.`subject_id` = 32213390))
SELECT * FROM `journals` WHERE `id` = 32050404
SELECT * FROM `social_profiles` WHERE ((`subject_kind` = 'journal') AND (`social_profiles`.`subject_id` = 32050404))
SELECT * FROM `social_metrics` WHERE ((`subject_kind` = 'journal') AND (`social_metrics`.`subject_id` = 32050404))
describe 'инициализация' do
subject{MnemosyneClient.client(client_id, from, to)}
it{should be_kind_of(MnemosyneClient)}
its(:client_id){should == client_id}
its(:fromdate){should == from}
its(:todate){should == to}
end
=begin
Воспользовавшись таким классом, ты можешь разделить функционал следующим образом:
MnemosyneClient просто делает
GraphTable.from_json_ld(get '...graph.jsonld', params)
SummaryTable.from_json(get '...summary.json', params)
WordsTable.from_json(get url, params)
....
GraphTable преобразует данные, и хранит их раздельно (отдельно колонки, отдельно метки, отдельно цифры), что удобно для спек;
log4r:
loggers:
- name: api
outputters: [gelf, stdout]
outputters:
- name: stdout
type: StdoutOutputter
formatter:
type: PatternFormatter
pattern: '[%d #%p] %l -- : %m '
2009-07 Кацивели, VIP-интенсив на ЮБК
----
IMG_9032__small.jpg
IMG_9063__small.jpg
IMG_9075__small.jpg
IMG_9079__small.jpg
IMG_9090__small.jpg
IMG_9094__small.jpg
IMG_9118__small.jpg
logs:
web:
path: /srv/mnemosyne/shared/log/web.log
level: info
api:
path: /srv/mnemosyne/shared/log/api.log
level: info
api_v2:
path: /srv/mnemosyne/shared/log/api_v2.log
level: info
log4r:
loggers:
- name: api
outputters: [api, gelf]
- name: api_v2
outputters: [api_v2, gelf]
- name: sql
outputters: [sql, gelf]
level: ERROR
- name: amqp
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
profile: {
country: "Россия",
gender: "f",
name: "Марина Лючжинян",
photo: "http://cs4155.vk.me/v4155732/34/8JC8ht2GOP4.jpg",
schools: [
{
city: "Саган-Нур",
class: "в",
country: "Россия",
0,1,10,100,100500,101,102,103,104,105,106,107,108,109,11,110,111,112,113,115,116,117,118,119,12,120,121,122,123,124,125,126,127,128,129,13,130,131,132,133,134,135,136,137,138,139,14,140,141,142,143,144,145,146,147,148,149,15,150,152,153,154,155,156,157,158,159,16,160,161,162,163,165,166,167,168,17,170,172,173,174,175,176,178,179,18,181,182,183,184,185,186,187,188,19,190,191,192,193,194,195,196,197,198,199,2,20,200,201,202,203,204,205,206,207,208,209,21,210,211,212,213,214,215,216,217,218,219,22,220,221,222,223,224,225,226,227,228,229,23,230,231,24,25,27,28,29,3,30,31,32,33,34,35,36,37,38,39,4,40,41,42,43,44,45,46,47,48,49,5,50,51,52,53,54,55,56,57,59,6,60,61,62,63,64,65,67,68,69,7,70,71,72,73,74,75,76,77,777,78,79,8,80,81,82,83,84,85,86,87,88,89,9,91,92,93,94,95,96,97,98,99