View xgboost.mqh
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
/* | |
* 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. |
View test_autopytorch_metrics.py
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
# 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 |
View CUDAPrefetcher.py
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
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 |
View multiprocessing_example.py
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 multiprocessing | |
import sys | |
__file__ = r'path_to\multiprocessing_example.py' | |
sys.argv = [__file__] | |
python_exe = r'path_to\python.exe' | |
def getresult(outp): |
View ModifForest.mqh
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
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 |