code
stringlengths
3
6.57k
WinForms.ApplicationContext()
SetProcessDpiAwareness(True)
if ((win_version.Major == 6 and win_version.Minor == 3)
or (win_version.Major == 10 and win_version.Build < 15063)
shcore.SetProcessDpiAwareness(True)
SetProcessDpiAwarenessContext(-2)
user32.SetProcessDpiAwarenessContext(-2)
SetProcessDPIAware()
user32.SetProcessDPIAware()
self.native.EnableVisualStyles()
self.native.SetCompatibleTextRenderingDefault(False)
self.interface.about()
format(self.interface.name)
toga.Command(None, 'Preferences', group=toga.Group.FILE)
self.interface.exit()
self.interface.visit_homepage()
self._create_app_commands()
self.interface.startup()
self.create_menus()
self.interface.icon.bind(self.interface.factory)
self.interface.main_window._impl.set_app(self)
create_menus(self)
WinForms.MenuStrip()
submenu.DropDownItems.Add('-')
self._submenu(cmd.group, menubar)
WinForms.ToolStripMenuItem(cmd.label)
cmd._impl.as_handler()
toga_to_winforms_key(cmd.shortcut)
cmd._impl.native.append(item)
submenu.DropDownItems.Add(item)
self.interface.main_window._impl.native.Controls.Add(menubar)
self.interface.main_window.content.refresh()
_submenu(self, group, menubar)
self._submenu(group.parent, menubar)
WinForms.ToolStripMenuItem(group.label)
parent_menu.Items.Add(submenu)
parent_menu.DropDownItems.Add(submenu)
_create_app_commands(self)
open_document(self, fileURL)
print("STUB: If you want to handle opening documents, implement App.open_document(fileURL)
winforms_thread_exception(self, sender, winforms_exc)
print("Traceback (most recent call last)
winforms_exc.get_Exception()
regex.findall(full_stack_trace)
len(stacktrace_relevant_lines)
self.print_stack_trace(full_stack_trace)
self.print_stack_trace(line)
print(py_exc.Message)
print_stack_trace(cls, stack_trace_line)
stack_trace_line.split("', '")
level.split("\\n")
print(line)
run_app(self)
self.create()
self.loop.run_forever(self.app_context)
traceback.print_exc()
main_loop(self)
Threading.Thread(Threading.ThreadStart(self.run_app)
thread.SetApartmentState(Threading.ApartmentState.STA)
thread.Start()
thread.Join()
show_about_dialog(self)
format(name=self.interface.name)
format(version=self.interface.version)
format(author=self.interface.author)
format(self.interface.name)
join(message_parts)
exit(self)
self.native.Exit()
set_main_window(self, window)
set_on_exit(self, value)
current_window(self)
self.interface.factory.not_implemented('App.current_window()
enter_full_screen(self, windows)
self.interface.factory.not_implemented('App.enter_full_screen()
exit_full_screen(self, windows)
self.interface.factory.not_implemented('App.exit_full_screen()
set_cursor(self, value)
self.interface.factory.not_implemented('App.set_cursor()
show_cursor(self)
self.interface.factory.not_implemented('App.show_cursor()
hide_cursor(self)
self.interface.factory.not_implemented('App.hide_cursor()
add_background_task(self, handler)
self.loop.call_soon(handler, self)
DocumentApp(App)
_create_app_commands(self)
open_document(self, fileURL)
fileURL (str)
self.interface.factory.not_implemented('DocumentApp.open_document()
classFactory(iface)
SimplePhotogrammetryRoutePlanner(iface)
np.random.seed(1)
np.random.randn(100, 10)
np.hstack([X, np.zeros([100, 5])
featureSelection_variance(X, thrd)
VarianceThreshold(threshold=thrd)
sel.fit_transform(X)
sel.get_support()
VarianceThreshold()