Skip to content

Instantly share code, notes, and snippets.

@rupython
rupython / main.py
Created February 16, 2019 12:25
From: Лев
# Программирование на языке высокого уровня (Python).
# https://www.yuripetrov.ru/edu/python
# Задание task_06_02_10.
#
# Выполнил: Фамилия И.О.
# Группа: !!!
# E-mail: !!!
import random
@rupython
rupython / main.py
Created February 17, 2019 08:49
From: Maksim
{"name":"mtk_app_cp_icon","ts":1537529362214,"userid":"94eb4b13fb072445ab4c97405fd19635","sessionid":"7230991397742552157","platform":"iPhonePlayer","sdk_ver":"u2017.2.2p1","debug_device":false,"user_agent":"ABCLite/22 CFNetwork/808.2.16 Darwin/16.3.0","submit_time":1537529653827,"custom_params":{"action":"show","tag":"bini-mini"},"country":"RU","city":"Moscow","appid":"b7b22ff1-50c3-4434-8d61-030c2519dae4","type":"custom"}
{"name":"mtk_app_cp_icon","ts":1537555583640,"userid":"ea068dc9d8c834ad8bb37dd38b312b31","sessionid":"4734850028570775811","platform":"iPhonePlayer","sdk_ver":"u2017.2.2p1","debug_device":false,"user_agent":"ABCLite/22 CFNetwork/902.2 Darwin/17.7.0","submit_time":1537555831528,"custom_params":{"action":"show","tag":"bini-mini-dancing"},"country":"RU","city":"Selyatino","appid":"b7b22ff1-50c3-4434-8d61-030c2519dae4","type":"custom"}
@rupython
rupython / parserXml.py
Created February 18, 2019 14:23
From: Ulan
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 18 18:14:02 2019
@author: rocket
"""
import os
import xml.etree.ElementTree as ET
@rupython
rupython / main.py
Created February 20, 2019 10:39
From: Nix
вот мой пример
def execute(self, sql, args=None, commit=False):
conn = self.pool.get_connection()
cursor = conn.cursor(dictionary=True)#,buffered=True)
if args:
cursor.execute(sql, args)
else:
cursor.execute(sql)
@rupython
rupython / main.py
Created February 20, 2019 10:55
From: Andrey
import sqlite3
connect = sqlite3.connect("some")
cursor = connect.cursor()
query = "create table example (id integer, name text);"
cursor.execute(query)
Out[10]: <sqlite3.Cursor at 0x7f62b5bb57a0>
cursor.fetchall()
Out[11]: []
query = """insert into example values (1 , "Vasya");"""
cursor.execute(query)
@rupython
rupython / main.py
Created February 20, 2019 14:27
From: AstralRomance
class MainWindow(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.ui.search_button.clicked.connect(self.search_card)
self.ui.tableWidget.setColumnCount(3)
self.ui.tableWidget.setHorizontalHeaderLabels(['Название', 'Редкость', 'Манакост'])
@rupython
rupython / файл.txt
Created February 23, 2019 19:57
From: UNI WOW
208 #9f48b2 159 72 178
209 #bf74ca 191 116 202
210 #d095e4 208 149 228
211 #deb3eb 222 179 235
221 #912934 145 41 52
223 #c35c76 195 92 118
224 #e1949d 225 148 157
225 #f3c6d0 243 198 208
256 #cf5b52 207 91 82
300 #793022 121 48 34
@rupython
rupython / tarif.py
Created February 25, 2019 10:41
From: Zart
import tkinter as tk, tkinter.ttk as ttk # python 3 stdlib
import tkcalendar as tkc # pip install tkcalendar
def main():
# tk
root = tk.Tk()
root.resizable(False, False)
root.title('Изменение тарифного плана')
style = ttk.Style()
style.theme_use('winnative')
@rupython
rupython / main.py
Created February 28, 2019 15:31
From: Kostya
Я написал код для чтения и вывода
@rupython
rupython / main.py
Created February 28, 2019 15:40
From: Angry Maid
Бот значит пошёл жить своей жизнью