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
import requests | |
from bs4 import BeautifulSoup | |
import os | |
def get_episode(url): | |
res = requests.get(url).text | |
soup = BeautifulSoup(res, 'lxml') | |
mp3_href = soup.find(string='Herunterladen').parent['href'] | |
mp3_url = base_url + mp3_href |
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
import os | |
def change_dir(dir): | |
for root, dirs, files in os.walk(dir): | |
for f in files: | |
file_path = os.path.join(root, f) | |
change_file(file_path) |
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
import requests | |
from bs4 import BeautifulSoup | |
with open("bank.html") as source: | |
soup = BeautifulSoup(source, "lxml") | |
sum = 0 | |
for item in soup.div(class_="offscreen"): | |
try: | |
item = item.text.split(" ")[0] | |
integer, fraction = item.split(",") |
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
"======================================================================= | |
" Plugin | |
"======================================================================= | |
call plug#begin('~/.vim/plugged') | |
" colorscheme | |
Plug 'morhetz/gruvbox' | |
Plug 'sainnhe/gruvbox-material' | |
" statusline | |
Plug 'itchyny/lightline.vim' |
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
import os | |
from bs4 import BeautifulSoup, Comment, Tag, NavigableString | |
import requests | |
import unicodedata | |
result = './result.txt' | |
result_body = './body.txt' | |
md_dir = '/Users/yh/Documents/myblog/content/blog/' | |
url_file = 'url.txt' |
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
import sys | |
from bs4 import BeautifulSoup | |
if len(sys.argv) < 2: | |
print("Need file name!") | |
sys.exit(2) | |
with open(sys.argv[1]) as f: | |
s = f.read() |
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
Xft.dpi:96 | |
URxvt.font: xft:Inconsolata Nerd Font Mono:size=14 | |
! scrollbar | |
Rxvt.scrollBar:False | |
Rxvt.saveLines:10000 | |
! input method | |
URxvt.inputMethod:fcitx |
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
export GTK_IM_MODULE=fcitx | |
export QT_IM_MODULE=fcitx | |
export XMODIFIERS=@im=fcitx | |
# set key delay and repeat | |
xset r rate 250 25 | |
# urxvt config | |
xrdb ~/.Xresources |
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
[ -f ~/.xprofile ] && . ~/.xprofile |
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 https://i3wm.org/docs/userguide.html for a complete reference! |
OlderNewer