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
| DECLARE geo_crs CURSOR LOCAL FOR | |
| SELECT crs.pin,crs.lat,crs.long,crs.geo,crs.reciv FROM #crs4 AS crs | |
| ORDER BY crs.reciv | |
| OPEN geo_crs | |
| FETCH NEXT FROM geo_crs | |
| INTO @pinfirst,@latg,@longg,@geocurs,@receiv | |
| 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 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
| 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 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
| --Cursor Sample, declare for tables list | |
| --Result select val from list of tables, with equal column names-- | |
| IF OBJECT_ID('tempdb..#connector1') IS NOT NULL DROP TABLE #connector1 | |
| IF OBJECT_ID('tempdb..#resulttable') IS NOT NULL DROP TABLE #resulttable | |
| CREATE TABLE #connector1 (val int) | |
| CREATE TABLE #resulttable (id int, val int) | |
| DECLARE |
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 shutil | |
| import pprint | |
| from datetime import datetime | |
| import win32com.client as win32 | |
| #upd stamp | |
| with open("lastupd.txt", "a") as f: | |
| x = datetime.today().strftime('%Y-%m-%d %H:%M:%S') | |
| f.write(x + '\n') |
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
| #How it work# | |
| #:Search info in incoming messages and remind about new value, into Outlook from third-system, without last(closed) selfstatus | |
| #:Last selfstatus substitution in closed_list.txt manualy | |
| #:Make txt file with some info, for reminder button | |
| #:After, remind about new messages | |
| #(foxes in comment just for ex) | |
| import os | |
| import time | |
| from datetime import datetime | |
| import win32com.client as win32 |
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 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 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 tkinter import * | |
| import shelve | |
| import random | |
| import time | |
| import psycopg2 | |
| from configsql import * | |
| class Watereat: | |
| def __init__(self,name,energy,power): |
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
| 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 |