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:

@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
@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:
@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()

Create a new project

poetry new <project-name>

Add a new lib

potry add <library>

Remove a lib

@Ppang0405
Ppang0405 / install.sh
Created November 24, 2021 13:26 — forked from marklit/install.sh
Bot Detection Script. Works with Apache and Nginx Log Files.
sudo apt-get update
sudo apt-get install \
python-dev \
python-pip \
python-virtualenv
virtualenv findbots
source findbots/bin/activate
curl -O http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
@Ppang0405
Ppang0405 / AndroidManifest.xml
Created November 10, 2021 12:30 — forked from Venryx/AndroidManifest.xml
Record audio on Android in the background (even when screen is off)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp">
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
<service android:name=".ForegroundService" android:enabled="true" android:exported="true"></service>
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"