- 将脚本文件放到obj,png同目录下即可,
python3 script.py,命令行中的输出为obj中平面的数量,与1.中的decimal设置有关
结果图(lenOfRGBs == 50):
- 可调参数,懒得写在命令行了,直接在py文件改
a. decimal(Line 32),越小,平面数量越少
| from logging import info | |
| import os, pdfplumber, docx, xlrd | |
| import sys | |
| from win32com import client as wc | |
| def doc2docx(file): | |
| word = wc.Dispatch("Word.Application") | |
| doc = word.Documents.Open(doc_path+'/'+file) | |
| doc.SaveAs(doc_path+'/'+'{}x'.format(file), 12) | |
| doc.Close() |
| from genericpath import getctime | |
| from urllib import parse | |
| from selenium import webdriver | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| from webdriver_manager.utils import download_file | |
| search_word = 'ethereum smart contract' | |
| query = '+'.join(search_word.split(' ')) | |
| url = 'https://scholar.google.com/scholar?hl=en&start=%d&q=%s' |
| from eth_typing.evm import Address | |
| from web3 import Web3 | |
| import time | |
| NODE_URL = "YOUR NODE URL(https://admin.moralis.io/speedyNodes获取)" | |
| w3 = Web3(Web3.HTTPProvider(NODE_URL)) | |
| vis = {} | |
| with open('vis.txt', 'r') as r: | |
| for l in r: |
| __author__ = 'itherunder' | |
| ''' | |
| https://etherscan.io/tokens?ps=100&p=1,从这里拿的 | |
| coins = document.getElementsByClassName('text-primary') | |
| res = [] | |
| for (let i = 0; i < 100; i++) { | |
| var name = coins[i].text | |
| var href = coins[i].href | |
| console.log(name, href) | |
| res.push([name, href]) |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| var z float64 = 1 | |
| for math.Abs(z*z-x) > 0.0001 { |
| package main | |
| import "fmt" | |
| // 返回一个“返回int的函数” | |
| func fibonacci() func() int { | |
| a, b := 1, 0 | |
| return func() int { | |
| a, b = a+b, a | |
| return b |
| I am attesting that this GitHub handle itherunder is linked to the Tezos account tz1cBabDyuEqavNuRwoFoen5fH5Lmy8vufak for tzprofiles | |
| sig:edsigteN16Zy81qXFw3ECVeDjw3HXKUzm8vJk5MUCdNrFhVR8ogLTtDiyvAn4hKwdMJ5ydSqm8TnUPaTw15jP9BjGqNfu96PTHg |
| { | |
| "provider": "https://mainnet.infura.io/v3/your_token", | |
| "tokenAddress": "0x7A58c0Be72BE218B41C608b7Fe7C5bB630736C71", | |
| "fromBlock": "0", | |
| "toBlock": "latest", | |
| "abi": [] | |
| } |
| import time, requests, json, os | |
| from threading import Thread, Lock | |
| __author__ = "Zhou.Liao" | |
| if not os.path.exists('./gettedAddress'): | |
| fp = open('./gettedAddress', 'w') | |
| fp.close() | |
| if not os.path.exists('bytecodes/'): | |
| os.system('mkdir bytecodes/') |