This file contains hidden or 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
document.getElementById('jav') | |
.getElementByClass('inner')[0].innerText = 'Do not watch JAV'; |
This file contains hidden or 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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Tài liệu học tập</title> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://jav.av">Tài liệu Nhật</a></li> | |
<li><a href="http://kav.av">Tài liệu Hàn</a></li> | |
<li><a href="http://vav.av">Tài liệu Việt</a></li> | |
</ul> |
This file contains hidden or 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
# sample importing from your own library | |
#from samplelib.lib1 import print_something | |
from zipline.api import order_target, record, symbol, symbols, history | |
from zipline import run_algorithm | |
from time import time | |
import datetime | |
import pytz | |
import matplotlib.pyplot as plt |
This file contains hidden or 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
{ | |
"extends": "airbnb-base" | |
} |
This file contains hidden or 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
npm init | |
npm install -D eslint eslint-plugin-import eslint-config-airbnb-base | |
# Cài đặt eslint và các plugin |
This file contains hidden or 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
(async () => { | |
const imageUrl = 'http://storage.vpopfan.com/sontungmtp.jpg'; | |
const detectResult = await detectImage(imageUrl); | |
addFlower(imageUrl, detectResult, 'jav_flower.jpg'); | |
})(); | |
async function addFlower(url, detectResult, output) { | |
// Tính toán vị trí và khuôn mặt | |
const face = detectResult[0]; // Hình chỉ nhận được 1 khuôn mặt |
This file contains hidden or 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
const rp = require('request-promise'); | |
const Jimp = require("jimp"); | |
(async () => { | |
const imageUrl = 'https://pbs.twimg.com/media/DWr05hUXcAA9s8n.jpg'; | |
const detectResult = await detectImage(imageUrl); | |
addMustache(imageUrl, detectResult, 'jav_rau.jpg'); | |
})(); | |
async function addMustache(url, detectResult, output) { |
This file contains hidden or 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
const rp = require('request-promise'); | |
const Jimp = require("jimp"); | |
(async () => { | |
const imageUrl = 'https://pbs.twimg.com/media/DWr05hUXcAA9s8n.jpg'; | |
const detectResult = await detectImage(imageUrl); | |
addMustache(imageUrl, detectResult, 'jav_rau.jpg'); | |
})(); | |
async function addMustache(url, detectResult, output) { |
This file contains hidden or 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
async function addMustache(url, output) { | |
let source = await Jimp.read(url); | |
// Lấy chiều cao, rộng của ảnh | |
const { height, width } = source.bitmap; | |
const mustache = await Jimp.read('mustache.png'); | |
// Thu nhỏ bộ râu lại | |
mustache.resize(width, Jimp.AUTO); | |
return source.composite(mustache, 0, 0).write(output); | |
} |
This file contains hidden or 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
const Jimp = require("jimp"); | |
async function addMustache(url, output) { | |
let source = await Jimp.read(url); // Đọc ảnh từ URL | |
const mustache = await Jimp.read('mustache.png'); // Đọc file râu | |
// Gắn file râu vào vị trí x=0, y=0, lưu ra output | |
return source.composite(mustache, 0, 0).write(output); | |
} | |
(async () => { |