code stringlengths 3 6.57k |
|---|
on_show_warnings(self) |
text_browser.clear() |
text_browser.append('No known warnings!') |
text_browser.append(msg) |
text_browser.append('Services with warning state:') |
self._feedback_warnings.items() |
text_browser.append("Client %s:" % client) |
text_browser.append(" %s[%s]: %s" % (service_info.uri, Address(service_info.addr_control) |
self.access_state_to_str(service_info.access_state) |
self._warning_dialog.show() |
update_feedback_warnings(self) |
dict(Address of the ocu client: ServiceInfo) |
dict() |
self._ocu_client.get_warnings(self.subsystem_id, self.has_control() |
warnings.update(cw) |
dict() |
self._ocu_client.get_srvs_ins_authority(self.subsystem_id) |
insathority.update(cw) |
self.handoff_dialog.update_authority_problems(insathority) |
self._update_warnings_button() |
set_warnings(self, warnings) |
self._update_warnings_button() |
_update_warnings_button(self) |
len(self._warnings) |
len(self._feedback_warnings) |
self.has_control() |
self._widget.button_control.setStyleSheet("QPushButton { background-color: #FE9A2E;}") |
self.has_control() |
self._widget.button_control.setStyleSheet("QPushButton { background-color: #98FB98;}") |
self._widget.button_view.setStyleSheet("QPushButton { background-color: #98FB98;}") |
self.has_view() |
self._widget.button_control.setStyleSheet("QPushButton { background-color: None;}") |
self._widget.button_view.setStyleSheet("QPushButton { background-color: #98FB98;}") |
and (self._ocu_client is None or self.control_addr.subsystem_id != self._ocu_client.subsystem_id) |
self._widget.button_control.setStyleSheet("QPushButton { background-color: #A9A9A9;}") |
self._widget.button_view.setStyleSheet("QPushButton { background-color: None;}") |
self._widget.button_control.setStyleSheet("QPushButton { background-color: None;}") |
self._widget.button_view.setStyleSheet("QPushButton { background-color: None;}") |
self._widget.button_warnings.setEnabled(has_warning) |
update_ident(self, ident) |
Address(ident.address) |
Address(self._subsystem.ident.address) |
rospy.Time.now() |
Address(ident.address) |
_get_component_name(self, msg_address) |
Address(msg_address) |
is_old(self) |
rospy.Time.now() |
rospy.Duration(self.MAX_AGE) |
get_widget(self) |
_create_warning_dialog(self) |
QDialog(self._widget) |
os.path.join(os.path.dirname(os.path.realpath(__file__) |
loadUi(ui_file, diag) |
diag.resize(600, 250) |
diag.setWindowTitle("Warning for %s[%d]" % (self.name, self.subsystem_id) |
diag.setWindowIcon(QIcon.fromTheme("dialog-warning") |
_create_detailed_dialog(self) |
QDialog(self._widget) |
os.path.join(os.path.dirname(os.path.realpath(__file__) |
loadUi(ui_file, diag) |
diag.treewidget_components.setHeaderLabel("%s [%d]" % (self.name, self.subsystem_id) |
diag.resize(500, 300) |
diag.setWindowTitle("subsystem %s[%d]" % (self.name, self.subsystem_id) |
diag.setWindowIcon(QIcon.fromTheme("help-about") |
access_state_to_str(self, state) |
stockUp(priceFile) |
open(priceFile, "r") |
line.split(",") |
date.append(day) |
stock.append(float(item) |
infile.close() |
len(date) |
range(1,len(stock) |
while ((i>0) |
float(stock[k]) |
float(stock[i]) |
plt.subplots() |
ax1.set_xlabel('Days started from 11/13/2017 and end on 11/12/2018') |
ax1.set_ylabel('Stock prices', color=color) |
ax1.plot(date, stock, color=color) |
ax1.tick_params(axis='y', labelcolor=color) |
ax1.twinx() |
ax2.set_ylabel('Up periods', color=color) |
ax2.plot(date, up, color=color) |
ax2.tick_params(axis='y', labelcolor=color) |
fig.tight_layout() |
plt.show() |
plt.plot(date, up, marker='x') |
plt.plot(date, stock, marker='o') |
plt.title('The up periods for 11/13/2017-11/12/2018') |
plt.xlabel('Days started from 11/13/2017 and end on 11/12/2018') |
plt.ylabel('The up periods of GOOGL at closing') |
plt.show() |
stockUp("GOOGL.csv") |
Distancia (UNED) |
__init__(self) |
trigger(self) |
callback() |
print(callback) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.