本文整理汇总了Python中properties.Properties.get_properties方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.get_properties方法的具体用法?Python Properties.get_properties怎么用?Python Properties.get_properties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类properties.Properties
的用法示例。
在下文中一共展示了Properties.get_properties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import get_properties [as 别名]
rank_images = images_count / size
#-------------------Wyslanie do innych watkow
for send_rank in range(1, size):
send_images = []
for part_image in range(0, rank_images):
send_images.append(images[0])
images.remove(images[0])
comm.send(send_images, dest=send_rank, tag=111)
#-------------------Policzenie na watku zerowym
rank0_images = images.__len__()
images_for_properties = get_images_for_properties(images)
p = Properties()
p.load(images_for_properties)
properties = p.get_properties()
trait = properties[0] * rank0_images
dynamic = properties[1] * rank0_images
colors = [x * rank0_images for x in properties[2]]
#-------------------Zebranie wynikow
for recv_rank in range(1, size):
properties = comm.recv(source=recv_rank, tag=111)
trait += properties[0] * rank_images
dynamic += properties[1] * rank_images
map(add, colors, [x * rank_images for x in properties[2]])
colors_map = [(0.125, "red"), (0.25, "orange"), (0.375, "yellow"),
(0.5, "green"), (0.625, "teal"), (0.75, "blue"),
(0.875, "purple"), (1., "pink")]