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
""" | |
Utilities for creating a docker image. | |
""" | |
import fnmatch | |
import json | |
import pathlib | |
import re | |
import stat | |
import subprocess | |
import tarfile |
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
// Пример выбора Страны без добавления в справочник. | |
// Позволяет выбрать Страну из классификатора при отсутствии в справочнике. | |
// | |
// 1С:Предприятие 8.3.22.1923 (2023г.): | |
// ДоступныеТипы ни на что не влияет для всех типов (кроме "ОписаниеТипов"). | |
// ОграничениеТипа влияет на Выбор и значение. | |
// | |
// Это часть для реквизита типа "ОписаниеТипов". | |
// Свойства: ДоступныеТипы, РазрешитьСоставнойТип, ТипыВВидеДерева. | |
// В справке находятся в |
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
/* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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
# Licensed under the Apache License, Version 2.0 (the "License") | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and |
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 torch.utils.data.dataloader import _SingleProcessDataLoaderIter | |
class CUDAPrefetcher(_SingleProcessDataLoaderIter): | |
def __init__(self, loader, device=None, priority=0): | |
if not torch.cuda.is_available(): | |
raise Exception("Only CUDA") | |
super(CUDAPrefetcher, self).__init__(loader) | |
self.device = device | |
self.stream = torch.cuda.Stream(device=device, priority=priority) | |
self.last = None |
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 multiprocessing | |
import sys | |
__file__ = r'path_to\multiprocessing_example.py' | |
sys.argv = [__file__] | |
python_exe = r'path_to\python.exe' | |
def getresult(outp): |
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
class CDForestUtils : public CDForest | |
{ | |
protected: | |
static void DFProcessInternal(CDecisionForest &df,const int offs, | |
double &x[],double &y[],ulong &stats[]) | |
{ | |
//--- create variables | |
int k=0; | |
int idx=0; | |
//--- Set pointer to the root |