Install CMake (3.16 or higher):
brew install cmakeIf it's already installed, uninstall opencv-python:
| """ | |
| This Python script demonstrates how to download multiple files asynchronously using the httpx library for HTTP requests | |
| and aiofiles for asynchronous file operations. | |
| """ | |
| import asyncio | |
| import tempfile | |
| import time | |
| from pathlib import Path | |
| import aiofiles | 
| #!/bin/bash | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check | 
| #!/bin/bash | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check | 
pyenv has to be installed from Github https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9
| #!/usr/bin/env bash | |
| # This installs Python under Rosetta and assign it to pyenv. | |
| # This way of installing Python avoids: ModuleNotFoundError: No module named '_ctypes' | |
| # pyenv has to be installed from Github https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9 | |
| version=$1 | |
| if [ "$#" -ne 1 ]; then | |
| echo "Illegal number of parameters. Usage:" | 
| import org.apache.spark.sql.functions._ | |
| val mediumDf = Seq((0, "zero"), (4, "one")).toDF("id", "value") | |
| val largeDf = Seq((0, "zero"), (2, "two"), (3, "three"), (4, "four"), (5, "five")).toDF("id", "value") | |
| mediumDf.show() | |
| largeDf.show() | |
| /* | |
| +---+-----+ | 
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
| package test.idlike.spark.datastructure; | |
| import org.apache.commons.lang3.SystemUtils; | |
| import org.apache.spark.api.java.JavaDoubleRDD; | |
| import org.apache.spark.api.java.JavaPairRDD; | |
| import org.apache.spark.api.java.JavaRDD; | |
| import org.apache.spark.api.java.JavaSparkContext; | |
| import org.apache.spark.api.java.function.Function; | |
| import org.apache.spark.api.java.function.VoidFunction; | |
| import scala.Tuple2; |