Skip to content

Instantly share code, notes, and snippets.

View klinkin's full-sized avatar

Mike Klimin klinkin

View GitHub Profile
@klinkin
klinkin / map.geojson
Last active October 23, 2019 22:56
example geof
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@klinkin
klinkin / task1.md
Last active November 14, 2018 19:23

Первая задача:

Есть файлик с миллиардом строк, каждая строка json. Есть супер надежный endpoint, который может в 100500 rps, но принимает только один json за один POST запрос.

Данные в исходном json могут быть немного перепутаны. Если порядок строки неверный, сервер ответит HTTP 406 и строку нужно попробовать отправить немного позже.

В итоге нужно послать весь файл не больше чем 60 мин.

@klinkin
klinkin / device.md
Last active October 23, 2017 16:29
Пользовательское API сервиса Quelle.ru

Registers a new device on the server

(en) This method registers a user's device on the server when a user launches an application at the first time. After the registration the server sends:

  • unique identificator QUELLE-DUID in the UUID format
  • JWT token generated on the base of QUELLE-DUID

(ru) Метод для регистрации устройства пользователя на сервере при запуске первом запуске приложения.

@klinkin
klinkin / navs.md
Last active October 23, 2017 11:13
Get main Navigation Tree - categories and promoshops

Get Navigation

Response cashed on a device for 24-hour

Запрос

REQUSET: 
  TYPE: 
    GET
 PATH: 
@klinkin
klinkin / brands.md
Last active October 23, 2017 11:09
Get list of brands

List brands

Returns a list of brands divided by groups

Request

REQUSET:
  TYPE: 
    GET
  PATH: 
@klinkin
klinkin / products.md
Last active October 23, 2017 09:34
Products Resource

List products with all available filter parameters

Request

REQUSET: 
  TYPE:
    POST 
  PATH:
 api.quelle.ru/cnt/v1/products?nav_id=123&page=2&per_page=100
@klinkin
klinkin / ab_test.js
Created February 2, 2017 17:12
GTM ABCD test
<script>
od_test_id = "ABTest-001",
od_twin_id = "",
od_test_name = "Просмотры - Shops",
od_variations_count = 4,
od_exposure_rate = 100,
od_traffic_allocate = [25, 25, 25, 25],
od_cookie_days = 60,
od_cookie_path = "/",
od_analytics = "universal",
...
AVAILABLE_ROLES = [
# STAFF
ADMIN, HEAD_MANAGER, MANAGER,
PAYMASTER, SECURITY, ANALYST,
SUPPORT, CONTENT_MANAGER,
# Partner
@klinkin
klinkin / config.py
Created September 15, 2012 23:25
Using mandrill (mailchimp) service to send emails
from application.mail import mail_send
...
SECURITY_SEND_MAIL_FUNCTION = mail_send
...
FROM_EMAIL = 'dispatch@site.ru'
FROM_NAME = u'Site Admin'
marika@air-marianna.lan:~/develop/dealer (git: develop) (venv: /dealer) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
➜ tox
GLOB sdist-make: /Users/marika/Develop/dealer/setup.py
py26 create: /Users/marika/Develop/dealer/.tox/py26
py26 installdeps: pytest, flask, django, mercurial
py26 inst: /Users/marika/Develop/dealer/.tox/dist/dealer-1.0.0.zip
py26 runtests: commands[0] | py.test
========================================================================================== test session starts ===========================================================================================
platform darwin -- Python 2.6.8 -- pytest-2.5.1
collected 9 items