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
def torgiGetLandNumber(s): | |
''' | |
:param s: строка, содержащая кадастровый номер | |
:return: возвращает распарсенный кадастровый номер из входной строки | |
''' | |
# Делаем рекурсивную замену символов в строке | |
x2 = clear_cell(s) | |
x2 = x2.replace('"','').replace('-',':').replace('/',':').replace('\\',':').replace(';',':').replace('.',':').strip() | |
x2 = (lambda s: (lambda f, *a: f(f, *a)) (lambda rec, s: rec(rec, s.replace('::',':')) if '::' in s else s, s))(x2) # рекурсивно заменяем повторно идущие двоеточия | |
# Вырезаем из строки все цифры и символы двоеточия |
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
# Source: https://getpocket.com/a/read/932998243 | |
import copy | |
import numpy as np | |
import random as rd | |
import theano.tensor as th | |
class network: | |
# layers -list [5 10 10 5] - 5 input, 2 hidden |
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
# -*- coding: utf-8 -*- | |
#Encoding settings for correct utf-8 parsing | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
import timeit | |
#TODO: сделать то же самое на двух других библиотеках | |
start_time = timeit.default_timer() |
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
using System; | |
namespace Strategis.Server.SpatialProcessor.DataInterop.ArcGis | |
{ | |
public static class ArcGisDateTimeHelper | |
{ | |
/**********************************************************************************/ | |
// Declarations | |
/**********************************************************************************/ |
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
'''____________________________________________________________ | |
''' Function #3/3 (Main): ver. 1.0 | |
''' <summary> | |
''' Создает новую с сылку для открытия отчета в новом окне - тег A и JavaScript...open | |
''' </summary> | |
''' <param name="LinkName">Название ссылки</param> | |
''' <param name="ReportServerPath">URL сервера отчетов</param> | |
''' <param name="ReportFolder">Директория отчета</param> | |
''' <param name="ReportName">Название отчета</param> | |
''' <param name="ParamParameters">Все праметры отчета (передается как Parameters)</param> |
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
'''============================================================ | |
''' Функции для сжатия и распаковки параметров | |
'''____________________________________________________________ | |
''' Function #1/4: ver. 1.0 | |
''' <summary> | |
''' Сжимает строку | |
''' </summary> | |
''' <param name="text">Строка которую необходимо сжать</param> | |
''' <returns>Сжатая строка</returns> | |
''' <remarks></remarks> |
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
sqlcmd -S misdev1 -E -d DWH -i SAT_Territory_Fact.sql -o SAT_Territory_Fact_out.txt | |
sqlcmd -S misdev1 -E -d DWH -i HUB_Territory.sql -o HUB_Territory_out.txt | |
sqlcmd -S misdev1 -E -d DWH -i LNK_Territory_Hierarchy.sql -o LNK_Territory_Hierarchy_out.txt |
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
Check If Primary Key exists: | |
IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'PRIMARY KEY' | |
AND TABLE_NAME = 'SAT_Lands_Open_Source' | |
AND TABLE_SCHEMA ='rlt') | |
ALTER TABLE [rlt].[SAT_Lands_Open_Source] DROP CONSTRAINT [PK_Realty_Lands_Open_Source] | |
SQL server will not let you truncate the table while the constraint exists, even if it's disabled. Drop the constraint and re-create it after truncating the table. Or just drop and re-create the tables, whichever is easier to do in your application. | |
IF EXISTS (SELECT * | |
FROM sys.foreign_keys |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using WealthLab; | |
using WealthLab.Indicators; | |
using System.Drawing; | |
namespace WealthLabCompile | |
{ | |
class MovingAverageCrossover : WealthScript |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using WealthLab; | |
using WealthLab.Indicators; | |
using System.Drawing; | |
namespace WealthLabCompile | |
{ | |
class MovingAverageCrossover : WealthScript |