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
| class FileOperations { | |
| String currentState | |
| boolean isError | |
| String fileName | |
| FileOperations(initialState, isError = false) { | |
| currentState = initialState | |
| this.isError = isError | |
| } | |
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
| # compatible with Python versions 2.6, 2.7, | |
| # and 3.2 - 3.5. (pip3 install pypdf4) | |
| from pathlib import Path | |
| from typing import Union, Literal, List | |
| from PyPDF2 import PdfWriter, PdfReader | |
| import PyPDF2 |
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
| {"prompt":"I need an API that can estimate the relative depth of objects from a single image. The output should be an inverse depth map.\n\n###\n\n","completion":" {'domain': 'Classification', 'api_call': \"model = torch.hub.load('intel-isl\/MiDaS', 'DPT_Hybrid', pretrained=True)\", 'api_provider': 'PyTorch', 'explanation': \"Load the pretrained MiDaS model for estimating relative depth from a single image, which outputs an inverse depth map.\", 'code': 'import torch\nmodel = torch.hub.load(\"intel-isl\/MiDaS\", \"DPT_Hybrid\", pretrained=True)'}###"} | |
| {"prompt":"I need an API to detect different types of vehicles, people, and lanes in an image captured from a camera mounted on a self-driving car.\n\n###\n\n","completion":" {'domain': 'Object Detection', 'api_call': \"model = torch.hub.load('hustvl\/yolop', 'yolop', pretrained=True)\", 'api_provider': 'PyTorch', 'explanation': 'Load the YOLOP model from PyTorch Hub with pre-trained weights optimized for object detection, drivable area segmentation, and lane de |
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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |