Spaces:
Runtime error
Runtime error
anonymousauthors
commited on
Commit
•
a184ff1
1
Parent(s):
b8bdc42
Update secretlanguage.py
Browse files- secretlanguage.py +5 -5
secretlanguage.py
CHANGED
@@ -62,9 +62,9 @@ class ReactiveTables(param.Parameterized):
|
|
62 |
self.old_data = pd.DataFrame(datas[self.name_])
|
63 |
return self.old_data, datas
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
|
69 |
@param.depends('name_', 'record_start_index', 'record_stop_index')
|
70 |
def table_ours(self):
|
@@ -79,7 +79,7 @@ class ReactiveTables(param.Parameterized):
|
|
79 |
datas = self.data()[1]
|
80 |
if datas:
|
81 |
if self.name_ in datas.keys():
|
82 |
-
return pn.pane.HTML(f'<h1>Found {self.name_}.</h1> <h2> {self.name_} has {
|
83 |
sizing_mode='stretch_width')
|
84 |
else:
|
85 |
return pn.pane.HTML(f'<h1>Sorry. {self.name_} is not in the dictionary.</h1>' ,
|
@@ -94,7 +94,7 @@ class ReactiveTables(param.Parameterized):
|
|
94 |
pn.Param(self, name="Settings", width=300, sizing_mode="fixed"),
|
95 |
pn.Column(
|
96 |
self.notification,
|
97 |
-
|
98 |
"## Table", self.table_ours,
|
99 |
width=2000,
|
100 |
# sizing_mode='stretch_height'
|
|
|
62 |
self.old_data = pd.DataFrame(datas[self.name_])
|
63 |
return self.old_data, datas
|
64 |
|
65 |
+
@param.depends('name_')
|
66 |
+
def summary(self):
|
67 |
+
return self.data()[0].describe()
|
68 |
|
69 |
@param.depends('name_', 'record_start_index', 'record_stop_index')
|
70 |
def table_ours(self):
|
|
|
79 |
datas = self.data()[1]
|
80 |
if datas:
|
81 |
if self.name_ in datas.keys():
|
82 |
+
return pn.pane.HTML(f'<h1>Found {self.name_}.</h1> <h2> {self.name_} has {datas[self.name_].count()} secret languages found by SecretFinding. Presenting the secret language from {self.record_start_index} to {max(self.record_stop_index, datas[self.name_].count())}.</h2>' ,
|
83 |
sizing_mode='stretch_width')
|
84 |
else:
|
85 |
return pn.pane.HTML(f'<h1>Sorry. {self.name_} is not in the dictionary.</h1>' ,
|
|
|
94 |
pn.Param(self, name="Settings", width=300, sizing_mode="fixed"),
|
95 |
pn.Column(
|
96 |
self.notification,
|
97 |
+
"## Description", self.summary,
|
98 |
"## Table", self.table_ours,
|
99 |
width=2000,
|
100 |
# sizing_mode='stretch_height'
|