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
#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 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
--Task sheduler | |
week,workday,12 min, in 12hours | |
--silent.vms | |
Set WshShell = CreateObject("WScript.Shell") | |
WshShell.Run "cmd.exe /c C:\Users\Desktop\Folder\shedule.bat", 0, false | |
--shedule.bat | |
@echo off | |
cd "C:\Users\Desktop\Folder\" | |
start pyw mypyfile.pyw | |
exit |
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
--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 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
# simple quote val | |
# exmpl: '1000000000','2222222','333333333' | |
x='''10000000000000000000 | |
222222222222222222222 | |
3333333333333333333 | |
4444444444444444444444 | |
55555555555555555555555 | |
''' | |
def formz(x): | |
y=x.rstrip().replace('\n','\',\'') # '\n','\',\'' '\n',',' |
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
# data for insert only one column | |
# ex: ('248957'),('248959'),('248960'),('248961'),('248962') | |
x='''248957 | |
248959 | |
248960 | |
248961 | |
248962 | |
248963 | |
248964 | |
552416 |
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 | |
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 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') |
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 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
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 ) |
NewerOlder