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 / README.md
Created September 4, 2025 08:56 — forked from Chubek/README.md
This is, hands-down, the best way to convert PDFs to EPUB (or any other format)

This document describes several shell pipelines for converting PDF files to any format.

I'm not sure if it's true for all people, but my e-reader sucks at displaying PDF --- which is, in all reality, a giant executable file (we'll discuss this soon). Also, there's dozens of other reasons one may wish to convert a PDF to a better 'text format'. Let's say, you wanna put it up on your website, feed it to a mathematical optimization model, feed it to an script, etc.

Before you read this document, yes, I know there is a utility, nay, dozens that converty PDFs directly to text (like pdftotext). I ALSO know that. there are millions, if not BILLIONS of crappy web services that serve you a malware on the platter alongisde converting the files. So let's not talk about them! It's about "owning" your software, read this!

What are PDF Files?

This is not meant to be a description or history of PDF files, you can consult Sahih Al-Bukhari f

@Ppang0405
Ppang0405 / Reddit-Data-Analysis.md
Created September 2, 2025 08:22 — forked from viseshagarwal/Reddit-Data-Analysis.md
Reddit Data Analysis: Insights from Machine Learning Models

Introduction

In the age of social media, Reddit stands out as a unique platform where users engage in discussions across a wide range of topics. This article presents an in-depth analysis of Reddit comments from various subreddits related to data science, programming, and technology. We'll explore the sentiment, emotions, and content of these comments using several machine learning techniques, including sentiment analysis, topic modeling, and text classification.

Data Collection and Preprocessing

Our analysis begins with data collection from eight subreddits: Python, DataScience, MachineLearning, DataAnalysis, DataMining, Data, DataSets, and DataCenter. We used the PRAW (Python Reddit API Wrapper) library to scrape comments from these subreddits.

Here's a snippet of the code used for data collection:

package main
import (
"encoding/json"
"io"
"log"
"net/http"
"os"
"path/filepath"
"strings"
@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"