This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
# это какая то табличка | |
SystemMigrationPath = namedtuple('SystemMigration', | |
['migration_path', 'create_dttm', 'status', | |
'check_sum', 'error_message']) | |
def dsn(): | |
try: | |
host, port = settings.postgresql.addr.split(':') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://smtp.mailganer.com/api/v2/issue/status?x-track-id=A&x-track-id=B | |
http://smtp.mailganer.com/api/v2/issue/status?message_id=A&message_id=B | |
auth: asdgg | |
{ | |
"status": "error", | |
"message": "invalid auth key" | |
} | |
{ | |
"status": "error", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return-path: <> | |
Envelope-to: mailganer-sender@get-n-post.ru | |
Delivery-date: Tue, 19 May 2020 15:40:38 +0300 | |
Received: from [92.53.101.249] (helo=mail.mlgnr.com) | |
by out3.get-n-post.ru with esmtp (Exim 4.84_2) | |
id 1jb1Xy-0000G4-7c | |
for mailganer-sender@get-n-post.ru; Tue, 19 May 2020 15:40:38 +0300 | |
Received: from server203.hosting.reg.ru (server203.hosting.reg.ru [31.31.196.86]) | |
by mail.mlgnr.com (Postfix) with ESMTP id 2C439845A1F | |
for <sender@mailganer.com>; Tue, 19 May 2020 12:40:37 +0000 (UTC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gofiles d.shveenkov$ ./files-httpd -config ../go-files-config-dev/files.icq.com.config.yaml | |
panic: runtime error: invalid memory address or nil pointer dereference | |
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4840cf6] | |
goroutine 1 [running]: | |
files.icq.com/pkg/files/upload/repository/tarantool.NewConnection(0x0, 0x56d7980, 0xc0001dd590, 0x0, 0x0) | |
/Users/d.shveenkov/Documents/develop/icq/gofiles/pkg/files/upload/repository/tarantool/connection.go:15 +0x26 | |
files.icq.com/internal/app/httpd/env/prod.provideUploadRepositories(...) | |
/Users/d.shveenkov/Documents/develop/icq/gofiles/internal/app/httpd/env/prod/wire_gen.go:113 | |
files.icq.com/internal/app/httpd/env/prod.InitializeBox(0x7ffeefbff9ce, 0x30, 0x2, 0x2, 0x0, 0x0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
pid = os.fork() | |
if pid != 0: | |
time.sleep(10) | |
exit(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import argparse | |
import os | |
import time | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
parser = argparse.ArgumentParser(description='send test mail script') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Композиция классов против наследования, пример буду вводить в онлайн | |
import json | |
class PetExport: | |
def export(self, dog): | |
raise NotImplementedError | |
class ExportXML(PetExport): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Композиция классов против наследования, пример буду вводить в онлайн | |
import json | |
class PetExport: | |
def export(self, dog): | |
raise NotImplementedError | |
class ExportXML(PetExport): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[centos@shveenkov ~]$ yum search xvfb | |
Loaded plugins: fastestmirror, langpacks | |
Determining fastest mirrors | |
===================================================================================== N/S matched: xvfb ====================================================================================== | |
python-xvfbwrapper.noarch : run headless display inside X virtual framebuffer (Xvfb) | |
xorg-x11-server-Xvfb.x86_64 : A X Windows System virtual framebuffer X server. | |
Name and summary matches only, use "search all" for everything. | |
[centos@shveenkov ~]$ yum search cutycapt | |
Loaded plugins: fastestmirror, langpacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select l1.name, l2.name, | |
g.total_count, g.min_price, g.avg_price, | |
concat( | |
"https://beepcar.ru/poputchiki/beepcar?from=", | |
g.location_id_from, | |
"&to=", | |
g.location_id_to | |
) link | |
from ( | |
select substring_index(t.location_id, ',', 1) location_id_from, |
NewerOlder