Skip to content

Instantly share code, notes, and snippets.

View tudoanh's full-sized avatar

Đỗ Anh Tú tudoanh

View GitHub Profile
@tudoanh
tudoanh / hackthebox-mnist-without-2.ipynb
Created May 19, 2022 15:58
Hackthebox Mnist without 2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tudoanh
tudoanh / Engine.py
Created May 16, 2022 15:06 — forked from quantumjim/Engine.py
Gamified tutorial for QISKit to run on PythonAnywhere
# -*- coding: utf-8 -*-
import math
def ClearScreen () :
# DESCRIPTION:
# Prints a whole bunch of space to screen
print("\n"*200)
def ColouredString (message,colour) :
@tudoanh
tudoanh / gist:64b9d9f65fbd6a3890ebd79418136e11
Created December 12, 2021 06:02 — forked from sunboy-2050/gist:9543963
python implement redis publish and subscribe
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# http://blog.ithomer.net
import time
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
@tudoanh
tudoanh / web_to_pdf.py
Created December 3, 2021 03:47
Download web to pdf using google-chrome
#!/usr/bin/env python3
import subprocess
import sys
import requests
import bs4
from slugify import slugify
from rich.console import Console
@tudoanh
tudoanh / tele_sticker_convert.py
Created September 25, 2021 01:49
Convert images to required format of Telegram sticker
from PIL import Image
from pathlib import Path
import glob
f_names = glob.glob("./Meme/*.jpg") ## Change this to your directory that hold the memes
for f in f_names:
name = Path(f).stem
@tudoanh
tudoanh / imgur_wallpaper.py
Last active April 15, 2024 04:06
Random wallpaper from Imgur
#!/usr/bin/env python3
import sqlite3
import os
import random
import subprocess
import requests
# Set up the database connection and cursor
conn = sqlite3.connect("imgur.db")
c = conn.cursor()
@tudoanh
tudoanh / unsplash.py
Last active August 20, 2021 10:55
Random wallpaper on Ubuntu
#!/usr/bin/env python3
import random
import requests
import subprocess
topic = random.choice(
["meal", "food", "beverage", "wine", "bread", "restaurant", "work"]
)
@tudoanh
tudoanh / Pihole-vn.txt
Created April 1, 2021 15:16
Blacklist Vietnam ads domain for Pihole
media.jxf88.com
v9banners.com
sbbanner.com
uwin71.com
adtimaserver.vn
api.adtimaserver.vn
log.adtimaserver.vn
media.adtimaserver.vn
media.org.adtimaserver.vn
static.adtimaserver.vn
@tudoanh
tudoanh / config
Created July 29, 2020 10:47
I3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@tudoanh
tudoanh / .vimrc
Last active August 1, 2019 15:36
Vim config tudoanh
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" @tudoanh
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
"
" https://github.com/amix/vimrc