text stringlengths 1 93.6k |
|---|
os.system(UNINSTALL_COMMAND)
|
self.after_uninstall()
|
def after_uninstall(self):
|
pass
|
def before_run(self):
|
pass
|
def run(self):
|
self.before_run()
|
if isinstance(self.RUN_COMMANDS, (list, tuple)):
|
for RUN_COMMAND in self.RUN_COMMANDS:
|
os.system(RUN_COMMAND)
|
self.after_run()
|
def after_run(self):
|
pass
|
def is_installed(self, dir_to_check = None):
|
print("Unimplemented: DO NOT USE")
|
return "?"
|
def show_project_page(self):
|
webbrowser.open_new_tab(self.PROJECT_URL)
|
class HackingToolsCollection(object):
|
TITLE: str = "" # used to show info in the menu
|
DESCRIPTION: str = ""
|
TOOLS = [] # type: List[Any[HackingTool, HackingToolsCollection]]
|
def __init__(self):
|
pass
|
def show_info(self):
|
os.system("figlet -f standard -c {} | lolcat".format(self.TITLE))
|
# os.system(f'echo "{self.DESCRIPTION}"|boxes -d boy | lolcat')
|
# print(self.DESCRIPTION)
|
def show_options(self, parent = None):
|
clear_screen()
|
self.show_info()
|
for index, tool in enumerate(self.TOOLS):
|
print(f"[{index} {tool.TITLE}")
|
print(f"[{99}] Back to {parent.TITLE if parent is not None else 'Exit'}")
|
tool_index = input("Choose a tool to proceed: ")
|
try:
|
tool_index = int(tool_index)
|
if tool_index in range(len(self.TOOLS)):
|
ret_code = self.TOOLS[tool_index].show_options(parent = self)
|
if ret_code != 99:
|
input("\n\nPress ENTER to continue:")
|
elif tool_index == 99:
|
if parent is None:
|
sys.exit()
|
return 99
|
except (TypeError, ValueError):
|
print("Please enter a valid option")
|
input("\n\nPress ENTER to continue:")
|
except Exception as e:
|
print_exc()
|
input("\n\nPress ENTER to continue:")
|
return self.show_options(parent = parent)
|
# <FILESEP>
|
"""
|
FlowNet3D model with up convolution
|
"""
|
import tensorflow as tf
|
import numpy as np
|
import math
|
import sys
|
import os
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
sys.path.append(os.path.join(BASE_DIR, 'utils'))
|
import tf_util
|
from pointnet_util import *
|
def placeholder_inputs(batch_size, num_point):
|
pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point * 2, 6))
|
labels_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 3))
|
masks_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point))
|
return pointclouds_pl, labels_pl, masks_pl
|
def get_model(point_cloud, is_training, bn_decay=None, reuse=False):
|
""" FlowNet3D, for evaluating on KITTI
|
input: Bx(N1+N2)x3,
|
output: BxN1x3 """
|
end_points = {}
|
batch_size = point_cloud.get_shape()[0].value
|
num_point = point_cloud.get_shape()[1].value // 2
|
l0_xyz_f1 = point_cloud[:, :num_point, 0:3]
|
l0_points_f1 = point_cloud[:, :num_point, 3:]
|
l0_xyz_f2 = point_cloud[:, num_point:, 0:3]
|
l0_points_f2 = point_cloud[:, num_point:, 3:]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.