資源簡介
官方point cloud library的發(fā)行版包,直接下載會經常失敗
代碼片段和文件信息
#!?/usr/bin/env?python3
“““
Software?License?Agreement?(BSD?License)
?Point?Cloud?Library?(PCL)?-?www.pointclouds.org
?Copyright?(c)?2018-?Open?Perception?Inc.
?All?rights?reserved.
?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?modification?are?permitted?provided?that?the?following?conditions
?are?met:
??*?Redistributions?of?source?code?must?retain?the?above?copyright
????notice?this?list?of?conditions?and?the?following?disclaimer.
??*?Redistributions?in?binary?form?must?reproduce?the?above
????copyright?notice?this?list?of?conditions?and?the?following
????disclaimer?in?the?documentation?and/or?other?materials?provided
????with?the?distribution.
??*?Neither?the?name?of?the?copyright?holder(s)?nor?the?names?of?its
????contributors?may?be?used?to?endorse?or?promote?products?derived
????from?this?software?without?specific?prior?written?permission.
?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS
?“AS?IS“?AND?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT
?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS
?FOR?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT?SHALL?THE
?COPYRIGHT?OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT
?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING
?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;
?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER
?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT
?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN
?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE
?POSSIBILITY?OF?SUCH?DAMAGE.
“““
import?argparse
from?argparse?import?ArgumentParser
from?collections?import?defaultdict
import?getpass
import?json
import?os
import?pathlib
import?re
import?subprocess
import?sys
import?requests
def?find_pcl_folder():
????folder?=?os.path.dirname(os.path.abspath(__file__))
????folder?=?pathlib.Path(folder).parent
????return?str(folder)
def?find_pr_list(start:?str?end:?str):
????“““Returns?all?PR?ids?from?a?certain?commit?range.?Inspired?in
????http://joey.aghion.com/find-the-github-pull-request-for-a-commit/
????https://stackoverflow.com/questions/36433572/how-does-ancestry-path-work-with-git-log#36437843
????“““
????#?Let?git?generate?the?proper?pr?history
????cmd?=?“git?log?--oneline?“?+?start?+?“..“?+?end
????cmd?=?cmd.split()
????output?=?subprocess.run(cmd?cwd=FOLDER?stdout=subprocess.PIPE)
????pr_commits?=?output.stdout.split(b“\n“)
????#?Fetch?ids?for?all?merge?requests?from?PRS
????merge_re?=?re.compile(“\S+?Merge?pull?request?#(\d+)?from?\S+“)
????squash_re?=?re.compile(“\(#(\d+)\)“)
????ids?=?[]
????for?pr?in?pr_commits:
????????pr_s?=?str(pr)
????????#?Match?agains?usual?pattern
????????uid?=?None
????????match?=?merge_re.fullmatch(pr_s)
????????#?Match?agains?squash?pattern
????????if?not?match:
????????????match?=?squash_re.search(pr_s)
????????????#?Abort
????????????if?not?match:
?????
評論
共有 條評論