Skip to content

Instantly share code, notes, and snippets.

View nguyenit67's full-sized avatar
🚀
Aim for the best 💪💪💪

Nguyen Hoang Nguyen nguyenit67

🚀
Aim for the best 💪💪💪
View GitHub Profile
@nguyenit67
nguyenit67 / remove_accents.py
Created November 22, 2022 16:01 — forked from J2TEAM/remove_accents.py
Remove Vietnamese Accents - Xoá dấu tiếng việt in Python
s1 = u'ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯưẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ'
s0 = u'AAAAEEEIIOOOOUUYaaaaeeeiioooouuyAaDdIiUuOoUuAaAaAaAaAaAaAaAaAaAaAaAaEeEeEeEeEeEeEeEeIiIiOoOoOoOoOoOoOoOoOoOoOoOoUuUuUuUuUuUuUuYyYyYyYy'
def remove_accents(input_str):
s = ''
print input_str.encode('utf-8')
for c in input_str:
if c in s1:
s += s0[s1.index(c)]
else:
s += c
- lấy bài hát liên quan:
http://mp3.zing.vn/xhr/recommend?type=audio&id=ZW67OIA0
- lấy data thông qua key:
http://mp3.zing.vn/xhr/media/get-source?type=audio&key=kmJHTZHNCVaSmSuymyFHLH
http://mp3.zing.vn/html5xml/song-xml/kmJHTZHNCVaSmSuymyFHLH
- lấy info bài hát
https://mp3.zing.vn/xhr/media/get-info?type=audio&id=ZW8I7AAI
async function searchManga(title) {
const result = await (await fetch(`https://api.mangadex.org/manga?title=${encodeURI(title)}`)).json();
return result.results.map(v => v.data)
}
async function getChapters(mangaID) {
const result = await (await fetch(`https://api.mangadex.org/chapter/?manga=${mangaID}&limit=50`)).json();
return result.results;
}
async function getChapterInfo(chapterID) {
const result = await (await fetch(`https://api.mangadex.org/chapter/${chapterID}`)).json();

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.