Skip to content

Instantly share code, notes, and snippets.

func setMaxFps(device: AVCaptureDevice) {
var minFPS = 0.0
var maxFPS = 0.0
var maxWidth:Int32 = 0
var selectedFormat:AVCaptureDevice.Format? = nil
for format in device.formats {
for range in format.videoSupportedFrameRateRanges {
let desc = format.formatDescription
let dimentions = CMVideoFormatDescriptionGetDimensions(desc)
@abinhho
abinhho / install-docker-and-git-ec2.md
Last active September 20, 2021 14:09
Install docker and git on EC2 instance

Install git

sudo yum update  -y
sudo yum install git  -y
git version

Install docker

def count_numbers(sorted_list, less_than):
count = 0
length = len(sorted_list)
if not length:
return 0
if length == 1:
return count + 1 if sorted_list[0] < less_than else count
elif sorted_list[-1] < less_than:
return count + length