# 如果已安装的 FFMPEG 已经支持了 `freetype` ,那么就不需要再安装了。
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 python | |
#coding: utf8 | |
import json, re | |
import requests | |
try: | |
from bs4 import BeautifulSoup | |
except: |
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
<!DOCTYPE html> | |
<html lang="vi"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Vietnamese characters</title> | |
<style type="text/css"> | |
:root { | |
font-size: 16px; | |
} |
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
<!DOCTYPE html> | |
<html lang="cmn-Latn-pinyin"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Pinyin characters test</title> | |
</head> | |
<style type="text/css"> | |
:root { | |
font-size: 16px; |
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 python | |
#-*- coding:utf-8 -*- | |
""" | |
IPv4 addresses to a 32-bit integer value | |
Document: https://en.wikipedia.org/wiki/IPv4#Address_representations | |
IPv4 addresses may be in any notation expressing a 32-bit integer value, |
- Date
08/28 2017
手动访问 https://www.interactivebrokers.com.hk/cn/software/glossary/glossary_Left.htm , 复制出 内嵌网页的目录 HTML 标记代码,并保存为 raw.html 即可.
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
def rgb_to_ycbcr(r, g, b): | |
assert(255>=r) | |
assert(255>=g) | |
assert(255>=b) | |
y = 0.299*r + 0.587*g + 0.114*b | |
cb = 128 - 0.168736*r - 0.331364*g + 0.5*b | |
cr = 128 + 0.5*r - 0.418688*g - 0.081312*b | |
return int(y), int(cb), int(cr) |
- Date
04/03 2017
- FabricGithub
- FabricVersion
v1.0.0-alpha
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 python | |
#coding: utf8 | |
import base64 | |
import hashlib | |
import binascii | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
from os import urandom |
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
#![allow(dead_code, unused_imports)] | |
use std::net::TcpStream; | |
use std::net::Shutdown; | |
use std::net::Ipv4Addr; | |
use std::net::SocketAddr; | |
use std::net::SocketAddrV4; | |
use std::net::ToSocketAddrs; | |
use std::io::{self, Read, Write}; | |
use std::time::Instant; |
NewerOlder