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
from tkinter import * | |
import shelve | |
import random | |
import time | |
import psycopg2 | |
from configsql import * | |
class Watereat: | |
def __init__(self,name,energy,power): |
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 openpyxl as px | |
from tkinter import * | |
from tkinter import filedialog as fd | |
import os | |
import re | |
file_name='C:/Users/Default/Desktop/PyScript/PyScript/отчет.xlsx' | |
defrow=1 | |
defcolumn=1 | |
sheetnms='' | |
sheetl=[] |
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 config | |
import telebot | |
import re | |
import time | |
import datetime | |
from threading import Thread | |
import schedule | |
from time import sleep | |
import requests | |
import random |
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
USE [sqlnames] | |
GO | |
/****** Object: StoredProcedure [dbo].[sp_generatenames] ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
ALTER PROCEDURE [dbo].[sp_generatenames] | |
@genvalue INT | |
AS |
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
--Фильтрация данных под шаблон | |
WITH cte as ( | |
SELECT e.CREATED_ON,e.DATE_,e.AXIS_1,'D_1' as AXIS_2, | |
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(AXIS_3,'"',''),'дата продажи',''),'.',''),' ',''),',',''),'АББ','АБВ') as AXIS_3, | |
e.AXIS_4, 'Имя компании' as AXIS_5, e.AXIS_6, REPLACE(SUBSTRING(AXIS_3,0,CHARINDEX(',',AXIS_3)),'АББ','АБВ') as AXIS_7 | |
FROM etls as e WHERE | |
e.AXIS_6 != 'TEST' or e.AXIS_6 is NULL | |
UNION ALL | |
SELECT e.CREATED_ON,e.DATE_,e.AXIS_1,'D_2' as AXIS_2, | |
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(AXIS_3,'"',''),'дата продажи',''),'.',''),' ',''),',',''),'АББ','АБВ') as AXIS_3, |
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
CREATE TABLE #rezults | |
(cobj BIGINT, | |
times DATETIME, | |
counts INT) | |
DECLARE @xg1 DATETIME2, | |
@xg2 INT, | |
@xg3 BIGINT, | |
@mess VARCHAR(300), | |
@logr DATETIME2 | |
SET @xg2=0 |
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
DECLARE geo_kursor CURSOR LOCAL FOR | |
SELECT k.pin,k.lat,k.long,k.geo,k.reciv FROM #koors3 AS k | |
ORDER BY k.reciv | |
OPEN geo_kursor | |
FETCH NEXT FROM geo_kursor | |
INTO @pinfirst,@latg,@longg,@geocurs,@receiv ---LOOK | |
WHILE @@FETCH_STATUS=0 | |
BEGIN | |
SET @userloc = geography::Point(@latg, @longg, 4326).STBuffer(@km) | |
SET @checkgeo1 = (SELECT TOP (1) t.checkgeo FROM #t2 AS t WHERE t.checkpin=@pinfirst ORDER BY t.receivedm DESC ) |
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 requests | |
import json | |
GITHUB_API="https://api.github.com" | |
API_TOKEN = config.token | |
# | |
a = [] | |
x=open(config.discr, 'r') |
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 | |
import win32com.client as win32 | |
olApp = win32.Dispatch('Outlook.Application') | |
olNS = olApp.GetNameSpace('MAPI') # NameSpaces need for attchm | |
mailItem = olApp.CreateItem(0) | |
mailItem.Subject = 'Dummy Email2' | |
mailItem.BodyFormat = 1 | |
mailItem.Body = "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
import os | |
import shutil | |
import pprint | |
from datetime import datetime | |
#upd stamp | |
with open("lastupd.txt", "a") as f: | |
x = datetime.today().strftime('%Y-%m-%d %H:%M:%S') | |
f.write(x + '\n') |
OlderNewer