优化代码
This commit is contained in:
@@ -6,6 +6,11 @@ class Selector:
|
||||
return codes
|
||||
|
||||
|
||||
class Score:
|
||||
def score(self, codes: [str], df: pd.DataFrame) -> [(str, int)]:
|
||||
return list(map(lambda code: (code, 0), codes))
|
||||
|
||||
|
||||
class PeriodSelector(Selector):
|
||||
def __init__(self, period: int = 5):
|
||||
self.__period = period
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"metadata": {
|
||||
"collapsed": true,
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-01-15T09:42:10.585456Z",
|
||||
"start_time": "2025-01-15T09:42:06.693869Z"
|
||||
"end_time": "2025-01-16T07:57:04.498115Z",
|
||||
"start_time": "2025-01-16T07:57:00.401734Z"
|
||||
}
|
||||
},
|
||||
"source": [
|
||||
@@ -56,13 +56,13 @@
|
||||
"]]"
|
||||
],
|
||||
"outputs": [],
|
||||
"execution_count": 17
|
||||
"execution_count": 1
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-01-15T09:45:06.335656Z",
|
||||
"start_time": "2025-01-15T09:45:06.291888Z"
|
||||
"end_time": "2025-01-16T07:57:04.552251Z",
|
||||
"start_time": "2025-01-16T07:57:04.499999Z"
|
||||
}
|
||||
},
|
||||
"cell_type": "code",
|
||||
@@ -86,7 +86,7 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"execution_count": 24
|
||||
"execution_count": 2
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user