Skip to content

Instantly share code, notes, and snippets.

View hoadh's full-sized avatar
🤖
¯\_(ツ)_/¯

hoadh

🤖
¯\_(ツ)_/¯
View GitHub Profile
# Khởi tạo biến
score = 0
current_question = 1
# Vòng lặp cho game
while current_question <= 3:
# Câu hỏi 1
if current_question == 1:
answer = input("Câu 1: Python được phát hành vào năm nào? A. 1991, B. 1989, C. 2000, D. 1995: ")
if answer.upper() == "A":
function GetLeads() {
const labelText = "Lead từ Landingpage tải tài liệu";
const labelDoneText = "Lead từ Landingpage tải tài liệu - Đã chuyển sang GG";
const sheet = SpreadsheetApp.getActive().getActiveSheet();
const label = GmailApp.getUserLabelByName(labelText);
const labelDone = GmailApp.createLabel(labelDoneText);
const dataNotes = sheet.getDataRange().getNotes();
const insertedIDs = dataNotes.map(row => row[0]);
const emailProcess = (thread, index) => {
@hoadh
hoadh / ui_audio.py
Created June 10, 2022 14:51
Sử dụng đa luồng để xử lý âm thanh và giao diện
import threading
import time
import speech_recognition
import pyttsx3
import datetime
import webbrowser
import requests
from datetime import date, datetime
import language_tool_python
import { useEffect, useState } from "react";
const ToDo = () => {
const [todo, setTodo] = useState([]);
const set_complete = (id) => {
const updated_todo = todo.map(item => {
if (item.id === id) {
item.completed = true;
const [SUN, MON, TUE, WED, THU, FRI, SAT] = [0, 1, 2, 3, 4, 5, 6];
const DAY_STR = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const HOLIDAY_LIST = [
"2022-04-09",
"2022-04-10",
"2022-04-11",
"2022-04-30",
"2022-05-01",
"2022-05-02",
"2022-05-03",
@hoadh
hoadh / transform.html
Created February 16, 2022 17:02
nothing
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
let menu = {
"success": true,
@hoadh
hoadh / ai.py
Created December 20, 2021 14:27
AI - Nhóm THPT Gio Linh
import os
import playsound
import speech_recognition
import pyttsx3
import time
import sys
import datetime
import webbrowser
import requests, json
from datetime import date, datetime
@hoadh
hoadh / demo_snake_gui_game.py
Last active October 16, 2021 19:43
Demo game Rắn săn mồi (Sử dụng tkinter)
import turtle
window = turtle.Screen()
window.setup(600, 600)
window.tracer(False)
pen = turtle.Turtle()
pen.hideturtle()
FIRST_ROW = 0
LAST_ROW = 11
@hoadh
hoadh / demo_snake_game.py
Created October 12, 2021 14:21
Phiên bản terminal game "Rắn săn mồi"
FIRST_ROW = 0
LAST_ROW = 11
FIRST_COLUMN = 0
LAST_COLUMN = 11
EMPTY_VALUE = 0
SNAKE_VALUE = 1
FOOD_VALUE = 2
game = [
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@hoadh
hoadh / move_rectangle_turtle.py
Created October 9, 2021 13:52
Di chuyển khối hình chữ nhật trong Turtle
import turtle as tt
import time
screen = tt.Screen()
screen.tracer(0)
t = tt.Turtle()
t.hideturtle()
def draw_rectangle(pen, x, y, width, height):
pen.penup()