Skip to content

Instantly share code, notes, and snippets.

View sallyruthstruik's full-sized avatar

Stanislav Kaledin sallyruthstruik

  • Tallinn, Estonia
View GitHub Profile
[ui]
username = <your name>
[auth]
dp.prefix = https://hg.digitalpine.ru
dp.username = <hg login>
dp.password = <hg pass>
dp2.prefix = http://hg.dp.vpn
dp2.username = <hg login>
/* 1 */
{
"_id" : ObjectId("580a4a8215979e1510aaadc9"),
"date" : ISODate("2016-10-20T00:00:00.000Z"),
"referer" : 232,
"shows" : 8502,
"tag" : "direct",
"total" : 25.57,
"type" : "rambler",
"value" : 20
Test Cases for knapsack problem
Output is total value of solution
Data format:
[knapsack size] [count items]
[item1 value] [item1 weight]
...
[item-n value] [item-n weight]
Case 1
Output: 13
from __future__ import division
import webdav.client as wc
import time
options = {
'webdav_hostname': "https://webdav.yandex.ru",
'webdav_login': "s.kaledin@coin32.com",
'webdav_password': "*******"
}
users
{
name: {
first: <string>
middle: <string>
last: <string>
}
email: <string>
watched_movies: [ #просмотренные фильмы
{
Предположим вы парсите сайт кинопоиска и получаете набор фильмов:
cinema = {
title: <string>
rate: <integer>
description: <string>
}
Считайте title уникальным для простоты.
title неизменный, rate и description могут меняться
logging.getLogger("root").info("%s", obj)
logging.getLogger("root").info("%s"%obj)
logging.getLogger("root").info("{}".format(obj))
import abc
class Abstract(object):
@abc.abstractmethod
def abstract():
pass
class TrueAbstract(object):
__metaclass__ = abc.ABCMeta
import abc
class Abstract(object):
@abc.abstractmethod
def abstract():
pass
class TrueAbstract(object):
__metaclass__ = abc.ABCMeta
document_message {
url: "https://mmg.whatsapp.net/d/f/AjY52l7JBH1hemAIIwgke3RIzbfkeyfazcMuE_tXH-Tl.enc"
mimeType: "application/pdf"
title: "AlfaFuture \320\261\320\270\320\273\320\265\321\202"
file_sha256: "\006N\307z5D\362\234\260\215\265D\210\252\233JS\211\007;\023\320_\2027$\250fw\263\307\312"
file_length: 309189
page_count: 1
media_key: "k%z\231\222\241K\335\350v\246Y\234Ru\030\373@9\373\270\303\222\2513\313_\303*\035zi"
jpeg_thumbnail: "\377\330\377\340\000\020JFIF\000\001\001\000\000H\000H\000\000\377\341\000XExi