This list contains web apps that are useful for performing a particular task.
This file contains hidden or 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
| abstract class Summarize { | |
| abstract summarize(): string; | |
| } | |
| class NewsArticle extends Summarize { | |
| headline: string; | |
| place: string; | |
| author: string; | |
| content: string; |
This file contains hidden or 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
| struct Person{ | |
| name: String, | |
| age: u32, | |
| } | |
| impl Person{ | |
| fn intro(&self){ | |
| println!("My name is {0} and I am {1} years old", self.name, self.age ); | |
| } | |
This file contains hidden or 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 as cv | |
| def nothing(x): | |
| pass | |
| # Create a black image, a window | |
| img = np.zeros((300, 512, 3), np.uint8) | |
| cv.namedWindow('image') |
This file contains hidden or 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 as cv | |
| drawing = False # true if mouse is pressed | |
| mode = True # if True, draw rectangle. Press 'm' to toggle to circle | |
| ix,iy = -1,-1 | |
| # mouse callback function | |
| def draw_circle(event,x,y,flags,param): | |
| global ix,iy,drawing,mode |
This file contains hidden or 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 as cv | |
| # create a black image | |
| img = np.zeros((512, 512, 3), np.uint8) | |
| # Draw a diagonal blue line with thickness of 5 px | |
| cv.line(img,(0,0),(512,512),(255,0,0),5) | |
| # Draw a green rectangle with thickness of 3 px without fill |
This file contains hidden or 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 as cv | |
| cap = cv.VideoCapture('vid.mp4') | |
| while cap.isOpened(): | |
| ret, frame = cap.read() | |
| # if frame is read correctly ret is True | |
| if not ret: |
This file contains hidden or 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 as cv | |
| import sys | |
| # load gray scale image by setting the flag argument to cv.IMREAD_GRAYSCALE | |
| img = cv.imread("img.jpg", cv.IMREAD_GRAYSCALE) | |
| if img is None: | |
| sys.exit("Could not read the image") | |
| cv.imshow("Display window", img) |
This file contains hidden or 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
| <!-- Load TensorFlow.js. This is required to use coco-ssd model. --> | |
| <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"> </script> | |
| <!-- Load the coco-ssd model. --> | |
| <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/coco-ssd"> </script> | |
| <!-- Replace this with your image. Make sure CORS settings allow reading the image! --> | |
| <img id="img" width=400 height=400 usemap="#workmap" src="./YOUR_NAME.png"/> | |
This file contains hidden or 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 streamlit as st | |
| st.write(""" | |
| # Streamlit Hello | |
| Hello streamlit | |
| """) |