Home
last modified time | relevance | path

Searched +full:path +full:- +full:exists (Results 1 – 25 of 1037) sorted by relevance

12345678910>>...42

/third_party/mindspore/mindspore-src/source/tests/ut/python/mindrecord/
Dtest_mindrecord_multi_images.py7 # http://www.apache.org/licenses/LICENSE-2.0
41 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
42 if os.path.exists("{}".format(file_name + ".db")):
44 if os.path.exists("{}".format(file_name)):
52 assert os.path.exists(file_name)
53 assert os.path.exists(file_name + ".db")
56 if os.path.exists("{}".format(file_name + ".db")):
58 if os.path.exists("{}".format(file_name)):
64 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
65 if os.path.exists("{}".format(file_name + ".db")):
[all …]
Dtest_tfrecord_to_mr.py7 # http://www.apache.org/licenses/LICENSE-2.0
26 SupportedTensorFlowVersion = '1.13.0-rc1'
43 Valid names can only contain a-z, A-Z, and 0-9 and _
103 … feature = tf.train.Feature(bytes_list=tf.train.BytesList(value=[bytes(values, encoding='utf-8')]))
106 writer = tf.io.TFRecordWriter(os.path.join(TFRECORD_DATA_DIR, tfrecord_file_name))
111 image_bytes = bytes(str("aaaabbbbcccc" + str(i)), encoding="utf-8")
145 … feature = tf.train.Feature(bytes_list=tf.train.BytesList(value=[bytes(values, encoding='utf-8')]))
148 writer = tf.io.TFRecordWriter(os.path.join(TFRECORD_DATA_DIR, tfrecord_file_name))
153 image_bytes = bytes(str("aaaabbbbcccc" + str(i)), encoding="utf-8")
173 file_name_ = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
[all …]
Dtest_cifar100_to_mindrecord.py7 # http://www.apache.org/licenses/LICENSE-2.0
27 if os.path.exists("{}".format(x)):
29 if os.path.exists("{}.db".format(x)):
31 if os.path.exists("{}_test".format(x)):
33 if os.path.exists("{}_test.db".format(x)):
39 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
46 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
49 assert os.path.exists(file_name)
50 assert os.path.exists(file_name + "_test")
55 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
[all …]
Dtest_cifar10_to_mindrecord.py7 # http://www.apache.org/licenses/LICENSE-2.0
27 if os.path.exists("{}".format(x)):
29 if os.path.exists("{}.db".format(x)):
31 if os.path.exists("{}_test".format(x)):
33 if os.path.exists("{}_test.db".format(x)):
39 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
46 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
49 assert os.path.exists(file_name)
50 assert os.path.exists(file_name + "_test")
55 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
[all …]
Dtest_imagenet_to_mindrecord.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 if os.path.exists(x):
45 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
64 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
69 assert os.path.exists(file_name + str(i))
70 assert os.path.exists(file_name + str(i) + ".db")
81 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
85 assert os.path.exists(file_name)
86 assert os.path.exists(file_name + ".db")
94 file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
[all …]
Dutils.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 dir_name (str): String of imagenet dataset's path.
37 if not os.path.isdir(dir_name):
38 raise IOError("Directory {} not exists".format(dir_name))
39 img_dir = os.path.join(dir_name, "images")
40 ann_file = os.path.join(dir_name, "annotation.txt")
49 with open(os.path.join(img_dir, filename), "rb") as file_reader:
62 Return raw data of two-bytes dataset.
65 file_name (str): String of two-bytes dataset's path.
70 if not os.path.exists(file_name):
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/compile_cache/
Dtest_compile_cache.py1 # Copyright 2021-2024 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
29 ret = os.system('sed -i "/{0}/{1}" {2}'.format(regex, context, file_name))
31 raise ValueError('exec `sed -i "/{0}/{1}" {2}` failed.'.format(regex, context, file_name))
43 ret = os.system("cp -af {0} {1}".format(src, dst))
45 raise ValueError("cp -af {0} {1}".format(src, dst))
54 cmd = "ps -ef | grep python | grep train.py | grep -v grep"
59 log_file = os.path.join(cur_model_path, "scripts/train_parallel{}/log")
66 loss_list.append(loss[-1])
77 if os.path.exists(cache_path):
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/cpp/dataset/
Dpath_test.cc2 * Copyright 2019-2022 Huawei Technologies Co., Ltd
8 * http://www.apache.org/licenses/LICENSE-2.0
16 #include "minddata/dataset/util/path.h"
29 /// Feature: Path
30 /// Description: Test Path on a directory and on jpeg file extension
33 Path f("/tmp"); in TEST_F()
34 ASSERT_TRUE(f.Exists()); in TEST_F()
38 auto dir_it = Path::DirIterator::OpenDirectory(&f); in TEST_F()
41 while (dir_it->HasNext()) { in TEST_F()
42 Path v = dir_it->Next(); in TEST_F()
[all …]
/third_party/python/Lib/test/
Dtest_py_compile.py57 self.source_path = os.path.join(self.directory, '_test.py')
60 self.cwd_drive = os.path.splitdrive(os.getcwd())[0]
62 # current working directory path and the 'self.source_path' might be
65 drive = os.path.splitdrive(self.source_path)[0]
78 self.assertTrue(os.path.exists(self.pyc_path))
79 self.assertFalse(os.path.exists(self.cache_path))
89 assert os.path.islink(self.pyc_path)
93 @unittest.skipIf(not os.path.exists(os.devnull) or os.path.isfile(os.devnull),
94 'requires os.devnull and for it to be a non-regular file')
96 # In the face of a cfile argument being a non-regular file, bail out.
[all …]
Dtest_unicode_file.py13 if not os.path.supports_unicode_filenames:
22 if os.path.exists(filename):
27 # file already exists etc.
32 self.assertTrue(os.path.exists(filename))
33 self.assertTrue(os.path.isfile(filename))
35 self.assertTrue(os.path.exists(os.path.abspath(filename)))
36 self.assertTrue(os.path.isfile(os.path.abspath(filename)))
37 self.assertTrue(os.access(os.path.abspath(filename), os.R_OK))
45 os.path.abspath(filename)==os.path.abspath(glob.glob(glob.escape(filename))[0]))
47 path, base = os.path.split(os.path.abspath(filename))
[all …]
/third_party/python/Lib/distutils/tests/
Dtest_archive_util.py1 # -*- coding: utf-8 -*-
7 from os.path import splitdrive
53 if os.path.supports_unicode_filenames:
111 base_name = os.path.join(tmpdir2, target_name)
119 self.assertTrue(os.path.exists(tarball))
122 def _tarinfo(self, path): argument
123 tar = tarfile.open(path)
138 dist = os.path.join(tmpdir, 'dist')
142 os.mkdir(os.path.join(dist, 'sub'))
144 os.mkdir(os.path.join(dist, 'sub2'))
[all …]
Dtest_install_data.py17 cmd.install_dir = inst = os.path.join(pkg_dir, 'inst')
20 # - simple files
21 # - a tuple with a path, and a list of file
22 one = os.path.join(pkg_dir, 'one')
24 inst2 = os.path.join(pkg_dir, 'inst2')
25 two = os.path.join(pkg_dir, 'two')
37 rtwo = os.path.split(two)[-1]
38 self.assertTrue(os.path.exists(os.path.join(inst2, rtwo)))
39 rone = os.path.split(one)[-1]
40 self.assertTrue(os.path.exists(os.path.join(inst, rone)))
[all …]
/third_party/musl/libc-test/src/functionalext/adlt/
Dadlt_tools.py2 # -*- coding: utf-8 -*-
8 # http://www.apache.org/licenses/LICENSE-2.0
23 def cwd(path): argument
25 os.chdir(path)
33 if not os.path.exists(args.lib_dir):
34 print(f'adlt_tools build_sym_script: input lib dir {args.lib_dir} is not exists')
52 if not os.path.exists(args.lib_dir):
53 print(f'adlt_tools build_sym_links: input lib dir {args.lib_dir} is not exists')
57 if not os.path.exists(args.adlt_lib):
58 print(f'adlt_tools build_sym_links: input adlt lib {args.adlt_lib} is not exists')
[all …]
/third_party/toybox/
Dinstall.py2 # -*- coding: utf-8 -*-
4 # Copyright (c) 2020-2022 Huawei Device Co., Ltd.
14 '--long_path', help='Toybox cmd long path', required=True)
16 '--out_dir', help='Build out directoty', required=True)
20 bin_dir = os.path.join(out_dir, 'bin')
21 if not os.path.exists(bin_dir):
24 sbin_dir = os.path.join(out_dir, 'sbin')
25 if not os.path.exists(sbin_dir):
28 usr_bin_dir = os.path.join(out_dir, 'usr', 'bin')
29 if not os.path.exists(usr_bin_dir):
[all …]
/third_party/icu/ohos_icu4c/build_data/
Dohos_data.py2 # -*- coding: utf-8 -*-
8 # http://www.apache.org/licenses/LICENSE-2.0
23 if (not os.path.exists(os.path.join(ohos_src_dir, "unit")) or
24 not os.path.exists(os.path.join(ohos_src_dir, "misc"))):
31 for unit_file in os.listdir(os.path.join(ohos_src_dir, "unit")):
34 for misc_file in os.listdir(os.path.join(ohos_src_dir, "misc")):
58 if not os.path.exists(os.path.join(ohos_src_dir, "config.json")):
61 with open(os.path.join(ohos_src_dir, "config.json"), 'r', encoding='utf-8') as f:
75 if not os.path.exists(ohos_src_dir):
102 if not os.path.exists(src_file) or not os.path.exists(dest_file):
[all …]
/third_party/vk-gl-cts/external/
Dfetch_sources.py1 # -*- coding: utf-8 -*-
3 #-------------------------------------------------------------------------
5 # --------------------------------------
13 # http://www.apache.org/licenses/LICENSE-2.0
21 #-------------------------------------------------------------------------
35 scriptPath = os.path.join(os.path.dirname(__file__), "..", "scripts")
36 sys.path.insert(0, scriptPath)
40 EXTERNAL_DIR = os.path.realpath(os.path.normpath(os.path.dirname(__file__)))
47 def onReadonlyRemoveError (func, path, exc_info): argument
48 os.chmod(path, stat.S_IWRITE)
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/dataset/
Dtest_minddataset_exception.py2 # Copyright 2019-2022 Huawei Technologies Co., Ltd
8 # http://www.apache.org/licenses/LICENSE-2.0
27 if os.path.exists(file_name):
29 if os.path.exists("{}.db".format(file_name)):
35 "data": bytes('0xffsafdafda', encoding='utf-8')}]
44 if os.path.exists(file_name):
46 if os.path.exists("{}.db".format(file_name)):
52 "data": bytes('0xffsafdafda', encoding='utf-8')}]
61 if os.path.exists(file_name):
63 if os.path.exists("{}.db".format(file_name)):
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/python/mindspore/dataset/engine/obs/
Dutil.py7 # http://www.apache.org/licenses/LICENSE-2.0
45 if not os.path.exists(config.WORKING_PATH):
57 Download all dataset files from OBS, skip if it exists.
60 remote_path (str): OBS path of dataset files.
62 local_path (str): Local path of dataset files.
65 if not os.path.exists(os.path.join(local_path, dataset_file)):
68 if not os.path.exists(os.path.join(local_path, meta_file)):
78 local_path (str): Local path of dataset files.
83 dataset_file = os.path.basename(f)
98 start (int): Start index of sample for non-full dataset file.
[all …]
/third_party/gn/examples/ios/build/toolchain/apple/
Dswiftc.py23 'object': os.path.join(settings.object_dir, module + '.o'),
24 'dependencies': os.path.join(tmpdir, module + '.d'),
28 name, _ = os.path.splitext(os.path.basename(source))
30 'object': os.path.join(settings.object_dir, name + '.o'),
31 'dependencies': os.path.join(tmpdir, name + '.d'),
35 path = getattr(settings, key)
36 if os.path.exists(path):
37 os.unlink(path)
40 path = os.path.splitext(getattr(settings, key))[0] + ext
41 if os.path.exists(path):
[all …]
/third_party/python/Lib/distutils/
Dfile_util.py24 # custom error-handling added.
33 if os.path.exists(dst):
71 the file exists, it will be ruthlessly clobbered.) If 'preserve_mode'
74 'preserve_times' is true (the default), the last-modified and
75 last-access times are copied as well. If 'update' is true, 'src' will
93 # XXX if the destination file already exists, we clobber it if
96 # should probably blow up if destination exists and we would be
103 if not os.path.isfile(src):
107 if os.path.isdir(dst):
109 dst = os.path.join(dst, os.path.basename(src))
[all …]
Ddep_util.py3 Utility functions for simple, timestamp-based dependency of files
12 """Return true if 'source' exists and is more recently modified than
13 'target', or if 'source' exists and 'target' doesn't. Return false if
17 if not os.path.exists(source):
19 os.path.abspath(source))
20 if not os.path.exists(target):
55 """Return true if 'target' is out-of-date with respect to any file
56 listed in 'sources'. In other words, if 'target' exists and is newer
62 out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
67 # If the target doesn't even exist, then it's definitely out-of-date.
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/dataset/
Dtest_chinese_path_on_windows.py1 # Copyright 2019-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
31 if os.path.exists("{}".format(mindrecord)):
33 if os.path.exists("{}.db".format(mindrecord)):
67 if not os.path.exists(mindrecord):
69 if not os.path.exists(mindrecord + ".db"):
85 Feature: test chinese path on windows platform
89 mindrecord_file_name = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
100 # create chinese path for test
101 if not os.path.exists("data/数据集/train/训练集"):
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/synchronization/internal/
Dgraphcycles.h7 // https://www.apache.org/licenses/LICENSE-2.0
24 // requests to add an edge where one already exists are silently
36 // InsertEdge() is very fast when the edge already exists, and reasonably fast
85 // Remove any edge that exists from source_node to dest_node.
88 // Return whether node exists in the graph.
98 // Find a path from "source" to "dest". If such a path exists,
99 // place the nodes on the path in the array path[], and return
100 // the number of nodes on the path. If the path is longer than
102 // in path[]. The client should compare the return value with
103 // max_path_len" to see when this occurs. If no path exists, return
[all …]
/third_party/weex-loader/
Dmodule-source.js7 * http://www.apache.org/licenses/LICENSE-2.0
17 const path = require('path'); constant
19 const exists = function(src, dst, callback) { function
23 fs.exists(dst, function(exists) { argument
24 if (exists) {
50 const pathInfo = path.parse(_src);
58 exists(_src, _dst, copy);
66 exists(path.resolve(__dirname, src), dist, copy);
70 copyResource(path.resolve(__dirname, './deps/weex-scripter'), process.argv[TARGET_POSITION] + '/scr…
71 copyResource(path.resolve(__dirname, './deps/weex-styler'), process.argv[TARGET_POSITION] + '/style…
/third_party/mindspore/mindspore-src/source/tests/st/profiler/
Dtest_profiler_async_analysis.py1 # Copyright 2022-2023 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
23 data_path = os.path.join(os.getcwd(), "data")
24 kernel_meta_path = os.path.join(os.getcwd(), "kernel_data")
25 cache_path = os.path.join(os.getcwd(), "__pycache__")
26 if os.path.exists(data_path):
28 if os.path.exists(kernel_meta_path):
30 if os.path.exists(cache_path):
39 self.profiler_path = os.path.join(profiler_path, 'profiler')
55 result_file = os.path.join(self.profiler_path, _file)
[all …]

12345678910>>...42