sudo apt-get install libjpeg-dev build-essential python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev vim git tmux python-virtualenv python-pip -y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess | |
import sys | |
import requests | |
import bs4 | |
from slugify import slugify | |
from rich.console import Console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import random | |
import requests | |
import subprocess | |
topic = random.choice( | |
["meal", "food", "beverage", "wine", "bread", "restaurant", "work"] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" @tudoanh | |
" | |
" Awesome_version: | |
" Get this config, nice color schemes and lots of plugins! | |
" | |
" Install the awesome version from: | |
" | |
" https://github.com/amix/vimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from lxml import html | |
import requests | |
class VJCrawl(): | |
def __init__(self): | |
self.s = requests.Session() | |
self.url = 'https://flightstatus.vietjetair.com/?lang=vi' | |
self.user_agent = ("Mozilla/5.0 (X11; Linux x86_64) " |
Here is your homework, in each section, try to solve all the easy level problems.
If you have any question, please paste your code and output to https://glot.io/new/python then send to me via messenger.
Let's go!