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 re | |
def validation(): | |
t = int(input().strip()) | |
for _ in range(t): | |
num = "".join(input()) | |
if (re.match(r'^[456]', num) and | |
(re.match(r'([\d]{4}-){3}[\d]{4}$', num) or | |
re.match(r'[\d]{16}', num)) and |
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
cd Vaccine_availability | |
streamlit run home.py |
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 # we are importing the cv2 module from opencv | |
image_path = '/home/prajwal/OpenCv/image_1.jpeg' #change this path by your image path | |
image = cv2.imread(image_path) # Reading of image | |
cv2.imshow('Image-Reading', image) # Image output in new Window | |
cv2.waitKey(0) |
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
namespace Vehicle { | |
class Bike { | |
user: User; | |
constructor(public inputUser: User) { | |
this.user = inputUser; | |
} | |
getName() { | |
return this.user.name; | |
} | |
} |
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 { Todo } from "@todo.types.ts"; | |
class TodosApi { | |
getTodos(params: Todo.Controllers.Get.Request) { | |
return http.get<Todo.Controllers.Get.Response>('/todos', { | |
params, | |
}); | |
} | |
addTodo(todo: Todo.Controllers.Add.Request) { |
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
//todo.types.ts | |
export namespace Todo { | |
export interface TodoObject { | |
id: string; | |
title: string; | |
completed: boolean; | |
} |
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
namespace Vehicle { | |
export class Bike { | |
user: User; | |
constructor(public inputUser: User) { | |
this.user = inputUser; | |
} | |
getName() { | |
return this.user.name; | |
} | |
} |
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
const arr = [1, 2, 3, 4, 5]; | |
arr.forEach((element) => { | |
console.log(element * 2); | |
}); |
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
const arr = [1, 2, 3, 4, 5]; | |
const newArr = arr.map((element) => { | |
return element * 2; | |
}); | |
console.log(newArr); |
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
const arr = [1, 2, 3, 4, 5]; | |
const newArr = arr | |
.map((element) => { | |
return element * 2; | |
}) | |
.filter((element) => { | |
return element > 5; | |
}); | |
console.log(newArr); |
OlderNewer