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
#!/bin/bash | |
# Define color codes | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
# Run the ip -c a command and process its output | |
ip -c a | awk -v green="$GREEN" -v red="$RED" -v nc="$NC" ' | |
/^[0-9]+:/ { |
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 unittest | |
""" | |
This is a function to extract numbers from the string. | |
It is implemented in my main script that reads the entire input file and runs | |
this function against each line. | |
""" | |
from [YOURSCRIPT] import extract_numbers | |
class TestExtract(unittest.TestCase): |
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
export OPENCV_DOWNLOAD_PATH=/tmp/opencv-cache | |
cmake -D CMAKE_C_COMPILER=/usr/bin/clang-15 -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_PREFIX_PATH=/usr/lib -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -D WITH_CUDA=ON -D CUDA_ARCH_BIN=8.9 -D ARCH=sm_89 -D gencode=arch=compute_89,code=sm_89 -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D WITH_CUBLAS=ON -D WITH_CUFFT=ON -D WITH_NVCUVID=ON -D WITH_OPENMP=ON -D BUILD_EXAMPLES=ON -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D WITH_TBB=ON -D WITH_IPP=ON -D WITH_NVCUVID=ON -D WITH_CSTRIPES=ON -D WITH_OPENCL=ON -D WITH_FFMPEG=ON -D BUILD_opencv_apps=ON -D OPENCV_DOWNLOAD_PATH=/tmp/opencv-cache -D WITH_PNG=ON -D WITH_JPEG=ON -D WITH_WEBP=ON -D WITH_V4L=ON -D WITH_GTK=ON -D WITH_QT=ON -D WITH_GPHOTO2=ON -D WITH_GSTREAMER=ON -D WITH_PROTOBUF=ON -D OPENCV_DNN_CUDA=ON -D CMAKE_PREFIX_PATH=/usr/lib -D CMAKE_CXX_FLAGS="-Ofast" ../opencv |
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
Jeremy: Who is the better superhero? Batman or Ironman? | |
ChatGPT: As an AI language model, I do not have personal opinions or preferences. However, I can provide you with a comparison between Batman and Iron Man to help you decide for yourself. | |
Batman, also known as Bruce Wayne, is a DC Comics superhero created by artist Bob Kane and writer Bill Finger in 1939. Batman is a highly skilled martial artist and detective, utilizing his intellect, technology, and wealth to fight crime in Gotham City. He does not possess any superhuman abilities but relies on his physical prowess, gadgets, and vehicles. Batman's motivation stems from witnessing the murder of his parents, which drives him to protect innocent people and bring justice to criminals. | |
Iron Man, or Tony Stark, is a Marvel Comics superhero created by writer Stan Lee, artist Don Heck, and scripter Larry Lieber in 1963. Tony Stark is a billionaire inventor, engineer, and philanthropist who created the Iron Man suit to save his own life after being injured a |
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
#politics | |
#election | |
#government | |
#policy | |
#vote | |
#democracy | |
#republican | |
#democrat | |
#conservative | |
#liberal |
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
private async Task processImage() { | |
// create single httpclient | |
HttpClient client = new HttpClient { | |
BaseAddress = new Uri(baseUrl + "/face/v1.0/detect?returnFaceAttributes=age,glasses,emotion,headpose,gender&ReturnFaceLandmarks=true") | |
}; | |
HttpResponseMessage response = null; | |
client.DefaultRequestHeaders.Clear(); | |
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "xxxxxxxxxxxxxxxxxxx"); |
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
hostb0@pci0:0:0:0: class=0x060000 card=0x507217aa chip=0x3e348086 rev=0x0c hdr=0x00 | |
vendor = 'Intel Corporation' | |
device = 'Coffee Lake HOST and DRAM Controller' | |
class = bridge | |
subclass = HOST-PCI | |
vgapci0@pci0:0:2:0: class=0x030000 card=0x507217aa chip=0x3ea08086 rev=0x02 hdr=0x00 | |
vendor = 'Intel Corporation' | |
device = 'UHD Graphics 620 (Whiskey Lake)' | |
class = display | |
subclass = VGA |
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
ugen0.4: <Azurewave Integrated Camera> at usbus0 | |
ums0 on uhub0 | |
ums0: <Logitech USB Receiver, class 0/0, rev 2.00/12.10, addr 1> on usbus0 | |
ums0: 16 buttons and [XYZT] coordinates ID=2 | |
uhid0 on uhub0 | |
uhid0: <Logitech USB Receiver, class 0/0, rev 2.00/12.10, addr 1> on usbus0 | |
wlan0: link state changed to DOWN | |
Waiting (max 60 seconds) for system process `vnlru' to stop... done | |
Waiting (max 60 seconds) for system process `syncer' to stop... | |
Syncing disks, vnodes remaining... 0 0 done |
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
nexus0 | |
cryptosoft0 | |
efirtc0 | |
apic0 | |
ram0 | |
acpi0 | |
acpi_ec0 pnpinfo _HID=PNP0C09 _UID=0 at handle=\_SB_.PCI0.LPCB.EC__ | |
pcib0 pnpinfo _HID=PNP0A08 _UID=0 at handle=\_SB_.PCI0 | |
pci0 | |
hostb0 pnpinfo vendor=0x8086 device=0x3e34 subvendor=0x17aa subdevice=0x5072 class=0x060000 at slot=0 function=0 dbsf=pci0:0:0:0 |
NewerOlder