OS: CentOS 7
- Python 3.7
- pip & pipenv
[root@042fa62fd714 /]# cd /usr/src/
[root@042fa62fd714 src]# yum -y install zlib-devel gcc make wget openssl-devel libffi-devel
| # -*- coding:utf-8 -*- | |
| from requests import Session | |
| from bs4 import BeautifulSoup | |
| class People(): | |
| def __init__(self, id, password): | |
| self.session = Session() | |
| self.post_account(id, password) | |
| def get(self, url): |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>servo motor control</title> | |
| <link rel=stylesheet href="static/css/jquery.mobile-1.4.5.min.css"> | |
| <script src="static/js/jquery-1.12.0.min.js"></script> | |
| <script src="static/js/jquery.mobile-1.4.5.min.js"></script> | |
| </head> | |
| <body> |
| # -*- coding:utf-8 -*- | |
| import json | |
| import requests | |
| from bs4 import BeautifulSoup | |
| domain = "http://wiki.52poke.com" | |
| list_page = "http://wiki.52poke.com/wiki/%E5%AE%9D%E5%8F%AF%E6%A2%A6%E5%88%97%E8%A1%A8%EF%BC%88%E6%8C%89%E5%85%A8%E5%9B%BD%E5%9B%BE%E9%89%B4%E7%BC%96%E5%8F%B7%EF%BC%89/%E7%AE%80%E5%8D%95%E7%89%88" | |
| pokemons = [] | |
| def pokemon_detail(url): |
| [["0", "台北"], ["3", "台北二輪"], ["18", "基隆"], ["16", "桃園"], ["1", "中壢"], ["20", "新竹"], ["15", "苗栗"], ["2", "台中"], ["22", "彰化"], ["19", "雲林"], ["13", "南投"], ["21", "嘉義"], ["10", "台南"], ["17", "高雄"], ["11", "宜蘭"], ["12", "花蓮"], ["9", "台東"], ["14", "屏東"], ["24", "金門"], ["23", "澎湖"]] |
OS: CentOS 7
[root@042fa62fd714 /]# cd /usr/src/
[root@042fa62fd714 src]# yum -y install zlib-devel gcc make wget openssl-devel libffi-devel
| // Auto switch to next one when end of a song. | |
| // start playing a song then paste this code. | |
| (function() { | |
| function getElementByXpath(path) { | |
| return document.evaluate( | |
| path, | |
| document, | |
| null, | |
| XPathResult.FIRST_ORDERED_NODE_TYPE, | |
| null |
| from pydantic import BaseModel | |
| def func_helper(parameter_type, return_type=None): | |
| def decorator(function): | |
| def wrapper(*args, **kwargs): | |
| result = function(parameter_type(**kwargs)) | |
| return return_type(**result) if return_type else result | |
| return wrapper |
| javascript: (() => { | |
| const vid = new URL(document.URL).searchParams.get('v'); | |
| navigator.clipboard.writeText("https://youtu.be/" + vid); | |
| })(); |
| javascript: (() => { | |
| const blocked = new Set(['fbclid', 'utm_source', 'utm_medium', 'utm_campaign', 'ref_src', 'ref_url']); | |
| let url = new URL(document.URL); | |
| let params = new URLSearchParams(url.searchParams); | |
| for (let key of params.keys()) { | |
| if (blocked.has(key)) { | |
| url.searchParams.delete(key); | |
| } | |
| } | |
| let result = `${url.origin}${url.pathname}${url.searchParams.toString() ? '?' + url.searchParams.toString() : ''}${url.hash}`; |
| version: "3" | |
| services: | |
| janusgraph: | |
| image: janusgraph/janusgraph:0.6.2 | |
| container_name: jce-janusgraph | |
| env_file: | |
| - janusgraph.env | |
| ports: | |
| - "8182:8182" |