Skip to content

Instantly share code, notes, and snippets.

View Ppang0405's full-sized avatar
🎉
Tet holiday

Jeremy Ppang0405

🎉
Tet holiday
  • Hanoi
View GitHub Profile
@Ppang0405
Ppang0405 / sample.vtt
Created January 1, 2025 15:22 — forked from samdutton/sample.vtt
Sample WebVTT caption file
WEBVTT
00:00:00.500 --> 00:00:02.000
The Web is always changing
00:00:02.500 --> 00:00:04.300
and the way we access it is changing
@Ppang0405
Ppang0405 / telegramRestore.md
Created December 27, 2024 11:27 — forked from avivace/telegramRestore.md
Restore deleted Telegram messages from groups

Restore deleted Telegram messages, medias and files from groups

There's not telegram API method for this, we need to call MTProto methods to retrieve messages from the "Recent Actions" (Admin Log) since deleted messages (and medias) gets moved there for 48 hours before the permanent deletion.

from telethon import TelegramClient, events, sync
from telethon.tl.types import InputChannel, PeerChannel
Exercise answers
10. In ra danh sách các sản phẩm (MASP,TENSP) được khách hàng có tên “Nguyen Van A” mua trong tháng 10/2006.
SELECT DISTINCT sp.masp, sp.tensp
FROM sqlpractices.sanpham sp
JOIN sqlpractices.cthd cthd ON sp.masp = cthd.masp
JOIN sqlpractices.hoadon hd ON cthd.sohd = hd.sohd
// GoatCounter: https://www.goatcounter.com
// This file is released under the ISC license: https://opensource.org/licenses/ISC
;(function() {
'use strict';
if (window.goatcounter && window.goatcounter.vars) // Compatibility with very old version; do not use.
window.goatcounter = window.goatcounter.vars
else
window.goatcounter = window.goatcounter || {}
@Ppang0405
Ppang0405 / gist:50498f4d2436173ad5c25a6891f0a4df
Created February 23, 2024 14:31 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
import string
all_string = string.ascii_lowercase
list_string = list(string.ascii_lowercase)
riddle = "QJDB PDL GL AHP SKLP QKH"
print(riddle.lower())
def convert_letter_to_number():
anyio==3.6.2 ; python_version >= "3.9" and python_version < "3.12"
args==0.1.0 ; python_version >= "3.9" and python_version < "3.12"
certifi==2022.12.7 ; python_version >= "3.9" and python_version < "3.12"
charset-normalizer==3.1.0 ; python_version >= "3.9" and python_version < "3.12"
click==8.1.3 ; python_version >= "3.9" and python_version < "3.12"
clint==0.5.1 ; python_version >= "3.9" and python_version < "3.12"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and sys_platform == "win32" or python_version >= "3.9" and python_version < "3.12" and platform_system == "Windows"
deta==1.1.0 ; python_version >= "3.9" and python_version < "3.12"
dnspython==2.3.0 ; python_version >= "3.9" and python_version < "3.12"
email-validator==1.3.1 ; python_version >= "3.9" and python_version < "3.12"
anyio==3.6.2 ; python_version >= "3.9" and python_version < "4.0"
args==0.1.0 ; python_version >= "3.9" and python_version < "4.0"
certifi==2022.12.7 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.1.0 ; python_version >= "3.9" and python_version < "4"
click==8.1.3 ; python_version >= "3.9" and python_version < "4.0"
clint==0.5.1 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows"
dnspython==2.3.0 ; python_version >= "3.9" and python_version < "4.0"
email-validator==1.3.1 ; python_version >= "3.9" and python_version < "4.0"
fastapi==0.95.0 ; python_version >= "3.9" and python_version < "4.0"
# https://github.com/realpython/python-speech-recognition/blob/master/guessing_game.py
import random
import time
import speech_recognition as sr
def recognize_speech_from_mic(recognizer, microphone):
"""Transcribe speech from recorded from `microphone`.
@Ppang0405
Ppang0405 / admin.py
Created January 15, 2023 16:09 — forked from herbps10/admin.py
Setting up SQLAlchemy with Application Factory pattern and Blueprints
from flask import current_app, Blueprint, render_template
from database import db_session
from model import Product
admin = Blueprint('admin', __name__, url_prefix='/admin')
@admin.route('/')
def index():
product = db_session.query(Product).first()