1
0

优化代码

This commit is contained in:
2025-01-16 17:00:48 +08:00
parent b74e33b37b
commit bd1131ee06
2 changed files with 11 additions and 6 deletions

View File

@@ -6,6 +6,11 @@ class Selector:
return codes 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): class PeriodSelector(Selector):
def __init__(self, period: int = 5): def __init__(self, period: int = 5):
self.__period = period self.__period = period

View File

@@ -6,8 +6,8 @@
"metadata": { "metadata": {
"collapsed": true, "collapsed": true,
"ExecuteTime": { "ExecuteTime": {
"end_time": "2025-01-15T09:42:10.585456Z", "end_time": "2025-01-16T07:57:04.498115Z",
"start_time": "2025-01-15T09:42:06.693869Z" "start_time": "2025-01-16T07:57:00.401734Z"
} }
}, },
"source": [ "source": [
@@ -56,13 +56,13 @@
"]]" "]]"
], ],
"outputs": [], "outputs": [],
"execution_count": 17 "execution_count": 1
}, },
{ {
"metadata": { "metadata": {
"ExecuteTime": { "ExecuteTime": {
"end_time": "2025-01-15T09:45:06.335656Z", "end_time": "2025-01-16T07:57:04.552251Z",
"start_time": "2025-01-15T09:45:06.291888Z" "start_time": "2025-01-16T07:57:04.499999Z"
} }
}, },
"cell_type": "code", "cell_type": "code",
@@ -86,7 +86,7 @@
] ]
} }
], ],
"execution_count": 24 "execution_count": 2
} }
], ],
"metadata": { "metadata": {