This file contains 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
class HelloWorld: | |
def __init__(self, name): | |
self.name = name.capitalize() | |
def sayHi(self): | |
print "Hello " + self.name + "!" | |
hello = HelloWorld("world") | |
hello.sayHi() |
This file contains 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
print("hello world") |
This file contains 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
self = <test.TestBuild testMethod=test_build_b> | |
def test_build_b(self): | |
query = """UPDATE domains_meta SET """ | |
bad_data = [['888888888877777777776666666666555555555544', '', [], query], | |
['%', 'test', [], query]] | |
for ass in bad_data: | |
with self.assertRaises(ValueError): | |
> result = build_b(*ass) |
This file contains 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 telebot | |
from telebot import types | |
bot = telebot.TeleBot (Token) | |
@bot.message_handler(commands=["start"]) | |
def start(m): | |
msg = bot.send_message(m.chat.id, "Вас приветствует Бот") | |
keyboard = types.ReplyKeyboardMarkup(resize_keyboard=True) |
This file contains 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
https://gist.github.com/da1dc5c3ae3ddb607b9d10ec133b8fa8 |
This file contains 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 | |
from flasgger import Swagger | |
from flask import Flask, redirect | |
from flask_restful import Api | |
from webargs.flaskparser import parser, abort | |
from common.config import template | |
from resources.lists import AllGroups, AllTeachers | |
from resources.schedule import Group, Teacher |
This file contains 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 | |
from flasgger import Swagger | |
from flask import Flask, redirect | |
from flask_restful import Api | |
from webargs.flaskparser import parser, abort | |
from common.config import template | |
from resources.lists import AllGroups, AllTeachers | |
from resources.schedule import Group, Teacher |
This file contains 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 functools | |
import os | |
import telebot | |
from text_templates import example | |
from utils import cache | |
bot = telebot.TeleBot(os.environ.get('token')) |
This file contains 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 peewee | |
db = peewee.SqliteDatabase('users.db') | |
class BaseModel(peewee.Model): | |
class Meta: | |
database = db | |
This file contains 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 peewee | |
db = peewee.SqliteDatabase('users.db') | |
class BaseModel(peewee.Model): | |
class Meta: | |
database = db | |
OlderNewer