Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 126 for mkdtemp (0.42 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/hash_table_asset_v1.py

    # CHECK-NEXT: "tf.InitializeTableFromTextFileV2"([[R0]], [[ARG0]])
    
    
    def write_vocabulary_file(vocabulary):
      """Write temporary vocab file for module construction."""
      tmpdir = tempfile.mkdtemp()
      vocabulary_file = os.path.join(tmpdir, 'tokens.txt')
      with tf.io.gfile.GFile(vocabulary_file, 'w') as f:
        for entry in vocabulary:
          f.write(entry + '\n')
      return vocabulary_file
    
    
    def test():
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:49:35 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common.py

        if len(argv) > 1:
          raise app.UsageError('Too many command-line arguments.')
        if FLAGS.save_model_path:
          save_model_path = FLAGS.save_model_path
        else:
          save_model_path = tempfile.mkdtemp(suffix='.saved_model')
        save_options = tf.saved_model.SaveOptions(save_debug_info=show_debug_info)
        tf.saved_model.save(
            create_module_fn(), save_model_path, options=save_options
        )
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 23:49:27 UTC 2023
    - 4K bytes
    - Viewed (0)
  3. src/os/tempfile_test.go

    			_, err := MkdirTemp(tmpDir, tt.pattern)
    			if tt.wantErr {
    				if err == nil {
    					t.Errorf("MkdirTemp(..., %#q) succeeded, expected error", tt.pattern)
    				}
    				if !errors.Is(err, ErrPatternHasSeparator) {
    					t.Errorf("MkdirTemp(..., %#q): %v, expected ErrPatternHasSeparator", tt.pattern, err)
    				}
    			} else if err != nil {
    				t.Errorf("MkdirTemp(..., %#q): %v", tt.pattern, err)
    			}
    		})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 19 20:45:37 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  4. cluster/gce/gci/mounter/stage-upload.sh

    MOUNTER_ACI_IMAGE=gci-mounter-${MOUNTER_VERSION}.aci
    MOUNTER_GCS_DIR=gs://kubernetes-release/gci-mounter/
    
    TMPDIR=/tmp
    # Setup a working directory
    DOWNLOAD_DIR=$(mktemp --tmpdir=${TMPDIR} -d gci-mounter-build.XXXXXXXXXX)
    
    # Setup a staging directory
    STAGING_DIR=$(mktemp --tmpdir=${TMPDIR} -d gci-mounter-staging.XXXXXXXXXX)
    ACI_DIR=${STAGING_DIR}/gci-mounter
    CWD=${PWD}
    
    # Cleanup the temporary directories
    cleanup() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 23 18:27:20 UTC 2020
    - 2.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py

    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 825 bytes
    - Viewed (0)
  6. hack/run-prometheus-on-etcd-scrapes.sh

    scrapes_file="$1"
    
    if ! [[ -r "$scrapes_file" ]]; then
        echo "$0: $scrapes_file is not a readable file" >&2
        exit 2
    fi
    
    SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")
    
    CONFIG="/tmp/$(cd /tmp && mktemp config.XXXXXX)"
    UNPACKDIR="/tmp/$(cd /tmp && mktemp -d unpack.XXXXXX)"
    SERVER_PID=""
    
    cleanup_prom() {
        rm -f "$CONFIG"
        rm -rf "$UNPACKDIR"
        if [[ -n "$SERVER_PID" ]]; then
    	kill "$SERVER_PID"
        fi
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 08 20:28:05 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  7. src/os/tempfile.go

    // The directory is created with mode 0o700 (before umask).
    // If dir is the empty string, MkdirTemp uses the default directory for temporary files, as returned by TempDir.
    // Multiple programs or goroutines calling MkdirTemp simultaneously will not choose the same directory.
    // It is the caller's responsibility to remove the directory when it is no longer needed.
    func MkdirTemp(dir, pattern string) (string, error) {
    	if dir == "" {
    		dir = TempDir()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 18:04:39 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    from ...utils import needs_py39, needs_pydanticv1
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 822 bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/test_compile_tempfile.txt

    [short] skip
    
    # Ensure that the target of 'go build -o' can be an existing, empty file so that
    # its name can be reserved using os.CreateTemp or the 'mktemp` command.
    
    go build -o empty-file$GOEXE main.go
    
    -- main.go --
    package main
    func main() {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 271 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_sql_databases/test_testing_databases.py

    import pytest
    
    from ...utils import needs_pydanticv1
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 788 bytes
    - Viewed (0)
Back to top