Skip to content

Instantly share code, notes, and snippets.

View ola0x's full-sized avatar
🏠
Working from home

Olanrewaju Ola ola0x

🏠
Working from home
View GitHub Profile
import cv2
import numpy as np
width_res = 640
height_res = 480
def readcam1():
cam1 = cv2.VideoCapture(0)
print("[INFO] stating camera 1")
cam1.set(3,width_res)
@ola0x
ola0x / taimg.py
Last active March 12, 2022 14:30
import cv2
import numpy as np
width_res = 1920
height_res = 1080
def readcam1():
cam1 = cv2.VideoCapture(0)
print("[INFO] stating camera 1")
cam1.set(3,width_res)
@ola0x
ola0x / opencv_multicam.py
Last active February 26, 2022 00:32
Using opencv for multiple webcam
import cv2
cam0 = cv2.VideoCapture(0)
cam1 = cv2.VideoCapture(1)
while True:
ret0, frame0 = cam0.read()
ret1, frame1 = cam1.read()
@ola0x
ola0x / s3_trigger_lambda_func.py
Created October 9, 2021 02:56
This is a Lambda function that's get triggers when a file is uploaded to an s3 bucket. I wrote it in such a way that if an image or a json file is uploaded to the s3 bucket the lambda func is able to process it.
import json
import urllib.parse
import boto3
print('Loading function')
s3 = boto3.client('s3')
def lambda_handler(event, context):
@ola0x
ola0x / plot_confusion_matrix_tfmodel_maker.py
Created January 17, 2021 00:24
How to plot confusion matrix using Tensor Flow model maker
%matplotlib inline
from sklearn.metrics import confusion_matrix
import itertools
import matplotlib.pyplot as plt
import tensorflow as tf
assert tf.__version__.startswith('2')
from tflite_model_maker import image_classifier
predicts = model.predict_top_k(test_data)
y_pred = []
titles
"City of Monrovia"
contents
" Monrovia was named after James Monroe, who was president of the United States in 1822.In that year a group of freed U.S. slaves, sponsored by a U.S. society, started a new settlementon the continent of their ancestors. As more settlers arrived from the United States and fromthe Caribbean area, the area they controlled grew larger. In 1847 Monrovia became the capitalof the new country of Liberia."
questions
"Who was president of the United States in 1822?"
"When was James Monroe president of the United States?"
"Who was Monrovia named after?"
titles
"gender"
contents
"Gender is a socially constructed definition of women and men. It is not the same as sex (biological characteristics of women and men) and it is not the same as women. Gender is determined by the conception of tasks, functions and roles attributed to women and men in society and in public and private life."
questions
"What is gender?"
"gender is not what?"
"Gender is not determined by?"
public Result(final String id, final String title, final Float confidence) {
this.id = id;
this.title = title;
this.confidence = confidence;
}
public String getId() {
return id;
}
Some am starting this Amdroid project tonight 18th August, 2020
I will be calling this endpoint === https://nigerianbanks.xyz/
data class = name, slug, code, ussd, logo
Things to implement
1. Use cardView for the Main screen
2. BottomSheet for when any bank item is click
3. When the ussd is clicked it shoud open the dialing pad