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 cv2 | |
if __name__ == '__main__': | |
video_capture = cv2.VideoCapture(0) | |
while True: | |
# Capture frame-by-frame | |
ret, frame = video_capture.read() |
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 cv2 | |
if __name__ == '__main__': | |
video_capture = cv2.VideoCapture(0) | |
while True: | |
# Capture frame-by-frame | |
ret, frame = video_capture.read() |
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 cv2 | |
from matplotlib import pyplot as plt | |
cnt=1 | |
if __name__ == '__main__': | |
video_capture = cv2.VideoCapture(0) | |
while cnt<5: | |
# Capture frame-by-frame | |
ret, frame = video_capture.read() |
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 cv2 | |
if __name__ == '__main__': | |
video_capture = cv2.VideoCapture(0) | |
while True: | |
# Capture frame-by-frame | |
ret, frame = video_capture.read() |
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
''' classify | |
after training, classify a sample image with K-Nearest Neighbor | |
annotated from Abid Rahman's post: http://stackoverflow.com/a/9620295/232638 | |
''' | |
import cv2 | |
import numpy as np | |
# load the data we generated previously | |
samples = np.loadtxt('general-samples.data', np.float32) |
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 numpy as np | |
import cv2 | |
import cv | |
import sys | |
import os | |
video_capture = cv2.VideoCapture(0) | |
SZ=20 |
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
package learnkotlin.blogspost.com.sqliteex01 | |
import android.content.Context | |
import com.readystatesoftware.sqliteasset.SQLiteAssetHelper | |
/** | |
* Created by mac on 23/10/2017..... | |
* Added this line to dependancey | |
* compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+' |
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
package learnkotlin.blogspost.com.sqliteex01 | |
import android.content.Intent | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.widget.* | |
import kotlinx.android.synthetic.main.activity_main.* | |
import android.widget.AdapterView.OnItemClickListener |
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
LayoutInflater factory = LayoutInflater.from(this); | |
final View deleteDialogView = factory.inflate(R.layout.mylayout, null); | |
final AlertDialog deleteDialog = new AlertDialog.Builder(this).create(); | |
deleteDialog.setView(deleteDialogView); | |
deleteDialogView.findViewById(R.id.yes).setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
//your business logic | |
deleteDialog.dismiss(); | |
} |
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
package com.a2050.rehman.abdul.dialogtest | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.support.v7.app.AlertDialog | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
import android.content.DialogInterface | |
import android.R.array |
OlderNewer