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 functools import total_ordering | |
# @total_ordering | |
class Int(int): | |
def __lt__(self, other): | |
this, that = str(self), str(other) | |
YES, NO = True, False | |
if len(this) < len(that): # everything is vice versa | |
this, that = that, this | |
YES, NO = NO, YES |
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
BI_COMMAND_22 | |
BI_COMMAND_22-BI_COMMAND_TYPE CLEAR_SELECTION_STATE | |
BI_COMMAND_22-TARGET_DATA_PROVIDER_REF_LIST | |
BI_COMMAND_22-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1 DP_1 | |
BI_COMMAND_22-CHARACTERISTIC ZVCH_NETS | |
BI_COMMAND_23 | |
BI_COMMAND_23-BI_COMMAND_TYPE CLEAR_SELECTION_STATE | |
BI_COMMAND_23-TARGET_DATA_PROVIDER_REF_LIST | |
BI_COMMAND_23-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1 DP_3 | |
BI_COMMAND_23-CHARACTERISTIC ZVCH_NETS |
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
$f = Get-Content -Path D:\dat.txt | |
$data = ConvertFrom-Csv -Delimiter "`t" -InputObject $f | |
$data = $data | Sort-Object -Property "Тип заявки", "Объект", "Первичный идентификатор" | |
$groups = $data | Group-Object -Property "Тип заявки" | |
$xmlsettings = New-Object System.Xml.XmlWriterSettings | |
$xmlsettings.Indent = $true | |
foreach ($i in $groups) { | |
$XmlWriter = [System.Xml.XmlWriter]::Create("D:\$($i.Name).xml", $xmlsettings) |
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
Function project_id() As Long | |
' Generate project ID (1-1000) to find it in Application.AddIns collection | |
Static unique As Long | |
If unique = 0 Then | |
Randomize | |
unique = Int((1000 - 1 + 1) * Rnd + 1) | |
End If | |
project_id = unique | |
End Function |
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
local download do={ | |
# Download file: [$download "src_url" "dst_file"] returns boolean | |
do { | |
/tool fetch $1 dst-path=$2 | |
while ([len [/file find name=$2]] = 0) do={delay 0.1} | |
return true | |
} on-error={ | |
return false | |
} | |
} |
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
# -*- coding: utf-8 -*- | |
""" | |
Редактор Spyder | |
Это временный скриптовый файл. | |
""" | |
#import numpy as np | |
#import cv2 as cv | |
#filename = r"F:\Captura3.PNG" |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Feb 10 16:32:44 2018 | |
@author: МакаровАС | |
""" | |
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor | |
import time |
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
.... | |
/* | |
* Wraps `localtime` functionality for multiple platforms. This | |
* converts a time value to a time structure in the local timezone. | |
* | |
* Returns 0 on success, -1 on failure. | |
*/ | |
static int get_localtime(NPY_TIME_T *ts, struct tm *tms) { | |
char *func_name = "<unknown>"; | |
#if defined(_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
tribution | |
writing manifest file 'pandas.egg-info\SOURCES.txt' | |
running build_ext | |
skipping 'pandas\_libs\join.c' Cython extension (up-to-date) | |
skipping 'pandas\_libs\index.c' Cython extension (up-to-date) | |
building 'pandas._libs.index' extension | |
D:\andray\Software\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\Scripts\gcc.ex | |
e -mdll -O -Wall -Ipandas/_libs/src/klib -Ipandas/_libs/src -ID:\andray\Software | |
\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\lib\site-packages\numpy\core\inc | |
lude -ID:\andray\Software\Python\WinPython-32bit-3.4.4.5Qt5\python-3.4.4\include |
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 locale | |
import struct | |
def __readLink(path): | |
# http://stackoverflow.com/a/28952464/1119602 | |
with open(path, 'rb') as stream: | |
content = stream.read() | |
# skip first 20 bytes (HeaderSize and LinkCLSID) | |
# read the LinkFlags structure (4 bytes) | |
lflags = struct.unpack('I', content[0x14:0x18])[0] |